1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-13 19:35:28 +00:00

InitVars -> Profile (#2011)

* rename ActorInit

* rename actorInit

* rename initInfo

* EffectSs Profile

* _InitVars -> _Profile

* format, loose ends

* revert tutorial
This commit is contained in:
fig02 2024-08-02 17:50:02 -04:00 committed by GitHub
parent a083a15650
commit 078e21f6c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
472 changed files with 525 additions and 521 deletions

View file

@ -174,7 +174,7 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) {
s32 index;
u32 overlaySize;
EffectSsOverlay* overlayEntry;
EffectSsInit* initInfo;
EffectSsProfile* profile;
overlayEntry = &gEffectSsOverlayTable[type];
@ -191,7 +191,7 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) {
if (overlayEntry->vramStart == NULL) {
// "Not an overlay"
PRINTF("EffectSoftSprite2_makeEffect():オーバーレイではありません。\n");
initInfo = overlayEntry->initInfo;
profile = overlayEntry->profile;
} else {
if (overlayEntry->loadedRamAddr == NULL) {
overlayEntry->loadedRamAddr = ZELDA_ARENA_MALLOC_R(overlaySize, "../z_effect_soft_sprite.c", 585);
@ -218,19 +218,19 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) {
PRINTF(VT_RST);
}
initInfo = (void*)(uintptr_t)((overlayEntry->initInfo != NULL)
? (void*)((uintptr_t)overlayEntry->initInfo -
(intptr_t)((uintptr_t)overlayEntry->vramStart -
(uintptr_t)overlayEntry->loadedRamAddr))
: NULL);
profile = (void*)(uintptr_t)((overlayEntry->profile != NULL)
? (void*)((uintptr_t)overlayEntry->profile -
(intptr_t)((uintptr_t)overlayEntry->vramStart -
(uintptr_t)overlayEntry->loadedRamAddr))
: NULL);
}
if (initInfo->init == NULL) {
if (profile->init == NULL) {
// "Effects have already been loaded, but the constructor is NULL so the addition will not occur.
// Please fix this. (Waste of memory) %08x %d"
PRINTF("EffectSoftSprite2_makeEffect():すでにエフェクトはロード済みで\nすが,"
"コンストラクターがNULLなので追加をやめます。\n直してください。(メモリーの無駄) %08x %d\n",
initInfo, type);
profile, type);
return;
}
@ -240,7 +240,7 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) {
sEffectSsInfo.table[index].type = type;
sEffectSsInfo.table[index].priority = priority;
if (initInfo->init(play, index, &sEffectSsInfo.table[index], initParams) == 0) {
if (profile->init(play, index, &sEffectSsInfo.table[index], initParams) == 0) {
PRINTF(VT_FGCOL(GREEN));
// "Construction failed for some reason. The constructor returned an error.
// Ceasing effect addition."