Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1805 | yogev_ezra | 1 | // gfxdef.h |
2 | |||
3 | #define MAIN_FACE_NDX 0 |
||
4 | #define GAME_FACE_NDX 1 |
||
5 | #define BUTTONS_NDX 2 |
||
6 | #define NUMBERS_NDX 3 |
||
7 | |||
8 | #define BONUS_FREE_BLOCK 11 |
||
9 | #define BONUS_DIAG_BLOCK 12 |
||
10 | |||
11 | #define WNDLEFT 64 |
||
12 | #define WNDTOP 64 |
||
13 | #define WNDHEADCOLOUR 0xD4C233 |
||
14 | #define WNDTITLECOLOUR 0x47151C |
||
15 | |||
16 | // |
||
17 | #define blockSize 41 |
||
18 | #define blocksNum 15 |
||
19 | |||
20 | extern int maxGameLevel; |
||
21 | extern int startGameLevel; |
||
22 | |||
23 | #define START_LEVEL 1 |
||
24 | |||
25 | //// |
||
26 | //struct CPoint |
||
27 | //{ |
||
28 | // int x, y; |
||
29 | // // |
||
30 | // CPoint() |
||
31 | // { |
||
32 | // this->x = 0; |
||
33 | // this->y = 0; |
||
34 | // }; |
||
35 | // // |
||
36 | // CPoint( int iX, int iY ) |
||
37 | // { |
||
38 | // this->x = iX; |
||
39 | // this->y = iY; |
||
40 | // }; |
||
41 | // // |
||
42 | // CPoint( CPoint &pt ) |
||
43 | // { |
||
44 | // this->x = pt.x; |
||
45 | // this->y = pt.y; |
||
46 | // }; |
||
47 | //}; |
||
48 | |||
49 | |||
50 | // описание сжатого битмапа в файле |
||
51 | struct SCompBmpHeader |
||
52 | { |
||
53 | short int sizeX; |
||
54 | short int sizeY; |
||
55 | int compressedSize; |
||
56 | int physicalOffset; |
||
57 | int uncompressedSize; |
||
58 | }; |
||
59 | |||
60 | |||
61 | // сласс битмапа для использования в программе |
||
62 | class CKosBitmap |
||
63 | { |
||
64 | protected: |
||
65 | int bmpID; |
||
66 | RGB *buffer; |
||
67 | Word sizeX; |
||
68 | Word sizeY; |
||
69 | public: |
||
70 | CKosBitmap(); |
||
71 | ~CKosBitmap(); |
||
72 | // загрузка из сжатого файла |
||
73 | bool LoadFromArch( SCompBmpHeader *bmpArchDesc, CKosFile *fromFile, int ID ); |
||
74 | // вывести в окно картинку |
||
75 | void Draw( Word x, Word y ); |
||
76 | // получить указатель на область данных |
||
77 | RGB *GetBits(); |
||
78 | // получить размер картинки |
||
79 | void GetSize( Word &cx, Word &cy ); |
||
80 | // создать картинку по картинке большего размера |
||
81 | void Scale(Word size, RGB* mainBits); |
||
82 | }; |
||
83 | |||
84 | |||
85 | // класс фишки игрового поля |
||
86 | class CFishka |
||
87 | { |
||
88 | protected: |
||
89 | // |
||
90 | RGB *bits; |
||
91 | // |
||
92 | RGB transColour; |
||
93 | // |
||
94 | RGB *highLighted; |
||
95 | public: |
||
96 | CFishka( CKosBitmap *fromBmp, int yOffset, RGB insColour ); |
||
97 | virtual ~CFishka(); |
||
98 | virtual RGB * GetBits(void); |
||
99 | virtual RGB * GetHighlightedBits(void); |
||
100 | }; |
||
101 |