Merge fixes

This commit is contained in:
Dander7BD 2014-02-27 12:55:34 +01:00
parent ee54ce5d73
commit cf8a83e1e3
4 changed files with 4 additions and 7 deletions

View File

@ -10,7 +10,7 @@
#include "DynamicArray.h" #include "DynamicArray.h"
const float MAX_HP = 100.0f; const float MAX_HP = 100.0f;
const float BASIC_SPEED = 30.0f * 0.2f; const float BASIC_SPEED = 10.0f;
namespace GameLogic namespace GameLogic
{ {

View File

@ -20,7 +20,6 @@ namespace Oyster
std::vector<Definitions::Pointlight> Lights; std::vector<Definitions::Pointlight> Lights;
float deltaTime; float deltaTime;
int MostModel; int MostModel;
float FoV;
#ifdef _DEBUG #ifdef _DEBUG
Model::Model* cube; Model::Model* cube;
Model::Model* sphere; Model::Model* sphere;
@ -89,7 +88,6 @@ namespace Oyster
void API::SetProjection(const Math::Float4x4& projection) void API::SetProjection(const Math::Float4x4& projection)
{ {
Projection = projection; Projection = projection;
FoV = 2 * std::atanf(1/projection.m[1][1]);
} }
void API::SetView(const Math::Float4x4& view) void API::SetView(const Math::Float4x4& view)
@ -101,11 +99,11 @@ namespace Oyster
{ {
if(Lights.size()) if(Lights.size())
{ {
Render::DefaultRenderer::NewFrame(View, Projection, &Lights[0], (int)Lights.size(), FoV); Render::DefaultRenderer::NewFrame(View, Projection, &Lights[0], (int)Lights.size());
} }
else else
{ {
Render::DefaultRenderer::NewFrame(View, Projection, NULL, 0, FoV); Render::DefaultRenderer::NewFrame(View, Projection, NULL, 0);
} }
} }

View File

@ -56,7 +56,6 @@ namespace Oyster
Definitions::LightConstants lc; Definitions::LightConstants lc;
lc.InvProj = Projection.GetInverse(); lc.InvProj = Projection.GetInverse();
lc.Pixels = Core::resolution;
lc.Lights = numLights; lc.Lights = numLights;
lc.View = View; lc.View = View;
lc.Proj = Projection; lc.Proj = Projection;

View File

@ -13,7 +13,7 @@ namespace Oyster
class DefaultRenderer class DefaultRenderer
{ {
public: public:
static void NewFrame(Oyster::Math::Float4x4 View, Oyster::Math::Float4x4 Projection, Definitions::Pointlight* Lights, int numLights, float Fov); static void NewFrame(Oyster::Math::Float4x4 View, Oyster::Math::Float4x4 Projection, Definitions::Pointlight* Lights, int numLights);
static void RenderScene(Model::Model* models, int count, Math::Matrix View, Math::Matrix Projection, float DeltaTime = 0); static void RenderScene(Model::Model* models, int count, Math::Matrix View, Math::Matrix Projection, float DeltaTime = 0);
static void EndFrame(); static void EndFrame();
}; };