mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +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*))
|
||||
{
|
||||
TotalKills = nullptr;
|
||||
callback = a2;
|
||||
if (!qav && a1 != -1)
|
||||
{
|
||||
|
|
|
@ -33,7 +33,6 @@ class CChoke
|
|||
public:
|
||||
CChoke()
|
||||
{
|
||||
TotalKills = nullptr;
|
||||
qav = nullptr;
|
||||
duration = 0;
|
||||
time = 0;
|
||||
|
@ -44,7 +43,6 @@ public:
|
|||
void init(int a1, void(*a2)(PLAYER*));
|
||||
void animateChoke(int x, int y, int smoothratio);
|
||||
void reset() { time = 0; }
|
||||
char* TotalKills;
|
||||
QAV* qav;
|
||||
int duration;
|
||||
int time;
|
||||
|
|
|
@ -534,38 +534,38 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor
|
|||
|
||||
MAPHEADER 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);
|
||||
byte_1A76C7 = 1;
|
||||
}
|
||||
|
||||
mapHeader.TotalKills = LittleLong(mapHeader.TotalKills);
|
||||
mapHeader.Kills = LittleLong(mapHeader.Kills);
|
||||
mapHeader.at8 = LittleLong(mapHeader.at8);
|
||||
mapHeader.atc = LittleShort(mapHeader.atc);
|
||||
mapHeader.ate = LittleShort(mapHeader.ate);
|
||||
mapHeader.at10 = LittleShort(mapHeader.at10);
|
||||
mapHeader.at12 = LittleLong(mapHeader.at12);
|
||||
mapHeader.at16 = LittleLong(mapHeader.at16);
|
||||
mapHeader.at1b = LittleLong(mapHeader.at1b);
|
||||
mapHeader.at1f = LittleShort(mapHeader.at1f);
|
||||
mapHeader.at21 = LittleShort(mapHeader.at21);
|
||||
mapHeader.at23 = LittleShort(mapHeader.at23);
|
||||
mapHeader.x = LittleLong(mapHeader.x);
|
||||
mapHeader.y = LittleLong(mapHeader.y);
|
||||
mapHeader.z = LittleLong(mapHeader.z);
|
||||
mapHeader.ang = LittleShort(mapHeader.ang);
|
||||
mapHeader.sect = LittleShort(mapHeader.sect);
|
||||
mapHeader.pskybits = LittleShort(mapHeader.pskybits);
|
||||
mapHeader.visibility = LittleLong(mapHeader.visibility);
|
||||
mapHeader.mattid = LittleLong(mapHeader.mattid);
|
||||
mapHeader.revision = LittleLong(mapHeader.revision);
|
||||
mapHeader.numsectors = LittleShort(mapHeader.numsectors);
|
||||
mapHeader.numwalls = LittleShort(mapHeader.numwalls);
|
||||
mapHeader.numsprites = LittleShort(mapHeader.numsprites);
|
||||
|
||||
*pX = mapHeader.TotalKills;
|
||||
*pY = mapHeader.Kills;
|
||||
*pZ = mapHeader.at8;
|
||||
*pAngle = mapHeader.atc;
|
||||
*pSector = mapHeader.ate;
|
||||
gVisibility = g_visibility = mapHeader.at12;
|
||||
gSongId = mapHeader.at16;
|
||||
*pX = mapHeader.x;
|
||||
*pY = mapHeader.y;
|
||||
*pZ = mapHeader.z;
|
||||
*pAngle = mapHeader.ang;
|
||||
*pSector = mapHeader.sect;
|
||||
gVisibility = g_visibility = mapHeader.visibility;
|
||||
gSongId = mapHeader.mattid;
|
||||
if (byte_1A76C8)
|
||||
{
|
||||
if (mapHeader.at16 == 0x7474614d || mapHeader.at16 == 0x4d617474)
|
||||
if (mapHeader.mattid == 0x7474614d || mapHeader.mattid == 0x4d617474)
|
||||
{
|
||||
byte_1A76C6 = 1;
|
||||
}
|
||||
else if (!mapHeader.at16)
|
||||
else if (!mapHeader.mattid)
|
||||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
else if (mapHeader.at16)
|
||||
else if (mapHeader.mattid)
|
||||
{
|
||||
I_Error("%s: Corrupted Map file", mapname.GetChars());
|
||||
}
|
||||
parallaxtype = mapHeader.at1a;
|
||||
gMapRev = mapHeader.at1b;
|
||||
numsectors = mapHeader.at1f;
|
||||
numwalls = mapHeader.at21;
|
||||
parallaxtype = mapHeader.parallax;
|
||||
gMapRev = mapHeader.revision;
|
||||
numsectors = mapHeader.numsectors;
|
||||
numwalls = mapHeader.numwalls;
|
||||
dbInit();
|
||||
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);
|
||||
}
|
||||
gSkyCount = 1<< mapHeader.at10;
|
||||
gSkyCount = 1<< mapHeader.pskybits;
|
||||
fr.Read(tpskyoff, gSkyCount*sizeof(tpskyoff[0]));
|
||||
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->horizfrac = 65536;
|
||||
pSky->lognumtiles = mapHeader.at10;
|
||||
pSky->lognumtiles = mapHeader.pskybits;
|
||||
for (int i = 0; i < ClipHigh(gSkyCount, MAXPSKYTILES); 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();
|
||||
for (int i = 0; i < mapHeader.at23; i++)
|
||||
for (int i = 0; i < mapHeader.numsprites; i++)
|
||||
{
|
||||
RemoveSpriteStat(i);
|
||||
spritetypedisk load;
|
||||
|
|
|
@ -267,19 +267,19 @@ struct MAPSIGNATURE {
|
|||
};
|
||||
|
||||
struct MAPHEADER {
|
||||
int TotalKills; // x
|
||||
int Kills; // y
|
||||
int at8; // z
|
||||
short atc; // ang
|
||||
short ate; // sect
|
||||
short at10; // pskybits
|
||||
int at12; // visibility
|
||||
int at16; // song id, Matt
|
||||
char at1a; // parallaxtype
|
||||
int at1b; // map revision
|
||||
short at1f; // numsectors
|
||||
short at21; // numwalls
|
||||
short at23; // numsprites
|
||||
int x; // x
|
||||
int y; // y
|
||||
int z; // z
|
||||
short ang; // ang
|
||||
short sect; // sect
|
||||
short pskybits; // pskybits
|
||||
int visibility; // visibility
|
||||
int mattid; // song id, Matt
|
||||
char parallax; // parallaxtype
|
||||
int revision; // map revision
|
||||
short numsectors; // numsectors
|
||||
short numwalls; // numwalls
|
||||
short numsprites; // numsprites
|
||||
};
|
||||
|
||||
struct MAPHEADER2 {
|
||||
|
|
|
@ -42,7 +42,7 @@ BEGIN_BLD_NS
|
|||
|
||||
struct GIBFX
|
||||
{
|
||||
FX_ID TotalKills;
|
||||
FX_ID fxId;
|
||||
int at1;
|
||||
int chance;
|
||||
int at9;
|
||||
|
@ -62,7 +62,7 @@ struct GIBTHING
|
|||
|
||||
struct GIBLIST
|
||||
{
|
||||
GIBFX *TotalKills;
|
||||
GIBFX *gibFX;
|
||||
int Kills;
|
||||
GIBTHING *at8;
|
||||
int atc;
|
||||
|
@ -295,7 +295,7 @@ int ChanceToCount(int a1, int a2)
|
|||
void GibFX(spritetype *pSprite, GIBFX *pGFX, CGibPosition *pPos, CGibVelocity *pVel)
|
||||
{
|
||||
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;
|
||||
CGibPosition gPos(pSprite->x, pSprite->y, pSprite->z);
|
||||
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.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 (pGFX->at1 < 0)
|
||||
|
@ -438,7 +438,7 @@ void GibSprite(spritetype *pSprite, GIBTYPE nGibType, CGibPosition *pPos, CGibVe
|
|||
GIBLIST *pGib = &gibList[nGibType];
|
||||
for (int i = 0; i < pGib->Kills; i++)
|
||||
{
|
||||
GIBFX *pGibFX = &pGib->TotalKills[i];
|
||||
GIBFX *pGibFX = &pGib->gibFX[i];
|
||||
assert(pGibFX->chance > 0);
|
||||
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 r2 = Random(a5);
|
||||
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 (pGFX->at1 < 0)
|
||||
|
@ -505,7 +505,7 @@ void GibWall(int nWall, GIBTYPE nGibType, CGibVelocity *pVel)
|
|||
sfxPlay3DSound(cx, cy, cz, pGib->at10, nSector);
|
||||
for (int i = 0; i < pGib->Kills; i++)
|
||||
{
|
||||
GIBFX *pGibFX = &pGib->TotalKills[i];
|
||||
GIBFX *pGibFX = &pGib->gibFX[i];
|
||||
assert(pGibFX->chance > 0);
|
||||
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
|
||||
|
||||
struct SAMPLE2D
|
||||
{
|
||||
int TotalKills;
|
||||
char Kills;
|
||||
}; // 9 bytes
|
||||
|
||||
struct SFX
|
||||
{
|
||||
int relVol;
|
||||
|
|
|
@ -1524,12 +1524,12 @@ void DropVoodoo(int nTrigger, PLAYER *pPlayer)
|
|||
|
||||
struct TeslaMissile
|
||||
{
|
||||
int TotalKills; // offset
|
||||
int Kills; // id
|
||||
int at8; // ammo use
|
||||
int atc; // sound
|
||||
int at10; // light
|
||||
int at14; // weapon flash
|
||||
int offset; // offset
|
||||
int id; // id
|
||||
int ammouse; // ammo use
|
||||
int sound; // sound
|
||||
int light; // light
|
||||
int flash; // weapon flash
|
||||
};
|
||||
|
||||
void FireTesla(int nTrigger, PLAYER *pPlayer)
|
||||
|
@ -1548,10 +1548,10 @@ void FireTesla(int nTrigger, PLAYER *pPlayer)
|
|||
nTrigger--;
|
||||
spritetype *pSprite = pPlayer->pSprite;
|
||||
TeslaMissile *pMissile = &teslaMissile[nTrigger];
|
||||
if (!checkAmmo2(pPlayer, 7, pMissile->at8))
|
||||
if (!checkAmmo2(pPlayer, 7, pMissile->ammouse))
|
||||
{
|
||||
pMissile = &teslaMissile[0];
|
||||
if (!checkAmmo2(pPlayer, 7, pMissile->at8))
|
||||
if (!checkAmmo2(pPlayer, 7, pMissile->ammouse))
|
||||
{
|
||||
pPlayer->weaponState = -1;
|
||||
pPlayer->weaponQav = 76;
|
||||
|
@ -1559,11 +1559,11 @@ void FireTesla(int nTrigger, PLAYER *pPlayer)
|
|||
return;
|
||||
}
|
||||
}
|
||||
playerFireMissile(pPlayer, pMissile->TotalKills, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, pMissile->Kills);
|
||||
UseAmmo(pPlayer, 7, pMissile->at8);
|
||||
sfxPlay3DSound(pSprite, pMissile->atc, 1, 0);
|
||||
pPlayer->visibility = pMissile->at10;
|
||||
pPlayer->flashEffect = pMissile->at14;
|
||||
playerFireMissile(pPlayer, pMissile->offset, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, pMissile->id);
|
||||
UseAmmo(pPlayer, 7, pMissile->ammouse);
|
||||
sfxPlay3DSound(pSprite, pMissile->sound, 1, 0);
|
||||
pPlayer->visibility = pMissile->light;
|
||||
pPlayer->flashEffect = pMissile->flash;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue