mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-22 20:31:11 +00:00
warning cleanups
This commit is contained in:
parent
4a16c915d1
commit
4f6af5c9c6
9 changed files with 43 additions and 108 deletions
|
@ -354,7 +354,7 @@ ifeq ($(PLATFORM),darwin)
|
|||
CLIENT_LIBS=
|
||||
OPTIMIZE=
|
||||
|
||||
BASE_CFLAGS = -Wall -Wimplicit -Wstrict-prototypes
|
||||
BASE_CFLAGS = -Werror -Wall -Wimplicit -Wstrict-prototypes
|
||||
|
||||
ifeq ($(ARCH),ppc)
|
||||
BASE_CFLAGS += -faltivec
|
||||
|
|
|
@ -1585,6 +1585,7 @@ void SP_func_door(gentity_t * ent)
|
|||
char *sSndStart;
|
||||
//Makro - added
|
||||
char *sSndInactive;
|
||||
int noreset;
|
||||
|
||||
//Elder: can set sounds from here
|
||||
//Blaze: changed default path as per Sze
|
||||
|
@ -1688,8 +1689,8 @@ void SP_func_door(gentity_t * ent)
|
|||
ent->unbreakable = ent->inactive;
|
||||
ent->reset = reset_door;
|
||||
//doors shouldn't reset by default
|
||||
G_SpawnInt("noreset", "1", &ent->noreset);
|
||||
|
||||
G_SpawnInt("noreset", "1", &noreset);
|
||||
ent->noreset = noreset;
|
||||
}
|
||||
|
||||
// REACTION
|
||||
|
@ -1724,6 +1725,7 @@ void SP_func_door_rotating(gentity_t * ent)
|
|||
char *sSndStart;
|
||||
//Makro - added
|
||||
char *sSndInactive;
|
||||
int noreset;
|
||||
|
||||
//Elder: can set sounds from here
|
||||
G_SpawnString("soundstart", "sound/movers/rdoor_stop.wav", &sSndStart);
|
||||
|
@ -1852,7 +1854,8 @@ void SP_func_door_rotating(gentity_t * ent)
|
|||
ent->unbreakable = ent->inactive;
|
||||
ent->reset = reset_door;
|
||||
//doors shouldn't reset by default
|
||||
G_SpawnInt("noreset", "1", &ent->noreset);
|
||||
G_SpawnInt("noreset", "1", &noreset);
|
||||
ent->noreset = noreset;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -104,11 +104,15 @@ extern int SCRIPT_SHOW_LEVEL;
|
|||
|
||||
#define SCRIPT_FUNC_PROTO(name) int name(char **SCRIPT_INPUT, TStateStack *SCRIPT_STACK)
|
||||
|
||||
#define SCRIPT_FUNC(name)\
|
||||
#define SCRIPT_FUNC_TOKENS(name)\
|
||||
SCRIPT_FUNC_PROTO(name)\
|
||||
{\
|
||||
const char *__SCRIPT_FUNC__ = #name;
|
||||
|
||||
#define SCRIPT_FUNC(name)\
|
||||
SCRIPT_FUNC_PROTO(name)\
|
||||
{
|
||||
|
||||
#define END_SCRIPT_FUNC()\
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ SCRIPT_STATE(STATE_Base, NO_DATA)
|
|||
///////////////////////////////////////////////////////////////
|
||||
// Functions //////////////////////////////////////////////////
|
||||
|
||||
SCRIPT_FUNC(Main_Cvar)
|
||||
SCRIPT_FUNC_TOKENS(Main_Cvar)
|
||||
{
|
||||
NEEDS_TOKENS(2, tokens);
|
||||
G_Printf("Cvar: %s = %s\n", tokens[0], tokens[1]);
|
||||
|
@ -108,7 +108,7 @@ SCRIPT_STATE(STATE_Main, NO_DATA)
|
|||
///////////////////////////////////////////////////////////////
|
||||
// Functions //////////////////////////////////////////////////
|
||||
|
||||
SCRIPT_FUNC(Team_Name)
|
||||
SCRIPT_FUNC_TOKENS(Team_Name)
|
||||
{
|
||||
NEEDS_TOKENS(1, token);
|
||||
G_Printf("Team name: %s\n", token[0]);
|
||||
|
@ -116,7 +116,7 @@ SCRIPT_FUNC(Team_Name)
|
|||
}
|
||||
END_SCRIPT_FUNC()
|
||||
|
||||
SCRIPT_FUNC(Team_Outfit)
|
||||
SCRIPT_FUNC_TOKENS(Team_Outfit)
|
||||
{
|
||||
NEEDS_TOKENS(1, token);
|
||||
G_Printf("Team skin: %s\n", token[0]);
|
||||
|
@ -172,7 +172,7 @@ SCRIPT_STATE(STATE_Rotation, NO_DATA)
|
|||
///////////////////////////////////////////////////////////////
|
||||
// Functions //////////////////////////////////////////////////
|
||||
|
||||
SCRIPT_FUNC(Map_Name)
|
||||
SCRIPT_FUNC_TOKENS(Map_Name)
|
||||
{
|
||||
NEEDS_TOKENS(1, token);
|
||||
G_Printf("Map: %s\n", token[0]);
|
||||
|
@ -180,7 +180,7 @@ SCRIPT_FUNC(Map_Name)
|
|||
}
|
||||
END_SCRIPT_FUNC()
|
||||
|
||||
SCRIPT_FUNC(Map_Cvar)
|
||||
SCRIPT_FUNC_TOKENS(Map_Cvar)
|
||||
{
|
||||
NEEDS_TOKENS(2, tokens);
|
||||
G_Printf("Cvar: %s = %s\n", tokens[0], tokens[1]);
|
||||
|
@ -208,7 +208,7 @@ SCRIPT_STATE(STATE_Rotation_Map, NO_DATA)
|
|||
///////////////////////////////////////////////////////////////
|
||||
// Functions //////////////////////////////////////////////////
|
||||
|
||||
SCRIPT_FUNC(Restrictions_Cvar)
|
||||
SCRIPT_FUNC_TOKENS(Restrictions_Cvar)
|
||||
{
|
||||
NEEDS_TOKENS(2, tokens);
|
||||
G_Printf("Cvar: %s = %s\n", tokens[0], tokens[1]);
|
||||
|
|
|
@ -36,43 +36,6 @@ BASIC MATH
|
|||
===============================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
================
|
||||
RotatePoint
|
||||
================
|
||||
*/
|
||||
static void RotatePoint(vec3_t point, /*const*/ vec3_t matrix[3]) { // FIXME
|
||||
vec3_t tvec;
|
||||
|
||||
VectorCopy(point, tvec);
|
||||
point[0] = DotProduct(matrix[0], tvec);
|
||||
point[1] = DotProduct(matrix[1], tvec);
|
||||
point[2] = DotProduct(matrix[2], tvec);
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
TransposeMatrix
|
||||
================
|
||||
*/
|
||||
static void TransposeMatrix(/*const*/ vec3_t matrix[3], vec3_t transpose[3]) { // FIXME
|
||||
int i, j;
|
||||
for (i = 0; i < 3; i++) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
transpose[i][j] = matrix[j][i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
CreateRotationMatrix
|
||||
================
|
||||
*/
|
||||
static void CreateRotationMatrix(const vec3_t angles, vec3_t matrix[3]) {
|
||||
AngleVectors(angles, matrix[0], matrix[1], matrix[2]);
|
||||
VectorInverse(matrix[1]);
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
|
|
|
@ -1490,7 +1490,7 @@ int ReflectVectorByte(vec3_t dir, vec3_t plane)
|
|||
CreateRotationMatrix
|
||||
================
|
||||
*/
|
||||
void CreateRotationMatrix(vec3_t angles, vec3_t matrix[3])
|
||||
void CreateRotationMatrix(const vec3_t angles, vec3_t matrix[3])
|
||||
{
|
||||
AngleVectors(angles, matrix[0], matrix[1], matrix[2]);
|
||||
VectorInverse(matrix[1]);
|
||||
|
@ -1600,41 +1600,3 @@ void ToAxisAngles(vec3_t in, vec3_t out)
|
|||
VectorCopy(result, out);
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
RotatePoint
|
||||
================
|
||||
*/
|
||||
static void RotatePoint(vec3_t point, /*const*/ vec3_t matrix[3]) { // FIXME
|
||||
vec3_t tvec;
|
||||
|
||||
VectorCopy(point, tvec);
|
||||
point[0] = DotProduct(matrix[0], tvec);
|
||||
point[1] = DotProduct(matrix[1], tvec);
|
||||
point[2] = DotProduct(matrix[2], tvec);
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
TransposeMatrix
|
||||
================
|
||||
*/
|
||||
static void TransposeMatrix(/*const*/ vec3_t matrix[3], vec3_t transpose[3]) { // FIXME
|
||||
int i, j;
|
||||
for (i = 0; i < 3; i++) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
transpose[i][j] = matrix[j][i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
CreateRotationMatrix
|
||||
================
|
||||
*/
|
||||
static void CreateRotationMatrix(const vec3_t angles, vec3_t matrix[3]) {
|
||||
AngleVectors(angles, matrix[0], matrix[1], matrix[2]);
|
||||
VectorInverse(matrix[1]);
|
||||
}
|
||||
|
||||
|
|
|
@ -640,6 +640,11 @@ void PerpendicularVector( vec3_t dst, const vec3_t src );
|
|||
int ReflectVectorByte( vec3_t dir, vec3_t plane );
|
||||
int Q_isnan( float x );
|
||||
|
||||
// Makro - added
|
||||
void RotatePoint(vec3_t point, /*const*/ vec3_t matrix[3]);
|
||||
void TransposeMatrix(/*const*/ vec3_t matrix[3], vec3_t transpose[3]);
|
||||
void CreateRotationMatrix(const vec3_t angles, vec3_t matrix[3]);
|
||||
|
||||
//Makro - added
|
||||
void ChangeRefSystem(vec3_t in, vec3_t neworg, vec3_t newaxis[], vec3_t out);
|
||||
void ChangeBackRefSystem(vec3_t in, vec3_t neworg, vec3_t newaxis[], vec3_t out);
|
||||
|
|
|
@ -269,7 +269,7 @@ void UI_ClearScores()
|
|||
|
||||
}
|
||||
|
||||
static void UI_Cache_f()
|
||||
static void UI_Cache_f( void )
|
||||
{
|
||||
Display_CacheAll();
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ static void UI_Cache_f()
|
|||
UI_CalcPostGameStats
|
||||
=======================
|
||||
*/
|
||||
static void UI_CalcPostGameStats()
|
||||
static void UI_CalcPostGameStats( void )
|
||||
{
|
||||
char map[MAX_QPATH];
|
||||
char fileName[MAX_QPATH];
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
|
||||
//Makro - avoid warnings
|
||||
int UI_SelectedQ3Head(qboolean);
|
||||
qboolean UI_NeedToUpdateModel();
|
||||
qboolean UI_NeedToUpdateModel( void );
|
||||
|
||||
#define SCROLL_TIME_START 500
|
||||
#define SCROLL_TIME_ADJUST 150
|
||||
|
@ -157,7 +157,7 @@ static itemDef_t *g_editItem = NULL;
|
|||
menuDef_t Menus[MAX_MENUS]; // defined menus
|
||||
int menuCount = 0; // how many
|
||||
|
||||
int GMemory()
|
||||
int GMemory( void )
|
||||
{
|
||||
return sizeof(Menus);
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ int BindingIDFromName(const char *name);
|
|||
qboolean Item_Bind_HandleKey(itemDef_t * item, int key, qboolean down);
|
||||
itemDef_t *Menu_SetPrevCursorItem(menuDef_t * menu);
|
||||
itemDef_t *Menu_SetNextCursorItem(menuDef_t * menu);
|
||||
static qboolean Menu_OverActiveItem(menuDef_t * menu, float x, float y);
|
||||
//static qboolean Menu_OverActiveItem(menuDef_t * menu, float x, float y);
|
||||
|
||||
#ifdef CGAME
|
||||
#define MEM_POOL_SIZE 128 * 1024
|
||||
|
@ -230,7 +230,7 @@ void UI_InitMemory(void)
|
|||
outOfMemory = qfalse;
|
||||
}
|
||||
|
||||
qboolean UI_OutOfMemory()
|
||||
qboolean UI_OutOfMemory( void )
|
||||
{
|
||||
return outOfMemory;
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ const char *String_Alloc(const char *p)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void String_Report()
|
||||
void String_Report( void )
|
||||
{
|
||||
float f;
|
||||
|
||||
|
@ -393,7 +393,7 @@ void String_Report()
|
|||
String_Init
|
||||
=================
|
||||
*/
|
||||
void String_Init()
|
||||
void String_Init( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1662,7 +1662,7 @@ void Menus_CloseByName(const char *p)
|
|||
}
|
||||
}
|
||||
|
||||
void Menus_CloseAll()
|
||||
void Menus_CloseAll( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -3915,7 +3915,7 @@ static void Menu_CloseCinematics(menuDef_t * menu)
|
|||
}
|
||||
}
|
||||
|
||||
static void Display_CloseCinematics()
|
||||
static void Display_CloseCinematics( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -3989,7 +3989,7 @@ void Menus_Activate(menuDef_t * menu)
|
|||
Display_CloseCinematics();
|
||||
}
|
||||
|
||||
int Display_VisibleMenuCount()
|
||||
int Display_VisibleMenuCount( void )
|
||||
{
|
||||
int i, count;
|
||||
|
||||
|
@ -5224,7 +5224,6 @@ void Item_Slider_Paint(itemDef_t * item)
|
|||
{
|
||||
vec4_t newColor;
|
||||
float x, y, value;
|
||||
menuDef_t *parent = (menuDef_t *) item->parent;
|
||||
float frac;
|
||||
editFieldDef_t *editDef = item->typeData;
|
||||
Point pt;
|
||||
|
@ -5345,7 +5344,7 @@ void Item_Bind_Paint(itemDef_t * item)
|
|||
}
|
||||
}
|
||||
|
||||
qboolean Display_KeyBindPending()
|
||||
qboolean Display_KeyBindPending( void )
|
||||
{
|
||||
return g_waitingForKey;
|
||||
}
|
||||
|
@ -6333,7 +6332,7 @@ itemDef_t *Menu_GetFocusedItem(menuDef_t * menu)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
menuDef_t *Menu_GetFocused()
|
||||
menuDef_t *Menu_GetFocused( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -6388,7 +6387,7 @@ void Menu_SetFeederSelection(menuDef_t * menu, int feeder, int index, const char
|
|||
}
|
||||
}
|
||||
|
||||
qboolean Menus_AnyFullScreenVisible()
|
||||
qboolean Menus_AnyFullScreenVisible( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -6405,7 +6404,6 @@ menuDef_t *Menus_ActivateByName(const char *p, qboolean special)
|
|||
{
|
||||
int i;
|
||||
menuDef_t *m = NULL;
|
||||
menuDef_t *focus = Menu_GetFocused();
|
||||
|
||||
for (i = 0; i < menuCount; i++) {
|
||||
if (Q_stricmp(Menus[i].window.name, p) == 0) {
|
||||
|
@ -6497,7 +6495,7 @@ void Menu_HandleMouseMove(menuDef_t * menu, float x, float y)
|
|||
}
|
||||
|
||||
if (menu->items[i]->type == ITEM_TYPE_LISTBOX) {
|
||||
rectDef_t *r = &menu->items[i]->window.rect;
|
||||
//rectDef_t *r = &menu->items[i]->window.rect;
|
||||
//Com_Printf("Listbox: %d\n", r->hasVectors);
|
||||
//DC->drawAngledPic(r->x, r->y, r->w, r->h, r->u, r->v, colorYellow, 0, 0, 1, 1, DC->whiteShader);
|
||||
}
|
||||
|
@ -8837,12 +8835,12 @@ void Menu_New(int handle)
|
|||
}
|
||||
}
|
||||
|
||||
int Menu_Count()
|
||||
int Menu_Count( void )
|
||||
{
|
||||
return menuCount;
|
||||
}
|
||||
|
||||
void Menu_PaintAll()
|
||||
void Menu_PaintAll( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -9003,7 +9001,7 @@ void Display_CacheAll()
|
|||
Menu_CacheContents(&Menus[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
static qboolean Menu_OverActiveItem(menuDef_t * menu, float x, float y)
|
||||
{
|
||||
if (menu && menu->window.flags & (WINDOW_VISIBLE | WINDOW_FORCED)) {
|
||||
|
@ -9040,5 +9038,5 @@ static qboolean Menu_OverActiveItem(menuDef_t * menu, float x, float y)
|
|||
}
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
} */
|
||||
|
||||
|
|
Loading…
Reference in a new issue