From 0971bc407e74a94ccab21617481bbe6dfc24b6d6 Mon Sep 17 00:00:00 2001 From: lanariel Date: Tue, 18 Feb 2014 14:23:38 +0100 Subject: [PATCH] Small fix --- Code/Game/GameClient/GameClientState/GameState.cpp | 6 +++--- Code/OysterGraphics/FileLoader/ModelLoader.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Code/Game/GameClient/GameClientState/GameState.cpp b/Code/Game/GameClient/GameClientState/GameState.cpp index 79f3c471..1afba43d 100644 --- a/Code/Game/GameClient/GameClientState/GameState.cpp +++ b/Code/Game/GameClient/GameClientState/GameState.cpp @@ -81,7 +81,7 @@ bool GameState::Init( SharedStateContent &shared ) Graphics::API::Option gfxOp = Graphics::API::GetOption(); Float aspectRatio = gfxOp.Resolution.x / gfxOp.Resolution.y; - this->privData->camera.SetPerspectiveProjection( Radian(90.0f), aspectRatio, 0.1f, 1000.0f ); + this->privData->camera.SetPerspectiveProjection( Math::pi/8, aspectRatio, 0.1f, 1000.0f ); Graphics::API::SetProjection( this->privData->camera.GetProjectionMatrix() ); //tell server ready @@ -108,7 +108,7 @@ void GameState::InitiatePlayer( int id, const std::string &modelName, const floa RBInitData RBData; RBData.position = position; RBData.rotation = ArrayToQuaternion( rotation ); - RBData.scale = Float3( 3 ); + RBData.scale = Float3( 1 ); if( isMyPlayer ) { @@ -170,7 +170,7 @@ bool GameState::Render() Oyster::Math3D::Float4x4 translation = Oyster::Math3D::TranslationMatrix(Float3( 0,132, 20)); - Oyster::Math3D::Float4x4 scale = Oyster::Math3D::ScalingMatrix(Float3( 2, 2, 2)); + Oyster::Math3D::Float4x4 scale = Oyster::Math3D::ScalingMatrix(Float3( 0.5f, 0.5f, 0.5f)); Oyster::Math3D::Float4x4 world = translation * scale; Oyster::Graphics::API::RenderDebugCube( world ); Oyster::Graphics::API::RenderDebugCube(this->privData->player.getRBWorld()); diff --git a/Code/OysterGraphics/FileLoader/ModelLoader.cpp b/Code/OysterGraphics/FileLoader/ModelLoader.cpp index ba0928cc..0c7125fd 100644 --- a/Code/OysterGraphics/FileLoader/ModelLoader.cpp +++ b/Code/OysterGraphics/FileLoader/ModelLoader.cpp @@ -700,7 +700,7 @@ static HRESULT CreateTextureFromWIC( _In_ ID3D11Device* d3dDevice, return hr; } //todo check calc - int TexSize = twidth * theight * bpp; + int TexSize = twidth * theight * (int)bpp; Oyster::Graphics::Core::UsedMem += TexSize; if ( autogen )