From 525fd10cc5263731636ac9c76a4fa9ccb7a3e420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Vu=C4=8Dica?= Date: Tue, 8 Sep 2009 22:30:20 +0000 Subject: [PATCH] * building under msvc 2008 express (project adequately upgraded) --- YATC.sln | 27 +- YATC.vcproj | 904 ++++++++++++++++++++++++++++++++++++++++++ YATCce.vcproj | 15 +- gamecontent/viplist.h | 4 + gm_debug.cpp | 7 +- gm_gameworld.cpp | 2 +- sprite.cpp | 5 +- ui/battlewindow.h | 6 + ui/skills.h | 2 +- ui/tutorialhints.cpp | 4 +- ui/uicontainer.h | 2 +- ui/uishop.h | 2 +- ui/uitrade.h | 2 +- ui/vipwindow.h | 2 +- util.cpp | 4 +- 15 files changed, 963 insertions(+), 25 deletions(-) create mode 100644 YATC.vcproj diff --git a/YATC.sln b/YATC.sln index 5bd3b47f..ec71f09b 100644 --- a/YATC.sln +++ b/YATC.sln @@ -1,20 +1,43 @@  -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YATCce", "YATCce.vcproj", "{D89FBF4C-F2B1-4653-A23D-8CD80CD93E9E}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YATC", "YATC.vcproj", "{D9ED41A4-EEDF-46FB-9AB4-38407DB27892}" + ProjectSection(ProjectDependencies) = postProject + {214308DE-1919-4566-AE4F-2940734A80B5} = {214308DE-1919-4566-AE4F-2940734A80B5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLICT", "..\glict\GLICT.vcproj", "{214308DE-1919-4566-AE4F-2940734A80B5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4) + Debug|Win32 = Debug|Win32 Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4) + Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D89FBF4C-F2B1-4653-A23D-8CD80CD93E9E}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) {D89FBF4C-F2B1-4653-A23D-8CD80CD93E9E}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) {D89FBF4C-F2B1-4653-A23D-8CD80CD93E9E}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) + {D89FBF4C-F2B1-4653-A23D-8CD80CD93E9E}.Debug|Win32.ActiveCfg = Debug|Pocket PC 2003 (ARMV4) {D89FBF4C-F2B1-4653-A23D-8CD80CD93E9E}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) {D89FBF4C-F2B1-4653-A23D-8CD80CD93E9E}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) {D89FBF4C-F2B1-4653-A23D-8CD80CD93E9E}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) + {D89FBF4C-F2B1-4653-A23D-8CD80CD93E9E}.Release|Win32.ActiveCfg = Release|Pocket PC 2003 (ARMV4) + {D9ED41A4-EEDF-46FB-9AB4-38407DB27892}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Win32 + {D9ED41A4-EEDF-46FB-9AB4-38407DB27892}.Debug|Win32.ActiveCfg = Debug|Win32 + {D9ED41A4-EEDF-46FB-9AB4-38407DB27892}.Debug|Win32.Build.0 = Debug|Win32 + {D9ED41A4-EEDF-46FB-9AB4-38407DB27892}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Win32 + {D9ED41A4-EEDF-46FB-9AB4-38407DB27892}.Release|Win32.ActiveCfg = Release|Win32 + {D9ED41A4-EEDF-46FB-9AB4-38407DB27892}.Release|Win32.Build.0 = Release|Win32 + {214308DE-1919-4566-AE4F-2940734A80B5}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Win32 + {214308DE-1919-4566-AE4F-2940734A80B5}.Debug|Win32.ActiveCfg = Debug|Win32 + {214308DE-1919-4566-AE4F-2940734A80B5}.Debug|Win32.Build.0 = Debug|Win32 + {214308DE-1919-4566-AE4F-2940734A80B5}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Win32 + {214308DE-1919-4566-AE4F-2940734A80B5}.Release|Win32.ActiveCfg = Release|Win32 + {214308DE-1919-4566-AE4F-2940734A80B5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/YATC.vcproj b/YATC.vcproj new file mode 100644 index 00000000..902d16e9 --- /dev/null +++ b/YATC.vcproj @@ -0,0 +1,904 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/YATCce.vcproj b/YATCce.vcproj index 1af19318..ab00d949 100644 --- a/YATCce.vcproj +++ b/YATCce.vcproj @@ -1,11 +1,12 @@  #include +#if !defined(_MSC_VER) #include +#else +#include // sdl conveniently gives us stdints under msvc +#endif class VipEntry { public: diff --git a/gm_debug.cpp b/gm_debug.cpp index d475893b..54023c9a 100644 --- a/gm_debug.cpp +++ b/gm_debug.cpp @@ -48,10 +48,12 @@ extern Connection* g_connection; extern bool g_running; +#ifdef GMDEBUG_STACKPANEL_TEST #include "stackpanel.h" #define YSPWINDOWS 5 static yatcStackPanel yatcstackpanel; static glictWindow yspwTest[YSPWINDOWS]; +#endif #ifdef SDLTTF_EXPERIMENT #warning Compiling with SDL_ttf test. If you dont have SDL_ttf library, undefine SDLTTF_EXPERIMENT. @@ -252,7 +254,8 @@ GM_Debug::GM_Debug() grid.addItem("Sure?", NULL, NULL); grid.setOnClick(cb3); - desktop.AddObject(&yatcstackpanel); +#ifdef GMDEBUG_STACKPANEL_TEST + desktop.AddObject(&yatcstackpanel); yatcstackpanel.SetPos(400,100); yatcstackpanel.SetHeight(200); yatcstackpanel.SetWidth(100); @@ -264,7 +267,7 @@ GM_Debug::GM_Debug() yspwTest[i].SetCaption(s.str().c_str()); yatcstackpanel.AddObject(&yspwTest[i]); } - +#endif popup = NULL; killpopup = false; diff --git a/gm_gameworld.cpp b/gm_gameworld.cpp index 8ef24158..64a9bcd7 100644 --- a/gm_gameworld.cpp +++ b/gm_gameworld.cpp @@ -498,7 +498,7 @@ void GM_Gameworld::keyPress (int key) } else if (msg[0] == '#') { - if (tolower(msg[1]) == 'y' and msg[2] == ' ') + if (tolower(msg[1]) == 'y' && msg[2] == ' ') { m_protocol->sendSay(SPEAK_YELL, msg.substr(3)); sent = true; diff --git a/sprite.cpp b/sprite.cpp index bcfe0a3d..ddbe9fb1 100644 --- a/sprite.cpp +++ b/sprite.cpp @@ -562,11 +562,8 @@ void Sprite::Stretch (float w, float h, int smooth, bool force) return; // DEBUGPRINT(DEBUGPRINT_LEVEL_OBLIGATORY, DEBUGPRINT_NORMAL, "Stretching to %g %g\n", w, h); -#ifndef _MSC_VER + m_stretchimage = zoomSurface(img, w/img->w, h/img->h, smooth); -#else - return; -#endif // DEBUGPRINT(DEBUGPRINT_LEVEL_OBLIGATORY, DEBUGPRINT_NORMAL, "New size: %d %d\n", m_stretchimage->w, m_stretchimage->h); diff --git a/ui/battlewindow.h b/ui/battlewindow.h index 9a43de55..50e3dea7 100644 --- a/ui/battlewindow.h +++ b/ui/battlewindow.h @@ -24,6 +24,12 @@ #include #include +#ifndef _MSC_VER +#include +#else +#include // uint8 and friends are conveniently defined by sdl +#endif + #include "../stackpanel.h" #include "../popup.h" diff --git a/ui/skills.h b/ui/skills.h index 86a5d269..6883d18f 100644 --- a/ui/skills.h +++ b/ui/skills.h @@ -38,7 +38,7 @@ #define gettext(x) (x) #endif -#include "stackpanel.h" +#include "../stackpanel.h" class sbvlPanel_t; diff --git a/ui/tutorialhints.cpp b/ui/tutorialhints.cpp index f8ab58c1..a18ae2ce 100644 --- a/ui/tutorialhints.cpp +++ b/ui/tutorialhints.cpp @@ -27,8 +27,8 @@ #define gettext(x) (x) #endif #include "tutorialhints.h" -#include "product.h" -#include "util.h" +#include "../product.h" +#include "../util.h" UITutorialHints::UITutorialHints() { // The following text titled "Tutorial Hints" is written by Ivan Vucica. diff --git a/ui/uicontainer.h b/ui/uicontainer.h index 804da10b..7e3cc2a4 100644 --- a/ui/uicontainer.h +++ b/ui/uicontainer.h @@ -28,7 +28,7 @@ #include #include "../defines.h" #include "../popup.h" -#include "stackpanel.h" +#include "../stackpanel.h" class winContainer_t : public yatcStackPanelWindow { public: diff --git a/ui/uishop.h b/ui/uishop.h index f350551b..87457775 100644 --- a/ui/uishop.h +++ b/ui/uishop.h @@ -31,7 +31,7 @@ #include "../gamecontent/item.h" #include "../gamecontent/shop.h" #include "../skin.h" -#include "stackpanel.h" +#include "../stackpanel.h" #include diff --git a/ui/uitrade.h b/ui/uitrade.h index a92b783c..64a25eab 100644 --- a/ui/uitrade.h +++ b/ui/uitrade.h @@ -27,7 +27,7 @@ #include "../gamecontent/container.h" #include #include "../defines.h" -#include "stackpanel.h" +#include "../stackpanel.h" class winTrade_t: public yatcStackPanelWindow { public: diff --git a/ui/vipwindow.h b/ui/vipwindow.h index 1428a411..928cd8b8 100644 --- a/ui/vipwindow.h +++ b/ui/vipwindow.h @@ -25,7 +25,7 @@ #include #include -#include "stackpanel.h" +#include "../stackpanel.h" #include "../popup.h" class sbvlPanel_t; diff --git a/util.cpp b/util.cpp index ad4f5eb0..b22590a6 100644 --- a/util.cpp +++ b/util.cpp @@ -60,7 +60,7 @@ void NativeGUIError(const char* text, const char *title) { #endif #ifdef WIN32 #ifndef WINCE - MessageBox(HWND_DESKTOP, text, title, MB_ICONSTOP); + MessageBoxA(HWND_DESKTOP, text, title, MB_ICONSTOP); #else int a, b; @@ -317,7 +317,7 @@ openurl(const char *url) // from a post by Gabriele Greco // will use later on #ifdef WIN32 - ShellExecute(GetActiveWindow(), + ShellExecuteA(GetActiveWindow(), "open", url, NULL, NULL, SW_SHOWNORMAL); #elif defined(__APPLE__) char buffer[256];