entity changes, textbox changes

This commit is contained in:
theo3
2021-11-04 20:56:03 -07:00
parent 9ef31544e2
commit 9cfbb3a27a
321 changed files with 1765 additions and 1716 deletions
+16 -16
View File
@@ -129,16 +129,16 @@ void PrepNextFrame(void) {
void PlayerUpdate(Entity* this) {
if (gSave.stats.effect != 0)
gPlayerState.flags.all |= 0x4000;
gPlayerState.flags |= 0x4000;
else
gPlayerState.flags.all &= ~0x4000;
gPlayerState.flags &= ~0x4000;
if (sub_0805E3B0(this) == 0) {
if ((gPlayerState.flags.all & 0x80000) != 0) {
if ((gPlayerState.flags & 0x80000) != 0) {
sub_08077B20();
if ((gPlayerState.flags.all & 0x200000) != 0) {
if ((gPlayerState.flags & 0x200000) != 0) {
gPlayerState.playerAction = 0x18;
gPlayerState.flags.all &= ~0x80000;
gPlayerState.flags &= ~0x80000;
gPlayerState.hurtBlinkSpeed = 0xf0;
this->flags |= 0x80;
} else {
@@ -171,10 +171,10 @@ void HandlePlayerLife(Entity* this) {
if ((gPlayerEntity.bitfield & 0x80) && (gPlayerEntity.iframes > 0))
SoundReq(SFX_86);
gPlayerState.flags.all &= ~(0x2000000 | 0x200);
if (gPlayerState.flags.all & 0x400)
gPlayerState.flags &= ~(0x2000000 | 0x200);
if (gPlayerState.flags & 0x400)
ResetPlayer();
if ((gPlayerState.flags.all & 0x400000) && !gPlayerState.field_0xa0[0])
if ((gPlayerState.flags & 0x400000) && !gPlayerState.field_0xa0[0])
sub_0807A108();
if (sub_08079B24() == 0)
sub_08079708(this);
@@ -190,10 +190,10 @@ void HandlePlayerLife(Entity* this) {
return;
}
if ((gPlayerState.field_0x8b != 0) || (gTextBox.doTextBox & 0x7f))
if ((gPlayerState.field_0x8b != 0) || (gMessage.doTextBox & 0x7f))
return;
gRoomVars.unk2 = gTextBox.doTextBox & 0x7f;
gRoomVars.unk2 = gMessage.doTextBox & 0x7f;
temp = gSave.stats.maxHealth / 4;
if (temp > 24)
temp = 24;
@@ -243,12 +243,12 @@ void sub_080171F0(void) {
gPlayerEntity.bitfield &= ~0x80;
if (gPlayerEntity.action != 0x14)
gPlayerState.flags.all = (gPlayerState.flags.all & ~0x10000) | (0x10000 * (gPlayerState.flags.all & 2) / 2);
gPlayerState.flags = (gPlayerState.flags & ~0x10000) | (0x10000 * (gPlayerState.flags & 2) / 2);
gPlayerState.flags.all &= ~2;
gPlayerState.flags &= ~2;
sub_080028E0(&gPlayerEntity);
if (gPlayerState.flags.all & 0x400000)
if (gPlayerState.flags & 0x400000)
gUnk_0200AF00.filler25[10] = 1;
sub_08078180();
@@ -263,13 +263,13 @@ void sub_080171F0(void) {
gPlayerState.field_0x3f = 0;
sub_0807B0C8();
if (gPlayerState.flags.all & 0x400000)
if (gPlayerState.flags & 0x400000)
gUnk_03004040[0]->spriteOffsetY = gUnk_03004040[1]->spriteOffsetY = gUnk_03004040[2]->spriteOffsetY = 0;
if (gPlayerEntity.action == 0x1d)
gPlayerState.flags.all |= 0x20000000;
gPlayerState.flags |= 0x20000000;
else
gPlayerState.flags.all &= ~0x20000000;
gPlayerState.flags &= ~0x20000000;
sub_0807A8D8(&gPlayerEntity);
if (gPlayerState.jumpStatus & 0xc0)
+1 -1
View File
@@ -255,7 +255,7 @@ u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) {
} else if (arg0->id == 0x1e) {
itemEntity->direction = arg0->animationState << 3 | 0x80;
itemEntity->speed = 0xc0;
itemEntity->field_0x20 = 0x18000;
itementity->hVelocity = 0x18000;
}
}
CopyPosition(arg0, itemEntity);
+1 -1
View File
@@ -141,7 +141,7 @@ void sub_0805F918(u32 idx, u32 idx2, void* dest) {
u32 sub_0805F9A0(u32 r0) {
if (gUnk_02000000->gameLanguage == 0) {
if (gSaveHeader->gameLanguage == 0) {
u16* val = &gUnk_081092D4;
u32 i = 0;
+3 -3
View File
@@ -27,7 +27,7 @@ void sub_0805FA04(void) {
MessageInitialize();
MemClear((void*)&gUnk_02032EC0, sizeof(UI));
MemClear((void*)&gMenu, sizeof(Menu));
gMenu.unk16 = gUnk_02000000->gameLanguage;
gMenu.unk16 = gSaveHeader->gameLanguage;
sub_08053320();
sub_0801D79C(0, 0x1144);
gMain.funcIndex = 1;
@@ -56,8 +56,8 @@ void sub_0805FA98(void) {
}
break;
case 0x100:
gUnk_02000000->gameLanguage = gMenu.unk16;
TextboxNoOverlapFollow(gMenu.unk14 * 0x100 + gMenu.unk15);
gSaveHeader->gameLanguage = gMenu.unk16;
MessageFromTarget(gMenu.unk14 * 0x100 + gMenu.unk15);
break;
case 0x2:
MessageInitialize();
+5 -5
View File
@@ -323,7 +323,7 @@ void sub_08031E90(Entity* this) {
void sub_08031EA8(Entity* this) {
this->action = 1;
this->spritePriority.b1 = 1;
this->field_0x20 = 0x40000;
this->hVelocity = 0x40000;
this->height.HALF.HI = (4 - this->type2) * 0xe;
this->field_0x78.HALF.HI = Random();
InitializeAnimation(this, 4);
@@ -332,8 +332,8 @@ void sub_08031EA8(Entity* this) {
void sub_08031EE8(Entity* this) {
int draw;
this->height.WORD -= this->field_0x20;
this->field_0x20 -= 0x1800;
this->height.WORD -= this->hVelocity;
this->hVelocity -= 0x1800;
if (this->height.HALF.HI < 1) {
draw = this->spriteSettings.b.draw;
@@ -347,7 +347,7 @@ void sub_08031EE8(Entity* this) {
if (draw == 1)
GetNextFrame(this);
if (this->field_0x20 < 1) {
if (this->hVelocity < 1) {
this->action = 2;
this->flags |= 0x80;
InitializeAnimation(this, 5);
@@ -450,7 +450,7 @@ void sub_08032160(Entity* this) {
this->spriteSettings.b.flipX = 0;
}
this->speed = 0xf0;
this->field_0x20 = 0x12000;
this->hVelocity = 0x12000;
this->spritePriority.b1 = 1;
InitializeAnimation(this, 12);
}
+5 -5
View File
@@ -105,7 +105,7 @@ void sub_080218CC(Entity* this) {
this->spriteSettings.b.draw = 1;
this->direction = ((sub_08049F84(this, 1) ^ 0x10) + gUnk_080CB5DC[Random() & 7]) & 0x1f;
this->speed = 0x100;
this->field_0x20 = 0x12000;
this->hVelocity = 0x12000;
}
GetNextFrame(this);
@@ -216,7 +216,7 @@ void sub_08021AD8(Entity* this) {
}
void sub_08021B64(Entity* this) {
if (gPlayerState.flags.all & 4) {
if (gPlayerState.flags & 4) {
this->action = 3;
this->height.WORD = 0;
InitializeAnimation(this, 2);
@@ -233,12 +233,12 @@ void sub_08021B64(Entity* this) {
this->actionDelay = (u8)iVar4;
}
if (gPlayerState.flags.all & 0x110)
if (gPlayerState.flags & 0x110)
iVar4 = 0;
if (iVar4 == 0) {
this->action = 6;
this->field_0x20 = 0x10000;
this->hVelocity = 0x10000;
((u8*)&this->field_0x86)[1] = 0;
if (gPlayerEntity.direction != 0xff) {
this->direction = 0x10 ^ gPlayerEntity.direction;
@@ -299,7 +299,7 @@ u32 sub_08021D00(Entity* this) {
} else {
this->action = 4;
this->actionDelay = 1;
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
InitializeAnimation(this, 4);
ret = 1;
}
+3 -3
View File
@@ -54,7 +54,7 @@ void sub_0802C688(Entity* this) {
this->action = 3;
this->damageType = 0x6e;
this->field_0xf = 1;
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
this->speed = 0;
this->field_0x80.HALF.HI = 1;
InitializeAnimation(this, this->direction >> 4 | 6);
@@ -72,7 +72,7 @@ void sub_0802C7AC(Entity* this) {
if (this->field_0x82.HALF.LO != 2) {
this->speed = this->field_0x82.HALF.LO ? 0x200 : 0x80;
}
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
} else {
@@ -225,7 +225,7 @@ void sub_0802CA94(Entity* this) {
this->flags &= ~0x80;
this->field_0xf = 1;
this->spritePriority.b1 = 1;
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
this->speed = 0;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
+1 -1
View File
@@ -381,7 +381,7 @@ void sub_0802ADDC(Entity* this) {
void sub_0802AE24(Entity* this) {
this->action = 1;
this->actionDelay = 0xf0;
this->field_0x20 = 0x8000;
this->hVelocity = 0x8000;
this->hitbox = (Hitbox*)&gUnk_080CD174;
this->field_0x3c = 3;
this->field_0x16 = 0;
+8 -8
View File
@@ -246,11 +246,11 @@ void sub_08028CE8(Entity* this) {
struct SalesOffering* offer = (struct SalesOffering*)this->field_0x7c.WORD;
u32 subtype;
if ((gTextBox.doTextBox & 0x7f) == 0 && sub_0802915C(this) && !sub_08056338()) {
if ((gMessage.doTextBox & 0x7f) == 0 && sub_0802915C(this) && !sub_08056338()) {
if (offer->price <= gSave.stats.rupees) {
if (sub_080291DC(this)) {
/* Bag full. */
TextboxNoOverlapFollow(0x2904);
MessageFromTarget(0x2904);
sub_08078A90(0);
} else {
ModRupees(-offer->price);
@@ -285,7 +285,7 @@ void sub_08028CE8(Entity* this) {
}
} else {
/* Not enough money. */
TextboxNoOverlapFollow(0x2903);
MessageFromTarget(0x2903);
sub_08078A90(0);
}
}
@@ -303,7 +303,7 @@ void sub_08028DE8(Entity* this) {
this->field_0x80.HALF.HI = 1;
}
} else {
TextboxNoOverlapFollow(0x2902);
MessageFromTarget(0x2902);
this->action = 4;
this->field_0x80.HALF.HI = 0;
this->actionDelay = 1;
@@ -315,11 +315,11 @@ void sub_08028DE8(Entity* this) {
}
void sub_08028E40(Entity* this) {
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
struct SalesOffering* offer = (struct SalesOffering*)this->field_0x7c.WORD;
this->action = 4;
this->subAction = gTextBox.doTextBox & 0x7f;
this->subAction = gMessage.doTextBox & 0x7f;
this->actionDelay = 1;
if (CheckLocalFlag(offer->field_0xa) == 0) {
SetLocalFlag(offer->field_0xa);
@@ -383,8 +383,8 @@ void sub_08028F0C(Entity* this) {
dialog = offer->field_0x4;
sub_08078A90(1);
}
TextboxNoOverlapFollow(dialog);
gTextBox.field_0x10 = offer->price;
MessageFromTarget(dialog);
gMessage.field_0x10 = offer->price;
}
}
+3 -3
View File
@@ -117,7 +117,7 @@ void sub_0801EF40(Entity* this) {
}
} else {
sub_0804AA1C(this);
this->field_0x20 = 0;
this->hVelocity = 0;
InitializeAnimation(this, 9);
}
this->field_0x80.HALF.LO = this->currentHealth;
@@ -698,7 +698,7 @@ void sub_0801FB68(Entity* this) {
break;
}
this->field_0x20 = 0;
this->hVelocity = 0;
}
u32 sub_0801FBD0(Entity* this) {
@@ -711,7 +711,7 @@ u32 sub_0801FBD0(Entity* this) {
void Chuchu_JumpAtPlayer(Entity* this) {
this->speed = 0x180;
this->field_0x20 = 0x20000;
this->hVelocity = 0x20000;
this->direction = sub_08049F84(this, 1);
InitializeAnimation(this, 3);
}
+3 -3
View File
@@ -49,7 +49,7 @@ void sub_08022988(Entity* this) {
return;
this->frameIndex = 1;
this->field_0x20 = 0x10000;
this->hVelocity = 0x10000;
EnqueueSFX(0xd6);
}
@@ -75,7 +75,7 @@ void sub_080229F8(Entity* this) {
this->speed = 0xc0;
sub_08022B44(this);
} else {
this->field_0x20 = 0x10000;
this->hVelocity = 0x10000;
EnqueueSFX(0xd6);
}
}
@@ -138,7 +138,7 @@ u32 sub_08022B20(Entity* this) {
}
void sub_08022B44(Entity* this) {
this->field_0x20 = 0xc000;
this->hVelocity = 0xc000;
this->direction = GetFacingDirection(this, &gPlayerEntity);
if (this->direction & 0xf)
+2 -2
View File
@@ -32,7 +32,7 @@ void sub_0802C254(Entity* this) {
void sub_0802C258(Entity* this) {
sub_0804A720(this);
this->field_0x20 = 0x20000;
this->hVelocity = 0x20000;
this->actionDelay = 2;
this->field_0x7a.HWORD = Random() & 0x70;
switch (this->type) {
@@ -190,7 +190,7 @@ void sub_0802C4B0(Entity* this) {
}
rand = Random() & 7;
this->field_0x20 = 0x20000;
this->hVelocity = 0x20000;
if (rand & 4) {
if (rand & 3) {
*(u32*)&this->cutsceneBeh = gUnk_080CD58C[offset | 1];
+1 -1
View File
@@ -101,7 +101,7 @@ u32 sub_0804A024(Entity*, u32, u32);
void sub_08045524(Entity* this) {
u32 tmp, tmp1, tmp2;
this->field_0x20 = 0x1c000;
this->hVelocity = 0x1c000;
tmp = sub_0804A024(this, 1, 8);
if (tmp != 0xff && (Random() & 3) == 0) {
this->actionDelay = Random() & 3;
+1 -1
View File
@@ -350,7 +350,7 @@ void sub_08037A58(Entity* this) {
}
void sub_08037ACC(Entity* this) {
gPlayerState.flags.all &= 0xFFFFFEFF;
gPlayerState.flags &= 0xFFFFFEFF;
gPlayerEntity.flags |= 0x80;
gPlayerEntity.iframes = 0x1e;
gPlayerEntity.knockbackDirection = DirectionFromAnimationState(this->animationState);
+2 -2
View File
@@ -89,7 +89,7 @@ void sub_0802BCA8(Entity* this) {
this->action = 7;
this->actionDelay = 0x5a;
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
this->damageType = 0x19;
this->field_0x3a = this->field_0x3a & 0xfb;
this->field_0x1c = 0x12;
@@ -369,7 +369,7 @@ void sub_0802C1CC(Entity* this) {
void sub_0802C218(Entity* this) {
this->action = 6;
this->speed = 0xe0;
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
}
// clang-format off
+2 -2
View File
@@ -57,7 +57,7 @@ void Lakitu_DoAction(Entity* this) {
void sub_0803C784(Entity* this) {
if ((this->bitfield & 0x7f) == 0x1d) {
this->field_0x20 = 0x20000;
this->hVelocity = 0x20000;
sub_0803CBAC(this);
} else {
@@ -353,7 +353,7 @@ void sub_0803CC08(Entity* this) {
return;
}
if (this->field_0x20 >= 0) {
if (this->hVelocity >= 0) {
return;
}
+5 -5
View File
@@ -207,9 +207,9 @@ void sub_0802805C(Entity* this) {
NONMATCH("asm/non_matching/likeLike/sub_0802810C.inc", void sub_0802810C(Entity* this)) {
gPlayerState.jumpStatus = 0x41;
gPlayerState.field_0xa = 0;
gPlayerState.flags.all &= 0xffffffef;
gPlayerState.flags &= 0xffffffef;
gPlayerEntity.flags |= 0x80;
gPlayerEntity.field_0x20 = 0x18000;
gPlayerEntity.hVelocity = 0x18000;
gPlayerEntity.iframes = -60;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
gPlayerEntity.spritePriority.b1 = this->field_0x82.HALF.HI;
@@ -229,10 +229,10 @@ void sub_080281A0(Entity* this) {
this->field_0xf = 0x19;
if (sub_080281E0(0xe)) {
this->field_0x80.HALF.LO = 0xe;
TextboxNoOverlapFollow(0x578);
MessageFromTarget(0x578);
} else if (sub_080281E0(0xd)) {
this->field_0x80.HALF.LO = 0xd;
TextboxNoOverlapFollow(0x578);
MessageFromTarget(0x578);
} else {
ModHealth(-1);
}
@@ -262,7 +262,7 @@ void sub_08028224(u32 param_1) {
#else
sub_080A7C18(param_1, 0, 1);
#endif
TextboxNoOverlapFollow(0x579);
MessageFromTarget(0x579);
}
void (*const gUnk_080CC6FC[])(Entity*) = {
+5 -5
View File
@@ -916,7 +916,7 @@ void sub_0803B100(Entity* this) {
Entity* temp;
this->action = 0x29;
this->field_0x20 = 0x14000;
this->hVelocity = 0x14000;
if (this->type == 0) {
this->hitbox = &gUnk_080FD364;
} else {
@@ -982,7 +982,7 @@ void sub_0803B1B8(Entity* this) {
if ((temp->field_0x80.HALF.LO & 0xc) == 0xc) {
temp->action = 0xb;
temp->actionDelay = 0x78;
temp->field_0x20 = 0;
temp->hVelocity = 0;
(*(Entity**)&temp->field_0x74)->field_0x7c.HALF_U.HI = 0x708;
(*(Entity**)&temp->field_0x78)->field_0x7c.HALF_U.HI = 0x708;
}
@@ -1227,9 +1227,9 @@ void sub_0803B724(Entity* param_1) {
void sub_0803B798(void) {
gPlayerState.jumpStatus = 0x41;
gPlayerState.field_0xa = 0;
gPlayerState.flags.all &= 0xffef;
gPlayerState.flags &= 0xffef;
gPlayerEntity.flags |= 0x80;
gPlayerEntity.field_0x20 = 0x18000;
gPlayerEntity.hVelocity = 0x18000;
gPlayerEntity.height.HALF.HI = -10;
gPlayerEntity.direction = 0x10;
gPlayerEntity.animationState = 4;
@@ -1257,7 +1257,7 @@ u32 sub_0803B870(Entity* this) {
Entity* entity;
entity = this->attachedEntity;
if ((entity->bitfield & 0x80) != 0 && (gPlayerState.flags.all & 0x10) != 0) {
if ((entity->bitfield & 0x80) != 0 && (gPlayerState.flags & 0x10) != 0) {
this->action = 0x18;
this->actionDelay = 0x44;
this->spriteSettings.b.draw = 0;
+1 -1
View File
@@ -816,7 +816,7 @@ void sub_08034BC8(Entity* this) {
}
void sub_08034C00(Entity* this) {
if (((gPlayerState.flags.all & 0x80) != 0) &&
if (((gPlayerState.flags & 0x80) != 0) &&
CheckPlayerInRegion(this->x.HALF.HI - gRoomControls.roomOriginX,
this->y.HALF.HI - gRoomControls.roomOriginY + 0xd, 3, 3) != 0) {
if (gScreenTransition.field_0x39 >= 0x3d) {
+1 -1
View File
@@ -53,7 +53,7 @@ void sub_08045654(Entity* this) {
void sub_08045678(Entity* this) {
this->field_0x20 = 0x1c000;
this->hVelocity = 0x1c000;
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
+4 -4
View File
@@ -84,11 +84,11 @@ void sub_080230E4(Entity* this) {
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.flags = gPlayerEntity.flags | 0x80;
gPlayerEntity.spriteSettings.b.draw = 1;
gPlayerEntity.field_0x20 = 0x18000;
gPlayerEntity.hVelocity = 0x18000;
gPlayerEntity.direction = 0xff;
gPlayerEntity.iframes = -0x14;
gPlayerState.jumpStatus = 0x41;
gPlayerState.flags.all &= 0xfff7ffff;
gPlayerState.flags &= 0xfff7ffff;
}
sub_0804AA30(this, gUnk_080CBC38);
@@ -266,7 +266,7 @@ void sub_0802351C(Entity* this) {
if (this->field_0x7c.BYTES.byte3 == 0) {
if (this->type2 == 0) {
gPlayerEntity.animationState = this->animationState & 7;
gPlayerState.flags.all |= 0x80000;
gPlayerState.flags |= 0x80000;
PositionRelative(this, &gPlayerEntity, 0, gUnk_080CBC90[this->animationState & 7] << 0x10);
gPlayerEntity.spriteOffsetY = -gUnk_080CBC90[this->animationState & 7];
}
@@ -401,7 +401,7 @@ void sub_08023894(Entity* this) {
this->parent->field_0x7c.BYTES.byte3 = 1;
InitializeAnimation(this, this->animationState);
if (this->parent->type2 == 0) {
gPlayerState.flags.all |= 0x200000;
gPlayerState.flags |= 0x200000;
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
gPlayerEntity.y.HALF.HI = this->y.HALF.HI;
gPlayerEntity.direction = DirectionRoundUp(GetFacingDirection(*(Entity**)&this->field_0x74, this));
+2 -2
View File
@@ -260,7 +260,7 @@ void Peahat_RepairPropeller(Entity* this) {
return;
this->action = 9;
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
this->direction = Random() & 0x1f;
sub_0804AA1C(this);
this->animationState = PeahatAnimation_RepairPropeller;
@@ -286,7 +286,7 @@ void Peahat_Hop(Entity* this) {
if (--this->actionDelay == 0) {
if (this->frames.all & 0x80) {
this->action = 9;
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
this->animationState = PeahatAnimation_NewPropeller;
InitializeAnimation(this, this->animationState);
} else {
+3 -3
View File
@@ -395,7 +395,7 @@ void sub_080244E8(Entity* this) {
sub_080249DC(this);
this->cutsceneBeh.HALF.HI = gPlayerEntity.spritePriority.b1;
gPlayerEntity.flags &= 0x7f;
gPlayerState.flags.all |= 0x100;
gPlayerState.flags |= 0x100;
gPlayerState.field_0xa |= 0x80;
if (gPlayerState.swimState != 0) {
gPlayerState.swimState = 0;
@@ -809,7 +809,7 @@ NONMATCH("asm/non_matching/pesto/sub_08024E4C.inc", void sub_08024E4C(Entity* th
Entity* player = &gPlayerEntity;
ResetPlayer();
gPlayerState.flags.all |= 0x100;
gPlayerState.flags |= 0x100;
gPlayerState.field_0xa |= 0x80;
gPlayerState.playerAction = 0xe;
gPlayerState.field_0x38 = 0x14;
@@ -832,7 +832,7 @@ END_NONMATCH
void sub_08024F50(Entity* this) {
gPlayerState.field_0xa = 0;
gPlayerState.flags.all &= 0xfffffeff;
gPlayerState.flags &= 0xfffffeff;
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.action = 1;
gPlayerEntity.flags |= 0x80;
+5 -5
View File
@@ -72,8 +72,8 @@ void sub_08025020(Entity* this) {
}
this->action = 7;
this->actionDelay = 0x3c;
if (0 < this->field_0x20) {
this->field_0x20 = 0;
if (0 < this->hVelocity) {
this->hVelocity = 0;
}
this->iframes = -0xc;
this->knockbackDuration = 0;
@@ -200,7 +200,7 @@ void sub_080252E0(Entity* this) {
this->action = 3;
this->actionDelay = 0x1e;
this->field_0xf = 0;
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
InitializeAnimation(this, 1);
}
}
@@ -213,7 +213,7 @@ void sub_0802538C(Entity* this) {
GetNextFrame(this);
} else {
sub_08003FC4(this, 0x2000);
if (this->field_0x20 < 0x2000) {
if (this->hVelocity < 0x2000) {
this->action = 4;
InitializeAnimation(this, 2);
}
@@ -242,7 +242,7 @@ void sub_0802541C(Entity* this) {
if (this->frames.all & 0x80) {
this->action = 3;
this->field_0xf = 1;
this->field_0x20 = 0x20000;
this->hVelocity = 0x20000;
InitializeAnimation(this, 1);
}
}
+3 -3
View File
@@ -32,7 +32,7 @@ void Rollobite_OnTick(Entity* this) {
void sub_08020668(Entity* this) {
if (this->damageType == 34 && this->currentHealth != 0xff) {
this->action = 4;
this->field_0x20 = 0x20000;
this->hVelocity = 0x20000;
this->direction = 0xff;
this->currentHealth = 0xff;
this->damageType = 35;
@@ -102,7 +102,7 @@ void sub_080207A8(Entity* this) {
this->spritePriority.b0 = 4;
this->field_0x3a &= 0xfb;
this->direction ^= 0x10;
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
this->speed = 0x80;
InitializeAnimation(this, this->animationState + 0x10);
}
@@ -262,7 +262,7 @@ bool32 Rollobite_TryToHoleUp(Entity* this) {
this->x.HALF.HI += 8;
this->y.HALF.HI &= 0xfff0;
this->y.HALF.HI += 13;
this->field_0x20 = 0x20000;
this->hVelocity = 0x20000;
InitializeAnimation(this, this->animationState + 0x14);
SetTile(0x4034, tile, this->collisionLayer);
return TRUE;
+2 -2
View File
@@ -231,9 +231,9 @@ void sub_080296C8(Entity* this) {
void sub_080296D8(Entity* this) {
gPlayerState.jumpStatus = 0x41;
gPlayerState.flags.all &= 0xffffffef;
gPlayerState.flags &= 0xffffffef;
gPlayerEntity.flags |= 0x80;
gPlayerEntity.field_0x20 = 0x18000;
gPlayerEntity.hVelocity = 0x18000;
gPlayerEntity.iframes = 0xa6;
gPlayerEntity.height.HALF.HI = -2;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
+2 -2
View File
@@ -49,7 +49,7 @@ void sub_0802B628(Entity* this) {
case 0x1d:
if (this->action < 6) {
this->action = 6;
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
this->speed = 0xc0;
this->direction = this->knockbackDirection;
this->knockbackDuration = 0;
@@ -166,7 +166,7 @@ void sub_0802B8E0(Entity* this) {
}
} else {
this->action = 8;
this->field_0x20 = 0x10000;
this->hVelocity = 0x10000;
this->speed = 0x60;
this->damageType = 99;
InitializeAnimation(this, this->animationState);
+1 -1
View File
@@ -159,7 +159,7 @@ void sub_080226EC(Entity* this) {
if (sub_080228F0(this)) {
this->action = 6;
this->field_0x20 = 0x12000;
this->hVelocity = 0x12000;
this->speed = 0x140;
this->direction = GetFacingDirection(this, gUnk_020000B0);
this->damageType = 0x5a;
+4 -4
View File
@@ -39,9 +39,9 @@ void sub_0802F150(Entity* this) {
this->field_0xf = 0;
*(u8*)&this->field_0x7c = 0;
if (this->height.HALF.HI != 0) {
this->field_0x20 >>= 2;
this->hVelocity >>= 2;
} else {
this->field_0x20 = 0;
this->hVelocity = 0;
}
InitializeAnimation(this, 0);
break;
@@ -95,7 +95,7 @@ void sub_0802F284(Entity* this) {
this->action = 2;
this->actionDelay = 0x10;
this->field_0xf = this->type;
this->field_0x20 = this->field_0x82.HWORD << 4;
this->hVelocity = this->field_0x82.HWORD << 4;
sub_0802F45C(this);
InitializeAnimation(this, 2);
}
@@ -166,7 +166,7 @@ void sub_0802F3F4(Entity* this) {
this->action = 2;
this->actionDelay = 0x10;
this->field_0xf = this->type;
this->field_0x20 = this->field_0x82.HWORD << 4;
this->hVelocity = this->field_0x82.HWORD << 4;
(*(u8*)&this->field_0x7c.HALF.LO)++;
sub_0802F45C(this);
InitializeAnimation(this, 2);
+4 -4
View File
@@ -33,9 +33,9 @@ void sub_08037F00(Entity* this) {
this->field_0xf = 0;
this->field_0x80.HALF.LO = 0;
if (this->height.HALF.HI != 0) {
this->field_0x20 >>= 2;
this->hVelocity >>= 2;
} else {
this->field_0x20 = 0;
this->hVelocity = 0;
}
InitializeAnimation(this, 0);
@@ -86,7 +86,7 @@ void sub_08037Fe0(Entity* this) {
this->action = 2;
this->actionDelay = 6;
this->field_0xf = 0;
this->field_0x20 = 0x38000;
this->hVelocity = 0x38000;
sub_08038168(this);
InitializeAnimation(this, 2);
}
@@ -142,7 +142,7 @@ void sub_08038110(Entity* this) {
if (this->field_0x80.HALF.LO < 5) {
this->action = 2;
this->actionDelay = 8;
this->field_0x20 = 0x38000;
this->hVelocity = 0x38000;
sub_08038168(this);
InitializeAnimation(this, 2);
} else {
+3 -3
View File
@@ -952,7 +952,7 @@ NONMATCH("asm/non_matching/vaati/sub_08043490.inc", void sub_08043490(Entity* th
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
if (entity->height.HALF.HI < -4) {
entity->field_0x20 = 0x18000;
entity->hVelocity = 0x18000;
this->subAction = 2;
this->field_0x7c.BYTES.byte2 = 0;
((VaatiArm_HeapStruct*)this->myHeap)->parent->subAction = 2;
@@ -979,7 +979,7 @@ void sub_08043520(Entity* this) {
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
sub_08003FC4(entity, 0x1a00);
if ((entity->field_0x20 < 0) && (-6 < entity->height.HALF.HI)) {
if ((entity->hVelocity < 0) && (-6 < entity->height.HALF.HI)) {
entity->height.HALF.HI = -6;
this->subAction = 3;
this->field_0x7a.HWORD = 900;
@@ -1352,7 +1352,7 @@ void sub_08043DB0(Entity* this) {
Entity* pEVar3;
Entity* pEVar4;
if (((gPlayerState.flags.all & 0x80) != 0)) {
if (((gPlayerState.flags & 0x80) != 0)) {
pEVar3 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
if (CheckPlayerInRegion(pEVar3->x.HALF.HI - gRoomControls.roomOriginX,
pEVar3->y.HALF.HI - gRoomControls.roomOriginY + 2, 3, 3)) {
+1 -1
View File
@@ -74,7 +74,7 @@ void VaatiProjectileFunction1(Entity* this) {
entity->flags = entity->flags & 0x7f;
}
} else {
gPlayerState.flags.all &= 0xfffffeff; // using b.unk8 does not match
gPlayerState.flags &= 0xfffffeff; // using b.unk8 does not match
entity = &gPlayerEntity;
entity->flags = gPlayerEntity.flags | 0x80;
}
+3 -3
View File
@@ -313,7 +313,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
if (this->actionDelay != 0) {
if (--this->actionDelay == 0) {
this->flags &= 0x7f;
this->field_0x20 = 0x38000;
this->hVelocity = 0x38000;
this->field_0xf = 0x10;
}
break;
@@ -379,7 +379,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
this->field_0x74.HALF.LO = 0;
this->actionDelay = 0x80;
this->field_0xf = 0;
this->field_0x20 = 0x24000;
this->hVelocity = 0x24000;
SoundReq(SFX_12B);
}
break;
@@ -1061,7 +1061,7 @@ void sub_080409B0(Entity* this) {
this->field_0x80.HALF.HI = 3;
this->flags &= 0x7f;
this->damageType = 0x36;
this->field_0x20 = 0x18000;
this->hVelocity = 0x18000;
SoundReq(SFX_164);
}
}
+2 -2
View File
@@ -93,8 +93,8 @@ void VaatiTransfiguredEyeFunction0Action0(Entity* this) {
Entity* child;
u8 bVar2;
bVar2 = gTextBox.doTextBox & 0x7f;
if ((gTextBox.doTextBox & 0x7f) == 0) {
bVar2 = gMessage.doTextBox & 0x7f;
if ((gMessage.doTextBox & 0x7f) == 0) {
this->action = 1;
this->spriteSettings.b.draw = 0;
this->field_0x80.HALF.LO = bVar2;
+3 -3
View File
@@ -456,7 +456,7 @@ void VaatiWrathType0ActionA(Entity* this) {
this->subAction = 0;
this->direction = 0;
this->speed = 0x100;
this->field_0x20 = 0x12000;
this->hVelocity = 0x12000;
sub_0801D2B4(this, 0x16b);
InitAnimationForceUpdate(this, 5);
type1 = ((VaatiWrathHeapStruct*)this->myHeap)->type1;
@@ -626,7 +626,7 @@ void sub_08041CD0(Entity* this) {
} else {
this->subAction = 2;
this->actionDelay = 0x3c;
TextboxNoOverlapFollow(0x1651);
MessageFromTarget(0x1651);
}
} else {
UpdateAnimationSingleFrame(this);
@@ -637,7 +637,7 @@ void sub_08041D14(Entity* this) {
Entity* pEVar1;
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
+1 -1
View File
@@ -118,7 +118,7 @@ void sub_0802CE68(Entity* this) {
gPlayerState.field_0xa |= 0x80;
gPlayerState.field_0x1a[0] |= 0x80;
gPlayerState.flags.all |= 0x100;
gPlayerState.flags |= 0x100;
if (!sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 4)) {
this->direction = GetFacingDirection(this, &gPlayerEntity);
sub_0806F69C(this);
+1 -1
View File
@@ -22,7 +22,7 @@ void sub_0802A250(Entity* this) {
this->action = 1;
this->actionDelay = 0;
this->field_0x20 = -0x30000;
this->hVelocity = -0x30000;
this->speed = gUnk_080CD03C[Random() & 3];
this->direction = gUnk_080CD040[Random() & 3] + 0x18;
this->collisionLayer = 2;
+1 -1
View File
@@ -37,7 +37,7 @@ void sub_08033564(Entity* this) {
this->spriteSettings.b.draw = FALSE;
this->flags &= 0x7f;
this->field_0x7c.HALF.LO = 0x27c;
gPlayerState.flags.all |= 0x4000;
gPlayerState.flags |= 0x4000;
gSave.stats.effect = this->type + 1;
gSave.stats.effectTimer = 600;
if (this->type == 0) {
+1 -1
View File
@@ -66,7 +66,7 @@ void sub_0801CF18(Element* arg0) {
void sub_0801CF60(Element* arg0) {
if ((gUnk_0200AF00.ezloNagFuncIndex >= 5) || (gTextBox.doTextBox & 0x7f)) {
if ((gUnk_0200AF00.ezloNagFuncIndex >= 5) || (gMessage.doTextBox & 0x7f)) {
arg0->unk4 = 0;
arg0->unk0 &= -3;
return;
+21 -21
View File
@@ -113,7 +113,7 @@ void CreateDialogBox(u32 arg0, u32 arg1) {
}
void sub_08050384(void) {
sub_0801C4A0(0, 0);
RecoverUI(0, 0);
MemClear(&gBG0Buffer, sizeof(gBG0Buffer));
gScreen.bg.bg0Updated = 1;
}
@@ -144,14 +144,14 @@ void LoadOptionsFromSave(u32 idx) {
brightnessPref = saveFile->brightnessPref;
}
gUnk_02000000->messageSpeed = messageSpeed;
gUnk_02000000->brightnessPref = brightnessPref;
gSaveHeader->messageSpeed = messageSpeed;
gSaveHeader->brightnessPref = brightnessPref;
gUsedPalettes = 0xFFFFFFFF;
}
void SetActiveSave(u32 idx) {
if (idx < NUM_SAVE_SLOTS) {
gUnk_02000000->saveFileId = idx;
gSaveHeader->saveFileId = idx;
MemCopy(&gUnk_02019EE0.saves[idx], &gSave, sizeof(gUnk_02019EE0.saves[idx]));
}
LoadOptionsFromSave(idx);
@@ -181,8 +181,8 @@ void HandleChooseFileScreen(void) {
sub_0801C208();
sub_080AD9B0();
sub_080AD918();
if (gUnk_02019EE0.unk3 != gUnk_02000000->gameLanguage) {
gUnk_02019EE0.unk3 = gUnk_02000000->gameLanguage;
if (gUnk_02019EE0.unk3 != gSaveHeader->gameLanguage) {
gUnk_02019EE0.unk3 = gSaveHeader->gameLanguage;
sub_080503A8(0x6);
sub_080503A8(0xF);
}
@@ -202,7 +202,7 @@ static void HandleFileScreenEnter(void) {
MemClear(&gUnk_0200AF00, sizeof(gUnk_0200AF00));
MemClear(&gUnk_02019EE0, sizeof(gUnk_02019EE0));
gUnk_02019EE0.unk3 = 7;
gUnk_02019EE0.unk6 = gUnk_02000000->gameLanguage > LANGUAGE_EN ? 3 : 0;
gUnk_02019EE0.unk6 = gSaveHeader->gameLanguage > LANGUAGE_EN ? 3 : 0;
MemClear(&gUnk_02032EC0, sizeof(gUnk_02032EC0));
gUnk_02032EC0.lastState = 8;
SetFileSelectState(STATE_NONE);
@@ -297,7 +297,7 @@ void sub_0805070C(void) {
var0->bgColor = 5;
var0->unk1 = 1;
var0->unk4 = 0x30;
var0->unk8 = gUnk_02000D00;
var0->unk8 = gTextGfxBuffer;
for (i = 0; i < NUM_SAVE_SLOTS; i++) {
var0->unk6 = 0;
MemClear(var0->unk8, 0x200);
@@ -323,7 +323,7 @@ void sub_08050790(void) {
var0->bgColor = 5;
var0->unk1 = 1;
var0->unk4 = 0x80;
var0->unk8 = gUnk_02000D00;
var0->unk8 = gTextGfxBuffer;
for (i = 0; i < 16; i++) {
var0->unk6 = 0;
var1 = i * 16;
@@ -331,7 +331,7 @@ void sub_08050790(void) {
sub_0805F7DC(var1, var0);
var1++;
}
MemCopy(gUnk_02000D00, (void*)(BG_VRAM + i * 0x400), 0x400);
MemCopy(gTextGfxBuffer, (void*)(BG_VRAM + i * 0x400), 0x400);
}
sub_0805F300(var0);
}
@@ -420,7 +420,7 @@ void sub_08050940(void) {
keys &= ~(DPAD_UP | DPAD_DOWN);
}
num_rows = gUnk_02000000->gameLanguage > 1 ? NUM_SAVE_SLOTS + 1 : NUM_SAVE_SLOTS;
num_rows = gSaveHeader->gameLanguage > 1 ? NUM_SAVE_SLOTS + 1 : NUM_SAVE_SLOTS;
mode = gUnk_02032EC0.lastState;
switch (keys) {
case DPAD_UP:
@@ -679,7 +679,7 @@ void HandleFileLanguageSelect(void) {
void sub_08050DB8(void) {
MemClear(&gBG2Buffer, sizeof(gBG2Buffer));
sub_080503A8(0xc);
gMenu.field_0x4 = gUnk_02000000->gameLanguage;
gMenu.field_0x4 = gSaveHeader->gameLanguage;
sub_080A7114(1);
}
@@ -689,7 +689,7 @@ void sub_08050DE4(void) {
if (gUnk_02019EE0.isTransitioning)
return;
row_idx = gUnk_02000000->gameLanguage;
row_idx = gSaveHeader->gameLanguage;
switch (gInput.newKeys) {
case DPAD_UP:
row_idx--;
@@ -709,7 +709,7 @@ void sub_08050DE4(void) {
break;
case B_BUTTON:
row_idx = gMenu.field_0x4;
gUnk_02000000->gameLanguage = gMenu.field_0x4;
gSaveHeader->gameLanguage = gMenu.field_0x4;
SoundReq(SFX_MENU_CANCEL);
SetFileSelectState(STATE_NONE);
break;
@@ -722,8 +722,8 @@ void sub_08050DE4(void) {
if (row_idx > 6) {
row_idx = 6;
}
if (gUnk_02000000->gameLanguage != row_idx) {
gUnk_02000000->gameLanguage = row_idx;
if (gSaveHeader->gameLanguage != row_idx) {
gSaveHeader->gameLanguage = row_idx;
SoundReq(SFX_TEXTBOX_CHOICE);
}
}
@@ -869,7 +869,7 @@ NONMATCH("asm/non_matching/fileScreen/sub_080610B8.inc", void sub_080610B8(void)
END_NONMATCH
void sub_08051358(void) {
gMenu.field_0x12 = gUnk_02000000->gameLanguage == 0 ? 4 : 3;
gMenu.field_0x12 = gSaveHeader->gameLanguage == 0 ? 4 : 3;
if (gMenu.focusCoords[0] != 0x0b || gMenu.focusCoords[1] != 0x5) {
gMenu.focusCoords[1] = 0x5;
@@ -958,7 +958,7 @@ u32 sub_080514BC(u32 a1) {
u32 c;
u32 idx;
if (gUnk_02000000->gameLanguage != 0)
if (gSaveHeader->gameLanguage != 0)
return 1;
switch (a1) {
@@ -1169,7 +1169,7 @@ void sub_080517EC(void) {
void sub_08051874(void) {
s32 temp;
gUnk_02000000->saveFileId = gUnk_02019EE0.unk7;
gSaveHeader->saveFileId = gUnk_02019EE0.unk7;
temp = HandleSave(0);
gUnk_02019EE0.saveStatus[gUnk_02019EE0.unk7] = temp;
switch (temp) {
@@ -1202,8 +1202,8 @@ void sub_080518E4(void) {
void HandleFileStart(void) {
if (gMenu.menuType == 0) {
gMenu.menuType = 1;
gUnk_02000000->messageSpeed = gSave.messageSpeed;
gUnk_02000000->brightnessPref = gSave.brightnessPref;
gSaveHeader->messageSpeed = gSave.messageSpeed;
gSaveHeader->brightnessPref = gSave.brightnessPref;
gMain.funcIndex = 2;
DoFade(5, 8);
}
+2 -2
View File
@@ -245,7 +245,7 @@ NONMATCH("asm/non_matching/game/sub_08052418.inc", void sub_08052418(int param_1
gUnk_020227E8._0[param_2 * 2].BYTES.byte1 = 1;
MemCopy(&gUnk_080FCA8C, &temp, sizeof(temp));
i = param_1 * 0xc;
// temp._0 = gBG1Buffer[gUnk_080FCAA4._8[param_1]][gUnk_080FCAA4._0[gUnk_02000000->gameLanguage + i]] * 2;
// temp._0 = gBG1Buffer[gUnk_080FCAA4._8[param_1]][gUnk_080FCAA4._0[gSaveHeader->gameLanguage + i]] * 2;
temp._13 = ((temp._13 & 0xfe) | gUnk_080FCAA4._8[i + 1]) & 1;
sub_0805F46C(gUnk_080FCAA4._a[param_1], &temp);
gScreen.bg.bg1xOffset = 1;
@@ -265,7 +265,7 @@ void InitializePlayer(void) {
gRoomControls.cameraTarget = pl;
gPlayerState.playerAction = gUnk_080FCAC8[gScreenTransition.field_0xf];
if (!CheckGlobalFlag(EZERO_1ST)) {
gPlayerState.flags.all |= 8;
gPlayerState.flags |= 8;
}
switch (gScreenTransition.field_0xf) {
case 0x2:
+6 -6
View File
@@ -94,7 +94,7 @@ static void HandleNintendoCapcomLogos(void) {
gIntroState.timer = 120;
LoadGfxGroup(16);
LoadGfxGroup(1);
if (gUnk_02000000->gameLanguage == 0) {
if (gSaveHeader->gameLanguage == 0) {
paletteGroup = 1;
} else {
paletteGroup = 2;
@@ -148,13 +148,13 @@ static void HandleTitlescreen(void) {
sub_080ADD30();
gUnk_02024490.unk0 = 1;
LoadGfxGroup(2);
if (gUnk_02000000->gameLanguage == 0) {
if (gSaveHeader->gameLanguage == 0) {
paletteGroup = 3;
} else {
paletteGroup = 4;
}
LoadPaletteGroup(paletteGroup);
if (gUnk_02000000->gameLanguage == 0) {
if (gSaveHeader->gameLanguage == 0) {
// Blend first and second layer
gScreen.controls.layerFXControl = BLDCNT_TGT1_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_EFFECT_BLEND;
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 9);
@@ -183,7 +183,7 @@ static void HandleTitlescreen(void) {
if (gFadeControl.active) {
return;
}
if (gUnk_02000000->gameLanguage == 0) {
if (gSaveHeader->gameLanguage == 0) {
HandleJapaneseTitlescreenAnimationIntro();
} else {
HandleTitlescreenAnimationIntro();
@@ -240,8 +240,8 @@ static void HandleTitlescreen(void) {
#endif
}
}
if (gIntroState.gameLanguage != gUnk_02000000->gameLanguage) {
gIntroState.gameLanguage = gUnk_02000000->gameLanguage;
if (gIntroState.gameLanguage != gSaveHeader->gameLanguage) {
gIntroState.gameLanguage = gSaveHeader->gameLanguage;
LoadGfxGroup(3);
}
UpdateLightRays();
+6 -6
View File
@@ -21,9 +21,9 @@ void sub_08075A0C(ItemBehavior* this, u32 arg1) {
s8* tmp;
itemSlot = IsItemEquipped(this->behaviorID);
if (gPlayerState.heldObject != 0 || gPlayerState.playerAction == 0x18 || gPlayerState.jumpStatus != 0 ||
gPlayerState.field_0x2c != NULL || (gPlayerState.flags.all & 0x80) != 0) {
gPlayerState.field_0x2c != NULL || (gPlayerState.flags & 0x80) != 0) {
ForceEquipItem(0xf, itemSlot);
gPlayerState.flags.all &= 0xff7fffff;
gPlayerState.flags &= 0xff7fffff;
ForceEquipItem(0xf, itemSlot);
sub_08077E78(this, arg1);
} else {
@@ -50,11 +50,11 @@ ASM_FUNC("asm/non_matching/eu/sub_08075ADC.inc", void sub_08075ADC(ItemBehavior*
void sub_08075ADC(ItemBehavior* this, u32 arg1) {
u32 bVar1;
if (gPlayerState.field_0x2c != NULL || (this->field_0x5[9] & 1) == 0 || (gPlayerState.flags.all & 0x110) != 0 ||
if (gPlayerState.field_0x2c != NULL || (this->field_0x5[9] & 1) == 0 || (gPlayerState.flags & 0x110) != 0 ||
sub_08079D48() == 0) {
this->field_0xf = 0;
this->stateID += 1;
gPlayerState.flags.all |= 0x800000;
gPlayerState.flags |= 0x800000;
bVar1 = 8 >> arg1;
gPlayerState.field_0x3[1] = gPlayerState.field_0x3[1] & ~((bVar1 << 4) | bVar1);
bVar1 = ~bVar1;
@@ -73,11 +73,11 @@ void sub_08075B54(ItemBehavior* this, u32 arg1) {
Entity* object;
s8* tmp;
if ((gPlayerState.flags.all & 0x110) == 0) {
if ((gPlayerState.flags & 0x110) == 0) {
itemSlot = IsItemEquipped(this->behaviorID);
if (!(((sub_08077F10(this) == 0) && (itemSlot < 2)) || (gPlayerState.jumpStatus != 0))) {
ForceEquipItem(0xf, itemSlot);
gPlayerState.flags.all &= 0xff7fffff;
gPlayerState.flags &= 0xff7fffff;
sub_08077E78(this, arg1);
SoundReq(SFX_ITEM_LANTERN_OFF);
} else {
+2 -2
View File
@@ -24,7 +24,7 @@ void OcarinaUse(ItemBehavior* this, u32 arg1) {
gPlayerEntity.spriteSettings.b.flipX = 0;
gPlayerEntity.flags &= 0x7f;
gPlayerEntity.field_0x7a.HWORD = 2;
gPlayerState.flags.all |= 0x10000000;
gPlayerState.flags |= 0x10000000;
gPlayerState.field_0x27[0] = -1;
gUnk_02034490[0] = 1;
gPlayerState.field_0xa = (8 >> arg1) | gPlayerState.field_0xa;
@@ -41,7 +41,7 @@ NONMATCH("asm/non_matching/ocarina/OcarinaUpdate.inc", void OcarinaUpdate(ItemBe
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
gPlayerEntity.flags |= 0x80;
gPlayerState.flags.all &= 0xefffffff;
gPlayerState.flags &= 0xefffffff;
gPlayerState.field_0x27[0] = 0;
gUnk_02034490[0] = 0;
CreateBird();
+3 -3
View File
@@ -23,7 +23,7 @@ void ItemPegasusBoots(ItemBehavior* this, u32 arg1) {
if ((bVar1 & 7) == 0) {
SoundReq(SFX_PLY_LAND);
}
if (((gPlayerState.flags.all & 0x80) == 0) && ((this->field_0x5[2] & 7) == 0)) {
if (((gPlayerState.flags & 0x80) == 0) && ((this->field_0x5[2] & 7) == 0)) {
if (gPlayerState.field_0x10[2] == 0x11) {
if (gPlayerEntity.spriteOffsetY == 0) {
CreateFx(&gPlayerEntity, FX_GREEN_SPLASH, 0);
@@ -53,12 +53,12 @@ void sub_080768F8(ItemBehavior* this, u32 arg1) {
u32 bVar2;
bVar1 = gPlayerState.field_0x1c | gPlayerState.field_0x3[1] | gPlayerState.heldObject | gPlayerState.jumpStatus;
bVar2 = (gPlayerState.flags.all & 0x1000);
bVar2 = (gPlayerState.flags & 0x1000);
bVar1 |= bVar2;
if (bVar1 == 0) {
gPlayerState.field_0x1d[1] = 1;
gPlayerState.field_0x1d[4] = bVar1;
if ((gPlayerState.flags.all & 0x80) == 0) {
if ((gPlayerState.flags & 0x80) == 0) {
this->field_0x5[2] = 0x10;
} else {
gPlayerState.field_0x8 = 0xc14;
+4 -4
View File
@@ -22,7 +22,7 @@ extern bool32 sub_08077EFC(ItemBehavior*);
if ((gPlayerState.jumpStatus != 0) && ((gPlayerState.jumpStatus & 7) != 3))
goto _08076710;
if (-1 < gPlayerEntity.height.WORD) {
gPlayerEntity.field_0x20 = 0x20000;
gPlayerEntity.hVelocity = 0x20000;
gPlayerState.jumpStatus = 1;
gPlayerState.field_0x2c = NULL;
this->stateID += 1;
@@ -45,7 +45,7 @@ extern bool32 sub_08077EFC(ItemBehavior*);
gPlayerState.jumpStatus = 1;
gPlayerState.field_0xe = -1;
gPlayerState.field_0x2c = NULL;
gPlayerEntity.field_0x20 = 0x20000;
gPlayerEntity.hVelocity = 0x20000;
_0807673C:
sub_08077F84();
SoundReq(SFX_PLY_VO4);
@@ -67,10 +67,10 @@ void sub_08076758(ItemBehavior* this, u32 arg1) {
((gPlayerState.jumpStatus & 7) != 3)) {
if (sub_08077EFC(this)) {
if (this->stateID < 2) {
if ((gPlayerEntity.field_0x20 < 1) && ((gPlayerState.jumpStatus & 0x10) == 0)) {
if ((gPlayerEntity.hVelocity < 1) && ((gPlayerState.jumpStatus & 0x10) == 0)) {
this->stateID = 2;
gPlayerEntity.field_0x7a.HWORD = 2;
gPlayerEntity.field_0x20 = 0x20000;
gPlayerEntity.hVelocity = 0x20000;
gPlayerState.jumpStatus |= 0x10;
gPlayerState.field_0x8 = 0x288;
SoundReq(SFX_172);
+6 -6
View File
@@ -72,9 +72,9 @@ void sub_0807564C(ItemBehavior* this, u32 arg1) {
void sub_08075694(ItemBehavior* this, u32 arg1) {
this->field_0x5[2] = 1;
if ((gPlayerState.flags.all & 0x8000000) != 0) {
gPlayerState.flags.all &= 0xf7ffffff;
gPlayerState.flags.all &= 0xfffbffff;
if ((gPlayerState.flags & 0x8000000) != 0) {
gPlayerState.flags &= 0xf7ffffff;
gPlayerState.flags &= 0xfffbffff;
sub_08077DF4(this, 300);
} else {
gPlayerState.field_0xab = 1;
@@ -86,7 +86,7 @@ void sub_08075694(ItemBehavior* this, u32 arg1) {
gPlayerEntity.field_0x40 = 0x1e;
gPlayerState.field_0x1a[1] |= 0x40;
gPlayerState.field_0x1a[1] &= 0xdf;
if ((gPlayerState.field_0xa0[0] == 0x04) && ((gPlayerState.flags.all & 0x400000) == 0)) {
if ((gPlayerState.field_0xa0[0] == 0x04) && ((gPlayerState.flags & 0x400000) == 0)) {
gPlayerState.field_0xa0[0] = 0x01;
sub_0807A108();
}
@@ -121,10 +121,10 @@ void sub_080758B0(ItemBehavior* this, u32 arg1) {
ASM_FUNC("asm/non_matching/itemSword/sub_08075900.inc", void sub_08075900(ItemBehavior* this, u32 arg1))
void sub_080759B8(ItemBehavior* this, u32 arg1) {
if ((gPlayerState.flags.all & 0x80) == 0) {
if ((gPlayerState.flags & 0x80) == 0) {
gPlayerEntity.field_0x40 = 0;
}
gPlayerState.flags.all &= 0xf7ffffff;
gPlayerState.flags &= 0xf7ffffff;
gPlayerState.field_0x1a[1] = 0;
gPlayerState.field_0x2c = NULL;
sub_08077E78(this, arg1);
+9 -9
View File
@@ -80,7 +80,7 @@ void AgbMain(void) {
gMain.ticks++;
sScreenHandlers[gMain.screen]();
MessageUpdate();
MessageMain();
UpdateFade();
SoundLoop();
break;
@@ -191,7 +191,7 @@ NONMATCH("asm/non_matching/sub_080560B8.inc", static void sub_080560B8(void)) {
case -1:
default:
MemCopy(&sDefaultSettings, (void*)0x2000000, 16);
Write_02000000(gUnk_02000000);
Write_02000000(gSaveHeader);
break;
}
}
@@ -211,14 +211,14 @@ END_NONMATCH
u32 sub_08056134(void) {
#ifdef EU
if ((gUnk_02000000->signature != SIGNATURE) || (gUnk_02000000->saveFileId >= NUM_SAVE_SLOTS) ||
(gUnk_02000000->messageSpeed >= MAX_MSG_SPEED) || (gUnk_02000000->brightnessPref >= MAX_BRIGHTNESS) ||
(gUnk_02000000->gameLanguage <= GAME_LANGUAGE) || (gUnk_02000000->gameLanguage >= 7) ||
(gUnk_02000000->_e != 0))
if ((gSaveHeader->signature != SIGNATURE) || (gSaveHeader->saveFileId >= NUM_SAVE_SLOTS) ||
(gSaveHeader->messageSpeed >= MAX_MSG_SPEED) || (gSaveHeader->brightnessPref >= MAX_BRIGHTNESS) ||
(gSaveHeader->gameLanguage <= GAME_LANGUAGE) || (gSaveHeader->gameLanguage >= 7) ||
(gSaveHeader->_e != 0))
#else
if ((gUnk_02000000->signature != SIGNATURE) || (gUnk_02000000->saveFileId >= NUM_SAVE_SLOTS) ||
(gUnk_02000000->messageSpeed >= MAX_MSG_SPEED) || (gUnk_02000000->brightnessPref >= MAX_BRIGHTNESS) ||
(gUnk_02000000->gameLanguage != GAME_LANGUAGE) || (gUnk_02000000->_e != 0))
if ((gSaveHeader->signature != SIGNATURE) || (gSaveHeader->saveFileId >= NUM_SAVE_SLOTS) ||
(gSaveHeader->messageSpeed >= MAX_MSG_SPEED) || (gSaveHeader->brightnessPref >= MAX_BRIGHTNESS) ||
(gSaveHeader->gameLanguage != GAME_LANGUAGE) || (gSaveHeader->_e != 0))
#endif
return FALSE;
+9 -9
View File
@@ -17,10 +17,10 @@ void Manager1_Main(Entity* this) {
u8* pbVar2;
gUnk_08107C5C[this->action](this);
gUnk_08107C48[((u8*)&this->field_0x20)[1]](this);
bVar1 = gUnk_08107C40[((u8*)&this->field_0x20)[1]];
if ((bVar1 != 0) && (*(u8*)&this->field_0x20 != bVar1)) {
((u8*)&this->field_0x20)[0] = bVar1;
gUnk_08107C48[((u8*)&this->hVelocity)[1]](this);
bVar1 = gUnk_08107C40[((u8*)&this->hVelocity)[1]];
if ((bVar1 != 0) && (*(u8*)&this->hVelocity != bVar1)) {
((u8*)&this->hVelocity)[0] = bVar1;
LoadGfxGroup(bVar1);
}
}
@@ -28,9 +28,9 @@ void Manager1_Main(Entity* this) {
void sub_080570B8(Entity* this) {
u8* pbVar1;
LoadGfxGroup(((u8*)&this->field_0x20)[0]);
LoadGfxGroup(((u8*)&this->hVelocity)[0]);
this->height.WORD = 0;
pbVar1 = ((u8*)&this->field_0x20 + 1);
pbVar1 = ((u8*)&this->hVelocity + 1);
if (*pbVar1 == 3) {
gScreen.affine.bg3Updated = 1;
} else {
@@ -46,9 +46,9 @@ void sub_080570F8(void) {
void sub_08057118(Entity* this) {
this->actionDelay = 0;
*(u8*)&this->field_0x20 = 0;
((u8*)&this->field_0x20)[1] = 0;
((u8*)&this->field_0x20)[2] = 0;
*(u8*)&this->hVelocity = 0;
((u8*)&this->hVelocity)[1] = 0;
((u8*)&this->hVelocity)[2] = 0;
this->action = 1;
gScreen.affine.bg3Control = 0x1e04;
gScreen.lcd.displayControl |= 0x800;
+4 -4
View File
@@ -139,9 +139,9 @@ void sub_0805B168(Manager1A* this) {
u32 sub_0805B1CC(Manager1A* this) {
u32 re = 0;
if (CheckPlayerProximity(this->unk_20, this->unk_22, this->unk_24, this->unk_26)) {
if ((gPlayerState.flags.all & 0x4) && (gPlayerState.flags.all & 0x1)) {
gPlayerState.flags.all |= 0x8000;
} else if (gPlayerState.flags.all & 0x8000) {
if ((gPlayerState.flags & 0x4) && (gPlayerState.flags & 0x1)) {
gPlayerState.flags |= 0x8000;
} else if (gPlayerState.flags & 0x8000) {
re = 1;
}
}
@@ -157,7 +157,7 @@ void sub_0805B210(Manager1A* this) {
gScreenTransition.areaID = tmp->unk_01;
gScreenTransition.roomID = tmp->unk_02;
gScreenTransition.playerLayer = tmp->unk_03;
if (gPlayerState.flags.all & 0x80) {
if (gPlayerState.flags & 0x80) {
gScreenTransition.field_0xf = 6;
} else {
gScreenTransition.field_0xf = 2;
+1 -1
View File
@@ -76,7 +76,7 @@ void sub_0805C7C4(Manager26* this) {
}
void sub_0805C7CC(Manager26* this) {
if (gPlayerState.flags.all & 0x80) {
if (gPlayerState.flags & 0x80) {
if (gPlayerEntity.y.HALF.HI < this->unk_2a + 0x10) {
this->manager.unk_0d = 1;
} else {
+2 -2
View File
@@ -47,7 +47,7 @@ void Manager3_Main(Manager3* this) {
gArea.field_0x18 = 1;
gArea.curPortalType = 5;
} else {
if ((gPlayerState.flags.all & 0x20) && gPlayerState.jumpStatus == 0) {
if ((gPlayerState.flags & 0x20) && gPlayerState.jumpStatus == 0) {
gArea.field_0x18 = 2;
} else {
if (sub_08057810()) {
@@ -94,7 +94,7 @@ void CreateMagicSparkles(u32 baseX, u32 baseY, u32 layer) {
}
u32 sub_08057810(void) {
if ((gPlayerState.flags.all & 0x80) && !gPlayerState.field_0xaa && (gArea.curPortalType != 0x6) &&
if ((gPlayerState.flags & 0x80) && !gPlayerState.field_0xaa && (gArea.curPortalType != 0x6) &&
(gPlayerState.heldObject == 0)) {
switch (gPlayerState.field_0xa8) {
case 0:
+2 -2
View File
@@ -79,13 +79,13 @@ void sub_0805DF4C(Manager* this) {
if (--this->unk_0e == 0) {
this->action = 3;
this->unk_0e = 0x1e;
TextboxNoOverlapFollow(0x164f);
MessageFromTarget(0x164f);
}
}
}
void sub_0805DF98(Manager* this) {
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
if (this->unk_0e != 0) {
this->unk_0e -= 1;
} else {
+1 -1
View File
@@ -37,7 +37,7 @@ void sub_0805E1F8(u32, u32);
void Manager39_Main(Manager39* this) {
gUnk_08108E28[this->manager.action](this);
if ((gRoomControls.roomID != this->unk_20) || (gTextBox.doTextBox & 0x7F)) {
if ((gRoomControls.roomID != this->unk_20) || (gMessage.doTextBox & 0x7F)) {
sub_0805E1D8(this);
}
}
+1 -1
View File
@@ -18,7 +18,7 @@ void Manager6_Main(Manager6* this) {
for (i = this->warpList; i->posX != 0xFFFF; i++) {
tmp = (i->unk_07.all & 0x3);
if (((tmp & (gPlayerEntity.collisionLayer)) != 0) &&
(((gPlayerState.flags.all & 0x80) != 0) || ((i->unk_07.b.unk2) != 0)) &&
(((gPlayerState.flags & 0x80) != 0) || ((i->unk_07.b.unk2) != 0)) &&
(CheckPlayerInRegion(i->posX, i->posY, i->width, i->height) != 0) &&
(gPlayerEntity.height.HALF.HI == 0)) {
DoExitTransition(GetCurrentRoomProperty(i->unk_06));
+3 -3
View File
@@ -49,7 +49,7 @@ void sub_080585DC(ManagerA*);
void sub_08058408(ManagerA* this) {
u32 tmp2;
tmp2 = (gPlayerState.flags.all & 0x08);
tmp2 = (gPlayerState.flags & 0x08);
if (tmp2 != 0)
return;
if (!CheckPlayerInRegion(this->unk_20, this->unk_22, this->unk_24, this->unk_26))
@@ -59,7 +59,7 @@ void sub_08058408(ManagerA* this) {
return;
case 2:
sub_080585DC(this);
if ((gPlayerState.flags.all & 0x80) == 0)
if ((gPlayerState.flags & 0x80) == 0)
return;
case 0:
default:
@@ -118,7 +118,7 @@ extern void UnfreezeTime(void);
void sub_08058514(ManagerA* this) {
switch (this->manager.unk_0d) {
case 1:
if ((gPlayerState.flags.all & 0x1235) != 0)
if ((gPlayerState.flags & 0x1235) != 0)
return;
if (gPlayerEntity.height.HALF.HI != 0)
return;
+2 -2
View File
@@ -343,7 +343,7 @@ void SetDirtTile(u32 tile) {
void sub_08059368(ManagerF* this) {
this->manager.action = 1;
if (this->unk_3c == gCurrentTextBox._28) {
if (this->unk_3c == gTextRender.curToken.textIndex) {
SetFlag(this->unk_3e);
DeleteThisEntity();
}
@@ -360,7 +360,7 @@ void sub_0805938C(ManagerF* this) {
}
u32 sub_080593CC(ManagerF* this) {
if (!(gPlayerState.flags.all & 0x80) && gPlayerState.swimState != 0 && gPlayerEntity.animationState == 0 &&
if (!(gPlayerState.flags & 0x80) && gPlayerState.swimState != 0 && gPlayerEntity.animationState == 0 &&
(gPlayerState.field_0x90.HALF.LO & 0xF00) == 0x400) {
return sub_0806FCB8(&gPlayerEntity, this->unk_38, this->unk_3a + 0xC, 6);
}
+2 -2
View File
@@ -53,14 +53,14 @@ void sub_08063314(Entity* this) {
InitializeAnimation(this, offset);
}
if (this->interactType != '\0') {
TextboxNoOverlapFollow(this->actionDelay + 0xA01);
MessageFromTarget(this->actionDelay + 0xA01);
this->action++;
}
sub_0806ED78(this);
}
void sub_0806336C(Entity* this) {
if ((gTextBox.doTextBox & 0x7F) == 0) {
if ((gMessage.doTextBox & 0x7F) == 0) {
this->action++;
InitializeAnimation(this, 8);
}
+1 -1
View File
@@ -184,7 +184,7 @@ void sub_0806D274(Entity* this) {
case 0:
case 1:
default:
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
this->frameIndex = 2;
break;
}
+10 -10
View File
@@ -87,7 +87,7 @@ void sub_08068A4C(Entity* this) {
if (this->interactType != 0) {
this->interactType = 0;
this->action = 2;
TextboxNoOverlapFollow(0);
MessageFromTarget(0);
}
}
@@ -307,42 +307,42 @@ switchD_08068d12_caseD_0:
// Introduction dialoague
void sub_08068DB8(Entity* this) {
TextboxNoOverlap(gUnk_08111664[this->actionDelay], this);
MessageNoOverlap(gUnk_08111664[this->actionDelay], this);
}
// Ask to teach dialoague
void sub_08068DD0(Entity* this) {
TextboxNoOverlap(gUnk_0811167A[this->actionDelay], this);
MessageNoOverlap(gUnk_0811167A[this->actionDelay], this);
}
// Technique Dialogue
void sub_08068DE8(Entity* this) {
TextboxNoOverlap(gUnk_08111690[this->actionDelay], this);
MessageNoOverlap(gUnk_08111690[this->actionDelay], this);
}
// Posession dialogue
void sub_08068E00(Entity* this) {
TextboxNoOverlap(gUnk_081116A6[this->actionDelay], this);
MessageNoOverlap(gUnk_081116A6[this->actionDelay], this);
}
void sub_08068E18(Entity* this) {
TextboxNoOverlap(gUnk_081116BC[this->actionDelay], this);
MessageNoOverlap(gUnk_081116BC[this->actionDelay], this);
}
void sub_08068E30(Entity* this) {
TextboxNoOverlap(gUnk_081116D2[this->actionDelay], this);
MessageNoOverlap(gUnk_081116D2[this->actionDelay], this);
}
void sub_08068E48(Entity* this) {
TextboxNoOverlap(gUnk_081116E8[this->actionDelay], this);
MessageNoOverlap(gUnk_081116E8[this->actionDelay], this);
}
void sub_08068E60(Entity* this) {
TextboxNoOverlap(gUnk_081116FE[this->actionDelay], this);
MessageNoOverlap(gUnk_081116FE[this->actionDelay], this);
}
void sub_08068E78(Entity* this) {
TextboxNoOverlap(gUnk_08111714[this->actionDelay], this);
MessageNoOverlap(gUnk_08111714[this->actionDelay], this);
}
void sub_08068E90(Entity* this) {
+1 -1
View File
@@ -34,7 +34,7 @@ void sub_0806355C(Entity* this) {
ASM_FUNC("asm/non_matching/brocco/sub_08063584.inc", void sub_08063584(Entity* this))
void sub_08063608(Entity* this) {
u8 tmp = gTextBox.doTextBox & 0x7f;
u8 tmp = gMessage.doTextBox & 0x7f;
if (tmp == 0) {
this->action = 1;
this->field_0xf = tmp;
+1 -1
View File
@@ -77,7 +77,7 @@ void sub_080672C8(Entity* this) {
tmp = CheckGlobalFlag(TABIDACHI);
dialog = BOOLCAST(tmp);
}
TextboxNoOverlap(gUnk_08110CE8[(dialog * 2 + this->type * 6) / 2], this);
MessageNoOverlap(gUnk_08110CE8[(dialog * 2 + this->type * 6) / 2], this);
}
void sub_08067304(Entity* this) {
+2 -2
View File
@@ -80,7 +80,7 @@ NONMATCH("asm/non_matching/castleMaid/sub_08064570.inc", void sub_08064570(Entit
}
break;
case 2:
if ((gTextBox.doTextBox & 0x7f) != 0) {
if ((gMessage.doTextBox & 0x7f) != 0) {
return;
}
this->action = 1;
@@ -111,7 +111,7 @@ void sub_0806464C(Entity* this) {
} else {
tmp = 1;
}
TextboxNoOverlap(gUnk_0810F88C[tmp], this);
MessageNoOverlap(gUnk_0810F88C[tmp], this);
}
void sub_08064688(Entity* this) {
+2 -2
View File
@@ -151,7 +151,7 @@ void sub_0806797C(Entity* this) {
void sub_0806799C(Entity* this) {
UpdateAnimationSingleFrame(this);
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
sub_08067B08(this);
sub_0805E3A0(this, 1);
}
@@ -272,7 +272,7 @@ void sub_08067C44(Entity* this) {
s32 iVar4;
u32 uVar5;
uVar5 = -((s32) - (gPlayerState.flags.all & 0x80) >> 0x1f);
uVar5 = -((s32) - (gPlayerState.flags & 0x80) >> 0x1f);
if (uVar5 != this->field_0x68.HALF.HI) {
if (uVar5 == 0) {
sub_08078778(this);
+2 -2
View File
@@ -181,7 +181,7 @@ void Cow_ShowDialogue(Entity* ent) {
void sub_0806920C(Entity* ent) {
// TODO: figure out what bitfield flag this is
u32 var0 = gPlayerState.flags.all & 0x80;
u32 var0 = gPlayerState.flags & 0x80;
u32 var1 = -var0 >> 0x1F;
if (var1 != ent->field_0x6c.HALF.HI) {
@@ -200,7 +200,7 @@ void sub_0806924C(Entity* ent) {
s8 itype = ent->interactType;
if (itype != 0) {
// TODO: figure out what bitfield flag this is
if ((gPlayerState.flags.all & 0x80) != 0) {
if ((gPlayerState.flags & 0x80) != 0) {
if (itype == 2) {
ent->action = 4;
sub_0806F118(ent);
+1 -1
View File
@@ -59,7 +59,7 @@ void sub_0806E648(Entity* this) {
void sub_0806E65C(Entity* this) {
if (this->interactType != 0) {
if ((gPlayerState.flags.all & 0x80) != 0) {
if ((gPlayerState.flags & 0x80) != 0) {
if (this->interactType == 2) {
this->action = 4;
sub_0806F118(this);
+3 -3
View File
@@ -53,7 +53,7 @@ void sub_0806E824(Entity* this) {
void sub_0806E838(Entity* this) {
if (this->interactType != 0) {
if ((gPlayerState.flags.all & 0x80) != 0) {
if ((gPlayerState.flags & 0x80) != 0) {
if (this->interactType == 2) {
this->action = 3;
sub_0806F118(this);
@@ -69,7 +69,7 @@ void sub_0806E838(Entity* this) {
}
void sub_0806E884(Entity* this) {
TextboxNoOverlap(0xdb6, this);
MessageNoOverlap(0xdb6, this);
}
void CuccoChick_Fusion(Entity* this) {
@@ -79,7 +79,7 @@ void CuccoChick_Fusion(Entity* this) {
this->frameIndex = 1;
} else {
if (sub_08003FC4(this, 0x3000) == 0) {
this->field_0x20 = 0x10000;
this->hVelocity = 0x10000;
}
}
}
+2 -2
View File
@@ -66,7 +66,7 @@ void sub_0806BE84(Entity* this, ScriptExecutionContext* context) {
if (GetInventoryValue(0x3C) >= 2) {
msgIndex = 2;
}
TextboxNoOverlap(gUnk_08113344[msgIndex], this);
MessageNoOverlap(gUnk_08113344[msgIndex], this);
}
void sub_0806BEC8(Entity* this, ScriptExecutionContext* context) {
@@ -83,7 +83,7 @@ void sub_0806BEC8(Entity* this, ScriptExecutionContext* context) {
msgIndex = 2;
}
TextboxNoOverlap(gUnk_0811334A[msgIndex], this);
MessageNoOverlap(gUnk_0811334A[msgIndex], this);
}
void sub_0806BEFC() {
+9 -9
View File
@@ -71,7 +71,7 @@ void sub_08069B44(Entity* this) {
if ((this->flags & 2) != 0) {
sub_0807DD50(this);
}
if (((this->type == 0) && ((gPlayerState.flags.all & 0x80) == 0)) && (GetInventoryValue(0x36) != 2)) {
if (((this->type == 0) && ((gPlayerState.flags & 0x80) == 0)) && (GetInventoryValue(0x36) != 2)) {
this->action = 4;
}
#if defined(JP) || defined(EU)
@@ -87,7 +87,7 @@ void sub_08069B44(Entity* this) {
void sub_08069C40(Entity* this) {
UpdateAnimationSingleFrame(this);
if (sub_08069F90(this) != 0) {
if ((gPlayerState.flags.all & 0x80) != 0) {
if ((gPlayerState.flags & 0x80) != 0) {
sub_08069CB8(this);
} else {
this->animationState = GetAnimationState(this);
@@ -282,14 +282,14 @@ u32 sub_08069F90(Entity* this) {
}
void sub_08069FBC(Entity* this) {
u32 tmp = (gPlayerState.flags.all & 0x80) != 0 ? 0x24 : 0x20;
u32 tmp = (gPlayerState.flags & 0x80) != 0 ? 0x24 : 0x20;
if ((this->animationState == 1) || (this->animationState == 3)) {
this->field_0x6a.HALF.HI = tmp;
}
}
void sub_08069FE8(Entity* this) {
u32 tmp = -((s32) - (gPlayerState.flags.all & 0x80) >> 0x1f);
u32 tmp = -((s32) - (gPlayerState.flags & 0x80) >> 0x1f);
if (tmp != this->field_0x6a.HALF.LO) {
if (tmp == 0) {
sub_08078778(this);
@@ -302,7 +302,7 @@ void sub_08069FE8(Entity* this) {
void sub_0806A028(Entity* this) {
if (this->interactType != 0) {
if ((gPlayerState.flags.all & 0x80) != 0) {
if ((gPlayerState.flags & 0x80) != 0) {
if (this->interactType == 2) {
this->action = 6;
sub_0806F118(this);
@@ -326,7 +326,7 @@ void sub_0806A080(Entity* this) {
void sub_0806A0A4(Entity* this) {
s32 dialog;
if ((gPlayerState.flags.all & 0x80) != 0) {
if ((gPlayerState.flags & 0x80) != 0) {
dialog = 4;
#if defined(JP) || defined(EU)
if (CheckLocalFlag(0xcc) == 0) {
@@ -364,12 +364,12 @@ void sub_0806A0A4(Entity* this) {
}
}
}
TextboxNoOverlap(gUnk_08111F74[(u32)gSave.unk8 * 5 + dialog], this);
MessageNoOverlap(gUnk_08111F74[(u32)gSave.unk8 * 5 + dialog], this);
}
void sub_0806A144(Entity* this) {
s32 dialog = 4;
if ((gPlayerState.flags.all & 0x80) != 0) {
if ((gPlayerState.flags & 0x80) != 0) {
dialog = 3;
if ((GetInventoryValue(0x46) == 0) && (CheckGlobalFlag(0x29) != 0)) {
if (CheckLocalFlag(0x85) == 0) {
@@ -379,7 +379,7 @@ void sub_0806A144(Entity* this) {
}
}
}
TextboxNoOverlap(gUnk_08111FD8[dialog], this);
MessageNoOverlap(gUnk_08111FD8[dialog], this);
}
void Dog_Fusion(Entity* this) {
+1 -1
View File
@@ -77,7 +77,7 @@ void sub_0806C038(Entity* this) {
}
}
}
TextboxNoOverlap(gUnk_081133A4[index], this);
MessageNoOverlap(gUnk_081133A4[index], this);
}
void sub_0806C09C(Entity* this) {
+3 -3
View File
@@ -38,7 +38,7 @@ void sub_08065A00(Entity* this) {
}
void sub_08065A10(Entity* this) {
if ((gTextBox.doTextBox & 0x7F) == 0) {
if ((gMessage.doTextBox & 0x7F) == 0) {
this->action = 1;
InitAnimationForceUpdate(this, this->animationState / 2);
}
@@ -58,7 +58,7 @@ void sub_08065A50(Entity* this) {
void sub_08065A64(Entity* this) {
u32 uVar2;
uVar2 = -(gPlayerState.flags.all & 0x80) >> 0x1f;
uVar2 = -(gPlayerState.flags & 0x80) >> 0x1f;
if (uVar2 != this->field_0x68.HALF.HI) {
if (uVar2 == 0) {
sub_08078778(this);
@@ -71,7 +71,7 @@ void sub_08065A64(Entity* this) {
void sub_08065AA4(Entity* this) {
if (this->interactType != 0) {
if (gPlayerState.flags.all & 0x80) {
if (gPlayerState.flags & 0x80) {
if (this->interactType == 2) {
this->action = 4;
sub_0806F118(this);
+3 -3
View File
@@ -149,7 +149,7 @@ void sub_080601D4(Entity* this) {
temp = CheckKinstoneFused(0x17);
uVar2 = BOOLCAST(temp);
}
TextboxNoOverlap(gUnk_0810A354[uVar2], this);
MessageNoOverlap(gUnk_0810A354[uVar2], this);
}
void sub_08060208(Entity* this) {
@@ -197,7 +197,7 @@ void sub_08060270(Entity* this) {
SetLocalFlag(0x76);
}
}
TextboxNoOverlap(gUnk_0810A35A[index], this);
MessageNoOverlap(gUnk_0810A35A[index], this);
}
void sub_080602BC(Entity* this) {
@@ -213,7 +213,7 @@ void sub_080602BC(Entity* this) {
index = 0;
}
}
TextboxNoOverlap(gUnk_0810A362[index], this);
MessageNoOverlap(gUnk_0810A362[index], this);
}
void sub_0806030C(Entity* this, ScriptExecutionContext* context) {
+1 -1
View File
@@ -115,7 +115,7 @@ void sub_08065F20(Entity* this) {
UpdateAnimationSingleFrame(this);
if (this->interactType != 0) {
this->interactType = 0;
TextboxNoOverlapFollow(0);
MessageFromTarget(0);
this->animIndex += 1;
if (gUnk_0811033C[this->animIndex] == 0) {
this->animIndex = 0;
+1 -1
View File
@@ -99,7 +99,7 @@ void sub_08069888(Entity* this) {
} else {
index = 5;
}
TextboxNoOverlap(gUnk_08111C50[index], this);
MessageNoOverlap(gUnk_08111C50[index], this);
}
ASM_FUNC("asm/non_matching/gorman/sub_0806991C.inc", void sub_0806991C(Entity* this, ScriptExecutionContext* context))
+2 -2
View File
@@ -41,13 +41,13 @@ void sub_08069328(Entity* this) {
this->action = 2;
sub_0805E47C(this);
InitAnimationForceUpdate(this, 8);
TextboxNoOverlapFollow(this->actionDelay + (0x90 << 5));
MessageFromTarget(this->actionDelay + (0x90 << 5));
}
}
void sub_08069390(Entity* this) {
UpdateAnimationSingleFrame(this);
if ((gTextBox.doTextBox & 0x7F) == 0) {
if ((gMessage.doTextBox & 0x7F) == 0) {
this->action = 1;
this->interactType = 0;
sub_0805E584(this);
+6 -6
View File
@@ -52,9 +52,9 @@ void sub_080695AC(Entity* this) {
void sub_080695E8(Entity* this) {
UpdateAnimationSingleFrame(this);
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
this->action = 1;
this->interactType = gTextBox.doTextBox & 0x7f;
this->interactType = gMessage.doTextBox & 0x7f;
sub_0805E584(this);
InitAnimationForceUpdate(this, this->animationState);
}
@@ -80,8 +80,8 @@ void sub_08069654(Entity* this) {
void sub_08069660(Entity* this) {
u32 uVar1;
TextboxNoOverlap(0x2c1c, this);
gTextBox.field_0x10 = (u16)GoronMerchant_GetSalePrice(this);
MessageNoOverlap(0x2c1c, this);
gMessage.field_0x10 = (u16)GoronMerchant_GetSalePrice(this);
}
void sub_08069684(void) {
@@ -142,11 +142,11 @@ void GoronMerchant_TryToBuyKinstone(Entity* this, ScriptExecutionContext* contex
gRoomVars.field_0x7 = 0;
context->condition = 1;
} else {
TextboxNoOverlap(0x2c1f, this);
MessageNoOverlap(0x2c1f, this);
context->condition = 0;
}
} else {
TextboxNoOverlap(0x2c1e, this);
MessageNoOverlap(0x2c1e, this);
context->condition = 0;
}
gActiveScriptInfo.flags = gActiveScriptInfo.flags | 1;
+2 -2
View File
@@ -107,7 +107,7 @@ void sub_08063E54(Entity* this) {
}
void sub_08063E6C(Entity* this) {
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
this->action = 1;
InitializeAnimation(this, this->animationState + 4);
}
@@ -160,7 +160,7 @@ void sub_08063F20(Entity* this) {
}
void sub_08063F78(Entity* this) {
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
this->action = this->action - 1;
InitializeAnimation(this, (this->animationState >> 1) + 4 + *(s8*)&this->field_0x70);
}
+4 -4
View File
@@ -70,7 +70,7 @@ void sub_08062130(Entity* this) {
}
void sub_08062194(Entity* this) {
TextboxNoOverlapFollow(0);
MessageFromTarget(0);
this->action = 1;
this->interactType = 0;
}
@@ -132,7 +132,7 @@ NONMATCH("asm/non_matching/kid/sub_080621AC.inc", void sub_080621AC(Entity* this
break;
case 2:
GetNextFrame(this);
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
this->action = 1;
}
break;
@@ -203,13 +203,13 @@ END_NONMATCH
NONMATCH("asm/non_matching/kid/sub_08062634.inc", void sub_08062634(Entity* this)) {
u32 a = this->type2;
u32 b = (Random() & 1);
TextboxNoOverlap(*((u16*)gUnk_0810BDE8 + b + a * 2), this);
MessageNoOverlap(*((u16*)gUnk_0810BDE8 + b + a * 2), this);
}
END_NONMATCH
NONMATCH("asm/non_matching/kid/sub_0806265C.inc", void sub_0806265C(Entity* this, ScriptExecutionContext* context)) {
if (gSave.unk8 == 0) {
TextboxNoOverlap(0, this);
MessageNoOverlap(0, this);
} else {
ShowNPCDialogue(this, &gUnk_0810BE10[this->type * 9 + gSave.unk8]);
}
+1 -1
View File
@@ -90,7 +90,7 @@ void sub_0806673C(Entity* this) {
} else {
index = 3;
}
TextboxNoOverlap(gUnk_081104F8[index], this);
MessageNoOverlap(gUnk_081104F8[index], this);
}
void KingDaltus_Fusion(Entity* this) {
+2 -2
View File
@@ -16,12 +16,12 @@ void KingGustaf(Entity* this) {
gScreen.controls.layerFXControl = 0x3f40;
gScreen.controls.alphaBlend = 0x1000;
this->speed = 0x1000;
this->field_0x20 = 0;
this->hVelocity = 0;
} else {
sub_0807DD94(this, 0);
speed = 0x100;
speed *= this->speed;
speed += this->field_0x20;
speed += this->hVelocity;
speed >>= 0x10;
if (speed > 0x10) {
speed = 0x10;
+2 -2
View File
@@ -55,7 +55,7 @@ void sub_0806B260(Entity* this, ScriptExecutionContext* context) {
} else {
index = 3;
}
TextboxNoOverlap(gUnk_08112D48[index], this);
MessageNoOverlap(gUnk_08112D48[index], this);
}
extern u16 gUnk_08112D50[];
@@ -82,7 +82,7 @@ void sub_0806B2B4(Entity* this) {
} else {
index = 0;
}
TextboxNoOverlap(gUnk_08112D50[index], this);
MessageNoOverlap(gUnk_08112D50[index], this);
}
void Librari_Fusion(Entity* this) {
+1 -1
View File
@@ -57,5 +57,5 @@ void sub_0806BBB0(Entity* this) {
} else {
tmp = 2;
}
TextboxNoOverlap(gUnk_08113078[tmp], this);
MessageNoOverlap(gUnk_08113078[tmp], this);
}
+1 -1
View File
@@ -42,7 +42,7 @@ void sub_08063254(Entity* this, u32 unused) {
sub_08063280(this, unused);
if ((this->frames.all & 0x80) != 0) {
this->action = 3;
TextboxNoOverlapFollow(0);
MessageFromTarget(0);
}
}
+1 -1
View File
@@ -50,7 +50,7 @@ void sub_08062D18(Entity* this, ScriptExecutionContext* context) {
tmp = 3;
}
TextboxNoOverlap(gUnk_0810C34C[tmp], this);
MessageNoOverlap(gUnk_0810C34C[tmp], this);
if (tmp == 0) {
context->condition = TRUE;
} else {
+1 -1
View File
@@ -50,7 +50,7 @@ void sub_08068730(Entity* this) {
}
if (this->interactType != 0) {
this->interactType = 0;
TextboxNoOverlapFollow(this->actionDelay + 0x1200);
MessageFromTarget(this->actionDelay + 0x1200);
}
}
+1 -1
View File
@@ -92,7 +92,7 @@ void sub_08066904(Entity* this) {
} else {
index = 3;
}
TextboxNoOverlap(gUnk_08110650[index], this);
MessageNoOverlap(gUnk_08110650[index], this);
}
void MinisterPotho_Fusion(Entity* this) {
+2 -2
View File
@@ -50,7 +50,7 @@ void sub_08067E88(Entity* this) {
if (this->interactType != 0) {
this->interactType = 0;
this->action = 2;
TextboxNoOverlapFollow(this->actionDelay + 0x1200);
MessageFromTarget(this->actionDelay + 0x1200);
}
}
@@ -86,7 +86,7 @@ NONMATCH("asm/non_matching/mountainMinish/sub_08068190.inc", void sub_08068190(E
}
// TODO unable to devide the array access variables by two without breaking everything
TextboxNoOverlap(gUnk_0811130E[uVar2 * 2 + uVar3 * 8], this);
MessageNoOverlap(gUnk_0811130E[uVar2 * 2 + uVar3 * 8], this);
}
END_NONMATCH
+1 -1
View File
@@ -60,7 +60,7 @@ void sub_080670B4(Entity* this) {
uVar1 = CheckGlobalFlag(TABIDACHI);
uVar2 = BOOLCAST(uVar1);
}
TextboxNoOverlap(gUnk_08110C0C[uVar2], this);
MessageNoOverlap(gUnk_08110C0C[uVar2], this);
}
void sub_080670E4(Entity* this) {
+1 -1
View File
@@ -39,7 +39,7 @@ void sub_080662F8(Entity* this) {
void sub_08066358(Entity* this) {
if (this->interactType != 0) {
this->interactType = 0;
TextboxNoOverlapFollow(0);
MessageFromTarget(0);
if ((this->type2 & 0x10) != 0) {
this->action = 3;
this->subAction = 0;
+2 -2
View File
@@ -392,7 +392,7 @@ NONMATCH("asm/non_matching/npc5/sub_08061170.inc", bool32 sub_08061170(Entity* t
this->action = 6;
tmp = (sub_08079FD4(this, 1) * 0x10 - 4);
// tmp <<= 0xc;
this->field_0x20 = tmp;
this->hVelocity = tmp;
this->speed = 0x100;
this->direction = direction;
this->animationState = direction >> 2;
@@ -867,7 +867,7 @@ NONMATCH("asm/non_matching/npc5/sub_08061B18.inc", void sub_08061B18(Entity* thi
if ((((Tmp**)&this->field_0x68))[++this->actionDelay]->unk_2 == 0) {
this->actionDelay = 0;
}
TextboxNoOverlap((u32)*puVar2, this);
MessageNoOverlap((u32)*puVar2, this);
break;
}
}
+2 -2
View File
@@ -30,13 +30,13 @@ void sub_08062B14(Entity* this) {
void sub_08062B48(Entity* this) {
GetNextFrame(this);
if ((this->frames.b.f3) != 0) {
TextboxNoOverlapFollow(0xa01);
MessageFromTarget(0xa01);
this->action++;
}
}
void sub_08062B70(Entity* this) {
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
InitializeAnimation(this, 2);
this->action = 1;
sub_0805E584(this);
+6 -6
View File
@@ -49,7 +49,7 @@ void sub_0806B3CC(Entity* this) {
GetNextFrame(this);
if (this->interactType != 0) {
this->interactType = 0;
TextboxNoOverlapFollow(0);
MessageFromTarget(0);
}
sub_0806ED78(this);
}
@@ -107,7 +107,7 @@ void sub_0806B504(Entity* this) {
SetLocalFlag(0x86);
}
TextboxNoOverlap(gUnk_08112E54[idx], this);
MessageNoOverlap(gUnk_08112E54[idx], this);
}
void sub_0806B540(Entity* this) {
@@ -116,7 +116,7 @@ void sub_0806B540(Entity* this) {
context = *(ScriptExecutionContext**)&this->cutsceneBeh;
switch (context->unk_18) {
case 0:
TextboxNoOverlap(0x2312, this);
MessageNoOverlap(0x2312, this);
if (CheckLocalFlag(0x3f) != 0) {
return;
}
@@ -124,13 +124,13 @@ void sub_0806B540(Entity* this) {
SetLocalFlag(0x3f);
break;
case 1:
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
context->unk_18 = 2;
TextboxNoOverlap(0x2315, this);
MessageNoOverlap(0x2315, this);
}
break;
case 2:
if ((gTextBox.doTextBox & 0x7f) == 0) {
if ((gMessage.doTextBox & 0x7f) == 0) {
context->unk_18 = 3;
if (gSave.stats.filler3[0] != 0) {
sub_080A7C18(0x58, 0, 0);
+3 -3
View File
@@ -109,10 +109,10 @@ void sub_0806E1FC(Entity* this) {
void sub_0806E20C(void) {
if (gScreenTransition.field_0x6 != 0) {
TextboxNoOverlapFollow(0x421f);
gTextBox.field_0x10 = gScreenTransition.field_0x6;
MessageFromTarget(0x421f);
gMessage.field_0x10 = gScreenTransition.field_0x6;
} else {
TextboxNoOverlapFollow(0x4220);
MessageFromTarget(0x4220);
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ void sub_08063A98(Entity* this) {
ASM_FUNC("asm/non_matching/pina/sub_08063AC0.inc", void sub_08063AC0(Entity* this))
void sub_08063B44(Entity* this) {
u8 tmp = gTextBox.doTextBox & 0x7f;
u8 tmp = gMessage.doTextBox & 0x7f;
if (tmp == 0) {
this->action = 1;
this->field_0xf = tmp;
+1 -1
View File
@@ -61,7 +61,7 @@ bool32 sub_08062EDC(Entity* this, ScriptExecutionContext* context) {
tmp = sub_080028F4(gUnk_0810C435);
tmp2 = gUnk_0810C43D[tmp];
sub_080A7C18(0x5c, tmp2, 1);
TextboxNoOverlap(0x3c05, this);
MessageNoOverlap(0x3c05, this);
context->condition = TRUE;
return TRUE;
}
+4 -4
View File
@@ -65,7 +65,7 @@ void sub_0806045C(Entity* this) {
case 1:
case 2:
this->action = 2;
TextboxNoOverlapFollow(0);
MessageFromTarget(0);
break;
default:
bVar1 = this->knockbackDirection;
@@ -140,7 +140,7 @@ void sub_08060528(Entity* this) {
break;
case 2:
UpdateAnimationSingleFrame(this);
if ((gTextBox.doTextBox & 0x7f) != 0) {
if ((gMessage.doTextBox & 0x7f) != 0) {
break;
}
this->action = 1;
@@ -156,7 +156,7 @@ void sub_08060528(Entity* this) {
if (0 < (s16)this->field_0x6a.HWORD) {
if ((s16)this->field_0x6a.HWORD > 0x12b) {
this->field_0x6a.HWORD = 0;
this->field_0x20 = 0x20000;
this->hVelocity = 0x20000;
this->field_0x6c.HALF.HI = 1;
sub_080788E0(this);
EnqueueSFX(0x7c);
@@ -165,7 +165,7 @@ void sub_08060528(Entity* this) {
}
}
sub_08003FC4(this, 0x1800);
if (((this->field_0x6c.HALF.HI != 0) && (this->field_0x20 == 0)) && this->height.WORD == 0) {
if (((this->field_0x6c.HALF.HI != 0) && (this->hVelocity == 0)) && this->height.WORD == 0) {
this->field_0x6c.HALF.HI = 0;
sub_080606C0(this);
}
+1 -1
View File
@@ -302,7 +302,7 @@ void sub_0806AA18(Entity* this) {
} else {
index = 0x440d;
}
TextboxNoOverlap(index, this);
MessageNoOverlap(index, this);
}
ASM_FUNC("asm/non_matching/rem/sub_0806AA50.inc", void sub_0806AA50(Entity* this, ScriptExecutionContext* context))
+1 -1
View File
@@ -20,7 +20,7 @@ void SmallTownMinish(Entity* this) {
} else {
sub_0807DD94(this, NULL);
}
if ((gPlayerState.flags.all & 0x80) != 0) {
if ((gPlayerState.flags & 0x80) != 0) {
this->spriteSettings.b.draw = 1;
} else {
this->spriteSettings.b.draw = 0;
+1 -1
View File
@@ -91,7 +91,7 @@ void sub_08066118(Entity* this) {
}
if (this->interactType != 0) {
this->action = 2;
TextboxNoOverlapFollow(0);
MessageFromTarget(0);
}
}
+2 -2
View File
@@ -41,13 +41,13 @@ void sub_08062C24(Entity* ent) {
GetNextFrame(ent);
if ((ent->frames.all & 128) != 0) {
InitializeAnimation(ent, 4);
TextboxNoOverlapFollow(2561);
MessageFromTarget(2561);
ent->action++;
}
}
void sub_08062C54(Entity* ent) {
if ((gTextBox.doTextBox & 127) == 0) {
if ((gMessage.doTextBox & 127) == 0) {
ent->action = 1;
InitializeAnimation(ent, 0);
sub_0805E584(ent);

Some files were not shown because too many files have changed in this diff Show More