diff --git a/nes/nescoundrel.c b/nes/nescoundrel.c index e96dce3..563e589 100644 --- a/nes/nescoundrel.c +++ b/nes/nescoundrel.c @@ -86,8 +86,8 @@ void colorxy(unsigned char x, unsigned char y, unsigned char palette) { } void game_startup() { - unsigned int entropy, i, j; - unsigned char joy; + unsigned int entropy; + unsigned char joy, i, j; #ifdef _randomize _randomize(); #endif @@ -148,16 +148,14 @@ void win_screen(int score) { for(j=0;j<12;j+=4) for(i=3;i<32;i+=4) colorxy(i, j, 1 + (rand() % 3)); - gotoxy(0, 3); - cputs(" ___ ___ ___ ______ \r\n" \ + cputsxy(0, 3, " ___ ___ ___ ______ \r\n" \ " | Y | | _ \\ \r\n" \ " |. | |. |. | |\r\n" \ " |. / \\ |. |. | |\r\n" \ " |: |: |: | |\r\n" \ " |::.|:. |::.|::.| |\r\n" \ " `--- ---`---`--- ---'"); - gotoxy(0, 12); - cputs(" Congratulations! You made it\r\n through the dangerous\r\n dungeon alive!\r\n\r\n"); + cputsxy(0, 12, " Congratulations! You made it\r\n through the dangerous\r\n dungeon alive!\r\n\r\n"); cprintf(" Your score: %d\r\n\r\n", score); chlinexy(0, 17, SCREEN_WIDTH); cputs("Created by Luxferre in 2026\r\nReleased into public domain\r\n"); @@ -275,13 +273,13 @@ void render_room_item(short i, short v) { /* Render main game screen */ void render_main_scene() { - short i, deck_count = 0, statbase = 17; - short room_start_x = 1, - room_start_y = 1, - room_end_x = statbase - 8, - room_end_y = SCREEN_HEIGHT - 4, - room_mid_x = room_start_x + ((room_end_x - room_start_x)>>1) - 1, - room_mid_y = room_start_y + ((room_end_y - room_start_y)>>1) - 1; + unsigned char i, deck_count = 0, statbase = 17, + room_start_x = 1, + room_start_y = 1, + room_end_x = statbase - 8, + room_end_y = SCREEN_HEIGHT - 4, + room_mid_x = room_start_x + ((room_end_x - room_start_x)>>1) - 1, + room_mid_y = room_start_y + ((room_end_y - room_start_y)>>1) - 1; for(i=0;i 1) { for(i=n-1;i>0;i--) { @@ -386,7 +384,7 @@ void handle_weapon(int val) { durability = 14; /* reset durability to max limit */ } -void handle_potion(int val) { +void handle_potion(unsigned char val) { if(potion_drank) { print_msg("Already drank a potion here."); } else {