mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-05 07:24:34 +00:00
Rename scene lists (#1344)
* first pass * revert unwanted zap change * review * name Actor_InitContext, change arg name * change bzero to use type
This commit is contained in:
parent
bea53e1cc3
commit
26d6028ff1
33 changed files with 148 additions and 143 deletions
|
@ -1953,15 +1953,14 @@ void Actor_DisableLens(PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
// Actor_InitContext
|
||||
void func_800304DC(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEntry) {
|
||||
void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* playerEntry) {
|
||||
ActorOverlay* overlayEntry;
|
||||
SavedSceneFlags* savedSceneFlags;
|
||||
s32 i;
|
||||
|
||||
savedSceneFlags = &gSaveContext.sceneFlags[play->sceneId];
|
||||
|
||||
bzero(actorCtx, sizeof(*actorCtx));
|
||||
bzero(actorCtx, sizeof(ActorContext));
|
||||
|
||||
ActorOverlayTable_Init();
|
||||
Matrix_MtxFCopy(&play->billboardMtxF, &gMtxFClear);
|
||||
|
@ -1983,7 +1982,7 @@ void func_800304DC(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEnt
|
|||
|
||||
actorCtx->absoluteSpace = NULL;
|
||||
|
||||
Actor_SpawnEntry(actorCtx, actorEntry, play);
|
||||
Actor_SpawnEntry(actorCtx, playerEntry, play);
|
||||
func_8002C0C0(&actorCtx->targetCtx, actorCtx->actorLists[ACTORCAT_PLAYER].head, play);
|
||||
func_8002FA60(play);
|
||||
}
|
||||
|
@ -2024,12 +2023,12 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
|||
sp74 = NULL;
|
||||
unkFlag = 0;
|
||||
|
||||
if (play->numSetupActors != 0) {
|
||||
actorEntry = &play->setupActorList[0];
|
||||
for (i = 0; i < play->numSetupActors; i++) {
|
||||
if (play->numActorEntries != 0) {
|
||||
actorEntry = &play->actorEntryList[0];
|
||||
for (i = 0; i < play->numActorEntries; i++) {
|
||||
Actor_SpawnEntry(&play->actorCtx, actorEntry++, play);
|
||||
}
|
||||
play->numSetupActors = 0;
|
||||
play->numActorEntries = 0;
|
||||
}
|
||||
|
||||
if (actorCtx->unk_02 != 0) {
|
||||
|
|
|
@ -4,7 +4,7 @@ Path* Path_GetByIndex(PlayState* play, s16 index, s16 max) {
|
|||
Path* path;
|
||||
|
||||
if (index != max) {
|
||||
path = &play->setupPathList[index];
|
||||
path = &play->pathList[index];
|
||||
} else {
|
||||
path = NULL;
|
||||
}
|
||||
|
|
|
@ -403,7 +403,7 @@ void Play_Init(GameState* thisx) {
|
|||
(s32)(zAllocAligned + zAllocSize) - (s32)(zAllocAligned - zAlloc));
|
||||
|
||||
Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL);
|
||||
func_800304DC(this, &this->actorCtx, this->linkActorEntry);
|
||||
Actor_InitContext(this, &this->actorCtx, this->playerEntry);
|
||||
|
||||
while (!func_800973FC(this, &this->roomCtx)) {
|
||||
; // Empty Loop
|
||||
|
@ -1399,14 +1399,17 @@ void Play_InitEnvironment(PlayState* this, s16 skyboxId) {
|
|||
}
|
||||
|
||||
void Play_InitScene(PlayState* this, s32 spawn) {
|
||||
this->curSpawn = spawn;
|
||||
this->linkActorEntry = NULL;
|
||||
this->spawn = spawn;
|
||||
|
||||
this->playerEntry = NULL;
|
||||
this->unk_11DFC = NULL;
|
||||
this->setupEntranceList = NULL;
|
||||
this->setupExitList = NULL;
|
||||
this->spawnList = NULL;
|
||||
this->exitList = NULL;
|
||||
this->naviQuestHints = NULL;
|
||||
this->setupPathList = NULL;
|
||||
this->numSetupActors = 0;
|
||||
this->pathList = NULL;
|
||||
|
||||
this->numActorEntries = 0;
|
||||
|
||||
Object_InitBank(this, &this->objectCtx);
|
||||
LightContext_Init(this, &this->lightCtx);
|
||||
TransitionActor_InitContext(&this->state, &this->transiActorCtx);
|
||||
|
|
|
@ -582,7 +582,7 @@ u32 func_80096FE8(PlayState* play, RoomContext* roomCtx) {
|
|||
roomCtx->status = 0;
|
||||
|
||||
frontRoom = gSaveContext.respawnFlag > 0 ? ((void)0, gSaveContext.respawn[gSaveContext.respawnFlag - 1].roomIndex)
|
||||
: play->setupEntranceList[play->curSpawn].room;
|
||||
: play->spawnList[play->spawn].room;
|
||||
func_8009728C(play, roomCtx, frontRoom);
|
||||
|
||||
return maxRoomSize;
|
||||
|
|
|
@ -182,22 +182,22 @@ s32 Scene_ExecuteCommands(PlayState* play, SceneCmd* sceneCmd) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void Scene_CommandSpawnList(PlayState* play, SceneCmd* cmd) {
|
||||
ActorEntry* linkEntry = play->linkActorEntry =
|
||||
(ActorEntry*)SEGMENTED_TO_VIRTUAL(cmd->spawnList.data) + play->setupEntranceList[play->curSpawn].spawn;
|
||||
void Scene_CommandPlayerEntryList(PlayState* play, SceneCmd* cmd) {
|
||||
ActorEntry* playerEntry = play->playerEntry =
|
||||
(ActorEntry*)SEGMENTED_TO_VIRTUAL(cmd->playerEntryList.data) + play->spawnList[play->spawn].playerEntryIndex;
|
||||
s16 linkObjectId;
|
||||
|
||||
play->linkAgeOnLoad = ((void)0, gSaveContext.linkAge);
|
||||
|
||||
linkObjectId = gLinkObjectIds[((void)0, gSaveContext.linkAge)];
|
||||
|
||||
gActorOverlayTable[linkEntry->id].initInfo->objectId = linkObjectId;
|
||||
gActorOverlayTable[playerEntry->id].initInfo->objectId = linkObjectId;
|
||||
Object_Spawn(&play->objectCtx, linkObjectId);
|
||||
}
|
||||
|
||||
void Scene_CommandActorList(PlayState* play, SceneCmd* cmd) {
|
||||
play->numSetupActors = cmd->actorList.length;
|
||||
play->setupActorList = SEGMENTED_TO_VIRTUAL(cmd->actorList.data);
|
||||
void Scene_CommandActorEntryList(PlayState* play, SceneCmd* cmd) {
|
||||
play->numActorEntries = cmd->actorEntryList.length;
|
||||
play->actorEntryList = SEGMENTED_TO_VIRTUAL(cmd->actorEntryList.data);
|
||||
}
|
||||
|
||||
void Scene_CommandUnused2(PlayState* play, SceneCmd* cmd) {
|
||||
|
@ -221,8 +221,8 @@ void Scene_CommandRoomList(PlayState* play, SceneCmd* cmd) {
|
|||
play->roomList = SEGMENTED_TO_VIRTUAL(cmd->roomList.data);
|
||||
}
|
||||
|
||||
void Scene_CommandEntranceList(PlayState* play, SceneCmd* cmd) {
|
||||
play->setupEntranceList = SEGMENTED_TO_VIRTUAL(cmd->entranceList.data);
|
||||
void Scene_CommandSpawnList(PlayState* play, SceneCmd* cmd) {
|
||||
play->spawnList = SEGMENTED_TO_VIRTUAL(cmd->spawnList.data);
|
||||
}
|
||||
|
||||
void Scene_CommandSpecialFiles(PlayState* play, SceneCmd* cmd) {
|
||||
|
@ -308,10 +308,10 @@ void Scene_CommandLightList(PlayState* play, SceneCmd* cmd) {
|
|||
}
|
||||
|
||||
void Scene_CommandPathList(PlayState* play, SceneCmd* cmd) {
|
||||
play->setupPathList = SEGMENTED_TO_VIRTUAL(cmd->pathList.data);
|
||||
play->pathList = SEGMENTED_TO_VIRTUAL(cmd->pathList.data);
|
||||
}
|
||||
|
||||
void Scene_CommandTransitionActorList(PlayState* play, SceneCmd* cmd) {
|
||||
void Scene_CommandTransitionActorEntryList(PlayState* play, SceneCmd* cmd) {
|
||||
play->transiActorCtx.numActors = cmd->transiActorList.length;
|
||||
play->transiActorCtx.list = SEGMENTED_TO_VIRTUAL(cmd->transiActorList.data);
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ void Scene_CommandWindSettings(PlayState* play, SceneCmd* cmd) {
|
|||
}
|
||||
|
||||
void Scene_CommandExitList(PlayState* play, SceneCmd* cmd) {
|
||||
play->setupExitList = SEGMENTED_TO_VIRTUAL(cmd->exitList.data);
|
||||
play->exitList = SEGMENTED_TO_VIRTUAL(cmd->exitList.data);
|
||||
}
|
||||
|
||||
void Scene_CommandUndefined9(PlayState* play, SceneCmd* cmd) {
|
||||
|
@ -470,32 +470,32 @@ void Scene_CommandMiscSettings(PlayState* play, SceneCmd* cmd) {
|
|||
}
|
||||
|
||||
void (*gSceneCmdHandlers[SCENE_CMD_ID_MAX])(PlayState*, SceneCmd*) = {
|
||||
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_CommandRoomShape, // SCENE_CMD_ID_ROOM_SHAPE
|
||||
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
|
||||
Scene_CommandPlayerEntryList, // SCENE_CMD_ID_SPAWN_LIST
|
||||
Scene_CommandActorEntryList, // 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_CommandSpawnList, // 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_CommandRoomShape, // SCENE_CMD_ID_ROOM_SHAPE
|
||||
Scene_CommandObjectList, // SCENE_CMD_ID_OBJECT_LIST
|
||||
Scene_CommandLightList, // SCENE_CMD_ID_LIGHT_LIST
|
||||
Scene_CommandPathList, // SCENE_CMD_ID_PATH_LIST
|
||||
Scene_CommandTransitionActorEntryList, // 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
|
||||
};
|
||||
|
||||
RomFile sNaviQuestHintFiles[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue