Merge remote-tracking branch 'upstream/master'

This commit is contained in:
theo3
2020-08-17 21:40:24 -07:00
32 changed files with 1346 additions and 2292 deletions
+4 -4
View File
@@ -31,7 +31,7 @@ void sub_0809ED54(Entity *this)
if (((this->cutsceneBeh.HWORD == 0) || CheckFlags(this->cutsceneBeh.HWORD)) &&
((this->entityType.parameter != 1 ||
(--this->field_0x74 == 0)))) {
(--this->field_0x74.HWORD == 0)))) {
sub_0809EE08(this);
}
}
@@ -52,7 +52,7 @@ void sub_0809ED88(Entity *this)
sub_0809EE24(this);
}
else if (((this->entityType).parameter == 1) &&
(--this->field_0x74 == 0)) {
(--this->field_0x74.HWORD == 0)) {
sub_0809EE24(this);
}
}
@@ -69,7 +69,7 @@ void sub_0809EDE4(Entity *this)
void sub_0809EE08(Entity *this)
{
this->action = 2;
this->field_0x74 = *((u8 *)&this->field_0x7c + 3) << 2;
this->field_0x74.HWORD = *((u8 *)&this->field_0x7c + 3) << 2;
InitializeAnimation(this, this->entityType.form);
}
@@ -82,5 +82,5 @@ void sub_0809EE24(Entity *this)
void sub_0809EE34(Entity *this)
{
this->action = 1;
this->field_0x74 = this->actionDelay << 2;
this->field_0x74.HWORD = this->actionDelay << 2;
}
+2 -2
View File
@@ -73,7 +73,7 @@ void sub_0809EAD8(Entity* this) {
if (this->entityType.parameter != 0) {
this->attachedEntity = GetCurrentRoomProperty(this->entityType.parameter);
sub_080A2CC0(this, &this->attachedEntity, &this->field_0x74);
sub_080A2CC0(this, &this->attachedEntity, &this->field_0x74.HWORD);
} else {
SetTile(0x4050, COORD_TO_TILE(this), this->collisionLayer);
@@ -88,7 +88,7 @@ void sub_0809EB30(Entity* this) {
if ((this->direction & 0x80) == 0) {
sub_0806F69C(this);
}
puVar2 = &this->field_0x74;
puVar2 = &this->field_0x74.HWORD;
if (!--*puVar2) {
sub_080A2CC0(this, &this->attachedEntity, puVar2);
}
+2 -2
View File
@@ -68,7 +68,7 @@ void sub_080929A4(Entity *this) {
this->field_0x7c.HALF.HI = COORD_TO_TILE(this);
this->field_0x7c.HALF.LO = sub_080001DA(this->field_0x7c.HALF.HI, 1);
this->field_0x7a = sub_080002E0(this->field_0x7c.HALF.HI, 1);
this->field_0x7a.HWORD = sub_080002E0(this->field_0x7c.HALF.HI, 1);
SetTile(0x4022, this->field_0x7c.HALF.HI, 1);
}
@@ -96,7 +96,7 @@ void sub_08092A94(Entity *this) {
// Presumably, make the mask fall
SetTile((u16)this->field_0x7c.HALF.LO, this->field_0x7c.HALF.HI, 1);
sub_08000148(this->field_0x7a, this->field_0x7c.HALF.HI, 1);
sub_08000148(this->field_0x7a.HWORD, this->field_0x7c.HALF.HI, 1);
this->action = 2;
+10 -10
View File
@@ -34,7 +34,7 @@ void sub_080A0684(Entity *this)
this->spritePriority.b0 = 5;
this->field_0x70.HALF.LO = this->x.HALF.HI;
this->field_0x70.HALF.HI = this->y.HALF.HI;
this->field_0x74 = COORD_TO_TILE(this);
this->field_0x74.HWORD = COORD_TO_TILE(this);
}
void sub_080A0718(Entity *this)
@@ -99,17 +99,17 @@ void sub_080A07F0(Entity *this)
void sub_080A080C(Entity *this)
{
this->field_0x76 = sub_080001DA(this->field_0x74 - 1, this->collisionLayer);
this->field_0x78.HWORD = sub_080001DA(this->field_0x74, this->collisionLayer);
this->field_0x7a = sub_080001DA(this->field_0x74 + 1, this->collisionLayer);
SetTile(0x4022, this->field_0x74 - 1, this->collisionLayer);
SetTile(0x4022, this->field_0x74, this->collisionLayer);
SetTile(0x4022, this->field_0x74 + 1, this->collisionLayer);
this->field_0x76.HWORD = sub_080001DA(this->field_0x74.HWORD - 1, this->collisionLayer);
this->field_0x78.HWORD = sub_080001DA(this->field_0x74.HWORD, this->collisionLayer);
this->field_0x7a.HWORD = sub_080001DA(this->field_0x74.HWORD + 1, this->collisionLayer);
SetTile(0x4022, this->field_0x74.HWORD - 1, this->collisionLayer);
SetTile(0x4022, this->field_0x74.HWORD, this->collisionLayer);
SetTile(0x4022, this->field_0x74.HWORD + 1, this->collisionLayer);
}
void sub_080A0870(Entity *this)
{
SetTile(this->field_0x76, this->field_0x74 - 1, this->collisionLayer);
SetTile(this->field_0x78.HWORD, this->field_0x74, this->collisionLayer);
SetTile(this->field_0x7a, this->field_0x74 + 1, this->collisionLayer);
SetTile(this->field_0x76.HWORD, this->field_0x74.HWORD - 1, this->collisionLayer);
SetTile(this->field_0x78.HWORD, this->field_0x74.HWORD, this->collisionLayer);
SetTile(this->field_0x7a.HWORD, this->field_0x74.HWORD + 1, this->collisionLayer);
}
+5 -5
View File
@@ -33,7 +33,7 @@ void sub_080851AC(Entity* this) {
this->animationState = this->entityType.parameter & 2;
if ((this->entityType).form == 3) {
uVar1 = CheckFlags(this->field_0x86);
this->field_0x7a = uVar1;
this->field_0x7a.HWORD = uVar1;
if ((u16)(uVar1 & -1) != 0) {
this->animationState = (this->animationState + 2) & 3;
this->action = 3;
@@ -62,7 +62,7 @@ void sub_080852B4(Entity* this) {
if (--this->field_0xf == 0) {
this->action = 3;
this->field_0xf = this->actionDelay;
this->field_0x7a = CheckFlags(this->field_0x86);
this->field_0x7a.HWORD = CheckFlags(this->field_0x86);
this->animationState = (this->animationState + *(u8*)&this->field_0x7c) & 3;
InitializeAnimation(this, this->animationState);
sub_08085394(this);
@@ -114,7 +114,7 @@ void sub_08085394(Entity *this)
iVar3 = this->animationState / 2;
layerData = *(u16 **)&this->field_0x70;
uVar4 = COORD_TO_TILE(this);
this->field_0x74 = layerData[gUnk_080B4488[iVar3]];
this->field_0x74.HWORD = layerData[gUnk_080B4488[iVar3]];
pbVar5 = &this->collisionLayer;
SetTile(uVar1, uVar4 - iVar3, *pbVar5);
this->field_0x76 = layerData[0];
@@ -137,8 +137,8 @@ void sub_0808543C(Entity *this)
temp = gUnk_080B4488[this->animationState / 2][0];
uVar2 = COORD_TO_TILE(this);
SetTile(this->field_0x74, uVar2 - temp, this->collisionLayer);
SetTile(this->field_0x76, uVar2, this->collisionLayer);
SetTile(this->field_0x74.HWORD, uVar2 - temp, this->collisionLayer);
SetTile(this->field_0x76.HWORD, uVar2, this->collisionLayer);
SetTile(this->field_0x78.HWORD, uVar2 + temp, this->collisionLayer);
}