Merge branch 'master' into SQC-09
This commit is contained in:
@@ -1,19 +1,24 @@
|
||||
#ifndef ENGINE_H__
|
||||
#define ENGINE_H__
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include "../SQCSim-common/array2d.h"
|
||||
#include "../SQCSim-common/blockinfo.h"
|
||||
#include "../SQCSim-common/bullet.h"
|
||||
#include "../SQCSim-common/chunk.h"
|
||||
#include "../SQCSim-common/world.h"
|
||||
#include "../SQCSim-common/transformation.h"
|
||||
#include "../SQCSim-common/player.h"
|
||||
#include "define.h"
|
||||
#include "openglcontext.h"
|
||||
#include "texture.h"
|
||||
#include "transformation.h"
|
||||
#include "shader.h"
|
||||
#include "player.h"
|
||||
#include "chunk.h"
|
||||
#include "skybox.h"
|
||||
#include "audio.h"
|
||||
#include "textureatlas.h"
|
||||
#include "blockinfo.h"
|
||||
#include "array2d.h"
|
||||
#include "world.h"
|
||||
#include "bullet.h"
|
||||
#include "connector.h"
|
||||
#include "worldrenderer.h"
|
||||
|
||||
class Engine : public OpenglContext {
|
||||
public:
|
||||
@@ -32,35 +37,45 @@ public:
|
||||
virtual void MouseReleaseEvent(const MOUSE_BUTTON &button, int x, int y);
|
||||
|
||||
private:
|
||||
bool LoadTexture(Texture& texture, const std::string& filename, bool stopOnError = true);
|
||||
void DrawHud(float elapsedTime, BlockType bloc);
|
||||
void PrintText(unsigned int x, unsigned int y, const std::string& t);
|
||||
float GetScale() const;
|
||||
|
||||
int GetFps(float elapsedTime) const;
|
||||
int GetCountdown(float elapsedTime);
|
||||
|
||||
bool m_wireframe = false;
|
||||
bool m_isSkybox = true;
|
||||
bool LoadTexture(Texture& texture, const std::string& filename, bool useMipmaps = true, bool stopOnError = true);
|
||||
|
||||
int m_renderCount = 0;
|
||||
void SystemNotification(std::string systemLog);
|
||||
void KillNotification(Player killer, Player killed);
|
||||
void DisplayNotification(std::string message);
|
||||
void ProcessNotificationQueue();
|
||||
void DisplayCrosshair();
|
||||
void DisplayCurrentItem();
|
||||
void DisplayHud(int timer);
|
||||
void DisplayInfo(float elapsedTime, BlockType bloc);
|
||||
void DrawHud(float elapsedTime, BlockType bloc);
|
||||
void PrintText(float x, float y, float scale, const std::string& t);
|
||||
|
||||
Connector m_conn;
|
||||
Shader m_shader01;
|
||||
BlockInfo* m_blockinfo[BTYPE_LAST];
|
||||
TextureAtlas m_textureAtlas = TextureAtlas(BTYPE_LAST);
|
||||
|
||||
World m_world = World();
|
||||
WorldRenderer m_wrenderer = WorldRenderer();
|
||||
|
||||
Texture m_textureSkybox;
|
||||
Texture m_textureFont;
|
||||
Texture m_textureCrosshair;
|
||||
|
||||
Texture m_textureGun;
|
||||
|
||||
Skybox m_skybox;
|
||||
Audio m_audio = Audio(AUDIO_PATH "music01.wav");
|
||||
Audio m_audio = Audio(AUDIO_PATH "start.wav");
|
||||
|
||||
irrklang::ISound* m_powpow;
|
||||
irrklang::ISound* m_scream;
|
||||
|
||||
Player m_player = Player(Vector3f(.5f, CHUNK_SIZE_Y + 1.8f, .5f));
|
||||
|
||||
|
||||
Bullet* m_bullets[MAX_BULLETS];
|
||||
|
||||
//Menu
|
||||
@@ -72,11 +87,28 @@ private:
|
||||
Texture MenuQuitTexture;
|
||||
Texture MenuOptionsTexture;
|
||||
|
||||
float m_scale;
|
||||
float m_time = 0;
|
||||
|
||||
int m_renderCount = 0;
|
||||
int m_countdown = COUNTDOWN;
|
||||
|
||||
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_resetcountdown = false;
|
||||
bool m_stopcountdown = false;
|
||||
|
||||
bool m_keyK = false;
|
||||
bool m_keyL = false;
|
||||
bool m_keyW = false;
|
||||
bool m_keyA = false;
|
||||
bool m_keyS = false;
|
||||
bool m_keyD = false;
|
||||
bool m_keylshift = false;
|
||||
bool m_keySpace = false;
|
||||
bool m_mouseL = false;
|
||||
bool m_mouseR = false;
|
||||
@@ -87,9 +119,7 @@ private:
|
||||
float m_mousemx = 0;
|
||||
float m_mousemy = 0;
|
||||
|
||||
bool m_block = false;
|
||||
bool m_flash = true;
|
||||
std::string m_messageNotification = "";
|
||||
};
|
||||
|
||||
|
||||
#endif // ENGINE_H__
|
||||
|
Reference in New Issue
Block a user