Save adventure location with team and inventory
This commit is contained in:
16 files changed
+444
-203
No files matched your search
+5
-5
@@ -2,7 +2,7 @@
|
||||
|
||||
struct SaveMenuState save_menu;
|
||||
|
||||
int save_menu_input(unsigned keys, int can_open)
|
||||
int save_menu_input(unsigned keys, int can_open, const struct Location *location)
|
||||
{
|
||||
unsigned pressed = keys & ~save_menu.previous;
|
||||
save_menu.previous = keys;
|
||||
@@ -23,7 +23,7 @@ int save_menu_input(unsigned keys, int can_open)
|
||||
}
|
||||
if (pressed & A) {
|
||||
if (save_menu.selection) save_menu.phase = SAVE_MENU_CLOSED;
|
||||
else save_menu.phase = save_progress() ? SAVE_MENU_SAVED : SAVE_MENU_FAILED;
|
||||
else save_menu.phase = save_progress(location) ? SAVE_MENU_SAVED : SAVE_MENU_FAILED;
|
||||
return 1;
|
||||
}
|
||||
unsigned direction = pressed & (UP | DOWN);
|
||||
@@ -42,9 +42,9 @@ void draw_save_menu(void)
|
||||
rectangle(x + 2, y + 2, SAVE_MENU_W - 4, SAVE_MENU_H - 4, cream);
|
||||
large_text(x + 16, y + 10, "MENU", ink);
|
||||
rectangle(x + 6, y + 23, SAVE_MENU_W - 12, 1, RGB(15, 24, 20));
|
||||
text(x + 8, y + 85, "TEAM AND", ink);
|
||||
text(x + 8, y + 95, "ITEMS ONLY", ink);
|
||||
text(x + 8, y + 105, "NO LOCATION", ink);
|
||||
text(x + 8, y + 85, "SAVES TEAM", ink);
|
||||
text(x + 8, y + 95, "ITEMS AND", ink);
|
||||
text(x + 8, y + 105, "LOCATION", ink);
|
||||
if (save_menu.phase == SAVE_MENU_OPTIONS) {
|
||||
int selected_y = y + 32 + save_menu.selection * 20;
|
||||
rectangle(x + 6, selected_y, SAVE_MENU_W - 12, 16, RGB(23, 28, 21));
|
||||
|
||||
Reference in new issue
Block a user