From 9cbffc998e1093227f12e9bfb012f53e333ec5ff Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 1 Sep 2022 21:24:29 +0200 Subject: [PATCH] - set_int_bvel_y --- source/games/blood/src/actor.cpp | 16 ++++++++-------- source/games/blood/src/ai.cpp | 2 +- source/games/blood/src/aibat.cpp | 10 +++++----- source/games/blood/src/aibeast.cpp | 6 +++--- source/games/blood/src/aiboneel.cpp | 10 +++++----- source/games/blood/src/aicaleb.cpp | 6 +++--- source/games/blood/src/aigarg.cpp | 12 ++++++------ source/games/blood/src/aighost.cpp | 12 ++++++------ source/games/blood/src/aigilbst.cpp | 6 +++--- source/games/blood/src/aispid.cpp | 2 +- source/games/blood/src/aiunicult.cpp | 2 +- source/games/blood/src/callback.cpp | 22 +++++++++++----------- source/games/blood/src/fx.cpp | 8 ++++---- source/games/blood/src/gib.cpp | 12 ++++++------ source/games/blood/src/nnexts.cpp | 13 ++++++------- source/games/blood/src/player.cpp | 2 +- 16 files changed, 70 insertions(+), 71 deletions(-) diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index eb92e30a5..12b90e6ac 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -4092,7 +4092,7 @@ static void actKickObject(DBloodActor* kicker, DBloodActor* kicked) { int nSpeed = ClipLow(approxDist(kicker->int_vel().X, kicker->int_vel().Y) * 2, 0xaaaaa); kicked->set_int_bvel_x(MulScale(nSpeed, Cos(kicker->int_ang() + Random2(85)), 30)); - kicked->__int_vel.Y = MulScale(nSpeed, Sin(kicker->int_ang() + Random2(85)), 30); + kicked->set_int_bvel_y(MulScale(nSpeed, Sin(kicker->int_ang() + Random2(85)), 30)); kicked->__int_vel.Z = MulScale(nSpeed, -0x2000, 14); kicked->spr.flags = 7; } @@ -4593,7 +4593,7 @@ static Collision MoveThing(DBloodActor* actor) RotateVector(&v2c, &v24, v30); RotateVector(&v28, &v24, v34); fxActor->set_int_bvel_x(actor->int_vel().X + v2c); - fxActor->__int_vel.Y = actor->int_vel().Y + v28; + fxActor->set_int_bvel_y(actor->int_vel().Y + v28); fxActor->__int_vel.Z = actor->int_vel().Z + v24; } } @@ -4664,7 +4664,7 @@ static Collision MoveThing(DBloodActor* actor) if (actor->__int_vel.Z < 0) { actor->set_int_bvel_x(MulScale(actor->int_vel().X, 0xc000, 16)); - actor->__int_vel.Y = MulScale(actor->int_vel().Y, 0xc000, 16); + actor->set_int_bvel_y(MulScale(actor->int_vel().Y, 0xc000, 16)); actor->__int_vel.Z = MulScale(-actor->int_vel().Z, 0x4000, 16); switch (actor->spr.type) @@ -5139,7 +5139,7 @@ void MoveDude(DBloodActor* actor) if (pFX2) { pFX2->set_int_bvel_x(Random2(0x6aaaa)); - pFX2->__int_vel.Y = Random2(0x6aaaa); + pFX2->set_int_bvel_y(Random2(0x6aaaa)); pFX2->__int_vel.Z = -(int)Random(0xd5555); } } @@ -5233,7 +5233,7 @@ int MoveMissile(DBloodActor* actor) int vy = 0; RotatePoint(&vx, &vy, (nTargetAngle + 1536) & 2047, 0, 0); actor->set_int_bvel_x(vx); - actor->__int_vel.Y = vy; + actor->set_int_bvel_y(vy); int dz = target->int_pos().Z - actor->int_pos().Z; int deltaz = dz / 10; @@ -5946,7 +5946,7 @@ static void actCheckTraps() if (pFX) { pFX->set_int_bvel_x(dx + Random2(0x8888)); - pFX->__int_vel.Y = dy + Random2(0x8888); + pFX->set_int_bvel_y(dy + Random2(0x8888)); pFX->__int_vel.Z = Random2(0x8888); } x += (dx / 2) >> 12; @@ -6401,7 +6401,7 @@ DBloodActor* actFireThing(DBloodActor* actor, int a2, int a3, int a4, int thingT fired->SetOwner(actor); fired->spr.angle = actor->spr.angle; fired->set_int_bvel_x(MulScale(a6, Cos(fired->int_ang()), 30)); - fired->__int_vel.Y = MulScale(a6, Sin(fired->int_ang()), 30); + fired->set_int_bvel_y(MulScale(a6, Sin(fired->int_ang()), 30)); fired->__int_vel.Z = MulScale(a6, a4, 14); fired->add_int_bvel_x(actor->int_vel().X / 2); fired->add_int_bvel_y(actor->int_vel().Y / 2); @@ -6534,7 +6534,7 @@ DBloodActor* actFireMissile(DBloodActor* actor, int a2, int a3, int a4, int a5, spawned->spr.picnum = pMissileInfo->picnum; spawned->set_int_ang((actor->int_ang() + pMissileInfo->angleOfs) & 2047); spawned->set_int_bvel_x(MulScale(pMissileInfo->velocity, a4, 14)); - spawned->__int_vel.Y = MulScale(pMissileInfo->velocity, a5, 14); + spawned->set_int_bvel_y(MulScale(pMissileInfo->velocity, a5, 14)); spawned->__int_vel.Z = MulScale(pMissileInfo->velocity, a6, 14); spawned->SetOwner(actor); spawned->spr.cstat |= CSTAT_SPRITE_BLOCK; diff --git a/source/games/blood/src/ai.cpp b/source/games/blood/src/ai.cpp index 6c19d947f..00a826f0f 100644 --- a/source/games/blood/src/ai.cpp +++ b/source/games/blood/src/ai.cpp @@ -349,7 +349,7 @@ void aiMoveDodge(DBloodActor* actor) t2 -= pDudeInfo->sideSpeed; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); } } diff --git a/source/games/blood/src/aibat.cpp b/source/games/blood/src/aibat.cpp index ef865a9f1..9b3570a9e 100644 --- a/source/games/blood/src/aibat.cpp +++ b/source/games/blood/src/aibat.cpp @@ -215,7 +215,7 @@ static void batMoveDodgeUp(DBloodActor* actor) t2 -= pDudeInfo->sideSpeed; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = -0x52aaa; } @@ -240,7 +240,7 @@ static void batMoveDodgeDown(DBloodActor* actor) t2 -= pDudeInfo->sideSpeed; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = 0x44444; } @@ -330,7 +330,7 @@ static void batMoveForward(DBloodActor* actor) else t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); } static void batMoveSwoop(DBloodActor* actor) @@ -358,7 +358,7 @@ static void batMoveSwoop(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = 0x44444; } @@ -387,7 +387,7 @@ static void batMoveFly(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = -0x2d555; } diff --git a/source/games/blood/src/aibeast.cpp b/source/games/blood/src/aibeast.cpp index 7f55c6ea3..9beb4790b 100644 --- a/source/games/blood/src/aibeast.cpp +++ b/source/games/blood/src/aibeast.cpp @@ -433,7 +433,7 @@ static void sub_628A0(DBloodActor* actor) else t1 += nAccel >> 2; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); } static void sub_62AE0(DBloodActor* actor) @@ -466,7 +466,7 @@ static void sub_62AE0(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = -dz; } @@ -500,7 +500,7 @@ static void sub_62D7C(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = dz; } diff --git a/source/games/blood/src/aiboneel.cpp b/source/games/blood/src/aiboneel.cpp index 1e1ec9624..b20c9311b 100644 --- a/source/games/blood/src/aiboneel.cpp +++ b/source/games/blood/src/aiboneel.cpp @@ -230,7 +230,7 @@ static void eelMoveDodgeUp(DBloodActor* actor) t2 -= pDudeInfo->sideSpeed; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = -0x8000; } @@ -255,7 +255,7 @@ static void eelMoveDodgeDown(DBloodActor* actor) t2 -= pDudeInfo->sideSpeed; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = 0x44444; } @@ -342,7 +342,7 @@ static void eelMoveForward(DBloodActor* actor) else t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); } static void eelMoveSwoop(DBloodActor* actor) @@ -367,7 +367,7 @@ static void eelMoveSwoop(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = 0x22222; } @@ -393,7 +393,7 @@ static void eelMoveAscend(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = -0x8000; } diff --git a/source/games/blood/src/aicaleb.cpp b/source/games/blood/src/aicaleb.cpp index 546e38617..b33e5b34d 100644 --- a/source/games/blood/src/aicaleb.cpp +++ b/source/games/blood/src/aicaleb.cpp @@ -301,7 +301,7 @@ static void sub_65D04(DBloodActor* actor) else t1 += nAccel >> 2; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); } static void sub_65F44(DBloodActor* actor) @@ -335,7 +335,7 @@ static void sub_65F44(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = -dz; } @@ -370,7 +370,7 @@ static void sub_661E0(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = dz; } diff --git a/source/games/blood/src/aigarg.cpp b/source/games/blood/src/aigarg.cpp index a547c8533..4b2ef1372 100644 --- a/source/games/blood/src/aigarg.cpp +++ b/source/games/blood/src/aigarg.cpp @@ -291,7 +291,7 @@ static void gargMoveDodgeUp(DBloodActor* actor) t2 -= pDudeInfo->sideSpeed; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = -0x1d555; } @@ -319,7 +319,7 @@ static void gargMoveDodgeDown(DBloodActor* actor) t2 -= pDudeInfo->sideSpeed; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = 0x44444; } @@ -543,7 +543,7 @@ static void gargMoveForward(DBloodActor* actor) else t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); } static void gargMoveSlow(DBloodActor* actor) @@ -575,7 +575,7 @@ static void gargMoveSlow(DBloodActor* actor) t1 = nAccel >> 1; t2 >>= 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); switch (actor->spr.type) { case kDudeGargoyleFlesh: actor->__int_vel.Z = 0x44444; @@ -614,7 +614,7 @@ static void gargMoveSwoop(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); switch (actor->spr.type) { case kDudeGargoyleFlesh: actor->__int_vel.Z = t1; @@ -653,7 +653,7 @@ static void gargMoveFly(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); switch (actor->spr.type) { case kDudeGargoyleFlesh: actor->__int_vel.Z = -t1; diff --git a/source/games/blood/src/aighost.cpp b/source/games/blood/src/aighost.cpp index 5d8575a9e..c3bf579ac 100644 --- a/source/games/blood/src/aighost.cpp +++ b/source/games/blood/src/aighost.cpp @@ -270,7 +270,7 @@ static void ghostMoveDodgeUp(DBloodActor* actor) t2 -= pDudeInfo->sideSpeed; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = -0x1d555; } @@ -298,7 +298,7 @@ static void ghostMoveDodgeDown(DBloodActor* actor) t2 -= pDudeInfo->sideSpeed; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = 0x44444; } @@ -439,7 +439,7 @@ static void ghostMoveForward(DBloodActor* actor) else t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); } static void ghostMoveSlow(DBloodActor* actor) @@ -471,7 +471,7 @@ static void ghostMoveSlow(DBloodActor* actor) t1 = nAccel >> 1; t2 >>= 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); switch (actor->spr.type) { case kDudePhantasm: actor->__int_vel.Z = 0x44444; @@ -507,7 +507,7 @@ static void ghostMoveSwoop(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); switch (actor->spr.type) { case kDudePhantasm: actor->__int_vel.Z = t1; @@ -543,7 +543,7 @@ static void ghostMoveFly(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); switch (actor->spr.type) { case kDudePhantasm: actor->__int_vel.Z = -t1; diff --git a/source/games/blood/src/aigilbst.cpp b/source/games/blood/src/aigilbst.cpp index 008c8a3b9..8614e7ed3 100644 --- a/source/games/blood/src/aigilbst.cpp +++ b/source/games/blood/src/aigilbst.cpp @@ -288,7 +288,7 @@ static void sub_6CB00(DBloodActor* actor) else t1 += nAccel >> 2; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); } static void sub_6CD74(DBloodActor* actor) @@ -321,7 +321,7 @@ static void sub_6CD74(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = -dz; } @@ -355,7 +355,7 @@ static void sub_6D03C(DBloodActor* actor) int t2 = DMulScale(vx, nSin, -vy, nCos, 30); t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); actor->__int_vel.Z = dz; } diff --git a/source/games/blood/src/aispid.cpp b/source/games/blood/src/aispid.cpp index ecbd45d5b..9f333d322 100644 --- a/source/games/blood/src/aispid.cpp +++ b/source/games/blood/src/aispid.cpp @@ -122,7 +122,7 @@ void SpidJumpSeqCallback(int, DBloodActor* actor) case kDudeSpiderRed: case kDudeSpiderBlack: actor->set_int_bvel_x(IntToFixed(dx)); - actor->__int_vel.Y = IntToFixed(dy); + actor->set_int_bvel_y(IntToFixed(dy)); actor->__int_vel.Z = IntToFixed(dz); break; } diff --git a/source/games/blood/src/aiunicult.cpp b/source/games/blood/src/aiunicult.cpp index fc3ea8e2a..6a5d50768 100644 --- a/source/games/blood/src/aiunicult.cpp +++ b/source/games/blood/src/aiunicult.cpp @@ -1137,7 +1137,7 @@ void aiGenDudeMoveForward(DBloodActor* actor) else t1 += nAccel >> 1; actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30)); - actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30); + actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30)); } else { diff --git a/source/games/blood/src/callback.cpp b/source/games/blood/src/callback.cpp index 62f3fed84..36e08562d 100644 --- a/source/games/blood/src/callback.cpp +++ b/source/games/blood/src/callback.cpp @@ -54,7 +54,7 @@ void fxFlameLick(DBloodActor* actor, sectortype*) // 0 if (pFX) { pFX->set_int_bvel_x(actor->int_vel().X + Random2(-dx)); - pFX->__int_vel.Y = actor->int_vel().Y + Random2(-dy); + pFX->set_int_bvel_y(actor->int_vel().Y + Random2(-dy)); pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa); } } @@ -129,7 +129,7 @@ void fxFlareSpark(DBloodActor* actor, sectortype*) // 3 if (pFX) { pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa)); - pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa); + pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa)); pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa); } evPostActor(actor, 4, kCallbackFXFlareSpark); @@ -148,7 +148,7 @@ void fxFlareSparkLite(DBloodActor* actor, sectortype*) // 4 if (pFX) { pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa)); - pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa); + pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa)); pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa); } evPostActor(actor, 12, kCallbackFXFlareSparkLite); @@ -170,7 +170,7 @@ void fxZombieBloodSpurt(DBloodActor* actor, sectortype*) // 5 if (pFX) { pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x11111)); - pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x11111); + pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x11111)); pFX->__int_vel.Z = actor->int_vel().Z - 0x6aaaa; } if (actor->xspr.data1 > 0) @@ -200,7 +200,7 @@ void fxBloodSpurt(DBloodActor* actor, sectortype*) // 6 { pFX->set_int_ang(0); pFX->set_int_bvel_x(actor->int_vel().X >> 8); - pFX->__int_vel.Y = actor->int_vel().Y >> 8; + pFX->set_int_bvel_y(actor->int_vel().Y >> 8); pFX->__int_vel.Z = actor->int_vel().Z >> 8; } evPostActor(actor, 6, kCallbackFXBloodSpurt); @@ -219,7 +219,7 @@ void fxArcSpark(DBloodActor* actor, sectortype*) // 7 if (pFX) { pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x10000)); - pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x10000); + pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x10000)); pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa); } evPostActor(actor, 3, kCallbackFXArcSpark); @@ -244,7 +244,7 @@ void fxDynPuff(DBloodActor* actor, sectortype*) // 8 if (pFX) { pFX->set_int_bvel_x(actor->int_vel().X); - pFX->__int_vel.Y = actor->int_vel().Y; + pFX->set_int_bvel_y(actor->int_vel().Y); pFX->__int_vel.Z = actor->int_vel().Z; } } @@ -368,7 +368,7 @@ void PlayerBubble(DBloodActor* actor, sectortype*) // 10 if (pFX) { pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa)); - pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa); + pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa)); pFX->__int_vel.Z = actor->int_vel().Z + Random2(0x1aaaa); } } @@ -398,7 +398,7 @@ void EnemyBubble(DBloodActor* actor, sectortype*) // 11 if (pFX) { pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa)); - pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa); + pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa)); pFX->__int_vel.Z = actor->int_vel().Z + Random2(0x1aaaa); } } @@ -495,7 +495,7 @@ void fxTeslaAlt(DBloodActor* actor, sectortype*) // 15 if (pFX) { pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa)); - pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa); + pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa)); pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa); } evPostActor(actor, 3, kCallbackFXTeslaAlt); @@ -627,7 +627,7 @@ void fxPodBloodSpray(DBloodActor* actor, sectortype*) // 18 { pFX->set_int_ang(0); pFX->set_int_bvel_x(actor->int_vel().X >> 8); - pFX->__int_vel.Y = actor->int_vel().Y >> 8; + pFX->set_int_bvel_y(actor->int_vel().Y >> 8); pFX->__int_vel.Z = actor->int_vel().Z >> 8; } evPostActor(actor, 6, kCallbackFXPodBloodSpray); diff --git a/source/games/blood/src/fx.cpp b/source/games/blood/src/fx.cpp index b5c9763cd..0fe061f29 100644 --- a/source/games/blood/src/fx.cpp +++ b/source/games/blood/src/fx.cpp @@ -284,7 +284,7 @@ void fxSpawnBlood(DBloodActor* actor, int) { bloodactor->set_int_ang(1024); bloodactor->set_int_bvel_x(Random2(0x6aaaa)); - bloodactor->__int_vel.Y = Random2(0x6aaaa); + bloodactor->set_int_bvel_y(Random2(0x6aaaa)); bloodactor->__int_vel.Z = -(int)Random(0x10aaaa) - 100; evPostActor(bloodactor, 8, kCallbackFXBloodSpurt); } @@ -314,7 +314,7 @@ void fxSpawnPodStuff(DBloodActor* actor, int) { spawnactor->set_int_ang(1024); spawnactor->set_int_bvel_x(Random2(0x6aaaa)); - spawnactor->__int_vel.Y = Random2(0x6aaaa); + spawnactor->set_int_bvel_y(Random2(0x6aaaa)); spawnactor->__int_vel.Z = -(int)Random(0x10aaaa) - 100; evPostActor(spawnactor, 8, kCallbackFXPodBloodSpray); } @@ -340,7 +340,7 @@ void fxSpawnEjectingBrass(DBloodActor* actor, int z, int a3, int a4) int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120); int nAngle = actor->int_ang() + Random2(56) + 512; pBrass->set_int_bvel_x(MulScale(nDist, Cos(nAngle), 30)); - pBrass->__int_vel.Y = MulScale(nDist, Sin(nAngle), 30); + pBrass->set_int_bvel_y(MulScale(nDist, Sin(nAngle), 30)); pBrass->__int_vel.Z = actor->int_vel().Z - (0x20000 + (Random2(40) << 18) / 120); } } @@ -365,7 +365,7 @@ void fxSpawnEjectingShell(DBloodActor* actor, int z, int a3, int a4) int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120); int nAngle = actor->int_ang() + Random2(56) + 512; pShell->set_int_bvel_x(MulScale(nDist, Cos(nAngle), 30)); - pShell->__int_vel.Y = MulScale(nDist, Sin(nAngle), 30); + pShell->set_int_bvel_y(MulScale(nDist, Sin(nAngle), 30)); pShell->__int_vel.Z = actor->int_vel().Z - (0x20000 + (Random2(20) << 18) / 120); } } diff --git a/source/games/blood/src/gib.cpp b/source/games/blood/src/gib.cpp index 4d1bc0885..afc950361 100644 --- a/source/games/blood/src/gib.cpp +++ b/source/games/blood/src/gib.cpp @@ -301,13 +301,13 @@ void GibFX(DBloodActor* actor, GIBFX* pGFX, DVector3* pPos, CGibVelocity* pVel) if (pVel) { pFX->set_int_bvel_x(pVel->vx + Random2(pGFX->atd)); - pFX->__int_vel.Y = pVel->vy + Random2(pGFX->atd); + pFX->set_int_bvel_y(pVel->vy + Random2(pGFX->atd)); pFX->__int_vel.Z = pVel->vz - Random(pGFX->at11); } else { pFX->set_int_bvel_x(Random2((pGFX->atd << 18) / 120)); - pFX->__int_vel.Y = Random2((pGFX->atd << 18) / 120); + pFX->set_int_bvel_y(Random2((pGFX->atd << 18) / 120)); switch (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) { case 16: @@ -382,13 +382,13 @@ void GibThing(DBloodActor* actor, GIBTHING* pGThing, DVector3* pPos, CGibVelocit if (pVel) { gibactor->set_int_bvel_x(pVel->vx + Random2(pGThing->atc)); - gibactor->__int_vel.Y = pVel->vy + Random2(pGThing->atc); + gibactor->set_int_bvel_y(pVel->vy + Random2(pGThing->atc)); gibactor->__int_vel.Z = pVel->vz - Random(pGThing->at10); } else { gibactor->set_int_bvel_x(Random2((pGThing->atc << 18) / 120)); - gibactor->__int_vel.Y = Random2((pGThing->atc << 18) / 120); + gibactor->set_int_bvel_y(Random2((pGThing->atc << 18) / 120)); switch (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) { case 16: @@ -465,13 +465,13 @@ void GibFX(walltype* pWall, GIBFX* pGFX, int a3, int a4, int a5, int a6, CGibVel if (!pVel) { pGib->set_int_bvel_x(Random2((pGFX->atd << 18) / 120)); - pGib->__int_vel.Y = Random2((pGFX->atd << 18) / 120); + pGib->set_int_bvel_y(Random2((pGFX->atd << 18) / 120)); pGib->__int_vel.Z = -(int)Random((pGFX->at11 << 18) / 120); } else { pGib->set_int_bvel_x(Random2((pVel->vx << 18) / 120)); - pGib->__int_vel.Y = Random2((pVel->vy << 18) / 120); + pGib->set_int_bvel_y(Random2((pVel->vy << 18) / 120)); pGib->__int_vel.Z = -(int)Random((pVel->vz << 18) / 120); } } diff --git a/source/games/blood/src/nnexts.cpp b/source/games/blood/src/nnexts.cpp index 1c3aa6cdb..c98df4bd5 100644 --- a/source/games/blood/src/nnexts.cpp +++ b/source/games/blood/src/nnexts.cpp @@ -1617,7 +1617,7 @@ void debrisBubble(DBloodActor* actor) auto pFX = gFX.fxSpawnActor((FX_ID)(FX_23 + Random(3)), actor->sector(), x, y, z, 0); if (pFX) { pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa)); - pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa); + pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa)); pFX->__int_vel.Z = actor->int_vel().Z + Random2(0x1aaaa); } @@ -1805,7 +1805,7 @@ void debrisMove(int listIndex) { if ((pFX2 = gFX.fxSpawnActor(FX_14, pFX->sector(), pFX->spr.pos, 0)) == NULL) continue; pFX2->set_int_bvel_x(Random2(0x6aaaa)); - pFX2->__int_vel.Y = Random2(0x6aaaa); + pFX2->set_int_bvel_y(Random2(0x6aaaa)); pFX2->__int_vel.Z = -(int)Random(0xd5555); } break; @@ -3125,7 +3125,7 @@ void useVelocityChanger(DBloodActor* actor, sectortype* sect, DBloodActor* initi else { pSprite->set_int_bvel_x(xv); - pSprite->__int_vel.Y = yv; + pSprite->set_int_bvel_y(yv); pSprite->__int_vel.Z = zv; } @@ -6569,7 +6569,7 @@ void useUniMissileGen(DBloodActor* sourceactor, DBloodActor* actor) { int velocity = sourceactor->xspr.data2 << 12; missileactor->set_int_bvel_x(MulScale(velocity, dx, 14)); - missileactor->__int_vel.Y = MulScale(velocity, dy, 14); + missileactor->set_int_bvel_y(MulScale(velocity, dy, 14)); missileactor->__int_vel.Z = MulScale(velocity, dz, 14); } @@ -8191,8 +8191,7 @@ void aiPatrolMove(DBloodActor* actor) if (abs(nAng) > goalAng || ((targetactor->xspr.waitTime > 0 || targetactor->xspr.data1 == targetactor->xspr.data2) && aiPatrolMarkerReached(actor))) { - actor->set_int_bvel_x(0); - actor->__int_vel.Y = 0; + actor->clear_vel_xy(); return; } @@ -8229,7 +8228,7 @@ void aiPatrolMove(DBloodActor* actor) vel = MulScale(vel, approxDist(dx, dy) << 6, 16); actor->set_int_bvel_x(ClipRange(actor->int_vel().X, -vel, vel)); - actor->__int_vel.Y = ClipRange(actor->int_vel().Y, -vel, vel); + actor->set_int_bvel_y(ClipRange(actor->int_vel().Y, -vel, vel)); } //--------------------------------------------------------------------------- diff --git a/source/games/blood/src/player.cpp b/source/games/blood/src/player.cpp index 507ecd677..cb26262f7 100644 --- a/source/games/blood/src/player.cpp +++ b/source/games/blood/src/player.cpp @@ -1765,7 +1765,7 @@ void ProcessInput(PLAYER* pPlayer) int x = bcos(pPlayer->actor->int_ang()); int y = bsin(pPlayer->actor->int_ang()); spawned->set_int_bvel_x(pPlayer->actor->int_vel().X + MulScale(0x155555, x, 14)); - spawned->__int_vel.Y = pPlayer->actor->int_vel().Y + MulScale(0x155555, y, 14); + spawned->set_int_bvel_y(pPlayer->actor->int_vel().Y + MulScale(0x155555, y, 14)); spawned->__int_vel.Z = pPlayer->actor->__int_vel.Z; } pPlayer->hand = 0;