mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2026-02-04 09:19:19 +01:00
Add more ores
Add weighted random distribution
This commit is contained in:
@@ -197,6 +197,9 @@ void BaseGame::Run()
|
||||
e.button.y = int(m_Window.height) - e.button.y;
|
||||
this->ProcessMouseUpEvent(e.button);
|
||||
break;
|
||||
case SDL_MOUSEWHEEL:
|
||||
this->ProcessMouseWheelEvent(e.wheel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,49 +7,39 @@
|
||||
class BaseGame
|
||||
{
|
||||
public:
|
||||
explicit BaseGame( const Window& window );
|
||||
BaseGame( const BaseGame& other ) = delete;
|
||||
BaseGame& operator=( const BaseGame& other ) = delete;
|
||||
explicit BaseGame(const Window& window);
|
||||
BaseGame(const BaseGame& other) = delete;
|
||||
BaseGame& operator=(const BaseGame& other) = delete;
|
||||
BaseGame(BaseGame&& other) = delete;
|
||||
BaseGame& operator=(BaseGame&& other) = delete;
|
||||
virtual ~BaseGame( );
|
||||
virtual ~BaseGame();
|
||||
|
||||
void Run( );
|
||||
void Run();
|
||||
|
||||
virtual void Update(float elapsedSec)
|
||||
{
|
||||
|
||||
virtual void Update(float elapsedSec) {
|
||||
}
|
||||
virtual void Draw() const
|
||||
{
|
||||
|
||||
virtual void Draw() const {
|
||||
}
|
||||
|
||||
// Event handling
|
||||
virtual void ProcessKeyDownEvent(const SDL_KeyboardEvent& e)
|
||||
{
|
||||
|
||||
virtual void ProcessKeyDownEvent(const SDL_KeyboardEvent& e) {
|
||||
}
|
||||
virtual void ProcessKeyUpEvent(const SDL_KeyboardEvent& e)
|
||||
{
|
||||
|
||||
virtual void ProcessKeyUpEvent(const SDL_KeyboardEvent& e) {
|
||||
}
|
||||
virtual void ProcessMouseMotionEvent(const SDL_MouseMotionEvent& e)
|
||||
{
|
||||
|
||||
virtual void ProcessMouseMotionEvent(const SDL_MouseMotionEvent& e) {
|
||||
}
|
||||
virtual void ProcessMouseDownEvent(const SDL_MouseButtonEvent& e)
|
||||
{
|
||||
|
||||
virtual void ProcessMouseDownEvent(const SDL_MouseButtonEvent& e) {
|
||||
}
|
||||
virtual void ProcessMouseUpEvent(const SDL_MouseButtonEvent& e)
|
||||
{
|
||||
|
||||
virtual void ProcessMouseUpEvent(const SDL_MouseButtonEvent& e) {
|
||||
}
|
||||
virtual void ProcessImGui(){}
|
||||
|
||||
const Rectf& GetViewPort() const
|
||||
{
|
||||
virtual void ProcessMouseWheelEvent(const SDL_MouseWheelEvent& e) {
|
||||
}
|
||||
|
||||
|
||||
virtual void ProcessImGui() {
|
||||
}
|
||||
|
||||
const Rectf& GetViewPort() const {
|
||||
return m_Viewport;
|
||||
}
|
||||
|
||||
@@ -66,8 +56,8 @@ private:
|
||||
bool m_Initialized;
|
||||
// Prevent timing jumps when debugging
|
||||
const float m_MaxElapsedSeconds;
|
||||
|
||||
|
||||
// FUNCTIONS
|
||||
void InitializeGameEngine( );
|
||||
void CleanupGameEngine( );
|
||||
void InitializeGameEngine();
|
||||
void CleanupGameEngine();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user