mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-25 05:11:35 +00:00
origional -> original.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1173 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
46c05df0ea
commit
c5c278da85
16 changed files with 47 additions and 47 deletions
|
@ -1700,7 +1700,7 @@ int Mod_LoadHiResTexture(char *name, char *subpath, qboolean mipmap, qboolean al
|
||||||
char fname[MAX_QPATH], nicename[MAX_QPATH];
|
char fname[MAX_QPATH], nicename[MAX_QPATH];
|
||||||
|
|
||||||
static char *extensions[] = {//reverse order of preference - (match commas with optional file types)
|
static char *extensions[] = {//reverse order of preference - (match commas with optional file types)
|
||||||
".pcx", //pcxes are the origional gamedata of q2. So we don't want them to override pngs.
|
".pcx", //pcxes are the original gamedata of q2. So we don't want them to override pngs.
|
||||||
#ifdef AVAIL_JPEGLIB
|
#ifdef AVAIL_JPEGLIB
|
||||||
".jpg",
|
".jpg",
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1811,7 +1811,7 @@ void CSQC_RunThreads(void)
|
||||||
next = state->next;
|
next = state->next;
|
||||||
|
|
||||||
if (state->resumetime > ctime)
|
if (state->resumetime > ctime)
|
||||||
{ //not time yet, reform origional list.
|
{ //not time yet, reform original list.
|
||||||
state->next = csqcthreads;
|
state->next = csqcthreads;
|
||||||
csqcthreads = state;
|
csqcthreads = state;
|
||||||
}
|
}
|
||||||
|
|
|
@ -227,7 +227,7 @@ void SwapPic (qpic_t *pic)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// based on origional code by LordHavoc
|
// based on original code by LordHavoc
|
||||||
|
|
||||||
//FIXME: convert to linked list. is hunk possible?
|
//FIXME: convert to linked list. is hunk possible?
|
||||||
//hash tables?
|
//hash tables?
|
||||||
|
|
|
@ -213,7 +213,7 @@ cvar_t *Cvar_SetCore (cvar_t *var, const char *value, qboolean force)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (var->latched_string)
|
if (var->latched_string)
|
||||||
Z_Free(var->latched_string);
|
Z_Free(var->latched_string);
|
||||||
if (!strcmp(var->string, value)) //latch to the origional value? remove the latch.
|
if (!strcmp(var->string, value)) //latch to the original value? remove the latch.
|
||||||
{
|
{
|
||||||
var->latched_string = NULL;
|
var->latched_string = NULL;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -526,7 +526,7 @@ void Cvar_LockFromServer(cvar_t *var, const char *str)
|
||||||
|
|
||||||
Cvar_SetCore (var, str, true); //will use all, quote included
|
Cvar_SetCore (var, str, true); //will use all, quote included
|
||||||
|
|
||||||
var->latched_string = oldlatch; //keep track of the origional value.
|
var->latched_string = oldlatch; //keep track of the original value.
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -75,8 +75,8 @@ static XF86VidModeModeInfo **vidmodes;
|
||||||
static int num_vidmodes;
|
static int num_vidmodes;
|
||||||
static qboolean vidmode_active = false;
|
static qboolean vidmode_active = false;
|
||||||
|
|
||||||
unsigned short origionalramps[3][256];
|
unsigned short originalramps[3][256];
|
||||||
qboolean origionalapplied;
|
qboolean originalapplied;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern cvar_t _windowed_mouse;
|
extern cvar_t _windowed_mouse;
|
||||||
|
@ -440,8 +440,8 @@ static void GetEvent(void)
|
||||||
break;
|
break;
|
||||||
case FocusOut:
|
case FocusOut:
|
||||||
#ifdef WITH_VMODE
|
#ifdef WITH_VMODE
|
||||||
if (origionalapplied)
|
if (originalapplied)
|
||||||
XF86VidModeSetGammaRamp(vid_dpy, scrnum, 256, origionalramps[0], origionalramps[1], origionalramps[2]);
|
XF86VidModeSetGammaRamp(vid_dpy, scrnum, 256, originalramps[0], originalramps[1], originalramps[2]);
|
||||||
#endif
|
#endif
|
||||||
ActiveApp = false;
|
ActiveApp = false;
|
||||||
ClearAllStates();
|
ClearAllStates();
|
||||||
|
@ -486,8 +486,8 @@ printf("GLVID_Shutdown");
|
||||||
qglXDestroyContext(vid_dpy, ctx);
|
qglXDestroyContext(vid_dpy, ctx);
|
||||||
|
|
||||||
#ifdef WITH_VMODE
|
#ifdef WITH_VMODE
|
||||||
if (origionalapplied)
|
if (originalapplied)
|
||||||
XF86VidModeSetGammaRamp(vid_dpy, scrnum, 256, origionalramps[0], origionalramps[1], origionalramps[2]);
|
XF86VidModeSetGammaRamp(vid_dpy, scrnum, 256, originalramps[0], originalramps[1], originalramps[2]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (vid_window)
|
if (vid_window)
|
||||||
|
@ -564,7 +564,7 @@ void GLVID_ShiftPalette (unsigned char *palette)
|
||||||
|
|
||||||
// VID_SetPalette (palette);
|
// VID_SetPalette (palette);
|
||||||
|
|
||||||
if (origionalapplied && ActiveApp && vid_hardwaregamma.value) //this is needed because ATI drivers don't work properly (or when task-switched out).
|
if (originalapplied && ActiveApp && vid_hardwaregamma.value) //this is needed because ATI drivers don't work properly (or when task-switched out).
|
||||||
{
|
{
|
||||||
if (gammaworks)
|
if (gammaworks)
|
||||||
{ //we have hardware gamma applied - if we're doing a BF, we don't want to reset to the default gamma (yuck)
|
{ //we have hardware gamma applied - if we're doing a BF, we don't want to reset to the default gamma (yuck)
|
||||||
|
@ -825,14 +825,14 @@ qboolean GLVID_Init (rendererstate_t *info, unsigned char *palette)
|
||||||
XF86VidModeGetGammaRampSize(vid_dpy, scrnum, &rampsize);
|
XF86VidModeGetGammaRampSize(vid_dpy, scrnum, &rampsize);
|
||||||
if (rampsize != 256)
|
if (rampsize != 256)
|
||||||
{
|
{
|
||||||
origionalapplied = false;
|
originalapplied = false;
|
||||||
Con_Printf("Gamma ramps are not of 256 componants (but %i).\n", rampsize);
|
Con_Printf("Gamma ramps are not of 256 componants (but %i).\n", rampsize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
origionalapplied = XF86VidModeGetGammaRamp(vid_dpy, scrnum, 256, origionalramps[0], origionalramps[1], origionalramps[2]);
|
originalapplied = XF86VidModeGetGammaRamp(vid_dpy, scrnum, 256, originalramps[0], originalramps[1], originalramps[2]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
origionalapplied = false;
|
originalapplied = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ctx = qglXCreateContext(vid_dpy, visinfo, NULL, True);
|
ctx = qglXCreateContext(vid_dpy, visinfo, NULL, True);
|
||||||
|
|
|
@ -90,7 +90,7 @@ extern qboolean mouseactive; // from in_win.c
|
||||||
static HICON hIcon;
|
static HICON hIcon;
|
||||||
extern qboolean vid_isfullscreen;
|
extern qboolean vid_isfullscreen;
|
||||||
|
|
||||||
unsigned short origionalgammaramps[3][256];
|
unsigned short originalgammaramps[3][256];
|
||||||
|
|
||||||
#ifdef SWQUAKE
|
#ifdef SWQUAKE
|
||||||
extern
|
extern
|
||||||
|
@ -632,7 +632,7 @@ int GLVID_SetMode (rendererstate_t *info, unsigned char *palette)
|
||||||
vid.recalc_refdef = 1;
|
vid.recalc_refdef = 1;
|
||||||
|
|
||||||
maindc = GetDC(mainwindow);
|
maindc = GetDC(mainwindow);
|
||||||
GetDeviceGammaRamp(maindc, origionalgammaramps);
|
GetDeviceGammaRamp(maindc, originalgammaramps);
|
||||||
|
|
||||||
TRACE(("dbg: GLVID_SetMode: attaching gl\n"));
|
TRACE(("dbg: GLVID_SetMode: attaching gl\n"));
|
||||||
if (!VID_AttachGL(info))
|
if (!VID_AttachGL(info))
|
||||||
|
@ -953,7 +953,7 @@ void VID_SetDefaultMode (void)
|
||||||
|
|
||||||
void GLVID_Shutdown (void)
|
void GLVID_Shutdown (void)
|
||||||
{
|
{
|
||||||
SetDeviceGammaRamp(maindc, origionalgammaramps);
|
SetDeviceGammaRamp(maindc, originalgammaramps);
|
||||||
gammaworks = false;
|
gammaworks = false;
|
||||||
|
|
||||||
VID_UnSetMode();
|
VID_UnSetMode();
|
||||||
|
@ -1117,7 +1117,7 @@ void GLAppActivate(BOOL fActive, BOOL minimize)
|
||||||
|
|
||||||
v_gamma.modified = true; //wham bam thanks.
|
v_gamma.modified = true; //wham bam thanks.
|
||||||
|
|
||||||
SetDeviceGammaRamp(maindc, origionalgammaramps);
|
SetDeviceGammaRamp(maindc, originalgammaramps);
|
||||||
gammaworks = false;
|
gammaworks = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ void EmitWaterPolys (msurface_t *fa, float basealpha)
|
||||||
extern cvar_t r_waterlayers;
|
extern cvar_t r_waterlayers;
|
||||||
//the code prior to april 2005 gave a nicer result, but was incompatable with meshes and required poly lists instead
|
//the code prior to april 2005 gave a nicer result, but was incompatable with meshes and required poly lists instead
|
||||||
//the new code uses vertex arrays but sacrifises the warping. We're left only with scaling.
|
//the new code uses vertex arrays but sacrifises the warping. We're left only with scaling.
|
||||||
//The default settings still look nicer than origional quake but not pre-april.
|
//The default settings still look nicer than original quake but not pre-april.
|
||||||
//in the plus side, you can never see the junction glitches of the old warping. :)
|
//in the plus side, you can never see the junction glitches of the old warping. :)
|
||||||
|
|
||||||
#ifdef Q3SHADERS
|
#ifdef Q3SHADERS
|
||||||
|
|
|
@ -2663,7 +2663,7 @@ retry:
|
||||||
else
|
else
|
||||||
type = fld16[i].type & ~(DEF_SHARED|DEF_SAVEGLOBAL);
|
type = fld16[i].type & ~(DEF_SHARED|DEF_SAVEGLOBAL);
|
||||||
|
|
||||||
if (progfuncs->fieldadjust) //we need to make sure all fields appear in thier origional place.
|
if (progfuncs->fieldadjust) //we need to make sure all fields appear in thier original place.
|
||||||
QC_RegisterFieldVar(progfuncs, type, fld16[i].s_name+pr_strings, 4*(fld16[i].ofs+progfuncs->fieldadjust), -1);
|
QC_RegisterFieldVar(progfuncs, type, fld16[i].s_name+pr_strings, 4*(fld16[i].ofs+progfuncs->fieldadjust), -1);
|
||||||
else if (type == ev_vector) //emit vector vars early, so thier fields cannot be alocated before the vector itself. (useful against scramblers)
|
else if (type == ev_vector) //emit vector vars early, so thier fields cannot be alocated before the vector itself. (useful against scramblers)
|
||||||
{
|
{
|
||||||
|
|
|
@ -186,7 +186,7 @@ void QC_InitShares(progfuncs_t *progfuncs)
|
||||||
|
|
||||||
//vectors must be added before any of thier corresponding _x/y/z vars
|
//vectors must be added before any of thier corresponding _x/y/z vars
|
||||||
//in this way, even screwed up progs work.
|
//in this way, even screwed up progs work.
|
||||||
int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, int requestedpos, int origionalofs)
|
int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, int requestedpos, int originalofs)
|
||||||
{
|
{
|
||||||
// progstate_t *p;
|
// progstate_t *p;
|
||||||
// int pnum;
|
// int pnum;
|
||||||
|
@ -220,7 +220,7 @@ int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, i
|
||||||
Sys_Error("Field %s at wrong offset", name);
|
Sys_Error("Field %s at wrong offset", name);
|
||||||
|
|
||||||
if (field[i].requestedofs == -1)
|
if (field[i].requestedofs == -1)
|
||||||
field[i].requestedofs = origionalofs;
|
field[i].requestedofs = originalofs;
|
||||||
return field[i].ofs; //got a match
|
return field[i].ofs; //got a match
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,7 @@ int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, i
|
||||||
Sys_Error("Allocated too many additional fields after ents were inited.");
|
Sys_Error("Allocated too many additional fields after ents were inited.");
|
||||||
field[fnum].type = type;
|
field[fnum].type = type;
|
||||||
|
|
||||||
field[fnum].requestedofs = origionalofs;
|
field[fnum].requestedofs = originalofs;
|
||||||
|
|
||||||
//we've finished setting the structure
|
//we've finished setting the structure
|
||||||
return ofs;
|
return ofs;
|
||||||
|
|
|
@ -91,7 +91,7 @@ void QC_InitShares(progfuncs_t *progfuncs);
|
||||||
void QC_StartShares(progfuncs_t *progfuncs);
|
void QC_StartShares(progfuncs_t *progfuncs);
|
||||||
void QC_AddSharedVar(progfuncs_t *progfuncs, int num, int type);
|
void QC_AddSharedVar(progfuncs_t *progfuncs, int num, int type);
|
||||||
void QC_AddSharedFieldVar(progfuncs_t *progfuncs, int num, char *stringtable);
|
void QC_AddSharedFieldVar(progfuncs_t *progfuncs, int num, char *stringtable);
|
||||||
int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, int requestedpos, int origionalofs);
|
int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, int requestedpos, int originalofs);
|
||||||
pbool Decompile(progfuncs_t *progfuncs, char *fname);
|
pbool Decompile(progfuncs_t *progfuncs, char *fname);
|
||||||
int PR_ToggleBreakpoint(progfuncs_t *progfuncs, char *filename, int linenum, int flag);
|
int PR_ToggleBreakpoint(progfuncs_t *progfuncs, char *filename, int linenum, int flag);
|
||||||
void StripExtension (char *path);
|
void StripExtension (char *path);
|
||||||
|
|
|
@ -123,7 +123,7 @@ struct progfuncs_s {
|
||||||
|
|
||||||
int lastcalledbuiltinnumber; //useful with non-implemented opcodes.
|
int lastcalledbuiltinnumber; //useful with non-implemented opcodes.
|
||||||
|
|
||||||
int (*RegisterFieldVar) (progfuncs_t *prinst, unsigned int type, char *name, int requestedpos, int origionalofs);
|
int (*RegisterFieldVar) (progfuncs_t *prinst, unsigned int type, char *name, int requestedpos, int originalofs);
|
||||||
|
|
||||||
char *tempstringbase; //for engine's use. Store your base tempstring pointer here.
|
char *tempstringbase; //for engine's use. Store your base tempstring pointer here.
|
||||||
int tempstringnum; //for engine's use.
|
int tempstringnum; //for engine's use.
|
||||||
|
|
|
@ -4376,13 +4376,13 @@ QCC_def_t *QCC_PR_Expression (int priority)
|
||||||
if (((unsigned)(statements[numstatements-1].op - OP_LOAD_F) < 6 || statements[numstatements-1].op == OP_LOAD_I) && statements[numstatements-1].c == e->ofs)
|
if (((unsigned)(statements[numstatements-1].op - OP_LOAD_F) < 6 || statements[numstatements-1].op == OP_LOAD_I) && statements[numstatements-1].c == e->ofs)
|
||||||
{ //we have our load.
|
{ //we have our load.
|
||||||
QCC_def_t *e3;
|
QCC_def_t *e3;
|
||||||
//the only inefficiency here is with an extra temp (we can't reuse the origional)
|
//the only inefficiency here is with an extra temp (we can't reuse the original)
|
||||||
//this is not a problem, as the optimise temps or locals marshalling can clean these up for us
|
//this is not a problem, as the optimise temps or locals marshalling can clean these up for us
|
||||||
qcc_usefulstatement=true;
|
qcc_usefulstatement=true;
|
||||||
//load
|
//load
|
||||||
//add to temp
|
//add to temp
|
||||||
//store temp to offset
|
//store temp to offset
|
||||||
//return origional loaded (which is not at the same offset as the pointer we store to)
|
//return original loaded (which is not at the same offset as the pointer we store to)
|
||||||
e2 = QCC_GetTemp(type_float);
|
e2 = QCC_GetTemp(type_float);
|
||||||
e3 = QCC_GetTemp(type_pointer);
|
e3 = QCC_GetTemp(type_pointer);
|
||||||
QCC_PR_SimpleStatement(OP_ADDRESS, statements[numstatements-1].a, statements[numstatements-1].b, e3->ofs);
|
QCC_PR_SimpleStatement(OP_ADDRESS, statements[numstatements-1].a, statements[numstatements-1].b, e3->ofs);
|
||||||
|
@ -4407,8 +4407,8 @@ QCC_def_t *QCC_PR_Expression (int priority)
|
||||||
else if (e->type->type == ev_float)
|
else if (e->type->type == ev_float)
|
||||||
{
|
{
|
||||||
//copy to temp
|
//copy to temp
|
||||||
//add to origional
|
//add to original
|
||||||
//return temp (which == origional)
|
//return temp (which == original)
|
||||||
QCC_PR_ParseWarning(WARN_INEFFICIENTPLUSPLUS, "++ suffix operator results in inefficient behaviour. Use +=1 or prefix form instead");
|
QCC_PR_ParseWarning(WARN_INEFFICIENTPLUSPLUS, "++ suffix operator results in inefficient behaviour. Use +=1 or prefix form instead");
|
||||||
qcc_usefulstatement=true;
|
qcc_usefulstatement=true;
|
||||||
|
|
||||||
|
@ -4444,7 +4444,7 @@ QCC_def_t *QCC_PR_Expression (int priority)
|
||||||
//load
|
//load
|
||||||
//add to temp
|
//add to temp
|
||||||
//store temp to offset
|
//store temp to offset
|
||||||
//return origional loaded (which is not at the same offset as the pointer we store to)
|
//return original loaded (which is not at the same offset as the pointer we store to)
|
||||||
e2 = QCC_GetTemp(type_float);
|
e2 = QCC_GetTemp(type_float);
|
||||||
e3 = QCC_GetTemp(type_pointer);
|
e3 = QCC_GetTemp(type_pointer);
|
||||||
QCC_PR_SimpleStatement(OP_ADDRESS, statements[numstatements-1].a, statements[numstatements-1].b, e3->ofs);
|
QCC_PR_SimpleStatement(OP_ADDRESS, statements[numstatements-1].a, statements[numstatements-1].b, e3->ofs);
|
||||||
|
@ -7790,7 +7790,7 @@ void QCC_PR_ParseDefs (char *classname)
|
||||||
|
|
||||||
if (type->type == ev_field && QCC_PR_CheckToken ("alias"))
|
if (type->type == ev_field && QCC_PR_CheckToken ("alias"))
|
||||||
{
|
{
|
||||||
QCC_PR_ParseError(ERR_INTERNAL, "FTEQCC does not support this variant of decompiled hexenc\nPlease obtain the origional version released by Raven Software instead.");
|
QCC_PR_ParseError(ERR_INTERNAL, "FTEQCC does not support this variant of decompiled hexenc\nPlease obtain the original version released by Raven Software instead.");
|
||||||
name = QCC_PR_ParseName();
|
name = QCC_PR_ParseName();
|
||||||
}
|
}
|
||||||
else if ( QCC_PR_CheckToken ("=") || ((type->type == ev_function) && (pr_token[0] == '{' || pr_token[0] == '[' || pr_token[0] == ':'))) //this is an initialisation (or a function)
|
else if ( QCC_PR_CheckToken ("=") || ((type->type == ev_function) && (pr_token[0] == '{' || pr_token[0] == '[' || pr_token[0] == ':'))) //this is an initialisation (or a function)
|
||||||
|
|
|
@ -213,7 +213,7 @@ pbool QCC_PR_Precompiler(void)
|
||||||
}
|
}
|
||||||
else if (!strncmp(directive, "if", 2))
|
else if (!strncmp(directive, "if", 2))
|
||||||
{
|
{
|
||||||
int origionalline = pr_source_line;
|
int originalline = pr_source_line;
|
||||||
pr_file_p = directive+2;
|
pr_file_p = directive+2;
|
||||||
if (!strncmp(pr_file_p, "def ", 4))
|
if (!strncmp(pr_file_p, "def ", 4))
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,7 @@ pbool QCC_PR_Precompiler(void)
|
||||||
|
|
||||||
if (!*pr_file_p)
|
if (!*pr_file_p)
|
||||||
{
|
{
|
||||||
pr_source_line = origionalline;
|
pr_source_line = originalline;
|
||||||
QCC_PR_ParseError (ERR_NOENDIF, "#if with no endif");
|
QCC_PR_ParseError (ERR_NOENDIF, "#if with no endif");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ pbool QCC_PR_Precompiler(void)
|
||||||
}
|
}
|
||||||
else if (!strncmp(directive, "else", 4))
|
else if (!strncmp(directive, "else", 4))
|
||||||
{
|
{
|
||||||
int origionalline = pr_source_line;
|
int originalline = pr_source_line;
|
||||||
|
|
||||||
ifs -= 1;
|
ifs -= 1;
|
||||||
level = 1;
|
level = 1;
|
||||||
|
@ -322,7 +322,7 @@ pbool QCC_PR_Precompiler(void)
|
||||||
|
|
||||||
if (!*pr_file_p)
|
if (!*pr_file_p)
|
||||||
{
|
{
|
||||||
pr_source_line = origionalline;
|
pr_source_line = originalline;
|
||||||
QCC_PR_ParseError(ERR_NOENDIF, "#if with no endif");
|
QCC_PR_ParseError(ERR_NOENDIF, "#if with no endif");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ optimisations_t optimisations[] =
|
||||||
|
|
||||||
{&opt_assignments, "t", 1, FLAG_ASDEFAULT, "assignments", "c = a*b is performed in one operation rather than two, and can cause older decompilers to fail."},
|
{&opt_assignments, "t", 1, FLAG_ASDEFAULT, "assignments", "c = a*b is performed in one operation rather than two, and can cause older decompilers to fail."},
|
||||||
{&opt_shortenifnots, "i", 1, FLAG_ASDEFAULT, "shortenifs", "if (!a) was traditionally compiled in two statements. This optimisation does it in one, but can cause some decompilers to get confused."},
|
{&opt_shortenifnots, "i", 1, FLAG_ASDEFAULT, "shortenifs", "if (!a) was traditionally compiled in two statements. This optimisation does it in one, but can cause some decompilers to get confused."},
|
||||||
{&opt_nonvec_parms, "p", 1, FLAG_ASDEFAULT, "nonvec_parms", "In the origional qcc, function parameters were specified as a vector store even for floats. This fixes that."},
|
{&opt_nonvec_parms, "p", 1, FLAG_ASDEFAULT, "nonvec_parms", "In the original qcc, function parameters were specified as a vector store even for floats. This fixes that."},
|
||||||
{&opt_constant_names, "c", 2, FLAG_KILLSDEBUGGERS, "constant_names", "This optimisation strips out the names of constants (but not strings) from your progs, resulting in smaller files. It makes decompilers leave out names or fabricate numerical ones."},
|
{&opt_constant_names, "c", 2, FLAG_KILLSDEBUGGERS, "constant_names", "This optimisation strips out the names of constants (but not strings) from your progs, resulting in smaller files. It makes decompilers leave out names or fabricate numerical ones."},
|
||||||
{&opt_constant_names_strings, "cs", 3, FLAG_KILLSDEBUGGERS, "constant_names_strings", "This optimisation strips out the names of string constants from your progs. However, this can break addons, so don't use it in those cases."},
|
{&opt_constant_names_strings, "cs", 3, FLAG_KILLSDEBUGGERS, "constant_names_strings", "This optimisation strips out the names of string constants from your progs. However, this can break addons, so don't use it in those cases."},
|
||||||
{&opt_dupconstdefs, "d", 1, FLAG_ASDEFAULT, "dupconstdefs", "This will merge definitions of constants which are the same value. Pay extra attention to assignment to constant warnings."},
|
{&opt_dupconstdefs, "d", 1, FLAG_ASDEFAULT, "dupconstdefs", "This will merge definitions of constants which are the same value. Pay extra attention to assignment to constant warnings."},
|
||||||
|
@ -218,7 +218,7 @@ compiler_flag_t compiler_flag[] = {
|
||||||
{&flag_ifstring, FLAG_MIDCOMPILE,"ifstring", "if(string) fix", "Causes if(string) to behave identically to if(string!="") This is most useful with addons of course, but also has adverse effects with FRIK_FILE's fgets, where it becomes impossible to determin the end of the file. In such a case, you can still use asm {IF string 2;RETURN} to detect eof and leave the function."}, //correction for if(string) no-ifstring to get the standard behaviour.
|
{&flag_ifstring, FLAG_MIDCOMPILE,"ifstring", "if(string) fix", "Causes if(string) to behave identically to if(string!="") This is most useful with addons of course, but also has adverse effects with FRIK_FILE's fgets, where it becomes impossible to determin the end of the file. In such a case, you can still use asm {IF string 2;RETURN} to detect eof and leave the function."}, //correction for if(string) no-ifstring to get the standard behaviour.
|
||||||
{&flag_acc, 0, "acc", "Reacc support", "Reacc is a pascall like compiler. It was released before the Quake source was released. This flag has a few effects. It sorts all qc files in the current directory into alphabetical order to compile them. It also allows Reacc global/field distinctions, as well as allows ¦ as EOF. Whilst case insensativity and lax type checking are supported by reacc, they are seperate compiler flags in fteqcc."}, //reacc like behaviour of src files.
|
{&flag_acc, 0, "acc", "Reacc support", "Reacc is a pascall like compiler. It was released before the Quake source was released. This flag has a few effects. It sorts all qc files in the current directory into alphabetical order to compile them. It also allows Reacc global/field distinctions, as well as allows ¦ as EOF. Whilst case insensativity and lax type checking are supported by reacc, they are seperate compiler flags in fteqcc."}, //reacc like behaviour of src files.
|
||||||
{&flag_caseinsensative, 0, "caseinsens", "Case insensativity", "Causes fteqcc to become case insensative whilst compiling names. It's generally not advised to use this as it compiles a little more slowly and provides little benefit. However, it is required for full reacc support."}, //symbols will be matched to an insensative case if the specified case doesn't exist. This should b usable for any mod
|
{&flag_caseinsensative, 0, "caseinsens", "Case insensativity", "Causes fteqcc to become case insensative whilst compiling names. It's generally not advised to use this as it compiles a little more slowly and provides little benefit. However, it is required for full reacc support."}, //symbols will be matched to an insensative case if the specified case doesn't exist. This should b usable for any mod
|
||||||
{&flag_laxcasts, FLAG_MIDCOMPILE,"lax", "Lax type checks", "Disables many errors (generating warnings instead) when function calls or operations refer to two normally incompatable types. This is required for reacc support, and can also allow certain (evil) mods to compile that were origionally written for frikqcc."}, //Allow lax casting. This'll produce loadsa warnings of course. But allows compilation of certain dodgy code.
|
{&flag_laxcasts, FLAG_MIDCOMPILE,"lax", "Lax type checks", "Disables many errors (generating warnings instead) when function calls or operations refer to two normally incompatable types. This is required for reacc support, and can also allow certain (evil) mods to compile that were originally written for frikqcc."}, //Allow lax casting. This'll produce loadsa warnings of course. But allows compilation of certain dodgy code.
|
||||||
{&opt_logicops, FLAG_MIDCOMPILE,"lo", "Logic ops", "This changes the behaviour of your code. It generates additional if operations to early-out in if statements. With this flag, the line if (0 && somefunction()) will never call the function. It can thus be considered an optimisation. However, due to the change of behaviour, it is not considered so by fteqcc. Note that due to inprecisions with floats, this flag can cause runaway loop errors within the player walk and run functions. This code is advised:\nplayer_stand1:\n if (self.velocity_x || self.velocity_y)\nplayer_run\n if (!(self.velocity_x || self.velocity_y))"},
|
{&opt_logicops, FLAG_MIDCOMPILE,"lo", "Logic ops", "This changes the behaviour of your code. It generates additional if operations to early-out in if statements. With this flag, the line if (0 && somefunction()) will never call the function. It can thus be considered an optimisation. However, due to the change of behaviour, it is not considered so by fteqcc. Note that due to inprecisions with floats, this flag can cause runaway loop errors within the player walk and run functions. This code is advised:\nplayer_stand1:\n if (self.velocity_x || self.velocity_y)\nplayer_run\n if (!(self.velocity_x || self.velocity_y))"},
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
@ -578,7 +578,7 @@ void QCC_WriteData (int crc)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (numpr_globals >= 32768) //not much of a different format. Rewrite output to get it working on origional executors?
|
if (numpr_globals >= 32768) //not much of a different format. Rewrite output to get it working on original executors?
|
||||||
printf("An enhanced executor will be required (FTE/QF/KK)\n");
|
printf("An enhanced executor will be required (FTE/QF/KK)\n");
|
||||||
else
|
else
|
||||||
printf("Progs should run on any Quake executor\n");
|
printf("Progs should run on any Quake executor\n");
|
||||||
|
@ -1800,7 +1800,7 @@ unsigned short QCC_PR_WriteProgdefs (char *filename)
|
||||||
printf("Recognised progs as regular Quake\n");
|
printf("Recognised progs as regular Quake\n");
|
||||||
break;
|
break;
|
||||||
case 38488:
|
case 38488:
|
||||||
printf("Recognised progs as origional Hexen2\n");
|
printf("Recognised progs as original Hexen2\n");
|
||||||
break;
|
break;
|
||||||
case 26905:
|
case 26905:
|
||||||
printf("Recognised progs as Hexen2 Mission Pack\n");
|
printf("Recognised progs as Hexen2 Mission Pack\n");
|
||||||
|
@ -2563,7 +2563,7 @@ int QCC_FindQCFiles()
|
||||||
|
|
||||||
int qcc_compileactive = false;
|
int qcc_compileactive = false;
|
||||||
extern int accglobalsblock;
|
extern int accglobalsblock;
|
||||||
char *origionalqccmsrc; //for autoprototype.
|
char *originalqccmsrc; //for autoprototype.
|
||||||
void QCC_main (int argc, char **argv) //as part of the quake engine
|
void QCC_main (int argc, char **argv) //as part of the quake engine
|
||||||
{
|
{
|
||||||
extern int pr_bracelevel;
|
extern int pr_bracelevel;
|
||||||
|
@ -2925,7 +2925,7 @@ newstyle:
|
||||||
|
|
||||||
currentchunk = NULL;
|
currentchunk = NULL;
|
||||||
|
|
||||||
origionalqccmsrc = qccmsrc;
|
originalqccmsrc = qccmsrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void new_QCC_ContinueCompile(void);
|
void new_QCC_ContinueCompile(void);
|
||||||
|
@ -2949,7 +2949,7 @@ void QCC_ContinueCompile(void)
|
||||||
{
|
{
|
||||||
if (autoprototype)
|
if (autoprototype)
|
||||||
{
|
{
|
||||||
qccmsrc = origionalqccmsrc;
|
qccmsrc = originalqccmsrc;
|
||||||
QCC_SetDefaultProperties();
|
QCC_SetDefaultProperties();
|
||||||
autoprototype = false;
|
autoprototype = false;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -29,7 +29,7 @@ Quirks:
|
||||||
* An overuse of pointers in the API. There are some macros which you can use to hide some of the dereferences.
|
* An overuse of pointers in the API. There are some macros which you can use to hide some of the dereferences.
|
||||||
* kkqwsv progs are not reliable. Do not try saving the game. Avoid letting your users know of support.
|
* kkqwsv progs are not reliable. Do not try saving the game. Avoid letting your users know of support.
|
||||||
|
|
||||||
* Builtin structures are different from origional quake. You'll need to convert the arguments to qclib style. This change was required for both multiple instances as well as addon support. It should be straightforward enough.
|
* Builtin structures are different from original quake. You'll need to convert the arguments to qclib style. This change was required for both multiple instances as well as addon support. It should be straightforward enough.
|
||||||
* Entity fields are accessed via a pointer from the edict_t structure. This was required to place entity fields within the 64bit accessable section. Changing a . to a -> is not a major issue though. However, there are a lot. do a find and replace of ->v. to ->v->
|
* Entity fields are accessed via a pointer from the edict_t structure. This was required to place entity fields within the 64bit accessable section. Changing a . to a -> is not a major issue though. However, there are a lot. do a find and replace of ->v. to ->v->
|
||||||
* FTE's entities are numbers not pointers. This fact is not made into a big feature as it's kinda incompatable with standard quake. Please do not use numbers directly to refer to ents but instead use the EDICT_TO_PROGS macro which will give protection. This is consistant with standard quake.
|
* FTE's entities are numbers not pointers. This fact is not made into a big feature as it's kinda incompatable with standard quake. Please do not use numbers directly to refer to ents but instead use the EDICT_TO_PROGS macro which will give protection. This is consistant with standard quake.
|
||||||
|
|
||||||
|
|
|
@ -1578,7 +1578,7 @@ void PF_instr (progfuncs_t *prinst, globalvars_t *pr_globals)
|
||||||
if (sub == NULL)
|
if (sub == NULL)
|
||||||
G_INT(OFS_RETURN) = 0;
|
G_INT(OFS_RETURN) = 0;
|
||||||
else
|
else
|
||||||
RETURN_SSTRING(sub); //last as long as the origional string
|
RETURN_SSTRING(sub); //last as long as the original string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7606,7 +7606,7 @@ void PR_RunThreads(void)
|
||||||
next = state->next;
|
next = state->next;
|
||||||
|
|
||||||
if (state->resumetime > sv.time)
|
if (state->resumetime > sv.time)
|
||||||
{ //not time yet, reform origional list.
|
{ //not time yet, reform original list.
|
||||||
state->next = qcthreads;
|
state->next = qcthreads;
|
||||||
qcthreads = state;
|
qcthreads = state;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue