| 1 |
#ifndef _CBLOCKSET_ |
| 2 |
#define _CBLOCKSET_ |
| 3 |
|
| 4 |
#include "CBlock.h" |
| 5 |
|
| 6 |
#include "oodle.h" |
| 7 |
#include "util.h" |
| 8 |
#include <vector> |
| 9 |
#include <string> |
| 10 |
using namespace std; |
| 11 |
|
| 12 |
//! This is a class to handle loading and storage of blocksets for insertion into CPlayingFields |
| 13 |
class CBlockSet |
| 14 |
{ |
| 15 |
public: |
| 16 |
|
| 17 |
CBlockSet(const vector<string> &fileNames); //! file names of block's "static" animation (an animation with a single image) |
| 18 |
CBlockSet(const string &prefix); |
| 19 |
CBlockSet(list<CSurface*> &s); |
| 20 |
~CBlockSet(); |
| 21 |
|
| 22 |
void loadBlockAnimation(const string &name, CAnimation* anim, BlockType type); |
| 23 |
|
| 24 |
CBlock* getBlock(int x, int y, int fieldWidth, int fieldHeight, CVector offset, BlockType type) const; //! Construct a new block of type type (return clone of one of the blocks in this blockset) |
| 25 |
|
| 26 |
private: |
| 27 |
CBlock* blocks[NUMBLOCKS]; |
| 28 |
|
| 29 |
}; |
| 30 |
|
| 31 |
#endif |