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
@@ -45,7 +45,7 @@ void sub_0806CF30(Entity* this) {
switch (this->subAction) {
case 0:
case 1:
if (gScreenTransition.frameCount % 4 == 0) {
if (gRoomTransition.frameCount % 4 == 0) {
if (gPlayerEntity.x.HALF.HI < this->x.HALF.HI && this->field_0x68.HWORD - 32 < this->x.HALF.HI) {
this->x.HALF.HI--;
}
@@ -257,7 +257,7 @@ void sub_0806D41C(Entity* this) {
ExecuteScriptForEntity(this, NULL);
HandleEntity0x82Actions(this);
}
if ((gScreenTransition.frameCount & 1) == 0) {
if ((gRoomTransition.frameCount & 1) == 0) {
if (CheckPlayerProximity(this->x.HALF.HI - 0x20, this->y.HALF.HI, 0x40, 0x40) != 0) {
if (this->spriteOffsetY > -8) {
this->spriteOffsetY -= 1;
+2 -2
View File
@@ -51,7 +51,7 @@ void sub_08068A1C(Entity* this) {
int offset;
this->type2 = this->type;
if (gScreenTransition.player_status.field_0x24[8] != 0) {
if (gRoomTransition.player_status.field_0x24[8] != 0) {
offset = 6;
bVar1 = 3;
@@ -103,7 +103,7 @@ void sub_08068AA4(Entity* this) {
}
void sub_08068ADC(Entity* this) {
if (gScreenTransition.player_status.field_0x24[8] == 2) {
if (gRoomTransition.player_status.field_0x24[8] == 2) {
GetNextFrame(this);
}
sub_0806FD3C(this);
+1 -1
View File
@@ -25,7 +25,7 @@ void CastorWildsStatue(Entity* this) {
}
void sub_080673C0(Entity* this) {
if (gScreenTransition.player_status.field_0x24[8] != 0) {
if (gRoomTransition.player_status.field_0x24[8] != 0) {
this->action = 3;
} else {
this->action = 1;
+2 -2
View File
@@ -93,8 +93,8 @@ void sub_0806BEFC() {
void sub_0806BF44(Entity* this, ScriptExecutionContext* context) {
context->condition = 0;
if (((this->x.HALF.HI - gRoomControls.roomScrollX) + 0x10U < 0x110) &&
((this->y.HALF.HI - gRoomControls.roomScrollY) + 0x18U < 0xD0)) {
if (((this->x.HALF.HI - gRoomControls.scroll_x) + 0x10U < 0x110) &&
((this->y.HALF.HI - gRoomControls.scroll_y) + 0x18U < 0xD0)) {
context->condition = 1;
}
}
+2 -2
View File
@@ -25,7 +25,7 @@ void GoronMerchant(Entity* this) {
}
void sub_08069584(Entity* this) {
if (gScreenTransition.player_status.field_0x24[8] != 0) {
if (gRoomTransition.player_status.field_0x24[8] != 0) {
this->action = 3;
} else {
this->action = 1;
@@ -59,7 +59,7 @@ void sub_080695E8(Entity* this) {
}
void sub_0806961C(Entity* this) {
if (gScreenTransition.player_status.field_0x24[8] == 2) {
if (gRoomTransition.player_status.field_0x24[8] == 2) {
UpdateAnimationSingleFrame(this);
}
sub_0806FD3C(this);
+1 -1
View File
@@ -202,7 +202,7 @@ void sub_08064030(Entity* arg0, Entity* arg1) {
}
void sub_08064044(void) {
gScreenTransition.transitioningOut = 1;
gRoomTransition.transitioningOut = 1;
}
void sub_08064050(Entity* this, ScriptExecutionContext* context) {
+2 -2
View File
@@ -236,8 +236,8 @@ NONMATCH("asm/non_matching/kid/sub_080626E0.inc", void sub_080626E0(Entity* this
context->unk_19 = 10;
context->postScriptActions |= 2;
sVar1 = *(s16*)&context->intVariable;
context->x.HALF.HI = *((u16*)&context->intVariable + 2) + gRoomControls.roomOriginX;
context->y.HALF.HI = gRoomControls.roomOriginY + sVar1;
context->x.HALF.HI = *((u16*)&context->intVariable + 2) + gRoomControls.origin_x;
context->y.HALF.HI = gRoomControls.origin_y + sVar1;
}
bVar2 = context->unk_19 - 1;
context->unk_19 = bVar2;
+1 -1
View File
@@ -86,7 +86,7 @@ void sub_0806643C(Entity* this) {
bool32 tmp = sub_0806650C(this);
if (tmp == FALSE) {
this->action = 5;
gRoomControls.cameraTarget = NULL;
gRoomControls.camera_target = NULL;
sub_08078AC0(0x40, 0, 0);
gPlayerEntity.animationState = 0;
gPlayerEntity.direction = 0;
+2 -2
View File
@@ -203,8 +203,8 @@ void sub_0806DCA0() {
}
void sub_0806DCC0() {
gScreenTransition.player_status.overworld_map_x = 0x7c8;
gScreenTransition.player_status.overworld_map_y = 0xf8;
gRoomTransition.player_status.overworld_map_x = 0x7c8;
gRoomTransition.player_status.overworld_map_y = 0xf8;
}
void NPC4E_Fusion(Entity* this) {
+4 -4
View File
@@ -118,13 +118,13 @@ void sub_08060A00(Entity* this) {
((UnkHeap*)this->myHeap)->unk_1 = gPlayerEntity.x.HALF.HI;
((UnkHeap*)this->myHeap)->unk_2 = gPlayerEntity.y.HALF.HI;
}
if (this->field_0x74.HWORD != gRoomControls.roomID) {
this->field_0x74.HWORD = gRoomControls.roomID;
if (this->field_0x74.HWORD != gRoomControls.room) {
this->field_0x74.HWORD = gRoomControls.room;
CopyPosition(&gPlayerEntity, this);
this->action = 1;
this->spriteSettings.draw = 1;
this->speed = 0x120;
tmp = gRoomControls.unk_10;
tmp = gRoomControls.scroll_direction;
this->animationState = tmp * 2;
InitAnimationForceUpdate(this, tmp << 0x19 >> 0x19); // TODO some conversion between u8 and u32?
this->frameDuration = (Random() & 0x7f) + 0x80;
@@ -880,7 +880,7 @@ void sub_08061B58(Entity* this) {
this->action = 1;
InitAnimationForceUpdate(this, 2);
}
if (gScreenTransition.player_status.field_0x24[8] == 2) {
if (gRoomTransition.player_status.field_0x24[8] == 2) {
UpdateAnimationSingleFrame(this);
}
sub_0806FD3C(this);
+1 -1
View File
@@ -1,7 +1,7 @@
#include "entity.h"
#include "script.h"
#include "functions.h"
#include "fileScreen.h"
#include "fileselect.h"
#include "screen.h"
extern void sub_08057044(u32, struct_020227E8*, u32);
+5 -5
View File
@@ -39,7 +39,7 @@ void sub_0806DF00(Entity* this) {
npc->parent = this;
this->field_0x74.HWORD = 0;
this->field_0x76.HWORD = 10;
gScreenTransition.field_0x6 = 10;
gRoomTransition.field_0x6 = 10;
sub_0806E014(this);
sub_0807DD50(this);
} else {
@@ -109,17 +109,17 @@ void sub_0806E1FC(Entity* this) {
}
void sub_0806E20C(void) {
if (gScreenTransition.field_0x6 != 0) {
if (gRoomTransition.field_0x6 != 0) {
MessageFromTarget(0x421f);
gMessage.field_0x10 = gScreenTransition.field_0x6;
gMessage.field_0x10 = gRoomTransition.field_0x6;
} else {
MessageFromTarget(0x4220);
}
}
void sub_0806E23C(void) {
if (gScreenTransition.field_0x6 != 0) {
ModRupees(gScreenTransition.field_0x6);
if (gRoomTransition.field_0x6 != 0) {
ModRupees(gRoomTransition.field_0x6);
}
}
+2 -2
View File
@@ -181,8 +181,8 @@ void sub_080606D8(Entity* this) {
void sub_08060700(Entity* entity, ScriptExecutionContext* context) {
s8* var0 = gUnk_0810A918[(s8)entity->field_0x68.HALF.LO];
Coords16* coords = &gUnk_0810A66C[var0[(s8)entity->field_0x68.HALF.HI]];
u32 x = coords->x + gRoomControls.roomOriginX;
u32 y = coords->y + gRoomControls.roomOriginY;
u32 x = coords->x + gRoomControls.origin_x;
u32 y = coords->y + gRoomControls.origin_y;
sub_0807DEDC(entity, context, x, y);
gActiveScriptInfo.flags |= 1;
}
+3 -3
View File
@@ -291,7 +291,7 @@ void sub_0806AA18(Entity* this) {
u32 index;
if (this->field_0x6a.HWORD != 0) {
index = 0x4408;
} else if ((gScreenTransition.frameCount & 1U) == 0) {
} else if ((gRoomTransition.frameCount & 1U) == 0) {
index = 0x4407;
} else {
index = 0x440d;
@@ -303,8 +303,8 @@ ASM_FUNC("asm/non_matching/rem/sub_0806AA50.inc", void sub_0806AA50(Entity* this
void sub_0806AB74(Entity* this) {
gRoomVars.field_0x3 = 1;
if ((s32)(this->y.HALF.HI - (u32)gRoomControls.roomOriginY) < 0xa8) {
this->y.HALF.HI = gRoomControls.roomOriginY + 0xa8;
if ((s32)(this->y.HALF.HI - (u32)gRoomControls.origin_y) < 0xa8) {
this->y.HALF.HI = gRoomControls.origin_y + 0xa8;
}
}
+2 -2
View File
@@ -27,7 +27,7 @@ void Simon(Entity* this) {
void sub_0806C224(void) {
DoExitTransition(&gUnk_0813AD60);
gScreenTransition.transitionType = TRANSITION_FADE_BLACK_FAST;
gRoomTransition.type = TRANSITION_FADE_BLACK_FAST;
}
void Simon_CreateChest(Entity* this) {
@@ -39,7 +39,7 @@ void Simon_CreateChest(Entity* this) {
void sub_0806C280(void) {
SetGlobalFlag(MAROYA_WAKEUP);
DoExitTransition(&gUnk_0813AD74);
gScreenTransition.transitionType = TRANSITION_FADE_BLACK_FAST;
gRoomTransition.type = TRANSITION_FADE_BLACK_FAST;
}
void sub_0806C2A0(Entity* this, ScriptExecutionContext* context) {
+1 -1
View File
@@ -83,7 +83,7 @@ void Sturgeon_Head(Entity* this) {
}
void sub_08064C9C(Entity* this) {
if ((this->actionDelay != 0) && ((gScreenTransition.frameCount & 3U) == 0)) {
if ((this->actionDelay != 0) && ((gRoomTransition.frameCount & 3U) == 0)) {
CreateDust(this);
}
}
+1 -1
View File
@@ -32,7 +32,7 @@ void sub_0806A1F8(Entity* this) {
void sub_0806A234(Entity* this) {
sub_0807DD94(this, 0);
if ((this->field_0x82.HWORD & 4) != 0) {
if ((gScreenTransition.frameCount & 7) == 0) {
if ((gRoomTransition.frameCount & 7) == 0) {
sub_0806A26C(this);
}
sub_080042BA(this, 2);
+1 -1
View File
@@ -34,7 +34,7 @@ void VaatiAction0(Entity* this) {
void VaatiAction1(Entity* this) {
ScriptExecutionContext* tmp;
sub_0807DD94(this, sub_08066B74);
if ((*(s8*)&this->field_0x68.HALF.HI != 0) && ((gScreenTransition.frameCount & 3) == 0)) {
if ((*(s8*)&this->field_0x68.HALF.HI != 0) && ((gRoomTransition.frameCount & 3) == 0)) {
sub_08095CB0(this);
}
+3 -3
View File
@@ -66,7 +66,7 @@ void sub_08066D4C(Entity* this, ScriptExecutionContext* context) {
}
void sub_08066D94(Entity* this) {
u32 roomID;
u32 room;
Entity* npc;
SetGlobalFlag(ZELDA_CHASE);
@@ -75,8 +75,8 @@ void sub_08066D94(Entity* this) {
npc->animationState = gPlayerEntity.animationState;
npc->flags |= 0x20;
npc->animationState = GetAnimationState(this);
roomID = gRoomControls.roomID;
npc->field_0x74.HWORD = roomID;
room = gRoomControls.room;
npc->field_0x74.HWORD = room;
CopyPosition(this, npc);
}
DeleteThisEntity();