• Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

4E4RTS: Data dump

Sign in to follow this  


Might as well post a class I wrote today (pseudocode)

struct cUnitType {
// STATS //

int stat_maxHP;

struct cAttack {
int m_Power, m_RangeMin, m_RangeMax, m_Accuracy;
} stat_Attack1, stat_Attack2;

int stat_Armor, stat_RArmor;
int stat_Evasion, stat_Stealth;
int stat_Speed, stat_LOD;
int stat_MaxGarrison;

std::vector stat_Buildables;


// Struct to store each animation.
struct cAnimation {
std::string ID; // animation ID.
cSDLSurface* surf; // surface which contains the animation

// Struct which contains the frames for an orientation
struct cOrien {

// Struct to store each frame
struct cFrame {
int t_x; int t_y; // Texture coordinates XY
int t_w; int t_h; // Texture dimensions

int m_Duration; // time duration of the frame

ORIENTATION m_Facing; // the orientation
std::vector m_Frames; // frame data

// vector to hold all of the different orientations of the animation
std::vector m_Orientations;

// vector which holds all the animations for the unit.

Just to prove I am still working. [wink]
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement