[Fix] Fixed up most warnings, there are a couple remaining but they aren't important.
This commit is contained in:
parent
68710f9fb5
commit
2e63c40ef4
@ -193,9 +193,10 @@ typedef struct luaL_Stream {
|
|||||||
/* }====================================================== */
|
/* }====================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
// Hack by Allanis. Not recommended.
|
||||||
|
|
||||||
/* compatibility with old module system */
|
/* compatibility with old module system */
|
||||||
#if defined(LUA_COMPAT_MODULE)
|
//#if defined(LUA_COMPAT_MODULE)
|
||||||
|
|
||||||
LUALIB_API void (luaL_pushmodule) (lua_State *L, const char *modname,
|
LUALIB_API void (luaL_pushmodule) (lua_State *L, const char *modname,
|
||||||
int sizehint);
|
int sizehint);
|
||||||
@ -204,7 +205,7 @@ LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname,
|
|||||||
|
|
||||||
#define luaL_register(L,n,l) (luaL_openlib(L,(n),(l),0))
|
#define luaL_register(L,n,l) (luaL_openlib(L,(n),(l),0))
|
||||||
|
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
2
src/ai.c
2
src/ai.c
@ -46,7 +46,7 @@
|
|||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
||||||
// FUCK LUA!!!
|
// FUCK LUA!!!
|
||||||
#define luaL_register(L,n,l) (luaL_openlib(L, (n),(l), 0))
|
//#define luaL_register(L,n,l) (luaL_openlib(L, (n),(l), 0))
|
||||||
// Creates a new lua table.
|
// Creates a new lua table.
|
||||||
#define newtable(L) (lua_newtable(L), lua_gettop(L))
|
#define newtable(L) (lua_newtable(L), lua_gettop(L))
|
||||||
// Register a number constant n to name s (syntax is just like lua_regfunc).
|
// Register a number constant n to name s (syntax is just like lua_regfunc).
|
||||||
|
@ -33,7 +33,7 @@ const char* keybindNames[] = {
|
|||||||
|
|
||||||
// Accel hacks.
|
// Accel hacks.
|
||||||
static unsigned int input_accelLast = 0; // Used to see if double tap.
|
static unsigned int input_accelLast = 0; // Used to see if double tap.
|
||||||
int input_afterburnSensibility = 500; // ms between taps to afterburn.
|
unsigned int input_afterburnSensibility = 500; // ms between taps to afterburn.
|
||||||
|
|
||||||
// From player.c
|
// From player.c
|
||||||
extern double player_turn;
|
extern double player_turn;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
|
#include "lualib.h"
|
||||||
#include "lauxlib.h"
|
#include "lauxlib.h"
|
||||||
|
|
||||||
#include "hook.h"
|
#include "hook.h"
|
||||||
@ -10,7 +11,7 @@
|
|||||||
#include "misn_lua.h"
|
#include "misn_lua.h"
|
||||||
|
|
||||||
// FUCK LUA!!!
|
// FUCK LUA!!!
|
||||||
#define luaL_register(L,n,l) (luaL_openlib(L, (n),(l), 0))
|
//#define luaL_register(L,n,l) (luaL_openlib(L, (n),(l), 0))
|
||||||
|
|
||||||
#define MIN_ARGS(n) if(lua_gettop(L) < n) return 0
|
#define MIN_ARGS(n) if(lua_gettop(L) < n) return 0
|
||||||
|
|
||||||
@ -192,7 +193,7 @@ static int player_pay(lua_State* L) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static rnd_int(lua_State* L) {
|
static int rnd_int(lua_State* L) {
|
||||||
int o;
|
int o;
|
||||||
|
|
||||||
o = lua_gettop(L);
|
o = lua_gettop(L);
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "hook.h"
|
#include "hook.h"
|
||||||
#include "pack.h"
|
#include "pack.h"
|
||||||
#include "xml.h"
|
#include "xml.h"
|
||||||
|
#include "faction.h"
|
||||||
#include "mission.h"
|
#include "mission.h"
|
||||||
|
|
||||||
#define XML_MISSION_ID "Missions" // XML section identifier.
|
#define XML_MISSION_ID "Missions" // XML section identifier.
|
||||||
@ -27,7 +28,7 @@ static unsigned int mission_id = 0;
|
|||||||
Mission player_missions[MISSION_MAX];
|
Mission player_missions[MISSION_MAX];
|
||||||
|
|
||||||
// Mission stack.
|
// Mission stack.
|
||||||
static Mission* mission_stack = NULL; // Unmuteable after creation.
|
static MissionData* mission_stack = NULL; // Unmuteable after creation.
|
||||||
static int mission_nstack = 0;
|
static int mission_nstack = 0;
|
||||||
|
|
||||||
// Extern.
|
// Extern.
|
||||||
|
@ -62,6 +62,7 @@ void mission_accept(Mission* misn);
|
|||||||
|
|
||||||
// Load/Quit.
|
// Load/Quit.
|
||||||
int missions_load(void);
|
int missions_load(void);
|
||||||
|
void mission_free(Mission* mission);
|
||||||
void missions_free(void);
|
void missions_free(void);
|
||||||
void missions_cleanup(void);
|
void missions_cleanup(void);
|
||||||
|
|
||||||
|
@ -953,7 +953,6 @@ static Fleet* fleet_parse(const xmlNodePtr parent) {
|
|||||||
#define MELEMENT(o,s) if(o) WARN("Fleet '%s' missing '"s"' element", tmp->name)
|
#define MELEMENT(o,s) if(o) WARN("Fleet '%s' missing '"s"' element", tmp->name)
|
||||||
MELEMENT(tmp->ai==NULL, "ai");
|
MELEMENT(tmp->ai==NULL, "ai");
|
||||||
MELEMENT(tmp->faction==-1, "faction");
|
MELEMENT(tmp->faction==-1, "faction");
|
||||||
MELEMENT(tmp->faction==NULL, "faction");
|
|
||||||
MELEMENT(tmp->pilots==NULL, "pilots");
|
MELEMENT(tmp->pilots==NULL, "pilots");
|
||||||
#undef MELEMENT
|
#undef MELEMENT
|
||||||
|
|
||||||
|
@ -788,6 +788,7 @@ static void window_render(Window* w) {
|
|||||||
static void toolkit_renderButton(Widget* btn, double bx, double by) {
|
static void toolkit_renderButton(Widget* btn, double bx, double by) {
|
||||||
glColour* c, *dc, *oc, *lc;
|
glColour* c, *dc, *oc, *lc;
|
||||||
double x, y;
|
double x, y;
|
||||||
|
(void)oc;
|
||||||
|
|
||||||
x = bx + btn->x;
|
x = bx + btn->x;
|
||||||
y = by + btn->y;
|
y = by + btn->y;
|
||||||
|
Loading…
Reference in New Issue
Block a user