Merge branch 'GameClient' of https://github.com/dean11/Danbias into GameClient

This commit is contained in:
lindaandersson 2014-02-19 11:31:14 +01:00
commit ad37095a80
22 changed files with 279 additions and 64 deletions

View File

@ -45,6 +45,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GameClient", "Game\GameClie
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utilities", "Misc\Utilities\Utilities.vcxproj", "{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utilities", "Misc\Utilities\Utilities.vcxproj", "{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LevelLoader", "Game\LevelLoader\LevelLoader.vcxproj", "{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -679,6 +681,40 @@ Global
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|x64.Build.0 = Release|x64 {2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|x64.Build.0 = Release|x64
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 {2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|x86.ActiveCfg = Release|Win32
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|x86.Build.0 = Release|Win32 {2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|x86.Build.0 = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|Any CPU.ActiveCfg = Debug|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|Win32.ActiveCfg = Debug|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|Win32.Build.0 = Debug|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|x64.ActiveCfg = Debug|x64
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|x64.Build.0 = Debug|x64
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|x86.ActiveCfg = Debug|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|x86.Build.0 = Debug|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|Any CPU.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|Win32.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|Win32.Build.0 = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|x64.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|x86.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|x86.Build.0 = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|Any CPU.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|Mixed Platforms.Build.0 = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|Win32.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|Win32.Build.0 = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|x64.ActiveCfg = Release|x64
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|x64.Build.0 = Release|x64
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|x86.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|x86.Build.0 = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|Win32.Build.0 = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|x64.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|x86.ActiveCfg = Release|Win32
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|x86.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -692,6 +728,7 @@ Global
{C83A6FAD-E71F-4B1E-9D63-E93E61DDC012} = {20720CA7-795C-45AD-A302-9383A6DD503A} {C83A6FAD-E71F-4B1E-9D63-E93E61DDC012} = {20720CA7-795C-45AD-A302-9383A6DD503A}
{8690FDDF-C5B7-4C42-A337-BD5243F29B85} = {20720CA7-795C-45AD-A302-9383A6DD503A} {8690FDDF-C5B7-4C42-A337-BD5243F29B85} = {20720CA7-795C-45AD-A302-9383A6DD503A}
{2A1BC987-AF42-4500-802D-89CD32FC1309} = {20720CA7-795C-45AD-A302-9383A6DD503A} {2A1BC987-AF42-4500-802D-89CD32FC1309} = {20720CA7-795C-45AD-A302-9383A6DD503A}
{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63} = {20720CA7-795C-45AD-A302-9383A6DD503A}
{C4C76A8D-44C5-4452-9F61-39C7E01CBDB4} = {F156EEBC-0195-4020-8700-4433208DE12B} {C4C76A8D-44C5-4452-9F61-39C7E01CBDB4} = {F156EEBC-0195-4020-8700-4433208DE12B}
{3EA5F14D-2A71-4588-A69D-87C4571C580F} = {F156EEBC-0195-4020-8700-4433208DE12B} {3EA5F14D-2A71-4588-A69D-87C4571C580F} = {F156EEBC-0195-4020-8700-4433208DE12B}
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B} = {1322B12B-5E37-448A-AAAF-F637460DCB23} {7E3990D2-3D94-465C-B58D-64A74B3ECF9B} = {1322B12B-5E37-448A-AAAF-F637460DCB23}

View File

@ -106,7 +106,7 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>DANBIAS_GAME_DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>DANBIAS_GAME_DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;$(SolutionDir)Game\LevelLoader</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
@ -123,7 +123,7 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>DANBIAS_GAME_DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>DANBIAS_GAME_DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;$(SolutionDir)Game\LevelLoader</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
@ -142,7 +142,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>DANBIAS_GAME_DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>DANBIAS_GAME_DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;$(SolutionDir)Game\LevelLoader</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
@ -163,7 +163,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>DANBIAS_GAME_DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>DANBIAS_GAME_DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;$(SolutionDir)Game\LevelLoader</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
@ -196,6 +196,9 @@
<ProjectReference Include="..\GameServer\GameServer.vcxproj"> <ProjectReference Include="..\GameServer\GameServer.vcxproj">
<Project>{143bd516-20a1-4890-a3e4-f8bfd02220e7}</Project> <Project>{143bd516-20a1-4890-a3e4-f8bfd02220e7}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\LevelLoader\LevelLoader.vcxproj">
<Project>{6391e709-d9fa-4fef-a3b9-4343db5a0c63}</Project>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="DanBiasGame_Impl.cpp" /> <ClCompile Include="DanBiasGame_Impl.cpp" />
@ -213,10 +216,6 @@
<ClCompile Include="GameClientState\GameClientState.cpp" /> <ClCompile Include="GameClientState\GameClientState.cpp" />
<ClCompile Include="GameClientState\GameState.cpp" /> <ClCompile Include="GameClientState\GameState.cpp" />
<ClCompile Include="GameClientState\LanMenuState.cpp" /> <ClCompile Include="GameClientState\LanMenuState.cpp" />
<ClCompile Include="GameClientState\LevelLoader\LevelLoader.cpp" />
<ClCompile Include="GameClientState\LevelLoader\LevelParser.cpp" />
<ClCompile Include="GameClientState\LevelLoader\Loader.cpp" />
<ClCompile Include="GameClientState\LevelLoader\ParseFunctions.cpp" />
<ClCompile Include="GameClientState\LobbyAdminState.cpp" /> <ClCompile Include="GameClientState\LobbyAdminState.cpp" />
<ClCompile Include="GameClientState\LobbyState.cpp" /> <ClCompile Include="GameClientState\LobbyState.cpp" />
<ClCompile Include="GameClientState\C_Object.cpp" /> <ClCompile Include="GameClientState\C_Object.cpp" />
@ -240,11 +239,6 @@
<ClInclude Include="GameClientState\GameClientState.h" /> <ClInclude Include="GameClientState\GameClientState.h" />
<ClInclude Include="GameClientState\GameState.h" /> <ClInclude Include="GameClientState\GameState.h" />
<ClInclude Include="GameClientState\LanMenuState.h" /> <ClInclude Include="GameClientState\LanMenuState.h" />
<ClInclude Include="GameClientState\LevelLoader\LevelLoader.h" />
<ClInclude Include="GameClientState\LevelLoader\LevelParser.h" />
<ClInclude Include="GameClientState\LevelLoader\Loader.h" />
<ClInclude Include="GameClientState\LevelLoader\ObjectDefines.h" />
<ClInclude Include="GameClientState\LevelLoader\ParseFunctions.h" />
<ClInclude Include="GameClientState\LobbyAdminState.h" /> <ClInclude Include="GameClientState\LobbyAdminState.h" />
<ClInclude Include="GameClientState\MainState.h" /> <ClInclude Include="GameClientState\MainState.h" />
<ClInclude Include="GameClientState\NetLoadState.h" /> <ClInclude Include="GameClientState\NetLoadState.h" />

View File

@ -126,6 +126,9 @@ void LanMenuState::ChangeState( ClientState next )
// attempt to connect to lobby // attempt to connect to lobby
if( !this->privData->nwClient->Connect(this->privData->connectPort, (*this->privData->connectIP)[0]) ) if( !this->privData->nwClient->Connect(this->privData->connectPort, (*this->privData->connectIP)[0]) )
return; return;
//this->privData->nwClient->Disconnect();
//if( !this->privData->nwClient->Reconnect() )
//return;
break; break;
default: break; default: break;
} }

View File

@ -2,7 +2,7 @@
#include "NetworkClient.h" #include "NetworkClient.h"
#include "OysterMath.h" #include "OysterMath.h"
#include "Protocols.h" #include "Protocols.h"
#include "LevelLoader\LevelLoader.h" #include "LevelLoader.h"
#include "Utilities.h" #include "Utilities.h"
#include "C_obj\C_StaticObj.h" #include "C_obj\C_StaticObj.h"
#include "C_obj\C_DynamicObj.h" #include "C_obj\C_DynamicObj.h"

View File

@ -12,7 +12,7 @@
#include "GameLogicDef.h" #include "GameLogicDef.h"
#include "GameLogicStates.h" #include "GameLogicStates.h"
#include <OysterMath.h> #include <OysterMath.h>
#include "LevelLoader\ObjectDefines.h" #include "..\LevelLoader\ObjectDefines.h"
#include "DynamicArray.h" #include "DynamicArray.h"

View File

@ -99,7 +99,7 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;$(SolutionDir)Game\LevelLoader</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link> <Link>
@ -113,7 +113,7 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;$(SolutionDir)Game\LevelLoader</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link> <Link>
@ -129,7 +129,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;$(SolutionDir)Game\LevelLoader</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link> <Link>
@ -147,7 +147,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;$(SolutionDir)Game\LevelLoader</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link> <Link>
@ -172,12 +172,7 @@
<ClInclude Include="IAttatchment.h" /> <ClInclude Include="IAttatchment.h" />
<ClInclude Include="JumpPad.h" /> <ClInclude Include="JumpPad.h" />
<ClInclude Include="Level.h" /> <ClInclude Include="Level.h" />
<ClInclude Include="LevelLoader\LevelLoader.h" />
<ClInclude Include="LevelLoader\Loader.h" />
<ClInclude Include="Object.h" /> <ClInclude Include="Object.h" />
<ClInclude Include="LevelLoader\ObjectDefines.h" />
<ClInclude Include="LevelLoader\LevelParser.h" />
<ClInclude Include="LevelLoader\ParseFunctions.h" />
<ClInclude Include="Player.h" /> <ClInclude Include="Player.h" />
<ClInclude Include="Portal.h" /> <ClInclude Include="Portal.h" />
<ClInclude Include="StaticObject.h" /> <ClInclude Include="StaticObject.h" />
@ -198,11 +193,7 @@
<ClCompile Include="IAttatchment.cpp" /> <ClCompile Include="IAttatchment.cpp" />
<ClCompile Include="JumpPad.cpp" /> <ClCompile Include="JumpPad.cpp" />
<ClCompile Include="Level.cpp" /> <ClCompile Include="Level.cpp" />
<ClCompile Include="LevelLoader\LevelLoader.cpp" />
<ClCompile Include="LevelLoader\Loader.cpp" />
<ClCompile Include="LevelLoader\LevelParser.cpp" />
<ClCompile Include="Object.cpp" /> <ClCompile Include="Object.cpp" />
<ClCompile Include="LevelLoader\ParseFunctions.cpp" />
<ClCompile Include="Player.cpp" /> <ClCompile Include="Player.cpp" />
<ClCompile Include="Portal.cpp" /> <ClCompile Include="Portal.cpp" />
<ClCompile Include="StaticObject.cpp" /> <ClCompile Include="StaticObject.cpp" />
@ -223,6 +214,9 @@
<ProjectReference Include="..\..\Physics\OysterPhysics3D\OysterPhysics3D.vcxproj"> <ProjectReference Include="..\..\Physics\OysterPhysics3D\OysterPhysics3D.vcxproj">
<Project>{3ea5f14d-2a71-4588-a69d-87c4571c580f}</Project> <Project>{3ea5f14d-2a71-4588-a69d-87c4571c580f}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\LevelLoader\LevelLoader.vcxproj">
<Project>{6391e709-d9fa-4fef-a3b9-4343db5a0c63}</Project>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ShowAllFiles>false</ShowAllFiles> <ShowAllFiles>true</ShowAllFiles>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory> <LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>

View File

@ -4,6 +4,10 @@
#include "JumpPad.h" #include "JumpPad.h"
#include "ExplosiveCrate.h" #include "ExplosiveCrate.h"
#include "Portal.h" #include "Portal.h"
//Conversion from wstring to string
#include <codecvt>
using namespace GameLogic; using namespace GameLogic;
using namespace Utility::DynamicMemory; using namespace Utility::DynamicMemory;
using namespace Oyster::Physics; using namespace Oyster::Physics;
@ -200,9 +204,16 @@ ICustomBody* Level::InitRigidBodySphere( const ObjectHeader* obj)
bool Level::InitiateLevel(std::wstring levelPath) bool Level::InitiateLevel(std::wstring levelPath)
{ {
LevelLoader ll; LevelLoader ll;
ll.SetFolderPath(L"..\\Content\\Worlds\\"); ll.SetFolderPath("..\\Content\\Worlds\\");
std::vector<Utility::DynamicMemory::SmartPointer<ObjectTypeHeader>> objects; std::vector<Utility::DynamicMemory::SmartPointer<ObjectTypeHeader>> objects;
objects = ll.LoadLevel(levelPath);
//Convert from wstring to string
typedef std::codecvt_utf8<wchar_t> convert_typeX;
std::wstring_convert<convert_typeX, wchar_t> converterX;
std::string convertedLevelPath = converterX.to_bytes(levelPath);
objects = ll.LoadLevel(convertedLevelPath);
if(objects.size() == 0) if(objects.size() == 0)
return false; return false;

View File

@ -14,7 +14,7 @@
#include "PhysicsAPI.h" #include "PhysicsAPI.h"
#include "TeamManager.h" #include "TeamManager.h"
#include "DynamicArray.h" #include "DynamicArray.h"
#include "LevelLoader/LevelLoader.h" #include "LevelLoader.h"
namespace GameLogic namespace GameLogic
{ {

View File

@ -1,28 +0,0 @@
//////////////////////////////////
// Created by Sam Svensson 2013 //
//////////////////////////////////
#ifndef PARSERFUNCTIONS_H
#define PARSERFUNCTIONS_H
#include "ObjectDefines.h"
namespace GameLogic
{
namespace LevelFileLoader
{
/*
These functions will copy data from where the buffer pointer points.
header is the destination where the data will be copied.
size is either the size of the data to be copied (if it is NOT sent by reference).
Or the current index that is being used to parse the entire file (if it is sent by reference) this means you have to increase size with the appropiate size after you have copied.
*/
void ParseObject(char* buffer, void *header, int size);
void ParseObject(char* buffer, ObjectHeader& header, int& size , bool loadCgf);
void ParseLevelMetaData(char* buffer, LevelMetaData &header, int &size);
void ParseBoundingVolume(char* buffer, LevelLoaderInternal::BoundingVolume& volume, int &size);
}
}
#endif

View File

@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}</ProjectGuid>
<RootNamespace>LevelLoader</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)..\External\Lib\$(ProjectName)\</OutDir>
<TargetName>$(ProjectName)_$(PlatformShortName)D</TargetName>
<IntDir>$(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)..\External\Lib\$(ProjectName)\</OutDir>
<TargetName>$(ProjectName)_$(PlatformShortName)</TargetName>
<IntDir>$(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)..\External\Lib\$(ProjectName)\</OutDir>
<TargetName>$(ProjectName)_$(PlatformShortName)D</TargetName>
<IntDir>$(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)..\External\Lib\$(ProjectName)\</OutDir>
<TargetName>$(ProjectName)_$(PlatformShortName)</TargetName>
<IntDir>$(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<Lib>
<AdditionalDependencies>
</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)Misc\Utilities;</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="LevelLoader.cpp" />
<ClCompile Include="LevelParser.cpp" />
<ClCompile Include="Loader.cpp" />
<ClCompile Include="ParseFunctions.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="LevelLoader.h" />
<ClInclude Include="LevelParser.h" />
<ClInclude Include="Loader.h" />
<ClInclude Include="ObjectDefines.h" />
<ClInclude Include="ParseFunctions.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Misc\Utilities\Utilities.vcxproj">
<Project>{2ec4dded-8f75-4c86-a10b-e1e8eb29f3ee}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

View File

@ -98,7 +98,7 @@ std::vector<SmartPointer<ObjectTypeHeader>> LevelParser::Parse(std::string filen
case ObjectSpecialType_Spike: case ObjectSpecialType_Spike:
case ObjectSpecialType_SpikeBox: case ObjectSpecialType_SpikeBox:
case ObjectSpecialType_RedExplosiveBox: case ObjectSpecialType_RedExplosiveBox:
case ObjectSpecialType_StandarsBox: case ObjectSpecialType_StandardBox:
case ObjectSpecialType_Stone: case ObjectSpecialType_Stone:
case ObjectSpecialType_Building: case ObjectSpecialType_Building:
{ {

View File

@ -31,7 +31,7 @@ namespace GameLogic
ObjectSpecialType_World, //Always the main celestial body ObjectSpecialType_World, //Always the main celestial body
ObjectSpecialType_Building, ObjectSpecialType_Building,
ObjectSpecialType_Stone, ObjectSpecialType_Stone,
ObjectSpecialType_StandarsBox, ObjectSpecialType_StandardBox,
ObjectSpecialType_RedExplosiveBox, ObjectSpecialType_RedExplosiveBox,
ObjectSpecialType_SpikeBox, ObjectSpecialType_SpikeBox,
ObjectSpecialType_Spike, ObjectSpecialType_Spike,
@ -40,6 +40,7 @@ namespace GameLogic
ObjectSpecialType_JumpPad, ObjectSpecialType_JumpPad,
ObjectSpecialType_Portal, ObjectSpecialType_Portal,
ObjectSpecialType_Player, ObjectSpecialType_Player,
ObjectSpecialType_Generic,
ObjectSpecialType_Count, ObjectSpecialType_Count,

View File

@ -117,7 +117,7 @@ namespace GameLogic
int temp; int temp;
for(int i = 0; i < tempSize; i++) for(int i = 0; i < (int)tempSize; i++)
{ {
memcpy(&temp, &buffer[start], 4); memcpy(&temp, &buffer[start], 4);
start += 4; start += 4;

View File

@ -319,7 +319,23 @@ bool NetworkClient::Connect(unsigned short port, std::wstring serverIP)
bool NetworkClient::Reconnect() bool NetworkClient::Reconnect()
{ {
return this->privateData->connection.Reconnect(); if(this->IsConnected())
return false;
//if(this->privateData)
//return false;
if(!this->privateData) this->privateData = new PrivateData();
int result = this->privateData->connection.Reconnect();
if(result != 0)
{
return false;
}
this->privateData->owner = 0;
this->privateData->parent = this;
this->privateData->thread.Start();
return true;
} }
void NetworkClient::Disconnect() void NetworkClient::Disconnect()