summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.bld4
-rw-r--r--mingw.bld8
-rw-r--r--src/gamestate.cpp9
-rw-r--r--src/gamestate.h7
4 files changed, 23 insertions, 5 deletions
diff --git a/default.bld b/default.bld
index 2747296..3a5453a 100644
--- a/default.bld
+++ b/default.bld
@@ -47,13 +47,13 @@ target "stage"
47 rule "exe"; 47 rule "exe";
48 input files("src/*.y", "src/*.l", "src/*.cpp", "src/version.h"); 48 input files("src/*.y", "src/*.l", "src/*.cpp", "src/version.h");
49 49
50 CXXFLAGS="-ggdb"; 50 CXXFLAGS="-ggdb -Ilibgats";
51 CFLAGS="-ggdb"; 51 CFLAGS="-ggdb";
52 52
53 FLEXFLAGS="-osrc/parser.yy.c --header-file=src/parser.yy.h"; 53 FLEXFLAGS="-osrc/parser.yy.c --header-file=src/parser.yy.h";
54 BISONFLAGS="-d"; 54 BISONFLAGS="-d";
55 55
56 LDFLAGS += "-lbu++ -ldl"; 56 LDFLAGS += "-lbu++ -ldl -Llibgats -lgats";
57} 57}
58 58
59/* 59/*
diff --git a/mingw.bld b/mingw.bld
index 43d1486..407047d 100644
--- a/mingw.bld
+++ b/mingw.bld
@@ -22,10 +22,11 @@ action "clean"
22 clean: targets(); 22 clean: targets();
23} 23}
24 24
25ZIPFILE = "stage-$(git describe).zip"; 25ZIPFILE = "stage-win32-$(git describe).zip";
26ZIPINPUT = [ 26ZIPINPUT = [
27 "stage.exe", 27 "stage.exe",
28 "bloodfields.stage", 28 "bloodfields.stage",
29 "demo.stage",
29 "libgcc_s_dw2-1.dll", 30 "libgcc_s_dw2-1.dll",
30 "libstdc++-6.dll", 31 "libstdc++-6.dll",
31 "stage.txt" 32 "stage.txt"
@@ -42,6 +43,7 @@ target ZIPFILE
42{ 43{
43 profile "build" 44 profile "build"
44 { 45 {
46 execute("wine strip --strip-all stage.exe");
45 execute("zip -9 ${ZIPFILE} ${ZIPINPUT}"); 47 execute("zip -9 ${ZIPFILE} ${ZIPINPUT}");
46 } 48 }
47} 49}
@@ -54,9 +56,9 @@ target "stage.exe"
54 ]; 56 ];
55 rule "winexe"; 57 rule "winexe";
56 58
57 CXXFLAGS += "-O2 -frtti -fexceptions -Wall -Ilibbu++/support/windows -Isrc"; 59 CXXFLAGS += "-O2 -frtti -fexceptions -Wall -Ilibbu++/support/windows -Isrc -Ilibgats";
58 60
59 LDFLAGS += "-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -lmingw32 -Llibbu++ -lbu++win -Llibbu++/support/windows -lbz2 -Wl,-subsystem,console"; 61 LDFLAGS += "-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -lmingw32 -Llibbu++ -lbu++win -Llibbu++/support/windows -lbz2 -Wl,-subsystem,console -Llibgats -lgatswin";
60 62
61 CXXFLAGS += "-Ilibbu++"; 63 CXXFLAGS += "-Ilibbu++";
62} 64}
diff --git a/src/gamestate.cpp b/src/gamestate.cpp
index 0b721d4..b87f658 100644
--- a/src/gamestate.cpp
+++ b/src/gamestate.cpp
@@ -5,6 +5,8 @@
5#include "astleaf.h" 5#include "astleaf.h"
6#include "astleafliteral.h" 6#include "astleafliteral.h"
7 7
8#include <gats/types.h>
9
8#include <bu/sio.h> 10#include <bu/sio.h>
9using namespace Bu; 11using namespace Bu;
10 12
@@ -20,6 +22,13 @@ GameState::~GameState()
20{ 22{
21} 23}
22 24
25Gats::Object *GameState::toGats() const
26{
27 Gats::Dictionary *pRoot = new Gats::Dictionary;
28
29 Gats::Dictionary *pSit = pRoot->insertDict("situations");
30}
31
23void GameState::parse( class AstBranch *pAst ) 32void GameState::parse( class AstBranch *pAst )
24{ 33{
25 if( pAst->getType() != AstNode::tScope ) 34 if( pAst->getType() != AstNode::tScope )
diff --git a/src/gamestate.h b/src/gamestate.h
index e139dfe..1d6d491 100644
--- a/src/gamestate.h
+++ b/src/gamestate.h
@@ -9,12 +9,19 @@
9class Game; 9class Game;
10class Interface; 10class Interface;
11 11
12namespace Gats
13{
14 class Object;
15}
16
12class GameState 17class GameState
13{ 18{
14public: 19public:
15 GameState( Game *pGame, Interface *pIface ); 20 GameState( Game *pGame, Interface *pIface );
16 virtual ~GameState(); 21 virtual ~GameState();
17 22
23 Gats::Object *toGats() const;
24
18 Interface *getInterface() { return pIface; } 25 Interface *getInterface() { return pIface; }
19 26
20 void parse( class AstBranch *pAst ); 27 void parse( class AstBranch *pAst );