2007-06-06 19:12:12 +03:00
|
|
|
#ifndef SEMIDEF_H
|
|
|
|
#define SEMIDEF_H
|
|
|
|
#include "global.h"
|
|
|
|
#include <string>
|
|
|
|
#include "SDL.h"
|
|
|
|
#include "SDL_image.h"
|
|
|
|
#include <vector>
|
2007-06-12 21:17:33 +03:00
|
|
|
|
2007-06-06 19:12:12 +03:00
|
|
|
struct Cimage
|
|
|
|
{
|
2007-07-07 19:04:15 +03:00
|
|
|
int groupNumber;
|
2007-06-06 19:12:12 +03:00
|
|
|
std::string imName; //name without extension
|
|
|
|
SDL_Surface * bitmap;
|
|
|
|
};
|
|
|
|
class CSemiDefHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
int howManyImgs;
|
|
|
|
std::string defName;
|
|
|
|
std::vector<Cimage> ourImages;
|
|
|
|
std::vector<std::string> namesOfImgs;
|
|
|
|
unsigned char * buforD;
|
|
|
|
|
|
|
|
static std::string nameFromType(EterrainType typ);
|
|
|
|
void openImg(const char *name);
|
2007-06-25 17:55:45 +03:00
|
|
|
void openDef(std::string name, std::string lodName, int dist=1);
|
|
|
|
void readFileList(int dist = 1);
|
2007-06-10 06:53:29 +03:00
|
|
|
void loadImages(std::string path);
|
2007-06-28 13:47:28 +03:00
|
|
|
~CSemiDefHandler();
|
2007-06-06 19:12:12 +03:00
|
|
|
};
|
|
|
|
#endif // SEMIDEF_H
|