- removed STACK_ARGS.

The only reason this even existed was that ZDoom's original VC projects used __fastcall. The CMake generated project do not, they stick to __cdecl.
Since no performance gain can be seen by using __fastcall the best course of action is to just remove all traces of it from the source and forget that it ever existed.
This commit is contained in:
Christoph Oelckers 2016-04-11 10:46:30 +02:00
parent 76f00131ff
commit db86385cf6
58 changed files with 231 additions and 210 deletions

View file

@ -581,7 +581,7 @@ int VPrintf (int printlevel, const char *format, va_list parms)
return PrintString (printlevel, outline.GetChars()); return PrintString (printlevel, outline.GetChars());
} }
int STACK_ARGS Printf (int printlevel, const char *format, ...) int Printf (int printlevel, const char *format, ...)
{ {
va_list argptr; va_list argptr;
int count; int count;
@ -593,7 +593,7 @@ int STACK_ARGS Printf (int printlevel, const char *format, ...)
return count; return count;
} }
int STACK_ARGS Printf (const char *format, ...) int Printf (const char *format, ...)
{ {
va_list argptr; va_list argptr;
int count; int count;
@ -605,7 +605,7 @@ int STACK_ARGS Printf (const char *format, ...)
return count; return count;
} }
int STACK_ARGS DPrintf (const char *format, ...) int DPrintf (const char *format, ...)
{ {
va_list argptr; va_list argptr;
int count; int count;

View file

@ -1259,7 +1259,7 @@ void FMaskCVar::DoSet (UCVarValue value, ECVarType type)
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
static int STACK_ARGS sortcvars (const void *a, const void *b) static int sortcvars (const void *a, const void *b)
{ {
return strcmp (((*(FBaseCVar **)a))->GetName(), ((*(FBaseCVar **)b))->GetName()); return strcmp (((*(FBaseCVar **)a))->GetName(), ((*(FBaseCVar **)b))->GetName());
} }

View file

@ -663,14 +663,14 @@ void D_DoServerInfoChange (BYTE **stream, bool singlebit)
} }
} }
static int STACK_ARGS userinfosortfunc(const void *a, const void *b) static int userinfosortfunc(const void *a, const void *b)
{ {
TMap<FName, FBaseCVar *>::ConstPair *pair1 = *(TMap<FName, FBaseCVar *>::ConstPair **)a; TMap<FName, FBaseCVar *>::ConstPair *pair1 = *(TMap<FName, FBaseCVar *>::ConstPair **)a;
TMap<FName, FBaseCVar *>::ConstPair *pair2 = *(TMap<FName, FBaseCVar *>::ConstPair **)b; TMap<FName, FBaseCVar *>::ConstPair *pair2 = *(TMap<FName, FBaseCVar *>::ConstPair **)b;
return stricmp(pair1->Key.GetChars(), pair2->Key.GetChars()); return stricmp(pair1->Key.GetChars(), pair2->Key.GetChars());
} }
static int STACK_ARGS namesortfunc(const void *a, const void *b) static int namesortfunc(const void *a, const void *b)
{ {
FName *name1 = (FName *)a; FName *name1 = (FName *)a;
FName *name2 = (FName *)b; FName *name2 = (FName *)b;

View file

@ -2827,7 +2827,7 @@ bool PClass::ReadValue(FArchive &ar, void *addr) const
// //
//========================================================================== //==========================================================================
static int STACK_ARGS cregcmp (const void *a, const void *b) NO_SANITIZE static int cregcmp (const void *a, const void *b) NO_SANITIZE
{ {
const PClass *class1 = *(const PClass **)a; const PClass *class1 = *(const PClass **)a;
const PClass *class2 = *(const PClass **)b; const PClass *class2 = *(const PClass **)b;

View file

@ -100,12 +100,6 @@ typedef TMap<int, PClassActor *> FClassMap;
#endif #endif
#if defined(_MSC_VER) || defined(__WATCOMC__)
#define STACK_ARGS __cdecl
#else
#define STACK_ARGS
#endif
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define NOVTABLE __declspec(novtable) #define NOVTABLE __declspec(novtable)
#else #else
@ -149,11 +143,11 @@ enum
// [RH] This gets used all over; define it here: // [RH] This gets used all over; define it here:
int STACK_ARGS Printf (int printlevel, const char *, ...) GCCPRINTF(2,3); int Printf (int printlevel, const char *, ...) GCCPRINTF(2,3);
int STACK_ARGS Printf (const char *, ...) GCCPRINTF(1,2); int Printf (const char *, ...) GCCPRINTF(1,2);
// [RH] Same here: // [RH] Same here:
int STACK_ARGS DPrintf (const char *, ...) GCCPRINTF(1,2); int DPrintf (const char *, ...) GCCPRINTF(1,2);
extern "C" int mysnprintf(char *buffer, size_t count, const char *format, ...) GCCPRINTF(3,4); extern "C" int mysnprintf(char *buffer, size_t count, const char *format, ...) GCCPRINTF(3,4);
extern "C" int myvsnprintf(char *buffer, size_t count, const char *format, va_list argptr) GCCFORMAT(3); extern "C" int myvsnprintf(char *buffer, size_t count, const char *format, va_list argptr) GCCFORMAT(3);

View file

@ -100,7 +100,7 @@ static IdMap DoomEdFromMapinfo;
FDoomEdMap DoomEdMap; FDoomEdMap DoomEdMap;
static int STACK_ARGS sortnums (const void *a, const void *b) static int sortnums (const void *a, const void *b)
{ {
return (*(const FDoomEdMap::Pair**)a)->Key - (*(const FDoomEdMap::Pair**)b)->Key; return (*(const FDoomEdMap::Pair**)a)->Key - (*(const FDoomEdMap::Pair**)b)->Key;
} }

View file

@ -34,7 +34,7 @@ FWeaponSlots *PlayingKeyConf;
TArray<PClassWeapon *> Weapons_ntoh; TArray<PClassWeapon *> Weapons_ntoh;
TMap<PClassWeapon *, int> Weapons_hton; TMap<PClassWeapon *, int> Weapons_hton;
static int STACK_ARGS ntoh_cmp(const void *a, const void *b); static int ntoh_cmp(const void *a, const void *b);
IMPLEMENT_CLASS(PClassWeapon) IMPLEMENT_CLASS(PClassWeapon)
@ -1725,7 +1725,7 @@ void P_SetupWeapons_ntohton()
// //
//=========================================================================== //===========================================================================
static int STACK_ARGS ntoh_cmp(const void *a, const void *b) static int ntoh_cmp(const void *a, const void *b)
{ {
PClassWeapon *c1 = *(PClassWeapon **)a; PClassWeapon *c1 = *(PClassWeapon **)a;
PClassWeapon *c2 = *(PClassWeapon **)b; PClassWeapon *c2 = *(PClassWeapon **)b;

View file

@ -379,7 +379,7 @@ static void DrawArmor(ABasicArmor * barmor, AHexenArmor * harmor, int x, int y)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static TArray<PClassActor *> KeyTypes, UnassignedKeyTypes; static TArray<PClassActor *> KeyTypes, UnassignedKeyTypes;
static int STACK_ARGS ktcmp(const void * a, const void * b) static int ktcmp(const void * a, const void * b)
{ {
AKey *key1 = (AKey*)GetDefaultByType ( *(PClassActor **)a ); AKey *key1 = (AKey*)GetDefaultByType ( *(PClassActor **)a );
AKey *key2 = (AKey*)GetDefaultByType ( *(PClassActor **)b ); AKey *key2 = (AKey*)GetDefaultByType ( *(PClassActor **)b );

View file

@ -84,7 +84,7 @@ CVAR (Int, sb_deathmatch_otherplayercolor, CR_GREY, CVAR_ARCHIVE)
CVAR (Bool, sb_teamdeathmatch_enable, true, CVAR_ARCHIVE) CVAR (Bool, sb_teamdeathmatch_enable, true, CVAR_ARCHIVE)
CVAR (Int, sb_teamdeathmatch_headingcolor, CR_RED, CVAR_ARCHIVE) CVAR (Int, sb_teamdeathmatch_headingcolor, CR_RED, CVAR_ARCHIVE)
int STACK_ARGS comparepoints (const void *arg1, const void *arg2) int comparepoints (const void *arg1, const void *arg2)
{ {
// Compare first be frags/kills, then by name. // Compare first be frags/kills, then by name.
player_t *p1 = *(player_t **)arg1; player_t *p1 = *(player_t **)arg1;
@ -99,7 +99,7 @@ int STACK_ARGS comparepoints (const void *arg1, const void *arg2)
return diff; return diff;
} }
int STACK_ARGS compareteams (const void *arg1, const void *arg2) int compareteams (const void *arg1, const void *arg2)
{ {
// Compare first by teams, then by frags, then by name. // Compare first by teams, then by frags, then by name.
player_t *p1 = *(player_t **)arg1; player_t *p1 = *(player_t **)arg1;

View file

@ -56,7 +56,7 @@ extern bool SB_ForceActive;
// Sorting routines // Sorting routines
int STACK_ARGS comparepoints(const void *arg1, const void *arg2); int comparepoints(const void *arg1, const void *arg2);
int STACK_ARGS compareteams(const void *arg1, const void *arg2); int compareteams(const void *arg1, const void *arg2);
#endif #endif

View file

@ -253,7 +253,7 @@ void FNodeBuilder::CreateSubsectorsForReal ()
} }
} }
int STACK_ARGS FNodeBuilder::SortSegs (const void *a, const void *b) int FNodeBuilder::SortSegs (const void *a, const void *b)
{ {
const FPrivSeg *x = ((const USegPtr *)a)->SegPtr; const FPrivSeg *x = ((const USegPtr *)a)->SegPtr;
const FPrivSeg *y = ((const USegPtr *)b)->SegPtr; const FPrivSeg *y = ((const USegPtr *)b)->SegPtr;

View file

@ -299,7 +299,7 @@ private:
void PushConnectingGLSeg (int subsector, TArray<glseg_t> &segs, vertex_t *v1, vertex_t *v2); void PushConnectingGLSeg (int subsector, TArray<glseg_t> &segs, vertex_t *v1, vertex_t *v2);
int OutputDegenerateSubsector (TArray<glseg_t> &segs, int subsector, bool bForward, double lastdot, FPrivSeg *&prev, vertex_t *outVerts); int OutputDegenerateSubsector (TArray<glseg_t> &segs, int subsector, bool bForward, double lastdot, FPrivSeg *&prev, vertex_t *outVerts);
static int STACK_ARGS SortSegs (const void *a, const void *b); static int SortSegs (const void *a, const void *b);
double InterceptVector (const node_t &splitter, const FPrivSeg &seg); double InterceptVector (const node_t &splitter, const FPrivSeg &seg);

View file

@ -40,7 +40,7 @@
#include "doomtype.h" #include "doomtype.h"
#include "nodebuild.h" #include "nodebuild.h"
static inline void STACK_ARGS Warn (const char *format, ...) static inline void Warn (const char *format, ...)
{ {
} }

View file

@ -2507,7 +2507,7 @@ void FBehavior::LoadScriptsDirectory ()
} }
} }
int STACK_ARGS FBehavior::SortScripts (const void *a, const void *b) int FBehavior::SortScripts (const void *a, const void *b)
{ {
ScriptPtr *ptr1 = (ScriptPtr *)a; ScriptPtr *ptr1 = (ScriptPtr *)a;
ScriptPtr *ptr2 = (ScriptPtr *)b; ScriptPtr *ptr2 = (ScriptPtr *)b;
@ -9997,7 +9997,7 @@ void ClearProfiles(TArray<ProfileCollector> &profiles)
} }
} }
static int STACK_ARGS sort_by_total_instr(const void *a_, const void *b_) static int sort_by_total_instr(const void *a_, const void *b_)
{ {
const ProfileCollector *a = (const ProfileCollector *)a_; const ProfileCollector *a = (const ProfileCollector *)a_;
const ProfileCollector *b = (const ProfileCollector *)b_; const ProfileCollector *b = (const ProfileCollector *)b_;
@ -10007,7 +10007,7 @@ static int STACK_ARGS sort_by_total_instr(const void *a_, const void *b_)
return (int)(b->ProfileData->TotalInstr - a->ProfileData->TotalInstr); return (int)(b->ProfileData->TotalInstr - a->ProfileData->TotalInstr);
} }
static int STACK_ARGS sort_by_min(const void *a_, const void *b_) static int sort_by_min(const void *a_, const void *b_)
{ {
const ProfileCollector *a = (const ProfileCollector *)a_; const ProfileCollector *a = (const ProfileCollector *)a_;
const ProfileCollector *b = (const ProfileCollector *)b_; const ProfileCollector *b = (const ProfileCollector *)b_;
@ -10015,7 +10015,7 @@ static int STACK_ARGS sort_by_min(const void *a_, const void *b_)
return b->ProfileData->MinInstrPerRun - a->ProfileData->MinInstrPerRun; return b->ProfileData->MinInstrPerRun - a->ProfileData->MinInstrPerRun;
} }
static int STACK_ARGS sort_by_max(const void *a_, const void *b_) static int sort_by_max(const void *a_, const void *b_)
{ {
const ProfileCollector *a = (const ProfileCollector *)a_; const ProfileCollector *a = (const ProfileCollector *)a_;
const ProfileCollector *b = (const ProfileCollector *)b_; const ProfileCollector *b = (const ProfileCollector *)b_;
@ -10023,7 +10023,7 @@ static int STACK_ARGS sort_by_max(const void *a_, const void *b_)
return b->ProfileData->MaxInstrPerRun - a->ProfileData->MaxInstrPerRun; return b->ProfileData->MaxInstrPerRun - a->ProfileData->MaxInstrPerRun;
} }
static int STACK_ARGS sort_by_avg(const void *a_, const void *b_) static int sort_by_avg(const void *a_, const void *b_)
{ {
const ProfileCollector *a = (const ProfileCollector *)a_; const ProfileCollector *a = (const ProfileCollector *)a_;
const ProfileCollector *b = (const ProfileCollector *)b_; const ProfileCollector *b = (const ProfileCollector *)b_;
@ -10033,7 +10033,7 @@ static int STACK_ARGS sort_by_avg(const void *a_, const void *b_)
return b_avg - a_avg; return b_avg - a_avg;
} }
static int STACK_ARGS sort_by_runs(const void *a_, const void *b_) static int sort_by_runs(const void *a_, const void *b_)
{ {
const ProfileCollector *a = (const ProfileCollector *)a_; const ProfileCollector *a = (const ProfileCollector *)a_;
const ProfileCollector *b = (const ProfileCollector *)b_; const ProfileCollector *b = (const ProfileCollector *)b_;
@ -10042,7 +10042,7 @@ static int STACK_ARGS sort_by_runs(const void *a_, const void *b_)
} }
static void ShowProfileData(TArray<ProfileCollector> &profiles, long ilimit, static void ShowProfileData(TArray<ProfileCollector> &profiles, long ilimit,
int (STACK_ARGS *sorter)(const void *, const void *), bool functions) int (*sorter)(const void *, const void *), bool functions)
{ {
static const char *const typelabels[2] = { "script", "function" }; static const char *const typelabels[2] = { "script", "function" };
@ -10113,7 +10113,7 @@ static void ShowProfileData(TArray<ProfileCollector> &profiles, long ilimit,
CCMD(acsprofile) CCMD(acsprofile)
{ {
static int (STACK_ARGS *sort_funcs[])(const void*, const void *) = static int (*sort_funcs[])(const void*, const void *) =
{ {
sort_by_total_instr, sort_by_total_instr,
sort_by_min, sort_by_min,
@ -10126,7 +10126,7 @@ CCMD(acsprofile)
TArray<ProfileCollector> ScriptProfiles, FuncProfiles; TArray<ProfileCollector> ScriptProfiles, FuncProfiles;
long limit = 10; long limit = 10;
int (STACK_ARGS *sorter)(const void *, const void *) = sort_by_total_instr; int (*sorter)(const void *, const void *) = sort_by_total_instr;
assert(countof(sort_names) == countof(sort_match_len)); assert(countof(sort_names) == countof(sort_match_len));

View file

@ -361,7 +361,7 @@ private:
void LoadScriptsDirectory (); void LoadScriptsDirectory ();
static int STACK_ARGS SortScripts (const void *a, const void *b); static int SortScripts (const void *a, const void *b);
void UnencryptStrings (); void UnencryptStrings ();
void UnescapeStringTable(BYTE *chunkstart, BYTE *datastart, bool haspadding); void UnescapeStringTable(BYTE *chunkstart, BYTE *datastart, bool haspadding);
int FindStringInChunk (DWORD *chunk, const char *varname) const; int FindStringInChunk (DWORD *chunk, const char *varname) const;

View file

@ -621,7 +621,7 @@ void P_DrawSplash2 (int count, const DVector3 &pos, DAngle angle, int updown, in
} }
} }
void P_DrawRailTrail(AActor *source, const DVector3 &start, const DVector3 &end, int color1, int color2, double maxdiff_d, int flags, PClassActor *spawnclass, DAngle angle, int duration, double sparsity, double drift, int SpiralOffset) void P_DrawRailTrail(AActor *source, const DVector3 &start, TArray<SPortalHit> &portalhits, const DVector3 &end, int color1, int color2, double maxdiff_d, int flags, PClassActor *spawnclass, DAngle angle, int duration, double sparsity, double drift, int SpiralOffset)
{ {
double length, lengthsquared; double length, lengthsquared;
int steps, i; int steps, i;

View file

@ -90,7 +90,14 @@ void P_RunEffects (void);
void P_RunEffect (AActor *actor, int effects); void P_RunEffect (AActor *actor, int effects);
void P_DrawRailTrail(AActor *source, const DVector3 &start, const DVector3 &end, int color1, int color2, double maxdiff = 0, int flags = 0, PClassActor *spawnclass = NULL, DAngle angle = 0., int duration = 35, double sparsity = 1.0, double drift = 1.0, int SpiralOffset = 270); struct SPortalHit
{
DVector3 HitPos;
DVector3 ContPos;
DVector3 OutDir;
};
void P_DrawRailTrail(AActor *source, const DVector3 &start, TArray<SPortalHit> &portalhits, const DVector3 &end, int color1, int color2, double maxdiff = 0, int flags = 0, PClassActor *spawnclass = NULL, DAngle angle = 0., int duration = 35, double sparsity = 1.0, double drift = 1.0, int SpiralOffset = 270);
void P_DrawSplash (int count, const DVector3 &pos, DAngle angle, int kind); void P_DrawSplash (int count, const DVector3 &pos, DAngle angle, int kind);
void P_DrawSplash2 (int count, const DVector3 &pos, DAngle angle, int updown, int kind); void P_DrawSplash2 (int count, const DVector3 &pos, DAngle angle, int updown, int kind);
void P_DisconnectEffect (AActor *actor); void P_DisconnectEffect (AActor *actor);

View file

@ -3551,7 +3551,7 @@ static FLineSpecial LineSpecialNames[] = {
#include "actionspecials.h" #include "actionspecials.h"
}; };
static int STACK_ARGS lscmp (const void * a, const void * b) static int lscmp (const void * a, const void * b)
{ {
return stricmp( ((FLineSpecial*)a)->name, ((FLineSpecial*)b)->name); return stricmp( ((FLineSpecial*)a)->name, ((FLineSpecial*)b)->name);
} }

View file

@ -4486,12 +4486,6 @@ struct SRailHit
DVector3 HitPos; DVector3 HitPos;
DAngle HitAngle; DAngle HitAngle;
}; };
struct SPortalHit
{
DVector3 HitPos;
DVector3 ContPos;
DVector3 OutDir;
};
struct RailData struct RailData
{ {
AActor *Caller; AActor *Caller;
@ -4600,11 +4594,19 @@ void P_RailAttack(FRailParams *p)
AActor *puffDefaults = GetDefaultByType(puffclass->GetReplacement()); //Contains all the flags such as FOILINVUL, etc. AActor *puffDefaults = GetDefaultByType(puffclass->GetReplacement()); //Contains all the flags such as FOILINVUL, etc.
// disabled because not complete yet. // disabled because not complete yet.
flags = (puffDefaults->flags6 & MF6_NOTRIGGER) ? 0/*TRACE_ReportPortals*/ : TRACE_PCross | TRACE_Impact /*| TRACE_ReportPortals*/; flags = (puffDefaults->flags6 & MF6_NOTRIGGER) ? TRACE_ReportPortals : TRACE_PCross | TRACE_Impact | TRACE_ReportPortals;
rail_data.StopAtInvul = (puffDefaults->flags3 & MF3_FOILINVUL) ? false : true; rail_data.StopAtInvul = (puffDefaults->flags3 & MF3_FOILINVUL) ? false : true;
rail_data.ThruSpecies = (puffDefaults->flags6 & MF6_MTHRUSPECIES) ? true : false; rail_data.ThruSpecies = (puffDefaults->flags6 & MF6_MTHRUSPECIES) ? true : false;
// to make things easier, push the start position and directional vector onto the PortalHits array as its first element
SPortalHit phit = { start, start, vec };
rail_data.PortalHits.Push(phit);
Trace(start, source->Sector, vec, p->distance, MF_SHOOTABLE, ML_BLOCKEVERYTHING, source, trace, flags, ProcessRailHit, &rail_data); Trace(start, source->Sector, vec, p->distance, MF_SHOOTABLE, ML_BLOCKEVERYTHING, source, trace, flags, ProcessRailHit, &rail_data);
// and push the hit position, too, so that the array contains the entire trace with all transition points.
phit = { trace.HitPos, trace.HitPos, trace.HitVector };
rail_data.PortalHits.Push(phit);
// Hurt anything the trace hit // Hurt anything the trace hit
unsigned int i; unsigned int i;
FName damagetype = (puffDefaults == NULL || puffDefaults->DamageType == NAME_None) ? FName(NAME_Railgun) : puffDefaults->DamageType; FName damagetype = (puffDefaults == NULL || puffDefaults->DamageType == NAME_None) ? FName(NAME_Railgun) : puffDefaults->DamageType;
@ -4707,7 +4709,7 @@ void P_RailAttack(FRailParams *p)
} }
// Draw the slug's trail. // Draw the slug's trail.
P_DrawRailTrail(source, start, trace.HitPos, p->color1, p->color2, p->maxdiff, p->flags, p->spawnclass, angle, p->duration, p->sparsity, p->drift, p->SpiralOffset); P_DrawRailTrail(source, start, rail_data.PortalHits, trace.HitPos, p->color1, p->color2, p->maxdiff, p->flags, p->spawnclass, angle, p->duration, p->sparsity, p->drift, p->SpiralOffset);
} }
//========================================================================== //==========================================================================

View file

@ -451,7 +451,7 @@ FState *FStateDefinitions::FindState(const char * name)
// //
//========================================================================== //==========================================================================
static int STACK_ARGS labelcmp(const void *a, const void *b) static int labelcmp(const void *a, const void *b)
{ {
FStateLabel *A = (FStateLabel *)a; FStateLabel *A = (FStateLabel *)a;
FStateLabel *B = (FStateLabel *)b; FStateLabel *B = (FStateLabel *)b;

View file

@ -532,7 +532,7 @@ typedef TMap<int, MapinfoSpawnItem> SpawnMap;
static SpawnMap SpawnablesFromMapinfo; static SpawnMap SpawnablesFromMapinfo;
static SpawnMap ConversationIDsFromMapinfo; static SpawnMap ConversationIDsFromMapinfo;
static int STACK_ARGS SpawnableSort(const void *a, const void *b) static int SpawnableSort(const void *a, const void *b)
{ {
return (*((FClassMap::Pair **)a))->Key - (*((FClassMap::Pair **)b))->Key; return (*((FClassMap::Pair **)a))->Key - (*((FClassMap::Pair **)b))->Key;
} }

View file

@ -231,7 +231,7 @@ int FTraceInfo::EnterLinePortal(line_t *li, double frac)
frac += 1 / MaxDist; frac += 1 / MaxDist;
double enterdist = MaxDist / frac; double enterdist = MaxDist / frac;
DVector2 enter = newtrace.Start + enterdist * Vec; DVector3 enter = newtrace.Start + enterdist * Vec;
newtrace.ActorMask = ActorMask; newtrace.ActorMask = ActorMask;
newtrace.WallMask = WallMask; newtrace.WallMask = WallMask;
@ -253,6 +253,18 @@ int FTraceInfo::EnterLinePortal(line_t *li, double frac)
newtrace.lastfloorportalheight = newtrace.lastceilingportalheight = newtrace.limitz; newtrace.lastfloorportalheight = newtrace.lastceilingportalheight = newtrace.limitz;
newtrace.sectorsel = 0; newtrace.sectorsel = 0;
Results->unlinked = true; Results->unlinked = true;
if ((TraceFlags & TRACE_ReportPortals) && TraceCallback != NULL)
{
Results->HitType = TRACE_CrossingPortal;
Results->HitPos = enter;
P_TranslatePortalXY(li, enter.X, enter.Y);
P_TranslatePortalZ(li, enter.Z);
Results->SrcFromTarget = enter;
Results->HitVector = newtrace.Vec;
TraceCallback(*Results, TraceCallbackData);
}
return newtrace.TraceTraverse(ActorMask ? PT_ADDLINES | PT_ADDTHINGS | PT_COMPATIBLE : PT_ADDLINES); return newtrace.TraceTraverse(ActorMask ? PT_ADDLINES | PT_ADDTHINGS | PT_COMPATIBLE : PT_ADDLINES);
} }
@ -455,8 +467,11 @@ bool FTraceInfo::LineCheck(intercept_t *in)
lastfloorportalheight = fc; lastfloorportalheight = fc;
if (TraceCallback != NULL) if (TraceCallback != NULL)
{ {
// Todo: calculate the intersection point.
Results->HitType = TRACE_CrossingPortal; Results->HitType = TRACE_CrossingPortal;
double hitz = CurSector->SkyBoxes[sector_t::floor]->specialf1;
Results->HitPos = Start + Vec * (hitz - Start.Z) / Vec.Z;
Results->SrcFromTarget = Results->HitPos + CurSector->SkyBoxes[sector_t::floor]->Scale;
Results->HitVector = Vec;
TraceCallback(*Results, TraceCallbackData); TraceCallback(*Results, TraceCallbackData);
} }
} }
@ -483,8 +498,11 @@ bool FTraceInfo::LineCheck(intercept_t *in)
lastceilingportalheight = fc; lastceilingportalheight = fc;
if (TraceCallback != NULL) if (TraceCallback != NULL)
{ {
// Todo: calculate the intersection point.
Results->HitType = TRACE_CrossingPortal; Results->HitType = TRACE_CrossingPortal;
double hitz = CurSector->SkyBoxes[sector_t::ceiling]->specialf1;
Results->HitPos = Start + Vec * (hitz - Start.Z) / Vec.Z;
Results->SrcFromTarget = Results->HitPos + CurSector->SkyBoxes[sector_t::ceiling]->Scale;
Results->HitVector = Vec;
TraceCallback(*Results, TraceCallbackData); TraceCallback(*Results, TraceCallbackData);
} }
} }

View file

@ -294,7 +294,7 @@ void P_ClearUDMFKeys()
} }
} }
static int STACK_ARGS udmfcmp(const void *a, const void *b) static int udmfcmp(const void *a, const void *b)
{ {
FUDMFKey *A = (FUDMFKey*)a; FUDMFKey *A = (FUDMFKey*)a;
FUDMFKey *B = (FUDMFKey*)b; FUDMFKey *B = (FUDMFKey*)b;

View file

@ -540,7 +540,7 @@ void PClassPlayerPawn::DeriveData(PClass *newclass)
} }
} }
static int STACK_ARGS intcmp(const void *a, const void *b) static int intcmp(const void *a, const void *b)
{ {
return *(const int *)a - *(const int *)b; return *(const int *)a - *(const int *)b;
} }

View file

@ -1469,7 +1469,7 @@ static void IterFindPolySides (FPolyObj *po, side_t *side)
// //
//========================================================================== //==========================================================================
static int STACK_ARGS posicmp(const void *a, const void *b) static int posicmp(const void *a, const void *b)
{ {
return (*(const side_t **)a)->linedef->args[1] - (*(const side_t **)b)->linedef->args[1]; return (*(const side_t **)a)->linedef->args[1] - (*(const side_t **)b)->linedef->args[1];
} }

View file

@ -128,7 +128,7 @@ void I_Quit()
extern FILE* Logfile; extern FILE* Logfile;
bool gameisdead; bool gameisdead;
void STACK_ARGS I_FatalError(const char* const error, ...) void I_FatalError(const char* const error, ...)
{ {
static bool alreadyThrown = false; static bool alreadyThrown = false;
gameisdead = true; gameisdead = true;
@ -165,7 +165,7 @@ void STACK_ARGS I_FatalError(const char* const error, ...)
} }
} }
void STACK_ARGS I_Error(const char* const error, ...) void I_Error(const char* const error, ...)
{ {
va_list argptr; va_list argptr;
char errortext[MAX_ERRORTEXT]; char errortext[MAX_ERRORTEXT];

View file

@ -104,8 +104,8 @@ void I_Quit (void);
void I_Tactile (int on, int off, int total); void I_Tactile (int on, int off, int total);
void STACK_ARGS I_Error (const char *error, ...) GCCPRINTF(1,2); void I_Error (const char *error, ...) GCCPRINTF(1,2);
void STACK_ARGS I_FatalError (const char *error, ...) GCCPRINTF(1,2); void I_FatalError (const char *error, ...) GCCPRINTF(1,2);
void addterm (void (*func)(void), const char *name); void addterm (void (*func)(void), const char *name);
#define atterm(t) addterm (t, #t) #define atterm(t) addterm (t, #t)

View file

@ -129,7 +129,7 @@ void popterm ()
NumTerms--; NumTerms--;
} }
void STACK_ARGS call_terms () void call_terms ()
{ {
while (NumTerms > 0) while (NumTerms > 0)
{ {
@ -138,7 +138,7 @@ void STACK_ARGS call_terms ()
} }
} }
static void STACK_ARGS NewFailure () static void NewFailure ()
{ {
I_FatalError ("Failed to allocate memory from system heap"); I_FatalError ("Failed to allocate memory from system heap");
} }

View file

@ -179,7 +179,7 @@ bool gameisdead;
void Mac_I_FatalError(const char* errortext); void Mac_I_FatalError(const char* errortext);
#endif #endif
void STACK_ARGS I_FatalError (const char *error, ...) void I_FatalError (const char *error, ...)
{ {
static bool alreadyThrown = false; static bool alreadyThrown = false;
gameisdead = true; gameisdead = true;
@ -216,7 +216,7 @@ void STACK_ARGS I_FatalError (const char *error, ...)
} }
} }
void STACK_ARGS I_Error (const char *error, ...) void I_Error (const char *error, ...)
{ {
va_list argptr; va_list argptr;
char errortext[MAX_ERRORTEXT]; char errortext[MAX_ERRORTEXT];

View file

@ -497,7 +497,7 @@ static const char *skinsoundnames[NUMSKINSOUNDS][2] =
}; };
/* /*
static int STACK_ARGS skinsorter (const void *a, const void *b) static int skinsorter (const void *a, const void *b)
{ {
return stricmp (((FPlayerSkin *)a)->name, ((FPlayerSkin *)b)->name); return stricmp (((FPlayerSkin *)a)->name, ((FPlayerSkin *)b)->name);
} }

View file

@ -80,7 +80,7 @@ void (*R_DrawSpanTranslucent)(void);
void (*R_DrawSpanMaskedTranslucent)(void); void (*R_DrawSpanMaskedTranslucent)(void);
void (*R_DrawSpanAddClamp)(void); void (*R_DrawSpanAddClamp)(void);
void (*R_DrawSpanMaskedAddClamp)(void); void (*R_DrawSpanMaskedAddClamp)(void);
void (STACK_ARGS *rt_map4cols)(int,int,int); void (*rt_map4cols)(int,int,int);
// //
// R_DrawColumn // R_DrawColumn
@ -984,7 +984,7 @@ int dscount;
#ifdef X86_ASM #ifdef X86_ASM
extern "C" void R_SetSpanSource_ASM (const BYTE *flat); extern "C" void R_SetSpanSource_ASM (const BYTE *flat);
extern "C" void STACK_ARGS R_SetSpanSize_ASM (int xbits, int ybits); extern "C" void R_SetSpanSize_ASM (int xbits, int ybits);
extern "C" void R_SetSpanColormap_ASM (BYTE *colormap); extern "C" void R_SetSpanColormap_ASM (BYTE *colormap);
extern "C" BYTE *ds_curcolormap, *ds_cursource, *ds_curtiltedsource; extern "C" BYTE *ds_curcolormap, *ds_cursource, *ds_curtiltedsource;
#endif #endif
@ -1493,7 +1493,7 @@ extern "C" void R_SetupDrawSlabC(const BYTE *colormap)
slabcolormap = colormap; slabcolormap = colormap;
} }
extern "C" void STACK_ARGS R_DrawSlabC(int dx, fixed_t v, int dy, fixed_t vi, const BYTE *vptr, BYTE *p) extern "C" void R_DrawSlabC(int dx, fixed_t v, int dy, fixed_t vi, const BYTE *vptr, BYTE *p)
{ {
int x; int x;
const BYTE *colormap = slabcolormap; const BYTE *colormap = slabcolormap;
@ -1574,53 +1574,53 @@ extern "C" void STACK_ARGS R_DrawSlabC(int dx, fixed_t v, int dy, fixed_t vi, co
// wallscan stuff, in C // wallscan stuff, in C
#ifndef X86_ASM #ifndef X86_ASM
static DWORD STACK_ARGS vlinec1 (); static DWORD vlinec1 ();
static int vlinebits; static int vlinebits;
DWORD (STACK_ARGS *dovline1)() = vlinec1; DWORD (*dovline1)() = vlinec1;
DWORD (STACK_ARGS *doprevline1)() = vlinec1; DWORD (*doprevline1)() = vlinec1;
#ifdef X64_ASM #ifdef X64_ASM
extern "C" void vlinetallasm4(); extern "C" void vlinetallasm4();
#define dovline4 vlinetallasm4 #define dovline4 vlinetallasm4
extern "C" void setupvlinetallasm (int); extern "C" void setupvlinetallasm (int);
#else #else
static void STACK_ARGS vlinec4 (); static void vlinec4 ();
void (STACK_ARGS *dovline4)() = vlinec4; void (*dovline4)() = vlinec4;
#endif #endif
static DWORD STACK_ARGS mvlinec1(); static DWORD mvlinec1();
static void STACK_ARGS mvlinec4(); static void mvlinec4();
static int mvlinebits; static int mvlinebits;
DWORD (STACK_ARGS *domvline1)() = mvlinec1; DWORD (*domvline1)() = mvlinec1;
void (STACK_ARGS *domvline4)() = mvlinec4; void (*domvline4)() = mvlinec4;
#else #else
extern "C" extern "C"
{ {
DWORD STACK_ARGS vlineasm1 (); DWORD vlineasm1 ();
DWORD STACK_ARGS prevlineasm1 (); DWORD prevlineasm1 ();
DWORD STACK_ARGS vlinetallasm1 (); DWORD vlinetallasm1 ();
DWORD STACK_ARGS prevlinetallasm1 (); DWORD prevlinetallasm1 ();
void STACK_ARGS vlineasm4 (); void vlineasm4 ();
void STACK_ARGS vlinetallasmathlon4 (); void vlinetallasmathlon4 ();
void STACK_ARGS vlinetallasm4 (); void vlinetallasm4 ();
void STACK_ARGS setupvlineasm (int); void setupvlineasm (int);
void STACK_ARGS setupvlinetallasm (int); void setupvlinetallasm (int);
DWORD STACK_ARGS mvlineasm1(); DWORD mvlineasm1();
void STACK_ARGS mvlineasm4(); void mvlineasm4();
void STACK_ARGS setupmvlineasm (int); void setupmvlineasm (int);
} }
DWORD (STACK_ARGS *dovline1)() = vlinetallasm1; DWORD (*dovline1)() = vlinetallasm1;
DWORD (STACK_ARGS *doprevline1)() = prevlinetallasm1; DWORD (*doprevline1)() = prevlinetallasm1;
void (STACK_ARGS *dovline4)() = vlinetallasm4; void (*dovline4)() = vlinetallasm4;
DWORD (STACK_ARGS *domvline1)() = mvlineasm1; DWORD (*domvline1)() = mvlineasm1;
void (STACK_ARGS *domvline4)() = mvlineasm4; void (*domvline4)() = mvlineasm4;
#endif #endif
void setupvline (int fracbits) void setupvline (int fracbits)
@ -1660,7 +1660,7 @@ void setupvline (int fracbits)
} }
#if !defined(X86_ASM) #if !defined(X86_ASM)
DWORD STACK_ARGS vlinec1 () DWORD vlinec1 ()
{ {
DWORD fracstep = dc_iscale; DWORD fracstep = dc_iscale;
DWORD frac = dc_texturefrac; DWORD frac = dc_texturefrac;
@ -1681,7 +1681,7 @@ DWORD STACK_ARGS vlinec1 ()
return frac; return frac;
} }
void STACK_ARGS vlinec4 () void vlinec4 ()
{ {
BYTE *dest = dc_dest; BYTE *dest = dc_dest;
int count = dc_count; int count = dc_count;
@ -1711,7 +1711,7 @@ void setupmvline (int fracbits)
} }
#if !defined(X86_ASM) #if !defined(X86_ASM)
DWORD STACK_ARGS mvlinec1 () DWORD mvlinec1 ()
{ {
DWORD fracstep = dc_iscale; DWORD fracstep = dc_iscale;
DWORD frac = dc_texturefrac; DWORD frac = dc_texturefrac;
@ -1736,7 +1736,7 @@ DWORD STACK_ARGS mvlinec1 ()
return frac; return frac;
} }
void STACK_ARGS mvlinec4 () void mvlinec4 ()
{ {
BYTE *dest = dc_dest; BYTE *dest = dc_dest;
int count = dc_count; int count = dc_count;

View file

@ -65,18 +65,18 @@ extern "C" unsigned int horizspans[4];
// Hook in assembler or system specific BLT here. // Hook in assembler or system specific BLT here.
extern void (*R_DrawColumn)(void); extern void (*R_DrawColumn)(void);
extern DWORD (STACK_ARGS *dovline1) (); extern DWORD (*dovline1) ();
extern DWORD (STACK_ARGS *doprevline1) (); extern DWORD (*doprevline1) ();
#ifdef X64_ASM #ifdef X64_ASM
#define dovline4 vlinetallasm4 #define dovline4 vlinetallasm4
extern "C" void vlinetallasm4(); extern "C" void vlinetallasm4();
#else #else
extern void (STACK_ARGS *dovline4) (); extern void (*dovline4) ();
#endif #endif
extern void setupvline (int); extern void setupvline (int);
extern DWORD (STACK_ARGS *domvline1) (); extern DWORD (*domvline1) ();
extern void (STACK_ARGS *domvline4) (); extern void (*domvline4) ();
extern void setupmvline (int); extern void setupmvline (int);
extern void setuptmvline (int); extern void setuptmvline (int);
@ -123,11 +123,11 @@ void R_InitColumnDrawers ();
extern "C" extern "C"
{ {
void rt_copy1col_c (int hx, int sx, int yl, int yh); void rt_copy1col_c (int hx, int sx, int yl, int yh);
void STACK_ARGS rt_copy4cols_c (int sx, int yl, int yh); void rt_copy4cols_c (int sx, int yl, int yh);
void rt_shaded1col (int hx, int sx, int yl, int yh); void rt_shaded1col (int hx, int sx, int yl, int yh);
void STACK_ARGS rt_shaded4cols_c (int sx, int yl, int yh); void rt_shaded4cols_c (int sx, int yl, int yh);
void STACK_ARGS rt_shaded4cols_asm (int sx, int yl, int yh); void rt_shaded4cols_asm (int sx, int yl, int yh);
void rt_map1col_c (int hx, int sx, int yl, int yh); void rt_map1col_c (int hx, int sx, int yl, int yh);
void rt_add1col (int hx, int sx, int yl, int yh); void rt_add1col (int hx, int sx, int yl, int yh);
@ -141,29 +141,29 @@ void rt_tlateaddclamp1col (int hx, int sx, int yl, int yh);
void rt_tlatesubclamp1col (int hx, int sx, int yl, int yh); void rt_tlatesubclamp1col (int hx, int sx, int yl, int yh);
void rt_tlaterevsubclamp1col (int hx, int sx, int yl, int yh); void rt_tlaterevsubclamp1col (int hx, int sx, int yl, int yh);
void STACK_ARGS rt_map4cols_c (int sx, int yl, int yh); void rt_map4cols_c (int sx, int yl, int yh);
void STACK_ARGS rt_add4cols_c (int sx, int yl, int yh); void rt_add4cols_c (int sx, int yl, int yh);
void STACK_ARGS rt_addclamp4cols_c (int sx, int yl, int yh); void rt_addclamp4cols_c (int sx, int yl, int yh);
void STACK_ARGS rt_subclamp4cols (int sx, int yl, int yh); void rt_subclamp4cols (int sx, int yl, int yh);
void STACK_ARGS rt_revsubclamp4cols (int sx, int yl, int yh); void rt_revsubclamp4cols (int sx, int yl, int yh);
void STACK_ARGS rt_tlate4cols (int sx, int yl, int yh); void rt_tlate4cols (int sx, int yl, int yh);
void STACK_ARGS rt_tlateadd4cols (int sx, int yl, int yh); void rt_tlateadd4cols (int sx, int yl, int yh);
void STACK_ARGS rt_tlateaddclamp4cols (int sx, int yl, int yh); void rt_tlateaddclamp4cols (int sx, int yl, int yh);
void STACK_ARGS rt_tlatesubclamp4cols (int sx, int yl, int yh); void rt_tlatesubclamp4cols (int sx, int yl, int yh);
void STACK_ARGS rt_tlaterevsubclamp4cols (int sx, int yl, int yh); void rt_tlaterevsubclamp4cols (int sx, int yl, int yh);
void rt_copy1col_asm (int hx, int sx, int yl, int yh); void rt_copy1col_asm (int hx, int sx, int yl, int yh);
void rt_map1col_asm (int hx, int sx, int yl, int yh); void rt_map1col_asm (int hx, int sx, int yl, int yh);
void STACK_ARGS rt_copy4cols_asm (int sx, int yl, int yh); void rt_copy4cols_asm (int sx, int yl, int yh);
void STACK_ARGS rt_map4cols_asm1 (int sx, int yl, int yh); void rt_map4cols_asm1 (int sx, int yl, int yh);
void STACK_ARGS rt_map4cols_asm2 (int sx, int yl, int yh); void rt_map4cols_asm2 (int sx, int yl, int yh);
void STACK_ARGS rt_add4cols_asm (int sx, int yl, int yh); void rt_add4cols_asm (int sx, int yl, int yh);
void STACK_ARGS rt_addclamp4cols_asm (int sx, int yl, int yh); void rt_addclamp4cols_asm (int sx, int yl, int yh);
} }
extern void (STACK_ARGS *rt_map4cols)(int sx, int yl, int yh); extern void (*rt_map4cols)(int sx, int yl, int yh);
#ifdef X86_ASM #ifdef X86_ASM
#define rt_copy1col rt_copy1col_asm #define rt_copy1col rt_copy1col_asm
@ -231,7 +231,7 @@ void R_FillSpan (void);
#endif #endif
extern "C" void R_SetupDrawSlab(const BYTE *colormap); extern "C" void R_SetupDrawSlab(const BYTE *colormap);
extern "C" void STACK_ARGS R_DrawSlab(int dx, fixed_t v, int dy, fixed_t vi, const BYTE *vptr, BYTE *p); extern "C" void R_DrawSlab(int dx, fixed_t v, int dy, fixed_t vi, const BYTE *vptr, BYTE *p);
extern "C" int ds_y; extern "C" int ds_y;
extern "C" int ds_x1; extern "C" int ds_x1;

View file

@ -112,7 +112,7 @@ void rt_copy1col_c (int hx, int sx, int yl, int yh)
} }
// Copies all four spans to the screen starting at sx. // Copies all four spans to the screen starting at sx.
void STACK_ARGS rt_copy4cols_c (int sx, int yl, int yh) void rt_copy4cols_c (int sx, int yl, int yh)
{ {
int *source; int *source;
int *dest; int *dest;
@ -180,7 +180,7 @@ void rt_map1col_c (int hx, int sx, int yl, int yh)
} }
// Maps all four spans to the screen starting at sx. // Maps all four spans to the screen starting at sx.
void STACK_ARGS rt_map4cols_c (int sx, int yl, int yh) void rt_map4cols_c (int sx, int yl, int yh)
{ {
BYTE *colormap; BYTE *colormap;
BYTE *source; BYTE *source;
@ -320,7 +320,7 @@ void rt_tlate1col (int hx, int sx, int yl, int yh)
} }
// Translates all four spans to the screen starting at sx. // Translates all four spans to the screen starting at sx.
void STACK_ARGS rt_tlate4cols (int sx, int yl, int yh) void rt_tlate4cols (int sx, int yl, int yh)
{ {
rt_Translate4cols(dc_translation, yl, yh); rt_Translate4cols(dc_translation, yl, yh);
rt_map4cols(sx, yl, yh); rt_map4cols(sx, yl, yh);
@ -361,7 +361,7 @@ void rt_add1col (int hx, int sx, int yl, int yh)
} }
// Adds all four spans to the screen starting at sx without clamping. // Adds all four spans to the screen starting at sx without clamping.
void STACK_ARGS rt_add4cols_c (int sx, int yl, int yh) void rt_add4cols_c (int sx, int yl, int yh)
{ {
BYTE *colormap; BYTE *colormap;
BYTE *source; BYTE *source;
@ -424,7 +424,7 @@ void rt_tlateadd1col (int hx, int sx, int yl, int yh)
} }
// Translates and adds all four spans to the screen starting at sx without clamping. // Translates and adds all four spans to the screen starting at sx without clamping.
void STACK_ARGS rt_tlateadd4cols (int sx, int yl, int yh) void rt_tlateadd4cols (int sx, int yl, int yh)
{ {
rt_Translate4cols(dc_translation, yl, yh); rt_Translate4cols(dc_translation, yl, yh);
rt_add4cols(sx, yl, yh); rt_add4cols(sx, yl, yh);
@ -462,7 +462,7 @@ void rt_shaded1col (int hx, int sx, int yl, int yh)
} }
// Shades all four spans to the screen starting at sx. // Shades all four spans to the screen starting at sx.
void STACK_ARGS rt_shaded4cols_c (int sx, int yl, int yh) void rt_shaded4cols_c (int sx, int yl, int yh)
{ {
DWORD *fgstart; DWORD *fgstart;
BYTE *colormap; BYTE *colormap;
@ -543,7 +543,7 @@ void rt_addclamp1col (int hx, int sx, int yl, int yh)
} }
// Adds all four spans to the screen starting at sx with clamping. // Adds all four spans to the screen starting at sx with clamping.
void STACK_ARGS rt_addclamp4cols_c (int sx, int yl, int yh) void rt_addclamp4cols_c (int sx, int yl, int yh)
{ {
BYTE *colormap; BYTE *colormap;
BYTE *source; BYTE *source;
@ -614,7 +614,7 @@ void rt_tlateaddclamp1col (int hx, int sx, int yl, int yh)
} }
// Translates and adds all four spans to the screen starting at sx with clamping. // Translates and adds all four spans to the screen starting at sx with clamping.
void STACK_ARGS rt_tlateaddclamp4cols (int sx, int yl, int yh) void rt_tlateaddclamp4cols (int sx, int yl, int yh)
{ {
rt_Translate4cols(dc_translation, yl, yh); rt_Translate4cols(dc_translation, yl, yh);
rt_addclamp4cols(sx, yl, yh); rt_addclamp4cols(sx, yl, yh);
@ -656,7 +656,7 @@ void rt_subclamp1col (int hx, int sx, int yl, int yh)
} }
// Subtracts all four spans to the screen starting at sx with clamping. // Subtracts all four spans to the screen starting at sx with clamping.
void STACK_ARGS rt_subclamp4cols (int sx, int yl, int yh) void rt_subclamp4cols (int sx, int yl, int yh)
{ {
BYTE *colormap; BYTE *colormap;
BYTE *source; BYTE *source;
@ -723,7 +723,7 @@ void rt_tlatesubclamp1col (int hx, int sx, int yl, int yh)
} }
// Translates and subtracts all four spans to the screen starting at sx with clamping. // Translates and subtracts all four spans to the screen starting at sx with clamping.
void STACK_ARGS rt_tlatesubclamp4cols (int sx, int yl, int yh) void rt_tlatesubclamp4cols (int sx, int yl, int yh)
{ {
rt_Translate4cols(dc_translation, yl, yh); rt_Translate4cols(dc_translation, yl, yh);
rt_subclamp4cols(sx, yl, yh); rt_subclamp4cols(sx, yl, yh);
@ -765,7 +765,7 @@ void rt_revsubclamp1col (int hx, int sx, int yl, int yh)
} }
// Subtracts all four spans from the screen starting at sx with clamping. // Subtracts all four spans from the screen starting at sx with clamping.
void STACK_ARGS rt_revsubclamp4cols (int sx, int yl, int yh) void rt_revsubclamp4cols (int sx, int yl, int yh)
{ {
BYTE *colormap; BYTE *colormap;
BYTE *source; BYTE *source;
@ -832,7 +832,7 @@ void rt_tlaterevsubclamp1col (int hx, int sx, int yl, int yh)
} }
// Translates and subtracts all four spans from the screen starting at sx with clamping. // Translates and subtracts all four spans from the screen starting at sx with clamping.
void STACK_ARGS rt_tlaterevsubclamp4cols (int sx, int yl, int yh) void rt_tlaterevsubclamp4cols (int sx, int yl, int yh)
{ {
rt_Translate4cols(dc_translation, yl, yh); rt_Translate4cols(dc_translation, yl, yh);
rt_revsubclamp4cols(sx, yl, yh); rt_revsubclamp4cols(sx, yl, yh);

View file

@ -158,7 +158,7 @@ void (*spanfunc) (void);
void (*hcolfunc_pre) (void); void (*hcolfunc_pre) (void);
void (*hcolfunc_post1) (int hx, int sx, int yl, int yh); void (*hcolfunc_post1) (int hx, int sx, int yl, int yh);
void (*hcolfunc_post2) (int hx, int sx, int yl, int yh); void (*hcolfunc_post2) (int hx, int sx, int yl, int yh);
void (STACK_ARGS *hcolfunc_post4) (int sx, int yl, int yh); void (*hcolfunc_post4) (int sx, int yl, int yh);
cycle_t WallCycles, PlaneCycles, MaskedCycles, WallScanCycles; cycle_t WallCycles, PlaneCycles, MaskedCycles, WallScanCycles;

View file

@ -117,7 +117,7 @@ extern void (*spanfunc) (void);
extern void (*hcolfunc_pre) (void); extern void (*hcolfunc_pre) (void);
extern void (*hcolfunc_post1) (int hx, int sx, int yl, int yh); extern void (*hcolfunc_post1) (int hx, int sx, int yl, int yh);
extern void (*hcolfunc_post2) (int hx, int sx, int yl, int yh); extern void (*hcolfunc_post2) (int hx, int sx, int yl, int yh);
extern void (STACK_ARGS *hcolfunc_post4) (int sx, int yl, int yh); extern void (*hcolfunc_post4) (int sx, int yl, int yh);
void R_InitTextureMapping (); void R_InitTextureMapping ();

View file

@ -148,7 +148,7 @@ static DWORD basexfrac, baseyfrac;
#ifdef X86_ASM #ifdef X86_ASM
extern "C" void R_SetSpanSource_ASM (const BYTE *flat); extern "C" void R_SetSpanSource_ASM (const BYTE *flat);
extern "C" void STACK_ARGS R_SetSpanSize_ASM (int xbits, int ybits); extern "C" void R_SetSpanSize_ASM (int xbits, int ybits);
extern "C" void R_SetSpanColormap_ASM (BYTE *colormap); extern "C" void R_SetSpanColormap_ASM (BYTE *colormap);
extern "C" void R_SetTiltedSpanSource_ASM (const BYTE *flat); extern "C" void R_SetTiltedSpanSource_ASM (const BYTE *flat);
extern "C" BYTE *ds_curcolormap, *ds_cursource, *ds_curtiltedsource; extern "C" BYTE *ds_curcolormap, *ds_cursource, *ds_curtiltedsource;
@ -253,7 +253,7 @@ void R_MapPlane (int y, int x1)
//========================================================================== //==========================================================================
extern "C" { extern "C" {
void STACK_ARGS R_CalcTiltedLighting (fixed_t lval, fixed_t lend, int width) void R_CalcTiltedLighting (fixed_t lval, fixed_t lend, int width)
{ {
fixed_t lstep; fixed_t lstep;
BYTE *lightfiller; BYTE *lightfiller;

View file

@ -1709,13 +1709,13 @@ static drawseg_t **drawsegsorter;
static int drawsegsortersize = 0; static int drawsegsortersize = 0;
// Sort vissprites by leftmost column, left to right // Sort vissprites by leftmost column, left to right
static int STACK_ARGS sv_comparex (const void *arg1, const void *arg2) static int sv_comparex (const void *arg1, const void *arg2)
{ {
return (*(vissprite_t **)arg2)->x1 - (*(vissprite_t **)arg1)->x1; return (*(vissprite_t **)arg2)->x1 - (*(vissprite_t **)arg1)->x1;
} }
// Sort drawsegs by rightmost column, left to right // Sort drawsegs by rightmost column, left to right
static int STACK_ARGS sd_comparex (const void *arg1, const void *arg2) static int sd_comparex (const void *arg1, const void *arg2)
{ {
return (*(drawseg_t **)arg2)->x2 - (*(drawseg_t **)arg1)->x2; return (*(drawseg_t **)arg2)->x2 - (*(drawseg_t **)arg1)->x2;
} }

View file

@ -116,7 +116,7 @@ void R_DrawMaskedColumn (const BYTE *column, const FTexture::Span *spans);
void R_WallSpriteColumn (void (*drawfunc)(const BYTE *column, const FTexture::Span *spans)); void R_WallSpriteColumn (void (*drawfunc)(const BYTE *column, const FTexture::Span *spans));
void R_CacheSprite (spritedef_t *sprite); void R_CacheSprite (spritedef_t *sprite);
void R_SortVisSprites (int (STACK_ARGS *compare)(const void *, const void *), size_t first); void R_SortVisSprites (int (*compare)(const void *, const void *), size_t first);
void R_AddSprites (sector_t *sec, int lightlevel, int fakeside); void R_AddSprites (sector_t *sec, int lightlevel, int fakeside);
void R_AddPSprites (); void R_AddPSprites ();
void R_DrawSprites (); void R_DrawSprites ();

View file

@ -135,7 +135,7 @@ unsigned int FZipExploder::InitTable(TArray<HuffNode> &decoder, int numspots)
return start; return start;
} }
int STACK_ARGS FZipExploder::buildercmp(const void *a, const void *b) int FZipExploder::buildercmp(const void *a, const void *b)
{ {
const TableBuilder *v1 = (const TableBuilder *)a; const TableBuilder *v1 = (const TableBuilder *)a;
const TableBuilder *v2 = (const TableBuilder *)b; const TableBuilder *v2 = (const TableBuilder *)b;

View file

@ -31,7 +31,7 @@ class FZipExploder
unsigned char ReadBuf[256]; unsigned char ReadBuf[256];
unsigned int bs, be; unsigned int bs, be;
static int STACK_ARGS buildercmp(const void *a, const void *b); static int buildercmp(const void *a, const void *b);
void InsertCode(TArray<HuffNode> &decoder, unsigned int pos, int bits, unsigned short code, int len, unsigned char value); void InsertCode(TArray<HuffNode> &decoder, unsigned int pos, int bits, unsigned short code, int len, unsigned char value);
unsigned int InitTable(TArray<HuffNode> &decoder, int numspots); unsigned int InitTable(TArray<HuffNode> &decoder, int numspots);
int BuildDecoder(TArray<HuffNode> &decoder, TableBuilder *values, int numvals); int BuildDecoder(TArray<HuffNode> &decoder, TableBuilder *values, int numvals);

View file

@ -316,7 +316,7 @@ FResourceFile::~FResourceFile()
delete Reader; delete Reader;
} }
int STACK_ARGS lumpcmp(const void * a, const void * b) int lumpcmp(const void * a, const void * b)
{ {
FResourceLump * rec1 = (FResourceLump *)a; FResourceLump * rec1 = (FResourceLump *)a;
FResourceLump * rec2 = (FResourceLump *)b; FResourceLump * rec2 = (FResourceLump *)b;

View file

@ -199,7 +199,7 @@ extern bool IsFloat (const char *str);
// PRIVATE FUNCTION PROTOTYPES --------------------------------------------- // PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
static int STACK_ARGS SortPlayerClasses (const void *a, const void *b); static int SortPlayerClasses (const void *a, const void *b);
static int S_DupPlayerSound (const char *pclass, int gender, int refid, int aliasref); static int S_DupPlayerSound (const char *pclass, int gender, int refid, int aliasref);
static void S_SavePlayerSound (const char *pclass, int gender, int refid, int lumpnum, bool alias); static void S_SavePlayerSound (const char *pclass, int gender, int refid, int lumpnum, bool alias);
static void S_RestorePlayerSounds(); static void S_RestorePlayerSounds();
@ -1627,7 +1627,7 @@ void S_ShrinkPlayerSoundLists ()
DefPlayerClass = S_FindPlayerClass (DefPlayerClassName); DefPlayerClass = S_FindPlayerClass (DefPlayerClassName);
} }
static int STACK_ARGS SortPlayerClasses (const void *a, const void *b) static int SortPlayerClasses (const void *a, const void *b)
{ {
return stricmp (((const FPlayerClassLookup *)a)->Name, return stricmp (((const FPlayerClassLookup *)a)->Name,
((const FPlayerClassLookup *)b)->Name); ((const FPlayerClassLookup *)b)->Name);

View file

@ -940,7 +940,7 @@ int FScanner::GetMessageLine()
// //
//========================================================================== //==========================================================================
void STACK_ARGS FScanner::ScriptError (const char *message, ...) void FScanner::ScriptError (const char *message, ...)
{ {
FString composed; FString composed;
@ -966,7 +966,7 @@ void STACK_ARGS FScanner::ScriptError (const char *message, ...)
// //
//========================================================================== //==========================================================================
void STACK_ARGS FScanner::ScriptMessage (const char *message, ...) void FScanner::ScriptMessage (const char *message, ...)
{ {
FString composed; FString composed;
@ -1038,7 +1038,7 @@ FScriptPosition &FScriptPosition::operator=(const FScriptPosition &other)
// //
//========================================================================== //==========================================================================
void STACK_ARGS FScriptPosition::Message (int severity, const char *message, ...) const void FScriptPosition::Message (int severity, const char *message, ...) const
{ {
FString composed; FString composed;

View file

@ -386,34 +386,34 @@ protected:
#ifdef DYN_FLUIDSYNTH #ifdef DYN_FLUIDSYNTH
enum { FLUID_FAILED = -1, FLUID_OK = 0 }; enum { FLUID_FAILED = -1, FLUID_OK = 0 };
fluid_settings_t *(STACK_ARGS *new_fluid_settings)(); fluid_settings_t *(*new_fluid_settings)();
fluid_synth_t *(STACK_ARGS *new_fluid_synth)(fluid_settings_t *); fluid_synth_t *(*new_fluid_synth)(fluid_settings_t *);
int (STACK_ARGS *delete_fluid_synth)(fluid_synth_t *); int (*delete_fluid_synth)(fluid_synth_t *);
void (STACK_ARGS *delete_fluid_settings)(fluid_settings_t *); void (*delete_fluid_settings)(fluid_settings_t *);
int (STACK_ARGS *fluid_settings_setnum)(fluid_settings_t *, const char *, double); int (*fluid_settings_setnum)(fluid_settings_t *, const char *, double);
int (STACK_ARGS *fluid_settings_setstr)(fluid_settings_t *, const char *, const char *); int (*fluid_settings_setstr)(fluid_settings_t *, const char *, const char *);
int (STACK_ARGS *fluid_settings_setint)(fluid_settings_t *, const char *, int); int (*fluid_settings_setint)(fluid_settings_t *, const char *, int);
int (STACK_ARGS *fluid_settings_getstr)(fluid_settings_t *, const char *, char **); int (*fluid_settings_getstr)(fluid_settings_t *, const char *, char **);
int (STACK_ARGS *fluid_settings_getint)(fluid_settings_t *, const char *, int *); int (*fluid_settings_getint)(fluid_settings_t *, const char *, int *);
void (STACK_ARGS *fluid_synth_set_reverb_on)(fluid_synth_t *, int); void (*fluid_synth_set_reverb_on)(fluid_synth_t *, int);
void (STACK_ARGS *fluid_synth_set_chorus_on)(fluid_synth_t *, int); void (*fluid_synth_set_chorus_on)(fluid_synth_t *, int);
int (STACK_ARGS *fluid_synth_set_interp_method)(fluid_synth_t *, int, int); int (*fluid_synth_set_interp_method)(fluid_synth_t *, int, int);
int (STACK_ARGS *fluid_synth_set_polyphony)(fluid_synth_t *, int); int (*fluid_synth_set_polyphony)(fluid_synth_t *, int);
int (STACK_ARGS *fluid_synth_get_polyphony)(fluid_synth_t *); int (*fluid_synth_get_polyphony)(fluid_synth_t *);
int (STACK_ARGS *fluid_synth_get_active_voice_count)(fluid_synth_t *); int (*fluid_synth_get_active_voice_count)(fluid_synth_t *);
double (STACK_ARGS *fluid_synth_get_cpu_load)(fluid_synth_t *); double (*fluid_synth_get_cpu_load)(fluid_synth_t *);
int (STACK_ARGS *fluid_synth_system_reset)(fluid_synth_t *); int (*fluid_synth_system_reset)(fluid_synth_t *);
int (STACK_ARGS *fluid_synth_noteon)(fluid_synth_t *, int, int, int); int (*fluid_synth_noteon)(fluid_synth_t *, int, int, int);
int (STACK_ARGS *fluid_synth_noteoff)(fluid_synth_t *, int, int); int (*fluid_synth_noteoff)(fluid_synth_t *, int, int);
int (STACK_ARGS *fluid_synth_cc)(fluid_synth_t *, int, int, int); int (*fluid_synth_cc)(fluid_synth_t *, int, int, int);
int (STACK_ARGS *fluid_synth_program_change)(fluid_synth_t *, int, int); int (*fluid_synth_program_change)(fluid_synth_t *, int, int);
int (STACK_ARGS *fluid_synth_channel_pressure)(fluid_synth_t *, int, int); int (*fluid_synth_channel_pressure)(fluid_synth_t *, int, int);
int (STACK_ARGS *fluid_synth_pitch_bend)(fluid_synth_t *, int, int); int (*fluid_synth_pitch_bend)(fluid_synth_t *, int, int);
int (STACK_ARGS *fluid_synth_write_float)(fluid_synth_t *, int, void *, int, int, void *, int, int); int (*fluid_synth_write_float)(fluid_synth_t *, int, void *, int, int, void *, int, int);
int (STACK_ARGS *fluid_synth_sfload)(fluid_synth_t *, const char *, int); int (*fluid_synth_sfload)(fluid_synth_t *, const char *, int);
void (STACK_ARGS *fluid_synth_set_reverb)(fluid_synth_t *, double, double, double, double); void (*fluid_synth_set_reverb)(fluid_synth_t *, double, double, double, double);
void (STACK_ARGS *fluid_synth_set_chorus)(fluid_synth_t *, int, double, double, double, int); void (*fluid_synth_set_chorus)(fluid_synth_t *, int, double, double, double, int);
int (STACK_ARGS *fluid_synth_sysex)(fluid_synth_t *, const char *, int, char *, int *, int *, int); int (*fluid_synth_sysex)(fluid_synth_t *, const char *, int, char *, int *, int *, int);
#ifdef _WIN32 #ifdef _WIN32
HMODULE FluidSynthDLL; HMODULE FluidSynthDLL;

View file

@ -209,7 +209,7 @@ void ReadStatistics()
// //
// ==================================================================== // ====================================================================
int STACK_ARGS compare_episode_names(const void *a, const void *b) int compare_episode_names(const void *a, const void *b)
{ {
FStatistics *A = (FStatistics*)a; FStatistics *A = (FStatistics*)a;
FStatistics *B = (FStatistics*)b; FStatistics *B = (FStatistics*)b;
@ -217,7 +217,7 @@ int STACK_ARGS compare_episode_names(const void *a, const void *b)
return strnatcasecmp(A->epi_header, B->epi_header); return strnatcasecmp(A->epi_header, B->epi_header);
} }
int STACK_ARGS compare_level_names(const void *a, const void *b) int compare_level_names(const void *a, const void *b)
{ {
FLevelStatistics *A = (FLevelStatistics*)a; FLevelStatistics *A = (FLevelStatistics*)a;
FLevelStatistics *B = (FLevelStatistics*)b; FLevelStatistics *B = (FLevelStatistics*)b;
@ -225,7 +225,7 @@ int STACK_ARGS compare_level_names(const void *a, const void *b)
return strnatcasecmp(A->name, B->name); return strnatcasecmp(A->name, B->name);
} }
int STACK_ARGS compare_dates(const void *a, const void *b) int compare_dates(const void *a, const void *b)
{ {
FLevelStatistics *A = (FLevelStatistics*)a; FLevelStatistics *A = (FLevelStatistics*)a;
FLevelStatistics *B = (FLevelStatistics*)b; FLevelStatistics *B = (FLevelStatistics*)b;

View file

@ -46,7 +46,7 @@
#include "farchive.h" #include "farchive.h"
static int STACK_ARGS SortSwitchDefs (const void *a, const void *b) static int SortSwitchDefs (const void *a, const void *b)
{ {
return (*(FSwitchDef **)a)->PreTexture - (*(FSwitchDef **)b)->PreTexture; return (*(FSwitchDef **)a)->PreTexture - (*(FSwitchDef **)b)->PreTexture;
} }

View file

@ -557,17 +557,17 @@ PFunction *FindGlobalActionFunction(const char *name)
// //
//========================================================================== //==========================================================================
static int STACK_ARGS flagcmp (const void * a, const void * b) static int flagcmp (const void * a, const void * b)
{ {
return stricmp( ((FFlagDef*)a)->name, ((FFlagDef*)b)->name); return stricmp( ((FFlagDef*)a)->name, ((FFlagDef*)b)->name);
} }
static int STACK_ARGS propcmp(const void * a, const void * b) static int propcmp(const void * a, const void * b)
{ {
return stricmp( (*(FPropertyInfo**)a)->name, (*(FPropertyInfo**)b)->name); return stricmp( (*(FPropertyInfo**)a)->name, (*(FPropertyInfo**)b)->name);
} }
static int STACK_ARGS funccmp(const void * a, const void * b) static int funccmp(const void * a, const void * b)
{ {
return stricmp( ((AFuncDesc*)a)->Name, ((AFuncDesc*)b)->Name); return stricmp( ((AFuncDesc*)a)->Name, ((AFuncDesc*)b)->Name);
} }

View file

@ -106,7 +106,7 @@ static int PalFromRGB(uint32 rgb)
return LastPal; return LastPal;
} }
void STACK_ARGS DCanvas::DrawTexture (FTexture *img, double x, double y, int tags_first, ...) void DCanvas::DrawTexture (FTexture *img, double x, double y, int tags_first, ...)
{ {
va_list tags; va_list tags;
va_start(tags, tags_first); va_start(tags, tags_first);

View file

@ -134,7 +134,7 @@ protected:
void LoadBMF (int lump, const BYTE *data); void LoadBMF (int lump, const BYTE *data);
void CreateFontFromPic (FTextureID picnum); void CreateFontFromPic (FTextureID picnum);
static int STACK_ARGS BMFCompare(const void *a, const void *b); static int BMFCompare(const void *a, const void *b);
enum enum
{ {
@ -231,7 +231,7 @@ struct TempColorInfo
// PRIVATE FUNCTION PROTOTYPES --------------------------------------------- // PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
static int STACK_ARGS TranslationMapCompare (const void *a, const void *b); static int TranslationMapCompare (const void *a, const void *b);
// EXTERNAL DATA DECLARATIONS ---------------------------------------------- // EXTERNAL DATA DECLARATIONS ----------------------------------------------
@ -594,7 +594,7 @@ void RecordTextureColors (FTexture *pic, BYTE *usedcolors)
// //
//========================================================================== //==========================================================================
static int STACK_ARGS compare (const void *arg1, const void *arg2) static int compare (const void *arg1, const void *arg2)
{ {
if (RPART(GPalette.BaseColors[*((BYTE *)arg1)]) * 299 + if (RPART(GPalette.BaseColors[*((BYTE *)arg1)]) * 299 +
GPART(GPalette.BaseColors[*((BYTE *)arg1)]) * 587 + GPART(GPalette.BaseColors[*((BYTE *)arg1)]) * 587 +
@ -1360,7 +1360,7 @@ void FSingleLumpFont::LoadBMF(int lump, const BYTE *data)
// //
//========================================================================== //==========================================================================
int STACK_ARGS FSingleLumpFont::BMFCompare(const void *a, const void *b) int FSingleLumpFont::BMFCompare(const void *a, const void *b)
{ {
const PalEntry *pa = (const PalEntry *)a; const PalEntry *pa = (const PalEntry *)a;
const PalEntry *pb = (const PalEntry *)b; const PalEntry *pb = (const PalEntry *)b;
@ -2474,7 +2474,7 @@ void V_InitFontColors ()
// //
//========================================================================== //==========================================================================
static int STACK_ARGS TranslationMapCompare (const void *a, const void *b) static int TranslationMapCompare (const void *a, const void *b)
{ {
return int(((const TranslationMap *)a)->Name) - int(((const TranslationMap *)b)->Name); return int(((const TranslationMap *)a)->Name) - int(((const TranslationMap *)b)->Name);
} }

View file

@ -64,8 +64,8 @@ FColorMatcher ColorMatcher;
/* Current color blending values */ /* Current color blending values */
int BlendR, BlendG, BlendB, BlendA; int BlendR, BlendG, BlendB, BlendA;
static int STACK_ARGS sortforremap (const void *a, const void *b); static int sortforremap (const void *a, const void *b);
static int STACK_ARGS sortforremap2 (const void *a, const void *b); static int sortforremap2 (const void *a, const void *b);
/**************************/ /**************************/
/* Gamma correction stuff */ /* Gamma correction stuff */
@ -222,7 +222,7 @@ void FPalette::MakeGoodRemap ()
// 256 entries are different. :-) // 256 entries are different. :-)
} }
static int STACK_ARGS sortforremap (const void *a, const void *b) static int sortforremap (const void *a, const void *b)
{ {
return (*(const DWORD *)a & 0xFFFFFF) - (*(const DWORD *)b & 0xFFFFFF); return (*(const DWORD *)a & 0xFFFFFF) - (*(const DWORD *)b & 0xFFFFFF);
} }
@ -298,7 +298,7 @@ void FPalette::MakeRemap (const DWORD *colors, BYTE *remap, const BYTE *useful,
} }
} }
static int STACK_ARGS sortforremap2 (const void *a, const void *b) static int sortforremap2 (const void *a, const void *b)
{ {
const RemappingWork *ap = (const RemappingWork *)a; const RemappingWork *ap = (const RemappingWork *)a;
const RemappingWork *bp = (const RemappingWork *)b; const RemappingWork *bp = (const RemappingWork *)b;
@ -384,7 +384,7 @@ void InitPalette ()
R_InitColormaps (); R_InitColormaps ();
} }
extern "C" void STACK_ARGS DoBlending_MMX (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a); extern "C" void DoBlending_MMX (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
extern void DoBlending_SSE2 (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a); extern void DoBlending_SSE2 (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a) void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a)

View file

@ -52,7 +52,7 @@
// //
// Write a single character using the given font // Write a single character using the given font
// //
void STACK_ARGS DCanvas::DrawChar (FFont *font, int normalcolor, int x, int y, BYTE character, int tag_first, ...) void DCanvas::DrawChar (FFont *font, int normalcolor, int x, int y, BYTE character, int tag_first, ...)
{ {
if (font == NULL) if (font == NULL)
return; return;
@ -84,7 +84,7 @@ void STACK_ARGS DCanvas::DrawChar (FFont *font, int normalcolor, int x, int y, B
// //
// Write a string using the given font // Write a string using the given font
// //
void STACK_ARGS DCanvas::DrawText(FFont *font, int normalcolor, int x, int y, const char *string, int tag_first, ...) void DCanvas::DrawText(FFont *font, int normalcolor, int x, int y, const char *string, int tag_first, ...)
{ {
int w; int w;
const BYTE *ch; const BYTE *ch;

View file

@ -246,7 +246,7 @@ public:
// 2D Texture drawing // 2D Texture drawing
bool SetTextureParms(DrawParms *parms, FTexture *img, double x, double y) const; bool SetTextureParms(DrawParms *parms, FTexture *img, double x, double y) const;
void STACK_ARGS DrawTexture (FTexture *img, double x, double y, int tags, ...); void DrawTexture (FTexture *img, double x, double y, int tags, ...);
void FillBorder (FTexture *img); // Fills the border around a 4:3 part of the screen on non-4:3 displays void FillBorder (FTexture *img); // Fills the border around a 4:3 part of the screen on non-4:3 displays
void VirtualToRealCoords(double &x, double &y, double &w, double &h, double vwidth, double vheight, bool vbottom=false, bool handleaspect=true) const; void VirtualToRealCoords(double &x, double &y, double &w, double &h, double vwidth, double vheight, bool vbottom=false, bool handleaspect=true) const;
@ -258,8 +258,8 @@ public:
#undef DrawText // See WinUser.h for the definition of DrawText as a macro #undef DrawText // See WinUser.h for the definition of DrawText as a macro
#endif #endif
// 2D Text drawing // 2D Text drawing
void STACK_ARGS DrawText (FFont *font, int normalcolor, int x, int y, const char *string, int tag_first, ...); void DrawText (FFont *font, int normalcolor, int x, int y, const char *string, int tag_first, ...);
void STACK_ARGS DrawChar (FFont *font, int normalcolor, int x, int y, BYTE character, int tag_first, ...); void DrawChar (FFont *font, int normalcolor, int x, int y, BYTE character, int tag_first, ...);
protected: protected:
BYTE *Buffer; BYTE *Buffer;

View file

@ -227,7 +227,7 @@ protected:
FDInputJoystick *EnumDevices(); FDInputJoystick *EnumDevices();
static BOOL CALLBACK EnumCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef); static BOOL CALLBACK EnumCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef);
static int STACK_ARGS NameSort(const void *a, const void *b); static int NameSort(const void *a, const void *b);
static bool IsXInputDevice(const GUID *guid); static bool IsXInputDevice(const GUID *guid);
static bool IsXInputDeviceFast(const GUID *guid); static bool IsXInputDeviceFast(const GUID *guid);
static bool IsXInputDeviceSlow(const GUID *guid); static bool IsXInputDeviceSlow(const GUID *guid);

View file

@ -199,7 +199,7 @@ void popterm ()
// //
//========================================================================== //==========================================================================
static void STACK_ARGS call_terms (void) static void call_terms (void)
{ {
while (NumTerms > 0) while (NumTerms > 0)
{ {
@ -208,7 +208,7 @@ static void STACK_ARGS call_terms (void)
} }
#ifdef _MSC_VER #ifdef _MSC_VER
static int STACK_ARGS NewFailure (size_t size) static int NewFailure (size_t size)
{ {
I_FatalError ("Failed to allocate %d bytes from process heap", size); I_FatalError ("Failed to allocate %d bytes from process heap", size);
return 0; return 0;

View file

@ -158,7 +158,7 @@ protected:
void DoRegister(); void DoRegister();
FRawPS2Controller *EnumDevices(); FRawPS2Controller *EnumDevices();
static int STACK_ARGS DeviceSort(const void *a, const void *b); static int DeviceSort(const void *a, const void *b);
}; };
// Each entry is an offset to the corresponding data field in the // Each entry is an offset to the corresponding data field in the

View file

@ -784,7 +784,7 @@ void I_Quit()
// //
//========================================================================== //==========================================================================
void STACK_ARGS I_FatalError(const char *error, ...) void I_FatalError(const char *error, ...)
{ {
static BOOL alreadyThrown = false; static BOOL alreadyThrown = false;
gameisdead = true; gameisdead = true;
@ -824,7 +824,7 @@ void STACK_ARGS I_FatalError(const char *error, ...)
// //
//========================================================================== //==========================================================================
void STACK_ARGS I_Error(const char *error, ...) void I_Error(const char *error, ...)
{ {
va_list argptr; va_list argptr;
char errortext[MAX_ERRORTEXT]; char errortext[MAX_ERRORTEXT];

View file

@ -132,8 +132,8 @@ void I_Quit (void);
void I_Tactile (int on, int off, int total); void I_Tactile (int on, int off, int total);
void STACK_ARGS I_Error (const char *error, ...) GCCPRINTF(1,2); void I_Error (const char *error, ...) GCCPRINTF(1,2);
void STACK_ARGS I_FatalError (const char *error, ...) GCCPRINTF(1,2); void I_FatalError (const char *error, ...) GCCPRINTF(1,2);
void atterm (void (*func)(void)); void atterm (void (*func)(void));
void popterm (); void popterm ();

View file

@ -273,7 +273,7 @@ void DoBlending_MMX2(const PalEntry *from, PalEntry *to, int count, int r, int g
#endif #endif
#ifdef X86_ASM #ifdef X86_ASM
extern "C" void STACK_ARGS DoBlending_MMX(const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a); extern "C" void DoBlending_MMX(const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
#endif #endif
void DoBlending_SSE2(const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a) void DoBlending_SSE2(const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a)