From 620cc72f0e94116d5b061d62c38dc60168170f21 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 22 Nov 2021 00:24:49 +0100 Subject: [PATCH] - global search & replace for daang and osectnum. --- source/games/whaven/src/ai.cpp | 4 ++-- source/games/whaven/src/aidemon.cpp | 4 ++-- source/games/whaven/src/aidevil.cpp | 4 ++-- source/games/whaven/src/aidragon.cpp | 4 ++-- source/games/whaven/src/aifatwitch.cpp | 4 ++-- source/games/whaven/src/aifish.cpp | 6 +++--- source/games/whaven/src/aifred.cpp | 8 ++++---- source/games/whaven/src/aigoblin.cpp | 8 ++++---- source/games/whaven/src/aigonzo.cpp | 8 ++++---- source/games/whaven/src/aigron.cpp | 8 ++++---- source/games/whaven/src/aiguardian.cpp | 4 ++-- source/games/whaven/src/aiimp.cpp | 8 ++++---- source/games/whaven/src/aijudy.cpp | 4 ++-- source/games/whaven/src/aikatie.cpp | 4 ++-- source/games/whaven/src/aikobold.cpp | 8 ++++---- source/games/whaven/src/aiminotaur.cpp | 8 ++++---- source/games/whaven/src/ainewguy.cpp | 8 ++++---- source/games/whaven/src/airat.cpp | 2 +- source/games/whaven/src/aiskeleton.cpp | 8 ++++---- source/games/whaven/src/aiskully.cpp | 4 ++-- source/games/whaven/src/aispider.cpp | 8 ++++---- source/games/whaven/src/aiwillow.cpp | 4 ++-- source/games/whaven/src/wh.cpp | 2 +- source/games/whaven/src/wh.h | 2 +- source/games/whaven/src/whfx.cpp | 4 ++-- source/games/whaven/src/whplr.cpp | 4 ++-- 26 files changed, 70 insertions(+), 70 deletions(-) diff --git a/source/games/whaven/src/ai.cpp b/source/games/whaven/src/ai.cpp index 0b17b0832..45443b88a 100644 --- a/source/games/whaven/src/ai.cpp +++ b/source/games/whaven/src/ai.cpp @@ -209,7 +209,7 @@ void aiProcess() { PLAYER& plr = player[0]; - // short daang = plr.angle.ang.asbuild(); + // int16_t daang = plr.angle.ang.asbuild(); // int daz2 = -MulScale(plr.horizon.horiz.asq16(), 2000, 16); // hitscan(plr.x, plr.y, plr.z, plr.sector, // Start position // bcos(daang), // X vector of 3D ang @@ -488,7 +488,7 @@ void aisearch(PLAYER& plr, DWHActor* actor, boolean fly) { // return; // } - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; Collision moveStat; if (fly) diff --git a/source/games/whaven/src/aidemon.cpp b/source/games/whaven/src/aidemon.cpp index cf43d9053..268503544 100644 --- a/source/games/whaven/src/aidemon.cpp +++ b/source/games/whaven/src/aidemon.cpp @@ -17,7 +17,7 @@ static void chasedemon(PLAYER& plr, DWHActor* actor) spr.z += TICSPERFRAME << 8; } - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (krand() % 63 == 0) { if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum) && plr.invisibletime < 0) @@ -153,7 +153,7 @@ static void fleedemon(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aifly(actor); diff --git a/source/games/whaven/src/aidevil.cpp b/source/games/whaven/src/aidevil.cpp index db2eea042..6b1a31de8 100644 --- a/source/games/whaven/src/aidevil.cpp +++ b/source/games/whaven/src/aidevil.cpp @@ -12,7 +12,7 @@ static void chasedevil(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (krand() % 63 == 0) { if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, @@ -133,7 +133,7 @@ static void fleedevil(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { diff --git a/source/games/whaven/src/aidragon.cpp b/source/games/whaven/src/aidragon.cpp index 034db7b7f..f7a5f40ae 100644 --- a/source/games/whaven/src/aidragon.cpp +++ b/source/games/whaven/src/aidragon.cpp @@ -16,7 +16,7 @@ static void chasedragon(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; // int speed = 10; if ((krand() % 16) == 0) { if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), @@ -74,7 +74,7 @@ static void fleedragon(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { diff --git a/source/games/whaven/src/aifatwitch.cpp b/source/games/whaven/src/aifatwitch.cpp index a344298b5..3c66878d1 100644 --- a/source/games/whaven/src/aifatwitch.cpp +++ b/source/games/whaven/src/aifatwitch.cpp @@ -13,7 +13,7 @@ static void chasefatwitch(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (krand() % 63 == 0) { if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, @@ -174,7 +174,7 @@ static void fleefatwitch(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { diff --git a/source/games/whaven/src/aifish.cpp b/source/games/whaven/src/aifish.cpp index 4a30b5ae2..f8219647a 100644 --- a/source/games/whaven/src/aifish.cpp +++ b/source/games/whaven/src/aifish.cpp @@ -12,7 +12,7 @@ static void chasefish(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum) && plr.invisibletime < 0) { if (checkdist(plr, actor)) { @@ -32,7 +32,7 @@ static void chasefish(PLAYER& plr, DWHActor* actor) if (moveStat.type == kHitSprite) { if (moveStat.actor != plr.actor()) { - short daang = ((spr.ang - 256) & 2047); + int16_t daang = ((spr.ang - 256) & 2047); spr.ang = daang; if (plr.shadowtime > 0) { spr.ang = (((krand() & 512 - 256) + spr.ang + 1024) & 2047); @@ -127,7 +127,7 @@ static void skirmishfish(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) SetNewStatus(actor, FACE); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (aimove(actor).type != kHitNone) { spr.ang = getangle(plr.x - spr.x, plr.y - spr.y); SetNewStatus(actor, FACE); diff --git a/source/games/whaven/src/aifred.cpp b/source/games/whaven/src/aifred.cpp index a5dceb74f..1b5c26066 100644 --- a/source/games/whaven/src/aifred.cpp +++ b/source/games/whaven/src/aifred.cpp @@ -14,7 +14,7 @@ static void chasefred(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum) && plr.invisibletime < 0) { if (checkdist(plr, actor)) { @@ -34,7 +34,7 @@ static void chasefred(PLAYER& plr, DWHActor* actor) if (moveStat.type == kHitSprite) { if (moveStat.actor != plr.actor()) { - short daang = ((spr.ang - 256) & 2047); + int16_t daang = ((spr.ang - 256) & 2047); spr.ang = daang; if (plr.shadowtime > 0) { spr.ang = (((krand() & 512 - 256) + spr.ang + 1024) & 2047); @@ -90,7 +90,7 @@ static void skirmishfred(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) SetNewStatus(actor, FACE); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (aimove(actor).type != kHitNone) { spr.ang = getangle(plr.x - spr.x, plr.y - spr.y); SetNewStatus(actor, FACE); @@ -225,7 +225,7 @@ static void fleefred(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); diff --git a/source/games/whaven/src/aigoblin.cpp b/source/games/whaven/src/aigoblin.cpp index c3f7c635d..9da60a00a 100644 --- a/source/games/whaven/src/aigoblin.cpp +++ b/source/games/whaven/src/aigoblin.cpp @@ -14,7 +14,7 @@ static void chasegoblin(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum) && plr.invisibletime < 0) { if (checkdist(plr, actor)) { @@ -40,7 +40,7 @@ static void chasegoblin(PLAYER& plr, DWHActor* actor) if (moveStat.type == kHitSprite) { if (moveStat.actor != plr.actor()) { - short daang = ((spr.ang - 256) & 2047); + int16_t daang = ((spr.ang - 256) & 2047); spr.ang = daang; if (plr.shadowtime > 0) { spr.ang = (((krand() & 512 - 256) + spr.ang + 1024) & 2047); @@ -165,7 +165,7 @@ static void fleegoblin(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { @@ -322,7 +322,7 @@ static void skirmishgoblin(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) SetNewStatus(actor, FACE); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { spr.ang = getangle(plr.x - spr.x, plr.y - spr.y); diff --git a/source/games/whaven/src/aigonzo.cpp b/source/games/whaven/src/aigonzo.cpp index 8c3666da0..85fe40df7 100644 --- a/source/games/whaven/src/aigonzo.cpp +++ b/source/games/whaven/src/aigonzo.cpp @@ -15,7 +15,7 @@ static void chasegonzo(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; switch (spr.picnum) { case GONZOGHM: @@ -138,7 +138,7 @@ static void chasegonzo(PLAYER& plr, DWHActor* actor) if (moveStat.type == kHitSprite) { if (moveStat.actor != plr.actor()) { - short daang = ((spr.ang - 256) & 2047); + int16_t daang = ((spr.ang - 256) & 2047); spr.ang = daang; if (plr.shadowtime > 0) { spr.ang = (((krand() & 512 - 256) + spr.ang + 1024) & 2047); @@ -227,7 +227,7 @@ static void skirmishgonzo(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) SetNewStatus(actor, FACE); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { @@ -442,7 +442,7 @@ static void fleegonzo(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); diff --git a/source/games/whaven/src/aigron.cpp b/source/games/whaven/src/aigron.cpp index 043bcc1f4..7a11d7012 100644 --- a/source/games/whaven/src/aigron.cpp +++ b/source/games/whaven/src/aigron.cpp @@ -15,7 +15,7 @@ static void chasegron(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (spr.picnum == GRONSW) { if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), @@ -43,7 +43,7 @@ static void chasegron(PLAYER& plr, DWHActor* actor) if (moveStat.type == kHitSprite) { if (moveStat.actor != plr.actor()) { - short daang = ((spr.ang - 256) & 2047); + int16_t daang = ((spr.ang - 256) & 2047); spr.ang = daang; if (plr.shadowtime > 0) { spr.ang = (((krand() & 512 - 256) + spr.ang + 1024) & 2047); @@ -157,7 +157,7 @@ static void skirmishgron(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) SetNewStatus(actor, FACE); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { spr.ang = getangle(plr.x - spr.x, plr.y - spr.y); @@ -337,7 +337,7 @@ static void fleegron(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { diff --git a/source/games/whaven/src/aiguardian.cpp b/source/games/whaven/src/aiguardian.cpp index 2e47ff054..a2c319b5e 100644 --- a/source/games/whaven/src/aiguardian.cpp +++ b/source/games/whaven/src/aiguardian.cpp @@ -11,7 +11,7 @@ static void chaseguardian(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (plr.z < spr.z) spr.z -= TICSPERFRAME << 8; if (plr.z > spr.z) @@ -159,7 +159,7 @@ static void fleeguardian(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (PlayClock % 100 > 70) trailingsmoke(actor,true); diff --git a/source/games/whaven/src/aiimp.cpp b/source/games/whaven/src/aiimp.cpp index 08191a677..448585d08 100644 --- a/source/games/whaven/src/aiimp.cpp +++ b/source/games/whaven/src/aiimp.cpp @@ -13,7 +13,7 @@ static void chaseimp(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum) && plr.invisibletime < 0) { if (checkdist(plr, actor)) { @@ -39,7 +39,7 @@ static void chaseimp(PLAYER& plr, DWHActor* actor) if (moveStat.type == kHitSprite) { if (moveStat.actor != plr.actor()) { - short daang = ((spr.ang - 256) & 2047); + int16_t daang = ((spr.ang - 256) & 2047); spr.ang = daang; if (plr.shadowtime > 0) { spr.ang = (((krand() & 512 - 256) + spr.ang + 1024) & 2047); @@ -199,7 +199,7 @@ static void fleeimp(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); @@ -284,7 +284,7 @@ static void skirmishimp(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) SetNewStatus(actor, FACE); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { spr.ang = getangle(plr.x - spr.x, plr.y - spr.y); diff --git a/source/games/whaven/src/aijudy.cpp b/source/games/whaven/src/aijudy.cpp index d09d5b501..4e84580b6 100644 --- a/source/games/whaven/src/aijudy.cpp +++ b/source/games/whaven/src/aijudy.cpp @@ -13,7 +13,7 @@ static void chasejudy(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (mapon < 24) { spr.extra -= TICSPERFRAME; @@ -187,7 +187,7 @@ static void fleejudy(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { diff --git a/source/games/whaven/src/aikatie.cpp b/source/games/whaven/src/aikatie.cpp index b8ec324b9..bc172b847 100644 --- a/source/games/whaven/src/aikatie.cpp +++ b/source/games/whaven/src/aikatie.cpp @@ -13,7 +13,7 @@ static void chasekatie(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (krand() % 63 == 0) { if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, @@ -161,7 +161,7 @@ static void fleekatie(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { diff --git a/source/games/whaven/src/aikobold.cpp b/source/games/whaven/src/aikobold.cpp index e7e067fd1..e1deb3f6e 100644 --- a/source/games/whaven/src/aikobold.cpp +++ b/source/games/whaven/src/aikobold.cpp @@ -16,7 +16,7 @@ static void chasekobold(PLAYER& plr, DWHActor* actor) if ((krand() % 100) > 98) spritesound(S_KSNARL1 + (krand() % 4), actor); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum) && plr.invisibletime < 0) { if (checkdist(plr, actor)) { @@ -42,7 +42,7 @@ static void chasekobold(PLAYER& plr, DWHActor* actor) if (moveStat.type == kHitSprite) { if (moveStat.actor != plr.actor()) { - short daang = ((spr.ang - 256) & 2047); + int16_t daang = ((spr.ang - 256) & 2047); spr.ang = daang; if (plr.shadowtime > 0) { spr.ang = (((krand() & 512 - 256) + spr.ang + 1024) & 2047); @@ -169,7 +169,7 @@ static void fleekobold(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { @@ -302,7 +302,7 @@ static void skirmishkobold(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) SetNewStatus(actor, FACE); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { spr.ang = getangle(plr.x - spr.x, plr.y - spr.y); diff --git a/source/games/whaven/src/aiminotaur.cpp b/source/games/whaven/src/aiminotaur.cpp index 5d0b051dc..f9642c657 100644 --- a/source/games/whaven/src/aiminotaur.cpp +++ b/source/games/whaven/src/aiminotaur.cpp @@ -13,7 +13,7 @@ static void chaseminotaur(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum) && plr.invisibletime < 0) { if (checkdist(plr, actor)) { @@ -39,7 +39,7 @@ static void chaseminotaur(PLAYER& plr, DWHActor* actor) if (moveStat.type == kHitSprite) { if (moveStat.actor != plr.actor()) { - short daang = ((spr.ang - 256) & 2047); + int16_t daang = ((spr.ang - 256) & 2047); spr.ang = daang; if (plr.shadowtime > 0) { spr.ang = (((krand() & 512 - 256) + spr.ang + 1024) & 2047); @@ -111,7 +111,7 @@ static void skirmishminotaur(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) SetNewStatus(actor, FACE); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { spr.ang = getangle(plr.x - spr.x, plr.y - spr.y); @@ -268,7 +268,7 @@ static void fleeminotaur(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { diff --git a/source/games/whaven/src/ainewguy.cpp b/source/games/whaven/src/ainewguy.cpp index 3ad3c18b4..da962f887 100644 --- a/source/games/whaven/src/ainewguy.cpp +++ b/source/games/whaven/src/ainewguy.cpp @@ -30,7 +30,7 @@ static void chasenewguy(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum) && plr.invisibletime < 0) { if (checkdist(plr, actor)) { @@ -56,7 +56,7 @@ static void chasenewguy(PLAYER& plr, DWHActor* actor) if (moveStat.type == kHitSprite) { if (moveStat.actor != plr.actor()) { - short daang = ((spr.ang - 256) & 2047); + int16_t daang = ((spr.ang - 256) & 2047); spr.ang = daang; if (plr.shadowtime > 0) { spr.ang = (((krand() & 512 - 256) + spr.ang + 1024) & 2047); @@ -144,7 +144,7 @@ static void skirmishnewguy(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) SetNewStatus(actor, FACE); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { spr.ang = getangle(plr.x - spr.x, plr.y - spr.y); @@ -226,7 +226,7 @@ static void fleenewguy(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { diff --git a/source/games/whaven/src/airat.cpp b/source/games/whaven/src/airat.cpp index 70e5e9b31..71579b492 100644 --- a/source/games/whaven/src/airat.cpp +++ b/source/games/whaven/src/airat.cpp @@ -35,7 +35,7 @@ static void fleerat(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type == kHitFloor) diff --git a/source/games/whaven/src/aiskeleton.cpp b/source/games/whaven/src/aiskeleton.cpp index b2406945a..f2c3dde02 100644 --- a/source/games/whaven/src/aiskeleton.cpp +++ b/source/games/whaven/src/aiskeleton.cpp @@ -13,7 +13,7 @@ static void chaseskeleton(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum) && plr.invisibletime < 0) { if (checkdist(plr, actor)) { @@ -39,7 +39,7 @@ static void chaseskeleton(PLAYER& plr, DWHActor* actor) if (moveStat.type == kHitSprite) { if (moveStat.actor != plr.actor()) { - short daang = ((spr.ang - 256) & 2047); + int16_t daang = ((spr.ang - 256) & 2047); spr.ang = daang; if (plr.shadowtime > 0) { spr.ang = (((krand() & 512 - 256) + spr.ang + 1024) & 2047); @@ -150,7 +150,7 @@ static void fleeskeleton(PLAYER& plr, DWHActor* actor) spr.picnum = SKELETON; spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { @@ -309,7 +309,7 @@ static void skirmishskeleton(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) SetNewStatus(actor, FACE); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { spr.ang = getangle(plr.x - spr.x, plr.y - spr.y); diff --git a/source/games/whaven/src/aiskully.cpp b/source/games/whaven/src/aiskully.cpp index c7c0c85f4..d82787f0d 100644 --- a/source/games/whaven/src/aiskully.cpp +++ b/source/games/whaven/src/aiskully.cpp @@ -11,7 +11,7 @@ static void chaseskully(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (krand() % 63 == 0) { if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, @@ -173,7 +173,7 @@ static void fleeskully(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { diff --git a/source/games/whaven/src/aispider.cpp b/source/games/whaven/src/aispider.cpp index 9141767cd..bd835b3ad 100644 --- a/source/games/whaven/src/aispider.cpp +++ b/source/games/whaven/src/aispider.cpp @@ -13,7 +13,7 @@ static void chasespider(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum) && plr.invisibletime < 0) { if (checkdist(plr, actor)) { @@ -39,7 +39,7 @@ static void chasespider(PLAYER& plr, DWHActor* actor) if (moveStat.type == kHitSprite) { if (moveStat.actor != plr.actor()) { - short daang = ((spr.ang - 256) & 2047); + int16_t daang = ((spr.ang - 256) & 2047); spr.ang = daang; if (plr.shadowtime > 0) { spr.ang = (((krand() & 512 - 256) + spr.ang + 1024) & 2047); @@ -111,7 +111,7 @@ static void skirmishspider(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) SetNewStatus(actor, FACE); - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { spr.ang = getangle(plr.x - spr.x, plr.y - spr.y); @@ -232,7 +232,7 @@ static void fleespider(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aimove(actor); if (moveStat.type != kHitFloor && moveStat.type != kHitNone) { diff --git a/source/games/whaven/src/aiwillow.cpp b/source/games/whaven/src/aiwillow.cpp index 7cf663cb2..ddb6d3d29 100644 --- a/source/games/whaven/src/aiwillow.cpp +++ b/source/games/whaven/src/aiwillow.cpp @@ -13,7 +13,7 @@ static void chasewillow(PLAYER& plr, DWHActor* actor) if (spr.lotag < 0) spr.lotag = 250; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; if (krand() % 63 == 0) { if (cansee(plr.x, plr.y, plr.z, plr.sector, spr.x, spr.y, spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum) && plr.invisibletime < 0) @@ -181,7 +181,7 @@ static void fleewillow(PLAYER& plr, DWHActor* actor) SPRITE& spr = actor->s(); spr.lotag -= TICSPERFRAME; - short osectnum = spr.sectnum; + auto osectnum = spr.sectnum; auto moveStat = aifly(actor); diff --git a/source/games/whaven/src/wh.cpp b/source/games/whaven/src/wh.cpp index 14d02b55a..778a09e3d 100644 --- a/source/games/whaven/src/wh.cpp +++ b/source/games/whaven/src/wh.cpp @@ -49,7 +49,7 @@ int hitscan(int xs, int ys, int zs, short sectnum, int vx, int vy, int vz, Hitsc return ::hitscan(xs, ys, zs, sectnum, vx, vy, vz, &hit.hitsect, &hit.hitwall, &hit.hitsprite, &hit.hitx, &hit.hity, &hit.hitz, cliptype); } -Point rotatepoint(int xpivot, int ypivot, int x, int y, short daang) { // jfBuild +Point rotatepoint(int xpivot, int ypivot, int x, int y, int16_t daang) { // jfBuild Point rotatepoint; int dacos = bcos(daang); int dasin = bsin(daang); diff --git a/source/games/whaven/src/wh.h b/source/games/whaven/src/wh.h index ea2724c94..6771f2b06 100644 --- a/source/games/whaven/src/wh.h +++ b/source/games/whaven/src/wh.h @@ -182,7 +182,7 @@ struct Hitscan { }; int hitscan(int xs, int ys, int zs, short sectnum, int vx, int vy, int vz, Hitscan& hit, int cliptype); -Point rotatepoint(int xpivot, int ypivot, int x, int y, short daang); +Point rotatepoint(int xpivot, int ypivot, int x, int y, int16_t daang); // whobj diff --git a/source/games/whaven/src/whfx.cpp b/source/games/whaven/src/whfx.cpp index 82c5c5c02..59ea736f2 100644 --- a/source/games/whaven/src/whfx.cpp +++ b/source/games/whaven/src/whfx.cpp @@ -407,7 +407,7 @@ void teleporter() { short startwall, endwall; int i, j; int s; - short daang; + int16_t daang; auto &plr = player[pyrn]; @@ -1012,7 +1012,7 @@ void warpfxsprite(DWHActor* actor) { spawned.cstat = 0; spawned.picnum = ANNIHILATE; - short daang; + int16_t daang; if (actor == plr.actor()) { daang = plr.angle.ang.asbuild(); spawned.ang = daang; diff --git a/source/games/whaven/src/whplr.cpp b/source/games/whaven/src/whplr.cpp index 6fee2245f..c8e1ca578 100644 --- a/source/games/whaven/src/whplr.cpp +++ b/source/games/whaven/src/whplr.cpp @@ -244,7 +244,7 @@ void plruse(PLAYER& plr) { if (sector[nt.tagsector].hitag == 0) { operatesector(plr, nt.tagsector); } else { - short daang = plr.angle.ang.asbuild(); + int16_t daang = plr.angle.ang.asbuild(); int daz2 = -MulScale(plr.horizon.horiz.asq16(), 2000, 16); Hitscan pHitInfo; hitscan(plr.x, plr.y, plr.z, plr.sector, // Start position @@ -556,7 +556,7 @@ void goesupalevel1(PLAYER& plr) { } void lockon(PLAYER& plr, int numshots, int shootguntype) { - short daang, i, k, n = 0, s; + int16_t daang, i, k, n = 0, s; for (i = 0; i < tspritelistcnt && n < numshots; i++) { auto &spr = tspritelist[i];