[Fix] Moving from tab to space messed all the indents up. I thing that got them all now.
This commit is contained in:
parent
0f6ff44a93
commit
6a7c051851
22
src/conf.c
22
src/conf.c
@ -15,33 +15,33 @@
|
||||
#include "conf.h"
|
||||
|
||||
#define conf_loadInt(n,i) \
|
||||
lua_getglobal(L,n); \
|
||||
if(lua_isnumber(L, -1)) { \
|
||||
lua_getglobal(L,n); \
|
||||
if(lua_isnumber(L, -1)) { \
|
||||
i = (int)lua_tonumber(L, -1); \
|
||||
lua_remove(L, -1); \
|
||||
}
|
||||
}
|
||||
|
||||
#define conf_loadFloat(n,f) \
|
||||
lua_getglobal(L,n); \
|
||||
if(lua_isnumber(L, -1)) { \
|
||||
lua_getglobal(L,n); \
|
||||
if(lua_isnumber(L, -1)) { \
|
||||
f = (double)lua_tonumber(L, -1); \
|
||||
lua_remove(L,-1);\
|
||||
}
|
||||
}
|
||||
|
||||
#define conf_loadBool(n,b) \
|
||||
lua_getglobal(L,n); \
|
||||
if(lua_isnumber(L, -1)) \
|
||||
lua_getglobal(L,n); \
|
||||
if(lua_isnumber(L, -1)) \
|
||||
if((int)lua_tonumber(L, -1) == 1) { \
|
||||
b = 1; \
|
||||
lua_remove(L, -1); \
|
||||
} \
|
||||
|
||||
#define conf_loadString(n,s) \
|
||||
lua_getglobal(L,n); \
|
||||
if(lua_isstring(L, -1)) { \
|
||||
lua_getglobal(L,n); \
|
||||
if(lua_isstring(L, -1)) { \
|
||||
s = strdup((char*)lua_tostring(L, -1)); \
|
||||
lua_remove(L, -1); \
|
||||
}
|
||||
}
|
||||
|
||||
// Some crap from main.
|
||||
extern int nosound;
|
||||
|
@ -27,7 +27,8 @@ glFont gl_defFont;
|
||||
glFont gl_smallFont;
|
||||
|
||||
static void glFontMakeDList(FT_Face face, char ch,
|
||||
GLuint list_base, GLuint* tex_base, int* width_base);
|
||||
GLuint list_base, GLuint* tex_base,
|
||||
int* width_base);
|
||||
|
||||
static int pot(int n);
|
||||
|
||||
|
@ -471,7 +471,7 @@ void gl_drawCircle(const double cx, const double cy, const double r) {
|
||||
|
||||
// Draw a cirlce in a rect.
|
||||
#define PIXEL(x,y) \
|
||||
if((x>rx) && (y>ry) && (x<rxw) && (y<ryh)) \
|
||||
if((x>rx) && (y>ry) && (x<rxw) && (y<ryh)) \
|
||||
glVertex2d(x,y)
|
||||
|
||||
void gl_drawCircleInRect(const double cx, const double cy, const double r,
|
||||
|
@ -883,7 +883,7 @@ static Fleet* fleet_parse(const xmlNodePtr parent) {
|
||||
MELEMENT(tmp->ai==NULL, "ai");
|
||||
MELEMENT(tmp->faction==NULL, "faction");
|
||||
MELEMENT(tmp->pilots==NULL, "pilots");
|
||||
#undef MELEMENT
|
||||
#undef MELEMENT
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
@ -779,7 +779,7 @@ static void rect_parse(const xmlNodePtr parent, double* x, double* y,
|
||||
|
||||
// Parse a gui node.
|
||||
#define RELATIVIZE(a) \
|
||||
{ (a).x += VX(gui.frame); (a).y = VY(gui.frame) + gui.gfx_frame->h-(a).y; }
|
||||
{ (a).x += VX(gui.frame); (a).y = VY(gui.frame) + gui.gfx_frame->h-(a).y; }
|
||||
static int gui_parse(const xmlNodePtr parent, const char* name) {
|
||||
xmlNodePtr cur, node;
|
||||
char* tmp, *tmp2;
|
||||
|
@ -50,7 +50,8 @@ static int nwfrontLayer = 0; // Number of elements.
|
||||
static int mwfrontLayer = 0; // Allocated memory size.
|
||||
|
||||
static Weapon* weapon_create(const Outfit* outfit, const double dir,
|
||||
const Vec2* pos, const Vec2* vel, const unsigned int parent,
|
||||
const Vec2* pos, const Vec2* vel,
|
||||
const unsigned int parent,
|
||||
const unsigned int target);
|
||||
|
||||
static void weapon_render(const Weapon* w);
|
||||
|
@ -5,7 +5,8 @@
|
||||
typedef enum { WEAPON_LAYER_BG, WEAPON_LAYER_FG } WeaponLayer;
|
||||
|
||||
void weapon_add(const Outfit* outfit, const double dir, const Vec2* pos,
|
||||
const Vec2* vel, unsigned int parent, const unsigned int target);
|
||||
const Vec2* vel, unsigned int parent,
|
||||
const unsigned int target);
|
||||
|
||||
// Pausing.
|
||||
void weapons_pause(void);
|
||||
|
Loading…
Reference in New Issue
Block a user