mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- silenced warnings in Blood.
This commit is contained in:
parent
d097c8e635
commit
3e2cacfaf6
14 changed files with 51 additions and 52 deletions
|
@ -148,7 +148,7 @@ RORHACK:
|
||||||
for (int i = 0; i < 16; i++)
|
for (int i = 0; i < 16; i++)
|
||||||
ror_status[i] = testgotpic(4080 + i);
|
ror_status[i] = testgotpic(4080 + i);
|
||||||
fixed_t deliriumPitchI = interpolatedvalue(IntToFixed(deliriumPitchO), IntToFixed(deliriumPitch), gInterpolate);
|
fixed_t deliriumPitchI = interpolatedvalue(IntToFixed(deliriumPitchO), IntToFixed(deliriumPitch), gInterpolate);
|
||||||
DrawMirrors(cX, cY, cZ, cA.asq16(), cH.asq16() + deliriumPitchI, gInterpolate, gViewIndex);
|
DrawMirrors(cX, cY, cZ, cA.asq16(), cH.asq16() + deliriumPitchI, int(gInterpolate), gViewIndex);
|
||||||
int bakCstat = gView->pSprite->cstat;
|
int bakCstat = gView->pSprite->cstat;
|
||||||
if (gViewPos == 0)
|
if (gViewPos == 0)
|
||||||
{
|
{
|
||||||
|
@ -160,7 +160,7 @@ RORHACK:
|
||||||
}
|
}
|
||||||
|
|
||||||
renderDrawRoomsQ16(cX, cY, cZ, cA.asq16(), cH.asq16() + deliriumPitchI, nSectnum);
|
renderDrawRoomsQ16(cX, cY, cZ, cA.asq16(), cH.asq16() + deliriumPitchI, nSectnum);
|
||||||
viewProcessSprites(pm_tsprite, pm_spritesortcnt, cX, cY, cZ, cA.asbuild(), gInterpolate);
|
viewProcessSprites(pm_tsprite, pm_spritesortcnt, cX, cY, cZ, cA.asbuild(), int(gInterpolate));
|
||||||
bool do_ror_hack = false;
|
bool do_ror_hack = false;
|
||||||
for (int i = 0; i < 16; i++)
|
for (int i = 0; i < 16; i++)
|
||||||
if (ror_status[i] != testgotpic(4080 + i))
|
if (ror_status[i] != testgotpic(4080 + i))
|
||||||
|
@ -176,7 +176,7 @@ RORHACK:
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
pm_spritesortcnt = nSpriteSortCnt;
|
pm_spritesortcnt = nSpriteSortCnt;
|
||||||
setPortalFlags(0);
|
setPortalFlags(0);
|
||||||
processSpritesOnOtherSideOfPortal(cX, cY, gInterpolate);
|
processSpritesOnOtherSideOfPortal(cX, cY, int(gInterpolate));
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
gView->pSprite->cstat = bakCstat;
|
gView->pSprite->cstat = bakCstat;
|
||||||
|
|
||||||
|
|
|
@ -1003,7 +1003,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
|
||||||
GENDUDEEXTRA* pExtra = genDudeExtra(pSprite);
|
GENDUDEEXTRA* pExtra = genDudeExtra(pSprite);
|
||||||
|
|
||||||
if (nDmgType == DAMAGE_TYPE_1) {
|
if (nDmgType == DAMAGE_TYPE_1) {
|
||||||
if (pXSprite->health > pDudeInfo->fleeHealth) break;
|
if (pXSprite->health > (unsigned)pDudeInfo->fleeHealth) break;
|
||||||
else if (pXSprite->txID <= 0 || getNextIncarnation(pXSprite) == NULL) {
|
else if (pXSprite->txID <= 0 || getNextIncarnation(pXSprite) == NULL) {
|
||||||
removeDudeStuff(pSprite);
|
removeDudeStuff(pSprite);
|
||||||
|
|
||||||
|
|
|
@ -292,7 +292,7 @@ static void beastThinkChase(DBloodActor* actor)
|
||||||
else
|
else
|
||||||
pXSector = NULL;
|
pXSector = NULL;
|
||||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||||
if (pXTarget->health > gPlayerTemplate[0].startHealth/2)
|
if (pXTarget->health > (unsigned)gPlayerTemplate[0].startHealth/2)
|
||||||
{
|
{
|
||||||
switch (hit)
|
switch (hit)
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,7 +138,7 @@ void AddCmdDefine(char *text, int value)
|
||||||
|
|
||||||
static void SplitPath(const char *pzPath, char *pzDirectory, char *pzFile, char *pzType)
|
static void SplitPath(const char *pzPath, char *pzDirectory, char *pzFile, char *pzType)
|
||||||
{
|
{
|
||||||
int const nLength = strlen(pzPath);
|
int const nLength = (int)strlen(pzPath);
|
||||||
const char *pDirectory = pzPath+nLength;
|
const char *pDirectory = pzPath+nLength;
|
||||||
const char *pDot = NULL;
|
const char *pDot = NULL;
|
||||||
for (int i = nLength-1; i >= 0; i--)
|
for (int i = nLength-1; i >= 0; i--)
|
||||||
|
@ -217,7 +217,7 @@ int RFS::Open(int lumpnum)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fileSize = hFile.GetLength();
|
int fileSize = (int)hFile.GetLength();
|
||||||
buffer.Resize(fileSize);
|
buffer.Resize(fileSize);
|
||||||
_ptr = buffer.Data();
|
_ptr = buffer.Data();
|
||||||
if (_ptr == NULL) {
|
if (_ptr == NULL) {
|
||||||
|
@ -890,7 +890,7 @@ void ParseScript(int lumpnum)
|
||||||
case kTagString:
|
case kTagString:
|
||||||
{
|
{
|
||||||
memcpy(&buffer[nBytes], scriptBuffer, strlen(scriptBuffer) + 1);
|
memcpy(&buffer[nBytes], scriptBuffer, strlen(scriptBuffer) + 1);
|
||||||
nBytes += strlen(scriptBuffer) + 1;
|
nBytes += (int)strlen(scriptBuffer) + 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case kTagConstant:
|
case kTagConstant:
|
||||||
|
|
|
@ -712,7 +712,7 @@ void callbackCondition(int nSprite) {
|
||||||
if (pXSprite->isTriggered) return;
|
if (pXSprite->isTriggered) return;
|
||||||
|
|
||||||
TRCONDITION* pCond = &gCondition[pXSprite->sysData1];
|
TRCONDITION* pCond = &gCondition[pXSprite->sysData1];
|
||||||
for (int i = 0; i < pCond->length; i++) {
|
for (unsigned i = 0; i < pCond->length; i++) {
|
||||||
EVENT evn; evn.index = pCond->obj[i].index; evn.type = pCond->obj[i].type;
|
EVENT evn; evn.index = pCond->obj[i].index; evn.type = pCond->obj[i].type;
|
||||||
evn.cmd = pCond->obj[i].cmd; evn.funcID = kCallbackCondition;
|
evn.cmd = pCond->obj[i].cmd; evn.funcID = kCallbackCondition;
|
||||||
useCondition(&sprite[pXSprite->reference], pXSprite, evn);
|
useCondition(&sprite[pXSprite->reference], pXSprite, evn);
|
||||||
|
|
|
@ -200,18 +200,18 @@ static void SortRXBucket(int nCount)
|
||||||
vbx++;
|
vbx++;
|
||||||
}
|
}
|
||||||
RXBUCKET* v2c = pArray + nCount;
|
RXBUCKET* v2c = pArray + nCount;
|
||||||
int vt = ClipHigh(vbx - first, first - pArray);
|
int vt = int(min(vbx - first, first - pArray));
|
||||||
for (int i = 0; i < vt; i++)
|
for (int i = 0; i < vt; i++)
|
||||||
{
|
{
|
||||||
SortSwap(&vbx[i - vt], &pArray[i]);
|
SortSwap(&vbx[i - vt], &pArray[i]);
|
||||||
}
|
}
|
||||||
vt = ClipHigh(last - v4, v2c - last - 1);
|
vt = int(min(last - v4, v2c - last - 1));
|
||||||
for (int i = 0; i < vt; i++)
|
for (int i = 0; i < vt; i++)
|
||||||
{
|
{
|
||||||
SortSwap(&v2c[i - vt], &vbx[i]);
|
SortSwap(&v2c[i - vt], &vbx[i]);
|
||||||
}
|
}
|
||||||
int vvsi = last - v4;
|
int vvsi = int(last - v4);
|
||||||
int vvdi = vbx - first;
|
int vvdi = int(vbx - first);
|
||||||
if (vvsi >= vvdi)
|
if (vvsi >= vvdi)
|
||||||
{
|
{
|
||||||
vc4[v14] = vvsi;
|
vc4[v14] = vvsi;
|
||||||
|
|
|
@ -127,14 +127,14 @@ void hudDraw(PLAYER *gView, int nSectnum, double bobx, double boby, double zDelt
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
if (gView->sceneQav < 0) WeaponDraw(gView, nShade, cX, cY, nPalette, smoothratio);
|
if (gView->sceneQav < 0) WeaponDraw(gView, nShade, cX, cY, nPalette, int(smoothratio));
|
||||||
else if (gView->pXSprite->health > 0) playerQavSceneDraw(gView, nShade, cX, cY, nPalette, smoothratio);
|
else if (gView->pXSprite->health > 0) playerQavSceneDraw(gView, nShade, cX, cY, nPalette, int(smoothratio));
|
||||||
else {
|
else {
|
||||||
gView->sceneQav = gView->weaponQav = -1;
|
gView->sceneQav = gView->weaponQav = -1;
|
||||||
gView->weaponTimer = gView->curWeapon = 0;
|
gView->weaponTimer = gView->curWeapon = 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
WeaponDraw(gView, nShade, cX, cY, nPalette, smoothratio);
|
WeaponDraw(gView, nShade, cX, cY, nPalette, int(smoothratio));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (gViewPos == 0 && gView->pXSprite->burnTime > 60)
|
if (gViewPos == 0 && gView->pXSprite->burnTime > 60)
|
||||||
|
|
|
@ -171,7 +171,6 @@ void IniFile::Load()
|
||||||
auto fp = fileSystem.OpenFileReader(fileName);
|
auto fp = fileSystem.OpenFileReader(fileName);
|
||||||
if (fp.isOpen())
|
if (fp.isOpen())
|
||||||
{
|
{
|
||||||
int nSize = fp.GetLength();
|
|
||||||
auto pBuffer = fp.Read();
|
auto pBuffer = fp.Read();
|
||||||
LoadRes(pBuffer.Data());
|
LoadRes(pBuffer.Data());
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ void nnExtResetGlobals() {
|
||||||
if (gTrackingCondsCount > 0) {
|
if (gTrackingCondsCount > 0) {
|
||||||
for (int i = 0; i < gTrackingCondsCount; i++) {
|
for (int i = 0; i < gTrackingCondsCount; i++) {
|
||||||
TRCONDITION* pCond = &gCondition[i];
|
TRCONDITION* pCond = &gCondition[i];
|
||||||
for (int k = 0; k < pCond->length; k++) {
|
for (unsigned k = 0; k < pCond->length; k++) {
|
||||||
pCond->obj[k].index = pCond->obj[k].cmd = 0;
|
pCond->obj[k].index = pCond->obj[k].cmd = 0;
|
||||||
pCond->obj[k].type = -1;
|
pCond->obj[k].type = -1;
|
||||||
}
|
}
|
||||||
|
@ -716,7 +716,7 @@ spritetype* randomDropPickupObject(spritetype* pSource, short prevItem) {
|
||||||
pSprite2 = actDropObject(pSource, selected);
|
pSprite2 = actDropObject(pSource, selected);
|
||||||
if (pSprite2 != NULL) {
|
if (pSprite2 != NULL) {
|
||||||
|
|
||||||
pXSource->dropMsg = pSprite2->type; // store dropped item type in dropMsg
|
pXSource->dropMsg = uint8_t(pSprite2->type); // store dropped item type in dropMsg
|
||||||
pSprite2->x = pSource->x;
|
pSprite2->x = pSource->x;
|
||||||
pSprite2->y = pSource->y;
|
pSprite2->y = pSource->y;
|
||||||
pSprite2->z = pSource->z;
|
pSprite2->z = pSource->z;
|
||||||
|
@ -763,7 +763,7 @@ void nnExtProcessSuperSprites() {
|
||||||
if (pCond->length > 0 && !pXCond->locked && !pXCond->isTriggered && ++pXCond->busy >= pXCond->busyTime) {
|
if (pCond->length > 0 && !pXCond->locked && !pXCond->isTriggered && ++pXCond->busy >= pXCond->busyTime) {
|
||||||
|
|
||||||
pXCond->busy = 0;
|
pXCond->busy = 0;
|
||||||
for (int k = 0; k < pCond->length; k++) {
|
for (unsigned k = 0; k < pCond->length; k++) {
|
||||||
|
|
||||||
EVENT evn;
|
EVENT evn;
|
||||||
evn.index = pCond->obj[k].index; evn.cmd = pCond->obj[k].cmd;
|
evn.index = pCond->obj[k].index; evn.cmd = pCond->obj[k].cmd;
|
||||||
|
@ -1400,7 +1400,7 @@ void trPlayerCtrlLink(XSPRITE* pXSource, PLAYER* pPlayer, bool checkCondition) {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// search for player control sprite and replace it with actual player sprite
|
// search for player control sprite and replace it with actual player sprite
|
||||||
for (int k = 0; k < pCond->length; k++) {
|
for (unsigned k = 0; k < pCond->length; k++) {
|
||||||
if (pCond->obj[k].type != OBJ_SPRITE || pCond->obj[k].index != pXSource->reference) continue;
|
if (pCond->obj[k].type != OBJ_SPRITE || pCond->obj[k].index != pXSource->reference) continue;
|
||||||
pCond->obj[k].index = pPlayer->nSprite;
|
pCond->obj[k].index = pPlayer->nSprite;
|
||||||
pCond->obj[k].cmd = pPlayer->pXSprite->command;
|
pCond->obj[k].cmd = pPlayer->pXSprite->command;
|
||||||
|
@ -1638,16 +1638,16 @@ void useObjResizer(XSPRITE* pXSource, short objType, int objIndex) {
|
||||||
// for sectors
|
// for sectors
|
||||||
case 6:
|
case 6:
|
||||||
if (valueIsBetween(pXSource->data1, -1, 32767))
|
if (valueIsBetween(pXSource->data1, -1, 32767))
|
||||||
sector[objIndex].floorxpan_ = ClipRange(pXSource->data1, 0, 255);
|
sector[objIndex].floorxpan_ = (float)ClipRange(pXSource->data1, 0, 255);
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data2, -1, 32767))
|
if (valueIsBetween(pXSource->data2, -1, 32767))
|
||||||
sector[objIndex].floorypan_ = ClipRange(pXSource->data2, 0, 255);
|
sector[objIndex].floorypan_ = (float)ClipRange(pXSource->data2, 0, 255);
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||||
sector[objIndex].ceilingxpan_ = ClipRange(pXSource->data3, 0, 255);
|
sector[objIndex].ceilingxpan_ = (float)ClipRange(pXSource->data3, 0, 255);
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data4, -1, 65535))
|
if (valueIsBetween(pXSource->data4, -1, 65535))
|
||||||
sector[objIndex].ceilingypan_ = ClipRange(pXSource->data4, 0, 255);
|
sector[objIndex].ceilingypan_ = (float)ClipRange(pXSource->data4, 0, 255);
|
||||||
break;
|
break;
|
||||||
// for sprites
|
// for sprites
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -1698,10 +1698,10 @@ void useObjResizer(XSPRITE* pXSource, short objType, int objIndex) {
|
||||||
wall[objIndex].yrepeat = ClipRange(pXSource->data2, 0, 255);
|
wall[objIndex].yrepeat = ClipRange(pXSource->data2, 0, 255);
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||||
wall[objIndex].xpan_ = ClipRange(pXSource->data3, 0, 255);
|
wall[objIndex].xpan_ = (float)ClipRange(pXSource->data3, 0, 255);
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data4, -1, 65535))
|
if (valueIsBetween(pXSource->data4, -1, 65535))
|
||||||
wall[objIndex].ypan_ = ClipRange(pXSource->data4, 0, 255);
|
wall[objIndex].ypan_ = (float)ClipRange(pXSource->data4, 0, 255);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2314,7 +2314,7 @@ void useSpriteDamager(XSPRITE* pXSource, spritetype* pSprite) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dmgType >= kDmgFall) {
|
if (dmgType >= kDmgFall) {
|
||||||
if (dmg < pXSprite->health << 4) {
|
if (dmg < (int)pXSprite->health << 4) {
|
||||||
if (nnExtIsImmune(pSprite, dmgType, 0)) {
|
if (nnExtIsImmune(pSprite, dmgType, 0)) {
|
||||||
Printf(PRINT_HIGH, "Dude type %d is immune to damage type %d!", pSprite->type, dmgType);
|
Printf(PRINT_HIGH, "Dude type %d is immune to damage type %d!", pSprite->type, dmgType);
|
||||||
return;
|
return;
|
||||||
|
@ -3201,7 +3201,7 @@ void condUpdateObjectIndex(int objType, int oldIndex, int newIndex) {
|
||||||
for (int i = 0; i < gTrackingCondsCount; i++) {
|
for (int i = 0; i < gTrackingCondsCount; i++) {
|
||||||
|
|
||||||
TRCONDITION* pCond = &gCondition[i];
|
TRCONDITION* pCond = &gCondition[i];
|
||||||
for (int k = 0; k < pCond->length; k++) {
|
for (unsigned k = 0; k < pCond->length; k++) {
|
||||||
if (pCond->obj[k].type != objType || pCond->obj[k].index != oldIndex) continue;
|
if (pCond->obj[k].type != objType || pCond->obj[k].index != oldIndex) continue;
|
||||||
pCond->obj[k].index = newIndex;
|
pCond->obj[k].index = newIndex;
|
||||||
break;
|
break;
|
||||||
|
@ -3851,7 +3851,7 @@ bool modernTypeOperateSprite(int nSprite, spritetype* pSprite, XSPRITE* pXSprite
|
||||||
else evPost(nSprite, 3, 0, kCmdOff);
|
else evPost(nSprite, 3, 0, kCmdOff);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pXSprite->dropMsg = pXSprite->data4;
|
pXSprite->dropMsg = uint8_t(pXSprite->data4);
|
||||||
return true;
|
return true;
|
||||||
case kModernObjDataAccumulator:
|
case kModernObjDataAccumulator:
|
||||||
switch (event.cmd) {
|
switch (event.cmd) {
|
||||||
|
@ -4352,7 +4352,7 @@ void useSoundGen(spritetype* pSource, XSPRITE* pXSource) {
|
||||||
|
|
||||||
void useIncDecGen(XSPRITE* pXSource, short objType, int objIndex) {
|
void useIncDecGen(XSPRITE* pXSource, short objType, int objIndex) {
|
||||||
char buffer[5]; int data = -65535; short tmp = 0; int dataIndex = 0;
|
char buffer[5]; int data = -65535; short tmp = 0; int dataIndex = 0;
|
||||||
sprintf(buffer, "%d", abs(pXSource->data1)); int len = strlen(buffer);
|
sprintf(buffer, "%d", abs(pXSource->data1)); int len = int(strlen(buffer));
|
||||||
|
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
dataIndex = (buffer[i] - 52) + 4;
|
dataIndex = (buffer[i] - 52) + 4;
|
||||||
|
@ -4449,7 +4449,7 @@ void useSectorLigthChanger(XSPRITE* pXSource, XSECTOR* pXSector) {
|
||||||
|
|
||||||
int oldAmplitude = pXSector->amplitude;
|
int oldAmplitude = pXSector->amplitude;
|
||||||
if (valueIsBetween(pXSource->data2, -128, 128))
|
if (valueIsBetween(pXSource->data2, -128, 128))
|
||||||
pXSector->amplitude = pXSource->data2;
|
pXSector->amplitude = uint8_t(pXSource->data2);
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||||
pXSector->freq = ClipHigh(pXSource->data3, 255);
|
pXSector->freq = ClipHigh(pXSource->data3, 255);
|
||||||
|
@ -4521,7 +4521,7 @@ void useTargetChanger(XSPRITE* pXSource, spritetype* pSprite) {
|
||||||
|
|
||||||
// heal dude a bit in case of friendly fire
|
// heal dude a bit in case of friendly fire
|
||||||
int startHp = (pXSprite->sysData2 > 0) ? ClipRange(pXSprite->sysData2 << 4, 1, 65535) : pDudeInfo->startHealth << 4;
|
int startHp = (pXSprite->sysData2 > 0) ? ClipRange(pXSprite->sysData2 << 4, 1, 65535) : pDudeInfo->startHealth << 4;
|
||||||
if (pXSprite->health < startHp) actHealDude(pXSprite, receiveHp, startHp);
|
if (pXSprite->health < (unsigned)startHp) actHealDude(pXSprite, receiveHp, startHp);
|
||||||
} else if (xsprite[pBurnSource->extra].health <= 0) {
|
} else if (xsprite[pBurnSource->extra].health <= 0) {
|
||||||
pXSprite->burnTime = 0;
|
pXSprite->burnTime = 0;
|
||||||
}
|
}
|
||||||
|
@ -4581,11 +4581,11 @@ void useTargetChanger(XSPRITE* pXSource, spritetype* pSprite) {
|
||||||
|
|
||||||
// heal dude
|
// heal dude
|
||||||
int startHp = (pXSprite->sysData2 > 0) ? ClipRange(pXSprite->sysData2 << 4, 1, 65535) : pDudeInfo->startHealth << 4;
|
int startHp = (pXSprite->sysData2 > 0) ? ClipRange(pXSprite->sysData2 << 4, 1, 65535) : pDudeInfo->startHealth << 4;
|
||||||
if (pXSprite->health < startHp) actHealDude(pXSprite, receiveHp, startHp);
|
if (pXSprite->health < (unsigned)startHp) actHealDude(pXSprite, receiveHp, startHp);
|
||||||
|
|
||||||
// heal mate
|
// heal mate
|
||||||
startHp = (pXMate->sysData2 > 0) ? ClipRange(pXMate->sysData2 << 4, 1, 65535) : getDudeInfo(pMate->type)->startHealth << 4;
|
startHp = (pXMate->sysData2 > 0) ? ClipRange(pXMate->sysData2 << 4, 1, 65535) : getDudeInfo(pMate->type)->startHealth << 4;
|
||||||
if (pXMate->health < startHp) actHealDude(pXMate, receiveHp, startHp);
|
if (pXMate->health < (unsigned)startHp) actHealDude(pXMate, receiveHp, startHp);
|
||||||
|
|
||||||
if (pXMate->target > -1 && sprite[pXMate->target].extra >= 0) {
|
if (pXMate->target > -1 && sprite[pXMate->target].extra >= 0) {
|
||||||
pTarget = &sprite[pXMate->target];
|
pTarget = &sprite[pXMate->target];
|
||||||
|
@ -4742,10 +4742,10 @@ void usePictureChanger(XSPRITE* pXSource, int objType, int objIndex) {
|
||||||
sector[objIndex].ceilingpicnum = pXSource->data2;
|
sector[objIndex].ceilingpicnum = pXSource->data2;
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||||
sector[objIndex].floorpal = pXSource->data3;
|
sector[objIndex].floorpal = uint8_t(pXSource->data3);
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data4, -1, 65535))
|
if (valueIsBetween(pXSource->data4, -1, 65535))
|
||||||
sector[objIndex].ceilingpal = pXSource->data4;
|
sector[objIndex].ceilingpal = uint8_t(pXSource->data4);
|
||||||
break;
|
break;
|
||||||
case OBJ_SPRITE:
|
case OBJ_SPRITE:
|
||||||
if (valueIsBetween(pXSource->data1, -1, 32767))
|
if (valueIsBetween(pXSource->data1, -1, 32767))
|
||||||
|
@ -4755,7 +4755,7 @@ void usePictureChanger(XSPRITE* pXSource, int objType, int objIndex) {
|
||||||
else if (pXSource->data2 < -1) sprite[objIndex].shade = (pXSource->data2 < -127) ? -127 : pXSource->data2;
|
else if (pXSource->data2 < -1) sprite[objIndex].shade = (pXSource->data2 < -127) ? -127 : pXSource->data2;
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||||
sprite[objIndex].pal = pXSource->data3;
|
sprite[objIndex].pal = uint8_t(pXSource->data3);
|
||||||
break;
|
break;
|
||||||
case OBJ_WALL:
|
case OBJ_WALL:
|
||||||
if (valueIsBetween(pXSource->data1, -1, 32767))
|
if (valueIsBetween(pXSource->data1, -1, 32767))
|
||||||
|
@ -4765,7 +4765,7 @@ void usePictureChanger(XSPRITE* pXSource, int objType, int objIndex) {
|
||||||
wall[objIndex].overpicnum = pXSource->data2;
|
wall[objIndex].overpicnum = pXSource->data2;
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||||
wall[objIndex].pal = pXSource->data3;
|
wall[objIndex].pal = uint8_t(pXSource->data3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5163,7 +5163,7 @@ XSPRITE* evrListRedirectors(int objType, int objXIndex, XSPRITE* pXRedir, int* t
|
||||||
bool incDecGoalValueIsReached(XSPRITE* pXSprite) {
|
bool incDecGoalValueIsReached(XSPRITE* pXSprite) {
|
||||||
|
|
||||||
if (pXSprite->data3 != pXSprite->sysData1) return false;
|
if (pXSprite->data3 != pXSprite->sysData1) return false;
|
||||||
char buffer[5]; sprintf(buffer, "%d", abs(pXSprite->data1)); int len = strlen(buffer); int rx = -1;
|
char buffer[5]; sprintf(buffer, "%d", abs(pXSprite->data1)); int len = int(strlen(buffer)); int rx = -1;
|
||||||
for (int i = bucketHead[pXSprite->txID]; i < bucketHead[pXSprite->txID + 1]; i++) {
|
for (int i = bucketHead[pXSprite->txID]; i < bucketHead[pXSprite->txID + 1]; i++) {
|
||||||
if (rxBucket[i].type == OBJ_SPRITE && evrIsRedirector(rxBucket[i].index)) continue;
|
if (rxBucket[i].type == OBJ_SPRITE && evrIsRedirector(rxBucket[i].index)) continue;
|
||||||
for (int a = 0; a < len; a++) {
|
for (int a = 0; a < len; a++) {
|
||||||
|
|
|
@ -281,8 +281,8 @@ void DoSectorPanning(void)
|
||||||
int px = MulScale(speed << 2, Cos(angle), 30) / xBits;
|
int px = MulScale(speed << 2, Cos(angle), 30) / xBits;
|
||||||
int yBits = tileHeight(nTile) >> int((pSector->floorstat & 8) != 0);
|
int yBits = tileHeight(nTile) >> int((pSector->floorstat & 8) != 0);
|
||||||
int py = MulScale(speed << 2, Sin(angle), 30) / yBits;
|
int py = MulScale(speed << 2, Sin(angle), 30) / yBits;
|
||||||
pSector->addfloorxpan(px * (1. / 256));
|
pSector->addfloorxpan(px * (1.f / 256));
|
||||||
pSector->addfloorypan(-py * (1. / 256));
|
pSector->addfloorypan(-py * (1.f / 256));
|
||||||
}
|
}
|
||||||
if (pXSector->panCeiling) // Ceiling
|
if (pXSector->panCeiling) // Ceiling
|
||||||
{
|
{
|
||||||
|
@ -293,8 +293,8 @@ void DoSectorPanning(void)
|
||||||
int px = MulScale(speed << 2, Cos(angle), 30) / xBits;
|
int px = MulScale(speed << 2, Cos(angle), 30) / xBits;
|
||||||
int yBits = tileHeight(nTile) >> int((pSector->ceilingstat & 8) != 0);
|
int yBits = tileHeight(nTile) >> int((pSector->ceilingstat & 8) != 0);
|
||||||
int py = MulScale(speed << 2, Sin(angle), 30) / yBits;
|
int py = MulScale(speed << 2, Sin(angle), 30) / yBits;
|
||||||
pSector->addceilingxpan(px * (1. / 256));
|
pSector->addceilingxpan(px * (1.f / 256));
|
||||||
pSector->addceilingypan(-py * (1. / 256));
|
pSector->addceilingypan(-py * (1.f / 256));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -317,8 +317,8 @@ void DoSectorPanning(void)
|
||||||
int px = (psx << 2) / tileWidth(nTile);
|
int px = (psx << 2) / tileWidth(nTile);
|
||||||
int py = (psy << 2) / tileHeight(nTile);
|
int py = (psy << 2) / tileHeight(nTile);
|
||||||
|
|
||||||
wall[nWall].addxpan(px * (1. / 256));
|
wall[nWall].addxpan(px * (1.f / 256));
|
||||||
wall[nWall].addypan(py * (1. / 256));
|
wall[nWall].addypan(py * (1.f / 256));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ void GameInterface::UpdateSounds()
|
||||||
|
|
||||||
if (gMe->pSprite)
|
if (gMe->pSprite)
|
||||||
{
|
{
|
||||||
listener.angle = -gMe->pSprite->ang * BAngRadian; // Build uses a period of 2048.
|
listener.angle = -gMe->pSprite->ang * float(BAngRadian); // Build uses a period of 2048.
|
||||||
listener.velocity.Zero();
|
listener.velocity.Zero();
|
||||||
listener.position = GetSoundPos(&gMe->pSprite->pos);
|
listener.position = GetSoundPos(&gMe->pSprite->pos);
|
||||||
listener.valid = true;
|
listener.valid = true;
|
||||||
|
|
|
@ -270,9 +270,9 @@ void LifeLeechOperate(spritetype *pSprite, XSPRITE *pXSprite, EVENT event)
|
||||||
int nMissileType = kMissileLifeLeechAltNormal + (pXSprite->data3 ? 1 : 0);
|
int nMissileType = kMissileLifeLeechAltNormal + (pXSprite->data3 ? 1 : 0);
|
||||||
int t2;
|
int t2;
|
||||||
if (!pXSprite->data3)
|
if (!pXSprite->data3)
|
||||||
t2 = 120 / 10.0;
|
t2 = 120 / 10;
|
||||||
else
|
else
|
||||||
t2 = (3*120) / 10.0;
|
t2 = (3*120) / 10;
|
||||||
spritetype *pMissile = actFireMissile(pSprite, 0, z1, dx, dy, dz, nMissileType);
|
spritetype *pMissile = actFireMissile(pSprite, 0, z1, dx, dy, dz, nMissileType);
|
||||||
if (pMissile)
|
if (pMissile)
|
||||||
{
|
{
|
||||||
|
|
|
@ -742,7 +742,7 @@ void viewDrawScreen(bool sceneonly)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
renderSetRollAngle(rotscrnang.asbuildf());
|
renderSetRollAngle((float)rotscrnang.asbuildf());
|
||||||
render3DViewPolymost(nSectnum, cX, cY, cZ, cA, cH);
|
render3DViewPolymost(nSectnum, cX, cY, cZ, cA, cH);
|
||||||
}
|
}
|
||||||
bDeliriumOld = bDelirium && gDeliriumBlur;
|
bDeliriumOld = bDelirium && gDeliriumBlur;
|
||||||
|
|
|
@ -194,7 +194,7 @@ static bool CheckAmmo(PLAYER *pPlayer, int ammotype, int count)
|
||||||
return 1;
|
return 1;
|
||||||
if (pPlayer->curWeapon == 12 && pPlayer->weaponAmmo == 11 && pPlayer->weaponState == 11)
|
if (pPlayer->curWeapon == 12 && pPlayer->weaponAmmo == 11 && pPlayer->weaponState == 11)
|
||||||
return 1;
|
return 1;
|
||||||
if (pPlayer->curWeapon == 9 && pPlayer->pXSprite->health >= (count<<4))
|
if (pPlayer->curWeapon == 9 && pPlayer->pXSprite->health >= unsigned(count<<4))
|
||||||
return 1;
|
return 1;
|
||||||
return pPlayer->ammoCount[ammotype] >= count;
|
return pPlayer->ammoCount[ammotype] >= count;
|
||||||
}
|
}
|
||||||
|
@ -1703,7 +1703,7 @@ void AltFireLifeLeech(int , PLAYER *pPlayer)
|
||||||
if (gGameOptions.nGameType <= 1)
|
if (gGameOptions.nGameType <= 1)
|
||||||
{
|
{
|
||||||
int nAmmo = pPlayer->ammoCount[8];
|
int nAmmo = pPlayer->ammoCount[8];
|
||||||
if (nAmmo < 25 && pPlayer->pXSprite->health > ((25-nAmmo)<<4))
|
if (nAmmo < 25 && pPlayer->pXSprite->health > unsigned((25-nAmmo)<<4))
|
||||||
{
|
{
|
||||||
actDamageSprite(pPlayer->nSprite, pPlayer->pSprite, DAMAGE_TYPE_5, ((25-nAmmo)<<4));
|
actDamageSprite(pPlayer->nSprite, pPlayer->pSprite, DAMAGE_TYPE_5, ((25-nAmmo)<<4));
|
||||||
nAmmo = 25;
|
nAmmo = 25;
|
||||||
|
|
Loading…
Reference in a new issue