* Sync with OoT

* Macro cleanup

* Some cleanup/rename load system name to Fragment

* Format

* bss

* Some clarifying comments regarding fragments

* PR suggestions

* size_t and numRelocations
This commit is contained in:
Derek Hensley
2023-06-23 21:26:36 -07:00
committed by GitHub
parent aa9e368561
commit 5619dc5b5e
19 changed files with 307 additions and 197 deletions
+6 -5
View File
@@ -4,8 +4,8 @@
*/
#include "global.h"
#include "loadfragment.h"
#include "z64horse.h"
#include "z64load.h"
#include "z64quake.h"
#include "z64rumble.h"
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
@@ -3157,7 +3157,7 @@ ActorInit* Actor_LoadOverlay(ActorContext* actorCtx, s16 index) {
ActorOverlay* overlayEntry = &gActorOverlayTable[index];
ActorInit* actorInit;
overlaySize = VRAM_PTR_SIZE(overlayEntry);
overlaySize = (uintptr_t)overlayEntry->vramEnd - (uintptr_t)overlayEntry->vramStart;
if (overlayEntry->vramStart == NULL) {
actorInit = overlayEntry->initInfo;
@@ -3178,14 +3178,15 @@ ActorInit* Actor_LoadOverlay(ActorContext* actorCtx, s16 index) {
return NULL;
}
Load2_LoadOverlay(overlayEntry->vromStart, overlayEntry->vromEnd, overlayEntry->vramStart,
overlayEntry->vramEnd, overlayEntry->loadedRamAddr);
Overlay_Load(overlayEntry->vromStart, overlayEntry->vromEnd, overlayEntry->vramStart, overlayEntry->vramEnd,
overlayEntry->loadedRamAddr);
overlayEntry->numLoaded = 0;
}
actorInit = (uintptr_t)(
(overlayEntry->initInfo != NULL)
? (void*)((uintptr_t)overlayEntry->initInfo - (intptr_t)OVERLAY_RELOCATION_OFFSET(overlayEntry))
? (void*)((uintptr_t)overlayEntry->initInfo -
(intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
: NULL);
}