Skip to content

Commit

Permalink
Doc/Cleanup pass on object handling (#1227)
Browse files Browse the repository at this point in the history
* `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 <[email protected]>

* 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 <[email protected]>
  • Loading branch information
Dragorn421 and fig02 authored Sep 19, 2023
1 parent 83a13a6 commit 57ce0cf
Show file tree
Hide file tree
Showing 130 changed files with 790 additions and 771 deletions.
11 changes: 5 additions & 6 deletions include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ void Enemy_StartFinishingBlow(PlayState* play, Actor* actor);
s16 func_80032CB4(s16* arg0, s16 arg1, s16 arg2, s16 arg3);
void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, PlayState* play);
void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s32 maxLimbIndex, u32 count, Gfx** dList,
s16 objectId);
s16 objectSlot);
s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, PlayState* play, s16 type);
void Actor_SpawnFloorDustRing(PlayState* play, Actor* actor, Vec3f* posXZ, f32 radius, s32 amountMinusOne,
f32 randAccelWeight, s16 scale, s16 scaleStep, u8 useLighting);
Expand Down Expand Up @@ -1106,11 +1106,10 @@ void Sample_Init(GameState* thisx);
void Inventory_ChangeEquipment(s16 equipment, u16 value);
u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment);
void Inventory_ChangeUpgrade(s16 upgrade, s16 value);
s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId);
void Object_InitBank(PlayState* play, ObjectContext* objectCtx);
void Object_UpdateBank(ObjectContext* objectCtx);
s32 Object_GetIndex(ObjectContext* objectCtx, s16 objectId);
s32 Object_IsLoaded(ObjectContext* objectCtx, s32 bankIndex);
void Object_InitContext(PlayState* play, ObjectContext* objectCtx);
void Object_UpdateEntries(ObjectContext* objectCtx);
s32 Object_GetSlot(ObjectContext* objectCtx, s16 objectId);
s32 Object_IsLoaded(ObjectContext* objectCtx, s32 slot);
void func_800981B8(ObjectContext* objectCtx);
s32 Scene_ExecuteCommands(PlayState* play, SceneCmd* sceneCmd);
void TransitionActor_InitContext(GameState* state, TransitionActorContext* transiActorCtx);
Expand Down
6 changes: 3 additions & 3 deletions include/z64actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ typedef struct Actor {
/* 0x004 */ u32 flags; // Flags used for various purposes
/* 0x008 */ PosRot home; // Initial position/rotation when spawned. Can be used for other purposes
/* 0x01C */ s16 params; // Configurable variable set by the actor's spawn data; original name: "args_data"
/* 0x01E */ s8 objBankIndex; // Object bank index of the actor's object dependency; original name: "bank"
/* 0x01E */ s8 objectSlot; // Object slot (in ObjectContext) corresponding to the actor's object; original name: "bank"
/* 0x01F */ s8 targetMode; // Controls how far the actor can be targeted from and how far it can stay locked on
/* 0x020 */ u16 sfx; // SFX ID to play. Sfx plays when value is set, then is cleared the following update cycle
/* 0x024 */ PosRot world; // Position/rotation in the world
Expand Down Expand Up @@ -287,14 +287,14 @@ typedef struct DynaPolyActor {

typedef struct {
/* 0x00 */ MtxF* matrices;
/* 0x04 */ s16* objectIds;
/* 0x04 */ s16* objectSlots;
/* 0x08 */ s16 count;
/* 0x0C */ Gfx** dLists;
/* 0x10 */ s32 val; // used for various purposes: both a status indicator and counter
/* 0x14 */ s32 prevLimbIndex;
} BodyBreak;

#define BODYBREAK_OBJECT_DEFAULT -1 // use the same object as the actor
#define BODYBREAK_OBJECT_SLOT_DEFAULT -1 // use the same object as the actor
#define BODYBREAK_STATUS_READY -1
#define BODYBREAK_STATUS_FINISHED 0

Expand Down
2 changes: 1 addition & 1 deletion include/z64effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ typedef struct {
#define rgEnvColorG regs[8]
#define rgEnvColorB regs[9]
#define rgEnvColorA regs[10]
#define rgObjBankIdx regs[11]
#define rgObjectSlot regs[11]

#define DEFINE_EFFECT_SS(_0, enum) enum,
#define DEFINE_EFFECT_SS_UNSET(enum) enum,
Expand Down
28 changes: 13 additions & 15 deletions include/z64object.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@
#include "ultra64.h"
#include "z64dma.h"

#define OBJECT_EXCHANGE_BANK_MAX 19

typedef struct {
/* 0x00 */ s16 id;
/* 0x04 */ void* segment;
/* 0x08 */ DmaRequest dmaRequest;
/* 0x00 */ s16 id;
/* 0x04 */ void* segment;
/* 0x08 */ DmaRequest dmaRequest;
/* 0x28 */ OSMesgQueue loadQueue;
/* 0x40 */ OSMesg loadMsg;
} ObjectStatus; // size = 0x44
/* 0x40 */ OSMesg loadMsg;
} ObjectEntry; // size = 0x44

typedef struct {
/* 0x0000 */ void* spaceStart;
/* 0x0004 */ void* spaceEnd; // original name: "endSegment"
/* 0x0008 */ u8 num; // number of objects in bank
/* 0x0009 */ u8 unk_09;
/* 0x000A */ u8 mainKeepIndex; // "gameplay_keep" index in bank
/* 0x000B */ u8 subKeepIndex; // "gameplay_field_keep" or "gameplay_dangeon_keep" index in bank
/* 0x000C */ ObjectStatus status[OBJECT_EXCHANGE_BANK_MAX];
/* 0x0000 */ void* spaceStart;
/* 0x0004 */ void* spaceEnd; // original name: "endSegment"
/* 0x0008 */ u8 numEntries; // total amount of used entries
/* 0x0009 */ u8 numPersistentEntries; // amount of entries that won't be reused when loading a new object list (when loading a new room)
/* 0x000A */ u8 mainKeepSlot; // "gameplay_keep" slot
/* 0x000B */ u8 subKeepSlot; // "gameplay_field_keep" or "gameplay_dangeon_keep" slot
/* 0x000C */ ObjectEntry slots[19];
} ObjectContext; // size = 0x518

#define DEFINE_OBJECT(_0, enum) enum,
Expand All @@ -31,7 +29,7 @@ typedef struct {
typedef enum {
#include "tables/object_table.h"
/* 0x0192 */ OBJECT_ID_MAX
} ObjectID;
} ObjectId;

#undef DEFINE_OBJECT
#undef DEFINE_OBJECT_NULL
Expand Down
58 changes: 29 additions & 29 deletions src/code/z_actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ void Actor_SetScale(Actor* actor, f32 scale) {
}

void Actor_SetObjectDependency(PlayState* play, Actor* actor) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[actor->objBankIndex].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[actor->objectSlot].segment);
}

void Actor_Init(Actor* actor, PlayState* play) {
Expand All @@ -818,7 +818,7 @@ void Actor_Init(Actor* actor, PlayState* play) {
CollisionCheck_InitInfo(&actor->colChkInfo);
actor->floorBgId = BGCHECK_SCENE;
ActorShape_Init(&actor->shape, 0.0f, NULL, 0.0f);
if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
if (Object_IsLoaded(&play->objectCtx, actor->objectSlot)) {
Actor_SetObjectDependency(play, actor);
actor->init(actor, play);
actor->init = NULL;
Expand Down Expand Up @@ -2143,13 +2143,13 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
actor->sfx = 0;

if (actor->init != NULL) {
if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
if (Object_IsLoaded(&play->objectCtx, actor->objectSlot)) {
Actor_SetObjectDependency(play, actor);
actor->init(actor, play);
actor->init = NULL;
}
actor = actor->next;
} else if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
} else if (!Object_IsLoaded(&play->objectCtx, actor->objectSlot)) {
Actor_Kill(actor);
actor = actor->next;
} else if ((requiredActorFlag && !(actor->flags & requiredActorFlag)) ||
Expand Down Expand Up @@ -2272,8 +2272,8 @@ void Actor_Draw(PlayState* play, Actor* actor) {
Matrix_Scale(actor->scale.x, actor->scale.y, actor->scale.z, MTXMODE_APPLY);
Actor_SetObjectDependency(play, actor);

gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.status[actor->objBankIndex].segment);
gSPSegment(POLY_XLU_DISP++, 0x06, play->objectCtx.status[actor->objBankIndex].segment);
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[actor->objectSlot].segment);
gSPSegment(POLY_XLU_DISP++, 0x06, play->objectCtx.slots[actor->objectSlot].segment);

if (actor->colorFilterTimer != 0) {
Color_RGBA8 color = { 0, 0, 0, 255 };
Expand Down Expand Up @@ -2570,7 +2570,7 @@ void Actor_KillAllWithMissingObject(PlayState* play, ActorContext* actorCtx) {
for (i = 0; i < ARRAY_COUNT(actorCtx->actorLists); i++) {
actor = actorCtx->actorLists[i].head;
while (actor != NULL) {
if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
if (!Object_IsLoaded(&play->objectCtx, actor->objectSlot)) {
Actor_Kill(actor);
}
actor = actor->next;
Expand Down Expand Up @@ -2745,7 +2745,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
s32 pad;
Actor* actor;
ActorInit* actorInit;
s32 objBankIndex;
s32 objectSlot;
ActorOverlay* overlayEntry;
uintptr_t temp;
char* name;
Expand Down Expand Up @@ -2828,13 +2828,13 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
: NULL);
}

objBankIndex = Object_GetIndex(&play->objectCtx, actorInit->objectId);
objectSlot = Object_GetSlot(&play->objectCtx, actorInit->objectId);

if ((objBankIndex < 0) ||
if ((objectSlot < 0) ||
((actorInit->category == ACTORCAT_ENEMY) && Flags_GetClear(play, play->roomCtx.curRoom.num))) {
// "No data bank!! <data bank=%d> (profilep->bank=%d)"
osSyncPrintf(VT_COL(RED, WHITE) "データバンク無し!!<データバンク=%d>(profilep->bank=%d)\n" VT_RST,
objBankIndex, actorInit->objectId);
objectSlot, actorInit->objectId);
Actor_FreeOverlay(overlayEntry);
return NULL;
}
Expand Down Expand Up @@ -2864,10 +2864,10 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
actor->flags = actorInit->flags;

if (actorInit->id == ACTOR_EN_PART) {
actor->objBankIndex = rotZ;
actor->objectSlot = rotZ;
rotZ = 0;
} else {
actor->objBankIndex = objBankIndex;
actor->objectSlot = objectSlot;
}

actor->init = actorInit->init;
Expand Down Expand Up @@ -3155,7 +3155,7 @@ s16 func_80032D60(s16* arg0, s16 arg1, s16 arg2, s16 arg3) {
void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, PlayState* play) {
u32 matricesSize;
u32 dListsSize;
u32 objectIdsSize;
u32 objectSlotsSize;

matricesSize = (count + 1) * sizeof(*bodyBreak->matrices);
bodyBreak->matrices = ZeldaArena_MallocDebug(matricesSize, "../z_actor.c", 7540);
Expand All @@ -3165,13 +3165,13 @@ void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, PlayState* play) {
bodyBreak->dLists = ZeldaArena_MallocDebug(dListsSize, "../z_actor.c", 7543);

if (bodyBreak->dLists != NULL) {
objectIdsSize = (count + 1) * sizeof(*bodyBreak->objectIds);
bodyBreak->objectIds = ZeldaArena_MallocDebug(objectIdsSize, "../z_actor.c", 7546);
objectSlotsSize = (count + 1) * sizeof(*bodyBreak->objectSlots);
bodyBreak->objectSlots = ZeldaArena_MallocDebug(objectSlotsSize, "../z_actor.c", 7546);

if (bodyBreak->objectIds != NULL) {
if (bodyBreak->objectSlots != NULL) {
Lib_MemSet((u8*)bodyBreak->matrices, matricesSize, 0);
Lib_MemSet((u8*)bodyBreak->dLists, dListsSize, 0);
Lib_MemSet((u8*)bodyBreak->objectIds, objectIdsSize, 0);
Lib_MemSet((u8*)bodyBreak->objectSlots, objectSlotsSize, 0);
bodyBreak->val = 1;
return;
}
Expand All @@ -3186,20 +3186,20 @@ void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, PlayState* play) {
ZeldaArena_FreeDebug(bodyBreak->dLists, "../z_actor.c", 7561);
}

if (bodyBreak->objectIds != NULL) {
ZeldaArena_FreeDebug(bodyBreak->objectIds, "../z_actor.c", 7564);
if (bodyBreak->objectSlots != NULL) {
ZeldaArena_FreeDebug(bodyBreak->objectSlots, "../z_actor.c", 7564);
}
}

void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s32 maxLimbIndex, u32 count, Gfx** dList,
s16 objectId) {
s16 objectSlot) {
PlayState* play = Effect_GetPlayState();

if ((play->actorCtx.freezeFlashTimer == 0) && (bodyBreak->val > 0)) {
if ((limbIndex >= minLimbIndex) && (limbIndex <= maxLimbIndex) && (*dList != NULL)) {
bodyBreak->dLists[bodyBreak->val] = *dList;
Matrix_Get(&bodyBreak->matrices[bodyBreak->val]);
bodyBreak->objectIds[bodyBreak->val] = objectId;
bodyBreak->objectSlots[bodyBreak->val] = objectSlot;
bodyBreak->val++;
}

Expand All @@ -3219,7 +3219,7 @@ void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s3
s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, PlayState* play, s16 type) {
EnPart* spawnedEnPart;
MtxF* mtx;
s16 objBankIndex;
s16 objectSlot;

if (bodyBreak->val != BODYBREAK_STATUS_READY) {
return false;
Expand All @@ -3231,17 +3231,17 @@ s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, PlayState* play, s1
Matrix_Get(&bodyBreak->matrices[bodyBreak->count]);

if (1) {
if (bodyBreak->objectIds[bodyBreak->count] >= 0) {
objBankIndex = bodyBreak->objectIds[bodyBreak->count];
if (bodyBreak->objectSlots[bodyBreak->count] > BODYBREAK_OBJECT_SLOT_DEFAULT) {
objectSlot = bodyBreak->objectSlots[bodyBreak->count];
} else {
objBankIndex = actor->objBankIndex;
objectSlot = actor->objectSlot;
}
}

mtx = &bodyBreak->matrices[bodyBreak->count];

spawnedEnPart = (EnPart*)Actor_SpawnAsChild(&play->actorCtx, actor, play, ACTOR_EN_PART, mtx->xw, mtx->yw,
mtx->zw, 0, 0, objBankIndex, type);
mtx->zw, 0, 0, objectSlot, type);

if (spawnedEnPart != NULL) {
Matrix_MtxFToYXZRotS(&bodyBreak->matrices[bodyBreak->count], &spawnedEnPart->actor.shape.rot, 0);
Expand All @@ -3256,7 +3256,7 @@ s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, PlayState* play, s1

ZeldaArena_FreeDebug(bodyBreak->matrices, "../z_actor.c", 7678);
ZeldaArena_FreeDebug(bodyBreak->dLists, "../z_actor.c", 7679);
ZeldaArena_FreeDebug(bodyBreak->objectIds, "../z_actor.c", 7680);
ZeldaArena_FreeDebug(bodyBreak->objectSlots, "../z_actor.c", 7680);

return true;
}
Expand Down Expand Up @@ -4329,7 +4329,7 @@ Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3,
EnPart* spawnedEnPart;

spawnedEnPart = (EnPart*)Actor_SpawnAsChild(&play->actorCtx, actor, play, ACTOR_EN_PART, spawnPos->x, spawnPos->y,
spawnPos->z, spawnRot->x, spawnRot->y, actor->objBankIndex, params);
spawnPos->z, spawnRot->x, spawnRot->y, actor->objectSlot, params);
if (spawnedEnPart != NULL) {
spawnedEnPart->actor.scale = actor->scale;
spawnedEnPart->actor.speed = arg3[0];
Expand Down
6 changes: 3 additions & 3 deletions src/code/z_effect_soft_sprite_old_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture) {
MtxF mfTransBillboard;
s32 pad1;
Mtx* mtx;
void* object = play->objectCtx.status[this->rgObjBankIdx].segment;
void* objectPtr = play->objectCtx.slots[this->rgObjectSlot].segment;

OPEN_DISPS(gfxCtx, "../z_effect_soft_sprite_old_init.c", 196);

Expand All @@ -58,8 +58,8 @@ void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture) {
SkinMatrix_SetScale(&mfScale, scale, scale, scale);
SkinMatrix_MtxFMtxFMult(&mfTrans, &play->billboardMtxF, &mfTransBillboard);
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfScale, &mfResult);
gSegments[6] = VIRTUAL_TO_PHYSICAL(object);
gSPSegment(POLY_XLU_DISP++, 0x06, object);
gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);

mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);

Expand Down
12 changes: 6 additions & 6 deletions src/code/z_en_item00.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
this->scale = 0.01f;
break;
case ITEM00_SHIELD_DEKU:
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_SHIELD_1);
this->actor.objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GI_SHIELD_1);
Actor_SetObjectDependency(play, &this->actor);
Actor_SetScale(&this->actor, 0.5f);
this->scale = 0.5f;
Expand All @@ -245,7 +245,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
this->actor.world.rot.x = 0x4000;
break;
case ITEM00_SHIELD_HYLIAN:
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_SHIELD_2);
this->actor.objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GI_SHIELD_2);
Actor_SetObjectDependency(play, &this->actor);
Actor_SetScale(&this->actor, 0.5f);
this->scale = 0.5f;
Expand All @@ -255,7 +255,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
break;
case ITEM00_TUNIC_ZORA:
case ITEM00_TUNIC_GORON:
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_CLOTHES);
this->actor.objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GI_CLOTHES);
Actor_SetObjectDependency(play, &this->actor);
Actor_SetScale(&this->actor, 0.5f);
this->scale = 0.5f;
Expand Down Expand Up @@ -765,10 +765,10 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
case ITEM00_RECOVERY_HEART:
if (this->despawnTimer < 0) {
if (this->despawnTimer == -1) {
s8 bankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_HEART);
s8 objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GI_HEART);

if (Object_IsLoaded(&play->objectCtx, bankIndex)) {
this->actor.objBankIndex = bankIndex;
if (Object_IsLoaded(&play->objectCtx, objectSlot)) {
this->actor.objectSlot = objectSlot;
Actor_SetObjectDependency(play, &this->actor);
this->despawnTimer = -2;
}
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_kankyo.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
play->csCtx.actorCues[i] = NULL;
}

if (Object_GetIndex(&play->objectCtx, OBJECT_GAMEPLAY_FIELD_KEEP) < 0 && !play->envCtx.sunMoonDisabled) {
if (Object_GetSlot(&play->objectCtx, OBJECT_GAMEPLAY_FIELD_KEEP) < 0 && !play->envCtx.sunMoonDisabled) {
play->envCtx.sunMoonDisabled = true;
// "Sun setting other than field keep! So forced release!"
osSyncPrintf(VT_COL(YELLOW, BLACK) "\n\nフィールド常駐以外、太陽設定!よって強制解除!\n" VT_RST);
Expand Down
Loading

0 comments on commit 57ce0cf

Please sign in to comment.