mirror of
https://github.com/zeldaret/tmc
synced 2026-07-08 06:30:33 -04:00
label BounceUpdate asm
This commit is contained in:
+4
-4
@@ -580,7 +580,7 @@ CollisionResult sub_08017F40(Entity* org, Entity* tgt, u32 direction, ColSetting
|
||||
org->health = 0;
|
||||
}
|
||||
} else if (tgt->kind == ENEMY && org == &gPlayerEntity) {
|
||||
sub_08004484(tgt, org);
|
||||
CalcCollisionStaticEntity(tgt, org);
|
||||
}
|
||||
return RESULT_NO_COLLISION;
|
||||
}
|
||||
@@ -670,14 +670,14 @@ CollisionResult sub_08018168(Entity* org, Entity* tgt, u32 direction, ColSetting
|
||||
org->health = 0;
|
||||
}
|
||||
} else if ((tgt->kind == ENEMY) && (org == &gPlayerEntity)) {
|
||||
sub_08004484(tgt, &gPlayerEntity);
|
||||
CalcCollisionStaticEntity(tgt, &gPlayerEntity);
|
||||
}
|
||||
return RESULT_NO_COLLISION;
|
||||
}
|
||||
|
||||
CollisionResult sub_08018228(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
|
||||
if (org == &gPlayerEntity && PlayerCanBeMoved())
|
||||
sub_08004484(tgt, org);
|
||||
CalcCollisionStaticEntity(tgt, org);
|
||||
return RESULT_NO_COLLISION;
|
||||
}
|
||||
|
||||
@@ -716,7 +716,7 @@ CollisionResult sub_080182A8(Entity* org, Entity* tgt, u32 direction, ColSetting
|
||||
CollisionResult CollisionDefault(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
|
||||
u32 confused = 0;
|
||||
if (tgt->confusedTime && tgt->kind == ENEMY && org == &gPlayerEntity) {
|
||||
sub_08004484(tgt, org);
|
||||
CalcCollisionStaticEntity(tgt, org);
|
||||
confused = 1;
|
||||
}
|
||||
if ((org->kind == PLAYER_ITEM && org->id == PL_ITEM_SHIELD) &&
|
||||
|
||||
+6
-6
@@ -216,15 +216,15 @@ static void StoreKeyInput(Input* input, u32 keyInput) {
|
||||
u32 difference = keyInput & ~heldKeys;
|
||||
input->newKeys = difference;
|
||||
if (keyInput == heldKeys) {
|
||||
if (--input->unk7 == 0) {
|
||||
input->unk7 = 4;
|
||||
input->unk4 = keyInput;
|
||||
if (--input->menuScrollTimer == 0) {
|
||||
input->menuScrollTimer = 4;
|
||||
input->menuScrollKeys = keyInput;
|
||||
} else {
|
||||
input->unk4 = 0;
|
||||
input->menuScrollKeys = 0;
|
||||
}
|
||||
} else {
|
||||
input->unk7 = 20;
|
||||
input->unk4 = difference;
|
||||
input->menuScrollTimer = 20;
|
||||
input->menuScrollKeys = difference;
|
||||
}
|
||||
input->heldKeys = keyInput;
|
||||
}
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ void sub_0805FA98(void) {
|
||||
MessageInitialize();
|
||||
break;
|
||||
default:
|
||||
switch (gInput.unk4) {
|
||||
switch (gInput.menuScrollKeys) {
|
||||
case DPAD_LEFT:
|
||||
iVar1 = -1;
|
||||
break;
|
||||
|
||||
@@ -509,7 +509,7 @@ void AcroBandit_Type1Action6(Entity* this) {
|
||||
void AcroBandit_Type1Action7(Entity* this) {
|
||||
ProcessMovement2(this);
|
||||
|
||||
if (sub_080044EC(this, 0x2000) == 0)
|
||||
if (BounceUpdate(this, Q_8_8(32.0)) == BOUNCE_DONE_ALL)
|
||||
this->action = 8;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ void sub_080218CC(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 1) {
|
||||
ProcessMovement2(this);
|
||||
if (sub_080044EC(this, 0x1c00) == 0)
|
||||
if (BounceUpdate(this, Q_8_8(28.0)) == BOUNCE_DONE_ALL)
|
||||
this->frameDuration = 1;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -242,7 +242,7 @@ void sub_0802CAF8(Entity* this) {
|
||||
if (--this->timer == 0) {
|
||||
sub_0802CBC4(this);
|
||||
} else {
|
||||
if (this->field_0x80.HALF.HI && sub_080044EC(this, 0x2800) == 1) {
|
||||
if (this->field_0x80.HALF.HI && BounceUpdate(this, Q_8_8(40.0)) == BOUNCE_INIT_NEXT) {
|
||||
EnqueueSFX(SFX_PLACE_OBJ);
|
||||
}
|
||||
sub_0802CC18(this);
|
||||
|
||||
@@ -462,7 +462,7 @@ void sub_0802AEBC(Entity* this) {
|
||||
void sub_0802AED4(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->field_0x80.HALF.HI < 2) {
|
||||
if (sub_080044EC(this, 0x2800) == 1) {
|
||||
if (BounceUpdate(this, Q_8_8(40.0)) == BOUNCE_INIT_NEXT) {
|
||||
this->field_0x80.HALF.HI++;
|
||||
}
|
||||
} else {
|
||||
@@ -661,7 +661,7 @@ void sub_0802B1BC(Entity* this) {
|
||||
#endif
|
||||
|
||||
void sub_0802B204(Entity* this) {
|
||||
if (sub_080044EC(this, 0x2800) == 1) {
|
||||
if (BounceUpdate(this, Q_8_8(40.0)) == BOUNCE_INIT_NEXT) {
|
||||
Entity* ent = CreateEnemy(BOBOMB, 1);
|
||||
if (ent != NULL) {
|
||||
CopyPosition(this, ent);
|
||||
|
||||
+1
-1
@@ -704,7 +704,7 @@ void sub_0801FB68(Entity* this) {
|
||||
}
|
||||
|
||||
u32 sub_0801FBD0(Entity* this) {
|
||||
if (GetTileUnderEntity(this) == 0x10) {
|
||||
if (GetActTile(this) == 0x10) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
||||
@@ -178,7 +178,7 @@ void CloudPiranha_Action3(CloudPiranhaEntity* this) {
|
||||
void CloudPiranha_Action4(CloudPiranhaEntity* this) {
|
||||
Entity* effect;
|
||||
sub_080387F0(this);
|
||||
if (sub_080044EC(super, 0x1800) == 1) {
|
||||
if (BounceUpdate(super, Q_8_8(24.0)) == BOUNCE_INIT_NEXT) {
|
||||
super->action = 1;
|
||||
super->hitType = 0x72;
|
||||
super->timer = 1;
|
||||
|
||||
@@ -171,7 +171,7 @@ void sub_08038F44(CuccoAggrEntity* this) {
|
||||
super->direction = GetFacingDirection(&gPlayerEntity, super);
|
||||
sub_080390F8(this);
|
||||
ProcessMovement0(super);
|
||||
sub_080044EC(super, 0x1800);
|
||||
BounceUpdate(super, Q_8_8(24.0));
|
||||
GetNextFrame(super);
|
||||
sub_08039298(this);
|
||||
if (--this->unk_78 == 0) {
|
||||
|
||||
@@ -81,7 +81,7 @@ void sub_0802C334(Entity* this) {
|
||||
}
|
||||
GetNextFrame(this);
|
||||
this->field_0x7c.HALF.HI = COORD_TO_TILE(this);
|
||||
if (sub_080044EC(this, *(u32*)&this->cutsceneBeh) == 1) {
|
||||
if (BounceUpdate(this, *(u32*)&this->cutsceneBeh) == BOUNCE_INIT_NEXT) {
|
||||
EnqueueSFX(0x14c);
|
||||
COLLISION_ON(this);
|
||||
this->field_0x7a.HWORD = 0xc;
|
||||
|
||||
@@ -218,7 +218,7 @@ void sub_0802BEBC(Entity* this) {
|
||||
this->direction ^= DirectionSouth;
|
||||
ProcessMovement2(this);
|
||||
this->direction ^= DirectionSouth;
|
||||
if (!sub_080044EC(this, Q_16_16(0.125))) {
|
||||
if (BounceUpdate(this, Q_16_16(0.125)) == BOUNCE_DONE_ALL) {
|
||||
sub_0802C1C0(this);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -232,7 +232,7 @@ void Peahat_ChargeEnd(Entity* this) {
|
||||
void Peahat_Stunned(Entity* this) {
|
||||
switch (this->animationState) {
|
||||
default:
|
||||
if (sub_080044EC(this, 0x1800) == 0) {
|
||||
if (BounceUpdate(this, Q_8_8(24.0)) == BOUNCE_DONE_ALL) {
|
||||
this->action = 6;
|
||||
this->timer = 240;
|
||||
this->subtimer = 10;
|
||||
|
||||
@@ -181,16 +181,16 @@ void Rollobite_RolledUp(Entity* this) {
|
||||
if ((this->frame & ANIM_DONE) == 0)
|
||||
GetNextFrame(this);
|
||||
|
||||
unk = sub_080044EC(this, 0x2800);
|
||||
unk = BounceUpdate(this, Q_8_8(40.0));
|
||||
|
||||
if (unk == 0) {
|
||||
if (unk == BOUNCE_DONE_ALL) {
|
||||
if (--this->timer == 0) {
|
||||
this->action = 5;
|
||||
InitializeAnimation(this, this->animationState + 12);
|
||||
}
|
||||
RegisterCarryEntity(this);
|
||||
} else {
|
||||
if (unk == 1)
|
||||
if (unk == BOUNCE_INIT_NEXT)
|
||||
EnqueueSFX(SFX_PLACE_OBJ);
|
||||
|
||||
if (!(this->direction & DIR_NOT_MOVING_CHECK))
|
||||
|
||||
+1
-1
@@ -196,7 +196,7 @@ void sub_08031600(Entity* this) {
|
||||
|
||||
u32 sub_0803163C(Entity* this) {
|
||||
u32 h;
|
||||
if (GetTileUnderEntity(this) == 0x13) {
|
||||
if (GetActTile(this) == 0x13) {
|
||||
h = this->field_0x7a.HWORD / 2;
|
||||
} else {
|
||||
h = this->field_0x7a.HWORD;
|
||||
|
||||
@@ -153,12 +153,12 @@ void sub_0802B880(Entity* this) {
|
||||
|
||||
void sub_0802B8B0(Entity* this) {
|
||||
ProcessMovement2(this);
|
||||
switch (sub_080044EC(this, 0x1800)) {
|
||||
case 0:
|
||||
switch (BounceUpdate(this, Q_8_8(24.0))) {
|
||||
case BOUNCE_DONE_ALL:
|
||||
this->action = 7;
|
||||
this->timer = 150;
|
||||
/* fallthrough */
|
||||
case 1:
|
||||
case BOUNCE_INIT_NEXT:
|
||||
EnqueueSFX(SFX_12B);
|
||||
break;
|
||||
}
|
||||
|
||||
+2
-2
@@ -141,7 +141,7 @@ void sub_0802F300(Entity* this) {
|
||||
temp = this->z.HALF.HI;
|
||||
rand = Random() & 0xf;
|
||||
|
||||
if (sub_080044EC(this, this->field_0x80.HWORD) == 1) {
|
||||
if (BounceUpdate(this, this->field_0x80.HWORD) == BOUNCE_INIT_NEXT) {
|
||||
this->action = 3;
|
||||
this->subAction = 0;
|
||||
if (this->type != 0) {
|
||||
@@ -158,7 +158,7 @@ void sub_0802F300(Entity* this) {
|
||||
return;
|
||||
} else if (this->collisions != COL_NONE) {
|
||||
sub_0800417E(this, this->collisions);
|
||||
} else if ((GetTileUnderEntity(this) & 0xf0) == 0x50) {
|
||||
} else if ((GetActTile(this) & 0xf0) == 0x50) {
|
||||
this->direction = (this->direction + 0x10) & (0x3 | DirectionNorthWest);
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ void sub_08038048(Entity* this) {
|
||||
temp = this->z.HALF.HI;
|
||||
rand = Random() & 0xf;
|
||||
|
||||
if (sub_080044EC(this, 0x3000) == 1) {
|
||||
if (BounceUpdate(this, Q_8_8(48.0)) == BOUNCE_INIT_NEXT) {
|
||||
this->action = 3;
|
||||
this->subAction = 0;
|
||||
this->timer = 20;
|
||||
@@ -135,7 +135,7 @@ void sub_08038048(Entity* this) {
|
||||
return;
|
||||
} else if (this->collisions != COL_NONE) {
|
||||
sub_0800417E(this, this->collisions);
|
||||
} else if ((GetTileUnderEntity(this) & 0xf0) == 0x50) {
|
||||
} else if ((GetActTile(this) & 0xf0) == 0x50) {
|
||||
this->direction = (this->direction + 0x10) & (0x3 | DirectionNorthWest);
|
||||
}
|
||||
|
||||
|
||||
@@ -265,8 +265,8 @@ void VaatiTransfiguredType0Action3(Entity* this) {
|
||||
|
||||
switch (this->field_0x80.HALF.LO) {
|
||||
case 0:
|
||||
uVar4 = sub_080044EC(this, 0x2800);
|
||||
if (uVar4 != 1)
|
||||
uVar4 = BounceUpdate(this, Q_8_8(40.0));
|
||||
if (uVar4 != BOUNCE_INIT_NEXT)
|
||||
break;
|
||||
this->field_0x80.HALF.LO = 1;
|
||||
this->timer = 192;
|
||||
|
||||
+1
-1
@@ -1145,7 +1145,7 @@ void sub_080610B8(void) {
|
||||
default:
|
||||
uVar6 = 0;
|
||||
tmp4 = 0;
|
||||
switch (gInput.unk4) {
|
||||
switch (gInput.menuScrollKeys) {
|
||||
case DPAD_UP:
|
||||
tmp4 = -1;
|
||||
break;
|
||||
|
||||
@@ -66,14 +66,14 @@ void EnemyInteractionManager_Action1(EnemyInteractionManager* this) {
|
||||
for (i = 0; i < n; i++) {
|
||||
tmp = this->d.enemies[i];
|
||||
for (j = i + 1; j < super->timer; j++) {
|
||||
sub_08004484(tmp, this->d.enemies[j]);
|
||||
CalcCollisionStaticEntity(tmp, this->d.enemies[j]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < n; i++) {
|
||||
tmp = this->d.enemies[i];
|
||||
for (j = i + 1; j < super->timer; j++) {
|
||||
sub_08004484(this->d.enemies[j], tmp);
|
||||
CalcCollisionStaticEntity(this->d.enemies[j], tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ void FigurineMenu0_ViewFigurineAfterDrawing(void) {
|
||||
s32 t;
|
||||
|
||||
infoY = gFigurineMenu.unk1f;
|
||||
switch (gInput.unk4) {
|
||||
switch (gInput.menuScrollKeys) {
|
||||
case B_BUTTON:
|
||||
case START_BUTTON:
|
||||
FigurineMenu_ExitMenu();
|
||||
@@ -219,7 +219,7 @@ void FigurineMenu1_ViewAllFigurines(void) {
|
||||
|
||||
infoY = gFigurineMenu.unk1f;
|
||||
figurineIndex = gFigurineMenu.figure_idx;
|
||||
switch (gInput.unk4) {
|
||||
switch (gInput.menuScrollKeys) {
|
||||
case B_BUTTON:
|
||||
case START_BUTTON:
|
||||
SetMenuType(3);
|
||||
|
||||
@@ -194,7 +194,7 @@ void KinstoneMenu_Type1(void) {
|
||||
return;
|
||||
}
|
||||
tmp3 = menu->unk28;
|
||||
switch (gInput.unk4) {
|
||||
switch (gInput.menuScrollKeys) {
|
||||
case DPAD_LEFT:
|
||||
case DPAD_UP:
|
||||
tmp3--;
|
||||
|
||||
@@ -404,7 +404,7 @@ void PauseMenu_ItemMenu_Update(void) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
switch (gInput.unk4) {
|
||||
switch (gInput.menuScrollKeys) {
|
||||
case DPAD_UP:
|
||||
menuSlot = entry->up;
|
||||
break;
|
||||
@@ -710,7 +710,7 @@ void sub_080A56A0(void) {
|
||||
gMenu.field_0xc = gUnk_08128C00;
|
||||
ptr = &gUnk_08128C14[gMenu.field_0x3];
|
||||
uVar2 = 0xff;
|
||||
switch (gInput.unk4) {
|
||||
switch (gInput.menuScrollKeys) {
|
||||
case DPAD_UP:
|
||||
uVar2 = ptr->unk0;
|
||||
break;
|
||||
|
||||
+1
-1
@@ -408,7 +408,7 @@ u16 RunTextCommand(TextRender* this) {
|
||||
gMessage.unk = this->curToken.param;
|
||||
break;
|
||||
case 6:
|
||||
ptr = &gMessage.field_0xc;
|
||||
ptr = &gMessage.flags;
|
||||
tmp3 = this->curToken.param;
|
||||
tmp3 &= 0x1f;
|
||||
WriteBit(ptr, tmp3);
|
||||
|
||||
@@ -62,10 +62,10 @@ void sub_0806E964(PhonographEntity* this, ScriptExecutionContext* context) {
|
||||
sub_0806EABC(this);
|
||||
}
|
||||
|
||||
if (gInput.unk4 & (DPAD_UP | DPAD_DOWN)) {
|
||||
if (gInput.menuScrollKeys & (DPAD_UP | DPAD_DOWN)) {
|
||||
s32 val2, val3;
|
||||
s32 val = this->unk_68;
|
||||
if (gInput.unk4 & DPAD_UP) {
|
||||
if (gInput.menuScrollKeys & DPAD_UP) {
|
||||
val++;
|
||||
} else {
|
||||
val--;
|
||||
@@ -148,8 +148,8 @@ void sub_0806E964(PhonographEntity* this, ScriptExecutionContext* context) {
|
||||
if (val > val2) {
|
||||
val = 1;
|
||||
}
|
||||
} else if (gInput.unk4 & (DPAD_UP | DPAD_DOWN)) {
|
||||
if (gInput.unk4 & DPAD_UP) {
|
||||
} else if (gInput.menuScrollKeys & (DPAD_UP | DPAD_DOWN)) {
|
||||
if (gInput.menuScrollKeys & DPAD_UP) {
|
||||
val++;
|
||||
} else {
|
||||
val--;
|
||||
|
||||
+1
-1
@@ -321,7 +321,7 @@ void CollideFollowers(void) {
|
||||
continue;
|
||||
if ((nextEnt->followerFlag & 1) == 0)
|
||||
continue;
|
||||
sub_08004484(currentEntity, nextEnt);
|
||||
CalcCollisionStaticEntity(currentEntity, nextEnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ void Bird_Type1_Action1_Subaction0(BirdEntity* this) {
|
||||
void Bird_Type1_Action1_Subaction1(BirdEntity* this) {
|
||||
Entity* fx;
|
||||
|
||||
if (sub_080044EC(super, 0x1800) < 2) {
|
||||
if (BounceUpdate(super, Q_8_8(24.0)) < BOUNCE_AIRBORNE) {
|
||||
super->type = 2;
|
||||
super->action = 1;
|
||||
super->z.WORD = 0;
|
||||
|
||||
+1
-1
@@ -139,7 +139,7 @@ void Book_Action2(BookEntity* this) {
|
||||
void Book_Action3(BookEntity* this) {
|
||||
Entity* fx;
|
||||
|
||||
if (sub_080044EC(super, 0x2800) != 1) {
|
||||
if (BounceUpdate(super, Q_8_8(40.0)) != BOUNCE_INIT_NEXT) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
|
||||
gUnk_0200AF00.rActionPlayerState = R_ACTION_NONE;
|
||||
}
|
||||
PositionRelative(&gPlayerEntity, super, 0, 0x10000);
|
||||
if (GetTileUnderEntity(super) == 0x19) {
|
||||
if (GetActTile(super) == 0x19) {
|
||||
RestorePrevTileEntity(0xdc, super->collisionLayer);
|
||||
sub_08096A78(this);
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ void CutsceneMiscObject_Type5(CutsceneMiscObjectEntity* this) {
|
||||
super->zVelocity = 0;
|
||||
SetEntityPriority(super, PRIO_PLAYER_EVENT);
|
||||
InitializeAnimation(super, 0);
|
||||
if (GetTileUnderEntity(super) == 13) {
|
||||
if (GetActTile(super) == 13) {
|
||||
super->action = 3;
|
||||
}
|
||||
break;
|
||||
@@ -551,7 +551,7 @@ void CutsceneMiscObject_Type11(CutsceneMiscObjectEntity* this) {
|
||||
InitAnimationForceUpdate(super, 0);
|
||||
}
|
||||
if (super->subAction != 0) {
|
||||
if ((u32)sub_080044EC(super, 0x1800) <= 1) {
|
||||
if ((u32)BounceUpdate(super, Q_8_8(24.0)) <= BOUNCE_INIT_NEXT) {
|
||||
super->subAction = 0;
|
||||
SetAffineInfo(super, 0x100, 0x100, 0xC000);
|
||||
} else {
|
||||
|
||||
@@ -260,9 +260,9 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
|
||||
tmp = 1;
|
||||
}
|
||||
#ifdef JP
|
||||
switch (gInput.unk4) {
|
||||
switch (gInput.menuScrollKeys) {
|
||||
#else
|
||||
switch (gInput.unk4 & 0xfffffeff) {
|
||||
switch (gInput.menuScrollKeys & ~R_BUTTON) {
|
||||
#endif
|
||||
case DPAD_UP:
|
||||
FigurineDevice_ChangeShellAmount(this, tmp);
|
||||
@@ -275,7 +275,7 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
|
||||
sub_080882A8(this);
|
||||
}
|
||||
#else
|
||||
switch (gInput.unk4) {
|
||||
switch (gInput.menuScrollKeys) {
|
||||
case DPAD_UP:
|
||||
FigurineDevice_ChangeShellAmount(this, 1);
|
||||
break;
|
||||
|
||||
@@ -125,7 +125,7 @@ void GraveyardKey_Action2(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
u8 type;
|
||||
|
||||
LinearMoveUpdate(this);
|
||||
if (sub_080044EC(this, param_2->unk14) < 2) {
|
||||
if (BounceUpdate(this, param_2->unk14) < BOUNCE_AIRBORNE) {
|
||||
if (this->timer) {
|
||||
this->timer--;
|
||||
this->zVelocity = param_2->unk14 << 3;
|
||||
|
||||
@@ -437,7 +437,7 @@ u32 sub_080814C0(ItemOnGroundEntity* this) {
|
||||
|
||||
void sub_08081500(ItemOnGroundEntity* this) {
|
||||
if (this->unk_68 == 0) {
|
||||
u32 var0 = sub_080044EC(super, 0x2800);
|
||||
u32 var0 = BounceUpdate(super, Q_8_8(40.0));
|
||||
if (var0 == 0) {
|
||||
this->unk_68 = 1;
|
||||
} else {
|
||||
|
||||
@@ -164,7 +164,7 @@ void KeyStealingTakkuri_Type5_Init(KeyStealingTakkuriEntity* this) {
|
||||
|
||||
void KeyStealingTakkuri_Type5_Action1(KeyStealingTakkuriEntity* this) {
|
||||
LinearMoveUpdate(super);
|
||||
if (sub_080044EC(super, 0x2000) < 2) {
|
||||
if (BounceUpdate(super, Q_8_8(32.0)) < BOUNCE_AIRBORNE) {
|
||||
if (super->timer != 0) {
|
||||
super->timer--;
|
||||
super->zVelocity = Q_16_16(1.0);
|
||||
|
||||
@@ -387,7 +387,7 @@ void sub_08085B40(LilypadLargeEntity* this) {
|
||||
}
|
||||
} else {
|
||||
ResetCollisionLayer(super);
|
||||
if (GetTileUnderEntity(super) == 0xd) {
|
||||
if (GetActTile(super) == 0xd) {
|
||||
ResetCollisionLayer(&gPlayerEntity);
|
||||
LilypadLarge_Action4(this);
|
||||
super->direction = GetFacingDirection(&gPlayerEntity, super);
|
||||
@@ -409,7 +409,7 @@ void sub_08085B40(LilypadLargeEntity* this) {
|
||||
super->timer |= 0x80;
|
||||
this->unk_70 = 0;
|
||||
this->unk_6c = 0;
|
||||
if (GetTileUnderEntity(super) == 0xd) {
|
||||
if (GetActTile(super) == 0xd) {
|
||||
super->action = 4;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ void Mask_Action2(MaskEntity* this) {
|
||||
|
||||
CreateRandomItemDrop(super, 3);
|
||||
} else {
|
||||
sub_080044EC(super, this->unk_78);
|
||||
BounceUpdate(super, this->unk_78);
|
||||
|
||||
if (super->z.HALF.HI == 0) {
|
||||
super->timer++;
|
||||
|
||||
@@ -200,7 +200,7 @@ void Minecart_Action3(MinecartEntity* this) {
|
||||
case 0x6d:
|
||||
case 0x6e:
|
||||
case 0x6f:
|
||||
if (uVar3 == GetTileUnderEntity(super)) {
|
||||
if (uVar3 == GetActTile(super)) {
|
||||
Minecart_Action4(this);
|
||||
gPlayerEntity.animationState = super->animationState << 1;
|
||||
return;
|
||||
@@ -222,7 +222,7 @@ void Minecart_Action3(MinecartEntity* this) {
|
||||
void Minecart_Action4(MinecartEntity* this) {
|
||||
sub_08004168(super);
|
||||
CopyPosition(super, &gPlayerEntity);
|
||||
switch (GetTileUnderEntity(super)) {
|
||||
switch (GetActTile(super)) {
|
||||
case 0x67:
|
||||
if (super->direction == DirectionWest) {
|
||||
super->direction = DirectionNorth;
|
||||
|
||||
@@ -52,7 +52,7 @@ void ObjectA2_Action1(Entity* this) {
|
||||
LinearMoveUpdate(this);
|
||||
#ifndef EU
|
||||
if (gSaveHeader->language < 2) {
|
||||
if (sub_080044EC(this, 0x2000) < 2) {
|
||||
if (BounceUpdate(this, Q_8_8(32.0)) < BOUNCE_AIRBORNE) {
|
||||
this->z.WORD = 0;
|
||||
this->action = 2;
|
||||
InitializeAnimation(this, 1);
|
||||
@@ -62,15 +62,15 @@ void ObjectA2_Action1(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
switch (sub_080044EC(this, 0x2000)) {
|
||||
switch (BounceUpdate(this, Q_8_8(32.0))) {
|
||||
default:
|
||||
this->timer++;
|
||||
break;
|
||||
case 0:
|
||||
case BOUNCE_DONE_ALL:
|
||||
this->action = 2;
|
||||
InitializeAnimation(this, 1);
|
||||
// fall through
|
||||
case 1:
|
||||
case BOUNCE_INIT_NEXT:
|
||||
this->timer = 0;
|
||||
sub_0809F448(this);
|
||||
SoundReq(SFX_186);
|
||||
|
||||
@@ -209,7 +209,7 @@ void sub_080970F4(ObjectOnPillarEntity* this) {
|
||||
bool32 sub_08097144(ObjectOnPillarEntity* this) {
|
||||
LinearMoveUpdate(super);
|
||||
sub_0800445C(super);
|
||||
if (GetTileUnderEntity(super) == 0x19) {
|
||||
if (GetActTile(super) == 0x19) {
|
||||
super->spriteOffsetY = 2;
|
||||
}
|
||||
if ((--this->unk_76 == 0) && sub_08097194(this) == FALSE) {
|
||||
|
||||
@@ -110,7 +110,7 @@ void PlayerClone_Action2(PlayerCloneEntity* this) {
|
||||
if (gPlayerEntity.iframes >= 1) {
|
||||
gPlayerState.chargeState.action = 1;
|
||||
} else {
|
||||
GetTileUnderEntity(super);
|
||||
GetActTile(super);
|
||||
sub_08084B1C(this);
|
||||
super->x.HALF.HI = gPlayerEntity.x.HALF.HI + this->unk78;
|
||||
super->y.HALF.HI = gPlayerEntity.y.HALF.HI + this->unk7a;
|
||||
|
||||
+10
-10
@@ -26,7 +26,7 @@ typedef struct {
|
||||
} PotEntity;
|
||||
|
||||
void Pot_Action5(PotEntity*);
|
||||
static void sub_08082850(PotEntity*, Entity*);
|
||||
static void BreakPot(PotEntity*, Entity*);
|
||||
void sub_08082608(PotEntity* this);
|
||||
void Pot_Init(PotEntity* this);
|
||||
void Pot_Action1(PotEntity* this);
|
||||
@@ -129,13 +129,13 @@ void Pot_Action1(PotEntity* this) {
|
||||
DeleteThisEntity();
|
||||
break;
|
||||
default:
|
||||
if (GetTileUnderEntity(super) == 13) {
|
||||
if (GetActTile(super) == 13) {
|
||||
CreateFx(super, FX_FALL_DOWN, 0);
|
||||
} else if (tileType == 0x4005) {
|
||||
gPlayerState.lastSwordMove = SWORD_MOVE_BREAK_POT;
|
||||
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
sub_08082850(this, NULL);
|
||||
BreakPot(this, NULL);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -182,7 +182,7 @@ void sub_0808259C(PotEntity* this) {
|
||||
CreateFx(super, FX_LAVA_SPLASH, 0);
|
||||
break;
|
||||
default:
|
||||
sub_08082850(this, &gPlayerEntity);
|
||||
BreakPot(this, &gPlayerEntity);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ void Pot_Action4(PotEntity* this) {
|
||||
switch (tileType) {
|
||||
case 0x71:
|
||||
case 0x72:
|
||||
sub_08082850(this, NULL);
|
||||
BreakPot(this, NULL);
|
||||
break;
|
||||
default:
|
||||
SetTile(0x4000, COORD_TO_TILE(super), super->collisionLayer);
|
||||
@@ -269,7 +269,7 @@ void sub_08082778(PotEntity* this) {
|
||||
}
|
||||
|
||||
if ((gPlayerState.field_0x1c & 0xF) != 0x1 || (super->contactFlags & 0x7F) != 0x13) {
|
||||
sub_08082850(this, NULL);
|
||||
BreakPot(this, NULL);
|
||||
} else {
|
||||
sub_0806F3E4(super);
|
||||
}
|
||||
@@ -277,7 +277,7 @@ void sub_08082778(PotEntity* this) {
|
||||
|
||||
void sub_080827F8(PotEntity* this) {
|
||||
if (gPlayerState.field_0x1c == 0) {
|
||||
sub_08082850(this, NULL);
|
||||
BreakPot(this, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ void nullsub_512(PotEntity* this) {
|
||||
}
|
||||
|
||||
void sub_08082818(PotEntity* this) {
|
||||
sub_08082850(this, NULL);
|
||||
BreakPot(this, NULL);
|
||||
}
|
||||
|
||||
void Pot_Action5(PotEntity* this) {
|
||||
@@ -294,11 +294,11 @@ void Pot_Action5(PotEntity* this) {
|
||||
}
|
||||
|
||||
if (GravityUpdate(super, Q_8_8(32.0)) == 0) {
|
||||
sub_08082850(this, NULL);
|
||||
BreakPot(this, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_08082850(PotEntity* this, Entity* parent) {
|
||||
static void BreakPot(PotEntity* this, Entity* parent) {
|
||||
u32 parameter = sub_0808288C(super, super->type, this->unk_7d, super->type2);
|
||||
Entity* fxEntity = CreateFx(super, FX_POT_SHATTER, parameter);
|
||||
if (fxEntity) {
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ void Rupee_Action_1(Entity* this) {
|
||||
if (this->child->next == NULL) {
|
||||
this->action = 2;
|
||||
} else {
|
||||
if (sub_080044EC(this, 10240) == 0) {
|
||||
if (BounceUpdate(this, Q_8_8(40.0)) == BOUNCE_DONE_ALL) {
|
||||
this->action = 2;
|
||||
}
|
||||
ProcessMovement0(this);
|
||||
|
||||
+3
-3
@@ -1974,7 +1974,7 @@ static void PlayerRoomTransition(Entity* this) {
|
||||
static void sub_080724DC(Entity* this) {
|
||||
this->knockbackDuration = 0;
|
||||
DeleteClones();
|
||||
if (GetTileUnderEntity(this) != 0x29) {
|
||||
if (GetActTile(this) != 0x29) {
|
||||
if ((gPlayerState.remainingDiveTime == 0) && (gPlayerState.swim_state != 0)) {
|
||||
PlayerUpdateSwimming(this);
|
||||
}
|
||||
@@ -2618,7 +2618,7 @@ static void PlayerUseStairs(Entity* this) {
|
||||
|
||||
static void sub_080732D0(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (GetTileUnderEntity(this) != 40) {
|
||||
if (GetActTile(this) != 40) {
|
||||
this->direction = DirectionNorth;
|
||||
LinearMoveUpdate(this);
|
||||
} else {
|
||||
@@ -4105,7 +4105,7 @@ void sub_0807529C(Entity* this) {
|
||||
void sub_080752AC(Entity* this, ScriptExecutionContext* ctx) {
|
||||
LinearMoveUpdate(this);
|
||||
if (!ctx->unk_18) {
|
||||
if (GetTileUnderEntity(this) != 41) {
|
||||
if (GetActTile(this) != 41) {
|
||||
ctx->unk_18 = 1;
|
||||
ctx->unk_19 = 6;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ void PlayerItemHeldObject_SubAction2(PlayerItemHeldObjectEntity* this) {
|
||||
(child->base).x = super->x;
|
||||
(child->base).y = super->y;
|
||||
(child->base).z = super->z;
|
||||
tile = GetTileUnderEntity(super);
|
||||
tile = GetActTile(super);
|
||||
switch (tile) {
|
||||
case 0xd:
|
||||
case 0x10:
|
||||
|
||||
@@ -128,7 +128,7 @@ void PlayerItemPacciCaneProjectile_Action1(PlayerItemPacciCaneProjectileEntity*
|
||||
}
|
||||
if (sub_080B1BA4(COORD_TO_TILE(super), gPlayerEntity.collisionLayer, 0x80) == 0) {
|
||||
if (sub_080040D8(super, &gUnk_08003E44, super->x.HALF.HI, super->y.HALF.HI) == 0) {
|
||||
if (GetTileUnderEntity(super) == 0x19) {
|
||||
if (GetActTile(super) == 0x19) {
|
||||
super->action = 4;
|
||||
COLLISION_OFF(super);
|
||||
super->x.HALF.HI = (super->x.HALF.HI & 0xfff0) | 8;
|
||||
|
||||
+1
-1
@@ -2349,7 +2349,7 @@ bool32 sub_08079D48(void) {
|
||||
return TRUE;
|
||||
} else {
|
||||
if (!PlayerCheckNEastTile()) {
|
||||
if (!sub_08007DD6((u16)GetTileUnderEntity(&gPlayerEntity), gUnk_0811C268)) {
|
||||
if (!sub_08007DD6((u16)GetActTile(&gPlayerEntity), gUnk_0811C268)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void BoneProjectile_Action3(Entity* this) {
|
||||
this->spriteSettings.draw ^= 1;
|
||||
LinearMoveUpdate(this);
|
||||
GetNextFrame(this);
|
||||
if (sub_080044EC(this, 0x1800) == 0) {
|
||||
if (BounceUpdate(this, Q_8_8(24.0)) == BOUNCE_DONE_ALL) {
|
||||
DeleteEntity(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,11 +116,11 @@ void DekuSeedProjectile_Action3(Entity* this) {
|
||||
void DekuSeedProjectile_Action4(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
ProcessMovement3(this);
|
||||
switch (sub_080044EC(this, 0x2800)) {
|
||||
case 0:
|
||||
switch (BounceUpdate(this, Q_8_8(40.0))) {
|
||||
case BOUNCE_DONE_ALL:
|
||||
DeleteThisEntity();
|
||||
return;
|
||||
case 1:
|
||||
case BOUNCE_INIT_NEXT:
|
||||
COLLISION_OFF(this);
|
||||
this->speed = 0x120;
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ void DirtBallProjectile_Action2(Entity* this) {
|
||||
FreeCarryEntity(entity);
|
||||
CopyPosition(this, entity);
|
||||
}
|
||||
if (sub_080044EC(this, 0x2800) != 1) {
|
||||
if (BounceUpdate(this, Q_8_8(40.0)) != BOUNCE_INIT_NEXT) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,11 +67,11 @@ void RockProjectile_Action2(Entity* this) {
|
||||
void RockProjectile_Action3(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
ProcessMovement3(this);
|
||||
switch (sub_080044EC(this, 0x2800)) {
|
||||
case 0:
|
||||
switch (BounceUpdate(this, Q_8_8(40.0))) {
|
||||
case BOUNCE_DONE_ALL:
|
||||
DeleteEntity(this);
|
||||
return;
|
||||
case 1:
|
||||
case BOUNCE_INIT_NEXT:
|
||||
COLLISION_OFF(this);
|
||||
this->speed = 0x120;
|
||||
if (sub_0800442E(this) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user