From 787115acccfb845aec0a5f5ed8199019d8508bee Mon Sep 17 00:00:00 2001 From: "pavel.glushkov" Date: Sun, 9 Oct 2016 06:19:54 +0300 Subject: [PATCH] rm unused code --- game.c | 34 +++++++--------------------------- game.gb | Bin 32768 -> 32768 bytes 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/game.c b/game.c index ca2089c..1672a40 100644 --- a/game.c +++ b/game.c @@ -379,14 +379,14 @@ BOOLEAN check_bottom_collision(DWORD y) { } BOOLEAN check_pipe_collision(DWORD y, INT8 level) { - // const UINT8 player_height = flbird_tile_map_height; - // // printf("%d %d\n", y, level); - // if (y < level * SPRITE_HEIGHT + player_height * SPRITE_HEIGHT || - // y > level * SPRITE_HEIGHT + PIPE_GAP * SPRITE_HEIGHT) { - // return TRUE; - // } else { + const UINT8 player_height = flbird_tile_map_height; + + if (y < level * SPRITE_HEIGHT + player_height * SPRITE_HEIGHT || + y > level * SPRITE_HEIGHT + PIPE_GAP * SPRITE_HEIGHT) { + return TRUE; + } else { return FALSE; - // } + } } INT16 get_player_y_pos(UINT8 t, UINT8 yd) { @@ -674,7 +674,6 @@ void main() { INT8 tutorial_step_counter = 0; UINT16 pipe_number = 1; UINT16 current_score = 0; - UINT8 ttt[5]; enum game_states current_game_state = TRANSITION_TO_TITLE; game_sprite_object player; @@ -684,17 +683,6 @@ void main() { NR52_REG = 0x80; NR51_REG = 0xFF; NR50_REG = 0x77; - // - // NR10_REG = 0x1E; - // NR11_REG = 0x10; - // NR12_REG = 0xF3; - // NR13_REG = 0x00; - // NR14_REG = 0x87; - - - // // Mute channel 1 (there are other ways to do this) - // NR12 = 0; - // NR14 = 0x80; ENABLE_RAM_MBC1; @@ -763,14 +751,6 @@ void main() { // set_interrupts(VBL_IFLAG | LCD_IFLAG); - for (i = 0; i < 5; i++) { - ttt[i] = 1; - } - - // fill_pipe_row_with_numbers(ttt, 0, (INT16) RAMPtr[0]); - - // set_bkg_tiles(2, 2, 5, 1, ttt); - draw_land(); draw_title(); di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