SQC-15_online #1

Merged
memartel_loc merged 349 commits from SQC-15_online into master 2023-12-10 17:41:26 -05:00
41 changed files with 1052 additions and 1165 deletions
Showing only changes of commit a67499049b - Show all commits

View File

@ -34,9 +34,19 @@
#define SHADER_PATH "./media/shaders/"
#define AUDIO_PATH "./media/audio/"
#define CHUNK_PATH "./media/chunks/"
#define MENU_ITEM_PATH "./media/menu_items/"
#define BOOSTER_TEXTURE_PATH "./media/textures/Booster/"
enum GameState {
MAIN_MENU,
SPLASH,
OPTIONS,
SETTINGS,
QUIT,
NEWG,
PLAY,
PAUSE
};
enum Resolution {
HD = 0, // 1280x720 (High Definition)
FHD, // 1920x1080 (Full HD)

File diff suppressed because it is too large Load Diff

View File

@ -30,9 +30,6 @@ class Engine : public OpenglContext {
public:
Engine();
virtual ~Engine();
virtual void DrawMenu();
virtual void DrawOption();
virtual void DrawSplachScreen();
virtual void Init();
virtual void DeInit();
virtual void LoadResource();
@ -54,53 +51,81 @@ private:
void InstantDamage();
void SystemNotification(std::string systemLog);
void KillNotification(Player killer, Player killed);
void DisplayNotification(std::string message);
void DisplayCrosshair();
void DisplayPovGun();
void DisplayCurrentItem();
void DisplayHud(int timer);
void DrawHud(float elapsedTime, BlockType bloc);
void DisplayInfo(float elapsedTime, BlockType bloc);
void DisplaySingleOrMultiplayerMenu();
void DisplaySplashScreen();
void DisplayMainMenu();
void DrawButtonBackgrounds(float centerX, float centerY, int iterations);
void DrawMainMenuButtons(float centerX, float centerY);
void DrawSingleMultiButtons(float centerX, float centerY);
void DisplayOptionsMenu();
void DisplayAudioMenu(float centerX, float centerY);
void DisplayGraphicsMenu(float centerX, float centerY);
void DisplayGameplayMenu(float centerX, float centerY);
void DrawSliderBackground(float centerX, float centerY, float minVal, float maxVal, float bottomSideValue, float topSideValue);
void DisplayBarPercentValue(float centerX, float centerY, float posX, float posY, float minVal, float maxVal, float value);
void RedrawSlider(float centerX, float centerY, float value, float minVal, float maxVal, float bottomSideValue, float topSideValue);
void DrawHud(float elapsedTime, BlockType bloc);
void DrawSlider(float centerX, float centerY, float value, float minVal, float maxVal, float bottomSideValue, float topSideValue);
void PrintText(float x, float y, const std::string& t, float charSizeMultiplier = 1.0f);
void ProcessNotificationQueue();
Connector m_conn;
Shader m_shader01;
Audio m_audio = Audio(AUDIO_PATH "start.wav");
irrklang::ISound* m_powpow, * m_scream;
irrklang::ISound* m_whoosh[MAX_BULLETS];
Bullet* m_bullets[MAX_BULLETS];
std::chrono::high_resolution_clock::time_point m_startTime;
std::unordered_map<uint64_t, Player*> m_players;
netprot::Buffer m_buf, m_bufout;
netprot::PlayerInfo m_pinfo;
RemotePlayer m_remotePlayer = RemotePlayer(netprot::PlayerInfo(), Vector3f(5.5f, CHUNK_SIZE_Y + 1.8f, 5.5f));
std::string m_messageNotification = "";
World m_world = World();
Player m_player = Player(Vector3f(.5f, CHUNK_SIZE_Y + 1.8f, .5f));
Renderer m_renderer = Renderer();
Booster m_booster = Booster();
BlockInfo* m_blockinfo[BTYPE_LAST];
BoostInfo* m_boostinfo[BTYPE_BOOST_LAST];
GameState m_gamestate = GameState::SPLASH;
Shader m_shader01;
Skybox m_skybox;
TextureAtlas m_textureAtlas = TextureAtlas(BTYPE_LAST);
TextureAtlas m_animeAtlas = TextureAtlas(TYPE_LAST + POS_LAST);
World m_world = World();
Renderer m_renderer = Renderer();
Booster m_booster = Booster();
TextureAtlas::TextureIndex texBoostHeal;
Texture m_textureCrosshair;
Texture m_textureFont;
Texture m_textureGun;
Texture m_texturePovGun;
Texture m_textureSkybox;
Texture m_textureSoloMultiMenu;
Texture m_textureSoloText;
Texture m_textureMultiText;
Texture m_textureTitle;
Texture m_textureOptions;
Texture m_textureRetour;
Texture m_textureVolume;
Texture m_textureMusique;
Texture m_textureGraphiques;
Texture m_textureSensibilite;
Texture m_textureResolution;
Texture m_texturePrincipal;
Texture m_textureEffets;
Texture m_textureGameplay;
Texture m_textureMainMenu;
Texture m_textureOptionsMenu;
Texture m_texturePauseMenu;
Texture m_textureSplashScreen;
Texture m_textureHd;
Texture m_textureFhd;
Texture m_textureQhd;
@ -108,46 +133,32 @@ private:
Texture m_textureCheck;
Texture m_textureChecked;
TextureAtlas::TextureIndex texBoostHeal;
Texture m_textureOptAudio;
Texture m_textureOptBack;
Texture m_textureOptGameplay;
Texture m_textureOptGraphics;
Texture m_textureOptMain;
Texture m_textureOptMusic;
Texture m_textureOptOptions;
Texture m_textureOptResolution;
Texture m_textureOptSensitivity;
Texture m_textureOptSfx;
Skybox m_skybox;
Audio m_audio = Audio(AUDIO_PATH "start.wav");
Texture m_textureMenuBack;
Texture m_textureMenuMulti;
Texture m_textureMenuOptions;
Texture m_textureMenuPlay;
Texture m_textureMenuQuit;
Texture m_textureMenuSingle;
Texture m_textureMenuTitle;
irrklang::ISound* m_powpow,
* m_scream;
irrklang::ISound *m_whoosh[MAX_BULLETS];
Player m_player = Player(Vector3f(.5f, CHUNK_SIZE_Y + 1.8f, .5f));
Settings m_parameters = Settings(m_audio);
Bullet* m_bullets[MAX_BULLETS];
std::unordered_map<uint64_t, Player*> m_players;
netprot::Buffer m_buf, m_bufout;
std::chrono::high_resolution_clock::time_point m_startTime;
//Menu
enum class GameState: uint8_t { MAIN_MENU, OPTIONS, SETTINGS, QUIT, NEWG, PLAY, PAUSE, SINGLEMULTI };
GameState m_gamestate = GameState::MAIN_MENU;
Texture MenuTitleTexture;
Texture MenuBGTexture;
Texture MenuBGFlouTexture;
Texture MenuBGOptionTexture;
Texture MenuStartTexture;
Texture MenuQuitTexture;
Texture MenuOptionsTexture;
Texture PauseBGTexture;
Texture SplachScreenTexture;
Texture MusicTexture; //TODO
Texture OnOffBtnTexture;//TODO
Texture BackBtnTexture;//TODO
Settings m_options = Settings(m_audio);
Resolution m_resolution = HD;
float m_splashTime = 2.0f;
float m_scale;
float m_time = 0;
float m_time_SplashScreen = 0;
float m_titleX = 0;
float m_titleY = 0;
@ -163,10 +174,10 @@ private:
int m_selectedOption = 0;
bool m_selectedPrincipalBar = false;
bool m_selectedMusiqueBar = false;
bool m_selectedEffetsBar = false;
bool m_selectedSensibleBar = false;
bool m_selectedOptAudioMainBar = false;
bool m_selectedOptAudioMusicBar = false;
bool m_selectedOptAudioSfxBar = false;
bool m_selectedGameplaySensitivityBar = false;
bool m_damage = false;
@ -180,10 +191,13 @@ private:
bool m_resetcountdown = false;
bool m_soloMultiChoiceMade = false;
bool m_stopcountdown = false;
bool m_selectedPlayOptions = false;
bool m_selectedOptions = false;
bool m_selectedQuit = false;
bool m_key1 = false;
bool m_key2 = false;
bool m_keyK = false;
bool m_keyL = false;
bool m_keyW = false;
@ -191,19 +205,17 @@ private:
bool m_keyS = false;
bool m_keyD = false;
bool m_keySpace = false;
bool m_mouseL = false;
bool m_mouseR = false;
bool m_mouseC = false;
bool m_mouseWU = false;
bool m_mouseWD = false;
//Pour trouver ou est la souris
float m_mousemx = 0;
float m_mousemy = 0;
bool m_networkgame = false;
netprot::PlayerInfo m_pinfo;
RemotePlayer m_remotePlayer = RemotePlayer(netprot::PlayerInfo(),Vector3f(5.5f, CHUNK_SIZE_Y + 1.8f, 5.5f));
std::string m_messageNotification = "";
};
#endif // ENGINE_H__

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 MiB

View File

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 KiB

View File

Before

Width:  |  Height:  |  Size: 195 KiB

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB