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 | |
| parent | ebf2ede70dad51331a0233baed8cbed42a9c13a4 (diff) | |
quick fix 🙂
Diffstat (limited to 'src')
57 files changed, 219 insertions, 219 deletions
diff --git a/src/code_0805436C.c b/src/code_0805436C.c index 76a9b18c..be879f99 100644 --- a/src/code_0805436C.c +++ b/src/code_0805436C.c @@ -255,7 +255,7 @@ u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) { arg0->attachedEntity = itemEntity; } else if (arg0->id == 0x1e) { itemEntity->direction = arg0->animationState << 3 | 0x80; - itemEntity->nonPlanarMovement = 0xc0; + itemEntity->speed = 0xc0; itemEntity->field_0x20 = 0x18000; } } 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); @@ -258,7 +258,7 @@ void InitializePlayer(void) { gPlayerState.field_0x34[4] = 0x10; pl->direction = gScreenTransition.playerState << 2; case 0x3: - pl->nonPlanarMovement = 0xe0; + pl->speed = 0xe0; break; case 0x7: case 0x8: diff --git a/src/item11.c b/src/item11.c index 5821d0b5..984d02e0 100644 --- a/src/item11.c +++ b/src/item11.c @@ -32,7 +32,7 @@ void sub_08018CBC(Entity* this) { *(u32*)&this->field_0x80 = this->y.WORD = gPlayerEntity.y.WORD; uVar2 = this->animationState = gPlayerEntity.animationState & 0xe; this->direction = (u8)(uVar2 << 2); - this->nonPlanarMovement = 0x400; + this->speed = 0x400; this->damageType = 0x96; this->field_0x3c = (gPlayerEntity.field_0x3c + 1) | 0x80; this->flags2 = gPlayerEntity.flags2; diff --git a/src/item14.c b/src/item14.c index 7ca56f53..d9537b8b 100644 --- a/src/item14.c +++ b/src/item14.c @@ -19,7 +19,7 @@ void sub_0805FBE8(Entity* this) { this->spriteSettings.b.draw = TRUE; this->field_0x3c = gPlayerEntity.field_0x3c + 1; this->hitbox = &gUnk_08109AD0; - this->nonPlanarMovement = 0x380; + this->speed = 0x380; this->animationState = this->animationState & 0x7f; if (this->collisionLayer == 2) { this->type2 = 1; diff --git a/src/npc/cow.c b/src/npc/cow.c index aeb62982..d5e7988d 100644 --- a/src/npc/cow.c +++ b/src/npc/cow.c @@ -29,7 +29,7 @@ void sub_08068FC0(Entity* ent) { ent->action = 1; ent->animationState = ent->type2; - ent->nonPlanarMovement = 0x40; + ent->speed = 0x40; ent->field_0x6c.HALF.HI = 0xFF; diff --git a/src/npc/postman.c b/src/npc/postman.c index 2701efd1..0accf073 100644 --- a/src/npc/postman.c +++ b/src/npc/postman.c @@ -51,7 +51,7 @@ void sub_08060428(Entity* this) { void* data; this->actionDelay = 0x5a; - this->nonPlanarMovement = 0x180; + this->speed = 0x180; if (this->type2 != 0) { data = GetCurrentRoomProperty(this->type2); } else { diff --git a/src/npc/townMinish.c b/src/npc/townMinish.c index 0785d87a..e50ef501 100644 --- a/src/npc/townMinish.c +++ b/src/npc/townMinish.c @@ -241,7 +241,7 @@ void sub_0806AF78(Entity* this, ScriptExecutionContext* context) { void sub_0806AFA0(Entity* this) { if (sub_0806ED78(this)) { - sub_0806F62C(this, -this->nonPlanarMovement, this->direction); + sub_0806F62C(this, -this->speed, this->direction); } } diff --git a/src/npc/townsperson.c b/src/npc/townsperson.c index cad4e29b..d8b70298 100644 --- a/src/npc/townsperson.c +++ b/src/npc/townsperson.c @@ -208,7 +208,7 @@ void sub_08061E90(Entity* this, Entity* arg1) { } this->direction = (u8)animIndex; this->animationState = sub_0806F5B0(animIndex); - this->nonPlanarMovement = gUnk_0810B74A[this->type]; + this->speed = gUnk_0810B74A[this->type]; } animIndex = (this->animationState >> 1) + 4; if (animIndex != this->animIndex) { diff --git a/src/object/backgroundCloud.c b/src/object/backgroundCloud.c index ceebf3d7..df2625a3 100644 --- a/src/object/backgroundCloud.c +++ b/src/object/backgroundCloud.c @@ -18,7 +18,7 @@ void sub_0808F658(Entity* this) { this->spritePriority.b0 = this->type; this->frameIndex = this->type; this->direction = 8; - this->nonPlanarMovement = gUnk_08121EB0[this->type]; + this->speed = gUnk_08121EB0[this->type]; this->field_0x78.HWORD = gRoomControls.roomOriginX - 0x60; this->field_0x7a.HWORD = gRoomControls.roomOriginX + gRoomControls.width + 0x60; this->animationState = 0; diff --git a/src/object/bird.c b/src/object/bird.c index 2b6f194b..6d126380 100644 --- a/src/object/bird.c +++ b/src/object/bird.c @@ -28,7 +28,7 @@ void sub_0809CF54(Entity* this) { this->field_0x20 = -0x18000; this->height.WORD = -0x38C000; this->field_0x68.HWORD = -0x800; - this->nonPlanarMovement = 0x280; + this->speed = 0x280; this->direction = 8; this->collisionLayer = 2; this->x.HALF.HI = gRoomControls.roomScrollX; diff --git a/src/object/cloud.c b/src/object/cloud.c index a2637b6b..6f10295a 100644 --- a/src/object/cloud.c +++ b/src/object/cloud.c @@ -180,7 +180,7 @@ void sub_0809F7BC(Entity* this) { cloud = sub_0809F770(this); if (cloud != NULL) { uVar1 = Random(); - cloud->nonPlanarMovement = gUnk_081247C8[uVar1 & 3]; + cloud->speed = gUnk_081247C8[uVar1 & 3]; cloud->direction = (u8)(uVar1 >> 8) & 31; } } diff --git a/src/object/fileScreenObjects.c b/src/object/fileScreenObjects.c index 51403761..2b4914e1 100644 --- a/src/object/fileScreenObjects.c +++ b/src/object/fileScreenObjects.c @@ -506,7 +506,7 @@ static u32 sub_0808EF6C(Entity* this) { if (this->field_0x6c.HWORD < var7) { var7 = this->field_0x6c.HWORD; } - this->nonPlanarMovement = var7; + this->speed = var7; this->direction = sub_080045DA(var0, var2) >> 3; sub_0806F69C(this); return 1; @@ -517,7 +517,7 @@ static void sub_0808EFF0(Entity* this) { u8 var1; this->spriteSettings.b.draw = 2; - this->nonPlanarMovement = 0x400; + this->speed = 0x400; this->currentHealth = 1; this->frameIndex = 0xFF; this->animIndex = 0xFF; diff --git a/src/object/greatFairy.c b/src/object/greatFairy.c index 0ab2d710..3d511b25 100644 --- a/src/object/greatFairy.c +++ b/src/object/greatFairy.c @@ -159,21 +159,21 @@ void GreatFairy_WingsInit(Entity* this) { this->spriteRendering.alphaBlend = 1; gScreen.controls.layerFXControl = 0xF40; gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 8); - this->nonPlanarMovement = 1024; + this->speed = 1024; sub_0805EC9C(this, 1024, 256, 0); } void GreatFairy_WingsUpdate(Entity* this) { s32 iVar1; - iVar1 = this->nonPlanarMovement -= 32; + iVar1 = this->speed -= 32; if (iVar1 * 65536 >> 16 == 256) { this->action = 2; sub_0805EC60(this); gRoomVars.greatFairyState |= 32; gActiveScriptInfo.unk_00 |= 4; } else { - sub_0805EC9C(this, this->nonPlanarMovement, 256, 0); + sub_0805EC9C(this, this->speed, 256, 0); } } @@ -260,7 +260,7 @@ void GreatFairy_MiniAffineInit2(Entity* this) { if (this->height.HALF.HI == -20) { this->action = 2; this->actionDelay = 90; - this->nonPlanarMovement = 4096; + this->speed = 4096; this->spriteRendering.b0 = 3; sub_0805EC9C(this, 256, 256, 0); } @@ -275,7 +275,7 @@ void GreatFairy_MiniAffineUpdate(Entity* this) { this->action = 3; sub_0805EC60(this); } else { - iVar2 = this->nonPlanarMovement -= 24; + iVar2 = this->speed -= 24; sub_0805EC9C(this, 256, iVar2 * 0x10000 >> 20, 0); } } @@ -386,7 +386,7 @@ void sub_08087150(Entity* this) { this->spriteOrientation.flipY = 0; this->spriteRendering.b0 = 0; this->spritePriority.b0 = 3; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; this->direction = 0x10; temp = gUnk_0812079C; this->palette.raw = ((temp & 0xf) << 4) | 0xf; @@ -463,7 +463,7 @@ void sub_080872AC(Entity* this) { this->field_0x68.HWORD = this->x.HALF.HI; this->field_0x6a.HWORD = this->y.HALF.HI; this->direction = (u8)Random() & 0x1F; - this->nonPlanarMovement = 32; + this->speed = 32; GreatFairy_InitializeAnimation(this); } diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c index 409c1d04..b794b546 100644 --- a/src/object/itemOnGround.c +++ b/src/object/itemOnGround.c @@ -141,8 +141,8 @@ static void sub_080810A8(Entity* this) { sub_080814A4(this); if (this->direction & 0x80) { this->direction &= 0x1F; - if (this->nonPlanarMovement == 0) { - this->nonPlanarMovement = 0x100; + if (this->speed == 0) { + this->speed = 0x100; } } else { this->direction |= 0xFF; @@ -259,7 +259,7 @@ void sub_080812A0(Entity* this) { void sub_080812A8(Entity* this) { if (sub_080002D0(this) != 0xF && this->field_0x6e.HWORD != GetTileTypeByEntity(this)) { this->direction = 0; - this->nonPlanarMovement = 0; + this->speed = 0; this->spriteSettings.b.draw = 1; this->field_0x68.HALF.HI = 0; sub_080810A8(this); diff --git a/src/object/metalDoor.c b/src/object/metalDoor.c index 55c8b261..88ab3308 100644 --- a/src/object/metalDoor.c +++ b/src/object/metalDoor.c @@ -25,7 +25,7 @@ void sub_080A0684(Entity* this) { DeleteThisEntity(); } this->action = 1; - this->nonPlanarMovement = 0x300; + this->speed = 0x300; this->spriteSettings.b.draw = 0; this->frameIndex = 0; this->spriteSettings.b.flipY = 1; diff --git a/src/object/minecart.c b/src/object/minecart.c index 53d1ff82..1e239be3 100644 --- a/src/object/minecart.c +++ b/src/object/minecart.c @@ -51,7 +51,7 @@ void sub_080916EC(Entity* this) { this->field_0x40 = 0x44; this->flags2 = 0x80; this->direction = DirectionFromAnimationState(this->animationState); - this->nonPlanarMovement = 0x700; + this->speed = 0x700; this->spritePriority.b1 = 3; InitAnimationForceUpdate(this, this->type2 + 4 + this->animationState); SetTile(0x4022, COORD_TO_TILE(this), this->collisionLayer); @@ -81,7 +81,7 @@ void sub_080917DC(Entity* this) { gPlayerState.jumpStatus = 0x81; gPlayerState.flags.all |= 0x4000000; gPlayerEntity.field_0x20 = 0x20000; - gPlayerEntity.nonPlanarMovement = 0x100; + gPlayerEntity.speed = 0x100; gPlayerEntity.flags &= 0x7f; ResetPlayer(); sub_0807A108(); @@ -143,7 +143,7 @@ void sub_080919AC(Entity* this) { } } else { this->flags = this->flags | 0x80; - gPlayerEntity.nonPlanarMovement = 0; + gPlayerEntity.speed = 0; sub_0806F69C(this); CopyPosition(this, &gPlayerEntity); gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1; @@ -176,7 +176,7 @@ void sub_080919AC(Entity* this) { gPlayerState.jumpStatus = 0x41; gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x1000) | 0x4000000; gPlayerEntity.field_0x20 = 0x20000; - gPlayerEntity.nonPlanarMovement = 0x200; + gPlayerEntity.speed = 0x200; gPlayerEntity.animationState = this->animationState << 1; gPlayerEntity.direction = this->direction; gPlayerEntity.flags |= 0x80; diff --git a/src/object/object1A.c b/src/object/object1A.c index 26ece918..837884a9 100644 --- a/src/object/object1A.c +++ b/src/object/object1A.c @@ -54,5 +54,5 @@ void sub_08086A6C(Entity* ent) { uVar1 = Random(); ent->field_0x20 = 163840; ent->direction = (uVar1 >> 16) & 31; - ent->nonPlanarMovement = uVar1 & 480; + ent->speed = uVar1 & 480; } diff --git a/src/object/objectA2.c b/src/object/objectA2.c index 01fd9fa6..e79c07f8 100644 --- a/src/object/objectA2.c +++ b/src/object/objectA2.c @@ -105,6 +105,6 @@ void sub_0809F448(Entity* this) { tmp += -0x80000 + (rand & 0xFFFFF); break; } - this->nonPlanarMovement = (tmp > 0 ? tmp : -tmp) / (tmp2->unk_1 << 8); + this->speed = (tmp > 0 ? tmp : -tmp) / (tmp2->unk_1 << 8); this->direction = sub_080045DA(tmp, 0) >> 3; } diff --git a/src/object/objectB2.c b/src/object/objectB2.c index 4722d2e9..c3eff1eb 100644 --- a/src/object/objectB2.c +++ b/src/object/objectB2.c @@ -22,12 +22,12 @@ void ObjectB2(Entity* this) { this->attachedEntity = pEVar3; InitializeAnimation(this, this->type); } - this->nonPlanarMovement = this->parent->nonPlanarMovement; + this->speed = this->parent->speed; sub_0806F69C(this); if (sub_080AE4CC(this->attachedEntity, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) { DeleteThisEntity(); } - if (this->nonPlanarMovement < 0x41) { + if (this->speed < 0x41) { this->spriteSettings.b.draw ^= 1; if (--this->actionDelay == 0) { diff --git a/src/object/pot.c b/src/object/pot.c index cd73f9a8..f28fb9ee 100644 --- a/src/object/pot.c +++ b/src/object/pot.c @@ -34,7 +34,7 @@ void sub_0808222C(Entity* this) { this->action = 1; this->hitbox = &gUnk_080FD338; - this->nonPlanarMovement = 0x80; + this->speed = 0x80; this->y.HALF.HI += 3; this->field_0x16 = 0; this->flags |= 0x80; @@ -86,7 +86,7 @@ void sub_08082310(Entity* this) { this->actionDelay = 32; this->action = 4; if (gPlayerState.flags.all & 0x80) { - this->nonPlanarMovement >>= 1; + this->speed >>= 1; this->actionDelay = 64; } SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer); @@ -185,7 +185,7 @@ void sub_08082614(Entity* this) { this->action = 1; if (gPlayerState.flags.all & 0x80) { - this->nonPlanarMovement <<= 1; + this->speed <<= 1; } this->field_0x70.HALF.LO = sub_080001DA(COORD_TO_TILE(this), this->collisionLayer); diff --git a/src/object/smoke.c b/src/object/smoke.c index 5ec708b9..ade9d2cd 100644 --- a/src/object/smoke.c +++ b/src/object/smoke.c @@ -37,7 +37,7 @@ void sub_0808A46C(Entity* this) { void sub_0808A484(Entity* this) { this->action = 1; this->spriteSettings.b.draw = TRUE; - this->nonPlanarMovement = 0x40; + this->speed = 0x40; this->direction = 6; this->spriteRendering.b3 = 1; this->spritePriority.b0 = 0; diff --git a/src/player.c b/src/player.c index e3038077..7dfcbb93 100644 --- a/src/player.c +++ b/src/player.c @@ -143,7 +143,7 @@ void sub_08070D20(Entity* this) { void sub_08070D38(Entity* this) { this->flags &= ~0x80; this->direction = ((this->animationState & 0xe) << 2) ^ 0x10; - this->nonPlanarMovement = 0x100; + this->speed = 0x100; this->field_0x42 = 0; this->previousActionFlag++; this->actionDelay = gPlayerState.field_0x38; @@ -353,7 +353,7 @@ void sub_080710A8(Entity* this) { asm("lsl r0, r0, #0x4"); this->field_0x20 = (temp - 4) * 64 * 64; - this->nonPlanarMovement = 0x100; + this->speed = 0x100; sub_0807A108(); SoundReq(0x7c); SoundReq(0x78); @@ -522,7 +522,7 @@ void sub_08071400(Entity* this) { if ((this->x.HALF.HI != x) || (this->y.HALF.HI != y)) { this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, gArea.field_0x12, gArea.field_0x14); - this->nonPlanarMovement = 0x100; + this->speed = 0x100; sub_08079E08(); } @@ -972,7 +972,7 @@ void sub_0804BF38(u32 arg0, struct_0804BF38* arg1) fx->x.HALF.HI = gUnk_080D8E50[iVar3].x + gRoomControls.roomOriginX + xOff; fx->y.HALF.HI = gUnk_080D8E50[iVar3].y + gRoomControls.roomOriginY + -0xc + (entCnt & 1) * 8; fx->direction = 0; - fx->nonPlanarMovement = 0x100; + fx->speed = 0x100; } } } diff --git a/src/script.c b/src/script.c index cc9636b8..6e4d577a 100644 --- a/src/script.c +++ b/src/script.c @@ -113,7 +113,7 @@ void ScriptCommand_0807EB74(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_0807EB8C(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_SetEntityDirection(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_SetEntityDirectionWithAnimationState(Entity* entity, ScriptExecutionContext* context); -void ScriptCommand_SetEntityNonPlanarMovement(Entity* entity, ScriptExecutionContext* context); +void ScriptCommand_SetEntitySpeed(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_SetEntity0x20(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_SetEntityPositionRelative(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_SetEntityPosition(Entity* entity, ScriptExecutionContext* context); @@ -260,7 +260,7 @@ const ScriptCommand gScriptCommands[] = { ScriptCommandNop, ScriptCommand_0807EB8C, ScriptCommand_SetEntityDirection, ScriptCommand_SetEntityDirectionWithAnimationState, - ScriptCommand_SetEntityNonPlanarMovement, + ScriptCommand_SetEntitySpeed, ScriptCommand_SetEntity0x20, ScriptCommand_SetEntityPositionRelative, ScriptCommand_SetEntityPosition, @@ -1253,8 +1253,8 @@ void ScriptCommand_SetEntityDirectionWithAnimationState(Entity* entity, ScriptEx entity->animationState = entity->direction / 4; } -void ScriptCommand_SetEntityNonPlanarMovement(Entity* entity, ScriptExecutionContext* context) { - entity->nonPlanarMovement = context->scriptInstructionPointer[1]; +void ScriptCommand_SetEntitySpeed(Entity* entity, ScriptExecutionContext* context) { + entity->speed = context->scriptInstructionPointer[1]; } void ScriptCommand_SetEntity0x20(Entity* entity, ScriptExecutionContext* context) { @@ -1391,7 +1391,7 @@ void ScriptCommand_0807EE30(Entity* entity, ScriptExecutionContext* context) { } tmp = entity->x.HALF.HI - context->x.HALF.HI; tmp2 = entity->y.HALF.HI - context->y.HALF.HI; - sub_0806F62C(entity, entity->nonPlanarMovement, entity->direction); + sub_0806F62C(entity, entity->speed, entity->direction); tmp *= entity->x.HALF.HI - context->x.HALF.HI; tmp2 *= entity->y.HALF.HI - context->y.HALF.HI; if (tmp <= 0 && tmp2 <= 0) { |
