diff options
| author | theo3 <arisstephenson2@gmail.com> | 2021-03-13 01:14:46 -0800 |
|---|---|---|
| committer | theo3 <arisstephenson2@gmail.com> | 2021-03-13 01:14:46 -0800 |
| commit | e251d79ffd4ee1c4b10def3ecb41f2d572c63664 (patch) | |
| tree | 29d22198d60bc4f770ae6eb78d72b2726208d34d /src/enemy | |
| parent | ebf2ede70dad51331a0233baed8cbed42a9c13a4 (diff) | |
quick fix 🙂
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 3344b5b5..2825aed5 100644 --- a/src/enemy/acroBandits.c +++ b/src/enemy/acroBandits.c @@ -452,7 +452,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 61e54b6a..5ba78755 100644 --- a/src/enemy/beetle.c +++ b/src/enemy/beetle.c @@ -102,7 +102,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; } @@ -118,7 +118,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); } } @@ -139,7 +139,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); @@ -309,9 +309,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 bf4b4372..d9c1a2a8 100644 --- a/src/enemy/bobomb.c +++ b/src/enemy/bobomb.c @@ -53,7 +53,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; @@ -68,7 +68,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; @@ -224,7 +224,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; @@ -261,11 +261,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 b8dc9575..228855be 100644 --- a/src/enemy/bombPeahat.c +++ b/src/enemy/bombPeahat.c @@ -174,7 +174,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; @@ -244,7 +244,7 @@ void sub_0802AB40(Entity* this) { } } else { this->action = 5; - this->nonPlanarMovement = 0; + this->speed = 0; InitializeAnimation(this, this->type + 1); } break; @@ -256,7 +256,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 99a9160a..e8ee87d3 100644 --- a/src/enemy/chuchu.c +++ b/src/enemy/chuchu.c @@ -54,7 +54,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); } @@ -293,7 +293,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); } @@ -417,7 +417,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); } @@ -469,7 +469,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); } @@ -592,7 +592,7 @@ void sub_0801F940(Entity* this) { } else { this->action = 6; this->field_0xf = 60; - this->nonPlanarMovement = 0x20; + this->speed = 0x20; InitializeAnimation(this, 2); } } @@ -644,7 +644,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); } } @@ -705,7 +705,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 de87165a..e0f7a8f0 100644 --- a/src/enemy/cuccoChickAggr.c +++ b/src/enemy/cuccoChickAggr.c @@ -71,7 +71,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; @@ -110,7 +110,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 49acb71d..83fa7296 100644 --- a/src/enemy/darkNut.c +++ b/src/enemy/darkNut.c @@ -428,7 +428,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); } @@ -445,7 +445,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); } @@ -453,7 +453,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); } @@ -472,7 +472,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 4b469258..798f4939 100644 --- a/src/enemy/fallingBoulder.c +++ b/src/enemy/fallingBoulder.c @@ -156,15 +156,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 3a4e4148..e2d8914d 100644 --- a/src/enemy/fireballGuy.c +++ b/src/enemy/fireballGuy.c @@ -39,7 +39,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 a1a9833d..f3228707 100644 --- a/src/enemy/gibdo.c +++ b/src/enemy/gibdo.c @@ -211,7 +211,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)); @@ -233,7 +233,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; @@ -258,7 +258,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 330e68b8..1edbf4f9 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 64a97b39..723050a4 100644 --- a/src/enemy/helmasaur.c +++ b/src/enemy/helmasaur.c @@ -176,7 +176,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); } @@ -196,12 +196,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 { @@ -229,7 +229,7 @@ void sub_0802BEEC(Entity* this) { } else if (!sub_08003FC4(this, 0x1c00)) { this->action = 8; this->actionDelay = 30; - this->nonPlanarMovement = 0x120; + this->speed = 0x120; } } @@ -366,7 +366,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 18b4f87e..453315d8 100644 --- a/src/enemy/keaton.c +++ b/src/enemy/keaton.c @@ -102,7 +102,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; @@ -197,7 +197,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); } @@ -205,7 +205,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 5ce12ee5..b40c63ca 100644 --- a/src/enemy/leever.c +++ b/src/enemy/leever.c @@ -172,13 +172,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 cea511b4..9c2d526f 100644 --- a/src/enemy/madderpillar.c +++ b/src/enemy/madderpillar.c @@ -115,7 +115,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; @@ -135,7 +135,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; @@ -150,7 +150,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 d5d7b0e6..24f7e210 100644 --- a/src/enemy/miniFireballGuy.c +++ b/src/enemy/miniFireballGuy.c @@ -38,7 +38,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 08c94fa7..96e7d615 100644 --- a/src/enemy/miniSlime.c +++ b/src/enemy/miniSlime.c @@ -49,7 +49,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) { @@ -71,8 +71,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 165bf1eb..07fd3f5a 100644 --- a/src/enemy/peahat.c +++ b/src/enemy/peahat.c @@ -57,14 +57,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); @@ -72,7 +72,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); @@ -152,7 +152,7 @@ void Peahat_Fly(Entity* this) { this->action = 2; this->previousActionFlag = Random() & 3; this->actionDelay = 60; - this->nonPlanarMovement = 160; + this->speed = 160; } } @@ -176,7 +176,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 { @@ -193,7 +193,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)); @@ -209,12 +209,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); @@ -329,7 +329,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 c3e67cc8..a8d24fa2 100644 --- a/src/enemy/pesto.c +++ b/src/enemy/pesto.c @@ -84,7 +84,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); } @@ -184,7 +184,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); @@ -223,8 +223,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); } @@ -236,7 +236,7 @@ void sub_080242A0(Entity* this) { this->action = 4; this->field_0x80.HALF.LO = 0; this->actionDelay = 0x10; - this->nonPlanarMovement = 0; + this->speed = 0; } } } @@ -247,7 +247,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); } @@ -256,7 +256,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 { @@ -275,12 +275,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) { @@ -298,14 +298,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) { @@ -339,7 +339,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; @@ -368,8 +368,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); } @@ -387,7 +387,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); @@ -453,7 +453,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; @@ -482,7 +482,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: @@ -496,7 +496,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); @@ -511,7 +511,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); } } @@ -709,7 +709,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); } @@ -719,7 +719,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); } @@ -785,7 +785,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) { @@ -809,7 +809,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); @@ -851,7 +851,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; @@ -859,7 +859,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 7ef108b4..263b5625 100644 --- a/src/enemy/rollobite.c +++ b/src/enemy/rollobite.c @@ -101,7 +101,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); } @@ -194,7 +194,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 e76f8ec1..d1d73723 100644 --- a/src/enemy/rope.c +++ b/src/enemy/rope.c @@ -60,7 +60,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 { @@ -112,7 +112,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); @@ -157,7 +157,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; @@ -175,6 +175,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 13782f7a..9609232d 100644 --- a/src/enemy/slime.c +++ b/src/enemy/slime.c @@ -58,7 +58,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); @@ -75,8 +75,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 a3aebc73..7b6dbbfd 100644 --- a/src/enemy/smallPesto.c +++ b/src/enemy/smallPesto.c @@ -44,7 +44,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 24009c34..68e0fef5 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 e1c32ce0..503084e7 100644 --- a/src/enemy/spikedBeetle.c +++ b/src/enemy/spikedBeetle.c @@ -49,7 +49,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; @@ -99,7 +99,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; @@ -116,7 +116,7 @@ void sub_0802B7FC(Entity* this) { if (--this->actionDelay == 0) { this->action = 4; this->actionDelay = 0x78; - this->nonPlanarMovement = 0x1c0; + this->speed = 0x1c0; } } @@ -166,7 +166,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 873962c9..7bf39713 100644 --- a/src/enemy/spinyChuchu.c +++ b/src/enemy/spinyChuchu.c @@ -158,7 +158,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); @@ -209,7 +209,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); } @@ -232,7 +232,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 02bf4e39..bdccd10e 100644 --- a/src/enemy/vaatiBall.c +++ b/src/enemy/vaatiBall.c @@ -155,7 +155,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: @@ -230,7 +230,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; @@ -321,7 +321,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; @@ -331,7 +331,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; @@ -343,32 +343,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); } } @@ -450,7 +450,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); @@ -466,11 +466,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: @@ -499,5 +499,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 a788ad58..d0e5b1a3 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 87b80940..320fc03d 100644 --- a/src/enemy/waterDrop.c +++ b/src/enemy/waterDrop.c @@ -22,7 +22,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); |
