2022-09-03 00:00:04 -04:00
|
|
|
|
#include "OTRGlobals.h"
|
2023-05-07 20:18:54 -04:00
|
|
|
|
#include <libultraship/libultraship.h>
|
2023-01-17 00:17:49 -05:00
|
|
|
|
#include "soh/resource/type/Scene.h"
|
2022-09-03 00:00:04 -04:00
|
|
|
|
#include <Utils/StringHelper.h>
|
2022-03-21 21:51:23 -04:00
|
|
|
|
#include "global.h"
|
|
|
|
|
#include "vt.h"
|
2023-01-17 00:17:49 -05:00
|
|
|
|
#include "soh/resource/type/CollisionHeader.h"
|
2022-11-14 05:22:34 -05:00
|
|
|
|
#include <DisplayList.h>
|
2023-01-17 00:17:49 -05:00
|
|
|
|
#include "soh/resource/type/Cutscene.h"
|
|
|
|
|
#include "soh/resource/type/Path.h"
|
|
|
|
|
#include "soh/resource/type/Text.h"
|
2022-11-14 05:22:34 -05:00
|
|
|
|
#include <Blob.h>
|
2023-01-17 00:17:49 -05:00
|
|
|
|
#include <memory>
|
2023-06-27 19:53:35 -04:00
|
|
|
|
#include <cassert>
|
2023-01-17 00:17:49 -05:00
|
|
|
|
#include "soh/resource/type/scenecommand/SetCameraSettings.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetCutscenes.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetStartPositionList.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetActorList.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetCollisionHeader.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetRoomList.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetEntranceList.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetSpecialObjects.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetRoomBehavior.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetMesh.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetObjectList.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetLightList.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetPathways.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetTransitionActorList.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetSkyboxSettings.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetSkyboxModifier.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetTimeSettings.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetWindSettings.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetSoundSettings.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetEchoSettings.h"
|
|
|
|
|
#include "soh/resource/type/scenecommand/SetAlternateHeaders.h"
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
extern LUS::IResource* OTRPlay_LoadFile(PlayState* play, const char* fileName);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
extern "C" s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId);
|
|
|
|
|
extern "C" RomFile sNaviMsgFiles[];
|
2023-05-07 23:01:12 -04:00
|
|
|
|
s32 OTRScene_ExecuteCommands(PlayState* play, LUS::Scene* scene);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-05-07 23:01:12 -04:00
|
|
|
|
std::shared_ptr<LUS::File> ResourceMgr_LoadFile(const char* path) {
|
2022-10-16 23:07:35 -04:00
|
|
|
|
std::string Path = path;
|
|
|
|
|
if (IsGameMasterQuest()) {
|
|
|
|
|
size_t pos = 0;
|
|
|
|
|
if ((pos = Path.find("/nonmq/", 0)) != std::string::npos) {
|
|
|
|
|
Path.replace(pos, 7, "/mq/");
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-07 23:01:12 -04:00
|
|
|
|
return LUS::Context::GetInstance()->GetResourceManager()->LoadFile(Path.c_str());
|
2022-10-16 23:07:35 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Forward Declaration of function declared in OTRGlobals.cpp
|
2023-06-03 15:27:45 -04:00
|
|
|
|
std::shared_ptr<LUS::IResource> GetResourceByNameHandlingMQ(const char* path);
|
2022-10-16 23:07:35 -04:00
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandSpawnList(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetStartPositionList* cmdStartPos = std::static_pointer_cast<LUS::SetStartPositionList>(cmd);
|
|
|
|
|
LUS::SetStartPositionList* cmdStartPos = (LUS::SetStartPositionList*)cmd;
|
2023-06-03 15:27:45 -04:00
|
|
|
|
ActorEntry* entries = (ActorEntry*)cmdStartPos->GetRawPointer();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
play->linkActorEntry = &entries[play->setupEntranceList[play->curSpawn].spawn];
|
2022-11-06 03:24:34 -05:00
|
|
|
|
play->linkAgeOnLoad = ((void)0, gSaveContext.linkAge);
|
2023-01-17 00:17:49 -05:00
|
|
|
|
s16 linkObjectId = gLinkObjectIds[((void)0, gSaveContext.linkAge)];
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
|
Object_Spawn(&play->objectCtx, linkObjectId);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandActorList(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetActorList* cmdActor = std::static_pointer_cast<LUS::SetActorList>(cmd);
|
|
|
|
|
LUS::SetActorList* cmdActor = (LUS::SetActorList*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->numSetupActors = cmdActor->numActors;
|
2023-06-03 15:27:45 -04:00
|
|
|
|
play->setupActorList = (ActorEntry*)cmdActor->GetRawPointer();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandUnused2(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-01-17 00:17:49 -05:00
|
|
|
|
// OTRTODO: Do we need to implement this?
|
2023-05-07 19:58:50 -04:00
|
|
|
|
// play->unk_11DFC = SEGMENTED_TO_VIRTUAL(cmd->unused02.segment);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandCollisionHeader(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetCollisionHeader* cmdCol = std::static_pointer_cast<LUS::SetCollisionHeader>(cmd);
|
|
|
|
|
LUS::SetCollisionHeader* cmdCol = (LUS::SetCollisionHeader*)cmd;
|
2023-06-03 15:27:45 -04:00
|
|
|
|
BgCheck_Allocate(&play->colCtx, play, (CollisionHeader*)cmdCol->GetRawPointer());
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandRoomList(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetRoomList* cmdRoomList = std::static_pointer_cast<LUS::SetRoomList>(cmd);
|
|
|
|
|
LUS::SetRoomList* cmdRoomList = (LUS::SetRoomList*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->numRooms = cmdRoomList->numRooms;
|
2023-06-03 15:27:45 -04:00
|
|
|
|
play->roomList = (RomFile*)cmdRoomList->GetRawPointer();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandEntranceList(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetEntranceList* otrEntrance = std::static_pointer_cast<LUS::SetEntranceList>(cmd);
|
|
|
|
|
LUS::SetEntranceList* otrEntrance = (LUS::SetEntranceList*)cmd;
|
2023-06-03 15:27:45 -04:00
|
|
|
|
play->setupEntranceList = (EntranceEntry*)otrEntrance->GetRawPointer();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandSpecialFiles(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetSpecialObjects* specialCmd = std::static_pointer_cast<LUS::SetSpecialObjects>(cmd);
|
|
|
|
|
LUS::SetSpecialObjects* specialCmd = (LUS::SetSpecialObjects*)cmd;
|
2022-05-11 13:18:24 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
if (specialCmd->specialObjects.globalObject != 0) {
|
|
|
|
|
play->objectCtx.subKeepIndex = Object_Spawn(&play->objectCtx, specialCmd->specialObjects.globalObject);
|
|
|
|
|
}
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
if (specialCmd->specialObjects.elfMessage != 0) {
|
2023-05-07 19:58:50 -04:00
|
|
|
|
auto res =
|
2023-05-07 23:01:12 -04:00
|
|
|
|
(LUS::Blob*)OTRPlay_LoadFile(play, sNaviMsgFiles[specialCmd->specialObjects.elfMessage - 1].fileName);
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->cUpElfMsgs = (ElfMessage*)res->Data.data();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandRoomBehavior(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetRoomBehavior* cmdRoom = std::static_pointer_cast<LUS::SetRoomBehavior>(cmd);
|
|
|
|
|
LUS::SetRoomBehavior* cmdRoom = (LUS::SetRoomBehavior*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->roomCtx.curRoom.behaviorType1 = cmdRoom->roomBehavior.gameplayFlags;
|
|
|
|
|
play->roomCtx.curRoom.behaviorType2 = cmdRoom->roomBehavior.gameplayFlags2 & 0xFF;
|
|
|
|
|
play->roomCtx.curRoom.lensMode = (cmdRoom->roomBehavior.gameplayFlags2 >> 8) & 1;
|
|
|
|
|
play->msgCtx.disableWarpSongs = (cmdRoom->roomBehavior.gameplayFlags2 >> 0xA) & 1;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandMeshHeader(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetMesh* otrMesh = static_pointer_cast<LUS::SetMesh>(cmd);
|
|
|
|
|
LUS::SetMesh* otrMesh = (LUS::SetMesh*)cmd;
|
2023-06-03 15:27:45 -04:00
|
|
|
|
play->roomCtx.curRoom.meshHeader = (MeshHeader*)otrMesh->GetRawPointer();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
extern "C" void* func_800982FC(ObjectContext* objectCtx, s32 bankIndex, s16 objectId);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandObjectList(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetObjectList* cmdObj = static_pointer_cast<LUS::SetObjectList>(cmd);
|
|
|
|
|
LUS::SetObjectList* cmdObj = (LUS::SetObjectList*)cmd;
|
2022-05-11 13:18:24 -04:00
|
|
|
|
|
2022-03-21 21:51:23 -04:00
|
|
|
|
s32 i;
|
|
|
|
|
s32 j;
|
|
|
|
|
s32 k;
|
|
|
|
|
ObjectStatus* status;
|
|
|
|
|
ObjectStatus* status2;
|
|
|
|
|
ObjectStatus* firstStatus;
|
2023-05-07 19:58:50 -04:00
|
|
|
|
// s16* objectEntry = SEGMENTED_TO_VIRTUAL(cmd->objectList.segment);
|
2023-06-03 15:27:45 -04:00
|
|
|
|
s16* objectEntry = (s16*)cmdObj->GetRawPointer();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
void* nextPtr;
|
|
|
|
|
|
|
|
|
|
k = 0;
|
2023-05-07 19:58:50 -04:00
|
|
|
|
// i = play->objectCtx.unk_09;
|
2022-05-14 19:19:02 -04:00
|
|
|
|
i = 0;
|
2022-11-06 03:24:34 -05:00
|
|
|
|
firstStatus = &play->objectCtx.status[0];
|
|
|
|
|
status = &play->objectCtx.status[i];
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
for (int i = 0; i < cmdObj->objects.size(); i++) {
|
|
|
|
|
bool alreadyIncluded = false;
|
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
|
for (int j = 0; j < play->objectCtx.num; j++) {
|
|
|
|
|
if (play->objectCtx.status[j].id == cmdObj->objects[i]) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
alreadyIncluded = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!alreadyIncluded) {
|
2022-11-06 03:24:34 -05:00
|
|
|
|
play->objectCtx.status[play->objectCtx.num++].id = cmdObj->objects[i];
|
|
|
|
|
func_80031A28(play, &play->actorCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2022-11-06 03:24:34 -05:00
|
|
|
|
while (i < play->objectCtx.num) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
if (status->id != *objectEntry) {
|
2022-11-06 03:24:34 -05:00
|
|
|
|
status2 = &play->objectCtx.status[i];
|
|
|
|
|
for (j = i; j < play->objectCtx.num; j++) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
status2->id = OBJECT_INVALID;
|
|
|
|
|
status2++;
|
|
|
|
|
}
|
2022-11-06 03:24:34 -05:00
|
|
|
|
play->objectCtx.num = i;
|
|
|
|
|
func_80031A28(play, &play->actorCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i++;
|
|
|
|
|
k++;
|
|
|
|
|
objectEntry++;
|
|
|
|
|
status++;
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
|
play->objectCtx.num = i;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandLightList(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetLightList* cmdLight = static_pointer_cast<LUS::SetLightList>(cmd);
|
|
|
|
|
LUS::SetLightList* cmdLight = (LUS::SetLightList*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
for (size_t i = 0; i < cmdLight->lightList.size(); i++) {
|
2023-01-17 00:17:49 -05:00
|
|
|
|
LightContext_InsertLight(play, &play->lightCtx, (LightInfo*)&cmdLight->lightList[i]);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandPathList(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetPathways* cmdPath = static_pointer_cast<LUS::SetPathways>(cmd);
|
|
|
|
|
LUS::SetPathways* cmdPath = (LUS::SetPathways*)cmd;
|
2023-06-03 15:27:45 -04:00
|
|
|
|
play->setupPathList = (Path*)(cmdPath->GetPointer()[0]);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandTransitionActorList(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetTransitionActorList* cmdActor = static_pointer_cast<LUS::SetTransitionActorList>(cmd);
|
|
|
|
|
LUS::SetTransitionActorList* cmdActor = (LUS::SetTransitionActorList*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->transiActorCtx.numActors = cmdActor->numTransitionActors;
|
2023-06-03 15:27:45 -04:00
|
|
|
|
play->transiActorCtx.list = (TransitionActorEntry*)cmdActor->GetRawPointer();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
// void TransitionActor_InitContext(GameState* state, TransitionActorContext* transiActorCtx) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
// transiActorCtx->numActors = 0;
|
|
|
|
|
//}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandLightSettingsList(PlayState* play, LUS::ISceneCommand* cmd) {
|
|
|
|
|
play->envCtx.lightSettingsList = (EnvLightSettings*)cmd->GetRawPointer();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Scene Command 0x11: Skybox Settings
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandSkyboxSettings(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetSkyboxSettings* cmdSky = static_pointer_cast<LUS::SetSkyboxSettings>(cmd);
|
|
|
|
|
LUS::SetSkyboxSettings* cmdSky = (LUS::SetSkyboxSettings*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->skyboxId = cmdSky->settings.skyboxId;
|
|
|
|
|
play->envCtx.unk_17 = play->envCtx.unk_18 = cmdSky->settings.weather;
|
|
|
|
|
play->envCtx.indoors = cmdSky->settings.indoors;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandSkyboxDisables(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetSkyboxModifier* cmdSky = static_pointer_cast<LUS::SetSkyboxModifier>(cmd);
|
|
|
|
|
LUS::SetSkyboxModifier* cmdSky = (LUS::SetSkyboxModifier*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->envCtx.sunMoonDisabled = cmdSky->modifier.sunMoonDisabled;
|
|
|
|
|
play->envCtx.skyboxDisabled = cmdSky->modifier.skyboxDisabled;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandTimeSettings(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetTimeSettings* cmdTime = static_pointer_cast<LUS::SetTimeSettings>(cmd);
|
|
|
|
|
LUS::SetTimeSettings* cmdTime = (LUS::SetTimeSettings*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
if ((cmdTime->settings.hour != 0xFF) && (cmdTime->settings.minute != 0xFF)) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
gSaveContext.skyboxTime = gSaveContext.dayTime =
|
2023-01-17 00:17:49 -05:00
|
|
|
|
((cmdTime->settings.hour + (cmdTime->settings.minute / 60.0f)) * 60.0f) / ((f32)(24 * 60) / 0x10000);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
if (cmdTime->settings.timeIncrement != 0xFF) {
|
|
|
|
|
play->envCtx.timeIncrement = cmdTime->settings.timeIncrement;
|
2023-05-07 19:58:50 -04:00
|
|
|
|
} else {
|
2022-11-06 03:24:34 -05:00
|
|
|
|
play->envCtx.timeIncrement = 0;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (gSaveContext.sunsSongState == SUNSSONG_INACTIVE) {
|
2022-11-06 03:24:34 -05:00
|
|
|
|
gTimeIncrement = play->envCtx.timeIncrement;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
}
|
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
|
play->envCtx.sunPos.x = -(Math_SinS(((void)0, gSaveContext.dayTime) - 0x8000) * 120.0f) * 25.0f;
|
|
|
|
|
play->envCtx.sunPos.y = (Math_CosS(((void)0, gSaveContext.dayTime) - 0x8000) * 120.0f) * 25.0f;
|
|
|
|
|
play->envCtx.sunPos.z = (Math_CosS(((void)0, gSaveContext.dayTime) - 0x8000) * 20.0f) * 25.0f;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
|
if (((play->envCtx.timeIncrement == 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) ||
|
2022-03-21 21:51:23 -04:00
|
|
|
|
(gSaveContext.entranceIndex == 0x0604)) {
|
|
|
|
|
gSaveContext.skyboxTime = ((void)0, gSaveContext.dayTime);
|
|
|
|
|
if ((gSaveContext.skyboxTime >= 0x2AAC) && (gSaveContext.skyboxTime < 0x4555)) {
|
|
|
|
|
gSaveContext.skyboxTime = 0x3556;
|
2023-05-07 19:58:50 -04:00
|
|
|
|
} else if ((gSaveContext.skyboxTime >= 0x4555) && (gSaveContext.skyboxTime < 0x5556)) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
gSaveContext.skyboxTime = 0x5556;
|
2023-05-07 19:58:50 -04:00
|
|
|
|
} else if ((gSaveContext.skyboxTime >= 0xAAAB) && (gSaveContext.skyboxTime < 0xB556)) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
gSaveContext.skyboxTime = 0xB556;
|
2023-05-07 19:58:50 -04:00
|
|
|
|
} else if ((gSaveContext.skyboxTime >= 0xC001) && (gSaveContext.skyboxTime < 0xCAAC)) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
gSaveContext.skyboxTime = 0xCAAC;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandWindSettings(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetWind* cmdWind = std::static_pointer_cast<LUS::SetWind>(cmd);
|
|
|
|
|
LUS::SetWindSettings* cmdWind = (LUS::SetWindSettings*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->envCtx.windDirection.x = cmdWind->settings.windWest;
|
|
|
|
|
play->envCtx.windDirection.y = cmdWind->settings.windVertical;
|
|
|
|
|
play->envCtx.windDirection.z = cmdWind->settings.windSouth;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->envCtx.windSpeed = cmdWind->settings.windSpeed;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandExitList(PlayState* play, LUS::ISceneCommand* cmd) {
|
|
|
|
|
play->setupExitList = (s16*)cmd->GetRawPointer();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandUndefined9(PlayState* play, LUS::ISceneCommand* cmd) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandSoundSettings(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetSoundSettings* cmdSnd = static_pointer_cast<LUS::SetSoundSettings>(cmd);
|
|
|
|
|
LUS::SetSoundSettings* cmdSnd = (LUS::SetSoundSettings*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->sequenceCtx.seqId = cmdSnd->settings.seqId;
|
|
|
|
|
play->sequenceCtx.natureAmbienceId = cmdSnd->settings.natureAmbienceId;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
if (gSaveContext.seqId == 0xFF) {
|
2023-01-17 00:17:49 -05:00
|
|
|
|
Audio_QueueSeqCmd(cmdSnd->settings.reverb | 0xF0000000);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandEchoSettings(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetEchoSettings* cmdEcho = static_pointer_cast<LUS::SetEchoSettings>(cmd);
|
|
|
|
|
LUS::SetEchoSettings* cmdEcho = (LUS::SetEchoSettings*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->roomCtx.curRoom.echo = cmdEcho->settings.echo;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandAlternateHeaderList(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetAlternateHeaders* cmdHeaders = static_pointer_cast<LUS::SetAlternateHeaders>(cmd);
|
|
|
|
|
LUS::SetAlternateHeaders* cmdHeaders = (LUS::SetAlternateHeaders*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
// s32 pad;
|
|
|
|
|
// SceneCmd* altHeader;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
// osSyncPrintf("\n[ZU]sceneset age =[%X]", ((void)0, gSaveContext.linkAge));
|
|
|
|
|
// osSyncPrintf("\n[ZU]sceneset time =[%X]", ((void)0, gSaveContext.cutsceneIndex));
|
|
|
|
|
// osSyncPrintf("\n[ZU]sceneset counter=[%X]", ((void)0, gSaveContext.sceneSetupIndex));
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
if (gSaveContext.sceneSetupIndex != 0) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
LUS::Scene* desiredHeader =
|
|
|
|
|
std::static_pointer_cast<LUS::Scene>(cmdHeaders->headers[gSaveContext.sceneSetupIndex - 1]).get();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
if (desiredHeader != nullptr) {
|
2023-01-17 00:17:49 -05:00
|
|
|
|
OTRScene_ExecuteCommands(play, desiredHeader);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
return true;
|
2023-05-07 19:58:50 -04:00
|
|
|
|
} else {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
// "Coughh! There is no specified dataaaaa!"
|
|
|
|
|
osSyncPrintf("\nげぼはっ! 指定されたデータがないでええっす!");
|
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
if (gSaveContext.sceneSetupIndex == 3) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
LUS::Scene* desiredHeader =
|
|
|
|
|
std::static_pointer_cast<LUS::Scene>(cmdHeaders->headers[gSaveContext.sceneSetupIndex - 2]).get();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
// "Using adult day data there!"
|
|
|
|
|
osSyncPrintf("\nそこで、大人の昼データを使用するでええっす!!");
|
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
if (desiredHeader != nullptr) {
|
2023-01-17 00:17:49 -05:00
|
|
|
|
OTRScene_ExecuteCommands(play, desiredHeader);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandCutsceneData(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetCutscenes* cmdCS = std::static_pointer_cast<LUS::SetCutscenes>(cmd);
|
|
|
|
|
LUS::SetCutscenes* cmdCS = (LUS::SetCutscenes*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
play->csCtx.segment = cmdCS->cutscene->commands.data();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
// osSyncPrintf("\ngame_play->demo_play.data=[%x]", play->csCtx.segment);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2022-08-16 21:53:28 -04:00
|
|
|
|
// Camera & World Map Area
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool Scene_CommandMiscSettings(PlayState* play, LUS::ISceneCommand* cmd) {
|
2023-05-07 23:01:12 -04:00
|
|
|
|
// LUS::SetCameraSettings* cmdCam = std::static_pointer_cast<LUS::SetCameraSettings>(cmd);
|
|
|
|
|
LUS::SetCameraSettings* cmdCam = (LUS::SetCameraSettings*)cmd;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
YREG(15) = cmdCam->settings.cameraMovement;
|
|
|
|
|
gSaveContext.worldMapArea = cmdCam->settings.worldMapArea;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
|
if ((play->sceneNum == SCENE_SHOP1) || (play->sceneNum == SCENE_SYATEKIJYOU)) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
|
|
|
|
gSaveContext.worldMapArea = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
|
if (((play->sceneNum >= SCENE_SPOT00) && (play->sceneNum <= SCENE_GANON_TOU)) ||
|
|
|
|
|
((play->sceneNum >= SCENE_ENTRA) && (play->sceneNum <= SCENE_SHRINE_R))) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
if (gSaveContext.cutsceneIndex < 0xFFF0) {
|
|
|
|
|
gSaveContext.worldMapAreaData |= gBitFlags[gSaveContext.worldMapArea];
|
|
|
|
|
osSyncPrintf("000 area_arrival=%x (%d)\n", gSaveContext.worldMapAreaData,
|
|
|
|
|
gSaveContext.worldMapArea);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 15:27:45 -04:00
|
|
|
|
bool (*sceneCommands[])(PlayState*, LUS::ISceneCommand*) = {
|
2022-08-16 21:53:28 -04:00
|
|
|
|
Scene_CommandSpawnList, // SCENE_CMD_ID_SPAWN_LIST
|
|
|
|
|
Scene_CommandActorList, // SCENE_CMD_ID_ACTOR_LIST
|
|
|
|
|
Scene_CommandUnused2, // SCENE_CMD_ID_UNUSED_2
|
|
|
|
|
Scene_CommandCollisionHeader, // SCENE_CMD_ID_COLLISION_HEADER
|
|
|
|
|
Scene_CommandRoomList, // SCENE_CMD_ID_ROOM_LIST
|
|
|
|
|
Scene_CommandWindSettings, // SCENE_CMD_ID_WIND_SETTINGS
|
|
|
|
|
Scene_CommandEntranceList, // SCENE_CMD_ID_ENTRANCE_LIST
|
|
|
|
|
Scene_CommandSpecialFiles, // SCENE_CMD_ID_SPECIAL_FILES
|
|
|
|
|
Scene_CommandRoomBehavior, // SCENE_CMD_ID_ROOM_BEHAVIOR
|
|
|
|
|
Scene_CommandUndefined9, // SCENE_CMD_ID_UNDEFINED_9
|
|
|
|
|
Scene_CommandMeshHeader, // SCENE_CMD_ID_MESH_HEADER
|
|
|
|
|
Scene_CommandObjectList, // SCENE_CMD_ID_OBJECT_LIST
|
|
|
|
|
Scene_CommandLightList, // SCENE_CMD_ID_LIGHT_LIST
|
|
|
|
|
Scene_CommandPathList, // SCENE_CMD_ID_PATH_LIST
|
|
|
|
|
Scene_CommandTransitionActorList, // SCENE_CMD_ID_TRANSITION_ACTOR_LIST
|
|
|
|
|
Scene_CommandLightSettingsList, // SCENE_CMD_ID_LIGHT_SETTINGS_LIST
|
|
|
|
|
Scene_CommandTimeSettings, // SCENE_CMD_ID_TIME_SETTINGS
|
|
|
|
|
Scene_CommandSkyboxSettings, // SCENE_CMD_ID_SKYBOX_SETTINGS
|
|
|
|
|
Scene_CommandSkyboxDisables, // SCENE_CMD_ID_SKYBOX_DISABLES
|
|
|
|
|
Scene_CommandExitList, // SCENE_CMD_ID_EXIT_LIST
|
|
|
|
|
NULL, // SCENE_CMD_ID_END
|
|
|
|
|
Scene_CommandSoundSettings, // SCENE_CMD_ID_SOUND_SETTINGS
|
|
|
|
|
Scene_CommandEchoSettings, // SCENE_CMD_ID_ECHO_SETTINGS
|
|
|
|
|
Scene_CommandCutsceneData, // SCENE_CMD_ID_CUTSCENE_DATA
|
|
|
|
|
Scene_CommandAlternateHeaderList, // SCENE_CMD_ID_ALTERNATE_HEADER_LIST
|
|
|
|
|
Scene_CommandMiscSettings, // SCENE_CMD_ID_MISC_SETTINGS
|
2022-03-21 21:51:23 -04:00
|
|
|
|
};
|
|
|
|
|
|
2023-05-07 23:01:12 -04:00
|
|
|
|
s32 OTRScene_ExecuteCommands(PlayState* play, LUS::Scene* scene) {
|
|
|
|
|
LUS::SceneCommandID cmdCode;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
for (int i = 0; i < scene->commands.size(); i++) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
auto sceneCmd = scene->commands[i];
|
|
|
|
|
|
|
|
|
|
if (sceneCmd == nullptr) // UH OH
|
|
|
|
|
continue;
|
|
|
|
|
|
2023-01-17 00:17:49 -05:00
|
|
|
|
cmdCode = sceneCmd->cmdId;
|
2023-05-07 19:58:50 -04:00
|
|
|
|
// osSyncPrintf("*** Scene_Word = { code=%d, data1=%02x, data2=%04x } ***\n", cmdCode, sceneCmd->base.data1, sceneCmd->base.data2);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
if ((int)cmdCode == 0x14) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((int)cmdCode <= 0x19) {
|
2023-01-17 00:17:49 -05:00
|
|
|
|
if (sceneCommands[(int)cmdCode](play, sceneCmd.get()))
|
2022-03-21 21:51:23 -04:00
|
|
|
|
break;
|
2023-05-07 19:58:50 -04:00
|
|
|
|
} else {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
osSyncPrintf(VT_FGCOL(RED));
|
|
|
|
|
osSyncPrintf("code の値が異常です\n"); // "code variable is abnormal"
|
|
|
|
|
osSyncPrintf(VT_RST);
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
// sceneCmd++;
|
2022-03-21 21:51:23 -04:00
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
|
extern "C" s32 OTRfunc_800973FC(PlayState* play, RoomContext* roomCtx) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
if (roomCtx->status == 1) {
|
2023-05-07 19:58:50 -04:00
|
|
|
|
// if (!osRecvMesg(&roomCtx->loadQueue, NULL, OS_MESG_NOBLOCK)) {
|
|
|
|
|
if (1) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
roomCtx->status = 0;
|
|
|
|
|
roomCtx->curRoom.segment = roomCtx->unk_34;
|
|
|
|
|
gSegments[3] = VIRTUAL_TO_PHYSICAL(roomCtx->unk_34);
|
|
|
|
|
|
2023-05-07 23:01:12 -04:00
|
|
|
|
OTRScene_ExecuteCommands(play, (LUS::Scene*)roomCtx->roomToLoad);
|
2022-11-06 03:24:34 -05:00
|
|
|
|
Player_SetBootData(play, GET_PLAYER(play));
|
|
|
|
|
Actor_SpawnTransitionActors(play, &play->actorCtx);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
|
extern "C" s32 OTRfunc_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum) {
|
2022-03-21 21:51:23 -04:00
|
|
|
|
u32 size;
|
|
|
|
|
|
|
|
|
|
if (roomCtx->status == 0) {
|
|
|
|
|
roomCtx->prevRoom = roomCtx->curRoom;
|
|
|
|
|
roomCtx->curRoom.num = roomNum;
|
|
|
|
|
roomCtx->curRoom.segment = NULL;
|
|
|
|
|
roomCtx->status = 1;
|
|
|
|
|
|
2023-06-27 19:53:35 -04:00
|
|
|
|
assert(roomNum < play->numRooms);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
|
if (roomNum >= play->numRooms)
|
2022-03-21 21:51:23 -04:00
|
|
|
|
return 0; // UH OH
|
|
|
|
|
|
2022-11-06 03:24:34 -05:00
|
|
|
|
size = play->roomList[roomNum].vromEnd - play->roomList[roomNum].vromStart;
|
2023-05-07 19:58:50 -04:00
|
|
|
|
roomCtx->unk_34 =
|
|
|
|
|
(void*)ALIGN16((uintptr_t)roomCtx->bufPtrs[roomCtx->unk_30] - ((size + 8) * roomCtx->unk_30 + 7));
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
osCreateMesgQueue(&roomCtx->loadQueue, &roomCtx->loadMsg, 1);
|
2023-05-07 19:58:50 -04:00
|
|
|
|
// DmaMgr_SendRequest2(&roomCtx->dmaRequest, roomCtx->unk_34, play->roomList[roomNum].vromStart, size, 0,
|
2022-07-05 19:29:34 -04:00
|
|
|
|
//&roomCtx->loadQueue, NULL, __FILE__, __LINE__);
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
2023-05-07 19:58:50 -04:00
|
|
|
|
auto roomData =
|
2023-05-07 23:01:12 -04:00
|
|
|
|
std::static_pointer_cast<LUS::Scene>(GetResourceByNameHandlingMQ(play->roomList[roomNum].fileName));
|
2022-03-21 21:51:23 -04:00
|
|
|
|
roomCtx->status = 1;
|
2023-01-17 00:17:49 -05:00
|
|
|
|
roomCtx->roomToLoad = roomData.get();
|
2022-03-21 21:51:23 -04:00
|
|
|
|
|
|
|
|
|
roomCtx->unk_30 ^= 1;
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
2022-07-10 09:30:19 -04:00
|
|
|
|
}
|