Skip to content

Commit

Permalink
UI: define constant by string array length
Browse files Browse the repository at this point in the history
  • Loading branch information
kai-li-wop committed Nov 11, 2024
1 parent 730a390 commit a3ca929
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions code/ui/ui_mania.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ PADMANIA MENU (FAN ARTWORKS etc.)
#define ID_NEXT 11
#define ID_PREV 12

#define MAX_MANIAPAGES 10

const char *maniapics[] = {"menu/mania/001", "menu/mania/002", "menu/mania/003",
"menu/mania/004", "menu/mania/005", "menu/mania/006",
"menu/mania/007", "menu/mania/008", "menu/mania/009",
"menu/mania/010", NULL};

#define MAX_MANIAPAGES STRARRAY_LEN(maniapics)

typedef struct {
menuframework_s menu;

Expand Down
4 changes: 2 additions & 2 deletions code/ui/ui_secret.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ SECRET MENU (ENTE'S ARTWORKS)
#define ID_NEXT 11
#define ID_PREV 12

#define MAX_SECRETPAGES 12

const char *secretpics[] = {"menu/secret/001", "menu/secret/002", "menu/secret/003",
"menu/secret/004", "menu/secret/005", "menu/secret/006",
"menu/secret/007", "menu/secret/008", "menu/secret/009",
"menu/secret/010", "menu/secret/011", "menu/secret/012",
NULL};

#define MAX_SECRETPAGES STRARRAY_LEN(secretpics)

typedef struct {
menuframework_s menu;

Expand Down

0 comments on commit a3ca929

Please sign in to comment.