mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 15:04:31 +00:00
Some doc on actor overlays alloc types (#1266)
* Some doc on actor overlays alloc types * Line breaks between defines at the top of actor.h * plain english * `ACTOR_ALLOC_` -> `ACTOROVL_ALLOC_` * More line breaks * `ACTOR_OVERLAY_ABSOLUTE_SPACE_SIZE` -> `ACTOROVL_ABSOLUTE_SPACE_SIZE` * Document bug about Scarecrow's Song not setting the flag to restore Nayru's Love * Try to document the check for needing to actor_kill to leave the absolute space being too broad * "which overlay uses" (bad english) -> simplify to "which uses" * Run formatter
This commit is contained in:
parent
b602276fef
commit
017a3aaf5c
18 changed files with 539 additions and 463 deletions
|
@ -2630,11 +2630,11 @@ void Actor_FreeOverlay(ActorOverlay* actorOverlay) {
|
|||
}
|
||||
|
||||
if (actorOverlay->loadedRamAddr != NULL) {
|
||||
if (actorOverlay->allocType & ALLOCTYPE_PERMANENT) {
|
||||
if (actorOverlay->allocType & ACTOROVL_ALLOC_PERSISTENT) {
|
||||
if (HREG(20) != 0) {
|
||||
osSyncPrintf("オーバーレイ解放しません\n"); // "Overlay will not be deallocated"
|
||||
}
|
||||
} else if (actorOverlay->allocType & ALLOCTYPE_ABSOLUTE) {
|
||||
} else if (actorOverlay->allocType & ACTOROVL_ALLOC_ABSOLUTE) {
|
||||
if (HREG(20) != 0) {
|
||||
// "Absolute magic field reserved, so deallocation will not occur"
|
||||
osSyncPrintf("絶対魔法領域確保なので解放しません\n");
|
||||
|
@ -2696,20 +2696,22 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
|
|||
osSyncPrintf("既にロードされています\n"); // "Already loaded"
|
||||
}
|
||||
} else {
|
||||
if (overlayEntry->allocType & ALLOCTYPE_ABSOLUTE) {
|
||||
ASSERT(overlaySize <= AM_FIELD_SIZE, "actor_segsize <= AM_FIELD_SIZE", "../z_actor.c", 6934);
|
||||
if (overlayEntry->allocType & ACTOROVL_ALLOC_ABSOLUTE) {
|
||||
ASSERT(overlaySize <= ACTOROVL_ABSOLUTE_SPACE_SIZE, "actor_segsize <= AM_FIELD_SIZE", "../z_actor.c",
|
||||
6934);
|
||||
|
||||
if (actorCtx->absoluteSpace == NULL) {
|
||||
// "AMF: absolute magic field"
|
||||
actorCtx->absoluteSpace = ZeldaArena_MallocRDebug(AM_FIELD_SIZE, "AMF:絶対魔法領域", 0);
|
||||
actorCtx->absoluteSpace =
|
||||
ZeldaArena_MallocRDebug(ACTOROVL_ABSOLUTE_SPACE_SIZE, "AMF:絶対魔法領域", 0);
|
||||
if (HREG(20) != 0) {
|
||||
// "Absolute magic field reservation - %d bytes reserved"
|
||||
osSyncPrintf("絶対魔法領域確保 %d バイト確保\n", AM_FIELD_SIZE);
|
||||
osSyncPrintf("絶対魔法領域確保 %d バイト確保\n", ACTOROVL_ABSOLUTE_SPACE_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
overlayEntry->loadedRamAddr = actorCtx->absoluteSpace;
|
||||
} else if (overlayEntry->allocType & ALLOCTYPE_PERMANENT) {
|
||||
} else if (overlayEntry->allocType & ACTOROVL_ALLOC_PERSISTENT) {
|
||||
overlayEntry->loadedRamAddr = ZeldaArena_MallocRDebug(overlaySize, name, 0);
|
||||
} else {
|
||||
overlayEntry->loadedRamAddr = ZeldaArena_MallocDebug(overlaySize, name, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue