mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- Blood: replaced 'unsigned char' with 'uint8_t' and 'signed char' with 'int8_t'.
Preparation for getting rid of all those excessively used plain chars which are a menace to code stability.
This commit is contained in:
parent
839547a9fc
commit
ada28d8d04
12 changed files with 34 additions and 34 deletions
|
@ -6533,7 +6533,7 @@ void actFireVector(spritetype *pShooter, int a2, int a3, int a4, int a5, int a6,
|
||||||
int y = gHitInfo.hity-MulScale(a5, 16, 14);
|
int y = gHitInfo.hity-MulScale(a5, 16, 14);
|
||||||
int z = gHitInfo.hitz-MulScale(a6, 256, 14);
|
int z = gHitInfo.hitz-MulScale(a6, 256, 14);
|
||||||
short nSector = gHitInfo.hitsect;
|
short nSector = gHitInfo.hitsect;
|
||||||
unsigned char nSurf = kSurfNone;
|
uint8_t nSurf = kSurfNone;
|
||||||
if (nRange == 0 || approxDist(gHitInfo.hitx-pShooter->x, gHitInfo.hity-pShooter->y) < nRange)
|
if (nRange == 0 || approxDist(gHitInfo.hitx-pShooter->x, gHitInfo.hity-pShooter->y) < nRange)
|
||||||
{
|
{
|
||||||
switch (hit)
|
switch (hit)
|
||||||
|
|
|
@ -70,16 +70,16 @@ struct THINGINFO
|
||||||
{
|
{
|
||||||
short startHealth;
|
short startHealth;
|
||||||
short mass;
|
short mass;
|
||||||
unsigned char clipdist;
|
uint8_t clipdist;
|
||||||
short flags;
|
short flags;
|
||||||
int elastic; // elasticity
|
int elastic; // elasticity
|
||||||
int dmgResist; // damage resistance
|
int dmgResist; // damage resistance
|
||||||
short cstat;
|
short cstat;
|
||||||
short picnum;
|
short picnum;
|
||||||
char shade;
|
char shade;
|
||||||
unsigned char pal;
|
uint8_t pal;
|
||||||
unsigned char xrepeat; // xrepeat
|
uint8_t xrepeat; // xrepeat
|
||||||
unsigned char yrepeat; // yrepeat
|
uint8_t yrepeat; // yrepeat
|
||||||
int dmgControl[kDamageMax]; // damage
|
int dmgControl[kDamageMax]; // damage
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -89,11 +89,11 @@ struct AMMOITEMDATA
|
||||||
short picnum;
|
short picnum;
|
||||||
char shade;
|
char shade;
|
||||||
char pal;
|
char pal;
|
||||||
unsigned char xrepeat;
|
uint8_t xrepeat;
|
||||||
unsigned char yrepeat;
|
uint8_t yrepeat;
|
||||||
short count;
|
short count;
|
||||||
unsigned char type;
|
uint8_t type;
|
||||||
unsigned char weaponType;
|
uint8_t weaponType;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WEAPONITEMDATA
|
struct WEAPONITEMDATA
|
||||||
|
@ -102,8 +102,8 @@ struct WEAPONITEMDATA
|
||||||
short picnum;
|
short picnum;
|
||||||
char shade;
|
char shade;
|
||||||
char pal;
|
char pal;
|
||||||
unsigned char xrepeat;
|
uint8_t xrepeat;
|
||||||
unsigned char yrepeat;
|
uint8_t yrepeat;
|
||||||
short type;
|
short type;
|
||||||
short ammoType;
|
short ammoType;
|
||||||
short count;
|
short count;
|
||||||
|
@ -115,8 +115,8 @@ struct ITEMDATA
|
||||||
short picnum;
|
short picnum;
|
||||||
char shade;
|
char shade;
|
||||||
char pal;
|
char pal;
|
||||||
unsigned char xrepeat;
|
uint8_t xrepeat;
|
||||||
unsigned char yrepeat;
|
uint8_t yrepeat;
|
||||||
short packSlot;
|
short packSlot;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -125,15 +125,15 @@ struct MissileType
|
||||||
short picnum;
|
short picnum;
|
||||||
int velocity;
|
int velocity;
|
||||||
int angleOfs;
|
int angleOfs;
|
||||||
unsigned char xrepeat;
|
uint8_t xrepeat;
|
||||||
unsigned char yrepeat;
|
uint8_t yrepeat;
|
||||||
char shade;
|
char shade;
|
||||||
unsigned char clipDist;
|
uint8_t clipDist;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct EXPLOSION
|
struct EXPLOSION
|
||||||
{
|
{
|
||||||
unsigned char repeat;
|
uint8_t repeat;
|
||||||
char dmg;
|
char dmg;
|
||||||
char dmgRng;
|
char dmgRng;
|
||||||
int radius;
|
int radius;
|
||||||
|
|
|
@ -979,7 +979,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor
|
||||||
|
|
||||||
fr.Seek(0, FileReader::SeekSet);
|
fr.Seek(0, FileReader::SeekSet);
|
||||||
auto buffer = fr.Read();
|
auto buffer = fr.Read();
|
||||||
unsigned char md4[16];
|
uint8_t md4[16];
|
||||||
md4once(buffer.Data(), buffer.Size(), md4);
|
md4once(buffer.Data(), buffer.Size(), md4);
|
||||||
G_LoadMapHack(mapname, md4);
|
G_LoadMapHack(mapname, md4);
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ struct DUDEINFO {
|
||||||
short startHealth; // health
|
short startHealth; // health
|
||||||
unsigned short mass; // mass
|
unsigned short mass; // mass
|
||||||
int at6; // unused?
|
int at6; // unused?
|
||||||
unsigned char clipdist; // clipdist
|
uint8_t clipdist; // clipdist
|
||||||
int eyeHeight;
|
int eyeHeight;
|
||||||
int aimHeight; // used by just Cerberus
|
int aimHeight; // used by just Cerberus
|
||||||
int hearDist; // hear radius
|
int hearDist; // hear radius
|
||||||
|
|
|
@ -109,10 +109,10 @@ void FireProcess(void)
|
||||||
void CellularFrame(char *pFrame, int sizeX, int sizeY)
|
void CellularFrame(char *pFrame, int sizeX, int sizeY)
|
||||||
{
|
{
|
||||||
int nSquare = sizeX * sizeY;
|
int nSquare = sizeX * sizeY;
|
||||||
unsigned char *pPtr1 = (unsigned char*)pFrame;
|
uint8_t *pPtr1 = (uint8_t*)pFrame;
|
||||||
while (nSquare--)
|
while (nSquare--)
|
||||||
{
|
{
|
||||||
unsigned char *pPtr2 = pPtr1+sizeX;
|
uint8_t *pPtr2 = pPtr1+sizeX;
|
||||||
int sum = *(pPtr2-1) + *pPtr2 + *(pPtr2+1) + *(pPtr2+sizeX);
|
int sum = *(pPtr2-1) + *pPtr2 + *(pPtr2+1) + *(pPtr2+sizeX);
|
||||||
if (*(pPtr2+sizeX) > 96)
|
if (*(pPtr2+sizeX) > 96)
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,8 +44,8 @@ BEGIN_BLD_NS
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
short nTile;
|
short nTile;
|
||||||
unsigned char nStat;
|
uint8_t nStat;
|
||||||
unsigned char nPal;
|
uint8_t nPal;
|
||||||
int nScale;
|
int nScale;
|
||||||
short nX, nY;
|
short nX, nY;
|
||||||
} burnTable[9] = {
|
} burnTable[9] = {
|
||||||
|
|
|
@ -47,8 +47,8 @@ enum EGameFlag
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GAMEOPTIONS {
|
struct GAMEOPTIONS {
|
||||||
unsigned char nGameType;
|
uint8_t nGameType;
|
||||||
unsigned char nDifficulty;
|
uint8_t nDifficulty;
|
||||||
char nMonsterSettings;
|
char nMonsterSettings;
|
||||||
int uGameFlags;
|
int uGameFlags;
|
||||||
int uNetGameFlags;
|
int uNetGameFlags;
|
||||||
|
|
|
@ -115,7 +115,7 @@ enum SurfaceType {
|
||||||
};
|
};
|
||||||
|
|
||||||
extern char surfType[MAXTILES];
|
extern char surfType[MAXTILES];
|
||||||
extern signed char tileShade[MAXTILES];
|
extern int8_t tileShade[MAXTILES];
|
||||||
extern short voxelIndex[MAXTILES];
|
extern short voxelIndex[MAXTILES];
|
||||||
|
|
||||||
extern int nPrecacheCount;
|
extern int nPrecacheCount;
|
||||||
|
|
|
@ -182,7 +182,7 @@ struct PLAYER
|
||||||
struct AMMOINFO
|
struct AMMOINFO
|
||||||
{
|
{
|
||||||
int max;
|
int max;
|
||||||
signed char vectorType;
|
int8_t vectorType;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct POWERUPINFO
|
struct POWERUPINFO
|
||||||
|
|
|
@ -46,7 +46,7 @@ struct TILE_FRAME
|
||||||
int y;
|
int y;
|
||||||
int z;
|
int z;
|
||||||
int stat;
|
int stat;
|
||||||
signed char shade;
|
int8_t shade;
|
||||||
char palnum;
|
char palnum;
|
||||||
unsigned short angle;
|
unsigned short angle;
|
||||||
};
|
};
|
||||||
|
@ -54,9 +54,9 @@ struct TILE_FRAME
|
||||||
struct SOUNDINFO
|
struct SOUNDINFO
|
||||||
{
|
{
|
||||||
int sound;
|
int sound;
|
||||||
unsigned char priority;
|
uint8_t priority;
|
||||||
unsigned char sndFlags; // (by NoOne) Various sound flags
|
uint8_t sndFlags; // (by NoOne) Various sound flags
|
||||||
unsigned char sndRange; // (by NoOne) Random sound range
|
uint8_t sndRange; // (by NoOne) Random sound range
|
||||||
char reserved[1];
|
char reserved[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ struct Seq {
|
||||||
|
|
||||||
struct ACTIVE
|
struct ACTIVE
|
||||||
{
|
{
|
||||||
unsigned char type;
|
uint8_t type;
|
||||||
unsigned short xindex;
|
unsigned short xindex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ struct SEQINST
|
||||||
int nSeqID;
|
int nSeqID;
|
||||||
int callback;
|
int callback;
|
||||||
short timeCounter;
|
short timeCounter;
|
||||||
unsigned char frameIndex;
|
uint8_t frameIndex;
|
||||||
void Update();
|
void Update();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ int tileEnd[256];
|
||||||
int hTileFile[256];
|
int hTileFile[256];
|
||||||
|
|
||||||
char surfType[kMaxTiles];
|
char surfType[kMaxTiles];
|
||||||
signed char tileShade[kMaxTiles];
|
int8_t tileShade[kMaxTiles];
|
||||||
short voxelIndex[kMaxTiles];
|
short voxelIndex[kMaxTiles];
|
||||||
|
|
||||||
const char *pzBaseFileName = "TILES%03i.ART"; //"TILES%03i.ART";
|
const char *pzBaseFileName = "TILES%03i.ART"; //"TILES%03i.ART";
|
||||||
|
|
Loading…
Reference in a new issue