Physic rebuild start
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
|
||||
#include <WICTextureLoader.h>
|
||||
#include <comdef.h> // Pour _com_error
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
|
||||
/////////////
|
||||
@@ -42,6 +44,13 @@ const bool FULL_SCREEN = false;
|
||||
const float SCREEN_DEPTH = 1000.0f;
|
||||
const float SCREEN_NEAR = 0.3f;
|
||||
|
||||
struct Input
|
||||
{
|
||||
bool m_KeyLeft = false;
|
||||
bool m_KeyRight = false;
|
||||
bool m_KeyUp = false;
|
||||
bool m_KeyDown = false;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Class name: ApplicationClass
|
||||
@@ -50,13 +59,13 @@ class ApplicationClass
|
||||
{
|
||||
public:
|
||||
ApplicationClass();
|
||||
ApplicationClass(const ApplicationClass&);
|
||||
~ApplicationClass();
|
||||
D3DClass* GetDirect3D();
|
||||
|
||||
bool Initialize(int, int, HWND);
|
||||
void Shutdown();
|
||||
bool Frame(InputClass*);
|
||||
void PhysicsThreadFunction();
|
||||
|
||||
int GetScreenWidth() const;
|
||||
void SetScreenWidth(int screenWidth);
|
||||
@@ -121,7 +130,7 @@ public:
|
||||
|
||||
private:
|
||||
bool Render(float, float, float, float, float);
|
||||
bool RenderPhysics(float x, float y, float z);
|
||||
bool RenderPhysics(bool keyLeft, bool keyRight, bool keyUp, bool keyDown, float deltaTime);
|
||||
bool UpdateMouseStrings(int, int, bool);
|
||||
bool UpdateFps();
|
||||
bool UpdateRenderCountString(int);
|
||||
@@ -146,6 +155,8 @@ private :
|
||||
HWND m_hwnd;
|
||||
bool m_windowed;
|
||||
|
||||
int m_PhysicTickRate = 50; // physics execute 50 times per second
|
||||
|
||||
// ------------------------------------- //
|
||||
// ------------- RENDERING ------------- //
|
||||
// ------------------------------------- //
|
||||
@@ -227,6 +238,12 @@ private :
|
||||
Frustum m_FrustumCulling;
|
||||
int m_renderCount;
|
||||
float m_FrustumCullingTolerance = 5.f;
|
||||
|
||||
// ------------------------------------------------- //
|
||||
// -------------------- Input ---------------------- //
|
||||
// ------------------------------------------------- //
|
||||
|
||||
Input m_Inputs;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user