naming work

This commit is contained in:
theo3
2022-01-03 23:58:02 -08:00
parent f26b2e286a
commit 52db70bb9d
212 changed files with 1762 additions and 1736 deletions
+2 -2
View File
@@ -17,8 +17,8 @@ void sub_0808F658(Entity* this) {
this->frameIndex = this->type;
this->direction = 8;
this->speed = gUnk_08121EB0[this->type];
this->field_0x78.HWORD = gRoomControls.roomOriginX - 0x60;
this->field_0x7a.HWORD = gRoomControls.roomOriginX + gRoomControls.width + 0x60;
this->field_0x78.HWORD = gRoomControls.origin_x - 0x60;
this->field_0x7a.HWORD = gRoomControls.origin_x + gRoomControls.width + 0x60;
this->animationState = 0;
this->x.HALF.HI += (Random() & 0xf) << 4;
this->actionDelay = 0;
+2 -2
View File
@@ -85,8 +85,8 @@ void sub_0809CDB4(Entity* this) {
void sub_0809CDF0(Entity* this) {
u32 y;
this->field_0x80.HWORD = (((this->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 0x3f) |
(((this->y.HALF.HI - gRoomControls.roomOriginY) >> 4 & 0x3f) << 6);
this->field_0x80.HWORD = (((this->x.HALF.HI - gRoomControls.origin_x) >> 4) & 0x3f) |
(((this->y.HALF.HI - gRoomControls.origin_y) >> 4 & 0x3f) << 6);
y = this->field_0x80.HWORD;
SetTile(0x402e, y - 0x01, this->collisionLayer);
+1 -1
View File
@@ -29,7 +29,7 @@ void sub_0809CF54(Entity* this) {
this->speed = 0x280;
this->direction = 8;
this->collisionLayer = 2;
this->x.HALF.HI = gRoomControls.roomScrollX;
this->x.HALF.HI = gRoomControls.scroll_x;
SoundReq(SFX_123);
UpdateSpriteForCollisionLayer(this);
InitAnimationForceUpdate(this, 0);
+1 -1
View File
@@ -54,7 +54,7 @@ void sub_0809B3C4(Entity* this) {
u32 scroll;
u32 height;
this->action = 3;
scroll = (u16)gRoomControls.roomScrollY - 0x10;
scroll = (u16)gRoomControls.scroll_y - 0x10;
height = (u16)this->y.HALF.HI - scroll;
this->z.HALF.HI -= height;
return;
+2 -2
View File
@@ -16,8 +16,8 @@ void sub_08081AE0(Entity* this) {
if (this->cutsceneBeh.HWORD != 0) {
this->collisionLayer = this->cutsceneBeh.HWORD;
}
this->field_0x74.HWORD = (((this->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 0x3F) |
((((this->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 0x3F) << 6);
this->field_0x74.HWORD = (((this->x.HALF.HI - gRoomControls.origin_x) >> 4) & 0x3F) |
((((this->y.HALF.HI - gRoomControls.origin_y) >> 4) & 0x3F) << 6);
this->field_0x70.HALF.HI = GetTileType(this->field_0x74.HWORD, this->collisionLayer);
if (this->type == 0 && CheckFlags(this->field_0x86.HWORD)) {
this->action = 5;
+10 -10
View File
@@ -30,7 +30,7 @@ void sub_0809F514(Entity* this) {
this->actionDelay = 120;
this->spriteSettings.draw = 0;
this->field_0x68.HALF.LO = 12;
gRoomControls.cameraTarget = this;
gRoomControls.camera_target = this;
gUnk_02034490[0] = 255;
sub_0809F7BC(this);
}
@@ -41,10 +41,10 @@ void sub_0809F548(Entity* this) {
this->action = 2;
this->actionDelay = 90;
SoundReq(SFX_11D);
sub_0809F814((((this->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 63) << 6);
sub_0809F814((((this->x.HALF.HI - gRoomControls.origin_x) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.origin_y) >> 4) & 63) << 6);
} else {
if ((gScreenTransition.frameCount & 7) == 0) {
if ((gRoomTransition.frameCount & 7) == 0) {
sub_0809F7BC(this);
}
sub_0809F7F4(this);
@@ -75,7 +75,7 @@ void sub_0809F5F0(Entity* this) {
this->actionDelay = 120;
SetPlayerControl(3);
sub_08078B48();
gRoomControls.cameraTarget = this;
gRoomControls.camera_target = this;
}
}
@@ -89,10 +89,10 @@ void sub_0809F61C(Entity* this) {
this->action = 3;
this->actionDelay = 120;
SoundReq(SFX_11D);
sub_0809F814((((this->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 63) << 6);
sub_0809F814((((this->x.HALF.HI - gRoomControls.origin_x) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.origin_y) >> 4) & 63) << 6);
} else {
if ((gScreenTransition.frameCount & 7) == 0) {
if ((gRoomTransition.frameCount & 7) == 0) {
sub_0809F7BC(this);
}
sub_0809F7F4(this);
@@ -105,7 +105,7 @@ void sub_0809F69C(Entity* this) {
if (--this->actionDelay == 0) {
this->actionDelay = 30;
this->action = 4;
gRoomControls.cameraTarget = &gPlayerEntity;
gRoomControls.camera_target = &gPlayerEntity;
SoundReq(SFX_SECRET_BIG);
}
}
@@ -127,7 +127,7 @@ void sub_0809F700(Entity* this) {
this->actionDelay = (Random() & 30) + 8;
this->flags = this->flags | 12;
}
if ((gScreenTransition.frameCount & 3) == 0) {
if ((gRoomTransition.frameCount & 3) == 0) {
uVar2 = Random();
this->spriteOffsetX = gUnk_081247C0[uVar2 & 7];
this->spriteOffsetY = gUnk_081247C0[uVar2 >> 4 & 7];
+6 -6
View File
@@ -1,7 +1,7 @@
#include "object.h"
#include "main.h"
#include "menu.h"
#include "fileScreen.h"
#include "fileselect.h"
#include "functions.h"
extern int sub_0807A094(int);
@@ -175,7 +175,7 @@ void sub_0808EA28(Entity* this) {
u32 var1;
if (this->type == 3) {
if (gSaveHeader->gameLanguage > LANGUAGE_EN) {
if (gSaveHeader->language > LANGUAGE_EN) {
this->spriteSettings.draw = 2;
} else {
this->spriteSettings.draw = 0;
@@ -294,7 +294,7 @@ void sub_0808EBB8(Entity* this) {
case 0:
break;
case 1:
y = ((struct_02000000*)0x2000000)->gameLanguage * 16 + 24;
y = ((SaveHeader*)0x2000000)->language * 16 + 24;
x = 112;
break;
case 2:
@@ -402,7 +402,7 @@ void sub_0808ED98(Entity* this) {
void sub_0808EE00(Entity* this) {
int var0, var1, var2;
var0 = ((struct_02000000*)0x2000000)->gameLanguage != 0;
var0 = ((SaveHeader*)0x2000000)->language != 0;
var1 = this->type - 10;
this->frameIndex = gUnk_08121D38[var0][var1];
this->x.HALF.HI = gUnk_08121D18[var0][var1];
@@ -452,9 +452,9 @@ void sub_0808EF24(Entity* this) {
} else {
this->spriteSettings.draw = 2;
if (this->type == 21) {
var0 = ((struct_02000000*)0x2000000)->messageSpeed;
var0 = ((SaveHeader*)0x2000000)->msg_speed;
} else {
var0 = ((struct_02000000*)0x2000000)->brightnessPref;
var0 = ((SaveHeader*)0x2000000)->brightness;
}
this->frameIndex = this->lastFrameIndex + var0;
}
+2 -2
View File
@@ -22,8 +22,8 @@ void sub_0808D618(Entity* ent) {
u32 i;
arr = (ent->type != 0) ? gUnk_0812176A : gUnk_08121750;
tilePos = (((ent->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 0x3F) |
((((ent->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 0x3F) * 64);
tilePos = (((ent->x.HALF.HI - gRoomControls.origin_x) >> 4) & 0x3F) |
((((ent->y.HALF.HI - gRoomControls.origin_y) >> 4) & 0x3F) * 64);
for (i = 0; i < 13; i++) {
SetTile(16500, tilePos + arr[i], 1);
+4 -4
View File
@@ -52,12 +52,12 @@ void GreatFairy(Entity* this) {
void GreatFairy_CallBehavior(Entity* this) {
GreatFairy_Behaviors[this->action](this);
if ((gPlayerEntity.y.HALF.HI - gRoomControls.roomOriginY) < 168) {
if ((gPlayerEntity.y.HALF.HI - gRoomControls.origin_y) < 168) {
gRoomControls.cameraTarget = this;
gRoomControls.camera_target = this;
gRoomControls.unk5 = 2;
} else {
gRoomControls.cameraTarget = &gPlayerEntity;
gRoomControls.camera_target = &gPlayerEntity;
gRoomControls.unk5 = 2;
}
}
@@ -515,7 +515,7 @@ void sub_080873FC(void) {
Entity* ent;
SoundReq(SFX_APPARATE);
gRoomControls.cameraTarget = NULL;
gRoomControls.camera_target = NULL;
while (ent = FindEntityByID(0x6, 0x1b, 0x6), ent != NULL) {
DeleteEntity(ent);
+2 -2
View File
@@ -58,8 +58,8 @@ void sub_080866D8(Entity* this) {
entity = CreateObject(HOUSE_DOOR_EXT, prop->unk7, prop->unk6);
if (entity) {
entity->field_0x6c.HALF.LO = i;
entity->x.HALF.HI = gRoomControls.roomOriginX + prop->unk0 + 16;
entity->y.HALF.HI = gRoomControls.roomOriginY + prop->unk2 + 32;
entity->x.HALF.HI = gRoomControls.origin_x + prop->unk0 + 16;
entity->y.HALF.HI = gRoomControls.origin_y + prop->unk2 + 32;
entity->parent = this;
entity->field_0x68.HWORD = prop->unk0;
entity->field_0x6a.HWORD = prop->unk2;
+1 -1
View File
@@ -288,7 +288,7 @@ u32 sub_08083734(Entity* this, u32 unk0) {
u32 sub_080837B0(Entity* this) {
u32 tmp;
u32 tmp2 = gRoomControls.areaID;
u32 tmp2 = gRoomControls.area;
if (tmp2 < 0x40) {
switch (tmp2) {
default:
+1 -1
View File
@@ -20,7 +20,7 @@ void sub_080929A4(Entity* this) {
switch (this->type2 & 0xC0) {
case 0x40:
field_0x0a = gScreenTransition.stairs_idx;
field_0x0a = gRoomTransition.stairs_idx;
switch (field_0x0a) {
case 0x44D ... 0x44F:
+7 -7
View File
@@ -20,14 +20,14 @@ void Minecart(Entity* this) {
}
void sub_080916EC(Entity* this) {
struct_030010EC* unk = &gScreenTransition.minecart_data[this->actionDelay];
struct_030010EC* unk = &gRoomTransition.minecart_data[this->actionDelay];
*(struct_030010EC**)&this->cutsceneBeh.HWORD = unk;
if ((gRoomControls.roomID != unk->field_0x4) || (gPlayerState.flags & PL_IN_MINECART) != 0) {
if ((gRoomControls.room != unk->field_0x4) || (gPlayerState.flags & PL_IN_MINECART) != 0) {
DeleteThisEntity();
}
this->x.HALF.HI = gRoomControls.roomOriginX + ((unk->field_0x0 & 0x3f) << 4) + 8;
this->y.HALF.HI = gRoomControls.roomOriginY + ((unk->field_0x0 & 0xfc << 4) >> 2) + 8;
this->x.HALF.HI = gRoomControls.origin_x + ((unk->field_0x0 & 0x3f) << 4) + 8;
this->y.HALF.HI = gRoomControls.origin_y + ((unk->field_0x0 & 0xfc << 4) >> 2) + 8;
this->animationState = unk->field_0x5;
this->type2 = unk->field_0x6;
this->action = 1;
@@ -91,7 +91,7 @@ void sub_080918A4(Entity* this) {
gPlayerState.flags = (gPlayerState.flags ^ PL_ENTER_MINECART) | PL_IN_MINECART;
this->action++;
this->field_0xf = 1;
this->flags |= ENT_20;
this->flags |= ENT_PERSIST;
this->hitType = 0x97;
this->field_0x3c = (gPlayerEntity.field_0x3c + 1) | 0x20;
this->flags2 = gPlayerEntity.flags2;
@@ -134,7 +134,7 @@ void sub_080919AC(Entity* this) {
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1;
if (!sub_08091DDC(this)) {
if ((gScreenTransition.frameCount & 0xf) == 0) {
if ((gRoomTransition.frameCount & 0xf) == 0) {
SoundReq(SFX_138);
}
@@ -152,7 +152,7 @@ void sub_080919AC(Entity* this) {
} else {
switch (uVar3) {
case 0x64:
this->flags &= ~ENT_20;
this->flags &= ~ENT_PERSIST;
this->hitType = 1;
this->field_0x3c = 0x47;
this->hurtType = 0x44;
+1 -1
View File
@@ -212,7 +212,7 @@ void sub_0808F498(Entity* this) {
if (this->action != 0) {
if (sub_0806F3E4(this)) {
if (gScreenTransition.frameCount % 16 == 0) {
if (gRoomTransition.frameCount % 16 == 0) {
SoundReq(SFX_EF);
}
DeleteThisEntity();
+12 -12
View File
@@ -249,8 +249,8 @@ void sub_08094C88(Object6AEntity* this) {
void sub_08094CDC(Object6AEntity* this) {
Entity* e = CreateObject(0x6a, 3, 0x62);
if (e != NULL) {
e->x.HALF.HI = gRoomControls.roomOriginX + 224;
e->y.HALF.HI = gRoomControls.roomOriginY + 600;
e->x.HALF.HI = gRoomControls.origin_x + 224;
e->y.HALF.HI = gRoomControls.origin_y + 600;
SoundReq(324);
}
}
@@ -265,8 +265,8 @@ void sub_08094D10(Object6AEntity* this) {
void sub_08094D34(Object6AEntity* this) {
Entity* e = CreateObject(0x6a, 0x15, 0xd);
if (e != NULL) {
e->x.HALF.HI = gRoomControls.roomOriginX + 256;
e->y.HALF.HI = gRoomControls.roomOriginY + 600;
e->x.HALF.HI = gRoomControls.origin_x + 256;
e->y.HALF.HI = gRoomControls.origin_y + 600;
SoundReq(324);
}
}
@@ -298,8 +298,8 @@ void sub_08094D94(Object6AEntity* this) {
void sub_08094DD8(Object6AEntity* this) {
Entity* e = CreateObject(0x6a, 0x4, 0);
if (e != NULL) {
e->x.HALF.HI = gRoomControls.roomOriginX + 240;
e->y.HALF.HI = gRoomControls.roomOriginY + 600;
e->x.HALF.HI = gRoomControls.origin_x + 240;
e->y.HALF.HI = gRoomControls.origin_y + 600;
SoundReq(324);
}
}
@@ -313,11 +313,11 @@ void sub_08094E0C(Object6AEntity* this) {
void sub_08094E30(Object6AEntity* this) {
if (super->type2 == 0) {
if ((gScreenTransition.frameCount % 32) == 0) {
if ((gRoomTransition.frameCount % 32) == 0) {
Entity* e = CreateObject(0x6A, 5, 1);
if (e != NULL) {
e->x.HALF.HI = gRoomControls.roomScrollX + (s32)Random() % DISPLAY_WIDTH;
e->y.HALF.HI = gRoomControls.roomScrollY + (s32)Random() % DISPLAY_HEIGHT;
e->x.HALF.HI = gRoomControls.scroll_x + (s32)Random() % DISPLAY_WIDTH;
e->y.HALF.HI = gRoomControls.scroll_y + (s32)Random() % DISPLAY_HEIGHT;
}
}
return;
@@ -738,7 +738,7 @@ void sub_080956B4(Object6AEntity* this) {
}
}
GetNextFrame(super);
if ((super->type2 + gScreenTransition.frameCount) % 16 == 0)
if ((super->type2 + gRoomTransition.frameCount) % 16 == 0)
sub_080957B4(this);
p = super->parent;
if (p != NULL) {
@@ -893,8 +893,8 @@ void sub_080959CC(Object6AEntity* this) {
void sub_08095A1C(Object6AEntity* this, ScriptExecutionContext* ctx) {
Entity* e = CreateObject(OBJECT_6A, 0x16, 0);
if (e != NULL) {
e->x.HALF.HI = gRoomControls.roomOriginX + 232;
e->y.HALF.HI = gRoomControls.roomOriginY + 312;
e->x.HALF.HI = gRoomControls.origin_x + 232;
e->y.HALF.HI = gRoomControls.origin_y + 312;
e->z.HALF.HI = -4;
e->collisionLayer = 2;
((Object6AEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
+1 -1
View File
@@ -24,7 +24,7 @@ void ObjectA(Entity* this) {
this->field_0x70.HALF.LO = uVar2;
if (CheckFlags(this->field_0x86.HWORD) != 0) {
SetTileType(*(u16*)&this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
if ((gRoomControls.unk2 & 1) != 0) {
if ((gRoomControls.reload_flags & 1) != 0) {
gUpdateVisibleTiles = 0;
}
DeleteThisEntity();
+1 -1
View File
@@ -42,7 +42,7 @@ void sub_0809F318(Entity* this) {
void sub_0809F374(Entity* this) {
LinearMoveUpdate(this);
#ifndef EU
if (gSaveHeader->gameLanguage < 2) {
if (gSaveHeader->language < 2) {
if (sub_080044EC(this, 0x2000) < 2) {
this->z.WORD = 0;
this->action = 2;
+1 -1
View File
@@ -8,7 +8,7 @@ void ObjectB5(Entity* this) {
this->action = 1;
}
#ifndef EU
gRoomControls.cameraTarget = this;
gRoomControls.camera_target = this;
#endif
PositionRelative(&gPlayerEntity, this, 0, -0x280000);
}
+3 -3
View File
@@ -127,8 +127,8 @@ void OctorokBossObject_Init(Entity* this) {
this->type2 = this->parent->field_0x7c.BYTES.byte0;
this->actionDelay = 4;
this->field_0xf = 0;
this->field_0x82.HWORD = (this->x.HALF.HI - (gRoomControls.roomOriginX)) & 0x1f0;
this->field_0x80.HWORD = (this->y.HALF.HI - ((u32)gRoomControls.roomOriginY)) & 0x1f0;
this->field_0x82.HWORD = (this->x.HALF.HI - (gRoomControls.origin_x)) & 0x1f0;
this->field_0x80.HWORD = (this->y.HALF.HI - ((u32)gRoomControls.origin_y)) & 0x1f0;
*(int*)&this->cutsceneBeh =
((s32)(this->field_0x82.HWORD - 0x10) >> 4) + (this->field_0x80.HWORD >> 4) * 0x1f;
sub_0809A6F8(this->field_0x82.HWORD, this->field_0x80.HWORD, *(int*)&this->cutsceneBeh, this->type2);
@@ -304,7 +304,7 @@ NONMATCH("asm/non_matching/octorokBossObject/OctorokBossObject_Action1.inc",
case 9:
sub_08078B48();
if ((*(int*)&this->field_0x78)-- == 0) {
gRoomControls.cameraTarget = &gPlayerEntity;
gRoomControls.camera_target = &gPlayerEntity;
DeleteThisEntity();
}
break;
+1 -1
View File
@@ -35,7 +35,7 @@ void sub_0809E86C(Entity* this) {
if (sub_0800419C(this, &gPlayerEntity, 0x30, 0x30)) {
if (CheckGlobalFlag(EZERO_1ST)) {
if (((gScreenTransition.frameCount & 3) == 0)) {
if (((gRoomTransition.frameCount & 3) == 0)) {
CreateSparkle(this);
}
}
+10 -10
View File
@@ -144,17 +144,17 @@ void sub_0808B5E8(Entity* this) {
void sub_0808B684(Entity* this) {
u32 tmp;
if (!--this->field_0xf) {
gScreenTransition.transitioningOut = 1;
gScreenTransition.transitionType = TRANSITION_DEFAULT;
gScreenTransition.player_status.area_next = this->field_0x7c.BYTES.byte0;
gScreenTransition.player_status.room_next = this->field_0x7c.BYTES.byte1;
gScreenTransition.player_status.start_pos_x = ((this->cutsceneBeh.HWORD & 0x3f) << 4) + 8;
gScreenTransition.player_status.start_pos_y = ((this->cutsceneBeh.HWORD & 0xfc0) >> 2) + 8;
gScreenTransition.player_status.layer = 0;
gScreenTransition.player_status.start_anim = 4;
gScreenTransition.player_status.spawn_type = 0;
gRoomTransition.transitioningOut = 1;
gRoomTransition.type = TRANSITION_DEFAULT;
gRoomTransition.player_status.area_next = this->field_0x7c.BYTES.byte0;
gRoomTransition.player_status.room_next = this->field_0x7c.BYTES.byte1;
gRoomTransition.player_status.start_pos_x = ((this->cutsceneBeh.HWORD & 0x3f) << 4) + 8;
gRoomTransition.player_status.start_pos_y = ((this->cutsceneBeh.HWORD & 0xfc0) >> 2) + 8;
gRoomTransition.player_status.layer = 0;
gRoomTransition.player_status.start_anim = 4;
gRoomTransition.player_status.spawn_type = 0;
if (this->type == 2) {
gScreenTransition.transitionType = TRANSITION_FADE_WHITE_SLOW;
gRoomTransition.type = TRANSITION_FADE_WHITE_SLOW;
}
return;
}