From 443035526dcdc02af8ae7546f29506c982013880 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 17 Jan 2005 16:17:30 +0000 Subject: Got stuff to work with Dev-C++ --- src/astar.h | 6 +----- src/being.cpp | 1 - src/being.h | 2 +- src/graphic/graphic.cpp | 1 + src/gui/login.cpp | 1 + src/gui/login.h | 12 ++---------- src/main.cpp | 2 +- src/main.h | 2 +- src/net/network.h | 3 +-- src/net/protocol.cpp | 10 ++++++++++ src/net/protocol.h | 10 ---------- 11 files changed, 19 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/astar.h b/src/astar.h index e5cc3809..feafb7d7 100644 --- a/src/astar.h +++ b/src/astar.h @@ -1,10 +1,6 @@ #ifndef _ASTAR_H #define _ASTAR_H -#ifdef WIN32 - #pragma warning (disable:4312) -#endif - #include "map.h" #include "being.h" @@ -19,7 +15,7 @@ extern int G_cost[MAP_WIDTH+1][MAP_HEIGHT+1]; void ReadPath(int pathfinderID,int currentX,int currentY, int pixelsPerFrame); int ReadPathX(int pathfinderID,int pathLocation); int ReadPathY(int pathfinderID,int pathLocation); -void RenderScreen (bool stepByStep=false); +void RenderScreen (bool stepByStep = false); PATH_NODE *find_path(int pathfinderID,int startingX, int startingY, int targetX, int targetY); void ReadPath(int pathfinderID); diff --git a/src/being.cpp b/src/being.cpp index 095a48ca..18b78289 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -22,7 +22,6 @@ */ #include - #include "astar.h" #include "being.h" diff --git a/src/being.h b/src/being.h index ce6b8433..072cc9ae 100644 --- a/src/being.h +++ b/src/being.h @@ -24,7 +24,7 @@ #ifndef _TMW_BEING_H #define _TMW_BEING_H -#include "./net/protocol.h" +#include "net/protocol.h" #include struct PATH_NODE { diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 5ee5df87..e444ba7a 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -26,6 +26,7 @@ #include "../gui/textfield.h" #include "../gui/status.h" #include "../main.h" +#include "../being.h" SDL_Surface *screen; diff --git a/src/gui/login.cpp b/src/gui/login.cpp index b5104204..b0ee3076 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -29,6 +29,7 @@ #include "passwordfield.h" #include "ok_dialog.h" #include "../graphic/graphic.h" +#include "../main.h" LoginDialog::LoginDialog(): Window("Login") diff --git a/src/gui/login.h b/src/gui/login.h index 4acec971..43c9d23a 100644 --- a/src/gui/login.h +++ b/src/gui/login.h @@ -24,18 +24,10 @@ #ifndef _TMW_LOGIN_H #define _TMW_LOGIN_H -#ifdef WIN32 - #pragma warning (disable:4312) -#endif - -#include "../main.h" -#include "../log.h" -#include "../net/network.h" -#include "gui.h" +#include +#include #include "window.h" -extern Configuration config; - /** * The login dialog. * diff --git a/src/main.cpp b/src/main.cpp index c1d64426..17307209 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -262,7 +262,7 @@ void exit_engine() { } /** Main */ -int main() { +int main(int argc, char *argv[]) { init_engine(); SDL_Event event; diff --git a/src/main.h b/src/main.h index d88ceb13..9444f75b 100644 --- a/src/main.h +++ b/src/main.h @@ -24,9 +24,9 @@ #ifndef _TMW_MAIN_H #define _TMW_MAIN_H -#include "configuration.h" #include "gui/login.h" #include "gui/gui.h" +#include "configuration.h" #include "graphic/spriteset.h" #include "resources/image.h" #include "log.h" diff --git a/src/net/network.h b/src/net/network.h index 73b6c9ef..2564c801 100644 --- a/src/net/network.h +++ b/src/net/network.h @@ -27,8 +27,7 @@ #ifndef WIN32 #include "win2linux.h" #else -#include "allegro.h" -#include "winalleg.h" +#include #endif #include diff --git a/src/net/protocol.cpp b/src/net/protocol.cpp index 6a519a0f..bca630b1 100644 --- a/src/net/protocol.cpp +++ b/src/net/protocol.cpp @@ -21,7 +21,17 @@ * $Id$ */ +#include "../main.h" +#include "../being.h" #include "protocol.h" +#include "network.h" + +#ifdef WIN32 +#include +#else +#include "win2linux.h" +#endif + short packet_lengths[] = { 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/net/protocol.h b/src/net/protocol.h index 4cc66356..11eee3a9 100644 --- a/src/net/protocol.h +++ b/src/net/protocol.h @@ -24,16 +24,6 @@ #ifndef _TMW_PROTOCOL_H #define _TMW_PROTOCOL_H -#include "../main.h" -#include "../being.h" - -#ifdef WIN32 -#include -#else -#include "win2linux.h" -#endif - - /** Packet length by id */ short get_length(short id); -- cgit v1.2.3-70-g09d2