diff options
Diffstat (limited to 'src/enemy')
33 files changed, 174 insertions, 174 deletions
diff --git a/src/enemy/acroBandits.c b/src/enemy/acroBandits.c index 142b4010..2c910bc4 100644 --- a/src/enemy/acroBandits.c +++ b/src/enemy/acroBandits.c @@ -449,7 +449,7 @@ void sub_08032160(Entity* this) { } else { this->spriteSettings.b.flipX = 0; } - this->nonPlanarMovement = 0xf0; + this->speed = 0xf0; this->field_0x20 = 0x12000; this->spritePriority.b1 = 1; InitializeAnimation(this, 12); diff --git a/src/enemy/beetle.c b/src/enemy/beetle.c index a55b0f7f..66bf33e9 100644 --- a/src/enemy/beetle.c +++ b/src/enemy/beetle.c @@ -104,7 +104,7 @@ void sub_080218CC(Entity* this) { this->previousActionFlag = 1; this->spriteSettings.b.draw = 1; this->direction = ((sub_08049F84(this, 1) ^ 0x10) + gUnk_080CB5DC[Random() & 7]) & 0x1f; - this->nonPlanarMovement = 0x100; + this->speed = 0x100; this->field_0x20 = 0x12000; } @@ -120,7 +120,7 @@ void sub_080218CC(Entity* this) { this->actionDelay = (Random() & 0x38) + 8; this->field_0xf = 1; this->flags |= 0x80; - this->nonPlanarMovement = 0x180; + this->speed = 0x180; InitializeAnimation(this, 0); } } @@ -141,7 +141,7 @@ void sub_08021984(Entity* this) { this->actionDelay = 16; this->field_0xf = 1; this->spriteSettings.b.draw = 1; - this->nonPlanarMovement = 0x180; + this->speed = 0x180; ((u8*)&this->field_0x86)[0] = 60; InitializeAnimation(this, 0); UpdateSpriteForCollisionLayer(this); @@ -311,9 +311,9 @@ void sub_08021D44(Entity* this, u32 direction) { direction = DirectionRoundUp(direction); this->direction = direction; if (DirectionIsHorizontal(direction)) { - this->nonPlanarMovement = 0x180; + this->speed = 0x180; } else { - this->nonPlanarMovement = 0xc0; + this->speed = 0xc0; } } diff --git a/src/enemy/bobomb.c b/src/enemy/bobomb.c index e5716276..43b1a2c2 100644 --- a/src/enemy/bobomb.c +++ b/src/enemy/bobomb.c @@ -54,7 +54,7 @@ void sub_0802C688(Entity* this) { this->damageType = 0x6e; this->field_0xf = 1; this->field_0x20 = 0x18000; - this->nonPlanarMovement = 0; + this->speed = 0; this->field_0x80.HALF.HI = 1; InitializeAnimation(this, this->direction >> 4 | 6); break; @@ -69,7 +69,7 @@ void sub_0802C7AC(Entity* this) { this->field_0xf = 1; this->height.HALF.HI = 0; if (this->field_0x82.HALF.LO != 2) { - this->nonPlanarMovement = this->field_0x82.HALF.LO ? 0x200 : 0x80; + this->speed = this->field_0x82.HALF.LO ? 0x200 : 0x80; } this->field_0x20 = 0x18000; this->field_0x82.HALF.HI = 0; @@ -225,7 +225,7 @@ void sub_0802CA94(Entity* this) { this->field_0xf = 1; this->spritePriority.b1 = 1; this->field_0x20 = 0x18000; - this->nonPlanarMovement = 0; + this->speed = 0; this->field_0x82.HALF.HI = 0; this->field_0x80.HALF.HI = 0; this->direction = ((gPlayerEntity.animationState << 2) | 4) & 0x1c; @@ -262,11 +262,11 @@ void sub_0802CB68(Entity* this) { this->flags |= 0x80; if (this->field_0x82.HALF.LO) { this->actionDelay = 200; - this->nonPlanarMovement = 0x200; + this->speed = 0x200; InitializeAnimation(this, (this->direction >> 4) | 2); } else { this->actionDelay = 0x3c; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; InitializeAnimation(this, this->direction >> 4); } } diff --git a/src/enemy/bombPeahat.c b/src/enemy/bombPeahat.c index caaf98b0..93c7dcf1 100644 --- a/src/enemy/bombPeahat.c +++ b/src/enemy/bombPeahat.c @@ -172,7 +172,7 @@ void sub_0802AA40(Entity* this) { } if (this->direction == direction) { this->action = 3; - this->nonPlanarMovement = 0x180; + this->speed = 0x180; this->field_0x7a.HALF.HI = 0; ent->field_0x80.HALF.LO = 1; ent->actionDelay = 0x96; @@ -242,7 +242,7 @@ void sub_0802AB40(Entity* this) { } } else { this->action = 5; - this->nonPlanarMovement = 0; + this->speed = 0; InitializeAnimation(this, this->type + 1); } break; @@ -254,7 +254,7 @@ void sub_0802AC08(Entity* this) { this->action = 2; this->previousActionFlag = 0; this->actionDelay = 0x40; - this->nonPlanarMovement = 0xc0; + this->speed = 0xc0; sub_0802ACDC(this, 8); sub_0802ADDC(this); } diff --git a/src/enemy/chaser.c b/src/enemy/chaser.c index 00d99937..7e0ac960 100644 --- a/src/enemy/chaser.c +++ b/src/enemy/chaser.c @@ -36,7 +36,7 @@ void sub_0802B540(Entity* this) { u32 direction = sub_0804A024(this, 1, 0xc); if (direction != 0xff) { this->action = 2; - this->nonPlanarMovement = 0x40; + this->speed = 0x40; this->direction = direction; } } @@ -45,15 +45,15 @@ void sub_0802B540(Entity* this) { void sub_0802B56C(Entity* this) { GetNextFrame(this); if (this->bitfield & 0x80) { - this->nonPlanarMovement = 0x40; + this->speed = 0x40; } if (sub_080AF038(this)) { if (this->animIndex != 1) { InitializeAnimation(this, 1); } - if (this->nonPlanarMovement < 0x220) { - this->nonPlanarMovement += 4; + if (this->speed < 0x220) { + this->speed += 4; } } else { this->action = 3; diff --git a/src/enemy/chuchu.c b/src/enemy/chuchu.c index 625fab9b..4f8d86d0 100644 --- a/src/enemy/chuchu.c +++ b/src/enemy/chuchu.c @@ -55,7 +55,7 @@ void Chuchu(Entity* this) { if (this->flags & 0x80) { this->action = 6; this->flags &= ~0x80; - this->nonPlanarMovement = 0x20; + this->speed = 0x20; this->damageType = 0x5c; InitializeAnimation(this, 5); } @@ -294,7 +294,7 @@ void sub_0801F328(Entity* this) { void sub_0801F340(Entity* this) { this->action = 5; this->actionDelay = 60; - this->nonPlanarMovement = 0x20; + this->speed = 0x20; this->damageType = 92; InitializeAnimation(this, 2); } @@ -418,7 +418,7 @@ void sub_0801F584(Entity* this) { } else { this->action = 6; this->field_0xf = 60; - this->nonPlanarMovement = 0x20; + this->speed = 0x20; this->damageType = 92; InitializeAnimation(this, 2); } @@ -470,7 +470,7 @@ void sub_0801F6F8(Entity* this) { GetNextFrame(this); if (this->frames.all & 0x80) { this->action = 4; - this->nonPlanarMovement = 0x20; + this->speed = 0x20; sub_0804AA1C(this); InitializeAnimation(this, 2); } @@ -593,7 +593,7 @@ void sub_0801F940(Entity* this) { } else { this->action = 6; this->field_0xf = 60; - this->nonPlanarMovement = 0x20; + this->speed = 0x20; InitializeAnimation(this, 2); } } @@ -645,7 +645,7 @@ void sub_0801FAAC(Entity* this) { GetNextFrame(this); if (this->frames.all & 0x80) { sub_0801FB14(this); - this->nonPlanarMovement = 0x20; + this->speed = 0x20; sub_0804AA1C(this); } } @@ -706,7 +706,7 @@ u32 sub_0801FBD0(Entity* this) { } void Chuchu_JumpAtPlayer(Entity* this) { - this->nonPlanarMovement = 0x180; + this->speed = 0x180; this->field_0x20 = 0x20000; this->direction = sub_08049F84(this, 1); InitializeAnimation(this, 3); diff --git a/src/enemy/cuccoChickAggr.c b/src/enemy/cuccoChickAggr.c index 0b894e09..683ba4b8 100644 --- a/src/enemy/cuccoChickAggr.c +++ b/src/enemy/cuccoChickAggr.c @@ -72,7 +72,7 @@ void sub_080229F8(Entity* this) { this->actionDelay = 6; this->field_0xf = 8; this->frameIndex = 0; - this->nonPlanarMovement = 0xc0; + this->speed = 0xc0; sub_08022B44(this); } else { this->field_0x20 = 0x10000; @@ -111,7 +111,7 @@ void sub_08022AA4(Entity* this) { this->action = 2; this->actionDelay = (rand & 3) + 1; this->field_0xf = 1; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; if (!sub_08049FA0(this) && (rand >> 8) & 3) { this->direction = sub_08049EE4(this); diff --git a/src/enemy/darkNut.c b/src/enemy/darkNut.c index 82f1d53a..95516741 100644 --- a/src/enemy/darkNut.c +++ b/src/enemy/darkNut.c @@ -430,7 +430,7 @@ void sub_08021328(Entity* this) { void sub_0802134C(Entity* this) { this->action = 15; this->direction = DirectionFromAnimationState(this->animationState); - this->nonPlanarMovement = 0x200; + this->speed = 0x200; this->field_0x76.HWORD = 0x78; sub_08021218(this, 0xe, this->animationState); } @@ -447,7 +447,7 @@ void sub_08021380(Entity* this) { void sub_08021390(Entity* this) { this->action = 7; - this->nonPlanarMovement = 0x200; + this->speed = 0x200; this->damageType = 0x56; sub_08021218(this, 6, this->animationState); } @@ -455,7 +455,7 @@ void sub_08021390(Entity* this) { void sub_080213B0(Entity* this) { this->action = 3; this->actionDelay = 1; - this->nonPlanarMovement = 0xc0; + this->speed = 0xc0; this->field_0x76.HWORD = 0xf0; sub_08021218(this, 3, this->animationState); } @@ -474,7 +474,7 @@ void sub_080213F0(Entity* this) { void sub_08021400(Entity* this) { this->action = 9; - this->nonPlanarMovement = 0x60; + this->speed = 0x60; sub_08021218(this, 10, this->animationState); } diff --git a/src/enemy/fallingBoulder.c b/src/enemy/fallingBoulder.c index 570c3715..29076b1c 100644 --- a/src/enemy/fallingBoulder.c +++ b/src/enemy/fallingBoulder.c @@ -157,15 +157,15 @@ void sub_0802C4B0(Entity* this) { rand = Random() & 7; if (rand & 4) { if (rand & 3) { - this->nonPlanarMovement = gUnk_080CD568[offset | 2]; + this->speed = gUnk_080CD568[offset | 2]; } else { - this->nonPlanarMovement = gUnk_080CD568[offset | 0]; + this->speed = gUnk_080CD568[offset | 0]; } } else { if (rand & 3) { - this->nonPlanarMovement = gUnk_080CD568[offset | 1]; + this->speed = gUnk_080CD568[offset | 1]; } else { - this->nonPlanarMovement = gUnk_080CD568[offset | 3]; + this->speed = gUnk_080CD568[offset | 3]; } } diff --git a/src/enemy/fireballGuy.c b/src/enemy/fireballGuy.c index c77281a7..19e4d9fd 100644 --- a/src/enemy/fireballGuy.c +++ b/src/enemy/fireballGuy.c @@ -41,7 +41,7 @@ void sub_080453E8(Entity* this) { this->action = 1; this->actionDelay = 0; this->spriteSettings.b.draw = 1; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; this->cutsceneBeh.HALF.LO = this->currentHealth; this->field_0x3c |= 0x10; sub_0804A720(this); diff --git a/src/enemy/gibdo.c b/src/enemy/gibdo.c index 02b7f327..7b44f754 100644 --- a/src/enemy/gibdo.c +++ b/src/enemy/gibdo.c @@ -212,7 +212,7 @@ void sub_080377B0(Entity* this) { this->field_0xf = 8; r1 = Random(); this->field_0x74.HWORD = (r1 & 0x38) + 0x78; - this->nonPlanarMovement = 0x40; + this->speed = 0x40; r2 = Random(); if (!sub_08049FA0(this) && (r2 & 3)) { this->direction = DirectionRoundUp(sub_08049EE4(this)); @@ -234,7 +234,7 @@ NONMATCH("asm/non_matching/gibdo/sub_08037810.inc", u32 sub_08037810(Entity* thi this->action = 3; this->actionDelay = 0x18; this->field_0xf = 0x8; - this->nonPlanarMovement = 0xc0; + this->speed = 0xc0; y = DirectionRoundUp(GetFacingDirection(this, gUnk_020000B0)); this->direction = y; this->animationState = y / 8; @@ -259,7 +259,7 @@ u32 sub_080378B0(Entity* this) { if (sub_0804A044(this, gUnk_020000B0, 0xa) == this->direction) if (sub_0806FCB8(this, gUnk_020000B0->x.HALF.HI, gUnk_020000B0->y.HALF.HI, 0x18) != 0) { this->action = 5; - this->nonPlanarMovement = 0x100; + this->speed = 0x100; InitAnimationForceUpdate(this, this->animationState + 8); return 1; } diff --git a/src/enemy/gyorgMale.c b/src/enemy/gyorgMale.c index 86939a3c..66752186 100644 --- a/src/enemy/gyorgMale.c +++ b/src/enemy/gyorgMale.c @@ -144,7 +144,7 @@ void sub_08046930(Entity* this) { if (this->type) { this->previousActionFlag = 5; this->direction = 0x20; - this->nonPlanarMovement = 0x280; + this->speed = 0x280; } sub_08047D88(this); if (this->field_0x7c.BYTES.byte0 == 0) @@ -153,7 +153,7 @@ void sub_08046930(Entity* this) { this->actionDelay = 1; this->animationState = 0; this->direction = 0; - this->nonPlanarMovement = 0x280; + this->speed = 0x280; } void sub_0804696C(Entity* this) { @@ -161,7 +161,7 @@ void sub_0804696C(Entity* this) { if (gRoomControls.roomOriginY + 0x130 > this->y.HALF.HI) { this->previousActionFlag = 2; this->direction = 0x80; - this->nonPlanarMovement = 0x100; + this->speed = 0x100; this->spriteOrientation.flipY = 3; this->spriteRendering.b3 = 3; SoundReq(0x2e); @@ -232,7 +232,7 @@ void sub_08046A9C(Entity* this) { void sub_08046AE8(Entity* this) { this->previousActionFlag = 1; - this->nonPlanarMovement = 0x180; + this->speed = 0x180; sub_08048178(this, ((Entity*)this->myHeap)->next->animationState >> 5); this->field_0x76.HWORD = this->direction << 8; sub_08047D88(this); @@ -310,7 +310,7 @@ void sub_08046CEC(Entity* this) { if (((Entity*)this->myHeap)->prev->field_0x6c.HWORD & 2) { this->action = 2; this->previousActionFlag = 0; - this->animationState = this->nonPlanarMovement; + this->animationState = this->speed; } } @@ -319,7 +319,7 @@ const u16 gUnk_080D1B60[8] = { 0x200, 0x184, 0x28C, 0x210, 0x200, 0x29C, 0x174, void sub_08046D44(Entity* this) { const u16* tmp; this->previousActionFlag = 1; - this->nonPlanarMovement = 0x200; + this->speed = 0x200; tmp = gUnk_080D1B60 + (((Entity*)this->myHeap)->next->animationState >> 5); this->field_0x80.HWORD = tmp[0] + gRoomControls.roomOriginX; this->field_0x82.HWORD = tmp[1] + gRoomControls.roomOriginY; @@ -385,7 +385,7 @@ void sub_08046EF4(Entity* this) { this->actionDelay = 0x7F; this->direction ^= 0x80; } - this->nonPlanarMovement = gUnk_080D1B74[(this->actionDelay >> 3) & 0xF]; + this->speed = gUnk_080D1B74[(this->actionDelay >> 3) & 0xF]; if ((--this->field_0xf & 0xFF) == 0) { Entity* tmp; this->field_0xf = (Random() & 0x38) + 0x78; @@ -428,7 +428,7 @@ void sub_08046F64(Entity* this) { void sub_08046FE8(Entity* this) { this->previousActionFlag = 1; - this->nonPlanarMovement = 0x1c0; + this->speed = 0x1c0; this->field_0x7c.HALF.HI = 0x1e; this->field_0x80.HWORD = gRoomControls.roomOriginX + 0x290; this->field_0x82.HWORD = gRoomControls.roomOriginY + 0x190; @@ -445,10 +445,10 @@ void sub_0804702C(Entity* this) { } } sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8); - if (sub_0806FCB8(this, this->field_0x80.HWORD, this->field_0x82.HWORD, (this->nonPlanarMovement >> 0x10) + 0x10)) { + if (sub_0806FCB8(this, this->field_0x80.HWORD, this->field_0x82.HWORD, (this->speed >> 0x10) + 0x10)) { this->previousActionFlag = 2; this->field_0x76.HWORD = this->direction << 8; - this->nonPlanarMovement = 0x280; + this->speed = 0x280; } } @@ -467,7 +467,7 @@ void sub_080470B4(Entity* this) { sub_08047EA4(this, ((0x100 - this->direction) & 0xFF) << 8); } else { this->previousActionFlag = 3; - this->nonPlanarMovement = 0x200; + this->speed = 0x200; this->field_0x76.HWORD = this->direction << 8; this->field_0x74.HWORD = gUnk_080D1BBC[Random() & 1]; sub_08047D88(this); @@ -485,8 +485,8 @@ void sub_08047140(Entity* this) { } void sub_0804717C(Entity* this) { - if (this->nonPlanarMovement < 0x280) { - this->nonPlanarMovement += 8; + if (this->speed < 0x280) { + this->speed += 8; } sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8); if (gRoomControls.roomOriginX + 0x200 > this->x.HALF.HI) { @@ -495,8 +495,8 @@ void sub_0804717C(Entity* this) { } void sub_080471C8(Entity* this) { - if (this->nonPlanarMovement > 0x180) { - this->nonPlanarMovement -= 0x10; + if (this->speed > 0x180) { + this->speed -= 0x10; } if (this->direction < 0xe0) { this->direction++; @@ -519,7 +519,7 @@ void sub_0804723C(Entity* this) { this->direction -= 2; if (this->direction < 0xc0) { this->previousActionFlag = 7; - this->nonPlanarMovement = 0x200; + this->speed = 0x200; this->direction = 0xc0; this->field_0x76.HWORD = 0xc000; } @@ -538,8 +538,8 @@ void sub_08047284(Entity* this) { } void sub_080472BC(Entity* this) { - if (this->nonPlanarMovement < 0x300) { - this->nonPlanarMovement += 8; + if (this->speed < 0x300) { + this->speed += 8; } sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8); if (gRoomControls.roomOriginX + 0x2B0 >= this->x.HALF.HI) @@ -549,8 +549,8 @@ void sub_080472BC(Entity* this) { } void sub_08047310(Entity* this) { - if (this->nonPlanarMovement < 0x180) { - this->nonPlanarMovement -= 0x10; + if (this->speed < 0x180) { + this->speed -= 0x10; } this->field_0x76.HWORD -= 0x1D0; this->direction = this->field_0x76.HWORD >> 8; @@ -580,7 +580,7 @@ void sub_0804736C(Entity* this) { void sub_080473B8(Entity* this) { this->previousActionFlag = 1; - this->nonPlanarMovement = 0x120; + this->speed = 0x120; this->field_0x80.HWORD = gRoomControls.roomOriginX + 0x200; this->field_0x82.HWORD = gRoomControls.roomOriginY + 0x1D0; sub_08047D88(this); @@ -608,7 +608,7 @@ void sub_080473F0(Entity* this) { if (sub_0806FCB8(this, this->field_0x80.HWORD, this->field_0x82.HWORD, 8)) { this->previousActionFlag = 2; this->field_0x76.HWORD = this->direction << 8; - this->nonPlanarMovement = 0x180; + this->speed = 0x180; } } @@ -625,7 +625,7 @@ void sub_08047484(Entity* this) { sub_08047EA4(this, ((0x100 - this->direction) & 0xFF) << 8); } else { this->previousActionFlag = 3; - this->nonPlanarMovement = 0x200; + this->speed = 0x200; this->direction = 0x40; this->field_0x76.HWORD = 0x4000; this->field_0x74.HWORD = 0x180; @@ -665,7 +665,7 @@ void sub_08047508(Entity* this) { sub_08047E48(this); if (gRoomControls.roomOriginX + 0x280 < this->x.HALF.HI) { this->previousActionFlag = 4; - this->nonPlanarMovement = 0x200; + this->speed = 0x200; this->animationState = this->direction; this->field_0x76.HWORD = this->direction << 8; } @@ -683,7 +683,7 @@ void sub_080475F4(Entity* this) { if (this->direction >= 0xc0) { this->direction = 0xc0; this->previousActionFlag = 5; - this->nonPlanarMovement = 0x200; + this->speed = 0x200; this->field_0x7c.HALF.HI = 0x3c; } sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8); @@ -720,7 +720,7 @@ void sub_0804763C(Entity* this) { sub_08047E48(this); if (gRoomControls.roomOriginX + 0x180 > this->x.HALF.HI) { this->previousActionFlag = 6; - this->nonPlanarMovement = 0x200; + this->speed = 0x200; this->animationState = this->direction; this->field_0x76.HWORD = this->direction << 8; } @@ -738,7 +738,7 @@ void sub_0804772C(Entity* this) { if (this->direction <= 0x40) { this->direction = 0x40; this->previousActionFlag = 3; - this->nonPlanarMovement = 0x200; + this->speed = 0x200; this->field_0x7c.HALF.HI = 0x1e; } sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8); @@ -753,7 +753,7 @@ void sub_08047778(Entity* this) { void sub_08047798(Entity* this) { this->previousActionFlag = 1; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; if (this->x.HALF.HI - gRoomControls.roomOriginX < 0x1F8) { this->field_0x80.HWORD = 0xa8; } else { @@ -767,8 +767,8 @@ void sub_08047798(Entity* this) { const s16 gUnk_080D1BF0[2] = { 0x80, -0x80 }; void sub_080477F0(Entity* this) { - if (this->nonPlanarMovement < 0x300) { - this->nonPlanarMovement += 8; + if (this->speed < 0x300) { + this->speed += 8; } this->direction = sub_080045DA(this->field_0x80.HWORD - this->x.HALF.HI, this->field_0x82.HWORD - this->y.HALF.HI); sub_08047E48(this); @@ -876,7 +876,7 @@ void sub_08047978(Entity* this) { void sub_08047B08(Entity* this) { sub_08047D88(this); this->direction = sub_080045DA(this->field_0x80.HWORD - this->x.HALF.HI, this->field_0x82.HWORD - this->y.HALF.HI); - this->nonPlanarMovement = 0x200; + this->speed = 0x200; sub_08047E58(this); if (!sub_0806FCB8(this, this->field_0x80.HWORD, this->field_0x82.HWORD, 4)) return; @@ -918,7 +918,7 @@ const s8 gUnk_080D1C00[4] = { 0x40, -0x40, -0x40, 0x40 }; void sub_08047BF0(Entity* this) { Entity* tmp; this->direction = gUnk_080D1C00[this->actionDelay & 3]; - this->nonPlanarMovement = 0x100; + this->speed = 0x100; sub_08047E48(this); if (this->actionDelay == 0) { if ((this->field_0xf++ & 0xF) == 0) { @@ -934,7 +934,7 @@ void sub_08047BF0(Entity* this) { } } this->direction = this->field_0x76.HWORD; - this->nonPlanarMovement = 0x140; + this->speed = 0x140; sub_08047E48(this); if (this->y.HALF.HI > gRoomControls.roomOriginY + 0x270) { this->previousActionFlag = 2; @@ -1009,7 +1009,7 @@ void sub_08047DF0(Entity* this, u32 unk1) { sub_08047EA4(this, unk1); oldX = this->x.HALF.HI; oldY = this->y.HALF.HI; - sub_0806F62C(this, this->nonPlanarMovement, this->direction); + sub_0806F62C(this, this->speed, this->direction); if (this->field_0x7c.BYTES.byte0 & 1) { if (sub_08079F8C()) { gPlayerEntity.x.HALF.HI += this->x.HALF.HI - oldX; @@ -1027,7 +1027,7 @@ void sub_08047E58(Entity* this) { u32 oldX, oldY; oldX = this->x.HALF.HI; oldY = this->y.HALF.HI; - sub_0806F62C(this, this->nonPlanarMovement, this->direction); + sub_0806F62C(this, this->speed, this->direction); if (this->field_0x7c.BYTES.byte0 & 1) { if (sub_08079F8C()) { gPlayerEntity.x.HALF.HI += this->x.HALF.HI - oldX; diff --git a/src/enemy/helmasaur.c b/src/enemy/helmasaur.c index c36db42b..7a75bd29 100644 --- a/src/enemy/helmasaur.c +++ b/src/enemy/helmasaur.c @@ -177,7 +177,7 @@ void sub_0802BE18(Entity* this) { if (--this->actionDelay == 0) { this->action = 4; this->actionDelay = 0x1e; - this->nonPlanarMovement = 0x300; + this->speed = 0x300; } else { sub_0802C18C(this); } @@ -197,12 +197,12 @@ void sub_0802BE48(Entity* this) { } void sub_0802BE80(Entity* this) { - this->nonPlanarMovement -= 0x20; - if (0xff < this->nonPlanarMovement) { + this->speed -= 0x20; + if (0xff < this->speed) { sub_0802C1CC(this); } - if (this->nonPlanarMovement > 0) { + if (this->speed > 0) { sub_080AEFE0(this); sub_0802C18C(this); } else { @@ -230,7 +230,7 @@ void sub_0802BEEC(Entity* this) { } else if (!sub_08003FC4(this, 0x1c00)) { this->action = 8; this->actionDelay = 30; - this->nonPlanarMovement = 0x120; + this->speed = 0x120; } } @@ -367,7 +367,7 @@ void sub_0802C1CC(Entity* this) { void sub_0802C218(Entity* this) { this->action = 6; - this->nonPlanarMovement = 0xe0; + this->speed = 0xe0; this->field_0x20 = 0x18000; } diff --git a/src/enemy/keaton.c b/src/enemy/keaton.c index 0da3cb57..79e98065 100644 --- a/src/enemy/keaton.c +++ b/src/enemy/keaton.c @@ -104,7 +104,7 @@ void sub_080324FC(Entity* this) { this->field_0xf--; if (this->field_0xf == 0) { this->action = 4; - this->nonPlanarMovement = 0x1E0; + this->speed = 0x1E0; this->field_0x76.HWORD = 0x46; this->field_0x78.HWORD = 0; *(((u8*)&this->field_0x7a) + 1) = 0; @@ -199,7 +199,7 @@ u32 sub_0803271C(Entity* this) { void sub_08032740(Entity* this) { this->action = 1; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; InitializeAnimation(this, this->animationState); sub_08032650(this); } @@ -207,7 +207,7 @@ void sub_08032740(Entity* this) { void sub_0803275C(Entity* this) { this->action = 5; this->actionDelay = 0x2D; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; InitAnimationForceUpdate(this, this->animationState); sub_0803269C(this, this->direction); sub_080327E0(this); diff --git a/src/enemy/leever.c b/src/enemy/leever.c index 4e6fb823..a4d5ffa9 100644 --- a/src/enemy/leever.c +++ b/src/enemy/leever.c @@ -167,13 +167,13 @@ void Leever_Move(Entity* this) { this->field_0x74.HWORD = 1; } - this->nonPlanarMovement = (this->frames.all & 0xf) * 0x20; + this->speed = (this->frames.all & 0xf) * 0x20; if (this->type == LeeverForm_Red) { if ((this->field_0xf++ & 0xf) == 0) { sub_08004596(this, sub_0800132C(this, gUnk_020000B0)); } } else { - this->nonPlanarMovement += 0x40; + this->speed += 0x40; if ((this->field_0xf++ & 0x7) == 0) { sub_08004596(this, sub_0800132C(this, gUnk_020000B0)); } diff --git a/src/enemy/madderpillar.c b/src/enemy/madderpillar.c index bca381f6..31789784 100644 --- a/src/enemy/madderpillar.c +++ b/src/enemy/madderpillar.c @@ -116,7 +116,7 @@ void sub_0802999C(Entity* this) { this->action = 1; this->flags |= 0x80; this->direction = DirectionRound(Random()); - this->nonPlanarMovement = 0xa0; + this->speed = 0xa0; this->animationState = 0xff; this->y.WORD += 6; this->parent = this; @@ -136,7 +136,7 @@ void sub_08029A94(Entity* this) { void sub_08029AA4(Entity* this) { if (this->field_0x76.HALF.HI != 0) { this->action = 3; - this->nonPlanarMovement = 0x108; + this->speed = 0x108; this->damageType = 0x6a; this->field_0x7a.HWORD = 0x168; this->field_0x74.HALF.HI = 4; @@ -151,7 +151,7 @@ void sub_08029AE0(Entity* this) { sub_0802A098(this); if (--this->field_0x7a.HWORD == 0) { this->action = 1; - this->nonPlanarMovement = 0xa0; + this->speed = 0xa0; this->field_0x74.HALF.HI = 0; sub_08029EEC(this); sub_0801D2B4(this, 0x77); diff --git a/src/enemy/miniFireballGuy.c b/src/enemy/miniFireballGuy.c index 50a10eec..3210aeeb 100644 --- a/src/enemy/miniFireballGuy.c +++ b/src/enemy/miniFireballGuy.c @@ -36,7 +36,7 @@ void nullsub_23(Entity* this) { void sub_08045618(Entity* this) { this->action = 1; this->spriteSettings.b.draw = 1; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; this->field_0x3c = this->field_0x3c | 0x10; sub_0804A720(this); InitializeAnimation(this, 1); diff --git a/src/enemy/miniSlime.c b/src/enemy/miniSlime.c index ad880319..6df8075a 100644 --- a/src/enemy/miniSlime.c +++ b/src/enemy/miniSlime.c @@ -48,7 +48,7 @@ void nullsub_22(void) { void sub_080452A4(Entity* this) { this->action = 1; this->spriteSettings.b.draw = 1; - this->nonPlanarMovement = 0x100; + this->speed = 0x100; sub_0804A720(this); InitializeAnimation(this, 6); if (this->type2) { @@ -70,8 +70,8 @@ void sub_080452FC(Entity* this) { if (--this->actionDelay == 0) { this->action = 3; this->actionDelay = 1; - if (0 < this->nonPlanarMovement) - this->actionDelay = sub_0806FA04(0x1000, this->nonPlanarMovement) >> 0x8; + if (0 < this->speed) + this->actionDelay = sub_0806FA04(0x1000, this->speed) >> 0x8; if (sub_08049FA0(this) == 0 && (Random() & 3)) { cVar2 = sub_08049EE4(this); diff --git a/src/enemy/peahat.c b/src/enemy/peahat.c index b2d27d02..1739b44b 100644 --- a/src/enemy/peahat.c +++ b/src/enemy/peahat.c @@ -59,14 +59,14 @@ void sub_0801FFDC(Entity* this) { this->field_0x82.HALF.LO = 0; this->animationState = PeahatAnimation_SlicedPropeller; this->action = 5; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; this->hurtBlinkTime = -30; this->field_0x80.HALF.HI = 0; InitializeAnimation(this, this->animationState); } else if (this->bitfield == 0x9b) { this->animationState = PeahatAnimation_BrokenPropeller; this->action = 5; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; this->hurtBlinkTime = -30; this->field_0x80.HALF.HI = 0; InitializeAnimation(this, this->animationState); @@ -74,7 +74,7 @@ void sub_0801FFDC(Entity* this) { if (this->animationState == PeahatAnimation_Flying) { this->action = 1; this->actionDelay = 30; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; this->direction = -1; this->field_0x82.HALF.HI = 0x78; GetNextFrame(this); @@ -154,7 +154,7 @@ void Peahat_Fly(Entity* this) { this->action = 2; this->previousActionFlag = Random() & 3; this->actionDelay = 60; - this->nonPlanarMovement = 160; + this->speed = 160; } } @@ -178,7 +178,7 @@ void Peahat_ChargeStart(Entity* this) { } else { this->action = 3; this->actionDelay = 120; - this->nonPlanarMovement = 192; + this->speed = 192; this->direction = (GetFacingDirection(this, gUnk_020000B0) + gUnk_080CA5D4[Random() & 1]) & 0x1f; } } else { @@ -195,7 +195,7 @@ void Peahat_ChargeTarget(Entity* this) { } if (60 < this->actionDelay) { if (this->actionDelay & 1) - this->nonPlanarMovement += 4; + this->speed += 4; if ((gScreenTransition.frameCount & 3) == 0) sub_08004596(this, GetFacingDirection(this, gUnk_020000B0)); @@ -211,12 +211,12 @@ void Peahat_ChargeEnd(Entity* this) { if (--this->actionDelay == 0) { this->action = 1; this->actionDelay = 1; - this->nonPlanarMovement = 128; + this->speed = 128; this->field_0x82.HALF.HI = 120; GetNextFrame(this); } else { if (this->actionDelay & 1) - this->nonPlanarMovement -= 8; + this->speed -= 8; sub_080AEFE0(this); UpdateAnimationVariableFrames(this, 4); @@ -331,7 +331,7 @@ void PeahatPropeller_Initialize(Entity* this) { this->spriteRendering.b3 = 1; this->spriteOrientation.flipY = 1; this->spriteSettings.b.shadow = 0; - this->nonPlanarMovement = 0x20; + this->speed = 0x20; this->direction = (Random() & 0x10) + 8; InitializeAnimation(this, PeahatAnimation_Propeller); } diff --git a/src/enemy/pesto.c b/src/enemy/pesto.c index 8d8e39fa..50826bc9 100644 --- a/src/enemy/pesto.c +++ b/src/enemy/pesto.c @@ -83,7 +83,7 @@ void sub_08023FF0(Entity* this) { this->flags |= 0x80; this->damageType = 0x77; this->actionDelay = 1; - this->nonPlanarMovement = 0x40; + this->speed = 0x40; } else { gUnk_080CBEF8[this->previousActionFlag](this); } @@ -183,7 +183,7 @@ void sub_080241C0(Entity* this) { if (PlayerInRange(this, 3, (gPlayerState.hurtBlinkSpeed != 0) ? 0xa0 : 0x40) && sub_08049FDC(this, 3) && gPlayerEntity.action != 0x1e) { this->field_0x80.HALF.LO++; - this->nonPlanarMovement = 0; + this->speed = 0; sub_08024A14(this, 3, 10); } else if (--this->field_0xf == 0) { sub_08024A14(this, 0, 0x20); @@ -222,8 +222,8 @@ void sub_080242A0(Entity* this) { if (--this->actionDelay == 0) { this->direction = GetFacingDirection(this, gUnk_020000B0); sub_08024E00(this, 1); - if (this->nonPlanarMovement != 0) { - this->nonPlanarMovement = 0; + if (this->speed != 0) { + this->speed = 0; } else { sub_08024E1C(this); } @@ -235,7 +235,7 @@ void sub_080242A0(Entity* this) { this->action = 4; this->field_0x80.HALF.LO = 0; this->actionDelay = 0x10; - this->nonPlanarMovement = 0; + this->speed = 0; } } } @@ -246,7 +246,7 @@ void sub_0802433C(Entity* this) { case 0: if (--this->actionDelay == 0) { this->field_0x80.HALF.LO++; - this->nonPlanarMovement = 0x100; + this->speed = 0x100; this->field_0xf = 8; sub_08024E00(this, 1); } @@ -255,7 +255,7 @@ void sub_0802433C(Entity* this) { if (--this->actionDelay == 0) { this->action = 5; this->field_0x80.HALF.LO = 0; - this->nonPlanarMovement = 0x140; + this->speed = 0x140; this->actionDelay = 0xc0; this->field_0xf = 8; } else { @@ -274,12 +274,12 @@ void sub_080243B8(Entity* this) { if (this->attachedEntity == NULL || this->attachedEntity->next == NULL) { this->field_0x80.HALF.LO = 2; this->actionDelay = 0x20; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; this->field_0x82.HALF.HI = 0x80; } else if (sub_08049F1C(this, gUnk_020000B0, 0xe)) { this->field_0x80.HALF.LO++; this->actionDelay = 0x1e; - this->nonPlanarMovement = 0x100; + this->speed = 0x100; this->field_0x82.HALF.HI = 0x80; this->attachedEntity->action = 2; } else if (--this->actionDelay) { @@ -297,14 +297,14 @@ void sub_080243B8(Entity* this) { if (--this->actionDelay == 0) { this->field_0x80.HALF.LO++; this->actionDelay = 0x20; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; } break; case 2: if (--this->actionDelay == 0) { this->action = 6; this->field_0x80.HALF.LO = 0; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; sub_08024B38(this); if ((this->field_0x82.HALF.HI & 0x40) == 0) { @@ -338,7 +338,7 @@ void sub_080244E8(Entity* this) { this->field_0x80.HALF.LO += 1; this->field_0x82.HALF.LO += 1; this->field_0xf = 0; - this->nonPlanarMovement = 0; + this->speed = 0; } else { this->actionDelay = 0x30; this->field_0xf = 4; @@ -367,8 +367,8 @@ void sub_080244E8(Entity* this) { u32 tmp; if (--this->actionDelay == 0) { - if (this->nonPlanarMovement) { - this->nonPlanarMovement = 0; + if (this->speed) { + this->speed = 0; } else { sub_08024E1C(this); } @@ -386,7 +386,7 @@ void sub_080244E8(Entity* this) { this->field_0x80.HALF.LO++; this->actionDelay = 0xc; this->direction = 0x10; - this->nonPlanarMovement = tmp; + this->speed = tmp; this->cutsceneBeh.HALF.LO = 0; this->flags2 &= 0xfc; sub_080249DC(this); @@ -452,7 +452,7 @@ void sub_080244E8(Entity* this) { if (--this->actionDelay == 0) { this->field_0x80.HALF.LO++; this->field_0xf = 0; - this->nonPlanarMovement = 0; + this->speed = 0; this->field_0x82.HALF.LO++; } break; @@ -481,7 +481,7 @@ void sub_080244E8(Entity* this) { this->field_0x80.HALF.LO += 1; this->actionDelay = 0xc0; this->field_0xf = 8; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; sub_080249DC(this); break; default: @@ -495,7 +495,7 @@ void sub_080244E8(Entity* this) { if (this->field_0x82.HALF.HI & 0x80) { this->field_0x82.HALF.HI = 0xc0; this->field_0x80.HALF.LO = 0; - this->nonPlanarMovement = 0x40; + this->speed = 0x40; this->actionDelay = 0x40; this->field_0xf = 8; sub_08024A14(this, 0, 8); @@ -510,7 +510,7 @@ void sub_080244E8(Entity* this) { case 7: if (gPlayerEntity.height.HALF.HI == 0) { this->field_0x80.HALF.LO = 0; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; sub_08024B38(this); } } @@ -708,7 +708,7 @@ bool32 sub_08024C48(Entity* this, bool32 unk) { void sub_08024C7C(Entity* this) { this->action = 1; - this->nonPlanarMovement = 0x40; + this->speed = 0x40; this->actionDelay = 0; sub_08024A14(this, 0, 0x20); } @@ -718,7 +718,7 @@ void sub_08024C94(Entity* this) { this->field_0x80.HALF.LO = 0; this->actionDelay = 0x40; this->field_0xf = 0; - this->nonPlanarMovement = 0xc0; + this->speed = 0xc0; this->field_0x82.HALF.HI = 0x80; sub_08024A14(this, 3, this->field_0xf); } @@ -784,7 +784,7 @@ void sub_08024E00(Entity* this, u32 unk) { } void sub_08024E1C(Entity* this) { - this->nonPlanarMovement = gUnk_080CBF18[sub_08024E34()]; + this->speed = gUnk_080CBF18[sub_08024E34()]; } u32 sub_08024E34(void) { @@ -808,7 +808,7 @@ void sub_08024E4C(Entity* this) { this->field_0x86.HALF.HI = 0; sub_08024F50(this); this->field_0x80.HALF.LO = 0; - this->nonPlanarMovement = 0x40; + this->speed = 0x40; this->actionDelay = 0x40; this->field_0xf = 8; sub_08024A14(this, 0, 8); @@ -850,7 +850,7 @@ void sub_08024F50(Entity* this) { gPlayerEntity.flags |= 0x80; gPlayerEntity.hurtBlinkTime = -0x3c; gPlayerEntity.direction = gPlayerEntity.animationState << 2; - gPlayerEntity.nonPlanarMovement = 0; + gPlayerEntity.speed = 0; gPlayerEntity.spritePriority.b1 = this->cutsceneBeh.HALF.HI; gPlayerEntity.height.HALF.HI = gPlayerEntity.spriteOffsetY; gPlayerEntity.spriteOffsetY = 0; @@ -858,7 +858,7 @@ void sub_08024F50(Entity* this) { this->field_0x82.HALF.HI = 0xc0; this->field_0x80.HALF.LO += 2; this->cutsceneBeh.HALF.LO = 0; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; } // clang-format off diff --git a/src/enemy/rollobite.c b/src/enemy/rollobite.c index 474f3849..622babaf 100644 --- a/src/enemy/rollobite.c +++ b/src/enemy/rollobite.c @@ -103,7 +103,7 @@ void sub_080207A8(Entity* this) { this->field_0x3a &= 0xfb; this->direction ^= 0x10; this->field_0x20 = 0x18000; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; InitializeAnimation(this, this->animationState + 0x10); } @@ -196,7 +196,7 @@ void Rollobite_Unroll(Entity* this) { GetNextFrame(this); if (this->frames.all & 0x80) { this->flags |= 0x80; - this->nonPlanarMovement = 0x100; + this->speed = 0x100; this->damageType = 34; sub_08020A30(this); this->direction = DirectionFromAnimationState(this->animationState); diff --git a/src/enemy/rope.c b/src/enemy/rope.c index 44a955b1..d270c688 100644 --- a/src/enemy/rope.c +++ b/src/enemy/rope.c @@ -61,7 +61,7 @@ void sub_08031434(Entity* this) { sub_0804A720(this); this->animationState = 0xff; this->field_0x1c = 1; - this->field_0x7a.HWORD = this->nonPlanarMovement; + this->field_0x7a.HWORD = this->speed; if (!(this->type)) { sub_08031600(this); } else { @@ -113,7 +113,7 @@ void sub_080314FC(Entity* this) { if (u != 0xff) { this->action = 3; this->actionDelay = 0x1e; - this->field_0x7a.HWORD = this->nonPlanarMovement = 0x1a0; + this->field_0x7a.HWORD = this->speed = 0x1a0; this->direction = u; this->animationState = this->direction >> 3; InitializeAnimation(this, this->animationState + 4); @@ -158,7 +158,7 @@ void sub_08031600(Entity* this) { u32 r; this->action = 2; this->actionDelay = (Random() & 0x30) + 0x3c; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; this->field_0x7a.HWORD = 0x80; r = Random() & 0x18; this->direction = r; @@ -176,6 +176,6 @@ u32 sub_0803163C(Entity* this) { } else { h = this->field_0x7a.HWORD; } - this->nonPlanarMovement = h; + this->speed = h; return ProcessMovement(this); } diff --git a/src/enemy/ropeGolden.c b/src/enemy/ropeGolden.c index b36b9635..606e2c9f 100644 --- a/src/enemy/ropeGolden.c +++ b/src/enemy/ropeGolden.c @@ -88,7 +88,7 @@ void sub_080383AC(Entity* this) { u32 v; this->action = 1; this->actionDelay = 0x8; - this->nonPlanarMovement = 0x100; + this->speed = 0x100; this->direction = DirectionRoundUp(GetFacingDirection(this, &gPlayerEntity)); v = this->direction >> 3; if (v != this->animationState) { @@ -101,7 +101,7 @@ void sub_080383E4(Entity* this) { u32 v; this->action = 2; this->actionDelay = 0x8; - this->nonPlanarMovement = 0x280; + this->speed = 0x280; v = DirectionRoundUp(GetFacingDirection(this, &gPlayerEntity)); this->direction = v; this->field_0x78.HALF.LO = v; diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c index 74775cab..64584892 100644 --- a/src/enemy/rupeeLike.c +++ b/src/enemy/rupeeLike.c @@ -239,7 +239,7 @@ void sub_080296D8(Entity* this) { gPlayerEntity.direction = gPlayerEntity.animationState << 2; gPlayerEntity.spritePriority.b1 = this->field_0x80.HALF.LO; gPlayerEntity.spriteOffsetY = 0; - gPlayerEntity.nonPlanarMovement = 0x140; + gPlayerEntity.speed = 0x140; this->action = 5; this->field_0xf = 0x3c; this->flags2 |= 3; diff --git a/src/enemy/sensorBladeTrap.c b/src/enemy/sensorBladeTrap.c index d1bfd125..0aae18f1 100644 --- a/src/enemy/sensorBladeTrap.c +++ b/src/enemy/sensorBladeTrap.c @@ -35,7 +35,7 @@ void sub_0802BA18(Entity* this) { return; this->action = 2; - this->nonPlanarMovement = this->field_0x78.HWORD; + this->speed = this->field_0x78.HWORD; this->direction = direction; switch (direction >> 3) { @@ -87,7 +87,7 @@ void sub_0802BAFC(Entity* this) { void sub_0802BB10(Entity* this) { this->action = 3; - this->nonPlanarMovement = 0xc0; + this->speed = 0xc0; this->direction = this->direction ^ 0x10; EnqueueSFX(0x74); } diff --git a/src/enemy/slime.c b/src/enemy/slime.c index 2235bcf9..c1b0185b 100644 --- a/src/enemy/slime.c +++ b/src/enemy/slime.c @@ -57,7 +57,7 @@ void nullsub_171() { void sub_08044FC8(Entity* this) { this->action = 1; this->spriteSettings.b.draw = 1; - this->nonPlanarMovement = 128; + this->speed = 128; sub_0804A720(this); InitializeAnimation(this, 0); sub_08044FF8(this); @@ -74,8 +74,8 @@ void sub_08045018(Entity* this) { if (--this->actionDelay == 0) { this->action = 3; this->actionDelay = 1; - if (0 < this->nonPlanarMovement) { - this->actionDelay = sub_0806FA04(4096, this->nonPlanarMovement) >> 8; + if (0 < this->speed) { + this->actionDelay = sub_0806FA04(4096, this->speed) >> 8; } if (sub_08049FA0(this) == 0 && (Random() & 3)) { this->direction = (sub_08049EE4(this) + 0xfc + (Random() & 8)) & 24; diff --git a/src/enemy/smallPesto.c b/src/enemy/smallPesto.c index 8eb16b63..810bc731 100644 --- a/src/enemy/smallPesto.c +++ b/src/enemy/smallPesto.c @@ -37,7 +37,7 @@ void sub_0803169C(Entity* this) { this->action = 1; this->previousActionFlag = 0; this->flags = this->flags | 0x80; - this->nonPlanarMovement = 0x40; + this->speed = 0x40; this->field_0xf = 1; } else { gUnk_080CE554[this->previousActionFlag](this); diff --git a/src/enemy/spearMoblin.c b/src/enemy/spearMoblin.c index d15068a6..e76d44a3 100644 --- a/src/enemy/spearMoblin.c +++ b/src/enemy/spearMoblin.c @@ -58,7 +58,7 @@ void sub_08028284(Entity* this) { this->attachedEntity->hurtBlinkTime = this->hurtBlinkTime; if (this->currentHealth == 0) { - this->nonPlanarMovement = 0; + this->speed = 0; this->field_0x82.HALF.LO = 0; sub_080287E0(this); DeleteEntity(this->attachedEntity); @@ -86,7 +86,7 @@ void sub_08028314(Entity* this) { if (this->actionDelay) { this->animationState = this->type2 << 1; this->actionDelay = 0x1e; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; this->direction = this->animationState << 2; sub_080287E0(this); } else { @@ -164,13 +164,13 @@ void sub_08028488(Entity* this) { switch (this->field_0x82.HALF.LO) { case 3: this->action = 4; - this->nonPlanarMovement = 0x180; + this->speed = 0x180; this->direction = sub_08049F84(this, 1); EnqueueSFX(0x11e); break; case 2: this->action = 2; - this->nonPlanarMovement = 0; + this->speed = 0; this->actionDelay = (Random() & 7) * 3 + 0x40; break; case 4: @@ -180,7 +180,7 @@ void sub_08028488(Entity* this) { default: this->action = 1; this->field_0x82.HALF.LO = 1; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; this->actionDelay = (Random() & 7) * 3 + 0x22; break; } @@ -245,7 +245,7 @@ void sub_08028604(Entity* this) { this->field_0xf = 0; if (this->field_0x82.HALF.LO == 1) { this->actionDelay = gUnk_080CC7BC[Random() & 3]; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; if (sub_08049FA0(this) != 0) { this->direction = gUnk_080CC7D0[Random() & 7] + 0x18 + this->direction & 0x18; } else { @@ -262,7 +262,7 @@ void sub_08028604(Entity* this) { } } else { this->actionDelay = 0xc; - this->nonPlanarMovement = 0; + this->speed = 0; } if (this->direction >> 2 != this->animationState) { @@ -324,7 +324,7 @@ void sub_080287B4(Entity* this) { this->field_0xf = 0; this->field_0x80.HALF.LO = 0; this->field_0x7a.HALF.HI = 0; - this->nonPlanarMovement = 0; + this->speed = 0; this->field_0x82.HALF.LO = 0; sub_080287E0(this); } @@ -371,7 +371,7 @@ void sub_08028858(Entity* this) { this->hitbox->height = box->height; if (this->field_0x82.HALF.LO == 0) { - this->nonPlanarMovement = 0; + this->speed = 0; } ProcessMovement(this); diff --git a/src/enemy/spikedBeetle.c b/src/enemy/spikedBeetle.c index 57d11579..6075879b 100644 --- a/src/enemy/spikedBeetle.c +++ b/src/enemy/spikedBeetle.c @@ -50,7 +50,7 @@ void sub_0802B628(Entity* this) { if (this->action < 6) { this->action = 6; this->field_0x20 = 0x18000; - this->nonPlanarMovement = 0xc0; + this->speed = 0xc0; this->direction = this->field_0x3e; this->field_0x42 = 0; this->hurtBlinkTime = -8; @@ -100,7 +100,7 @@ void sub_0802B7A4(Entity* this) { if (--this->actionDelay == 0) { this->action = 1; this->actionDelay = gUnk_080CD314[Random() & 3]; - this->nonPlanarMovement = 0x60; + this->speed = 0x60; sub_0802B960(this); if (this->direction != 0xff) { u32 animation = this->direction >> 3; @@ -117,7 +117,7 @@ void sub_0802B7FC(Entity* this) { if (--this->actionDelay == 0) { this->action = 4; this->actionDelay = 0x78; - this->nonPlanarMovement = 0x1c0; + this->speed = 0x1c0; } } @@ -167,7 +167,7 @@ void sub_0802B8E0(Entity* this) { } else { this->action = 8; this->field_0x20 = 0x10000; - this->nonPlanarMovement = 0x60; + this->speed = 0x60; this->damageType = 99; InitializeAnimation(this, this->animationState); EnqueueSFX(299); diff --git a/src/enemy/spinyChuchu.c b/src/enemy/spinyChuchu.c index 7a2f50fa..f6960d45 100644 --- a/src/enemy/spinyChuchu.c +++ b/src/enemy/spinyChuchu.c @@ -159,7 +159,7 @@ void sub_080226EC(Entity* this) { if (sub_080228F0(this)) { this->action = 6; this->field_0x20 = 0x12000; - this->nonPlanarMovement = 0x140; + this->speed = 0x140; this->direction = GetFacingDirection(this, gUnk_020000B0); this->damageType = 0x5a; InitializeAnimation(this, 4); @@ -210,7 +210,7 @@ void sub_0802281C(Entity* this) { GetNextFrame(this); if (this->frames.all & 0x80) { this->action = 2; - this->nonPlanarMovement = 0x20; + this->speed = 0x20; InitializeAnimation(this, 0); sub_0804AA1C(this); } @@ -233,7 +233,7 @@ void sub_0802289C(Entity* this) { GetNextFrame(this); if (this->frames.all & 0x80) { this->action = 2; - this->nonPlanarMovement = 0x20; + this->speed = 0x20; this->field_0x80.HALF.HI = 0x78; InitializeAnimation(this, 0); } diff --git a/src/enemy/vaatiBall.c b/src/enemy/vaatiBall.c index ded83908..e2223166 100644 --- a/src/enemy/vaatiBall.c +++ b/src/enemy/vaatiBall.c @@ -153,7 +153,7 @@ void sub_08044868(Entity* this) { if (this->frames.all & 0x80) { this->field_0x74.HALF.LO = 1; this->direction = sub_080045B4(this, vaati->x.HALF.HI, vaati->y.HALF.HI - 0x10); - this->nonPlanarMovement = 0x180; + this->speed = 0x180; } break; case 1: @@ -228,7 +228,7 @@ void sub_080449F8(Entity* this) { if (this->field_0x78.HALF.LO == 0) { this->field_0x78.HALF.LO++; - this->nonPlanarMovement = 640; + this->speed = 640; } this->actionDelay = 4; @@ -319,7 +319,7 @@ void sub_08044B04(Entity* this) { this->field_0xf = 32; } - this->nonPlanarMovement = this->field_0x78.HALF.LO ? 640 : 1280; + this->speed = this->field_0x78.HALF.LO ? 640 : 1280; } } break; @@ -329,7 +329,7 @@ void sub_08044B04(Entity* this) { this->direction = (this->direction + 1) & 0x1f; if (++this->field_0xf == 0x30) { u32 direction = sub_080045B4(this, vaati->x.HALF.HI, vaati->y.HALF.HI - 0x10); - this->nonPlanarMovement = 0; + this->speed = 0; this->direction = (direction + 16) & 0x1f; this->actionDelay = 16; this->field_0xf = 16; @@ -341,32 +341,32 @@ void sub_08044B04(Entity* this) { if (this->field_0xf == 0) { switch (--this->actionDelay) { case 12: - this->nonPlanarMovement = 1280; + this->speed = 1280; break; case 0: this->field_0x74.HALF.LO++; this->direction = sub_080045B4(this, vaati->x.HALF.HI, vaati->y.HALF.HI - 0x10); - this->nonPlanarMovement = 0; + this->speed = 0; this->actionDelay = 4; this->field_0xf = 16; break; case 4: - this->nonPlanarMovement = 640; + this->speed = 640; break; } } else { if (--this->field_0xf == 0) - this->nonPlanarMovement = 640; + this->speed = 640; } break; case 3: if (this->field_0xf) { if (--this->field_0xf == 0) - this->nonPlanarMovement = 640; + this->speed = 640; } else { if (this->actionDelay) { if (--this->actionDelay == 0) { - this->nonPlanarMovement = 1280; + this->speed = 1280; SoundReq(0x14f); } } @@ -448,7 +448,7 @@ void sub_08044DEC(Entity* this) { } this->flags &= 0x7f; this->field_0x78.HALF.LO = 0; - this->nonPlanarMovement = 0x300; + this->speed = 0x300; off = this->parent->field_0x80.HALF.LO - 1; this->direction = gUnk_080D1628[off][this->field_0x78.HALF.HI]; PositionRelative(this->parent, this, 0, -0x100000); @@ -464,11 +464,11 @@ void sub_08044E74(Entity* this, u32 state) { this->direction += 0x18; this->direction &= 0x1f; PositionRelative(this->parent, this, 0, -0x100000); - this->nonPlanarMovement = 12288; + this->speed = 12288; sub_0806F69C(this); this->direction += 0x8; this->direction &= 0x1f; - this->nonPlanarMovement = 1280; + this->speed = 1280; sub_0806F69C(this); break; case 1: @@ -497,5 +497,5 @@ void sub_08044E74(Entity* this, u32 state) { } this->actionDelay = 1; this->field_0x78.HALF.LO = 0; - this->nonPlanarMovement = 1280; + this->speed = 1280; } diff --git a/src/enemy/wallMaster2.c b/src/enemy/wallMaster2.c index 7023c024..f6d32479 100644 --- a/src/enemy/wallMaster2.c +++ b/src/enemy/wallMaster2.c @@ -83,7 +83,7 @@ void sub_0802CD54(Entity* this) { this->action = 2; tmp = Random() >> 0x10; this->actionDelay = tmp; - this->nonPlanarMovement = 0xc0; + this->speed = 0xc0; this->field_0x78.HWORD = gUnk_080CD728[Random() & 3]; this->field_0x7a.HALF.HI = (tmp >> 8) & 0x60; return; @@ -107,7 +107,7 @@ void sub_0802CDE8(Entity* this) { } else { this->action = 1; this->actionDelay = 60; - this->nonPlanarMovement = 0x60; + this->speed = 0x60; this->field_0x7c.HALF.LO = (Random() & 0x38) + 0x96; } GetNextFrame(this); diff --git a/src/enemy/waterDrop.c b/src/enemy/waterDrop.c index 017eb2b9..f994b564 100644 --- a/src/enemy/waterDrop.c +++ b/src/enemy/waterDrop.c @@ -23,7 +23,7 @@ void sub_0802A250(Entity* this) { this->action = 1; this->actionDelay = 0; this->field_0x20 = -0x30000; - this->nonPlanarMovement = gUnk_080CD03C[Random() & 3]; + this->speed = gUnk_080CD03C[Random() & 3]; this->direction = gUnk_080CD040[Random() & 3] + 0x18; this->collisionLayer = 2; InitializeAnimation(this, 0); |
