2022-03-10 03:01:03 +01:00
|
|
|
#include "dynos.cpp.h"
|
|
|
|
extern "C" {
|
|
|
|
#include "level_commands.h"
|
|
|
|
#include "game/level_update.h"
|
|
|
|
#include "game/object_list_processor.h"
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Update
|
|
|
|
//
|
|
|
|
|
|
|
|
static bool sDynosIsLevelEntry = false;
|
2022-04-09 04:29:16 +02:00
|
|
|
void *DynOS_SwapCmd(void *aCmd) {
|
|
|
|
return DynOS_Lvl_Override(aCmd);
|
|
|
|
}
|
|
|
|
|
2022-03-10 03:01:03 +01:00
|
|
|
void *DynOS_UpdateCmd(void *aCmd) {
|
2023-05-08 00:55:11 +02:00
|
|
|
if (!aCmd) { return NULL; }
|
2023-05-13 11:42:35 +02:00
|
|
|
|
2022-03-10 03:01:03 +01:00
|
|
|
static const uintptr_t sCmdLevelEntry[] = { CALL(0, lvl_init_or_update) };
|
2023-05-13 11:42:35 +02:00
|
|
|
sDynosIsLevelEntry |= (((uintptr_t*)aCmd)[0] == sCmdLevelEntry[0] && ((uintptr_t*)aCmd)[1] == sCmdLevelEntry[1]);
|
2022-03-10 03:01:03 +01:00
|
|
|
return DynOS_Warp_Update(aCmd, sDynosIsLevelEntry);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DynOS_UpdateGfx() {
|
2023-11-09 00:06:47 +01:00
|
|
|
DynOS_Mod_Update();
|
|
|
|
DynOS_Tex_Update();
|
2022-03-10 03:01:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool DynOS_IsTransitionActive() {
|
|
|
|
return gWarpTransition.isActive;
|
|
|
|
}
|
2022-05-09 16:27:47 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// Misc
|
|
|
|
//
|
2022-05-09 18:45:14 +02:00
|
|
|
static bool sDynosModShutdown = false;
|
|
|
|
|
|
|
|
void DynOS_Mod_Update() {
|
|
|
|
if (sDynosModShutdown) {
|
|
|
|
sDynosModShutdown = false;
|
|
|
|
DynOS_Actor_ModShutdown();
|
|
|
|
DynOS_Col_ModShutdown();
|
|
|
|
DynOS_Lvl_ModShutdown();
|
2022-06-02 21:19:54 +02:00
|
|
|
DynOS_Bhv_ModShutdown();
|
2022-05-09 18:45:14 +02:00
|
|
|
DynOS_MovtexQC_ModShutdown();
|
|
|
|
DynOS_Tex_ModShutdown();
|
|
|
|
}
|
|
|
|
}
|
2022-05-09 16:27:47 +02:00
|
|
|
|
|
|
|
void DynOS_Mod_Shutdown() {
|
2022-05-09 18:45:14 +02:00
|
|
|
sDynosModShutdown = true;
|
2022-05-09 16:27:47 +02:00
|
|
|
}
|