mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-02-09 06:20:49 +00:00
- replaced SDWORD with int32_t globally.
This type wasn't used in the software rendering code so it could be removed already. The other homegrown types will have to be dealt with later.
This commit is contained in:
parent
f563a296c2
commit
c630b07011
27 changed files with 98 additions and 99 deletions
10
src/actor.h
10
src/actor.h
|
@ -1037,7 +1037,7 @@ public:
|
||||||
double StealthAlpha; // Minmum alpha for MF_STEALTH.
|
double StealthAlpha; // Minmum alpha for MF_STEALTH.
|
||||||
int WoundHealth; // Health needed to enter wound state
|
int WoundHealth; // Health needed to enter wound state
|
||||||
|
|
||||||
SDWORD tics; // state tic counter
|
int32_t tics; // state tic counter
|
||||||
FState *state;
|
FState *state;
|
||||||
//VMFunction *Damage; // For missiles and monster railgun
|
//VMFunction *Damage; // For missiles and monster railgun
|
||||||
int DamageVal;
|
int DamageVal;
|
||||||
|
@ -1062,10 +1062,10 @@ public:
|
||||||
// also the originator for missiles
|
// also the originator for missiles
|
||||||
TObjPtr<AActor> lastenemy; // Last known enemy -- killough 2/15/98
|
TObjPtr<AActor> lastenemy; // Last known enemy -- killough 2/15/98
|
||||||
TObjPtr<AActor> LastHeard; // [RH] Last actor this one heard
|
TObjPtr<AActor> LastHeard; // [RH] Last actor this one heard
|
||||||
SDWORD reactiontime; // if non 0, don't attack yet; used by
|
int32_t reactiontime; // if non 0, don't attack yet; used by
|
||||||
// player to freeze a bit after teleporting
|
// player to freeze a bit after teleporting
|
||||||
SDWORD threshold; // if > 0, the target will be chased
|
int32_t threshold; // if > 0, the target will be chased
|
||||||
SDWORD DefThreshold; // [MC] Default threshold which the actor will reset its threshold to after switching targets
|
int32_t DefThreshold; // [MC] Default threshold which the actor will reset its threshold to after switching targets
|
||||||
// no matter what (even if shot)
|
// no matter what (even if shot)
|
||||||
player_t *player; // only valid if type of APlayerPawn
|
player_t *player; // only valid if type of APlayerPawn
|
||||||
TObjPtr<AActor> LastLookActor; // Actor last looked for (if TIDtoHate != 0)
|
TObjPtr<AActor> LastLookActor; // Actor last looked for (if TIDtoHate != 0)
|
||||||
|
@ -1159,7 +1159,7 @@ public:
|
||||||
double MaxDropOffHeight;
|
double MaxDropOffHeight;
|
||||||
double MaxStepHeight;
|
double MaxStepHeight;
|
||||||
|
|
||||||
SDWORD Mass;
|
int32_t Mass;
|
||||||
SWORD PainChance;
|
SWORD PainChance;
|
||||||
int PainThreshold;
|
int PainThreshold;
|
||||||
FNameNoInit DamageType;
|
FNameNoInit DamageType;
|
||||||
|
|
|
@ -7,7 +7,6 @@ typedef int8_t SBYTE;
|
||||||
typedef uint8_t BYTE;
|
typedef uint8_t BYTE;
|
||||||
typedef int16_t SWORD;
|
typedef int16_t SWORD;
|
||||||
typedef uint16_t WORD;
|
typedef uint16_t WORD;
|
||||||
typedef int32_t SDWORD;
|
|
||||||
typedef uint32_t uint32;
|
typedef uint32_t uint32;
|
||||||
typedef int64_t SQWORD;
|
typedef int64_t SQWORD;
|
||||||
typedef uint64_t QWORD;
|
typedef uint64_t QWORD;
|
||||||
|
@ -63,7 +62,7 @@ union QWORD_UNION
|
||||||
#define FRACBITS 16
|
#define FRACBITS 16
|
||||||
#define FRACUNIT (1<<FRACBITS)
|
#define FRACUNIT (1<<FRACBITS)
|
||||||
|
|
||||||
typedef SDWORD fixed_t;
|
typedef int32_t fixed_t;
|
||||||
typedef DWORD dsfixed_t; // fixedpt used by span drawer
|
typedef DWORD dsfixed_t; // fixedpt used by span drawer
|
||||||
|
|
||||||
#define FIXED_MAX (signed)(0x7fffffff)
|
#define FIXED_MAX (signed)(0x7fffffff)
|
||||||
|
|
|
@ -1263,7 +1263,7 @@ void C_DrawConsole (bool hw2d)
|
||||||
DTA_KeepRatio, true, TAG_DONE);
|
DTA_KeepRatio, true, TAG_DONE);
|
||||||
|
|
||||||
// Draw the marker
|
// Draw the marker
|
||||||
i = LEFTMARGIN+5+tickbegin*8 + Scale (TickerAt, (SDWORD)(tickend - tickbegin)*8, TickerMax);
|
i = LEFTMARGIN+5+tickbegin*8 + Scale (TickerAt, (int32_t)(tickend - tickbegin)*8, TickerMax);
|
||||||
if (textScale == 1)
|
if (textScale == 1)
|
||||||
screen->DrawChar (ConFont, CR_ORANGE, (int)i, tickerY, 0x13, TAG_DONE);
|
screen->DrawChar (ConFont, CR_ORANGE, (int)i, tickerY, 0x13, TAG_DONE);
|
||||||
else
|
else
|
||||||
|
|
|
@ -262,8 +262,8 @@ struct mapseg_t
|
||||||
|
|
||||||
struct mapseg4_t
|
struct mapseg4_t
|
||||||
{
|
{
|
||||||
SDWORD v1;
|
int32_t v1;
|
||||||
SDWORD v2;
|
int32_t v2;
|
||||||
SWORD angle;
|
SWORD angle;
|
||||||
WORD linedef;
|
WORD linedef;
|
||||||
SWORD side;
|
SWORD side;
|
||||||
|
|
|
@ -479,7 +479,7 @@ DFsSection *FParser::looping_section()
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
// check thru all the hashchains
|
// check thru all the hashchains
|
||||||
SDWORD rover_index = Script->MakeIndex(Rover);
|
int32_t rover_index = Script->MakeIndex(Rover);
|
||||||
|
|
||||||
for(n=0; n<SECTIONSLOTS; n++)
|
for(n=0; n<SECTIONSLOTS; n++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -182,7 +182,7 @@ public:
|
||||||
|
|
||||||
union value_t
|
union value_t
|
||||||
{
|
{
|
||||||
SDWORD i;
|
int32_t i;
|
||||||
fsfix fixed; // haleyjd: fixed-point
|
fsfix fixed; // haleyjd: fixed-point
|
||||||
|
|
||||||
// the following are only used in the global script so we don't need to bother with them
|
// the following are only used in the global script so we don't need to bother with them
|
||||||
|
|
|
@ -49,14 +49,14 @@
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
struct POINT {
|
struct POINT {
|
||||||
SDWORD x;
|
int32_t x;
|
||||||
SDWORD y;
|
int32_t y;
|
||||||
};
|
};
|
||||||
struct RECT {
|
struct RECT {
|
||||||
SDWORD left;
|
int32_t left;
|
||||||
SDWORD top;
|
int32_t top;
|
||||||
SDWORD right;
|
int32_t right;
|
||||||
SDWORD bottom;
|
int32_t bottom;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ static FRandom pr_opl;
|
||||||
typedef uintptr_t Bitu;
|
typedef uintptr_t Bitu;
|
||||||
typedef intptr_t Bits;
|
typedef intptr_t Bits;
|
||||||
typedef DWORD Bit32u;
|
typedef DWORD Bit32u;
|
||||||
typedef SDWORD Bit32s;
|
typedef int32_t Bit32s;
|
||||||
typedef WORD Bit16u;
|
typedef WORD Bit16u;
|
||||||
typedef SWORD Bit16s;
|
typedef SWORD Bit16s;
|
||||||
typedef BYTE Bit8u;
|
typedef BYTE Bit8u;
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
typedef uintptr_t Bitu;
|
typedef uintptr_t Bitu;
|
||||||
typedef intptr_t Bits;
|
typedef intptr_t Bits;
|
||||||
typedef DWORD Bit32u;
|
typedef DWORD Bit32u;
|
||||||
typedef SDWORD Bit32s;
|
typedef int32_t Bit32s;
|
||||||
typedef WORD Bit16u;
|
typedef WORD Bit16u;
|
||||||
typedef SWORD Bit16s;
|
typedef SWORD Bit16s;
|
||||||
typedef BYTE Bit8u;
|
typedef BYTE Bit8u;
|
||||||
|
|
14
src/p_acs.h
14
src/p_acs.h
|
@ -60,14 +60,14 @@ struct InitIntToZero
|
||||||
v = 0;
|
v = 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
typedef TMap<SDWORD, SDWORD, THashTraits<SDWORD>, InitIntToZero> FWorldGlobalArray;
|
typedef TMap<int32_t, int32_t, THashTraits<int32_t>, InitIntToZero> FWorldGlobalArray;
|
||||||
|
|
||||||
// ACS variables with world scope
|
// ACS variables with world scope
|
||||||
extern SDWORD ACS_WorldVars[NUM_WORLDVARS];
|
extern int32_t ACS_WorldVars[NUM_WORLDVARS];
|
||||||
extern FWorldGlobalArray ACS_WorldArrays[NUM_WORLDVARS];
|
extern FWorldGlobalArray ACS_WorldArrays[NUM_WORLDVARS];
|
||||||
|
|
||||||
// ACS variables with global scope
|
// ACS variables with global scope
|
||||||
extern SDWORD ACS_GlobalVars[NUM_GLOBALVARS];
|
extern int32_t ACS_GlobalVars[NUM_GLOBALVARS];
|
||||||
extern FWorldGlobalArray ACS_GlobalArrays[NUM_GLOBALVARS];
|
extern FWorldGlobalArray ACS_GlobalArrays[NUM_GLOBALVARS];
|
||||||
|
|
||||||
#define LIBRARYID_MASK 0xFFF00000
|
#define LIBRARYID_MASK 0xFFF00000
|
||||||
|
@ -323,7 +323,7 @@ public:
|
||||||
ACSProfileInfo *GetFunctionProfileData(ScriptFunction *func) { return GetFunctionProfileData((int)(func - (ScriptFunction *)Functions)); }
|
ACSProfileInfo *GetFunctionProfileData(ScriptFunction *func) { return GetFunctionProfileData((int)(func - (ScriptFunction *)Functions)); }
|
||||||
const char *LookupString (DWORD index) const;
|
const char *LookupString (DWORD index) const;
|
||||||
|
|
||||||
SDWORD *MapVars[NUM_MAPVARS];
|
int32_t *MapVars[NUM_MAPVARS];
|
||||||
|
|
||||||
static FBehavior *StaticLoadModule (int lumpnum, FileReader * fr=NULL, int len=0);
|
static FBehavior *StaticLoadModule (int lumpnum, FileReader * fr=NULL, int len=0);
|
||||||
static void StaticLoadDefaultModules ();
|
static void StaticLoadDefaultModules ();
|
||||||
|
@ -359,7 +359,7 @@ private:
|
||||||
ArrayInfo **Arrays;
|
ArrayInfo **Arrays;
|
||||||
int NumTotalArrays;
|
int NumTotalArrays;
|
||||||
DWORD StringTable;
|
DWORD StringTable;
|
||||||
SDWORD MapVarStore[NUM_MAPVARS];
|
int32_t MapVarStore[NUM_MAPVARS];
|
||||||
TArray<FBehavior *> Imports;
|
TArray<FBehavior *> Imports;
|
||||||
DWORD LibraryID;
|
DWORD LibraryID;
|
||||||
char ModuleName[9];
|
char ModuleName[9];
|
||||||
|
@ -375,7 +375,7 @@ private:
|
||||||
int FindStringInChunk (DWORD *chunk, const char *varname) const;
|
int FindStringInChunk (DWORD *chunk, const char *varname) const;
|
||||||
|
|
||||||
void SerializeVars (FSerializer &arc);
|
void SerializeVars (FSerializer &arc);
|
||||||
void SerializeVarSet (FSerializer &arc, SDWORD *vars, int max);
|
void SerializeVarSet (FSerializer &arc, int32_t *vars, int max);
|
||||||
|
|
||||||
void MarkMapVarStrings() const;
|
void MarkMapVarStrings() const;
|
||||||
void LockMapVarStrings() const;
|
void LockMapVarStrings() const;
|
||||||
|
@ -919,7 +919,7 @@ protected:
|
||||||
int DoSpawnSpot (int type, int spot, int tid, int angle, bool forced);
|
int DoSpawnSpot (int type, int spot, int tid, int angle, bool forced);
|
||||||
int DoSpawnSpotFacing (int type, int spot, int tid, bool forced);
|
int DoSpawnSpotFacing (int type, int spot, int tid, bool forced);
|
||||||
int DoClassifyActor (int tid);
|
int DoClassifyActor (int tid);
|
||||||
int CallFunction(int argCount, int funcIndex, SDWORD *args);
|
int CallFunction(int argCount, int funcIndex, int32_t *args);
|
||||||
|
|
||||||
void DoFadeTo (int r, int g, int b, int a, int time);
|
void DoFadeTo (int r, int g, int b, int a, int time);
|
||||||
void DoFadeRange (int r1, int g1, int b1, int a1,
|
void DoFadeRange (int r1, int g1, int b1, int a1,
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
struct sectortype
|
struct sectortype
|
||||||
{
|
{
|
||||||
SWORD wallptr, wallnum;
|
SWORD wallptr, wallnum;
|
||||||
SDWORD ceilingZ, floorZ;
|
int32_t ceilingZ, floorZ;
|
||||||
SWORD ceilingstat, floorstat;
|
SWORD ceilingstat, floorstat;
|
||||||
SWORD ceilingpicnum, ceilingheinum;
|
SWORD ceilingpicnum, ceilingheinum;
|
||||||
SBYTE ceilingshade;
|
SBYTE ceilingshade;
|
||||||
|
@ -74,7 +74,7 @@ struct sectortype
|
||||||
//32 bytes
|
//32 bytes
|
||||||
struct walltype
|
struct walltype
|
||||||
{
|
{
|
||||||
SDWORD x, y;
|
int32_t x, y;
|
||||||
SWORD point2, nextwall, nextsector, cstat;
|
SWORD point2, nextwall, nextsector, cstat;
|
||||||
SWORD picnum, overpicnum;
|
SWORD picnum, overpicnum;
|
||||||
SBYTE shade;
|
SBYTE shade;
|
||||||
|
@ -100,7 +100,7 @@ struct walltype
|
||||||
//44 bytes
|
//44 bytes
|
||||||
struct spritetype
|
struct spritetype
|
||||||
{
|
{
|
||||||
SDWORD x, y, z;
|
int32_t x, y, z;
|
||||||
SWORD cstat, picnum;
|
SWORD cstat, picnum;
|
||||||
SBYTE shade;
|
SBYTE shade;
|
||||||
BYTE pal, clipdist, filler;
|
BYTE pal, clipdist, filler;
|
||||||
|
@ -146,8 +146,8 @@ static bool P_LoadBloodMap (BYTE *data, size_t len, FMapThing **sprites, int *nu
|
||||||
static void LoadSectors (sectortype *bsectors, int count);
|
static void LoadSectors (sectortype *bsectors, int count);
|
||||||
static void LoadWalls (walltype *walls, int numwalls, sectortype *bsectors);
|
static void LoadWalls (walltype *walls, int numwalls, sectortype *bsectors);
|
||||||
static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites, sectortype *bsectors, FMapThing *mapthings);
|
static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites, sectortype *bsectors, FMapThing *mapthings);
|
||||||
static vertex_t *FindVertex (SDWORD x, SDWORD y);
|
static vertex_t *FindVertex (int32_t x, int32_t y);
|
||||||
static void CreateStartSpot (SDWORD *pos, FMapThing *start);
|
static void CreateStartSpot (int32_t *pos, FMapThing *start);
|
||||||
static void CalcPlane (SlopeWork &slope, secplane_t &plane);
|
static void CalcPlane (SlopeWork &slope, secplane_t &plane);
|
||||||
static void Decrypt (void *to, const void *from, int len, int key);
|
static void Decrypt (void *to, const void *from, int len, int key);
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ bool P_LoadBuildMap (BYTE *data, size_t len, FMapThing **sprites, int *numspr)
|
||||||
|
|
||||||
numsprites = *(WORD *)(data + 24 + numsec*sizeof(sectortype) + numwalls*sizeof(walltype));
|
numsprites = *(WORD *)(data + 24 + numsec*sizeof(sectortype) + numwalls*sizeof(walltype));
|
||||||
*sprites = new FMapThing[numsprites + 1];
|
*sprites = new FMapThing[numsprites + 1];
|
||||||
CreateStartSpot ((SDWORD *)(data + 4), *sprites);
|
CreateStartSpot ((int32_t *)(data + 4), *sprites);
|
||||||
*numspr = 1 + LoadSprites ((spritetype *)(data + 26 + numsec*sizeof(sectortype) + numwalls*sizeof(walltype)),
|
*numspr = 1 + LoadSprites ((spritetype *)(data + 26 + numsec*sizeof(sectortype) + numwalls*sizeof(walltype)),
|
||||||
NULL, numsprites, (sectortype *)(data + 22), *sprites + 1);
|
NULL, numsprites, (sectortype *)(data + 22), *sprites + 1);
|
||||||
|
|
||||||
|
@ -755,7 +755,7 @@ static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites,
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
vertex_t *FindVertex (SDWORD xx, SDWORD yy)
|
vertex_t *FindVertex (int32_t xx, int32_t yy)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -780,7 +780,7 @@ vertex_t *FindVertex (SDWORD xx, SDWORD yy)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static void CreateStartSpot (SDWORD *pos, FMapThing *start)
|
static void CreateStartSpot (int32_t *pos, FMapThing *start)
|
||||||
{
|
{
|
||||||
short angle = LittleShort(*(WORD *)(&pos[3]));
|
short angle = LittleShort(*(WORD *)(&pos[3]));
|
||||||
FMapThing mt = { 0, };
|
FMapThing mt = { 0, };
|
||||||
|
|
|
@ -66,22 +66,22 @@
|
||||||
// The conversations as they exist inside a SCRIPTxx lump.
|
// The conversations as they exist inside a SCRIPTxx lump.
|
||||||
struct Response
|
struct Response
|
||||||
{
|
{
|
||||||
SDWORD GiveType;
|
int32_t GiveType;
|
||||||
SDWORD Item[3];
|
int32_t Item[3];
|
||||||
SDWORD Count[3];
|
int32_t Count[3];
|
||||||
char Reply[32];
|
char Reply[32];
|
||||||
char Yes[80];
|
char Yes[80];
|
||||||
SDWORD Link;
|
int32_t Link;
|
||||||
DWORD Log;
|
uint32_t Log;
|
||||||
char No[80];
|
char No[80];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Speech
|
struct Speech
|
||||||
{
|
{
|
||||||
DWORD SpeakerType;
|
uint32_t SpeakerType;
|
||||||
SDWORD DropType;
|
int32_t DropType;
|
||||||
SDWORD ItemCheck[3];
|
int32_t ItemCheck[3];
|
||||||
SDWORD Link;
|
int32_t Link;
|
||||||
char Name[16];
|
char Name[16];
|
||||||
char Sound[8];
|
char Sound[8];
|
||||||
char Backdrop[8];
|
char Backdrop[8];
|
||||||
|
@ -92,9 +92,9 @@ struct Speech
|
||||||
// The Teaser version of the game uses an older version of the structure
|
// The Teaser version of the game uses an older version of the structure
|
||||||
struct TeaserSpeech
|
struct TeaserSpeech
|
||||||
{
|
{
|
||||||
DWORD SpeakerType;
|
uint32_t SpeakerType;
|
||||||
SDWORD DropType;
|
int32_t DropType;
|
||||||
DWORD VoiceNumber;
|
uint32_t VoiceNumber;
|
||||||
char Name[16];
|
char Name[16];
|
||||||
char Dialogue[320];
|
char Dialogue[320];
|
||||||
Response Responses[5];
|
Response Responses[5];
|
||||||
|
@ -116,8 +116,8 @@ static int ConversationPauseTic;
|
||||||
static int StaticLastReply;
|
static int StaticLastReply;
|
||||||
|
|
||||||
static bool LoadScriptFile(int lumpnum, FileReader *lump, int numnodes, bool include, int type);
|
static bool LoadScriptFile(int lumpnum, FileReader *lump, int numnodes, bool include, int type);
|
||||||
static FStrifeDialogueNode *ReadRetailNode (FileReader *lump, DWORD &prevSpeakerType);
|
static FStrifeDialogueNode *ReadRetailNode (FileReader *lump, uint32_t &prevSpeakerType);
|
||||||
static FStrifeDialogueNode *ReadTeaserNode (FileReader *lump, DWORD &prevSpeakerType);
|
static FStrifeDialogueNode *ReadTeaserNode (FileReader *lump, uint32_t &prevSpeakerType);
|
||||||
static void ParseReplies (FStrifeDialogueReply **replyptr, Response *responses);
|
static void ParseReplies (FStrifeDialogueReply **replyptr, Response *responses);
|
||||||
static bool DrawConversationMenu ();
|
static bool DrawConversationMenu ();
|
||||||
static void PickConversationReply (int replyindex);
|
static void PickConversationReply (int replyindex);
|
||||||
|
@ -243,7 +243,7 @@ bool LoadScriptFile (const char *name, bool include, int type)
|
||||||
static bool LoadScriptFile(int lumpnum, FileReader *lump, int numnodes, bool include, int type)
|
static bool LoadScriptFile(int lumpnum, FileReader *lump, int numnodes, bool include, int type)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
DWORD prevSpeakerType;
|
uint32_t prevSpeakerType;
|
||||||
FStrifeDialogueNode *node;
|
FStrifeDialogueNode *node;
|
||||||
char buffer[4];
|
char buffer[4];
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ static bool LoadScriptFile(int lumpnum, FileReader *lump, int numnodes, bool inc
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
static FStrifeDialogueNode *ReadRetailNode (FileReader *lump, DWORD &prevSpeakerType)
|
static FStrifeDialogueNode *ReadRetailNode (FileReader *lump, uint32_t &prevSpeakerType)
|
||||||
{
|
{
|
||||||
FStrifeDialogueNode *node;
|
FStrifeDialogueNode *node;
|
||||||
Speech speech;
|
Speech speech;
|
||||||
|
@ -393,7 +393,7 @@ static FStrifeDialogueNode *ReadRetailNode (FileReader *lump, DWORD &prevSpeaker
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
static FStrifeDialogueNode *ReadTeaserNode (FileReader *lump, DWORD &prevSpeakerType)
|
static FStrifeDialogueNode *ReadTeaserNode (FileReader *lump, uint32_t &prevSpeakerType)
|
||||||
{
|
{
|
||||||
FStrifeDialogueNode *node;
|
FStrifeDialogueNode *node;
|
||||||
TeaserSpeech speech;
|
TeaserSpeech speech;
|
||||||
|
|
|
@ -82,13 +82,13 @@ static void CreateCachedNodes(MapData *map);
|
||||||
// fixed 32 bit gl_vert format v2.0+ (glBsp 1.91)
|
// fixed 32 bit gl_vert format v2.0+ (glBsp 1.91)
|
||||||
struct mapglvertex_t
|
struct mapglvertex_t
|
||||||
{
|
{
|
||||||
SDWORD x,y;
|
int32_t x,y;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gl3_mapsubsector_t
|
struct gl3_mapsubsector_t
|
||||||
{
|
{
|
||||||
SDWORD numsegs;
|
int32_t numsegs;
|
||||||
SDWORD firstseg; // Index of first one; segs are stored sequentially.
|
int32_t firstseg; // Index of first one; segs are stored sequentially.
|
||||||
};
|
};
|
||||||
|
|
||||||
struct glseg_t
|
struct glseg_t
|
||||||
|
@ -102,11 +102,11 @@ struct glseg_t
|
||||||
|
|
||||||
struct glseg3_t
|
struct glseg3_t
|
||||||
{
|
{
|
||||||
SDWORD v1;
|
int32_t v1;
|
||||||
SDWORD v2;
|
int32_t v2;
|
||||||
WORD linedef;
|
WORD linedef;
|
||||||
WORD side;
|
WORD side;
|
||||||
SDWORD partner;
|
int32_t partner;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gl5_mapnode_t
|
struct gl5_mapnode_t
|
||||||
|
@ -621,7 +621,7 @@ static bool LoadNodes (FileReader * lump)
|
||||||
no->dy = LittleShort(mn->dy)<<FRACBITS;
|
no->dy = LittleShort(mn->dy)<<FRACBITS;
|
||||||
for (j = 0; j < 2; j++)
|
for (j = 0; j < 2; j++)
|
||||||
{
|
{
|
||||||
SDWORD child = LittleLong(mn->children[j]);
|
int32_t child = LittleLong(mn->children[j]);
|
||||||
if (child & GL5_NF_SUBSECTOR)
|
if (child & GL5_NF_SUBSECTOR)
|
||||||
{
|
{
|
||||||
child &= ~GL5_NF_SUBSECTOR;
|
child &= ~GL5_NF_SUBSECTOR;
|
||||||
|
|
|
@ -69,7 +69,7 @@ public:
|
||||||
bool bFlippable;
|
bool bFlippable;
|
||||||
bool bReturning;
|
bool bReturning;
|
||||||
FSwitchDef *m_SwitchDef;
|
FSwitchDef *m_SwitchDef;
|
||||||
SDWORD m_Frame;
|
int32_t m_Frame;
|
||||||
DWORD m_Timer;
|
DWORD m_Timer;
|
||||||
DVector2 m_Pos;
|
DVector2 m_Pos;
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ polyspawns_t *polyspawns; // [RH] Let P_SpawnMapThings() find our thingies for u
|
||||||
|
|
||||||
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
||||||
|
|
||||||
static TArray<SDWORD> KnownPolySides;
|
static TArray<int32_t> KnownPolySides;
|
||||||
static FPolyNode *FreePolyNodes;
|
static FPolyNode *FreePolyNodes;
|
||||||
|
|
||||||
// CODE --------------------------------------------------------------------
|
// CODE --------------------------------------------------------------------
|
||||||
|
|
|
@ -151,7 +151,7 @@ static DWORD Zip_FindCentralDir(FileReader * fin)
|
||||||
|
|
||||||
if (fin->Seek(uReadPos, SEEK_SET) != 0) break;
|
if (fin->Seek(uReadPos, SEEK_SET) != 0) break;
|
||||||
|
|
||||||
if (fin->Read(buf, (SDWORD)uReadSize) != (SDWORD)uReadSize) break;
|
if (fin->Read(buf, (int32_t)uReadSize) != (int32_t)uReadSize) break;
|
||||||
|
|
||||||
for (i = (int)uReadSize - 3; (i--) > 0;)
|
for (i = (int)uReadSize - 3; (i--) > 0;)
|
||||||
{
|
{
|
||||||
|
|
|
@ -167,7 +167,7 @@ struct FBloodSFX
|
||||||
int Pitch; // pitch change
|
int Pitch; // pitch change
|
||||||
int PitchRange; // range of random pitch
|
int PitchRange; // range of random pitch
|
||||||
DWORD Format; // format of audio 1=11025 5=22050
|
DWORD Format; // format of audio 1=11025 5=22050
|
||||||
SDWORD LoopStart; // loop position (-1 means no looping)
|
int32_t LoopStart; // loop position (-1 means no looping)
|
||||||
char RawName[9]; // name of RAW resource
|
char RawName[9]; // name of RAW resource
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
// MACROS ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
#define GetCommand(a) ((a) & 255)
|
#define GetCommand(a) ((a) & 255)
|
||||||
#define GetData(a) (SDWORD(a) >> 8 )
|
#define GetData(a) (int32_t(a) >> 8 )
|
||||||
#define GetFloatData(a) float((SDWORD(a) >> 8 )/65536.f)
|
#define GetFloatData(a) float((int32_t(a) >> 8 )/65536.f)
|
||||||
#define MakeCommand(a,b) ((a) | ((b) << 8))
|
#define MakeCommand(a,b) ((a) | ((b) << 8))
|
||||||
#define HexenPlatSeq(a) (a)
|
#define HexenPlatSeq(a) (a)
|
||||||
#define HexenDoorSeq(a) ((a) | 0x40)
|
#define HexenDoorSeq(a) ((a) | 0x40)
|
||||||
|
@ -1390,7 +1390,7 @@ void SN_StopAllSequences (void)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
ptrdiff_t SN_GetSequenceOffset (int sequence, SDWORD *sequencePtr)
|
ptrdiff_t SN_GetSequenceOffset (int sequence, int32_t *sequencePtr)
|
||||||
{
|
{
|
||||||
return sequencePtr - Sequences[sequence]->Script;
|
return sequencePtr - Sequences[sequence]->Script;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ protected:
|
||||||
DSeqNode ();
|
DSeqNode ();
|
||||||
DSeqNode (int sequence, int modenum);
|
DSeqNode (int sequence, int modenum);
|
||||||
|
|
||||||
SDWORD *m_SequencePtr;
|
int32_t *m_SequencePtr;
|
||||||
int m_Sequence;
|
int m_Sequence;
|
||||||
|
|
||||||
FSoundID m_CurrentSoundID;
|
FSoundID m_CurrentSoundID;
|
||||||
|
@ -74,7 +74,7 @@ struct FSoundSequence
|
||||||
FName SeqName;
|
FName SeqName;
|
||||||
FName Slot;
|
FName Slot;
|
||||||
FSoundID StopSound;
|
FSoundID StopSound;
|
||||||
SDWORD Script[1]; // + more until end of sequence script
|
int32_t Script[1]; // + more until end of sequence script
|
||||||
};
|
};
|
||||||
|
|
||||||
void S_ParseSndSeq (int levellump);
|
void S_ParseSndSeq (int levellump);
|
||||||
|
@ -93,7 +93,7 @@ void SN_StopSequence (FPolyObj *poly);
|
||||||
bool SN_AreModesSame(int sequence, seqtype_t type, int mode1, int mode2);
|
bool SN_AreModesSame(int sequence, seqtype_t type, int mode1, int mode2);
|
||||||
bool SN_AreModesSame(FName name, int mode1, int mode2);
|
bool SN_AreModesSame(FName name, int mode1, int mode2);
|
||||||
void SN_UpdateActiveSequences (void);
|
void SN_UpdateActiveSequences (void);
|
||||||
ptrdiff_t SN_GetSequenceOffset (int sequence, SDWORD *sequencePtr);
|
ptrdiff_t SN_GetSequenceOffset (int sequence, int32_t *sequencePtr);
|
||||||
void SN_DoStop (void *);
|
void SN_DoStop (void *);
|
||||||
void SN_ChangeNodeData (int nodeNum, int seqOffset, int delayTics,
|
void SN_ChangeNodeData (int nodeNum, int seqOffset, int delayTics,
|
||||||
float volume, int currentSoundID);
|
float volume, int currentSoundID);
|
||||||
|
|
|
@ -1400,7 +1400,7 @@ sfxinfo_t *S_LoadSound(sfxinfo_t *sfx)
|
||||||
FWadLump wlump = Wads.OpenLumpNum(sfx->lumpnum);
|
FWadLump wlump = Wads.OpenLumpNum(sfx->lumpnum);
|
||||||
BYTE *sfxdata = new BYTE[size];
|
BYTE *sfxdata = new BYTE[size];
|
||||||
wlump.Read(sfxdata, size);
|
wlump.Read(sfxdata, size);
|
||||||
SDWORD dmxlen = LittleLong(((SDWORD *)sfxdata)[1]);
|
int32_t dmxlen = LittleLong(((int32_t *)sfxdata)[1]);
|
||||||
std::pair<SoundHandle,bool> snd;
|
std::pair<SoundHandle,bool> snd;
|
||||||
|
|
||||||
// If the sound is voc, use the custom loader.
|
// If the sound is voc, use the custom loader.
|
||||||
|
@ -1460,7 +1460,7 @@ static void S_LoadSound3D(sfxinfo_t *sfx)
|
||||||
FWadLump wlump = Wads.OpenLumpNum(sfx->lumpnum);
|
FWadLump wlump = Wads.OpenLumpNum(sfx->lumpnum);
|
||||||
BYTE *sfxdata = new BYTE[size];
|
BYTE *sfxdata = new BYTE[size];
|
||||||
wlump.Read(sfxdata, size);
|
wlump.Read(sfxdata, size);
|
||||||
SDWORD dmxlen = LittleLong(((SDWORD *)sfxdata)[1]);
|
int32_t dmxlen = LittleLong(((int32_t *)sfxdata)[1]);
|
||||||
std::pair<SoundHandle,bool> snd;
|
std::pair<SoundHandle,bool> snd;
|
||||||
|
|
||||||
// If the sound is voc, use the custom loader.
|
// If the sound is voc, use the custom loader.
|
||||||
|
|
|
@ -483,7 +483,7 @@ static void ParseInsideDecoration (Baggage &bag, AActor *defaults,
|
||||||
else if (sc.Compare ("Mass"))
|
else if (sc.Compare ("Mass"))
|
||||||
{
|
{
|
||||||
sc.MustGetFloat ();
|
sc.MustGetFloat ();
|
||||||
defaults->Mass = SDWORD(sc.Float);
|
defaults->Mass = int32_t(sc.Float);
|
||||||
}
|
}
|
||||||
else if (sc.Compare ("Translation1"))
|
else if (sc.Compare ("Translation1"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -289,7 +289,7 @@ void FBackdropTexture::Render()
|
||||||
|
|
||||||
|
|
||||||
DWORD a1, a2, a3, a4;
|
DWORD a1, a2, a3, a4;
|
||||||
SDWORD c1, c2, c3, c4;
|
int32_t c1, c2, c3, c4;
|
||||||
DWORD tx, ty, tc, ts;
|
DWORD tx, ty, tc, ts;
|
||||||
DWORD ux, uy, uc, us;
|
DWORD ux, uy, uc, us;
|
||||||
DWORD ltx, lty, lux, luy;
|
DWORD ltx, lty, lux, luy;
|
||||||
|
@ -302,10 +302,10 @@ void FBackdropTexture::Render()
|
||||||
double z1 = (cos(TORAD(z2ang)) / 4 + 0.5) * (0x8000000);
|
double z1 = (cos(TORAD(z2ang)) / 4 + 0.5) * (0x8000000);
|
||||||
double z2 = (cos(TORAD(z1ang)) / 4 + 0.75) * (0x8000000);
|
double z2 = (cos(TORAD(z1ang)) / 4 + 0.75) * (0x8000000);
|
||||||
|
|
||||||
tc = SDWORD(cos(TORAD(t1ang)) * z1);
|
tc = int32_t(cos(TORAD(t1ang)) * z1);
|
||||||
ts = SDWORD(sin(TORAD(t1ang)) * z1);
|
ts = int32_t(sin(TORAD(t1ang)) * z1);
|
||||||
uc = SDWORD(cos(TORAD(t2ang)) * z2);
|
uc = int32_t(cos(TORAD(t2ang)) * z2);
|
||||||
us = SDWORD(sin(TORAD(t2ang)) * z2);
|
us = int32_t(sin(TORAD(t2ang)) * z2);
|
||||||
|
|
||||||
ltx = -width / 2 * tc;
|
ltx = -width / 2 * tc;
|
||||||
lty = -width / 2 * ts;
|
lty = -width / 2 * ts;
|
||||||
|
@ -316,8 +316,8 @@ void FBackdropTexture::Render()
|
||||||
{
|
{
|
||||||
a1 = time1;
|
a1 = time1;
|
||||||
a2 = time2;
|
a2 = time2;
|
||||||
c3 = SDWORD(cos(TORAD(a3)) * 65536.0);
|
c3 = int32_t(cos(TORAD(a3)) * 65536.0);
|
||||||
c4 = SDWORD(cos(TORAD(a4)) * 65536.0);
|
c4 = int32_t(cos(TORAD(a4)) * 65536.0);
|
||||||
tx = ltx - (y - height / 2)*ts;
|
tx = ltx - (y - height / 2)*ts;
|
||||||
ty = lty + (y - height / 2)*tc;
|
ty = lty + (y - height / 2)*tc;
|
||||||
ux = lux - (y - height / 2)*us;
|
ux = lux - (y - height / 2)*us;
|
||||||
|
|
|
@ -126,7 +126,7 @@ struct DDSURFACEDESC2
|
||||||
DWORD Width;
|
DWORD Width;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
SDWORD Pitch;
|
int32_t Pitch;
|
||||||
DWORD LinearSize;
|
DWORD LinearSize;
|
||||||
};
|
};
|
||||||
DWORD Depth;
|
DWORD Depth;
|
||||||
|
@ -172,7 +172,7 @@ protected:
|
||||||
BYTE RShiftL, GShiftL, BShiftL, AShiftL;
|
BYTE RShiftL, GShiftL, BShiftL, AShiftL;
|
||||||
BYTE RShiftR, GShiftR, BShiftR, AShiftR;
|
BYTE RShiftR, GShiftR, BShiftR, AShiftR;
|
||||||
|
|
||||||
SDWORD Pitch;
|
int32_t Pitch;
|
||||||
DWORD LinearSize;
|
DWORD LinearSize;
|
||||||
|
|
||||||
static void CalcBitShift (DWORD mask, BYTE *lshift, BYTE *rshift);
|
static void CalcBitShift (DWORD mask, BYTE *lshift, BYTE *rshift);
|
||||||
|
|
|
@ -253,7 +253,7 @@ http://www.midi.org/about-midi/dls/dlsspec.shtml
|
||||||
#define FAR
|
#define FAR
|
||||||
typedef SWORD SHORT;
|
typedef SWORD SHORT;
|
||||||
typedef WORD USHORT;
|
typedef WORD USHORT;
|
||||||
typedef SDWORD LONG;
|
typedef int32_t LONG;
|
||||||
typedef DWORD ULONG;
|
typedef DWORD ULONG;
|
||||||
#define mmioFOURCC MAKE_ID
|
#define mmioFOURCC MAKE_ID
|
||||||
#define DEFINE_GUID(A, B, C, E, F, G, H, I, J, K, L, M)
|
#define DEFINE_GUID(A, B, C, E, F, G, H, I, J, K, L, M)
|
||||||
|
@ -1075,15 +1075,15 @@ static double to_normalized_percent(int decipercent)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* convert from 8bit value to fractional offset (15.15) */
|
/* convert from 8bit value to fractional offset (15.15) */
|
||||||
static SDWORD to_offset(int offset)
|
static int32_t to_offset(int offset)
|
||||||
{
|
{
|
||||||
return (SDWORD)offset << (7+15);
|
return (int32_t)offset << (7+15);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* calculate ramp rate in fractional unit;
|
/* calculate ramp rate in fractional unit;
|
||||||
* diff = 8bit, time = msec
|
* diff = 8bit, time = msec
|
||||||
*/
|
*/
|
||||||
static SDWORD calc_rate(Renderer *song, int diff, int sample_rate, double msec)
|
static int32_t calc_rate(Renderer *song, int diff, int sample_rate, double msec)
|
||||||
{
|
{
|
||||||
double rate;
|
double rate;
|
||||||
|
|
||||||
|
@ -1093,7 +1093,7 @@ static SDWORD calc_rate(Renderer *song, int diff, int sample_rate, double msec)
|
||||||
diff = 255;
|
diff = 255;
|
||||||
diff <<= (7+15);
|
diff <<= (7+15);
|
||||||
rate = ((double)diff / song->rate) * song->control_ratio * 1000.0 / msec;
|
rate = ((double)diff / song->rate) * song->control_ratio * 1000.0 / msec;
|
||||||
return (SDWORD)rate;
|
return (int32_t)rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int load_connection(ULONG cConnections, CONNECTION *artList, USHORT destination)
|
static int load_connection(ULONG cConnections, CONNECTION *artList, USHORT destination)
|
||||||
|
|
|
@ -199,12 +199,12 @@ static double timecent_to_sec(SWORD timecent)
|
||||||
return pow(2.0, timecent / 1200.0);
|
return pow(2.0, timecent / 1200.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDWORD to_offset(int offset)
|
static int32_t to_offset(int offset)
|
||||||
{
|
{
|
||||||
return (SDWORD)offset << (7+15);
|
return (int32_t)offset << (7+15);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDWORD calc_rate(Renderer *song, int diff, double sec)
|
static int32_t calc_rate(Renderer *song, int diff, double sec)
|
||||||
{
|
{
|
||||||
double rate;
|
double rate;
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ static SDWORD calc_rate(Renderer *song, int diff, double sec)
|
||||||
diff = 255;
|
diff = 255;
|
||||||
diff <<= (7+15);
|
diff <<= (7+15);
|
||||||
rate = ((double)diff / song->rate) * song->control_ratio / sec;
|
rate = ((double)diff / song->rate) * song->control_ratio / sec;
|
||||||
return (SDWORD)rate;
|
return (int32_t)rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1524,7 +1524,7 @@ void SFFile::LoadSample(SFSample *sample)
|
||||||
{
|
{
|
||||||
BYTE samp;
|
BYTE samp;
|
||||||
*fp >> samp;
|
*fp >> samp;
|
||||||
sample->InMemoryData[i] = ((((SDWORD(sample->InMemoryData[i] * 32768) << 8) | samp) << 8) >> 8) / 8388608.f;
|
sample->InMemoryData[i] = ((((int32_t(sample->InMemoryData[i] * 32768) << 8) | samp) << 8) >> 8) / 8388608.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Final 0 byte is for interpolation.
|
// Final 0 byte is for interpolation.
|
||||||
|
|
|
@ -426,7 +426,7 @@ static int update_signal(Voice *v)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mix_mystery_signal(SDWORD control_ratio, const sample_t *sp, float *lp, Voice *v, int count)
|
static void mix_mystery_signal(int32_t control_ratio, const sample_t *sp, float *lp, Voice *v, int count)
|
||||||
{
|
{
|
||||||
final_volume_t
|
final_volume_t
|
||||||
left = v->left_mix,
|
left = v->left_mix,
|
||||||
|
@ -477,7 +477,7 @@ static void mix_mystery_signal(SDWORD control_ratio, const sample_t *sp, float *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mix_single_signal(SDWORD control_ratio, const sample_t *sp, float *lp, Voice *v, float *ampat, int count)
|
static void mix_single_signal(int32_t control_ratio, const sample_t *sp, float *lp, Voice *v, float *ampat, int count)
|
||||||
{
|
{
|
||||||
final_volume_t amp;
|
final_volume_t amp;
|
||||||
int cc;
|
int cc;
|
||||||
|
@ -518,17 +518,17 @@ static void mix_single_signal(SDWORD control_ratio, const sample_t *sp, float *l
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mix_single_left_signal(SDWORD control_ratio, const sample_t *sp, float *lp, Voice *v, int count)
|
static void mix_single_left_signal(int32_t control_ratio, const sample_t *sp, float *lp, Voice *v, int count)
|
||||||
{
|
{
|
||||||
mix_single_signal(control_ratio, sp, lp, v, &v->left_mix, count);
|
mix_single_signal(control_ratio, sp, lp, v, &v->left_mix, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mix_single_right_signal(SDWORD control_ratio, const sample_t *sp, float *lp, Voice *v, int count)
|
static void mix_single_right_signal(int32_t control_ratio, const sample_t *sp, float *lp, Voice *v, int count)
|
||||||
{
|
{
|
||||||
mix_single_signal(control_ratio, sp, lp + 1, v, &v->right_mix, count);
|
mix_single_signal(control_ratio, sp, lp + 1, v, &v->right_mix, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mix_mono_signal(SDWORD control_ratio, const sample_t *sp, float *lp, Voice *v, int count)
|
static void mix_mono_signal(int32_t control_ratio, const sample_t *sp, float *lp, Voice *v, int count)
|
||||||
{
|
{
|
||||||
final_volume_t
|
final_volume_t
|
||||||
left = v->left_mix;
|
left = v->left_mix;
|
||||||
|
@ -568,7 +568,7 @@ static void mix_mono_signal(SDWORD control_ratio, const sample_t *sp, float *lp,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mix_mystery(SDWORD control_ratio, const sample_t *sp, float *lp, Voice *v, int count)
|
static void mix_mystery(int32_t control_ratio, const sample_t *sp, float *lp, Voice *v, int count)
|
||||||
{
|
{
|
||||||
final_volume_t
|
final_volume_t
|
||||||
left = v->left_mix,
|
left = v->left_mix,
|
||||||
|
|
|
@ -211,7 +211,7 @@ enum
|
||||||
|
|
||||||
struct Sample
|
struct Sample
|
||||||
{
|
{
|
||||||
SDWORD
|
int32_t
|
||||||
loop_start, loop_end, data_length,
|
loop_start, loop_end, data_length,
|
||||||
sample_rate;
|
sample_rate;
|
||||||
float
|
float
|
||||||
|
@ -233,7 +233,7 @@ struct Sample
|
||||||
} sf2;
|
} sf2;
|
||||||
} envelope;
|
} envelope;
|
||||||
sample_t *data;
|
sample_t *data;
|
||||||
SDWORD
|
int32_t
|
||||||
tremolo_sweep_increment, tremolo_phase_increment,
|
tremolo_sweep_increment, tremolo_phase_increment,
|
||||||
vibrato_sweep_increment, vibrato_control_ratio;
|
vibrato_sweep_increment, vibrato_control_ratio;
|
||||||
BYTE
|
BYTE
|
||||||
|
|
Loading…
Reference in a new issue