From f831ae2bd9d0f75ae1bcfd415d4b6ef676a135d7 Mon Sep 17 00:00:00 2001 From: "egon.rath" Date: Thu, 22 Apr 2010 08:44:10 +0000 Subject: [PATCH] Win32 Solution added --- Engine.cpp | 10 +++- Engine.h | 2 + EventHandler.cpp | 1 + main.cpp | 6 ++ win32/b3view.sln | 20 +++++++ win32/b3view.suo | Bin 0 -> 10752 bytes win32/b3view.vcxproj | 107 +++++++++++++++++++++++++++++++++++ win32/b3view.vcxproj.filters | 60 ++++++++++++++++++++ win32/b3view.vcxproj.user | 3 + 9 files changed, 207 insertions(+), 2 deletions(-) create mode 100644 win32/b3view.sln create mode 100644 win32/b3view.suo create mode 100644 win32/b3view.vcxproj create mode 100644 win32/b3view.vcxproj.filters create mode 100644 win32/b3view.vcxproj.user diff --git a/Engine.cpp b/Engine.cpp index 46fdfef..7544826 100644 --- a/Engine.cpp +++ b/Engine.cpp @@ -99,7 +99,11 @@ void Engine::checkResize() Engine::Engine() { - m_Device = createDevice( EDT_OPENGL, dimension2d( 1024, 768 ), 32, false, false, false, 0 ); +#if WIN32 + m_Device = createDevice( EDT_DIRECT3D9, dimension2d( 1024, 768 ), 32, false, false, false, 0 ); +#else + m_Device = createDevice( EDT_OPENGL, dimension2d( 1024, 768 ), 32, false, false, false, 0 ); +#endif m_Device->setResizable( true ); m_EventHandler = new EventHandler( m_Device ); @@ -108,7 +112,9 @@ Engine::Engine() m_Driver = m_Device->getVideoDriver(); m_Scene = m_Device->getSceneManager(); - m_Device->setWindowCaption( L"Blitz3D Viewer" ); + wstringstream windowTitle; + windowTitle << L"Blitz3D Viewer [" << m_Driver->getName() << L"]"; + m_Device->setWindowCaption( windowTitle.str().c_str() ); setupScene(); diff --git a/Engine.h b/Engine.h index 9063906..f2422b1 100644 --- a/Engine.h +++ b/Engine.h @@ -6,6 +6,7 @@ class UserInterface; class View; #include +#include #include #include @@ -16,6 +17,7 @@ class View; using std::cout; using std::endl; using std::wstring; +using std::wstringstream; using namespace irr; using namespace irr::core; diff --git a/EventHandler.cpp b/EventHandler.cpp index 6137c7f..8dcc756 100644 --- a/EventHandler.cpp +++ b/EventHandler.cpp @@ -15,6 +15,7 @@ EventHandler::~EventHandler() bool EventHandler::addEventReceiver( EventReceiverType type, IEventReceiver *receiver ) { m_EventReceivers->insert( make_pair( type, receiver )); + return true; } // IEventReceiver diff --git a/main.cpp b/main.cpp index 0f963d3..efeb046 100644 --- a/main.cpp +++ b/main.cpp @@ -1,9 +1,15 @@ #include "Engine.h" +#ifdef WIN32 +#include +int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) +#else int main( int argc, char **argv ) +#endif { Engine *engine = new Engine(); engine->run(); delete engine; } + diff --git a/win32/b3view.sln b/win32/b3view.sln new file mode 100644 index 0000000..d5afe3a --- /dev/null +++ b/win32/b3view.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "b3view", "b3view.vcxproj", "{639364D9-A57B-4B61-90D8-7974B3FA3435}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {639364D9-A57B-4B61-90D8-7974B3FA3435}.Debug|Win32.ActiveCfg = Debug|Win32 + {639364D9-A57B-4B61-90D8-7974B3FA3435}.Debug|Win32.Build.0 = Debug|Win32 + {639364D9-A57B-4B61-90D8-7974B3FA3435}.Release|Win32.ActiveCfg = Release|Win32 + {639364D9-A57B-4B61-90D8-7974B3FA3435}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/b3view.suo b/win32/b3view.suo new file mode 100644 index 0000000000000000000000000000000000000000..d5987bf1a3dd11555aa45f5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nC9 z2`lKrvTfK>NnDq+;ek;3%b**;Q4Jm9C(xqOTGplISuKS^r(_pM7@e9 z4lK+0fc>$hEo#U@9O&+b;sESV`X6nN6h(FV%5%ZQ_uGF*{w6eMMq~}_lJaTG+_yxP z&v>pn?U%oZS-J+P%!4lnbKzk1cEfv6^sE@b@ z8SJDIxKqIWDb#X64IR6=1fJx;e4@d^^7zewv*IR@r3Q5Em3u*EKiyIpF?!qdS|{5+ zh+IgBaq4zbaF;mF9+ToC?3|I9rw)eL3StcNf+SYGAlIAOZvm}pklvYj?p(*KODFaW zqX(@mFEPOc@*6;gI&9Tn0cN(lkC1!tanm>A+}972eK9xV>52inOUl@_0ee%HPCOoG ze;n@-oFs6?Yxs2$Q9Bqb&(9D3rS^LD#_jUC*Z#ce{q)@ok1%$mo!U`f@+x=~>$rd% zYZVBpbk7zR;362-l=vi)~RmR&f3% zv5A-#RepE;Q8>al*n}?3{J2U!+Hfug6XidHCOqScD*p>;`|F_FOF(-{^{u0}eIDvZ z-QBXz;AIq;e<_!;Nu4LV*Sg1l2A)upmT6eID&1GZ_?vk$>!I{#Rh{@jfkl z&7%F{{5wYf=Q(TC@qZa@*MshNi_3EZa6EWb7EGh2L-Cj2782LCfY6nS~58^1^f~p=s0ETsl3U&ZpBi(ZxvV`ylaG zqX@qMd*`l=YeQ~yA)k&rZph^D`v>h#QAl(7_$&B*H)zCo80_)BE!#0}<-h0ymFTki9ysk}N&KELe_qEYbg1$1~R=rl}zW{_|^8%6%P zA>?b}@?+|oder$}M4#Ub`rRQH>6ds|#MEvrc*NkvkN)~cjFdZT`t7dUb<`Q|$BU@L z#<(tpWc7nH%Fh=h{r@8z`pR^EeTCKcHs0s|evIQhCmjEK_YPMfmyo9@6hHf4f8v!_ z*PdK?tMRw`_bwhk`-i`CP + + + + Debug + Win32 + + + Release + Win32 + + + + {639364D9-A57B-4B61-90D8-7974B3FA3435} + Win32Proj + win32 + b3view + + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + true + $(SolutionDir)\..\win32_build\ + $(SolutionDir)\..\win32_build\ + + + false + $(SolutionDir)\..\win32_build\ + $(SolutionDir)\..\win32_build\ + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + D:\Prj\irrlicht-1.7.1\include;%(AdditionalIncludeDirectories) + + + Windows + true + D:\Prj\irrlicht-1.7.1\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Irrlicht.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + D:\Prj\irrlicht-1.7.1\include;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + D:\Prj\irrlicht-1.7.1\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Irrlicht.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win32/b3view.vcxproj.filters b/win32/b3view.vcxproj.filters new file mode 100644 index 0000000..1c57014 --- /dev/null +++ b/win32/b3view.vcxproj.filters @@ -0,0 +1,60 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/win32/b3view.vcxproj.user b/win32/b3view.vcxproj.user new file mode 100644 index 0000000..695b5c7 --- /dev/null +++ b/win32/b3view.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file