[Fix] Ton more fixes. F*CK YOU XML!
This commit is contained in:
parent
fbdb944f88
commit
b09adfb92c
17
bin/Makefile
17
bin/Makefile
@ -27,15 +27,6 @@ CTTF = $(shell freetype-config --cflags)
|
|||||||
CGL =
|
CGL =
|
||||||
CFLAGS = $(CLUA) $(CSDL) $(CXML) $(CTTF) $(CGL) $(VERSION) -D$(OS)
|
CFLAGS = $(CLUA) $(CSDL) $(CXML) $(CTTF) $(CGL) $(VERSION) -D$(OS)
|
||||||
|
|
||||||
# LDFLAGS.
|
|
||||||
LDLUA = ../lib/lua/liblua.a
|
|
||||||
LDSDL = $(shell sdl-config --libs) -lSDL_image -lSDL_mixer
|
|
||||||
LDXML = $(shell xml2-config --libs)
|
|
||||||
LDTTF = $(shell freetype-config --libs)
|
|
||||||
LDGL = -lGL
|
|
||||||
LDPNG = -lpng
|
|
||||||
LDFLAGS = -lm $(LDLUA) $(LDSDL) $(LDXML) $(LDTTF) $(LDGL) $(LDPNG)
|
|
||||||
|
|
||||||
# OS Stuff.
|
# OS Stuff.
|
||||||
ifeq ($(OS),LINUX)
|
ifeq ($(OS),LINUX)
|
||||||
CFLAGS += -D_POSIX_SOURCE
|
CFLAGS += -D_POSIX_SOURCE
|
||||||
@ -60,6 +51,14 @@ else # DEBUG
|
|||||||
CFLAGS += -O2 -funroll-loops -pipe -std=c99
|
CFLAGS += -O2 -funroll-loops -pipe -std=c99
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# LDFLAGS.
|
||||||
|
LDLUA = ../lib/lua/liblua.a
|
||||||
|
LDSDL = $(shell sdl-config --libs) -lSDL_image -lSDL_mixer
|
||||||
|
LDXML = $(shell xml2-config --libs)
|
||||||
|
LDTTF = $(shell freetype-config --libs)
|
||||||
|
LDGL = -lGL
|
||||||
|
LDPNG = -lpng
|
||||||
|
LDFLAGS = -lm $(LDLUA) $(LDSDL) $(LDXML) $(LDTTF) $(LDGL) $(LDPNG)
|
||||||
|
|
||||||
# This is just for gstat to run some analysis on performance.
|
# This is just for gstat to run some analysis on performance.
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<mission name="Empire Shipping">
|
<mission name="Empire Shipping">
|
||||||
<lua>es_cargo</lua>
|
<lua>es_cargo</lua>
|
||||||
<avail>
|
<avail>
|
||||||
<cond>player.getFaction("Empire") >=0 and var.peek("es_cargo") == true</cond>
|
<cond>player.getFaction("Empire") >= 0 and var.peek("es_cargo") == true</cond>
|
||||||
<chance>350</chance>
|
<chance>350</chance>
|
||||||
<location>Computer</location>
|
<location>Computer</location>
|
||||||
<faction>Empire</faction>
|
<faction>Empire</faction>
|
||||||
@ -77,7 +77,33 @@
|
|||||||
<location>Bar</location>
|
<location>Bar</location>
|
||||||
<planet>Omega Station</planet>
|
<planet>Omega Station</planet>
|
||||||
</avail>
|
</avail>
|
||||||
</mission>
|
</mission>
|
||||||
|
<mission name="Collective Espionage 3">
|
||||||
|
<lua>emp_collective03</lua>
|
||||||
|
<flags>
|
||||||
|
<unique>1</unique>
|
||||||
|
</flags>
|
||||||
|
<avail>
|
||||||
|
<cond>player.getFaction("Empire") > 5</cond>
|
||||||
|
<done>Collective Espionage 2</done>
|
||||||
|
<chance>100</chance>
|
||||||
|
<location>Bar</location>
|
||||||
|
<planet>Omega Station</planet>
|
||||||
|
</avail>
|
||||||
|
</mission>
|
||||||
|
<mission name="Collective Distraction">
|
||||||
|
<lua>emp_collective04</lua>
|
||||||
|
<flags>
|
||||||
|
<unique>1</unique>
|
||||||
|
</flags>
|
||||||
|
<avail>
|
||||||
|
<cond>player.getFaction("Empire") > 5 and var.peek("emp_commando") ~= nil and time.get() > var.peek("emp_commando")</cond>
|
||||||
|
<done>Collective Espionage 3</done>
|
||||||
|
<chance>100</chance>
|
||||||
|
<location>Land</location>
|
||||||
|
<planet>Omega Station</planet>
|
||||||
|
</avail>
|
||||||
|
</mission>
|
||||||
<mission name="Operation Black Trinity">
|
<mission name="Operation Black Trinity">
|
||||||
<lua>emp_collective05</lua>
|
<lua>emp_collective05</lua>
|
||||||
<flags>
|
<flags>
|
||||||
@ -91,7 +117,7 @@
|
|||||||
<planet>Omega Station</planet>
|
<planet>Omega Station</planet>
|
||||||
</avail>
|
</avail>
|
||||||
</mission>
|
</mission>
|
||||||
<mission>
|
<mission name="Operation Cold Metal">
|
||||||
<lua>emp_collective06</lua>
|
<lua>emp_collective06</lua>
|
||||||
<flags>
|
<flags>
|
||||||
<unique>1</unique>
|
<unique>1</unique>
|
||||||
|
@ -94,7 +94,7 @@ function jump()
|
|||||||
emp_fleets = {}
|
emp_fleets = {}
|
||||||
emp_fleets[1] = "Empire Sml Attack"
|
emp_fleets[1] = "Empire Sml Attack"
|
||||||
emp_fleets[2] = "Empire Sml Attack"
|
emp_fleets[2] = "Empire Sml Attack"
|
||||||
emp_fleets[3] = "Dvaered Goddard" -- They help empire.
|
emp_fleets[3] = "Draktharr Goddard" -- They help empire.
|
||||||
for k,v in ipairs(emp_fleets) do
|
for k,v in ipairs(emp_fleets) do
|
||||||
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
|
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
|
||||||
pilot.add( v, "def", enter_vect )
|
pilot.add( v, "def", enter_vect )
|
||||||
@ -132,7 +132,7 @@ function jump()
|
|||||||
emp_fleets = {}
|
emp_fleets = {}
|
||||||
emp_fleets[1] = "Empire Lge Attack"
|
emp_fleets[1] = "Empire Lge Attack"
|
||||||
emp_fleets[2] = "Empire Med Attack"
|
emp_fleets[2] = "Empire Med Attack"
|
||||||
emp_fleets[3] = "Dvaered Goddard" -- They help empire.
|
emp_fleets[3] = "Draktharr Goddard" -- They help empire.
|
||||||
for k,v in ipairs(emp_fleets) do
|
for k,v in ipairs(emp_fleets) do
|
||||||
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
|
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
|
||||||
pilot.add( v, "def", enter_vect )
|
pilot.add( v, "def", enter_vect )
|
||||||
|
@ -8,16 +8,14 @@
|
|||||||
#include "physics.h"
|
#include "physics.h"
|
||||||
#include "rng.h"
|
#include "rng.h"
|
||||||
#include "pack.h"
|
#include "pack.h"
|
||||||
#include "space.h"
|
#include "player.h"
|
||||||
#include "faction.h"
|
|
||||||
#include "xml.h"
|
|
||||||
#include "pause.h"
|
#include "pause.h"
|
||||||
#include "weapon.h"
|
#include "weapon.h"
|
||||||
#include "toolkit.h"
|
#include "toolkit.h"
|
||||||
#include "spfx.h"
|
#include "spfx.h"
|
||||||
#include "ltime.h"
|
#include "ltime.h"
|
||||||
#include "nebulae.h"
|
#include "nebulae.h"
|
||||||
#include "player.h"
|
#include "space.h"
|
||||||
|
|
||||||
#define XML_PLANET_ID "Planets"
|
#define XML_PLANET_ID "Planets"
|
||||||
#define XML_PLANET_TAG "planet"
|
#define XML_PLANET_TAG "planet"
|
||||||
@ -86,7 +84,7 @@ static int planet_parse(Planet* planet, const xmlNodePtr parent);
|
|||||||
/* System load. */
|
/* System load. */
|
||||||
static int systems_load(void);
|
static int systems_load(void);
|
||||||
static StarSystem* system_parse(StarSystem* system, const xmlNodePtr parent);
|
static StarSystem* system_parse(StarSystem* system, const xmlNodePtr parent);
|
||||||
static void systemJumps(const xmlNodePtr parent);
|
static void system_parseJumps(const xmlNodePtr parent);
|
||||||
/* Misc. */
|
/* Misc. */
|
||||||
static void system_setFaction(StarSystem* sys);
|
static void system_setFaction(StarSystem* sys);
|
||||||
static void space_renderStars(const double dt);
|
static void space_renderStars(const double dt);
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
#define XML_NODE_TEXT 3
|
#define XML_NODE_TEXT 3
|
||||||
|
|
||||||
/* Check if node n is of name s. */
|
/* Check if node n is of name s. */
|
||||||
#define xml_isNode(n,s) (((n)->type == XML_NODE_START) && \
|
#define xml_isNode(n,s) \
|
||||||
|
((n!=NULL) && ((n)->type==XML_NODE_START) && \
|
||||||
(strcmp((char*)(n)->name, s)==0))
|
(strcmp((char*)(n)->name, s)==0))
|
||||||
|
|
||||||
/* Get the next node. */
|
/* Get the next node. */
|
||||||
|
Loading…
Reference in New Issue
Block a user