mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
c9e4efdb31
clean up custom level code fixed a bug where custom level course numbers weren't used by dynos warps removed a bunch of unused dynos code fix demos triggering incorrectly allowed the right Ctrl key to be used when opening the in game console fixed a softlock that was possible to experience when talking to the snowman in CCM fixed the bug where you can permanently lose your cap (bug created by my own PR from beta 32) fix the moderator feature I made a while back; I am amazed it even worked at all before fixed dynos warp initial actions being skipped (read ec8aabc for explanation) completely changed the way star names and course names work
69 lines
1.4 KiB
C++
69 lines
1.4 KiB
C++
#include "dynos.cpp.h"
|
|
extern "C" {
|
|
#include "sm64.h"
|
|
#include "level_commands.h"
|
|
#include "game/level_update.h"
|
|
#include "game/object_list_processor.h"
|
|
extern s16 gMenuMode;
|
|
extern s8 gDialogBoxState;
|
|
#ifdef OMM_DEFINES_H
|
|
extern void omm_opt_init();
|
|
#endif
|
|
}
|
|
|
|
//
|
|
// Main Menu
|
|
//
|
|
|
|
void DynOS_ReturnToMainMenu() {
|
|
level_set_transition(0, NULL);
|
|
gDialogBoxState = 0;
|
|
gMenuMode = -1;
|
|
fade_into_special_warp(-2, 0);
|
|
}
|
|
|
|
//
|
|
// Update
|
|
//
|
|
|
|
static bool sDynosIsLevelEntry = false;
|
|
void *DynOS_SwapCmd(void *aCmd) {
|
|
return DynOS_Lvl_Override(aCmd);
|
|
}
|
|
|
|
void *DynOS_UpdateCmd(void *aCmd) {
|
|
if (!aCmd) { return NULL; }
|
|
|
|
static const uintptr_t sCmdLevelEntry[] = { CALL(0, lvl_init_or_update) };
|
|
sDynosIsLevelEntry |= (((uintptr_t*)aCmd)[0] == sCmdLevelEntry[0] && ((uintptr_t*)aCmd)[1] == sCmdLevelEntry[1]);
|
|
return DynOS_Warp_Update(aCmd, sDynosIsLevelEntry);
|
|
}
|
|
|
|
void DynOS_UpdateGfx() {
|
|
DynOS_Gfx_Update();
|
|
}
|
|
|
|
bool DynOS_IsTransitionActive() {
|
|
return gWarpTransition.isActive;
|
|
}
|
|
|
|
//
|
|
// Misc
|
|
//
|
|
static bool sDynosModShutdown = false;
|
|
|
|
void DynOS_Mod_Update() {
|
|
if (sDynosModShutdown) {
|
|
sDynosModShutdown = false;
|
|
DynOS_Actor_ModShutdown();
|
|
DynOS_Col_ModShutdown();
|
|
DynOS_Lvl_ModShutdown();
|
|
DynOS_Bhv_ModShutdown();
|
|
DynOS_MovtexQC_ModShutdown();
|
|
DynOS_Tex_ModShutdown();
|
|
}
|
|
}
|
|
|
|
void DynOS_Mod_Shutdown() {
|
|
sDynosModShutdown = true;
|
|
}
|