From 48b9a9b264b2d5110129dbbbad2f4e346f875fe1 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sun, 3 Apr 2016 15:24:20 +1000 Subject: [PATCH] Added combat scene --- client/scene_signal.hpp | 1 + client/scenes/combat.cpp | 77 ++++++++++++++++++++++++++++++++++++++++ client/scenes/combat.hpp | 48 +++++++++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 client/scenes/combat.cpp create mode 100644 client/scenes/combat.hpp diff --git a/client/scene_signal.hpp b/client/scene_signal.hpp index e0c8556..52d2991 100644 --- a/client/scene_signal.hpp +++ b/client/scene_signal.hpp @@ -33,5 +33,6 @@ enum SceneSignal { OPTIONSMENU, LOBBYMENU, WORLD, + COMBAT, DISCONNECTEDSCREEN, }; \ No newline at end of file diff --git a/client/scenes/combat.cpp b/client/scenes/combat.cpp new file mode 100644 index 0000000..6da5634 --- /dev/null +++ b/client/scenes/combat.cpp @@ -0,0 +1,77 @@ +/* Copyright: (c) Kayne Ruse 2013-2016 + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. +*/ +#include "combat.hpp" + +//Public access members +Combat::Combat(int* const argClientIndex, int* const argAccountIndex) { + // +} + +Combat::~Combat() { + // +} + +void Combat::RenderFrame(SDL_Renderer* renderer) { + // +} + +//frame phases +void Combat::FrameStart() { + // +} + +void Combat::Update() { + // +} + +void Combat::FrameEnd() { + // +} + +//input events +void Combat::QuitEvent() { + // +} + +void Combat::MouseMotion(SDL_MouseMotionEvent const& event) { + // +} + +void Combat::MouseButtonDown(SDL_MouseButtonEvent const& event) { + // +} + +void Combat::MouseButtonUp(SDL_MouseButtonEvent const& event) { + // +} + +void Combat::MouseWheel(SDL_MouseWheelEvent const& event) { + // +} + +void Combat::KeyDown(SDL_KeyboardEvent const& event) { + // +} + +void Combat::KeyUp(SDL_KeyboardEvent const& event) { + // +} diff --git a/client/scenes/combat.hpp b/client/scenes/combat.hpp new file mode 100644 index 0000000..823a346 --- /dev/null +++ b/client/scenes/combat.hpp @@ -0,0 +1,48 @@ +/* Copyright: (c) Kayne Ruse 2013-2016 + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. +*/ +#pragma once + +#include "base_scene.hpp" + +class Combat: public BaseScene { +public: + //Public access members + Combat(int* const argClientIndex, int* const argAccountIndex); + ~Combat(); + + void RenderFrame(SDL_Renderer* renderer) override; + +private: + //frame phases + void FrameStart() override; + void Update() override; + void FrameEnd() override; + + //input events + void QuitEvent(); + void MouseMotion(SDL_MouseMotionEvent const& event) override; + void MouseButtonDown(SDL_MouseButtonEvent const& event) override; + void MouseButtonUp(SDL_MouseButtonEvent const& event) override; + void MouseWheel(SDL_MouseWheelEvent const& event) override; + void KeyDown(SDL_KeyboardEvent const& event) override; + void KeyUp(SDL_KeyboardEvent const& event) override; +}; \ No newline at end of file