mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
Add Staff Roll menu background option
This commit is contained in:
parent
5c8621f408
commit
e6366b7865
19 changed files with 74 additions and 44 deletions
|
@ -235,6 +235,7 @@ QUIT = "Opustit hru"
|
|||
[MENU_OPTIONS]
|
||||
MAIN_MENU = "HLAVNI MENU"
|
||||
LEVEL = "Level"
|
||||
STAFF_ROLL = "Závěrečné titulky"
|
||||
USE_STAGE_MUSIC = "Použít písničku z levelu"
|
||||
RANDOM_STAGE = "Náhodný level"
|
||||
PLAY_VANILLA_DEMOS = "Přehrát dema"
|
||||
|
|
|
@ -235,6 +235,7 @@ QUIT = "Stop"
|
|||
[MENU_OPTIONS]
|
||||
MAIN_MENU = "Hoofdmenu"
|
||||
LEVEL = "Level"
|
||||
STAFF_ROLL = "Personeelsoverzicht"
|
||||
USE_STAGE_MUSIC = "Gebruik level muziek"
|
||||
RANDOM_STAGE = "Willekeurig level"
|
||||
PLAY_VANILLA_DEMOS = "Speel normale demos af"
|
||||
|
|
|
@ -235,6 +235,7 @@ QUIT = "Quit"
|
|||
[MENU_OPTIONS]
|
||||
MAIN_MENU = "MAIN MENU"
|
||||
LEVEL = "Level"
|
||||
STAFF_ROLL = "Staff Roll"
|
||||
USE_STAGE_MUSIC = "Use Stage Music"
|
||||
RANDOM_STAGE = "Random Stage"
|
||||
PLAY_VANILLA_DEMOS = "Play Vanilla Demos"
|
||||
|
|
|
@ -236,6 +236,7 @@ QUIT = "Quitter"
|
|||
[MENU_OPTIONS]
|
||||
MAIN_MENU = "MENU"
|
||||
LEVEL = "Niveau"
|
||||
STAFF_ROLL = "Générique de fin"
|
||||
USE_STAGE_MUSIC = "Utiliser la musique du niveau"
|
||||
RANDOM_STAGE = "Niveau aléatoire"
|
||||
PLAY_VANILLA_DEMOS = "Jouer les démos"
|
||||
|
|
|
@ -235,6 +235,7 @@ QUIT = "Beenden"
|
|||
[MENU_OPTIONS]
|
||||
MAIN_MENU = "HAUPTMENÜ"
|
||||
LEVEL = "Level"
|
||||
STAFF_ROLL = "Abspann"
|
||||
USE_STAGE_MUSIC = "Stufenmusik verwenden"
|
||||
RANDOM_STAGE = "Zufälliger Level"
|
||||
PLAY_VANILLA_DEMOS = "Original-Demos spielen"
|
||||
|
|
|
@ -233,6 +233,7 @@ QUIT = "Abbandona"
|
|||
[MENU_OPTIONS]
|
||||
MAIN_MENU = "MENÙ PRINCIPALE"
|
||||
LEVEL = "Livello"
|
||||
STAFF_ROLL = "Staff dei titoli di coda"
|
||||
USE_STAGE_MUSIC = "Usa la musica del livello"
|
||||
RANDOM_STAGE = "Livello casuale"
|
||||
PLAY_VANILLA_DEMOS = "Riproduci le demo di gioco"
|
||||
|
|
|
@ -235,6 +235,7 @@ QUIT = "Wyjdz"
|
|||
[MENU_OPTIONS]
|
||||
MAIN_MENU = "MENU GLOWNE"
|
||||
LEVEL = "Poziom"
|
||||
STAFF_ROLL = "Napisy Końcowe"
|
||||
USE_STAGE_MUSIC = "Uzyj Muzyki Poziomu"
|
||||
RANDOM_STAGE = "Losowy Poziom"
|
||||
PLAY_VANILLA_DEMOS = "Odtworz Domyslne Dema"
|
||||
|
|
|
@ -235,6 +235,7 @@ QUIT = "Sair"
|
|||
[MENU_OPTIONS]
|
||||
MAIN_MENU = "MENU PRINCIPAL"
|
||||
LEVEL = "Nível"
|
||||
STAFF_ROLL = "Créditos Finais"
|
||||
USE_STAGE_MUSIC = "Usar Música da Fase"
|
||||
RANDOM_STAGE = "Fase Aleatória"
|
||||
PLAY_VANILLA_DEMOS = "Tocar Demos do Vanilla"
|
||||
|
|
|
@ -234,6 +234,7 @@ QUIT = "Выход"
|
|||
[MENU_OPTIONS]
|
||||
MAIN_MENU = "MAIN MENU"
|
||||
LEVEL = "Уровень"
|
||||
STAFF_ROLL = "Завершение"
|
||||
USE_STAGE_MUSIC = "Использовать музыку уровня"
|
||||
RANDOM_STAGE = "Случайный уровень"
|
||||
PLAY_VANILLA_DEMOS = "Воспроизведение демо уровня"
|
||||
|
|
|
@ -235,6 +235,7 @@ QUIT = "Salir"
|
|||
[MENU_OPTIONS]
|
||||
MAIN_MENU = "MENÚ PRINCIPAL"
|
||||
LEVEL = "Nivel"
|
||||
STAFF_ROLL = "Créditos Finales"
|
||||
USE_STAGE_MUSIC = "Usar música del nivel"
|
||||
RANDOM_STAGE = "Nivel aleatorio"
|
||||
PLAY_VANILLA_DEMOS = "Demos originales"
|
||||
|
|
|
@ -235,6 +235,7 @@ QUIT = "Salir"
|
|||
[MENU_OPTIONS]
|
||||
MAIN_MENU = "MENÚ PRINCIPAL"
|
||||
LEVEL = "Nivel"
|
||||
STAFF_ROLL = "Créditos Finales"
|
||||
USE_STAGE_MUSIC = "Usar música del nivel"
|
||||
RANDOM_STAGE = "Nivel aleatorio"
|
||||
PLAY_VANILLA_DEMOS = "Demos originales"
|
||||
|
|
|
@ -459,7 +459,9 @@ void render_game(void) {
|
|||
gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
render_text_labels();
|
||||
do_cutscene_handler();
|
||||
print_displaying_credits_entry();
|
||||
if (!gDjuiInMainMenu) {
|
||||
print_displaying_credits_entry();
|
||||
}
|
||||
gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, SCREEN_WIDTH,
|
||||
SCREEN_HEIGHT - BORDER_HEIGHT);
|
||||
gPauseScreenMode = render_menus_and_dialogs();
|
||||
|
|
|
@ -959,7 +959,7 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) {
|
|||
|
||||
case WARP_OP_CREDITS_NEXT:
|
||||
if (gCurrCreditsEntry == &sCreditsSequence[0]) {
|
||||
sDelayedWarpTimer = 60;
|
||||
sDelayedWarpTimer = gDjuiInMainMenu ? 1 : 60;
|
||||
play_transition(WARP_TRANSITION_FADE_INTO_COLOR, 0x3C, 0x00, 0x00, 0x00);
|
||||
} else {
|
||||
sDelayedWarpTimer = 20;
|
||||
|
@ -1030,7 +1030,7 @@ void initiate_delayed_warp(void) {
|
|||
break;
|
||||
|
||||
case WARP_OP_CREDITS_NEXT:
|
||||
sound_banks_disable(SEQ_PLAYER_SFX, SOUND_BANKS_ALL);
|
||||
sound_banks_disable(SEQ_PLAYER_SFX, gDjuiInMainMenu ? SOUND_BANKS_ALL & ~(1 << SOUND_BANK_MENU) : SOUND_BANKS_ALL);
|
||||
|
||||
gCurrCreditsEntry += 1;
|
||||
|
||||
|
@ -1038,7 +1038,10 @@ void initiate_delayed_warp(void) {
|
|||
lvl_skip_credits();
|
||||
} else if (gCurrCreditsEntry != NULL) {
|
||||
gCurrActNum = gCurrCreditsEntry->unk02 & 0x07;
|
||||
if ((gCurrCreditsEntry + 1)->levelNum == LEVEL_NONE) {
|
||||
if (gCurrCreditsEntry->levelNum == LEVEL_CASTLE_GROUNDS && gDjuiInMainMenu) {
|
||||
gCurrCreditsEntry = &sCreditsSequence[1];
|
||||
destWarpNode = WARP_NODE_CREDITS_NEXT;
|
||||
} else if ((gCurrCreditsEntry + 1)->levelNum == LEVEL_NONE) {
|
||||
destWarpNode = WARP_NODE_CREDITS_END;
|
||||
} else {
|
||||
destWarpNode = WARP_NODE_CREDITS_NEXT;
|
||||
|
@ -1232,6 +1235,7 @@ s32 play_mode_normal(void) {
|
|||
}
|
||||
} else {
|
||||
if (gDjuiInMainMenu &&
|
||||
!configMenuStaffRoll &&
|
||||
gCurrDemoInput == NULL &&
|
||||
configMenuDemos &&
|
||||
!gInPlayerMenu &&
|
||||
|
@ -1448,7 +1452,7 @@ UNUSED static s32 play_mode_unused(void) {
|
|||
|
||||
void update_menu_level(void) {
|
||||
// figure out level
|
||||
int curLevel = 0;
|
||||
s32 curLevel = 0;
|
||||
switch (configMenuLevel) {
|
||||
case 0: curLevel = LEVEL_CASTLE_GROUNDS; break;
|
||||
case 1: curLevel = LEVEL_BOB; break;
|
||||
|
@ -1471,25 +1475,41 @@ void update_menu_level(void) {
|
|||
default: curLevel = LEVEL_CASTLE_GROUNDS; break;
|
||||
}
|
||||
|
||||
// warp to level, this feels buggy
|
||||
// figure out music
|
||||
stop_cap_music();
|
||||
if (!configMenuSound || configMenuStaffRoll || curLevel == LEVEL_CASTLE_GROUNDS) {
|
||||
reset_volume();
|
||||
disable_background_sound();
|
||||
set_background_music(0, SEQ_MENU_FILE_SELECT, 0);
|
||||
} else {
|
||||
reset_volume();
|
||||
disable_background_sound();
|
||||
set_background_music(gCurrentArea->musicParam, gCurrentArea->musicParam2, 0);
|
||||
}
|
||||
|
||||
if (configMenuStaffRoll) {
|
||||
return;
|
||||
} else {
|
||||
gCurrCreditsEntry = NULL;
|
||||
}
|
||||
|
||||
// warp to level
|
||||
if (gCurrLevelNum != curLevel) {
|
||||
if (gIsDemoActive) {
|
||||
stop_demo(NULL);
|
||||
}
|
||||
|
||||
gChangeLevel = curLevel;
|
||||
gChangeActNum = 6;
|
||||
dynos_warp_to_level(curLevel, 1, 6);
|
||||
gDemoCountdown = 0;
|
||||
}
|
||||
if (gIsDemoActive) {
|
||||
return;
|
||||
}
|
||||
if (gIsDemoActive) { return; }
|
||||
|
||||
if (gCurrAreaIndex != 2 && gCurrLevelNum == LEVEL_THI) {
|
||||
sWarpDest.type = WARP_TYPE_CHANGE_AREA;
|
||||
sWarpDest.areaIdx = 2;
|
||||
sWarpDest.nodeId = 0x0A;
|
||||
}
|
||||
|
||||
struct Object *o;
|
||||
// set mario/camera pos
|
||||
switch (gCurrLevelNum) {
|
||||
|
@ -1613,22 +1633,6 @@ void update_menu_level(void) {
|
|||
gMarioState->controller->stickY = 0;
|
||||
gMarioState->controller->stickMag = 0;
|
||||
gMarioState->intendedMag = 0;
|
||||
|
||||
// figure out music
|
||||
stop_cap_music();
|
||||
if (!configMenuSound || curLevel == LEVEL_CASTLE_GROUNDS) {
|
||||
reset_volume();
|
||||
disable_background_sound();
|
||||
set_background_music(0, 0x0021, 0);
|
||||
} else {
|
||||
reset_volume();
|
||||
disable_background_sound();
|
||||
|
||||
if (get_current_background_music() == SEQ_MENU_FILE_SELECT) {
|
||||
gChangeLevel = curLevel;
|
||||
gChangeActNum = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s32 update_level(void) {
|
||||
|
@ -1747,7 +1751,7 @@ s32 init_level(void) {
|
|||
} else if (!gDebugLevelSelect) {
|
||||
if (gMarioState && gMarioState->action != ACT_UNINITIALIZED) {
|
||||
bool skipIntro = (gNetworkType == NT_NONE || gServerSettings.skipIntro != 0);
|
||||
if (gDjuiInMainMenu && (gNetworkType == NT_NONE)) {
|
||||
if (gDjuiInMainMenu && gNetworkType == NT_NONE) {
|
||||
// pick random main menu level
|
||||
if (configMenuRandom) {
|
||||
srand(time(0));
|
||||
|
@ -1755,13 +1759,19 @@ s32 init_level(void) {
|
|||
configMenuLevel = randLevel;
|
||||
}
|
||||
|
||||
if (configMenuLevel == 0 && sFirstCastleGroundsMenu) {
|
||||
set_mario_action(gMarioState, ACT_INTRO_CUTSCENE, 7);
|
||||
if (configMenuStaffRoll) {
|
||||
gMarioState->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE;
|
||||
warp_credits();
|
||||
level_trigger_warp(gMarioState, WARP_OP_CREDITS_NEXT);
|
||||
sFirstCastleGroundsMenu = false;
|
||||
} else {
|
||||
set_mario_action(gMarioState, ACT_IDLE, 0);
|
||||
if (configMenuLevel == 0 && sFirstCastleGroundsMenu) {
|
||||
set_mario_action(gMarioState, ACT_INTRO_CUTSCENE, 7);
|
||||
sFirstCastleGroundsMenu = false;
|
||||
} else {
|
||||
set_mario_action(gMarioState, ACT_IDLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (skipIntro || save_file_exists(gCurrSaveFileNum - 1)) {
|
||||
set_mario_action(gMarioState, ACT_IDLE, 0);
|
||||
} else {
|
||||
|
|
|
@ -166,6 +166,7 @@ u8 level_control_timer_running(void);
|
|||
u16 level_control_timer(s32 timerOp);
|
||||
void fade_into_special_warp(u32 arg, u32 color);
|
||||
void load_level_init_text(u32 arg);
|
||||
void warp_credits(void);
|
||||
struct WarpNode *get_painting_warp_node(void);
|
||||
void initiate_painting_warp(s16 paintingIndex);
|
||||
s16 level_trigger_warp(struct MarioState *m, s32 warpOp);
|
||||
|
|
|
@ -2969,7 +2969,7 @@ static s32 act_credits_cutscene(struct MarioState *m) {
|
|||
m->actionState += 2;
|
||||
}
|
||||
|
||||
if (gCurrCreditsEntry != NULL) {
|
||||
if (gCurrCreditsEntry != NULL && !gDjuiInMainMenu) {
|
||||
if (m->playerIndex == 0) {
|
||||
s32 width = m->actionState * 640 / 100;
|
||||
s32 height = m->actionState * 480 / 100;
|
||||
|
@ -2999,6 +2999,7 @@ static s32 act_credits_cutscene(struct MarioState *m) {
|
|||
|
||||
m->marioObj->header.gfx.angle[1] += (gCurrCreditsEntry->unk02 & 0xC0) << 8;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -130,6 +130,7 @@ unsigned int configBouncyLevelBounds = 0;
|
|||
unsigned int configNetworkSystem = 0;
|
||||
char configPlayerName[MAX_PLAYER_STRING] = "";
|
||||
unsigned int configPlayerModel = 0;
|
||||
bool configMenuStaffRoll = true;
|
||||
unsigned int configMenuLevel = 0;
|
||||
bool configMenuSound = false;
|
||||
bool configMenuRandom = false;
|
||||
|
@ -144,7 +145,6 @@ bool configDisablePopups = 0;
|
|||
bool configLuaProfiler = 0;
|
||||
bool configCtxProfiler = 0;
|
||||
#endif
|
||||
bool configDisableDownloadedModels = 0;
|
||||
unsigned int configInterpolationMode = 1;
|
||||
unsigned int configGamepadNumber = 0;
|
||||
bool configBackgroundGamepad = 1;
|
||||
|
@ -234,6 +234,7 @@ static const struct ConfigOption options[] = {
|
|||
{.name = "coopdx_bouncy_bounds", .type = CONFIG_TYPE_UINT , .uintValue = &configBouncyLevelBounds},
|
||||
{.name = "coop_player_model", .type = CONFIG_TYPE_UINT , .uintValue = &configPlayerModel},
|
||||
{.name = "coop_player_name", .type = CONFIG_TYPE_STRING, .stringValue = (char*)&configPlayerName, .maxStringLength = MAX_PLAYER_STRING},
|
||||
{.name = "coopdx_menu_staff_roll", .type = CONFIG_TYPE_BOOL , .boolValue = &configMenuStaffRoll},
|
||||
{.name = "coop_menu_level", .type = CONFIG_TYPE_UINT , .uintValue = &configMenuLevel},
|
||||
{.name = "coop_menu_sound", .type = CONFIG_TYPE_BOOL , .boolValue = &configMenuSound},
|
||||
{.name = "coop_menu_random", .type = CONFIG_TYPE_BOOL , .boolValue = &configMenuRandom},
|
||||
|
@ -260,7 +261,6 @@ static const struct ConfigOption options[] = {
|
|||
{.name = "lua_profiler", .type = CONFIG_TYPE_BOOL , .boolValue = &configLuaProfiler},
|
||||
{.name = "ctx_profiler", .type = CONFIG_TYPE_BOOL , .boolValue = &configCtxProfiler},
|
||||
#endif
|
||||
{.name = "disable_downloaded_models", .type = CONFIG_TYPE_BOOL , .boolValue = &configDisableDownloadedModels},
|
||||
{.name = "interpolation_mode", .type = CONFIG_TYPE_UINT , .uintValue = &configInterpolationMode},
|
||||
{.name = "gamepad_number", .type = CONFIG_TYPE_UINT , .uintValue = &configGamepadNumber},
|
||||
{.name = "background_gamepad", .type = CONFIG_TYPE_UINT , .boolValue = &configBackgroundGamepad},
|
||||
|
@ -597,6 +597,9 @@ NEXT_OPTION:
|
|||
if (configFrameLimit < 30) { configFrameLimit = 30; }
|
||||
if (configFrameLimit > 3000) { configFrameLimit = 3000; }
|
||||
|
||||
if (configPlayerModel >= CT_MAX) { configPlayerModel = 0; }
|
||||
if (configDjuiTheme >= DJUI_THEME_MAX) { configDjuiTheme = 0; }
|
||||
|
||||
#ifndef COOPNET
|
||||
configNetworkSystem = NS_SOCKET;
|
||||
#endif
|
||||
|
|
|
@ -89,6 +89,7 @@ extern unsigned int configBouncyLevelBounds;
|
|||
extern unsigned int configNetworkSystem;
|
||||
extern char configPlayerName[];
|
||||
extern unsigned int configPlayerModel;
|
||||
extern bool configMenuStaffRoll;
|
||||
extern unsigned int configMenuLevel;
|
||||
extern bool configMenuSound;
|
||||
extern bool configMenuRandom;
|
||||
|
@ -103,7 +104,6 @@ extern bool configDisablePopups;
|
|||
extern bool configLuaProfiler;
|
||||
extern bool configCtxProfiler;
|
||||
#endif
|
||||
extern bool configDisableDownloadedModels;
|
||||
extern unsigned int configInterpolationMode;
|
||||
extern bool configSingleplayerPause;
|
||||
extern bool configDebugPrint;
|
||||
|
|
|
@ -7,8 +7,12 @@
|
|||
|
||||
static struct DjuiSelectionbox* sLevelBox = NULL;
|
||||
|
||||
static void djui_panel_random_menu(UNUSED struct DjuiBase* caller) {
|
||||
djui_base_set_enabled(&sLevelBox->base, !configMenuRandom);
|
||||
static void djui_panel_level_menu(UNUSED struct DjuiBase* caller) {
|
||||
djui_base_set_enabled(&sLevelBox->base, !(configMenuRandom || configMenuStaffRoll));
|
||||
if (configMenuStaffRoll) {
|
||||
warp_credits();
|
||||
level_trigger_warp(gMarioState, WARP_OP_CREDITS_NEXT);
|
||||
}
|
||||
}
|
||||
|
||||
void djui_panel_main_menu_create(struct DjuiBase* caller) {
|
||||
|
@ -37,11 +41,12 @@ void djui_panel_main_menu_create(struct DjuiBase* caller) {
|
|||
"WDW"
|
||||
};
|
||||
struct DjuiSelectionbox* selectionbox1 = djui_selectionbox_create(body, DLANG(MENU_OPTIONS, LEVEL), levelChoices, 18, &configMenuLevel, NULL);
|
||||
djui_base_set_enabled(&selectionbox1->base, !configMenuRandom);
|
||||
djui_base_set_enabled(&selectionbox1->base, !(configMenuRandom || configMenuStaffRoll));
|
||||
sLevelBox = selectionbox1;
|
||||
|
||||
djui_checkbox_create(body, DLANG(MENU_OPTIONS, STAFF_ROLL), &configMenuStaffRoll, djui_panel_level_menu);
|
||||
djui_checkbox_create(body, DLANG(MENU_OPTIONS, USE_STAGE_MUSIC), &configMenuSound, NULL);
|
||||
djui_checkbox_create(body, DLANG(MENU_OPTIONS, RANDOM_STAGE), &configMenuRandom, djui_panel_random_menu);
|
||||
djui_checkbox_create(body, DLANG(MENU_OPTIONS, RANDOM_STAGE), &configMenuRandom, djui_panel_level_menu);
|
||||
djui_checkbox_create(body, DLANG(MENU_OPTIONS, PLAY_VANILLA_DEMOS), &configMenuDemos, stop_demo);
|
||||
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ void produce_interpolation_frames_and_delay(void) {
|
|||
|
||||
u64 sCurrentFpsUpdateTime = (u64)clock_elapsed_f64();
|
||||
if (sLastFpsUpdateTime != sCurrentFpsUpdateTime) {
|
||||
// u32 fps = sFramesSinceFpsUpdate / ((f32)(sCurrentFpsUpdateTime - sLastFpsUpdateTime));
|
||||
u32 fps = sFramesSinceFpsUpdate / ((f32)(sCurrentFpsUpdateTime - sLastFpsUpdateTime));
|
||||
sLastFpsUpdateTime = sCurrentFpsUpdateTime;
|
||||
sFramesSinceFpsUpdate = 0;
|
||||
// printf("fps: %u\n", fps);
|
||||
|
@ -296,9 +296,6 @@ void* main_game_init(UNUSED void* arg) {
|
|||
} else if (memcmp(&configPlayerPalette, &gPalettePresets[i], sizeof(struct PlayerPalette)) == 0) { break; }
|
||||
}
|
||||
|
||||
if (configPlayerModel >= CT_MAX) { configPlayerModel = 0; }
|
||||
if (configDjuiTheme >= DJUI_THEME_MAX) { configDjuiTheme = 0; }
|
||||
|
||||
gCoopCompatibility = configCoopCompatibility;
|
||||
|
||||
if (gCLIOpts.FullScreen == 1) { configWindow.fullscreen = true; }
|
||||
|
|
Loading…
Reference in a new issue