Merge remote-tracking branch 'upstream/master' into coord

This commit is contained in:
Tal Hayon
2022-01-23 17:24:55 +02:00
149 changed files with 693 additions and 827 deletions
+1 -1
View File
@@ -275,7 +275,7 @@ void sub_0806D4C0(Entity* this, u32 param) {
if (npc != NULL) {
npc->parent = this;
CopyPosition(this, npc);
ResolveEntityOnTop(this, npc);
SortEntityAbove(this, npc);
SetDefaultPriority(npc, PRIO_MESSAGE);
}
}
+1 -1
View File
@@ -167,7 +167,7 @@ static void sub_08068BEC(Entity* this, u32 unused) {
target = CreateFx(this, FX_WHITE_SPLASH, 0);
if (target) {
target->spritePriority.b0 = 1;
PositionRelative(this, target, 0, -0x100000);
PositionRelative(this, target, 0, Q_16_16(-16.0));
SoundReq(SFX_FA);
}
}
+2 -2
View File
@@ -134,7 +134,7 @@ void sub_080675D4(Entity* this) {
ent->collisionLayer = this->collisionLayer;
ent->spriteOrientation.flipY = this->spriteOrientation.flipY;
ent->spriteRendering.b3 = this->spriteRendering.b3;
ResolveEntityOnTop(this, ent);
SortEntityAbove(this, ent);
}
};
gUnk = gUnk_08110E8A;
@@ -147,7 +147,7 @@ void sub_080675D4(Entity* this) {
ent->collisionLayer = this->collisionLayer;
ent->spriteOrientation.flipY = this->spriteOrientation.flipY;
ent->spriteRendering.b3 = this->spriteRendering.b3;
ResolveEntityOnTop(this, ent);
SortEntityAbove(this, ent);
}
};
if (this->subAction > 2) {
+1 -1
View File
@@ -75,7 +75,7 @@ void CuccoChick_Fusion(Entity* this) {
this->frameIndex = 1;
} else {
if (GravityUpdate(this, 0x3000) == 0) {
this->zVelocity = 0x10000;
this->zVelocity = Q_16_16(1.0);
}
}
}
+1 -1
View File
@@ -22,7 +22,7 @@ void DrLeft(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->frameIndex = 0;
ResolveEntityBelow(this, this);
SortEntityBelow(this, this);
}
}
}
+1 -1
View File
@@ -54,7 +54,7 @@ void sub_0806D96C(Entity* this) {
Entity* fx = CreateFx(this, FX_STEAM_EFC, 0);
if (fx != NULL) {
fx->spritePriority.b0 = 1;
PositionRelative(this, fx, 0, 0xFFE80000);
PositionRelative(this, fx, 0, Q_16_16(-24.0));
}
}
+6 -6
View File
@@ -70,11 +70,11 @@ void sub_080693D0(Entity* this) {
if (this->frame == 1) {
this->frame = 0;
sub_08069428(this, 0xFFF80000, createFx65);
sub_08069428(this, Q_16_16(-8.0), createFx65);
}
if (this->frame == 2) {
this->frame = 0;
sub_08069428(this, 0x80 << 12, createFx65);
sub_08069428(this, Q_16_16(8.0), createFx65);
}
}
}
@@ -82,14 +82,14 @@ void sub_080693D0(Entity* this) {
void sub_08069428(Entity* this, s32 offsetX, bool32 createFx65) {
Entity* fx = CreateFx(this, FX_ROCK, 0);
if (fx) {
PositionRelative(this, fx, offsetX, 0xFFF00000);
ResolveEntityOnTop(this, fx);
PositionRelative(this, fx, offsetX, Q_16_16(-16.0));
SortEntityAbove(this, fx);
}
if (createFx65 != 0) {
fx = CreateFx(this, FX_REFLECT4, 0);
if (fx) {
PositionRelative(this, fx, offsetX, 0xFFF00000);
ResolveEntityOnTop(this, fx);
PositionRelative(this, fx, offsetX, Q_16_16(-16.0));
SortEntityAbove(this, fx);
}
}
}
+2 -2
View File
@@ -22,13 +22,13 @@ void sub_0806CAF4(Entity* this) {
if (npc != NULL) {
npc->parent = this;
CopyPosition(this, npc);
ResolveEntityBelow(this, npc);
SortEntityBelow(this, npc);
}
npc = CreateNPC(0x4a, 2, 0);
if (npc != NULL) {
npc->parent = this;
CopyPosition(this, npc);
ResolveEntityOnTop(this, npc);
SortEntityAbove(this, npc);
}
sub_0807DD64(this);
sub_08078778(this);
+1 -1
View File
@@ -243,7 +243,7 @@ void sub_080626E0(Entity* this, ScriptExecutionContext* context) {
uVar4 = Random();
this->direction = (this->direction + uVar4 % 0xb) - 5;
}
sub_0806F62C(this, (s32)this->speed, (u32)this->direction);
LinearMoveAngle(this, (s32)this->speed, (u32)this->direction);
if ((u32)((this->x.HALF.HI - context->x.HALF.HI) * 0x100 + ((s32)((u32)(u16)this->speed << 0x10) >> 0x11)) <=
(u32)(s32)this->speed) {
this->x.HALF.HI = context->x.HALF.HI;
+2 -2
View File
@@ -58,12 +58,12 @@ void sub_08065914(Entity* this) {
target = FindEntityByID(7, 0x1F, 7);
if (target != NULL) {
PositionRelative(this, target, 0x180000, -0x10000);
PositionRelative(this, target, Q_16_16(24.0), Q_16_16(-1.0));
target->parent = this;
}
target = FindEntityByID(7, 0x20, 7);
if (target != NULL) {
PositionRelative(this, target, 0x280000, 0);
PositionRelative(this, target, Q_16_16(40.0), 0);
target->parent = this;
}
}
+1 -1
View File
@@ -86,7 +86,7 @@ void sub_08068780(Entity* this) {
}
ent = CreateFx(this, FX_STARS2, 0x20);
if (ent != NULL) {
PositionRelative(this, ent, 0x180000, -0xa0000);
PositionRelative(this, ent, Q_16_16(24.0), Q_16_16(-10.0));
}
}
}
+2 -2
View File
@@ -140,12 +140,12 @@ void sub_0806DB84(Entity* this, ScriptExecutionContext* context) {
this->hitbox = (Hitbox*)&gUnk_08114154;
ent = CreateObject(OBJECT_3E, 4, 0);
if (ent != NULL) {
PositionRelative(this, ent, -0x80000, 0);
PositionRelative(this, ent, Q_16_16(-8.0), 0);
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &script_Object3ELeftStoneOpening);
}
ent = CreateObject(OBJECT_3E, 5, 0);
if (ent != NULL) {
PositionRelative(this, ent, 0x80000, 0);
PositionRelative(this, ent, Q_16_16(8.0), 0);
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &script_Object3ERightStoneOpening);
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ void Pita(Entity* this) {
if (this->action == 0) {
this->action += 1;
SetDefaultPriority(this, PRIO_MESSAGE);
ResolveEntityOnTop(this, this);
SortEntityAbove(this, this);
this->hitbox = &gUnk_0810C428;
sub_0807DD64(this);
}
+1 -1
View File
@@ -143,7 +143,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->zVelocity = 0x20000;
this->zVelocity = Q_16_16(2.0);
this->field_0x6c.HALF.HI = 1;
sub_080788E0(this);
EnqueueSFX(0x7c);
+2 -2
View File
@@ -235,7 +235,7 @@ void sub_0806A914(Entity* this) {
Entity* npc = CreateNPC(0x37, 1, 0);
if (npc != NULL) {
CopyPosition(this, npc);
ResolveEntityOnTop(this, npc);
SortEntityAbove(this, npc);
}
}
@@ -279,7 +279,7 @@ void sub_0806A9E8(Entity* this) {
Entity* npc = CreateNPC(0x37, 4, 0);
if (npc != NULL) {
CopyPosition(this, npc);
ResolveEntityBelow(this, npc);
SortEntityBelow(this, npc);
}
}
+2 -2
View File
@@ -216,7 +216,7 @@ void sub_0806AF60(Entity* this, ScriptExecutionContext* context) {
}
void sub_0806AF70(Entity* this, ScriptExecutionContext* context) {
this->zVelocity = 0x24000;
this->zVelocity = Q_16_16(2.25);
}
void sub_0806AF78(Entity* this, ScriptExecutionContext* context) {
@@ -229,7 +229,7 @@ void sub_0806AF78(Entity* this, ScriptExecutionContext* context) {
void sub_0806AFA0(Entity* this) {
if (sub_0806ED78(this)) {
sub_0806F62C(this, -this->speed, this->direction);
LinearMoveAngle(this, -this->speed, this->direction);
}
}
+1 -1
View File
@@ -220,7 +220,7 @@ void sub_08061F94(Entity* this) {
ent = CreateFx(this, FX_BIG_EXPLOSION, 0);
if (ent != NULL) {
ResolveEntityOnTop(this, ent);
SortEntityAbove(this, ent);
}
}
+3 -3
View File
@@ -44,7 +44,7 @@ void VaatiRebornAction0(Entity* this) {
entity = CreateNPC(VAATI_REBORN, 1, 0);
entity->parent = this;
entity->spriteOffsetY = -1;
PositionRelative(this, entity, 0, 0x10000);
PositionRelative(this, entity, 0, Q_16_16(1.0));
InitAnimationForceUpdate(this, 0);
break;
case 1:
@@ -115,7 +115,7 @@ void VaatiRebornAction1(Entity* this) {
if (entity == NULL) {
DeleteThisEntity();
}
PositionRelative(entity, this, 0, 0x210000);
PositionRelative(entity, this, 0, Q_16_16(33.0));
UpdateAnimationSingleFrame(this);
break;
case 2:
@@ -194,7 +194,7 @@ void sub_0806B96C(Entity* this) {
}
ptr = &gUnk_08112F80[this->type2];
this->spriteSettings.draw = entity->spriteSettings.draw;
PositionRelative(entity, this, ptr->x << 0x10, (ptr->y + 0x21) << 0x10);
PositionRelative(entity, this, Q_16_16(ptr->x), Q_16_16(ptr->y + 0x21));
UpdateAnimationSingleFrame(this);
}
+1 -1
View File
@@ -7,7 +7,7 @@ void Wheaton(Entity* this) {
this->action++;
SetDefaultPriority(this, PRIO_MESSAGE);
ResolveEntityOnTop(this, this);
SortEntityAbove(this, this);
this->hitbox = &gUnk_0810C3C0;
this->spriteOffsetY = 0xfe;
sub_0807DD64(this);
+3 -3
View File
@@ -127,13 +127,13 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
UpdateAnimationSingleFrame(this);
if (this->frame & 1) {
context->unk_18++;
this->zVelocity = 0x20000;
this->zVelocity = Q_16_16(2.0);
this->frame &= 0xFE;
SoundReq(SFX_PLY_JUMP);
}
break;
case 2:
sub_0806F62C(this, 0x100, 0x80);
LinearMoveAngle(this, 0x100, 0x80);
GravityUpdate(this, 0x2000);
if (!(this->frame & 1)) {
UpdateAnimationSingleFrame(this);
@@ -143,7 +143,7 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
}
break;
case 3:
sub_0806F62C(this, 0x100, 0x80);
LinearMoveAngle(this, 0x100, 0x80);
UpdateAnimationSingleFrame(this);
if (GravityUpdate(this, 0x2000) == 0) {
context->unk_18++;