diff --git a/source/core/maploader.cpp b/source/core/maploader.cpp index 69e8a3eb0..c2de9e974 100644 --- a/source/core/maploader.cpp +++ b/source/core/maploader.cpp @@ -463,7 +463,7 @@ void engineLoadBoard(const char* filename, int flags, vec3_t* pos, int16_t* ang, } -void qloadboard(const char* filename, char flags, vec3_t* dapos, int16_t* daang, int16_t* dacursectnum); +void qloadboard(const char* filename, char flags, vec3_t* dapos, int16_t* daang, int* dacursectnum); // loads a map into the backup buffer. @@ -475,7 +475,7 @@ void loadMapBackup(const char* filename) if (isBlood()) { - qloadboard(filename, 0, &pos, &scratch, &scratch); + qloadboard(filename, 0, &pos, &scratch, &scratch2); } else { diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index 21d0e8cf0..deabd841e 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -6931,7 +6931,7 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6, int x = gHitInfo.hitx - MulScale(a4, 16, 14); int y = gHitInfo.hity - MulScale(a5, 16, 14); int z = gHitInfo.hitz - MulScale(a6, 256, 14); - short nSector = gHitInfo.hitsect; + int nSector = gHitInfo.hitsect; uint8_t nSurf = kSurfNone; if (nRange == 0 || approxDist(gHitInfo.hitx - pShooter->x, gHitInfo.hity - pShooter->y) < nRange) { diff --git a/source/games/blood/src/blood.cpp b/source/games/blood/src/blood.cpp index 39a7c0057..6d1035097 100644 --- a/source/games/blood/src/blood.cpp +++ b/source/games/blood/src/blood.cpp @@ -61,7 +61,8 @@ int blood_globalflags; PLAYER gPlayerTemp[kMaxPlayers]; int gHealthTemp[kMaxPlayers]; vec3_t startpos; -int16_t startang, startsectnum; +int16_t startang; +int startsectnum; void QuitGame(void) diff --git a/source/games/blood/src/db.cpp b/source/games/blood/src/db.cpp index 928d8a6ec..1e882d9cc 100644 --- a/source/games/blood/src/db.cpp +++ b/source/games/blood/src/db.cpp @@ -511,7 +511,7 @@ struct walltypedisk #pragma pack(pop) -void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short *pSector, unsigned int *pCRC) { +void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, int *pSector, unsigned int *pCRC) { int16_t tpskyoff[256]; ClearAutomap(); #ifdef NOONE_EXTENSIONS @@ -1092,8 +1092,8 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor END_BLD_NS // only used by the backup loader. -void qloadboard(const char* filename, char flags, vec3_t* dapos, int16_t* daang, int16_t* dacursectnum) +void qloadboard(const char* filename, char flags, vec3_t* dapos, int16_t* daang, int* dacursectnum) { - Blood::dbLoadMap(filename, &dapos->x, &dapos->y, &dapos->z, (short*)daang, (short*)dacursectnum, NULL); + Blood::dbLoadMap(filename, &dapos->x, &dapos->y, &dapos->z, daang, dacursectnum, NULL); Blood::dbInit(); // clean up immediately. } diff --git a/source/games/blood/src/db.h b/source/games/blood/src/db.h index a75fd8b14..c06ec4cbf 100644 --- a/source/games/blood/src/db.h +++ b/source/games/blood/src/db.h @@ -371,7 +371,7 @@ unsigned short dbInsertXSector(int nSector); void dbInit(void); void PropagateMarkerReferences(void); unsigned int dbReadMapCRC(const char *pPath); -void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short *pSector, unsigned int *pCRC); +void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, int *pSector, unsigned int *pCRC); inline XSECTOR* getxsector(int index) { diff --git a/source/games/blood/src/eventq.cpp b/source/games/blood/src/eventq.cpp index 9ca660eed..631e1f49d 100644 --- a/source/games/blood/src/eventq.cpp +++ b/source/games/blood/src/eventq.cpp @@ -512,13 +512,13 @@ void evPost_(DBloodActor* actor, int nIndex, int nType, unsigned int nDelta, COM assert(command != kCmdCallback); if (command == kCmdState) command = evGetSourceState(nType, nIndex, actor) ? kCmdOn : kCmdOff; else if (command == kCmdNotState) command = evGetSourceState(nType, nIndex, actor) ? kCmdOff : kCmdOn; - EVENT evn = {actor, (int16_t)nIndex, (int8_t)nType, (int8_t)command, 0, PlayClock + (int)nDelta }; + EVENT evn = {actor, nIndex, (int8_t)nType, (int8_t)command, 0, PlayClock + (int)nDelta }; queue.insert(evn); } void evPost_(DBloodActor* actor, int nIndex, int nType, unsigned int nDelta, CALLBACK_ID callback) { - EVENT evn = {actor, (int16_t)nIndex, (int8_t)nType, kCmdCallback, (int16_t)callback, PlayClock + (int)nDelta }; + EVENT evn = {actor, nIndex, (int8_t)nType, kCmdCallback, (int16_t)callback, PlayClock + (int)nDelta }; queue.insert(evn); } diff --git a/source/games/blood/src/gameutil.h b/source/games/blood/src/gameutil.h index 73310114f..3873d0588 100644 --- a/source/games/blood/src/gameutil.h +++ b/source/games/blood/src/gameutil.h @@ -28,8 +28,8 @@ BEGIN_BLD_NS struct HITINFO { DBloodActor* hitactor; - short hitsect; - short hitwall; + int hitsect; + int hitwall; int hitx; int hity; int hitz; diff --git a/source/games/blood/src/misc.h b/source/games/blood/src/misc.h index 47cdf6dc9..a8c2c8774 100644 --- a/source/games/blood/src/misc.h +++ b/source/games/blood/src/misc.h @@ -58,7 +58,8 @@ void WeaponPrecache(); struct ZONE { int x, y, z; - short sectnum, ang; + int sectnum; + short ang; }; extern ZONE gStartZone[8]; diff --git a/source/games/blood/src/view.cpp b/source/games/blood/src/view.cpp index 6b28f129a..5672e6a93 100644 --- a/source/games/blood/src/view.cpp +++ b/source/games/blood/src/view.cpp @@ -173,7 +173,7 @@ void CalcOtherPosition(spritetype *pSprite, int *pX, int *pY, int *pZ, int *vsec pSprite->cstat &= ~256; assert(*vsectnum >= 0 && *vsectnum < kMaxSectors); FindSector(*pX, *pY, *pZ, vsectnum); - short nHSector; + int nHSector; int hX, hY; vec3_t pos = {*pX, *pY, *pZ}; hitdata_t hitdata;