parent
5416df6d86
commit
4134836405
|
@ -106,12 +106,12 @@
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>DANBIAS_CLIENT;DANBIAS_GAME_DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>DANBIAS_CLIENT;DANBIAS_GAME_DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)OysterMath;$(SolutionDir)GameLogic;$(SolutionDir)Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc;$(SolutionDir)OysterMath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)OysterMath;$(SolutionDir)Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc;$(SolutionDir)OysterMath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>OysterGraphics_$(PlatformShortName)D.lib;Input_$(PlatformShortName)D.lib;GameLogic_$(PlatformShortName)D.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>OysterGraphics_$(PlatformShortName)D.lib;Input_$(PlatformShortName)D.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<DelayLoadDLLs>OysterGraphics_$(PlatformShortName)D.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
<DelayLoadDLLs>OysterGraphics_$(PlatformShortName)D.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
@ -123,12 +123,12 @@
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>DANBIAS_CLIENT;DANBIAS_GAME_DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>DANBIAS_CLIENT;DANBIAS_GAME_DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)OysterMath;$(SolutionDir)GameLogic;$(SolutionDir)Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc;$(SolutionDir)OysterMath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)OysterMath;$(SolutionDir)Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc;$(SolutionDir)OysterMath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>OysterGraphics_$(PlatformShortName)D.lib;Input_$(PlatformShortName)D.lib;GameLogic_$(PlatformShortName)D.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>OysterGraphics_$(PlatformShortName)D.lib;Input_$(PlatformShortName)D.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<DelayLoadDLLs>OysterGraphics_$(PlatformShortName)D.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
<DelayLoadDLLs>OysterGraphics_$(PlatformShortName)D.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
@ -142,14 +142,14 @@
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>DANBIAS_CLIENT;DANBIAS_GAME_DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>DANBIAS_CLIENT;DANBIAS_GAME_DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)OysterMath;$(SolutionDir)GameLogic;$(SolutionDir)Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc;$(SolutionDir)OysterMath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)OysterMath;$(SolutionDir)Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc;$(SolutionDir)OysterMath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>OysterGraphics_$(PlatformShortName).lib;Input_$(PlatformShortName).lib;GameLogic_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>OysterGraphics_$(PlatformShortName).lib;Input_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<DelayLoadDLLs>OysterGraphics_x86.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
<DelayLoadDLLs>OysterGraphics_x86.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
@ -163,14 +163,14 @@
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>DANBIAS_CLIENT;DANBIAS_GAME_DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>DANBIAS_CLIENT;DANBIAS_GAME_DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)OysterMath;$(SolutionDir)GameLogic;$(SolutionDir)Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc;$(SolutionDir)OysterMath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)OysterMath;$(SolutionDir)Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc;$(SolutionDir)OysterMath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>OysterGraphics_$(PlatformShortName).lib;Input_$(PlatformShortName).lib;GameLogic_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>OysterGraphics_$(PlatformShortName).lib;Input_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<DelayLoadDLLs>OysterGraphics_x86.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
<DelayLoadDLLs>OysterGraphics_x86.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
@ -187,22 +187,27 @@
|
||||||
<ProjectReference Include="..\..\OysterMath\OysterMath.vcxproj">
|
<ProjectReference Include="..\..\OysterMath\OysterMath.vcxproj">
|
||||||
<Project>{f10cbc03-9809-4cba-95d8-327c287b18ee}</Project>
|
<Project>{f10cbc03-9809-4cba-95d8-327c287b18ee}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\GameLogic\GameLogic.vcxproj">
|
|
||||||
<Project>{b1195bb9-b3a5-47f0-906c-8dea384d1520}</Project>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="DanBiasGame_Impl.cpp" />
|
<ClCompile Include="DanBiasGame_Impl.cpp" />
|
||||||
<ClCompile Include="DLLMain.cpp" />
|
<ClCompile Include="DLLMain.cpp" />
|
||||||
|
<ClCompile Include="GameClientState\GameState\C_DynamicObj.cpp" />
|
||||||
<ClCompile Include="GameClientState\GameClientState.cpp" />
|
<ClCompile Include="GameClientState\GameClientState.cpp" />
|
||||||
<ClCompile Include="GameClientState\GameState.cpp" />
|
<ClCompile Include="GameClientState\GameState.cpp" />
|
||||||
<ClCompile Include="GameClientState\LobbyState.cpp" />
|
<ClCompile Include="GameClientState\LobbyState.cpp" />
|
||||||
|
<ClCompile Include="GameClientState\GameState\C_Player.cpp" />
|
||||||
|
<ClCompile Include="GameClientState\GameState\C_StaticObj.cpp" />
|
||||||
|
<ClCompile Include="GameClientState\C_Object.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClInclude Include="GameClientState\GameState\C_DynamicObj.h" />
|
||||||
<ClInclude Include="GameClientState\GameClientState.h" />
|
<ClInclude Include="GameClientState\GameClientState.h" />
|
||||||
<ClInclude Include="GameClientState\GameState.h" />
|
<ClInclude Include="GameClientState\GameState.h" />
|
||||||
<ClInclude Include="Include\DanBiasGame.h" />
|
<ClInclude Include="Include\DanBiasGame.h" />
|
||||||
<ClInclude Include="GameClientState\LobbyState.h" />
|
<ClInclude Include="GameClientState\LobbyState.h" />
|
||||||
|
<ClInclude Include="GameClientState\GameState\C_Player.h" />
|
||||||
|
<ClInclude Include="GameClientState\GameState\C_StaticObj.h" />
|
||||||
|
<ClInclude Include="GameClientState\C_Object.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "GameClientState/GameClientState.h"
|
#include "GameClientState/GameClientState.h"
|
||||||
#include "GameClientState\GameState.h"
|
#include "GameClientState\GameState.h"
|
||||||
#include "GameClientState\LobbyState.h"
|
#include "GameClientState\LobbyState.h"
|
||||||
|
#include "vld.h"
|
||||||
|
|
||||||
namespace DanBias
|
namespace DanBias
|
||||||
{
|
{
|
||||||
|
@ -180,6 +180,9 @@ namespace DanBias
|
||||||
if(state != Client::GameClientState::ClientState_Same)
|
if(state != Client::GameClientState::ClientState_Same)
|
||||||
{
|
{
|
||||||
m_data->gameClientState->Release();
|
m_data->gameClientState->Release();
|
||||||
|
delete m_data->gameClientState;
|
||||||
|
m_data->gameClientState = NULL;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case Client::GameClientState::ClientState_Lobby:
|
case Client::GameClientState::ClientState_Lobby:
|
||||||
|
@ -193,6 +196,7 @@ namespace DanBias
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
m_data->gameClientState->Init();
|
m_data->gameClientState->Init();
|
||||||
|
|
||||||
}
|
}
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -221,8 +225,12 @@ namespace DanBias
|
||||||
|
|
||||||
HRESULT DanBiasGame::CleanUp()
|
HRESULT DanBiasGame::CleanUp()
|
||||||
{
|
{
|
||||||
|
m_data->gameClientState->Release();
|
||||||
delete m_data->gameClientState;
|
delete m_data->gameClientState;
|
||||||
delete m_data;
|
delete m_data;
|
||||||
|
delete inputObj;
|
||||||
|
|
||||||
|
Oyster::Graphics::API::Clean();
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#include "C_Object.h"
|
||||||
|
using namespace DanBias::Client;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#pragma once
|
||||||
|
namespace DanBias
|
||||||
|
{
|
||||||
|
namespace Client
|
||||||
|
{
|
||||||
|
class C_Object
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual void Init() = 0;
|
||||||
|
virtual void setPos() = 0;
|
||||||
|
|
||||||
|
virtual void Render() = 0;
|
||||||
|
virtual void Release() = 0;
|
||||||
|
};};};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include "DllInterfaces/GFXAPI.h"
|
#include "DllInterfaces/GFXAPI.h"
|
||||||
|
#include "GameState/C_Player.h"
|
||||||
using namespace DanBias::Client;
|
using namespace DanBias::Client;
|
||||||
|
|
||||||
struct GameState::myData
|
struct GameState::myData
|
||||||
|
@ -7,7 +8,7 @@ struct GameState::myData
|
||||||
myData(){}
|
myData(){}
|
||||||
Oyster::Math3D::Float4x4 view;
|
Oyster::Math3D::Float4x4 view;
|
||||||
Oyster::Math3D::Float4x4 proj;
|
Oyster::Math3D::Float4x4 proj;
|
||||||
Oyster::Graphics::Model::Model *model;
|
C_Object* player;
|
||||||
}privData;
|
}privData;
|
||||||
|
|
||||||
GameState::GameState(void)
|
GameState::GameState(void)
|
||||||
|
@ -17,12 +18,14 @@ GameState::GameState(void)
|
||||||
|
|
||||||
GameState::~GameState(void)
|
GameState::~GameState(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
bool GameState::Init()
|
bool GameState::Init()
|
||||||
{
|
{
|
||||||
// load models
|
// load models
|
||||||
privData = new myData();
|
privData = new myData();
|
||||||
privData->model = Oyster::Graphics::API::CreateModel(L"crate");
|
privData->player = new C_Player;
|
||||||
|
privData->player->Init();
|
||||||
|
|
||||||
privData->proj = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/2,1024.0f/768.0f,.1f,1000);
|
privData->proj = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/2,1024.0f/768.0f,.1f,1000);
|
||||||
Oyster::Graphics::API::SetProjection(privData->proj);
|
Oyster::Graphics::API::SetProjection(privData->proj);
|
||||||
|
@ -46,11 +49,16 @@ bool GameState::Render()
|
||||||
Oyster::Graphics::API::SetView(privData->view);
|
Oyster::Graphics::API::SetView(privData->view);
|
||||||
Oyster::Graphics::API::SetProjection( privData->proj);
|
Oyster::Graphics::API::SetProjection( privData->proj);
|
||||||
Oyster::Graphics::API::NewFrame();
|
Oyster::Graphics::API::NewFrame();
|
||||||
//Oyster::Graphics::API::RenderModel(*(privData->model));
|
privData->player->Render();
|
||||||
Oyster::Graphics::API::EndFrame();
|
Oyster::Graphics::API::EndFrame();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bool GameState::Release()
|
bool GameState::Release()
|
||||||
{
|
{
|
||||||
|
privData->player->Release();
|
||||||
|
delete privData->player;
|
||||||
|
privData->player = NULL;
|
||||||
|
delete privData;
|
||||||
|
privData = NULL;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
#include "C_DynamicObj.h"
|
||||||
|
#include "DllInterfaces/GFXAPI.h"
|
||||||
|
using namespace DanBias::Client;
|
||||||
|
struct C_DynamicObj::myData
|
||||||
|
{
|
||||||
|
myData(){}
|
||||||
|
Oyster::Graphics::Model::Model *model;
|
||||||
|
// light
|
||||||
|
// sound
|
||||||
|
// effect
|
||||||
|
}privData;
|
||||||
|
C_DynamicObj::C_DynamicObj(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
C_DynamicObj::~C_DynamicObj(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
void C_DynamicObj::Init()
|
||||||
|
{
|
||||||
|
// load models
|
||||||
|
privData = new myData();
|
||||||
|
privData->model = Oyster::Graphics::API::CreateModel(L"crate");
|
||||||
|
}
|
||||||
|
void C_DynamicObj::setPos()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void C_DynamicObj::Render()
|
||||||
|
{
|
||||||
|
Oyster::Graphics::API::RenderModel(*(privData->model));
|
||||||
|
}
|
||||||
|
void C_DynamicObj::Release()
|
||||||
|
{
|
||||||
|
Oyster::Graphics::API::DeleteModel(privData->model);
|
||||||
|
delete privData;
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
#pragma once
|
||||||
|
namespace DanBias
|
||||||
|
{
|
||||||
|
namespace Client
|
||||||
|
{
|
||||||
|
class C_DynamicObj
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
struct myData;
|
||||||
|
myData* privData;
|
||||||
|
public:
|
||||||
|
C_DynamicObj(void);
|
||||||
|
virtual ~C_DynamicObj(void);
|
||||||
|
void Init();
|
||||||
|
void setPos();
|
||||||
|
|
||||||
|
void Render();
|
||||||
|
void Release();
|
||||||
|
};};};
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
#include "C_Player.h"
|
||||||
|
#include "DllInterfaces/GFXAPI.h"
|
||||||
|
using namespace DanBias::Client;
|
||||||
|
|
||||||
|
struct C_Player::myData
|
||||||
|
{
|
||||||
|
myData(){}
|
||||||
|
Oyster::Math3D::Float4x4 view;
|
||||||
|
Oyster::Math3D::Float4x4 proj;
|
||||||
|
Oyster::Graphics::Model::Model *model;
|
||||||
|
}privData;
|
||||||
|
|
||||||
|
C_Player::C_Player(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
C_Player::~C_Player(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void C_Player::Init()
|
||||||
|
{
|
||||||
|
// load models
|
||||||
|
privData = new myData();
|
||||||
|
privData->model = Oyster::Graphics::API::CreateModel(L"crate");
|
||||||
|
}
|
||||||
|
void C_Player::setPos()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void C_Player::Render()
|
||||||
|
{
|
||||||
|
Oyster::Graphics::API::RenderModel(*(privData->model));
|
||||||
|
}
|
||||||
|
void C_Player::Release()
|
||||||
|
{
|
||||||
|
Oyster::Graphics::API::DeleteModel(privData->model);
|
||||||
|
delete privData;
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../C_Object.h"
|
||||||
|
namespace DanBias
|
||||||
|
{
|
||||||
|
namespace Client
|
||||||
|
{
|
||||||
|
class C_Player : public C_Object
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
struct myData;
|
||||||
|
myData* privData;
|
||||||
|
//Oyster::Graphics:: LIght
|
||||||
|
public:
|
||||||
|
C_Player(void);
|
||||||
|
~C_Player(void);
|
||||||
|
void Init();
|
||||||
|
void setPos();
|
||||||
|
|
||||||
|
void Render();
|
||||||
|
void Release();
|
||||||
|
|
||||||
|
};};};
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
|
||||||
|
#include "C_StaticObj.h"
|
||||||
|
#include "DllInterfaces/GFXAPI.h"
|
||||||
|
using namespace DanBias::Client;
|
||||||
|
|
||||||
|
struct C_StaticObj::myData
|
||||||
|
{
|
||||||
|
myData(){}
|
||||||
|
Oyster::Graphics::Model::Model *model;
|
||||||
|
// light
|
||||||
|
// sound
|
||||||
|
// effect
|
||||||
|
}privData;
|
||||||
|
C_StaticObj::C_StaticObj(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
C_StaticObj::~C_StaticObj(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
void C_StaticObj::Init()
|
||||||
|
{
|
||||||
|
// load models
|
||||||
|
privData = new myData();
|
||||||
|
privData->model = Oyster::Graphics::API::CreateModel(L"worldDummy");
|
||||||
|
}
|
||||||
|
void C_StaticObj::setPos()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void C_StaticObj::Render()
|
||||||
|
{
|
||||||
|
Oyster::Graphics::API::RenderModel(*(privData->model));
|
||||||
|
}
|
||||||
|
void C_StaticObj::Release()
|
||||||
|
{
|
||||||
|
Oyster::Graphics::API::DeleteModel(privData->model);
|
||||||
|
delete privData;
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../C_Object.h"
|
||||||
|
namespace DanBias
|
||||||
|
{
|
||||||
|
namespace Client
|
||||||
|
{
|
||||||
|
class C_StaticObj : public C_Object
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
struct myData;
|
||||||
|
myData* privData;
|
||||||
|
public:
|
||||||
|
C_StaticObj(void);
|
||||||
|
virtual ~C_StaticObj(void);
|
||||||
|
void Init();
|
||||||
|
void setPos();
|
||||||
|
|
||||||
|
void Render();
|
||||||
|
void Release();
|
||||||
|
};};};
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#include "LobbyState.h"
|
#include "LobbyState.h"
|
||||||
#include "DllInterfaces/GFXAPI.h"
|
#include "DllInterfaces/GFXAPI.h"
|
||||||
#include "OysterMath.h"
|
#include "OysterMath.h"
|
||||||
|
#include "GameState/C_Player.h"
|
||||||
|
#include "GameState/C_StaticObj.h"
|
||||||
using namespace DanBias::Client;
|
using namespace DanBias::Client;
|
||||||
|
|
||||||
struct LobbyState::myData
|
struct LobbyState::myData
|
||||||
|
@ -8,7 +10,7 @@ struct LobbyState::myData
|
||||||
myData(){}
|
myData(){}
|
||||||
Oyster::Math3D::Float4x4 view;
|
Oyster::Math3D::Float4x4 view;
|
||||||
Oyster::Math3D::Float4x4 proj;
|
Oyster::Math3D::Float4x4 proj;
|
||||||
Oyster::Graphics::Model::Model *model;
|
C_Object* object;
|
||||||
}privData;
|
}privData;
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,14 +22,14 @@ LobbyState::LobbyState(void)
|
||||||
|
|
||||||
LobbyState::~LobbyState(void)
|
LobbyState::~LobbyState(void)
|
||||||
{
|
{
|
||||||
Oyster::Graphics::API::DeleteModel(privData->model);
|
|
||||||
Oyster::Graphics::API::Clean();
|
|
||||||
}
|
}
|
||||||
bool LobbyState::Init()
|
bool LobbyState::Init()
|
||||||
{
|
{
|
||||||
// load models
|
// load models
|
||||||
privData = new myData();
|
privData = new myData();
|
||||||
privData->model = Oyster::Graphics::API::CreateModel(L"crate");
|
privData->object = new C_StaticObj();
|
||||||
|
privData->object->Init();
|
||||||
|
|
||||||
privData->proj = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/2,1024.0f/768.0f,.1f,1000);
|
privData->proj = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/2,1024.0f/768.0f,.1f,1000);
|
||||||
//privData->proj = Oyster::Math3D::ProjectionMatrix_Orthographic(1024, 768, 1, 1000);
|
//privData->proj = Oyster::Math3D::ProjectionMatrix_Orthographic(1024, 768, 1, 1000);
|
||||||
|
@ -36,14 +38,12 @@ bool LobbyState::Init()
|
||||||
privData->view = Oyster::Math3D::OrientationMatrix_LookAtDirection(Oyster::Math::Float3(0,0,-1),Oyster::Math::Float3(0,1,0),Oyster::Math::Float3(0,0,5.4f));
|
privData->view = Oyster::Math3D::OrientationMatrix_LookAtDirection(Oyster::Math::Float3(0,0,-1),Oyster::Math::Float3(0,1,0),Oyster::Math::Float3(0,0,5.4f));
|
||||||
privData->view = Oyster::Math3D::InverseOrientationMatrix(privData->view);
|
privData->view = Oyster::Math3D::InverseOrientationMatrix(privData->view);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
GameClientState::ClientState LobbyState::Update(float deltaTime, InputClass* KeyInput)
|
GameClientState::ClientState LobbyState::Update(float deltaTime, InputClass* KeyInput)
|
||||||
{
|
{
|
||||||
|
|
||||||
if( KeyInput->IsKeyPressed(DIK_Q))
|
if( KeyInput->IsKeyPressed(DIK_G))
|
||||||
return ClientState_Game;
|
return ClientState_Game;
|
||||||
return ClientState_Same;
|
return ClientState_Same;
|
||||||
}
|
}
|
||||||
|
@ -53,11 +53,17 @@ bool LobbyState::Render()
|
||||||
Oyster::Graphics::API::SetView(privData->view);
|
Oyster::Graphics::API::SetView(privData->view);
|
||||||
Oyster::Graphics::API::SetProjection( privData->proj);
|
Oyster::Graphics::API::SetProjection( privData->proj);
|
||||||
Oyster::Graphics::API::NewFrame();
|
Oyster::Graphics::API::NewFrame();
|
||||||
Oyster::Graphics::API::RenderModel(*(privData->model));
|
// render objects
|
||||||
|
privData->object->Render();
|
||||||
Oyster::Graphics::API::EndFrame();
|
Oyster::Graphics::API::EndFrame();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bool LobbyState::Release()
|
bool LobbyState::Release()
|
||||||
{
|
{
|
||||||
|
privData->object->Release();
|
||||||
|
delete privData->object;
|
||||||
|
privData->object = NULL;
|
||||||
|
delete privData;
|
||||||
|
privData = NULL;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
|
@ -111,7 +111,7 @@
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<DelayLoadDLLs>DanBiasServer_$(PlatformShortName)D.dll;DanBiasGame_$(PlatformShortName)D.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
<DelayLoadDLLs>DanBiasServer_$(PlatformShortName)D.dll;DanBiasGame_$(PlatformShortName)D.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||||
<AdditionalDependencies>Input_$(PlatformShortName)D.lib;GameLogic_$(PlatformShortName)D.lib;DanBiasServer_$(PlatformShortName)D.lib;DanBiasGame_$(PlatformShortName)D.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>Input_$(PlatformShortName)D.lib;DanBiasGame_$(PlatformShortName)D.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<DelayLoadDLLs>DanBiasServer_$(PlatformShortName)D.dll;DanBiasGame_$(PlatformShortName)D.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
<DelayLoadDLLs>DanBiasServer_$(PlatformShortName)D.dll;DanBiasGame_$(PlatformShortName)D.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||||
<AdditionalDependencies>Input_$(PlatformShortName)D.lib;GameLogic_$(PlatformShortName)D.lib;DanBiasServer_$(PlatformShortName)D.lib;DanBiasGame_$(PlatformShortName)D.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>Input_$(PlatformShortName)D.lib;DanBiasGame_$(PlatformShortName)D.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<DelayLoadDLLs>DanBiasServer_$(PlatformShortName).dll;DanBiasGame_$(PlatformShortName).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
<DelayLoadDLLs>DanBiasServer_$(PlatformShortName).dll;DanBiasGame_$(PlatformShortName).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||||
<AdditionalDependencies>Input_$(PlatformShortName).lib;GameLogic_$(PlatformShortName).lib;DanBiasServer_$(PlatformShortName).lib;DanBiasGame_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>Input_$(PlatformShortName).lib;DanBiasServer_$(PlatformShortName).lib;DanBiasGame_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<DelayLoadDLLs>DanBiasServer_$(PlatformShortName).dll;DanBiasGame_$(PlatformShortName).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
<DelayLoadDLLs>DanBiasServer_$(PlatformShortName).dll;DanBiasGame_$(PlatformShortName).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||||
<AdditionalDependencies>Input_$(PlatformShortName).lib;GameLogic_$(PlatformShortName).lib;DanBiasServer_$(PlatformShortName).lib;DanBiasGame_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>Input_$(PlatformShortName).lib;DanBiasServer_$(PlatformShortName).lib;DanBiasGame_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -195,9 +195,6 @@
|
||||||
<ProjectReference Include="..\DanBiasServer\DanBiasServer.vcxproj">
|
<ProjectReference Include="..\DanBiasServer\DanBiasServer.vcxproj">
|
||||||
<Project>{52380daa-0f4a-4d97-8e57-98df39319caf}</Project>
|
<Project>{52380daa-0f4a-4d97-8e57-98df39319caf}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\GameLogic\GameLogic.vcxproj">
|
|
||||||
<Project>{b1195bb9-b3a5-47f0-906c-8dea384d1520}</Project>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "IGame.h"
|
#include "IGame.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
|
#include "DynamicObject.h"
|
||||||
|
|
||||||
namespace GameLogic
|
namespace GameLogic
|
||||||
{
|
{
|
||||||
|
|
|
@ -169,9 +169,7 @@
|
||||||
<ClInclude Include="Camera.h" />
|
<ClInclude Include="Camera.h" />
|
||||||
<ClInclude Include="CollisionManager.h" />
|
<ClInclude Include="CollisionManager.h" />
|
||||||
<ClInclude Include="DynamicObject.h" />
|
<ClInclude Include="DynamicObject.h" />
|
||||||
<ClInclude Include="Game.h" />
|
|
||||||
<ClInclude Include="GameMode.h" />
|
<ClInclude Include="GameMode.h" />
|
||||||
<ClInclude Include="IGame.h" />
|
|
||||||
<ClInclude Include="Level.h" />
|
<ClInclude Include="Level.h" />
|
||||||
<ClInclude Include="Object.h" />
|
<ClInclude Include="Object.h" />
|
||||||
<ClInclude Include="Player.h" />
|
<ClInclude Include="Player.h" />
|
||||||
|
@ -183,15 +181,12 @@
|
||||||
<ClCompile Include="Camera.cpp" />
|
<ClCompile Include="Camera.cpp" />
|
||||||
<ClCompile Include="CollisionManager.cpp" />
|
<ClCompile Include="CollisionManager.cpp" />
|
||||||
<ClCompile Include="DynamicObject.cpp" />
|
<ClCompile Include="DynamicObject.cpp" />
|
||||||
<ClCompile Include="Game.cpp" />
|
|
||||||
<ClCompile Include="GameMode.cpp" />
|
<ClCompile Include="GameMode.cpp" />
|
||||||
<ClCompile Include="IGame.cpp" />
|
|
||||||
<ClCompile Include="Level.cpp" />
|
<ClCompile Include="Level.cpp" />
|
||||||
<ClCompile Include="Object.cpp" />
|
<ClCompile Include="Object.cpp" />
|
||||||
<ClCompile Include="Player.cpp" />
|
<ClCompile Include="Player.cpp" />
|
||||||
<ClCompile Include="RefManager.cpp" />
|
<ClCompile Include="RefManager.cpp" />
|
||||||
<ClCompile Include="StaticObject.cpp" />
|
<ClCompile Include="StaticObject.cpp" />
|
||||||
<ClCompile Include="TestGLMain.cpp" />
|
|
||||||
<ClCompile Include="Weapon.cpp" />
|
<ClCompile Include="Weapon.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
|
Loading…
Reference in New Issue