Push - Texte sur écran ajusté au window size. Clean up gun01 image.

This commit is contained in:
Mathieu Duval
2023-09-16 21:38:58 -04:00
parent 54ae0b087a
commit e546de57c9
5 changed files with 48 additions and 34 deletions

View File

@@ -1,5 +1,6 @@
#ifndef ENGINE_H__
#define ENGINE_H__
#include "define.h"
#include "openglcontext.h"
#include "texture.h"
@@ -31,19 +32,18 @@ public:
virtual void MouseReleaseEvent(const MOUSE_BUTTON &button, int x, int y);
private:
float GetScale() const;
int GetFps(float elapsedTime) const;
bool LoadTexture(Texture& texture, const std::string& filename, bool useMipmaps = true, bool stopOnError = true);
void DisplayCrosshair();
void DisplayCurrentItem();
void DisplayHud();
void DisplayInfo(float elapsedTime, BlockType bloc);
void DrawHud(float elapsedTime, BlockType bloc);
void PrintText(unsigned int x, unsigned int y, float scale, const std::string& t);
int GetFps(float elapsedTime) const;
bool m_wireframe = false;
bool m_isSkybox = true;
int m_renderCount = 0;
void PrintText(float x, float y, float scale, const std::string& t);
Shader m_shader01;
BlockInfo* m_blockinfo[BTYPE_LAST];
@@ -55,7 +55,7 @@ private:
Texture m_textureFont;
Texture m_textureCrosshair;
Texture m_textureGun;
Skybox m_skybox;
Audio m_audio = Audio(AUDIO_PATH "start.wav");
@@ -66,6 +66,18 @@ private:
Bullet* m_bullets[MAX_BULLETS];
float m_scale;
int m_renderCount = 0;
bool m_wireframe = false;
bool m_isSkybox = true;
bool m_block = false;
bool m_flash = true;
bool m_displayCrosshair = true;
bool m_displayHud = true;
bool m_displayInfo = false;
bool m_keyW = false;
bool m_keyA = false;
bool m_keyS = false;
@@ -76,13 +88,6 @@ private:
bool m_mouseC = false;
bool m_mouseWU = false;
bool m_mouseWD = false;
bool m_block = false;
bool m_flash = true;
bool m_displayCrosshair = true;
bool m_displayHud = true;
bool m_displayInfo = false;
};
#endif // ENGINE_H__