mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- even more renames
This commit is contained in:
parent
dced173cda
commit
d4873754f3
7 changed files with 63 additions and 72 deletions
|
@ -37,7 +37,6 @@ BEGIN_BLD_NS
|
||||||
|
|
||||||
void CChoke::init(int a1, void(*a2)(PLAYER*))
|
void CChoke::init(int a1, void(*a2)(PLAYER*))
|
||||||
{
|
{
|
||||||
TotalKills = nullptr;
|
|
||||||
callback = a2;
|
callback = a2;
|
||||||
if (!qav && a1 != -1)
|
if (!qav && a1 != -1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,6 @@ class CChoke
|
||||||
public:
|
public:
|
||||||
CChoke()
|
CChoke()
|
||||||
{
|
{
|
||||||
TotalKills = nullptr;
|
|
||||||
qav = nullptr;
|
qav = nullptr;
|
||||||
duration = 0;
|
duration = 0;
|
||||||
time = 0;
|
time = 0;
|
||||||
|
@ -44,7 +43,6 @@ public:
|
||||||
void init(int a1, void(*a2)(PLAYER*));
|
void init(int a1, void(*a2)(PLAYER*));
|
||||||
void animateChoke(int x, int y, int smoothratio);
|
void animateChoke(int x, int y, int smoothratio);
|
||||||
void reset() { time = 0; }
|
void reset() { time = 0; }
|
||||||
char* TotalKills;
|
|
||||||
QAV* qav;
|
QAV* qav;
|
||||||
int duration;
|
int duration;
|
||||||
int time;
|
int time;
|
||||||
|
|
|
@ -534,38 +534,38 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor
|
||||||
|
|
||||||
MAPHEADER mapHeader;
|
MAPHEADER mapHeader;
|
||||||
fr.Read(&mapHeader,37/* sizeof(mapHeader)*/);
|
fr.Read(&mapHeader,37/* sizeof(mapHeader)*/);
|
||||||
if (mapHeader.at16 != 0 && mapHeader.at16 != 0x7474614d && mapHeader.at16 != 0x4d617474) {
|
if (mapHeader.mattid != 0 && mapHeader.mattid != 0x7474614d && mapHeader.mattid != 0x4d617474) {
|
||||||
dbCrypt((char*)&mapHeader, sizeof(mapHeader), 0x7474614d);
|
dbCrypt((char*)&mapHeader, sizeof(mapHeader), 0x7474614d);
|
||||||
byte_1A76C7 = 1;
|
byte_1A76C7 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
mapHeader.TotalKills = LittleLong(mapHeader.TotalKills);
|
mapHeader.x = LittleLong(mapHeader.x);
|
||||||
mapHeader.Kills = LittleLong(mapHeader.Kills);
|
mapHeader.y = LittleLong(mapHeader.y);
|
||||||
mapHeader.at8 = LittleLong(mapHeader.at8);
|
mapHeader.z = LittleLong(mapHeader.z);
|
||||||
mapHeader.atc = LittleShort(mapHeader.atc);
|
mapHeader.ang = LittleShort(mapHeader.ang);
|
||||||
mapHeader.ate = LittleShort(mapHeader.ate);
|
mapHeader.sect = LittleShort(mapHeader.sect);
|
||||||
mapHeader.at10 = LittleShort(mapHeader.at10);
|
mapHeader.pskybits = LittleShort(mapHeader.pskybits);
|
||||||
mapHeader.at12 = LittleLong(mapHeader.at12);
|
mapHeader.visibility = LittleLong(mapHeader.visibility);
|
||||||
mapHeader.at16 = LittleLong(mapHeader.at16);
|
mapHeader.mattid = LittleLong(mapHeader.mattid);
|
||||||
mapHeader.at1b = LittleLong(mapHeader.at1b);
|
mapHeader.revision = LittleLong(mapHeader.revision);
|
||||||
mapHeader.at1f = LittleShort(mapHeader.at1f);
|
mapHeader.numsectors = LittleShort(mapHeader.numsectors);
|
||||||
mapHeader.at21 = LittleShort(mapHeader.at21);
|
mapHeader.numwalls = LittleShort(mapHeader.numwalls);
|
||||||
mapHeader.at23 = LittleShort(mapHeader.at23);
|
mapHeader.numsprites = LittleShort(mapHeader.numsprites);
|
||||||
|
|
||||||
*pX = mapHeader.TotalKills;
|
*pX = mapHeader.x;
|
||||||
*pY = mapHeader.Kills;
|
*pY = mapHeader.y;
|
||||||
*pZ = mapHeader.at8;
|
*pZ = mapHeader.z;
|
||||||
*pAngle = mapHeader.atc;
|
*pAngle = mapHeader.ang;
|
||||||
*pSector = mapHeader.ate;
|
*pSector = mapHeader.sect;
|
||||||
gVisibility = g_visibility = mapHeader.at12;
|
gVisibility = g_visibility = mapHeader.visibility;
|
||||||
gSongId = mapHeader.at16;
|
gSongId = mapHeader.mattid;
|
||||||
if (byte_1A76C8)
|
if (byte_1A76C8)
|
||||||
{
|
{
|
||||||
if (mapHeader.at16 == 0x7474614d || mapHeader.at16 == 0x4d617474)
|
if (mapHeader.mattid == 0x7474614d || mapHeader.mattid == 0x4d617474)
|
||||||
{
|
{
|
||||||
byte_1A76C6 = 1;
|
byte_1A76C6 = 1;
|
||||||
}
|
}
|
||||||
else if (!mapHeader.at16)
|
else if (!mapHeader.mattid)
|
||||||
{
|
{
|
||||||
byte_1A76C6 = 0;
|
byte_1A76C6 = 0;
|
||||||
}
|
}
|
||||||
|
@ -574,14 +574,14 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor
|
||||||
I_Error("%s: Corrupted Map file", mapname.GetChars());
|
I_Error("%s: Corrupted Map file", mapname.GetChars());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (mapHeader.at16)
|
else if (mapHeader.mattid)
|
||||||
{
|
{
|
||||||
I_Error("%s: Corrupted Map file", mapname.GetChars());
|
I_Error("%s: Corrupted Map file", mapname.GetChars());
|
||||||
}
|
}
|
||||||
parallaxtype = mapHeader.at1a;
|
parallaxtype = mapHeader.parallax;
|
||||||
gMapRev = mapHeader.at1b;
|
gMapRev = mapHeader.revision;
|
||||||
numsectors = mapHeader.at1f;
|
numsectors = mapHeader.numsectors;
|
||||||
numwalls = mapHeader.at21;
|
numwalls = mapHeader.numwalls;
|
||||||
dbInit();
|
dbInit();
|
||||||
if (byte_1A76C8)
|
if (byte_1A76C8)
|
||||||
{
|
{
|
||||||
|
@ -596,7 +596,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor
|
||||||
{
|
{
|
||||||
memset(&byte_19AE44, 0, 128);
|
memset(&byte_19AE44, 0, 128);
|
||||||
}
|
}
|
||||||
gSkyCount = 1<< mapHeader.at10;
|
gSkyCount = 1<< mapHeader.pskybits;
|
||||||
fr.Read(tpskyoff, gSkyCount*sizeof(tpskyoff[0]));
|
fr.Read(tpskyoff, gSkyCount*sizeof(tpskyoff[0]));
|
||||||
if (byte_1A76C8)
|
if (byte_1A76C8)
|
||||||
{
|
{
|
||||||
|
@ -605,7 +605,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor
|
||||||
|
|
||||||
psky_t* pSky = tileSetupSky(DEFAULTPSKY);
|
psky_t* pSky = tileSetupSky(DEFAULTPSKY);
|
||||||
pSky->horizfrac = 65536;
|
pSky->horizfrac = 65536;
|
||||||
pSky->lognumtiles = mapHeader.at10;
|
pSky->lognumtiles = mapHeader.pskybits;
|
||||||
for (int i = 0; i < ClipHigh(gSkyCount, MAXPSKYTILES); i++)
|
for (int i = 0; i < ClipHigh(gSkyCount, MAXPSKYTILES); i++)
|
||||||
{
|
{
|
||||||
pSky->tileofs[i] = LittleShort(tpskyoff[i]);
|
pSky->tileofs[i] = LittleShort(tpskyoff[i]);
|
||||||
|
@ -827,7 +827,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
initspritelists();
|
initspritelists();
|
||||||
for (int i = 0; i < mapHeader.at23; i++)
|
for (int i = 0; i < mapHeader.numsprites; i++)
|
||||||
{
|
{
|
||||||
RemoveSpriteStat(i);
|
RemoveSpriteStat(i);
|
||||||
spritetypedisk load;
|
spritetypedisk load;
|
||||||
|
|
|
@ -267,19 +267,19 @@ struct MAPSIGNATURE {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MAPHEADER {
|
struct MAPHEADER {
|
||||||
int TotalKills; // x
|
int x; // x
|
||||||
int Kills; // y
|
int y; // y
|
||||||
int at8; // z
|
int z; // z
|
||||||
short atc; // ang
|
short ang; // ang
|
||||||
short ate; // sect
|
short sect; // sect
|
||||||
short at10; // pskybits
|
short pskybits; // pskybits
|
||||||
int at12; // visibility
|
int visibility; // visibility
|
||||||
int at16; // song id, Matt
|
int mattid; // song id, Matt
|
||||||
char at1a; // parallaxtype
|
char parallax; // parallaxtype
|
||||||
int at1b; // map revision
|
int revision; // map revision
|
||||||
short at1f; // numsectors
|
short numsectors; // numsectors
|
||||||
short at21; // numwalls
|
short numwalls; // numwalls
|
||||||
short at23; // numsprites
|
short numsprites; // numsprites
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MAPHEADER2 {
|
struct MAPHEADER2 {
|
||||||
|
|
|
@ -42,7 +42,7 @@ BEGIN_BLD_NS
|
||||||
|
|
||||||
struct GIBFX
|
struct GIBFX
|
||||||
{
|
{
|
||||||
FX_ID TotalKills;
|
FX_ID fxId;
|
||||||
int at1;
|
int at1;
|
||||||
int chance;
|
int chance;
|
||||||
int at9;
|
int at9;
|
||||||
|
@ -62,7 +62,7 @@ struct GIBTHING
|
||||||
|
|
||||||
struct GIBLIST
|
struct GIBLIST
|
||||||
{
|
{
|
||||||
GIBFX *TotalKills;
|
GIBFX *gibFX;
|
||||||
int Kills;
|
int Kills;
|
||||||
GIBTHING *at8;
|
GIBTHING *at8;
|
||||||
int atc;
|
int atc;
|
||||||
|
@ -295,7 +295,7 @@ int ChanceToCount(int a1, int a2)
|
||||||
void GibFX(spritetype *pSprite, GIBFX *pGFX, CGibPosition *pPos, CGibVelocity *pVel)
|
void GibFX(spritetype *pSprite, GIBFX *pGFX, CGibPosition *pPos, CGibVelocity *pVel)
|
||||||
{
|
{
|
||||||
int nSector = pSprite->sectnum;
|
int nSector = pSprite->sectnum;
|
||||||
if (adult_lockout && gGameOptions.nGameType == 0 && pGFX->TotalKills == FX_13)
|
if (adult_lockout && gGameOptions.nGameType == 0 && pGFX->fxId == FX_13)
|
||||||
return;
|
return;
|
||||||
CGibPosition gPos(pSprite->x, pSprite->y, pSprite->z);
|
CGibPosition gPos(pSprite->x, pSprite->y, pSprite->z);
|
||||||
if (pPos)
|
if (pPos)
|
||||||
|
@ -316,7 +316,7 @@ void GibFX(spritetype *pSprite, GIBFX *pGFX, CGibPosition *pPos, CGibVelocity *p
|
||||||
gPos.y = pSprite->y+mulscale30(pSprite->clipdist<<2, Sin(nAngle));
|
gPos.y = pSprite->y+mulscale30(pSprite->clipdist<<2, Sin(nAngle));
|
||||||
gPos.z = bottom-Random(bottom-top);
|
gPos.z = bottom-Random(bottom-top);
|
||||||
}
|
}
|
||||||
spritetype *pFX = gFX.fxSpawn(pGFX->TotalKills, nSector, gPos.x, gPos.y, gPos.z, 0);
|
spritetype *pFX = gFX.fxSpawn(pGFX->fxId, nSector, gPos.x, gPos.y, gPos.z, 0);
|
||||||
if (pFX)
|
if (pFX)
|
||||||
{
|
{
|
||||||
if (pGFX->at1 < 0)
|
if (pGFX->at1 < 0)
|
||||||
|
@ -438,7 +438,7 @@ void GibSprite(spritetype *pSprite, GIBTYPE nGibType, CGibPosition *pPos, CGibVe
|
||||||
GIBLIST *pGib = &gibList[nGibType];
|
GIBLIST *pGib = &gibList[nGibType];
|
||||||
for (int i = 0; i < pGib->Kills; i++)
|
for (int i = 0; i < pGib->Kills; i++)
|
||||||
{
|
{
|
||||||
GIBFX *pGibFX = &pGib->TotalKills[i];
|
GIBFX *pGibFX = &pGib->gibFX[i];
|
||||||
assert(pGibFX->chance > 0);
|
assert(pGibFX->chance > 0);
|
||||||
GibFX(pSprite, pGibFX, pPos, pVel);
|
GibFX(pSprite, pGibFX, pPos, pVel);
|
||||||
}
|
}
|
||||||
|
@ -461,7 +461,7 @@ void GibFX(int nWall, GIBFX * pGFX, int a3, int a4, int a5, int a6, CGibVelocity
|
||||||
int r1 = Random(a6);
|
int r1 = Random(a6);
|
||||||
int r2 = Random(a5);
|
int r2 = Random(a5);
|
||||||
int r3 = Random(a4);
|
int r3 = Random(a4);
|
||||||
spritetype *pGib = gFX.fxSpawn(pGFX->TotalKills, nSector, pWall->x+r3, pWall->y+r2, a3+r1, 0);
|
spritetype *pGib = gFX.fxSpawn(pGFX->fxId, nSector, pWall->x+r3, pWall->y+r2, a3+r1, 0);
|
||||||
if (pGib)
|
if (pGib)
|
||||||
{
|
{
|
||||||
if (pGFX->at1 < 0)
|
if (pGFX->at1 < 0)
|
||||||
|
@ -505,7 +505,7 @@ void GibWall(int nWall, GIBTYPE nGibType, CGibVelocity *pVel)
|
||||||
sfxPlay3DSound(cx, cy, cz, pGib->at10, nSector);
|
sfxPlay3DSound(cx, cy, cz, pGib->at10, nSector);
|
||||||
for (int i = 0; i < pGib->Kills; i++)
|
for (int i = 0; i < pGib->Kills; i++)
|
||||||
{
|
{
|
||||||
GIBFX *pGibFX = &pGib->TotalKills[i];
|
GIBFX *pGibFX = &pGib->gibFX[i];
|
||||||
assert(pGibFX->chance > 0);
|
assert(pGibFX->chance > 0);
|
||||||
GibFX(nWall, pGibFX, ceilZ, wx, wy, wz, pVel);
|
GibFX(nWall, pGibFX, ceilZ, wx, wy, wz, pVel);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,12 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
BEGIN_BLD_NS
|
BEGIN_BLD_NS
|
||||||
|
|
||||||
struct SAMPLE2D
|
|
||||||
{
|
|
||||||
int TotalKills;
|
|
||||||
char Kills;
|
|
||||||
}; // 9 bytes
|
|
||||||
|
|
||||||
struct SFX
|
struct SFX
|
||||||
{
|
{
|
||||||
int relVol;
|
int relVol;
|
||||||
|
|
|
@ -1524,12 +1524,12 @@ void DropVoodoo(int nTrigger, PLAYER *pPlayer)
|
||||||
|
|
||||||
struct TeslaMissile
|
struct TeslaMissile
|
||||||
{
|
{
|
||||||
int TotalKills; // offset
|
int offset; // offset
|
||||||
int Kills; // id
|
int id; // id
|
||||||
int at8; // ammo use
|
int ammouse; // ammo use
|
||||||
int atc; // sound
|
int sound; // sound
|
||||||
int at10; // light
|
int light; // light
|
||||||
int at14; // weapon flash
|
int flash; // weapon flash
|
||||||
};
|
};
|
||||||
|
|
||||||
void FireTesla(int nTrigger, PLAYER *pPlayer)
|
void FireTesla(int nTrigger, PLAYER *pPlayer)
|
||||||
|
@ -1548,10 +1548,10 @@ void FireTesla(int nTrigger, PLAYER *pPlayer)
|
||||||
nTrigger--;
|
nTrigger--;
|
||||||
spritetype *pSprite = pPlayer->pSprite;
|
spritetype *pSprite = pPlayer->pSprite;
|
||||||
TeslaMissile *pMissile = &teslaMissile[nTrigger];
|
TeslaMissile *pMissile = &teslaMissile[nTrigger];
|
||||||
if (!checkAmmo2(pPlayer, 7, pMissile->at8))
|
if (!checkAmmo2(pPlayer, 7, pMissile->ammouse))
|
||||||
{
|
{
|
||||||
pMissile = &teslaMissile[0];
|
pMissile = &teslaMissile[0];
|
||||||
if (!checkAmmo2(pPlayer, 7, pMissile->at8))
|
if (!checkAmmo2(pPlayer, 7, pMissile->ammouse))
|
||||||
{
|
{
|
||||||
pPlayer->weaponState = -1;
|
pPlayer->weaponState = -1;
|
||||||
pPlayer->weaponQav = 76;
|
pPlayer->weaponQav = 76;
|
||||||
|
@ -1559,11 +1559,11 @@ void FireTesla(int nTrigger, PLAYER *pPlayer)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
playerFireMissile(pPlayer, pMissile->TotalKills, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, pMissile->Kills);
|
playerFireMissile(pPlayer, pMissile->offset, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, pMissile->id);
|
||||||
UseAmmo(pPlayer, 7, pMissile->at8);
|
UseAmmo(pPlayer, 7, pMissile->ammouse);
|
||||||
sfxPlay3DSound(pSprite, pMissile->atc, 1, 0);
|
sfxPlay3DSound(pSprite, pMissile->sound, 1, 0);
|
||||||
pPlayer->visibility = pMissile->at10;
|
pPlayer->visibility = pMissile->light;
|
||||||
pPlayer->flashEffect = pMissile->at14;
|
pPlayer->flashEffect = pMissile->flash;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue