| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #ifndef CDEFH_H
- #define CDEFH_H
- //#include "CDefHandler.h"
- //var
- // Form1 {$IFDEF KOL_MCK} : PForm1 {$ELSE} : TForm1 {$ENDIF} ;
- struct BMPPalette
- {
- unsigned char R,G,B,F;
- };
- class CDefHandler
- {
- public:
- std::string defName, curDir;
- int totalEntries, DEFType, totalBlocks, fullWidth, fullHeight;
- unsigned char fbuffer[800];
- // TempBmp: PBitmap;
- bool allowRepaint;
- int length;
- unsigned char * FDef;
- BMPPalette palette[256];
- // FBmp, //Поток BMP (Memory)
- // FTemp: PStream; //Временный поток (Memory)
- // TempLongInt: LongInt; //Временная переменная
- unsigned int * RWEntries;
- int * RLEntries;
- struct SEntry
- {
- std::string name;
- int offset;
- } ;
- std::vector<SEntry> SEntries ;
- char id[2];
- struct BMPHeader
- {
- int fullSize, _h1, _h2, _h3, _c1, _c2, _c3, _c4, x, y,
- dataSize1, dataSize2; //DataSize=X*Y+2*Y
- unsigned char _c5[8];
- } ;
- void print (std::ostream & stream, int nr, int bytcon);
- int readNormalNr (int pos, int bytCon, unsigned char * str=NULL, bool cyclic=false);
- unsigned char * CDefHandler::writeNormalNr (int nr, int bytCon);
- void getSprite (long SIndex); //zapisuje klastke o zadanym numerze do "testtt.bmp"
- void openDef(std::string name);
- void expand(unsigned char N,unsigned char & BL, unsigned char & BR);
- };
- #endif // CDEFH_H
|