Rename objects

This commit is contained in:
octorock
2022-07-23 12:43:43 +02:00
parent ccba86d292
commit 852effa474
671 changed files with 5779 additions and 5277 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ void AngryStatueManager_Init(AngryStatueManager* this) {
object->parent = (Entity*)this;
ResolveCollisionLayer(object);
this->field_0x20[counter] = object;
counter += 1;
counter++;
objectData += 3;
}
super->action = 1;
+1 -1
View File
@@ -45,7 +45,7 @@ void CameraTargetManager_Action1(CameraTargetManager* this) {
super->timer = 30;
}
super->parent = gRoomControls.camera_target;
object = CreateObject(OBJECT_69, 0, 0);
object = CreateObject(CUTSCENE_ORCHESTRATOR, 0, 0);
if (object != NULL) {
object->x.HALF.HI = this->field_0x38 + gRoomControls.origin_x;
object->y.HALF.HI = this->field_0x3a + gRoomControls.origin_y;
+2 -2
View File
@@ -72,8 +72,8 @@ void GoronMerchantShopManager_Main(GoronMerchantShopManager* this) {
this->itemActive[count] = 1;
}
}
count += 1;
spawnData += 1;
count++;
spawnData++;
}
}
for (count = 0; count < 3; ++count) {
+2 -2
View File
@@ -87,14 +87,14 @@ void sub_0805B048(HoleManager* this) {
}
if (!tmp->unk_10)
return;
obj = CreateObject(OBJECT_28, tmp->unk_10->unk_00, tmp->unk_10->unk_01);
obj = CreateObject(PARALLAX_ROOM_VIEW, tmp->unk_10->unk_00, tmp->unk_10->unk_01);
if (obj) {
obj->x.HALF.HI = tmp->unk_10->unk_04 + gRoomControls.origin_x;
obj->y.HALF.HI = tmp->unk_10->unk_06 + gRoomControls.origin_y;
}
if (super->type != 0xa || CheckLocalFlag(0x4B))
return;
obj = CreateObject(OBJECT_28, 3, 3);
obj = CreateObject(PARALLAX_ROOM_VIEW, 3, 3);
if (obj) {
obj->x.HALF.HI = tmp->unk_10->unk_04 + gRoomControls.origin_x;
obj->y.HALF.HI = tmp->unk_10->unk_06 + gRoomControls.origin_y;
@@ -62,13 +62,13 @@ void sub_08057F20(HorizontalMinishPathBackgroundManager* this) {
}
}
void sub_08058004(u32 unk1, void* unk2, void* unk3) {
void sub_08058004(u32 unk1, void* src, void* dest) {
u32 tmp = 0x20;
unk2 += (unk1 >> 4) << 2;
src += (unk1 >> 4) << 2;
for (tmp; tmp != 0; tmp--) {
DmaSet(3, unk2, unk3, 0x80000020);
unk2 += 0x100;
unk3 += 0x40;
DmaCopy16(3, src, dest, 0x20 * 2);
src += 0x100;
dest += 0x40;
}
}
@@ -94,7 +94,7 @@ void sub_08058034(void) {
void sub_08058084(u16* unk1, u16* unk2) {
u32 tmp;
for (tmp = 0; tmp < 0x20; tmp++, unk1 += 0x20, unk2 += 0x80) {
DmaSet(3, unk1, unk2, 0x80000020);
DmaCopy16(3, unk1, unk2, 0x20 * 2);
}
}
+2 -2
View File
@@ -4,7 +4,7 @@
*
* @brief Keeps track in its bitfield of whether 0x10 x 0x10 rects at certain positions are on the screen.
*
* Spawns OBJECT_1C objects that check this and unsets the value in the bitfield.
* Spawns HOUSE_SIGN objects that check this and unsets the value in the bitfield.
* Creates the signs on the houses in hyrule town.
*/
#include "manager/houseSignManager.h"
@@ -57,7 +57,7 @@ void HouseSignManager_Main(HouseSignManager* this) {
u32 bitfieldFlag = 1 << type2;
if ((((this->bitfield & bitfieldFlag) == 0) &&
(CheckRectOnScreen(spawnData->x, spawnData->y, 0x10, 0x10) != 0))) {
Entity* object = CreateObject(OBJECT_1C, spawnData->type, type2);
Entity* object = CreateObject(HOUSE_SIGN, spawnData->type, type2);
if (object != NULL) {
object->frameIndex = spawnData->frameIndex;
object->x.HALF.HI = gRoomControls.origin_x + spawnData->x;
+1 -1
View File
@@ -24,7 +24,7 @@ void HyruleTownBellManager_Main(HyruleTownBellManager* this) {
}
} else {
if (--super->timer == 0) {
Entity* object = CreateObject(OBJECT_96, 1, 0);
Entity* object = CreateObject(GRAVEYARD_KEY, 1, 0);
if (object != NULL) {
object->x.HALF.HI = roomControls->origin_x + 0x1f8;
object->y.HALF.HI = roomControls->origin_y + 0x140;
+1 -1
View File
@@ -144,7 +144,7 @@ void sub_0805BE94(LightLevelSetManager* this) {
}
void sub_0805BEC4(LightLevelSetManager* this) {
Entity* object = CreateObject(OBJECT_2A, 1, 0);
Entity* object = CreateObject(FLAME, 1, 0);
if (object != NULL) {
*(s8*)(&object->flags + 1) = ((*(s8*)(&object->flags + 1)) & (-0x10)) | 3;
object->x.HALF.HI = this->field_0x38 + gRoomControls.origin_x;
+28 -26
View File
@@ -13,9 +13,9 @@
#include "main.h"
#include "screen.h"
extern void sub_08056250(void);
extern void DisableVBlankDMA(void);
void (*const gUnk_08107C5C[])(LightRayManager*);
void (*const LightRayManager_Actions[])(LightRayManager*);
void (*const gUnk_08107C48[])(LightRayManager*);
const u16 gUnk_08107C1C[];
const u16 gUnk_08107C30[];
@@ -35,22 +35,22 @@ typedef struct {
#define ZS(this) ((u8*)&this->speed)
void LightRayManager_Main(LightRayManager* this) {
u8 bVar1;
u8 gfxGroup;
u8* pbVar2;
gUnk_08107C5C[super->action](this);
LightRayManager_Actions[super->action](this);
gUnk_08107C48[this->unk_21](this);
bVar1 = gLightRayManagerGfxGroups[this->unk_21];
if ((bVar1 != 0) && (this->unk_20 != bVar1)) {
this->unk_20 = bVar1;
LoadGfxGroup(bVar1);
gfxGroup = gLightRayManagerGfxGroups[this->unk_21];
if ((gfxGroup != 0) && (this->gfxGroup != gfxGroup)) {
this->gfxGroup = gfxGroup;
LoadGfxGroup(gfxGroup);
}
}
static void sub_080570B8(LightRayManager* this) {
static void LightRayManager_EnterRoom(LightRayManager* this) {
u8* pbVar1;
LoadGfxGroup(this->unk_20);
LoadGfxGroup(this->gfxGroup);
this->unk_34 = NULL;
pbVar1 = &this->unk_21;
if (*pbVar1 == 3) {
@@ -60,15 +60,15 @@ static void sub_080570B8(LightRayManager* this) {
}
}
static void sub_080570F8(void) {
static void LightRayManager_ExitRoom(void) {
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
gScreen.controls.layerFXControl = 0;
sub_08056250();
DisableVBlankDMA();
}
void sub_08057118(LightRayManager* this) {
void LightRayManager_Init(LightRayManager* this) {
super->timer = 0;
this->unk_20 = 0;
this->gfxGroup = 0;
this->unk_21 = 0;
this->unk_22 = 0;
super->action = 1;
@@ -76,10 +76,10 @@ void sub_08057118(LightRayManager* this) {
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
gScreen.controls.layerFXControl = 0x3648;
gScreen.controls.alphaBlend = 0x1000;
RegisterTransitionManager(this, sub_080570B8, sub_080570F8);
RegisterTransitionManager(this, LightRayManager_EnterRoom, LightRayManager_ExitRoom);
}
void sub_08057174(LightRayManager* this) {
void LightRayManager_Action1(LightRayManager* this) {
LightRayManagerProp* prop = GetCurrentRoomProperty(super->type);
s32 temp;
s32 x;
@@ -114,7 +114,7 @@ void sub_08057174(LightRayManager* this) {
if (this->unk_21 == 0) {
super->action = 2;
super->timer = 0;
this->unk_20 = 0;
this->gfxGroup = 0;
}
break;
case 6:
@@ -149,7 +149,7 @@ void sub_08057174(LightRayManager* this) {
}
}
void sub_0805728C(LightRayManager* this) {
void LightRayManager_Action2(LightRayManager* this) {
if (--super->subtimer == 0) {
super->subtimer = 8;
gScreen.controls.alphaBlend = gUnk_08107C1C[super->timer++];
@@ -161,7 +161,7 @@ void sub_0805728C(LightRayManager* this) {
}
}
void sub_080572D4(LightRayManager* this) {
void LightRayManager_Action3(LightRayManager* this) {
if (--super->subtimer == 0) {
super->subtimer = 8;
gScreen.controls.alphaBlend = gUnk_08107C1C[super->timer--];
@@ -170,7 +170,7 @@ void sub_080572D4(LightRayManager* this) {
super->action = 1;
this->unk_22 = 0;
this->unk_21 = 0;
gScreen._6c = 0;
gScreen.vBlankDMA.ready = FALSE;
}
}
}
@@ -183,7 +183,9 @@ void sub_0805732C(u32 param_1, u32 param_2) {
*ptr = gSineTable[(param_2 + index) & 0xff] * param_1 / 0x100 + gScreen.bg3.xOffset;
}
sub_0805622C((struct BgAffineDstData*)&gUnk_02017AA0[gUnk_03003DE4[0] * 0x500], REG_ADDR_BG3HOFS, 0xa2600001UL);
SetVBlankDMA(&gUnk_02017AA0[gUnk_03003DE4[0] * 0x500], (u16*)REG_ADDR_BG3HOFS,
((DMA_ENABLE | DMA_START_HBLANK | DMA_16BIT | DMA_REPEAT | DMA_SRC_INC | DMA_DEST_RELOAD) << 16) +
0x1);
}
void nullsub_494() {
@@ -253,9 +255,9 @@ void (*const gUnk_08107C48[])(LightRayManager*) = {
nullsub_494, nullsub_494, sub_080573AC, nullsub_494, sub_08057450,
};
void (*const gUnk_08107C5C[])(LightRayManager*) = {
sub_08057118,
sub_08057174,
sub_0805728C,
sub_080572D4,
void (*const LightRayManager_Actions[])(LightRayManager*) = {
LightRayManager_Init,
LightRayManager_Action1,
LightRayManager_Action2,
LightRayManager_Action3,
};
+2 -2
View File
@@ -57,7 +57,7 @@ void sub_080582A0(u32 unk, u32* unk2, u16* unk3) {
int i = 0x20;
unk2 += unk >> 4;
for (; i != 0; i--) {
DmaSet(3, unk2, unk3, 0x80000020);
DmaCopy16(3, unk2, unk3, 0x20 * 2);
unk2 += 0x40;
unk3 += 0x20;
}
@@ -75,7 +75,7 @@ void sub_080582D0(void) {
void sub_080582F8(u8* unk, u8* unk2) {
u32 i;
for (i = 0; i < 0x20; i++, unk += 0x40, unk2 += 0x100) {
DmaSet(3, unk, unk2, 0x80000020);
DmaCopy16(3, unk, unk2, 0x20 * 2);
}
}
+1 -1
View File
@@ -47,7 +47,7 @@ void MinishSizedEntranceManager_Main(MinishSizedEntranceManager* this) {
} else {
this->field_0x20 &= ~(1 << count);
}
spawnData += 1;
spawnData++;
}
}
+1 -1
View File
@@ -185,7 +185,7 @@ void sub_08057E7C(u32 unk1) {
LoadPaletteGroup(gUnk_081081E4[unk1]);
tmp2 = &gUnk_081080A4[unk1 << 4];
for (tmp = 0; tmp < 8; tmp++, tmp2 += 2) {
DmaSet(3, &gGlobalGfxAndPalettes[tmp2[0]], tmp2[1], 0x84000400);
DmaCopy32(3, &gGlobalGfxAndPalettes[tmp2[0]], tmp2[1], 0x400 * 4);
}
gRoomVars.unk_10[0] = unk1;
}
+4 -4
View File
@@ -129,7 +129,7 @@ void sub_08058F44(u32 unk0, u32 unk1, u32 unk2) {
void sub_08058F84(u32 unk0, u32 unk1) {
Entity* tmp;
tmp = CreateObject(OBJECT_21, 0, 0);
tmp = CreateObject(DIRT_PARTICLE, 0, 0);
if (!tmp)
return;
tmp->x.HALF.HI = gRoomControls.origin_x + unk0;
@@ -363,12 +363,12 @@ void MiscManager_TypeB(MiscManager* this) {
}
}
u32 sub_080593CC(MiscManager* this) {
bool32 sub_080593CC(MiscManager* this) {
if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.swim_state != 0 && gPlayerEntity.animationState == 0 &&
(gPlayerState.field_0x90 & 0xF00) == 0x400) {
(gPlayerState.playerInput.field_0x90 & PLAYER_INPUT_ANY_DIRECTION) == PLAYER_INPUT_UP) {
return EntityWithinDistance(&gPlayerEntity, this->unk_38, this->unk_3a + 0xC, 6);
}
return 0;
return FALSE;
}
void MiscManager_TypeC(MiscManager* this) {
+3 -1
View File
@@ -44,7 +44,9 @@ void RollingBarrelManager_Main(RollingBarrelManager* this) {
u32 tmp;
RollingBarrelManager_Actions[super->action](this);
sub_08058BC8(this);
sub_0805622C(&gUnk_02017AA0[gUnk_03003DE4[0] * 0xA0], 0x04000020, 0xA2600008);
SetVBlankDMA((u16*)&gUnk_02017AA0[gUnk_03003DE4[0] * 0xA0], (u16*)REG_ADDR_BG2PA,
((DMA_ENABLE | DMA_START_HBLANK | DMA_16BIT | DMA_REPEAT | DMA_SRC_INC | DMA_DEST_RELOAD) << 16) +
0x8);
}
void RollingBarrelManager_Init(RollingBarrelManager* this) {
super->action = 1;
+6 -4
View File
@@ -137,7 +137,7 @@ void SteamOverlayManager_Action3(SteamOverlayManager* this) {
gScreen.controls.alphaBlend = gUnk_08108588[super->timer--];
if (super->timer == 0xFF) {
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
sub_08056250();
DisableVBlankDMA();
DeleteThisEntity();
}
}
@@ -165,7 +165,9 @@ void sub_0805A114(u32 unk0, u32 unk1) {
}
*p++ = gScreen.bg3.xOffset + ((gSineTable[(unk1 + tmp) & 0xFF] * unk0) >> 8);
}
sub_0805622C((struct BgAffineDstData*)&gUnk_02017AA0[gUnk_03003DE4[0] * 0x500], 0x0400001C, 0xA2600001);
SetVBlankDMA((u16*)&gUnk_02017AA0[gUnk_03003DE4[0] * 0x500], (u16*)REG_ADDR_BG3HOFS,
((DMA_ENABLE | DMA_START_HBLANK | DMA_16BIT | DMA_REPEAT | DMA_SRC_INC | DMA_DEST_RELOAD) << 16) +
0x1);
}
void sub_0805A1D8(SteamOverlayManager* this) {
@@ -175,7 +177,7 @@ void sub_0805A1D8(SteamOverlayManager* this) {
gScreen.bg3.yOffset = gRoomControls.bg3OffsetY.HALF.HI;
if (gScreen.lcd.displayControl & DISPCNT_BG3_ON) {
sub_0805A114(6, this->unk_20 >> 1);
if (this->unk_22 == 0 && (gMain.ticks.HWORD & 0x1F) == 0) {
if (this->unk_22 == 0 && (gMain.ticks & 0x1F) == 0) {
this->unk_24++;
this->unk_24 &= 3;
gScreen.controls.alphaBlend = gUnk_0810859A[this->unk_24];
@@ -189,5 +191,5 @@ void nullsub_495(void* this) {
void sub_0805A25C(void* this) {
gScreen.controls.layerFXControl = 0;
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
sub_08056250();
DisableVBlankDMA();
}
+3 -3
View File
@@ -191,7 +191,7 @@ void TempleOfDropletsManager_Type2_Action4(TempleOfDropletsManager* this) {
void sub_0805A4CC(TempleOfDropletsManager* this, u32 unk_0) {
Entity* tmp;
tmp = CreateObject(OBJECT_8E, unk_0, 0);
tmp = CreateObject(LIGHT_RAY, unk_0, 0);
if (tmp) {
tmp->x.HALF.HI = this->unk_38 + gRoomControls.origin_x;
tmp->y.HALF.HI = this->unk_3a + gRoomControls.origin_y - 0x30;
@@ -493,13 +493,13 @@ extern struct { u8 unk_00[0x20]; } gUnk_085A97A0[];
void sub_0805AA58(TempleOfDropletsManager* this) {
if (--super->timer == 0) {
super->timer = 8;
this->unk_21 += 1;
this->unk_21++;
this->unk_21 &= 3;
LoadPalettes(gUnk_085A97A0[this->unk_21].unk_00, 5, 1);
}
if (--super->subtimer == 0) {
super->subtimer = 16;
this->unk_22 += 1;
this->unk_22++;
this->unk_22 &= 0xF;
gScreen.controls.alphaBlend = gUnk_081085B8[this->unk_22];
}
+1 -1
View File
@@ -72,7 +72,7 @@ void Vaati3StartManager_Type0_Action1(Vaati3StartManager* this) {
super->timer = 120;
SetPlayerControl(2);
sub_08078B48();
object = CreateObject(OBJECT_64, 0, 0);
object = CreateObject(THUNDERBOLD, 0, 0);
if (object != NULL) {
object->x.HALF.HI = gRoomControls.origin_x + 0x88;
object->y.HALF.HI = gRoomControls.origin_y + 0x48;
+9 -8
View File
@@ -9,6 +9,7 @@
#include "common.h"
#include "functions.h"
#include "game.h"
#include "main.h"
#include "room.h"
#include "screen.h"
@@ -22,8 +23,6 @@ void sub_0805DA08(u32, u32, u32);
static const u8 gUnk_08108D74[] = { 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x0 };
extern struct BgAffineDstData gUnk_02017AA0[];
extern u8 gUnk_03003DE4[0xC];
extern void sub_0805622C(struct BgAffineDstData*, u32, u32);
void VaatiAppearingManager_Main(VaatiAppearingManager* this) {
static void (*const VaatiAppearingManager_Actions[])(VaatiAppearingManager*) = {
@@ -121,7 +120,7 @@ void VaatiAppearingManager_Action2(VaatiAppearingManager* this) {
}
break;
case 2:
this->field_0x20 += 1;
this->field_0x20++;
if (--super->timer != 0) {
return;
}
@@ -140,16 +139,16 @@ void VaatiAppearingManager_Action2(VaatiAppearingManager* this) {
void VaatiAppearingManager_Action3(VaatiAppearingManager* this) {
if ((gInput.heldKeys & 0x40) != 0) {
this->field_0x20 -= 1;
this->field_0x20--;
}
if ((gInput.heldKeys & 0x80) != 0) {
this->field_0x20 += 1;
this->field_0x20++;
}
if ((gInput.heldKeys & 0x20) != 0) {
this->field_0x28 -= 1;
this->field_0x28--;
}
if ((gInput.heldKeys & 0x10) != 0) {
this->field_0x28 += 1;
this->field_0x28++;
}
}
@@ -168,7 +167,9 @@ void sub_0805DA08(u32 x, u32 y, u32 param_3) {
affineDstData->pa = ((gSineTable[(param_3 + i + y) & 0xff] * x) >> 8) + gScreen.bg3.xOffset;
affineDstData = (struct BgAffineDstData*)&affineDstData->pb;
}
sub_0805622C(&gUnk_02017AA0[gUnk_03003DE4[0] * 0xa0], REG_ADDR_BG3HOFS, 0xa2600001);
SetVBlankDMA((u16*)&gUnk_02017AA0[gUnk_03003DE4[0] * 0xa0], (u16*)REG_ADDR_BG3HOFS,
((DMA_ENABLE | DMA_START_HBLANK | DMA_16BIT | DMA_REPEAT | DMA_SRC_INC | DMA_DEST_RELOAD) << 16) +
0x1);
}
void CreateVaatiApparateManager(VaatiAppearingManager* this, u32 type) {