summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-13 16:23:14 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-13 16:23:14 +0000
commit7f6f4dfebc463916a8cb82e8abebdecd2ed6e38b (patch)
tree3b875cf008e544e5effcc7edc66bc58d2c68e164
parentd32386353d28093a5d03ad99f161f8133d73e056 (diff)
downloadmana-7f6f4dfebc463916a8cb82e8abebdecd2ed6e38b.tar.gz
mana-7f6f4dfebc463916a8cb82e8abebdecd2ed6e38b.tar.bz2
mana-7f6f4dfebc463916a8cb82e8abebdecd2ed6e38b.tar.xz
mana-7f6f4dfebc463916a8cb82e8abebdecd2ed6e38b.zip
Whee, moving headers around! Also provided makefile.mgw for compiling with MinGW+MSYS.
-rw-r--r--makefile.mgw30
-rw-r--r--src/being.h4
-rw-r--r--src/game.h5
-rw-r--r--src/graphic/graphic.h2
-rw-r--r--src/gui/login.h8
-rw-r--r--src/gui/setup.h4
-rw-r--r--src/main.h22
-rw-r--r--src/map.cpp1
-rw-r--r--src/net/protocol.h9
9 files changed, 59 insertions, 26 deletions
diff --git a/makefile.mgw b/makefile.mgw
new file mode 100644
index 00000000..1f7c565e
--- /dev/null
+++ b/makefile.mgw
@@ -0,0 +1,30 @@
+CXX = g++
+# for debugging
+#CXXFLAGS += -g -march=i686 -O2
+
+# excessive optimizations for pentium pro and later
+CXXFLAGS +=-Wall -march=i686 -O3 -fexpensive-optimizations -pipe -fomit-frame-pointer -funroll-loops -fexceptions
+
+LIBS := -ljgmod -lalfont -lguichan \
+ -lguichan_allegro -lalleg -lws2_32
+
+include file.list
+
+OBJS := $(patsubst src%, obj%, $(patsubst %.cpp, %.o, $(MODULES)))
+
+tmw.exe: $(OBJS)
+ $(CXX) -o tmw $(OBJS) $(LIBS)
+ @echo -
+ @echo -
+ @echo "TYPE ./tmw TO LAUCH THE GAME"
+
+clean:
+ - rm -fv obj/*.o
+ - rm -fv obj/net/*.o
+ - rm -fv obj/gui/*.o
+ - rm -fv obj/sound/*.o
+ - rm -fv obj/graphic/*.o
+ - rm -fv tmw
+
+obj/%.o: src/%.cpp
+ $(CXX) $(CXXFLAGS) -c $< -o $@
diff --git a/src/being.h b/src/being.h
index 48cee019..c1537943 100644
--- a/src/being.h
+++ b/src/being.h
@@ -21,8 +21,8 @@
* By ElvenProgrammer aka Eugenio Favalli (umperio@users.sourceforge.net)
*/
-#ifndef _BEING_H
-#define _BEING_H
+#ifndef _TMW_BEING_H
+#define _TMW_BEING_H
#include "./net/protocol.h"
diff --git a/src/game.h b/src/game.h
index 2ef4f9d8..6b7cc073 100644
--- a/src/game.h
+++ b/src/game.h
@@ -29,14 +29,13 @@
#ifndef _GAME_H
#define _GAME_H
-#include <allegro.h>
-#include <stdio.h>
-
#include "main.h"
#include "./gui/gui.h"
#include "./gui/skill.h"
#include "./gui/stats.h"
#include "./graphic/2xsai.h"
+#include <stdio.h>
+#include <allegro.h>
#define SPEECH_TIME 40
#define EMOTION_TIME 40
diff --git a/src/graphic/graphic.h b/src/graphic/graphic.h
index 4ab0aa32..4c68f933 100644
--- a/src/graphic/graphic.h
+++ b/src/graphic/graphic.h
@@ -28,7 +28,6 @@
#pragma warning (disable:4312)
#endif
-#include <allegro.h>
#include "../game.h"
#include "../map.h"
#include "../being.h"
@@ -40,6 +39,7 @@
#include "../gui/npc.h"
#include "../../data/graphic/gfx_data.h"
#include "image.h"
+#include <allegro.h>
extern BITMAP *buffer, *double_buffer;
extern char speech[255];
diff --git a/src/gui/login.h b/src/gui/login.h
index 8798ddea..e823381d 100644
--- a/src/gui/login.h
+++ b/src/gui/login.h
@@ -26,14 +26,14 @@
#ifndef _LOGIN_H
#define _LOGIN_H
-#include <allegro.h>
-#ifdef WIN32
-#include <winalleg.h>
-#endif
#include "../main.h"
#include "../log.h"
#include "../net/network.h"
#include "gui.h"
+#include <allegro.h>
+#ifdef WIN32
+#include <winalleg.h>
+#endif
// The action listener for the login dialog
class LoginActionListener : public gcn::ActionListener {
diff --git a/src/gui/setup.h b/src/gui/setup.h
index 5c92f136..bb211997 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -6,12 +6,12 @@
#ifndef tmw_included_setup_h
#define tmw_included_setup_h
+#include "gui.h"
+#include "../graphic/graphic.h"
#include <allegro.h>
#ifdef WIN32
#include <winalleg.h>
#endif
-#include "gui.h"
-#include "../graphic/graphic.h"
class Setup {
public:
diff --git a/src/main.h b/src/main.h
index 0578b42a..3d4f424f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -30,24 +30,26 @@
#define CORE_VERSION "0.0.8"
-#include <allegro.h>
-#ifdef WIN32
-#include <winalleg.h>
-#endif
-#include <alfont.h>
-#include <stdio.h>
-
-#include "log.h"
-#include "game.h"
-#include "./net/protocol.h"
+#include <guichan.hpp>
+#include <guichan/allegro.hpp>
#include "./gui/login.h"
#include "./gui/gui.h"
#include "./gui/stats.h"
#include "./gui/char_server.h"
#include "./gui/char_select.h"
#include "./gui/inventory.h"
+#include "log.h"
+#include "game.h"
+#include "./net/protocol.h"
#include "./graphic/2xsai.h"
#include "../data/graphic/gfx_data.h"
+#include <allegro.h>
+#ifdef WIN32
+#include <winalleg.h>
+#endif
+#include <alfont.h>
+#include <stdio.h>
+
#define EXIT 0
#define LOGIN 1
diff --git a/src/map.cpp b/src/map.cpp
index e10bb9fd..154f1adc 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -19,6 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "main.h"
#include "map.h"
#include "log.h"
#include "being.h"
diff --git a/src/net/protocol.h b/src/net/protocol.h
index a56b7599..374024e3 100644
--- a/src/net/protocol.h
+++ b/src/net/protocol.h
@@ -23,8 +23,11 @@
#pragma warning (disable:4312)
#endif
-#ifndef _PROTOCOL_H
-#define _PROTOCOL_H
+#ifndef _TMW_PROTOCOL_H
+#define _TMW_PROTOCOL_H
+
+#include "../main.h"
+#include "../being.h"
#include <allegro.h>
#ifdef WIN32
@@ -34,8 +37,6 @@
#include "win2linux.h"
#endif
-#include "../main.h"
-#include "../being.h"
short get_length(short id);
unsigned short get_x(char *data);