• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

src/cannonball/header/SaveState.h

Go to the documentation of this file.
00001 #pragma once
00002 #define BALL_TYPE_COUNT 4
00003 
00004 class SaveState
00005 {
00006 public:
00007         SaveState(void);
00008         ~SaveState(void);
00009 
00010         // Getter and Setter
00011         void setBallCount(int index, int value) { m_ballCount[index] = value; }
00012         int getBallCount(int index) { return m_ballCount[index]; }
00013 
00014         void setSelectedBall(int ball) { m_selectedBall = ball; }
00015         int getSelectedBall() { return m_selectedBall; }
00016 
00017         void setLevel(int level) { m_level = level; }
00018         int getLevel() {return m_level; }
00019 
00020         void setBallPosition(float3 position) { m_ballPosition = position; }
00021         float3 getBallPosition() { return m_ballPosition; }
00022 
00023         void setCameraPosition(float3 position) { m_cameraPosition = position; }
00024         float3 getCameraPosition() { return m_cameraPosition; }
00025 
00026         void setSaved() { m_saveAvailable = true; }
00027         bool saveAvailable() { return m_saveAvailable; }
00028 
00029         bool saveToFile(wchar* filename);
00030         bool loadFromFile(wchar* filename);
00031 
00032 private:
00033         int m_ballCount[BALL_TYPE_COUNT];
00034         int m_selectedBall;
00035         int m_level;
00036 
00037         float3 m_ballPosition;
00038         float3 m_cameraPosition;
00039 
00040         bool m_saveAvailable;
00041 
00042 };

Generated on Fri Jun 18 2010 17:48:39 for Cannonball by  doxygen 1.7.0