This commit is contained in:
jl777
2019-03-26 09:19:43 -11:00
parent f173721007
commit 5abd8a9207

View File

@@ -307,11 +307,11 @@ static void tg_handle_move(struct games_state *rs,tetris_game *obj, tetris_move
{ {
switch (move) { switch (move) {
case TM_LEFT: case TM_LEFT:
//fprintf(stderr,"LEFT "); fprintf(stderr,"LEFT ");
tg_move(obj, -1); tg_move(obj, -1);
break; break;
case TM_RIGHT: case TM_RIGHT:
//fprintf(stderr,"RIGHT "); fprintf(stderr,"RIGHT ");
tg_move(obj, 1); tg_move(obj, 1);
break; break;
case TM_DROP: case TM_DROP:
@@ -459,7 +459,7 @@ void tg_init(struct games_state *rs,tetris_game *obj, int rows, int cols)
obj->stored.ori = 0; obj->stored.ori = 0;
obj->stored.loc.row = 0; obj->stored.loc.row = 0;
obj->next.loc.col = obj->cols/2 - 2; obj->next.loc.col = obj->cols/2 - 2;
printf("%d", obj->falling.loc.col); //printf("%d", obj->falling.loc.col);
} }
tetris_game *tg_create(struct games_state *rs,int rows, int cols) tetris_game *tg_create(struct games_state *rs,int rows, int cols)
@@ -672,7 +672,7 @@ void *gamesiterate(struct games_state *rs)
while ( running != 0 ) while ( running != 0 )
{ {
running = tg_tick(rs,tg,move); running = tg_tick(rs,tg,move);
if ( rs->guiflag != 0 || rs->sleeptime != 0 ) if ( 0 && (rs->guiflag != 0 || rs->sleeptime != 0) )
{ {
display_board(board,tg); display_board(board,tg);
display_piece(next,tg->next); display_piece(next,tg->next);
@@ -703,7 +703,7 @@ void *gamesiterate(struct games_state *rs)
if ( skipcount == 0 ) if ( skipcount == 0 )
{ {
c = games_readevent(rs); c = games_readevent(rs);
//fprintf(stderr,"%04x\n",c); fprintf(stderr,"%04x\n",c);
if ( (c & 0x4000) == 0x4000 ) if ( (c & 0x4000) == 0x4000 )
{ {
skipcount = (c & 0x3fff); skipcount = (c & 0x3fff);