Implemented SharedParameters system in the client (read more)

Here are more tweaks:
* InWorld's quit event now exits to the main menu, bypassing a relayed disconnect message
* InWorld's disconnect hander no longer throws exceptions (dropped creation packet bugfix)
* CombatData's internals now point to std::pair objects
* Enemies are stored in a global list
This commit is contained in:
Kayne Ruse
2014-05-26 17:11:26 +10:00
parent a47e76845f
commit 0a71f43ef3
13 changed files with 119 additions and 58 deletions
+23 -1
View File
@@ -22,12 +22,25 @@
#ifndef INCOMBAT_HPP_
#define INCOMBAT_HPP_
//graphics & utilities
#include "image.hpp"
#include "raster_font.hpp"
#include "button.hpp"
#include "config_utility.hpp"
#include "shared_parameters.hpp"
//network
#include "udp_network_utility.hpp"
#include "serial_packet.hpp"
#include "serial.hpp"
//client
#include "base_scene.hpp"
class InCombat : public BaseScene {
public:
//Public access members
InCombat();
InCombat(ConfigUtility* const, UDPNetworkUtility* const, SharedParameters* const);
~InCombat();
protected:
@@ -38,11 +51,20 @@ protected:
void Render(SDL_Surface* const);
//Event handlers
void QuitEvent();
void MouseMotion(SDL_MouseMotionEvent const&);
void MouseButtonDown(SDL_MouseButtonEvent const&);
void MouseButtonUp(SDL_MouseButtonEvent const&);
void KeyDown(SDL_KeyboardEvent const&);
void KeyUp(SDL_KeyboardEvent const&);
//Network handlers
void HandlePacket(SerialPacket&);
//shared parameters
ConfigUtility& config;
UDPNetworkUtility& network;
SharedParameters& params;
};
#endif