|
1 | 1 | #include "BetterLevelSelect.h" |
2 | 2 |
|
3 | 3 | #include "sm64.h" |
| 4 | +#include "port/ui/cvar_prefixes.h" |
4 | 5 | #include "game/area.h" |
5 | 6 | #include "audio/external.h" |
6 | 7 | #include "game/game_init.h" |
@@ -244,7 +245,7 @@ s32 BetterLevelSelect_UpdateMenu(s16 arg, s32 b) { |
244 | 245 | return 1; |
245 | 246 | } |
246 | 247 |
|
247 | | - if(arg != LVL_INTRO_LEVEL_SELECT || CVarGetInteger("gDeveloperTools.BetterLevelSelect", 1) == 0){ |
| 248 | + if(arg != LVL_INTRO_LEVEL_SELECT || CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterLevelSelect"), 1) == 0){ |
248 | 249 | return lvl_intro_update(arg, b); |
249 | 250 | } |
250 | 251 |
|
@@ -397,10 +398,11 @@ s32 BetterLevelSelect_UpdateMenu(s16 arg, s32 b) { |
397 | 398 | } |
398 | 399 |
|
399 | 400 | Gfx* BetterLevelSelect_DrawMenu(s32 state, struct GraphNode *node, UNUSED void *context) { |
400 | | - if(state != 1 || CVarGetInteger("gDeveloperTools.BetterLevelSelect", 1) != 1) { |
| 401 | + if (state != 1 || CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterLevelSelect"), 1) != 1) { |
401 | 402 | return NULL; |
402 | 403 | } |
403 | 404 |
|
| 405 | + int language = CVarGetInteger(CVAR_DEVELOPER_TOOLS("BLSLanguage"), ROM_JP); |
404 | 406 | int32_t count = ARRAY_COUNT(entries); |
405 | 407 | GfxPrint printer; |
406 | 408 | Gfx* head = &self.pool[0]; |
@@ -430,10 +432,10 @@ Gfx* BetterLevelSelect_DrawMenu(s32 state, struct GraphNode *node, UNUSED void * |
430 | 432 | GfxPrint_SetColor(&printer, 175, 175, 175, 255); |
431 | 433 | } |
432 | 434 |
|
433 | | - GfxPrint_Printf(&printer, "%3d %s", idx, ROM_JP ? entry.japaneseName : entry.englishName); |
| 435 | + GfxPrint_Printf(&printer, "%3d %s", idx, language ? entry.japaneseName : entry.englishName); |
434 | 436 | } |
435 | 437 |
|
436 | | - std::vector<const char*> acts = ROM_JP ? entries[self.currentLevelIndex].actsJp : entries[self.currentLevelIndex].actsEn; |
| 438 | + std::vector<const char*> acts = language ? entries[self.currentLevelIndex].actsJp : entries[self.currentLevelIndex].actsEn; |
437 | 439 |
|
438 | 440 | if(!acts.empty()) { |
439 | 441 | GfxPrint_SetPos(&printer, 2, 25); |
@@ -497,7 +499,7 @@ static void Init() { |
497 | 499 | return; |
498 | 500 | } |
499 | 501 |
|
500 | | - if(CVarGetInteger("gDeveloperTools.BetterLevelSelect", 1) == 0){ |
| 502 | + if(CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterLevelSelect"), 1) == 0){ |
501 | 503 | *ev->geoLayoutAddr = (void*) intro_geo_000414; |
502 | 504 | } else { |
503 | 505 | *ev->geoLayoutAddr = (void*) BetterLevelSelect_GeoWrapper; |
|
0 commit comments