mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 07:21:19 +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
|
@ -342,15 +342,15 @@ void EnEncount2_DrawEffects(Actor* thisx, PlayState* play) {
|
|||
EnEncount2Effect* effect = this->effects;
|
||||
GraphicsContext* gfxCtx = play->state.gfxCtx;
|
||||
s16 i;
|
||||
s32 objBankIndex;
|
||||
s32 objectSlot;
|
||||
|
||||
OPEN_DISPS(gfxCtx, "../z_en_encount2.c", 642);
|
||||
|
||||
objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_EFC_STAR_FIELD);
|
||||
objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_EFC_STAR_FIELD);
|
||||
|
||||
if (objBankIndex >= 0) {
|
||||
if (objectSlot >= 0) {
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.status[objBankIndex].segment);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[objectSlot].segment);
|
||||
|
||||
for (i = 0; i < EN_ENCOUNT2_EFFECT_COUNT; effect++, i++) {
|
||||
if (effect->isAlive) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue