updated NES UI a bit
This commit is contained in:
+15
-16
@@ -211,7 +211,7 @@ void render_room_item(short i, short v) {
|
|||||||
|
|
||||||
/* Render main game screen */
|
/* Render main game screen */
|
||||||
void render_main_scene() {
|
void render_main_scene() {
|
||||||
short i, deck_count = 0, statbase = SCREEN_WIDTH - 7;
|
short i, deck_count = 0, statbase = 18;
|
||||||
short room_start_x = 1,
|
short room_start_x = 1,
|
||||||
room_start_y = 1,
|
room_start_y = 1,
|
||||||
room_end_x = statbase - 8,
|
room_end_x = statbase - 8,
|
||||||
@@ -233,26 +233,25 @@ void render_main_scene() {
|
|||||||
for(i=0;i<4;i++) render_room_item(i, room[i]);
|
for(i=0;i<4;i++) render_room_item(i, room[i]);
|
||||||
cputsxy(11, 12, "ROOM");
|
cputsxy(11, 12, "ROOM");
|
||||||
/* render stats */
|
/* render stats */
|
||||||
gotoxy(statbase, 1);
|
|
||||||
cprintf("HP %02d", hp);
|
|
||||||
gotoxy(statbase, 2);
|
|
||||||
cprintf("ATK %02d", weapon);
|
|
||||||
gotoxy(statbase, 3);
|
|
||||||
cprintf("DUR %02d", durability);
|
|
||||||
gotoxy(statbase, 4);
|
|
||||||
chline(6);
|
|
||||||
gotoxy(statbase, 5);
|
gotoxy(statbase, 5);
|
||||||
cprintf("DCK %02d", deck_count);
|
cprintf("Health %02d", hp);
|
||||||
gotoxy(statbase, 6);
|
gotoxy(statbase, 6);
|
||||||
cprintf("RMS %02d", rooms_cleared);
|
cprintf("Weapon %02d", weapon);
|
||||||
gotoxy(statbase, 7);
|
gotoxy(statbase, 7);
|
||||||
chline(6);
|
cprintf("Durability %02d", durability);
|
||||||
|
gotoxy(statbase, 17);
|
||||||
|
cprintf("Deck cards %02d", deck_count);
|
||||||
|
gotoxy(statbase, 19);
|
||||||
|
cprintf("Rooms clrd %02d", rooms_cleared);
|
||||||
|
|
||||||
/* render controls info */
|
/* render controls info */
|
||||||
if(can_run) {
|
if(can_run) {
|
||||||
cputsxy(statbase, 10, "Run:");
|
cputsxy(25, 10, "Run:");
|
||||||
cputsxy(statbase, 12, "A/B or");
|
cputsxy(25, 12, "A/B or");
|
||||||
cputsxy(statbase, 14, "SELECT");
|
cputsxy(25, 14, "SELECT");
|
||||||
|
} else {
|
||||||
|
cputsxy(25, 11, "Cannot");
|
||||||
|
cputsxy(25, 13, " run!");
|
||||||
}
|
}
|
||||||
/* render status message */
|
/* render status message */
|
||||||
gotoxy(1, SCREEN_HEIGHT-2);
|
gotoxy(1, SCREEN_HEIGHT-2);
|
||||||
@@ -432,7 +431,7 @@ int game() {
|
|||||||
can_run = 0; /* can't run twice in a row */
|
can_run = 0; /* can't run twice in a row */
|
||||||
engaged = 0;
|
engaged = 0;
|
||||||
last_room = 0; /* Since we added cards, it's not the last room anymore */
|
last_room = 0; /* Since we added cards, it's not the last room anymore */
|
||||||
|
print_msg("You ran from the room.");
|
||||||
} else { /* engagement mechanics */
|
} else { /* engagement mechanics */
|
||||||
engaged++; /* increase the amount of engaged cards */
|
engaged++; /* increase the amount of engaged cards */
|
||||||
can_run = 0; /* Cannot run once engaged */
|
can_run = 0; /* Cannot run once engaged */
|
||||||
|
|||||||
Reference in New Issue
Block a user