#include "stdafx.h" #include "BombermanGame.h" #define EXAM_BOMBERMAN #ifdef EXAM_BOMBERMAN #include "Scenes/MenuScene.h" #include "Scenes/GameplayScene.h" #endif #pragma endregion //Game is preparing void BombermanGame::OnGamePreparing(GameContext& gameContext) { gameContext.windowWidth = 1166; gameContext.windowHeight = 720; gameContext.windowTitle = L"GP2 - Exam Project - Bomberman Blast! (2023) | (2DAE08) Yomtov Nir"; } void BombermanGame::Initialize() { #ifdef EXAM_BOMBERMAN SceneManager::Get()->AddGameScene(new MenuScene()); SceneManager::Get()->AddGameScene(new GameplayScene()); #endif } LRESULT BombermanGame::WindowProcedureHook(HWND /*hWnd*/, UINT message, WPARAM wParam, LPARAM lParam) { if(message == WM_KEYUP) { if ((lParam & 0x80000000) != 0x80000000) return -1; //[F1] Toggle Scene Info Overlay if(wParam == VK_F1) { const auto pScene = SceneManager::Get()->GetActiveScene(); pScene->GetSceneSettings().Toggle_ShowInfoOverlay(); } //[F2] Toggle Debug Renderer (Global) if (wParam == VK_F2) { DebugRenderer::ToggleDebugRenderer(); return 0; } //[F3] Previous Scene if (wParam == VK_F3) { SceneManager::Get()->PreviousScene(); return 0; } //[F4] Next Scene if (wParam == VK_F4) { SceneManager::Get()->NextScene(); return 0; } //[F5] If PhysX Framestepping is enables > Next Frame if (wParam == VK_F6) { const auto pScene = SceneManager::Get()->GetActiveScene(); pScene->GetPhysxProxy()->NextPhysXFrame(); } } return -1; }