mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +00:00
Doc/Cleanup pass on object handling (#1227)
* `Object_InitBank` -> `Object_InitContext` * Add and use `OBJECT_SPACE_SIZE_BASE` * Remove `OBJECT_EXCHANGE_BANK_MAX` -> use `ARRAY_COUNT()` instead * "object status" -> "object load entry" * Misc. cleanup/renames * Partial docs and way too much batch renaming and cleanup for a single commit * ctrl shift h * format * format clang-11.1 * fix regressions * Improve a `@bug` comment * Move `OBJECT_SPACE_SIZE_BASE` from header to near `Object_InitContext` * "objectID" -> "objectId" * Revert iterator index to `i` in `Actor_KillActorsWithUnloadedObject` * "object load entry index" -> "object entry" * `Object_UpdateLoadEntries` -> `Object_UpdateEntries` * Run format.sh * "object entry" -> "object slot" (except internal usage) * Proper `Object_SpawnPersistent` doc Co-authored-by: fig02 <fig02srl@gmail.com> * fixup one comment "object bank index" -> "object slot" * Amend `Object_SpawnPersistent` comment to mention running out of free slots * `Actor_KillActorsWithUnloadedObject` -> `Actor_KillAllWithMissingObject` * Remove useless mention of what uses `Object_SpawnPersistent` * Fix mistake on `Object_SpawnPersistent` doing sync dma, not async * run formatter * `Object_InitContext` -> `Object_Init` * `waitObjectSlot` -> `requiredObjectSlot` * `Object_Init` -> `func_80097DD8` * one objectIndex -> objectSlot * Remove `OBJECT_SPACE_SIZE_BASE` * light fix on the merge (rm OBJECT_EXCHANGE_BANK_MAX) * `func_80097DD8` -> `Object_InitContext` --------- Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
83a13a64c7
commit
57ce0cf8d9
130 changed files with 789 additions and 770 deletions
|
@ -250,8 +250,8 @@ void EnFr_Init(Actor* thisx, PlayState* play) {
|
|||
ASSERT(0, "0", "../z_en_fr.c", 372);
|
||||
}
|
||||
|
||||
this->objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GAMEPLAY_FIELD_KEEP);
|
||||
if (this->objBankIndex < 0) {
|
||||
this->requiredObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GAMEPLAY_FIELD_KEEP);
|
||||
if (this->requiredObjectSlot < 0) {
|
||||
Actor_Kill(&this->actor);
|
||||
osSyncPrintf(VT_COL(RED, WHITE));
|
||||
// "There is no bank!!"
|
||||
|
@ -277,7 +277,7 @@ void EnFr_Update(Actor* thisx, PlayState* play) {
|
|||
s32 frogIndex;
|
||||
s32 pad2;
|
||||
|
||||
if (Object_IsLoaded(&play->objectCtx, this->objBankIndex)) {
|
||||
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_4;
|
||||
frogIndex = this->actor.params - 1;
|
||||
sEnFrPointers.frogs[frogIndex] = this;
|
||||
|
|
|
@ -39,7 +39,7 @@ typedef struct EnFr {
|
|||
/* 0x0354 */ EnFrActionFunc actionFunc;
|
||||
/* 0x0358 */ LightNode* lightNode; // Frogs light up during the Frog Song, specifically the frog with the next note.
|
||||
/* 0x035C */ LightInfo lightInfo;
|
||||
/* 0x036A */ s8 objBankIndex;
|
||||
/* 0x036A */ s8 requiredObjectSlot;
|
||||
/* 0x036C */ s32 jumpCounter; // cyclic clock used to time celebratory frog jumps every 4 frames when child song is played.
|
||||
/* 0x0370 */ s32 blinkTimer; // blinking timer
|
||||
/* 0x0374 */ EnFrBlinkFunc blinkFunc; // unique case of using a function pointer for blinking
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue