mirror of
https://github.com/zeldaret/tmc
synced 2026-07-11 07:25:23 -04:00
entity changes, textbox changes
This commit is contained in:
+3
-3
@@ -29,7 +29,7 @@ void sub_0809CF54(Entity* this) {
|
||||
this->spriteSettings.b.draw = TRUE;
|
||||
this->actionDelay = 0x31;
|
||||
this->field_0xf = 1;
|
||||
this->field_0x20 = -0x18000;
|
||||
this->hVelocity = -0x18000;
|
||||
this->height.WORD = -0x38C000;
|
||||
this->field_0x68.HWORD = -0x800;
|
||||
this->speed = 0x280;
|
||||
@@ -85,7 +85,7 @@ void sub_0809D084(Entity* this) {
|
||||
PositionRelative(this->parent, this, 0, 0x80000);
|
||||
} else {
|
||||
this->subAction++;
|
||||
this->field_0x20 = temp;
|
||||
this->hVelocity = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,7 @@ void sub_0809D10C(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0809D130(Entity* this) {
|
||||
if ((gPlayerState.flags.all & 0x80) != 0) {
|
||||
if ((gPlayerState.flags & 0x80) != 0) {
|
||||
sub_0800445C(this);
|
||||
} else if (sub_08017850(this) != 0) {
|
||||
CreateItemEntity(0x17, 0, 0);
|
||||
|
||||
+3
-3
@@ -97,7 +97,7 @@ void sub_0809B4A8(Entity* this) {
|
||||
|
||||
gPlayerState.pushedObject = 0x9e;
|
||||
gPlayerState.playerAction = 5;
|
||||
gPlayerState.flags.all |= 1;
|
||||
gPlayerState.flags |= 1;
|
||||
|
||||
gPlayerEntity.x.HALF.LO = 0;
|
||||
gPlayerEntity.y.HALF.LO = 0;
|
||||
@@ -143,7 +143,7 @@ void sub_0809B56C(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0809B5B4(Entity* this) {
|
||||
if (gPlayerState.flags.all & 0x80) {
|
||||
if (gPlayerState.flags & 0x80) {
|
||||
sub_0800445C(this);
|
||||
} else if (sub_08017850(this)) {
|
||||
CreateItemEntity(this->type + 0x39, 0, 0);
|
||||
@@ -197,7 +197,7 @@ void sub_0809B5EC(Entity* this) {
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
u8 doTextBox = gTextBox.doTextBox & 0x7f;
|
||||
u8 doTextBox = gMessage.doTextBox & 0x7f;
|
||||
if (!doTextBox) {
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->subAction = doTextBox;
|
||||
|
||||
+2
-2
@@ -153,11 +153,11 @@ Entity* sub_08081D74(Entity* this) {
|
||||
}
|
||||
ent = 0;
|
||||
if (sub_08081E0C(this)) {
|
||||
if (!(gPlayerState.flags.all & 0x10) && !(gPlayerState.flags.all & 0x80)) {
|
||||
if (!(gPlayerState.flags & 0x10) && !(gPlayerState.flags & 0x80)) {
|
||||
ent = &gPlayerEntity;
|
||||
}
|
||||
} else {
|
||||
if (gPlayerState.flags.all & 0x400000) {
|
||||
if (gPlayerState.flags & 0x400000) {
|
||||
if (sub_080041A0(this, gUnk_03004040[0], 5, 6)) {
|
||||
ent = gUnk_03004040[0];
|
||||
} else if (sub_080041A0(this, gUnk_03004040[1], 5, 6)) {
|
||||
|
||||
@@ -181,7 +181,7 @@ void sub_0808EA28(Entity* this) {
|
||||
u32 var1;
|
||||
|
||||
if (this->type == 3) {
|
||||
if (gUnk_02000000->gameLanguage > LANGUAGE_EN) {
|
||||
if (gSaveHeader->gameLanguage > LANGUAGE_EN) {
|
||||
this->spriteSettings.b.draw = 2;
|
||||
} else {
|
||||
this->spriteSettings.b.draw = 0;
|
||||
|
||||
@@ -59,7 +59,7 @@ static void sub_0808E714(Entity* this) {
|
||||
|
||||
static void sub_0808E764(Entity* this) {
|
||||
sub_08080CB4(this);
|
||||
if (!(gPlayerState.flags.all & 0x80) && sub_08017850(this)) {
|
||||
if (!(gPlayerState.flags & 0x80) && sub_08017850(this)) {
|
||||
SetFlag(this->cutsceneBeh.HWORD);
|
||||
CreateItemEntity(0x62, 0, 0);
|
||||
DeleteThisEntity();
|
||||
|
||||
@@ -150,8 +150,8 @@ void sub_080810A8(Entity* this) {
|
||||
this->direction |= 0xFF;
|
||||
}
|
||||
|
||||
if (this->field_0x20 == 0) {
|
||||
this->field_0x20 = 0x1E000;
|
||||
if (this->hVelocity == 0) {
|
||||
this->hVelocity = 0x1E000;
|
||||
}
|
||||
|
||||
if (this->collisionLayer == 2) {
|
||||
@@ -218,7 +218,7 @@ void sub_080811EC(Entity* this) {
|
||||
}
|
||||
|
||||
sub_08003FC4(this, 0x2800);
|
||||
if (this->field_0x20 <= 0) {
|
||||
if (this->hVelocity <= 0) {
|
||||
this->action = 2;
|
||||
this->flags |= 0x80;
|
||||
sub_080814A4(this);
|
||||
@@ -273,7 +273,7 @@ void sub_080812E8(Entity* this) {
|
||||
#ifdef EU
|
||||
if ((playerState->swimState & 0x80) && sub_080177A0(this, &gPlayerEntity)) {
|
||||
#else
|
||||
if ((playerState->swimState & 0x80) && !(playerState->flags.all & 0x80) && sub_080177A0(this, &gPlayerEntity)) {
|
||||
if ((playerState->swimState & 0x80) && !(playerState->flags & 0x80) && sub_080177A0(this, &gPlayerEntity)) {
|
||||
#endif
|
||||
sub_080810FC(this);
|
||||
}
|
||||
@@ -413,7 +413,7 @@ void sub_0808153C(Entity* this) {
|
||||
if (this->field_0x68.HALF.LO == 0) {
|
||||
if (!sub_08003FC4(this, 0x1000) && !sub_0800442E(this)) {
|
||||
this->field_0x68.HALF.LO = 1;
|
||||
this->field_0x20 = 0x1E000;
|
||||
this->hVelocity = 0x1E000;
|
||||
sub_0808148C(this->type);
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
}
|
||||
@@ -433,7 +433,7 @@ void sub_08081598(Entity* this) {
|
||||
this->flags &= 0x7F;
|
||||
this->action = 4;
|
||||
this->actionDelay = 14;
|
||||
this->field_0x20 = 0x20000;
|
||||
this->hVelocity = 0x20000;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->spritePriority.b1 = 2;
|
||||
this->spritePriority.b0 = 3;
|
||||
|
||||
@@ -63,7 +63,7 @@ void sub_0808BF58(Entity* this) {
|
||||
sub_08003FC4(this, 0x2000);
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
if (this->field_0x20 <= 98303) {
|
||||
if (this->hVelocity <= 98303) {
|
||||
++this->subAction;
|
||||
InitAnimationForceUpdate(this, 2);
|
||||
}
|
||||
@@ -72,7 +72,7 @@ void sub_0808BF58(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (!this->height.HALF.HI) {
|
||||
++this->subAction;
|
||||
this->field_0x20 = 0x8000;
|
||||
this->hVelocity = 0x8000;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
@@ -111,7 +111,7 @@ void sub_0808C01C(Entity* this, u32 r1) {
|
||||
type = 2;
|
||||
gArea.curPortalType = type;
|
||||
if (r1 == 1) {
|
||||
if (((gPlayerState.flags.all & 0x20) != 0) && (gPlayerState.jumpStatus == 0)) {
|
||||
if (((gPlayerState.flags & 0x20) != 0) && (gPlayerState.jumpStatus == 0)) {
|
||||
gArea.field_0x18 = 2;
|
||||
} else {
|
||||
if (sub_08057810() != 0) {
|
||||
@@ -131,7 +131,7 @@ void sub_0808C0AC(Entity* this) {
|
||||
sub_08003FC4(this, 0x2000);
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
if (this->field_0x20 <= 98303) {
|
||||
if (this->hVelocity <= 98303) {
|
||||
this->subAction = 1;
|
||||
InitAnimationForceUpdate(this, 3);
|
||||
}
|
||||
@@ -140,7 +140,7 @@ void sub_0808C0AC(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (!this->height.HALF.HI) {
|
||||
++this->subAction;
|
||||
this->field_0x20 = 0x8000;
|
||||
this->hVelocity = 0x8000;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
@@ -160,7 +160,7 @@ u32 sub_0808C128(Entity* this) {
|
||||
|
||||
void sub_0808C13C(Entity* this) {
|
||||
this->subAction = 0;
|
||||
this->field_0x20 = 163840;
|
||||
this->hVelocity = 163840;
|
||||
}
|
||||
|
||||
void sub_0808C148(Entity* this, u32 a2) {
|
||||
|
||||
@@ -32,7 +32,7 @@ void LilypadSmall(Entity* this) {
|
||||
}
|
||||
|
||||
u32 sub_08097ADC(Entity* this) {
|
||||
if ((gPlayerState.flags.all & 0x80) == 0) {
|
||||
if ((gPlayerState.flags & 0x80) == 0) {
|
||||
return 0;
|
||||
} else if (sub_080041A0(this, &gPlayerEntity, 8, 8) == 0) {
|
||||
return 0;
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ void sub_080929A4(Entity* this) {
|
||||
}
|
||||
|
||||
this->action = 1;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
|
||||
this->field_0x78.HWORD = ((Random() & 7) << 10) | 0x2000;
|
||||
|
||||
|
||||
+11
-11
@@ -36,7 +36,7 @@ void sub_080916EC(Entity* this) {
|
||||
struct_030010EC* unk = &gUnk_030010EC[this->actionDelay];
|
||||
|
||||
*(struct_030010EC**)&this->cutsceneBeh.HWORD = unk;
|
||||
if ((gRoomControls.roomID != unk->field_0x4) || (gPlayerState.flags.all & 0x1000) != 0) {
|
||||
if ((gRoomControls.roomID != unk->field_0x4) || (gPlayerState.flags & 0x1000) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
this->x.HALF.HI = gRoomControls.roomOriginX + ((unk->field_0x0 & 0x3f) << 4) + 8;
|
||||
@@ -60,13 +60,13 @@ void sub_080916EC(Entity* this) {
|
||||
void sub_080917DC(Entity* this) {
|
||||
|
||||
if ((this->bitfield & 0x7f) == 0x1d) {
|
||||
this->field_0x20 = 0x2a000;
|
||||
this->hVelocity = 0x2a000;
|
||||
this->action = 7;
|
||||
InitAnimationForceUpdate(this, this->type2 + 4 + this->animationState);
|
||||
SoundReq(SFX_13B);
|
||||
} else {
|
||||
if (sub_0800445C(this) != 0) {
|
||||
if (((gPlayerState.flags.all & 0x40080) == 0) && (gPlayerState.field_0x1c == 0) &&
|
||||
if (((gPlayerState.flags & 0x40080) == 0) && (gPlayerState.field_0x1c == 0) &&
|
||||
(gPlayerState.heldObject == 0) && (gPlayerState.jumpStatus == 0)) {
|
||||
this->actionDelay++;
|
||||
} else {
|
||||
@@ -79,8 +79,8 @@ void sub_080917DC(Entity* this) {
|
||||
if (8 < this->actionDelay) {
|
||||
this->action = this->action + 1;
|
||||
gPlayerState.jumpStatus = 0x81;
|
||||
gPlayerState.flags.all |= 0x4000000;
|
||||
gPlayerEntity.field_0x20 = 0x20000;
|
||||
gPlayerState.flags |= 0x4000000;
|
||||
gPlayerEntity.hVelocity = 0x20000;
|
||||
gPlayerEntity.speed = 0x100;
|
||||
gPlayerEntity.flags &= 0x7f;
|
||||
ResetPlayer();
|
||||
@@ -98,11 +98,11 @@ void sub_080918A4(Entity* this) {
|
||||
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
|
||||
gPlayerEntity.y.HALF.HI = this->y.HALF.HI;
|
||||
if (gPlayerEntity.height.HALF.HI > -0x10) {
|
||||
if ((s32)gPlayerEntity.field_0x20 > -1) {
|
||||
if ((s32)gPlayerEntity.hVelocity > -1) {
|
||||
return;
|
||||
}
|
||||
gPlayerEntity.animationState = this->animationState << 1;
|
||||
gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x4000000) | 0x1000;
|
||||
gPlayerState.flags = (gPlayerState.flags ^ 0x4000000) | 0x1000;
|
||||
this->action++;
|
||||
this->field_0xf = 1;
|
||||
this->flags |= 0x20;
|
||||
@@ -118,7 +118,7 @@ void sub_080918A4(Entity* this) {
|
||||
} else {
|
||||
gPlayerEntity.direction = GetFacingDirection(&gPlayerEntity, this);
|
||||
}
|
||||
if (gPlayerEntity.field_0x20 < 0) {
|
||||
if (gPlayerEntity.hVelocity < 0) {
|
||||
gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1;
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ void sub_080919AC(Entity* this) {
|
||||
u32 uVar3;
|
||||
|
||||
gRoomControls.unk5 = 7;
|
||||
if ((gPlayerState.flags.all & 0x1000) == 0) {
|
||||
if ((gPlayerState.flags & 0x1000) == 0) {
|
||||
this->action = 1;
|
||||
return;
|
||||
}
|
||||
@@ -174,8 +174,8 @@ void sub_080919AC(Entity* this) {
|
||||
this->action = 6;
|
||||
sub_08017744(this);
|
||||
gPlayerState.jumpStatus = 0x41;
|
||||
gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x1000) | 0x4000000;
|
||||
gPlayerEntity.field_0x20 = 0x20000;
|
||||
gPlayerState.flags = (gPlayerState.flags ^ 0x1000) | 0x4000000;
|
||||
gPlayerEntity.hVelocity = 0x20000;
|
||||
gPlayerEntity.speed = 0x200;
|
||||
gPlayerEntity.animationState = this->animationState << 1;
|
||||
gPlayerEntity.direction = this->direction;
|
||||
|
||||
@@ -27,11 +27,11 @@ void sub_08090F00(Entity* this) {
|
||||
if (this->type == 1) {
|
||||
Entity* parent = this->parent;
|
||||
u32 mask = 1 << this->field_0xf;
|
||||
if (!(parent->field_0x20 & mask)) {
|
||||
if (!(parent->hVelocity & mask)) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
if ((gPlayerState.flags.all & 0x80) && sub_080041A0(this, &gPlayerEntity, 4, 4) &&
|
||||
if ((gPlayerState.flags & 0x80) && sub_080041A0(this, &gPlayerEntity, 4, 4) &&
|
||||
(gPlayerEntity.height.HALF.HI == 0) && (((u16)gPlayerState.field_0x90.HALF.LO) & gUnk_0812225C[this->type2])) {
|
||||
DoExitTransition(GetCurrentRoomProperty(this->actionDelay));
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ void sub_08086A6C(Entity* ent) {
|
||||
u32 uVar1;
|
||||
|
||||
uVar1 = Random();
|
||||
ent->field_0x20 = 163840;
|
||||
ent->hVelocity = 163840;
|
||||
ent->direction = (uVar1 >> 16) & 31;
|
||||
ent->speed = uVar1 & 480;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ void Object1C(Entity* this) {
|
||||
this->action = 1;
|
||||
}
|
||||
if (CheckRectOnScreen(this->field_0x80.HWORD, this->field_0x82.HWORD, 0x10, 0x10) == 0) {
|
||||
this->parent->field_0x20 &= ~(1 << this->type2);
|
||||
this->parent->hVelocity &= ~(1 << this->type2);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,5 +75,5 @@ void sub_08099ECC(Entity* this) {
|
||||
CopyPosition(this, &gPlayerEntity);
|
||||
gPlayerState.playerAction = 3;
|
||||
gPlayerState.field_0x34[4] = 0;
|
||||
gPlayerState.flags.all |= 0x8000;
|
||||
gPlayerState.flags |= 0x8000;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ void sub_0809F318(Entity* this) {
|
||||
void sub_0809F374(Entity* this) {
|
||||
sub_0806F69C(this);
|
||||
#ifndef EU
|
||||
if (gUnk_02000000->gameLanguage < 2) {
|
||||
if (gSaveHeader->gameLanguage < 2) {
|
||||
if (sub_080044EC(this, 0x2000) < 2) {
|
||||
this->height.WORD = 0;
|
||||
this->action = 2;
|
||||
|
||||
+4
-4
@@ -67,7 +67,7 @@ void sub_08082310(Entity* this) {
|
||||
case 0x1D:
|
||||
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
|
||||
this->action = 5;
|
||||
this->field_0x20 = 0x2A000;
|
||||
this->hVelocity = 0x2A000;
|
||||
this->spriteOffsetY = 0;
|
||||
this->spriteSettings.b.shadow = 1;
|
||||
this->spritePriority.b1 = 3;
|
||||
@@ -85,7 +85,7 @@ void sub_08082310(Entity* this) {
|
||||
this->direction = (tileType - 0x4001) * 8;
|
||||
this->actionDelay = 32;
|
||||
this->action = 4;
|
||||
if (gPlayerState.flags.all & 0x80) {
|
||||
if (gPlayerState.flags & 0x80) {
|
||||
this->speed >>= 1;
|
||||
this->actionDelay = 64;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ void sub_08082614(Entity* this) {
|
||||
}
|
||||
|
||||
this->action = 1;
|
||||
if (gPlayerState.flags.all & 0x80) {
|
||||
if (gPlayerState.flags & 0x80) {
|
||||
this->speed <<= 1;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ void sub_08082818(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08082824(Entity* this) {
|
||||
if (this->field_0x20 < 0) {
|
||||
if (this->hVelocity < 0) {
|
||||
this->spriteSettings.b.flipY = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@ void sub_080933D8(Entity* this) {
|
||||
void sub_080933FC(Entity* this) {
|
||||
if (this->interactType != 0) {
|
||||
this->interactType = 0;
|
||||
TextboxNoOverlap(gUnk_081228B8[this->type], this);
|
||||
MessageNoOverlap(gUnk_081228B8[this->type], this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ void sub_0808B73C(Entity* this) {
|
||||
}
|
||||
|
||||
u32 sub_0808B7C8(Entity* this) {
|
||||
if (!(gPlayerState.flags.all & 0x80) && gPlayerState.field_0xa8 != 0x12 && gPlayerEntity.currentHealth != 0 &&
|
||||
if (!(gPlayerState.flags & 0x80) && gPlayerState.field_0xa8 != 0x12 && gPlayerEntity.currentHealth != 0 &&
|
||||
sub_08079F8C() && sub_080041A0(this, &gPlayerEntity, 5, 5) && gPlayerEntity.height.HALF.HI == 0) {
|
||||
if (this->actionDelay == 0 && gPlayerEntity.action == 0x1b) {
|
||||
sub_080791D0();
|
||||
|
||||
Reference in New Issue
Block a user