Added the GRAPHICS flag, to simplify the gameplay structures

This commit is contained in:
Kayne Ruse
2014-05-27 23:25:07 +10:00
parent 5893342ad8
commit 6b38501c27
8 changed files with 42 additions and 2 deletions
+9
View File
@@ -27,6 +27,12 @@
#include "vector2.hpp"
#include "statistics.hpp"
//graphics
#ifdef GRAPHICS
#include "sprite_sheet.hpp"
#endif
//std namespace
#include <string>
#include <cmath>
@@ -55,6 +61,9 @@ struct CharacterData {
//active gameplay members
//NOTE: these are lost when unloaded
#ifdef GRAPHICS
SpriteSheet sprite;
#endif
BBox bbox = {0,0,0,0};
bool inCombat = false;
int atbGauge = 0;
+13
View File
@@ -22,12 +22,20 @@
#ifndef COMBATDATA_HPP_
#define COMBATDATA_HPP_
//POD members
#include "vector2.hpp"
#include "bbox.hpp"
//gameplay members
#include "character_data.hpp"
#include "enemy_data.hpp"
//graphics
#ifdef GRAPHICS
#include "sprite_sheet.hpp"
#endif
//std namespace
#include <chrono>
#include <list>
#include <utility>
@@ -46,6 +54,11 @@ struct CombatData {
//time interval
Clock::time_point lastTick = Clock::now();
//graphics
#ifdef GRAPHICS
SpriteSheet sprite;
#endif
};
#endif
+10
View File
@@ -22,8 +22,15 @@
#ifndef ENEMYDATA_HPP_
#define ENEMYDATA_HPP_
//gameplay
#include "statistics.hpp"
//graphics
#ifdef GRAPHICS
#include "sprite_sheet.hpp"
#endif
//std namespace
#include <string>
struct EnemyData {
@@ -41,6 +48,9 @@ struct EnemyData {
//active gameplay members
//NOTE: these are lost when unloaded
#ifdef GRAPHICS
SpriteSheet sprite;
#endif
int tableIndex;
int atbGauge = 0;
};