diff --git a/CMakeLists.txt b/CMakeLists.txt index 1451d55..92e7ecc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,4 +42,5 @@ ADD_EXECUTABLE ( run_asteroids ${ASTEROIDS_SOURCES} ) TARGET_LINK_LIBRARIES ( run_asteroids Engine + oglft ) diff --git a/asteroids/View.cc b/asteroids/View.cc index b5d8530..909f891 100644 --- a/asteroids/View.cc +++ b/asteroids/View.cc @@ -389,8 +389,8 @@ void View::DrawUi () { ViewState current_view_state = GetViewState(); - SelectFont ("console.ttf size=12"); - Engine::GUI::Label (99999, GetStringViewState(current_view_state), 8, 16); +// SelectFont ("console.ttf size=12"); +// Engine::GUI::Label (99999, GetStringViewState(current_view_state), 8, 16); switch (current_view_state) { case ViewStateMainMenu: diff --git a/asteroids/main.cc b/asteroids/main.cc index 90b4925..42c6b4d 100644 --- a/asteroids/main.cc +++ b/asteroids/main.cc @@ -9,10 +9,19 @@ #include "Physics.h" #include "EntityFactory.h" +#ifdef WIN32 +#include +#endif + using namespace std; int main (int argc, char* argv[]) { cout << "Game Start" << endl; + +#ifdef WIN32 + HWND hWnd = GetConsoleWindow(); + ShowWindow( hWnd, SW_HIDE ); +#endif Engine::Engine engine; @@ -39,7 +48,7 @@ int main (int argc, char* argv[]) { else SDL_WM_SetIcon(image,NULL); - SDL_WM_SetCaption("Asteroids -Leaked TechDemo-","Asteroids -Leaked TechDemo-"); + SDL_WM_SetCaption("Asteroids -BETA1-","Asteroids -BETA 1-"); engine.GetView()->SetGridSize (8,8); dynamic_cast(engine.GetPhysics())->SetWorldSize (28, 20); diff --git a/engine/ModelBase.h b/engine/ModelBase.h index d2f2a82..3ef92fd 100644 --- a/engine/ModelBase.h +++ b/engine/ModelBase.h @@ -13,6 +13,10 @@ class Events; class EntityFactoryBase; class OverlayManager; +#ifdef max +#undef max +#endif + const unsigned int NullEntityId = std::numeric_limits::max() - 1; struct EntityBase; diff --git a/engine/libraries/coll2d/CMakeLists.txt b/engine/libraries/coll2d/CMakeLists.txt index 548c17f..dba3743 100644 --- a/engine/libraries/coll2d/CMakeLists.txt +++ b/engine/libraries/coll2d/CMakeLists.txt @@ -17,5 +17,5 @@ SET_TARGET_PROPERTIES ( ${PROJECT_EXECUTABLES} PROPERTIES SUBDIRS (tests) -ADD_LIBRARY ( coll2d SHARED ${COLL2D_SRCS} ) +ADD_LIBRARY ( coll2d STATIC ${COLL2D_SRCS} ) diff --git a/engine/libraries/mathlib/CMakeLists.txt b/engine/libraries/mathlib/CMakeLists.txt index 724a06b..f78b45d 100644 --- a/engine/libraries/mathlib/CMakeLists.txt +++ b/engine/libraries/mathlib/CMakeLists.txt @@ -6,4 +6,4 @@ SET ( SRCS mathlib.cc main.cc ) -ADD_LIBRARY ( mathlib SHARED mathlib.cc mathlib.h) +ADD_LIBRARY ( mathlib STATIC mathlib.cc mathlib.h) diff --git a/engine/libraries/oglft/liboglft/CMakeLists.txt b/engine/libraries/oglft/liboglft/CMakeLists.txt index ef0805c..fb6d0ad 100644 --- a/engine/libraries/oglft/liboglft/CMakeLists.txt +++ b/engine/libraries/oglft/liboglft/CMakeLists.txt @@ -23,7 +23,7 @@ IF( WIN32 ) ADD_DEFINITIONS( -DOGLFT_BUILD ) ENDIF( WIN32 ) -ADD_LIBRARY( oglft SHARED ${sources} ) +ADD_LIBRARY( oglft STATIC ${sources} ) TARGET_LINK_LIBRARIES( oglft ${FREETYPE2_LIBRARIES} diff --git a/engine/libraries/oglft/liboglft/OGLFT.cpp b/engine/libraries/oglft/liboglft/OGLFT.cpp index 19a4514..2bd8b78 100644 --- a/engine/libraries/oglft/liboglft/OGLFT.cpp +++ b/engine/libraries/oglft/liboglft/OGLFT.cpp @@ -31,6 +31,14 @@ #include +// Evil hack to get the callback typedef correct on MSVC9 (see also in +// http://www.gamedev.net/community/forums/topic.asp?topic_id=293825 +#ifdef WIN32 + #undef GLUTessCallback + typedef void (__stdcall *TESSCALLBACK)(void); + #define GLUTessCallback TESSCALLBACK +#endif + namespace OGLFT { // This is the static instance of the FreeType library wrapper ...