From 09eb0733854da12146570060e84f5f7b4203e1bc Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 19 Jan 2012 11:31:18 -0700 Subject: Added gats, verified in linux and win32. --- default.bld | 4 ++-- mingw.bld | 8 +++++--- src/gamestate.cpp | 9 +++++++++ src/gamestate.h | 7 +++++++ 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" rule "exe"; input files("src/*.y", "src/*.l", "src/*.cpp", "src/version.h"); - CXXFLAGS="-ggdb"; + CXXFLAGS="-ggdb -Ilibgats"; CFLAGS="-ggdb"; FLEXFLAGS="-osrc/parser.yy.c --header-file=src/parser.yy.h"; BISONFLAGS="-d"; - LDFLAGS += "-lbu++ -ldl"; + LDFLAGS += "-lbu++ -ldl -Llibgats -lgats"; } /* diff --git a/mingw.bld b/mingw.bld index 43d1486..407047d 100644 --- a/mingw.bld +++ b/mingw.bld @@ -22,10 +22,11 @@ action "clean" clean: targets(); } -ZIPFILE = "stage-$(git describe).zip"; +ZIPFILE = "stage-win32-$(git describe).zip"; ZIPINPUT = [ "stage.exe", "bloodfields.stage", + "demo.stage", "libgcc_s_dw2-1.dll", "libstdc++-6.dll", "stage.txt" @@ -42,6 +43,7 @@ target ZIPFILE { profile "build" { + execute("wine strip --strip-all stage.exe"); execute("zip -9 ${ZIPFILE} ${ZIPINPUT}"); } } @@ -54,9 +56,9 @@ target "stage.exe" ]; rule "winexe"; - CXXFLAGS += "-O2 -frtti -fexceptions -Wall -Ilibbu++/support/windows -Isrc"; + CXXFLAGS += "-O2 -frtti -fexceptions -Wall -Ilibbu++/support/windows -Isrc -Ilibgats"; - 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"; + 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"; CXXFLAGS += "-Ilibbu++"; } 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 @@ #include "astleaf.h" #include "astleafliteral.h" +#include + #include using namespace Bu; @@ -20,6 +22,13 @@ GameState::~GameState() { } +Gats::Object *GameState::toGats() const +{ + Gats::Dictionary *pRoot = new Gats::Dictionary; + + Gats::Dictionary *pSit = pRoot->insertDict("situations"); +} + void GameState::parse( class AstBranch *pAst ) { 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 @@ class Game; class Interface; +namespace Gats +{ + class Object; +} + class GameState { public: GameState( Game *pGame, Interface *pIface ); virtual ~GameState(); + Gats::Object *toGats() const; + Interface *getInterface() { return pIface; } void parse( class AstBranch *pAst ); -- cgit v1.2.3