91 void CreateConsole(); |
91 void CreateConsole(); |
92 |
92 |
93 typedef int32 CursorID; |
93 typedef int32 CursorID; |
94 typedef byte Pixel; |
94 typedef byte Pixel; |
95 |
95 |
96 typedef struct Point { |
96 struct Point { |
97 int x,y; |
97 int x,y; |
98 } Point; |
98 }; |
99 |
99 |
100 typedef struct Rect { |
100 struct Rect { |
101 int left,top,right,bottom; |
101 int left,top,right,bottom; |
102 } Rect; |
102 }; |
103 |
103 |
104 /** A single sprite of a list of animated cursors */ |
104 /** A single sprite of a list of animated cursors */ |
105 struct AnimCursor { |
105 struct AnimCursor { |
106 static const CursorID LAST = MAX_UVALUE(CursorID); |
106 static const CursorID LAST = MAX_UVALUE(CursorID); |
107 CursorID sprite; ///< Must be set to LAST_ANIM when it is the last sprite of the loop |
107 CursorID sprite; ///< Must be set to LAST_ANIM when it is the last sprite of the loop |
108 byte display_time; ///< Amount of ticks this sprite will be shown |
108 byte display_time; ///< Amount of ticks this sprite will be shown |
109 }; |
109 }; |
110 |
110 |
111 typedef struct CursorVars { |
111 struct CursorVars { |
112 Point pos, size, offs, delta; ///< position, size, offset from top-left, and movement |
112 Point pos, size, offs, delta; ///< position, size, offset from top-left, and movement |
113 Point draw_pos, draw_size; ///< position and size bounding-box for drawing |
113 Point draw_pos, draw_size; ///< position and size bounding-box for drawing |
114 SpriteID sprite; ///< current image of cursor |
114 SpriteID sprite; ///< current image of cursor |
115 SpriteID pal; |
115 SpriteID pal; |
116 |
116 |
121 |
121 |
122 bool visible; ///< cursor is visible |
122 bool visible; ///< cursor is visible |
123 bool dirty; ///< the rect occupied by the mouse is dirty (redraw) |
123 bool dirty; ///< the rect occupied by the mouse is dirty (redraw) |
124 bool fix_at; ///< mouse is moving, but cursor is not (used for scrolling) |
124 bool fix_at; ///< mouse is moving, but cursor is not (used for scrolling) |
125 bool in_window; ///< mouse inside this window, determines drawing logic |
125 bool in_window; ///< mouse inside this window, determines drawing logic |
126 } CursorVars; |
126 }; |
127 |
127 |
128 typedef struct DrawPixelInfo { |
128 struct DrawPixelInfo { |
129 Pixel *dst_ptr; |
129 Pixel *dst_ptr; |
130 int left, top, width, height; |
130 int left, top, width, height; |
131 int pitch; |
131 int pitch; |
132 uint16 zoom; |
132 uint16 zoom; |
133 } DrawPixelInfo; |
133 }; |
134 |
134 |
135 typedef struct Colour { |
135 struct Colour { |
136 byte r; |
136 byte r; |
137 byte g; |
137 byte g; |
138 byte b; |
138 byte b; |
139 } Colour; |
139 }; |
140 |
140 |
141 |
141 |
142 |
142 |
143 extern byte _dirkeys; ///< 1 = left, 2 = up, 4 = right, 8 = down |
143 extern byte _dirkeys; ///< 1 = left, 2 = up, 4 = right, 8 = down |
144 extern bool _fullscreen; |
144 extern bool _fullscreen; |
179 void GameSizeChanged(); |
179 void GameSizeChanged(); |
180 void UndrawMouseCursor(); |
180 void UndrawMouseCursor(); |
181 |
181 |
182 #include "helpers.hpp" |
182 #include "helpers.hpp" |
183 |
183 |
184 typedef enum FontSizes { |
184 enum FontSize { |
185 FS_NORMAL, |
185 FS_NORMAL, |
186 FS_SMALL, |
186 FS_SMALL, |
187 FS_LARGE, |
187 FS_LARGE, |
188 FS_END, |
188 FS_END, |
189 } FontSize; |
189 }; |
190 |
190 |
191 DECLARE_POSTFIX_INCREMENT(FontSize); |
191 DECLARE_POSTFIX_INCREMENT(FontSize); |
192 |
192 |
193 void RedrawScreenRect(int left, int top, int right, int bottom); |
193 void RedrawScreenRect(int left, int top, int right, int bottom); |
194 void GfxScroll(int left, int top, int width, int height, int xo, int yo); |
194 void GfxScroll(int left, int top, int width, int height, int xo, int yo); |
290 */ |
290 */ |
291 VARDEF byte _colour_gradient[16][8]; |
291 VARDEF byte _colour_gradient[16][8]; |
292 |
292 |
293 VARDEF bool _use_dos_palette; |
293 VARDEF bool _use_dos_palette; |
294 |
294 |
295 typedef enum StringColorFlags { |
295 enum StringColorFlags { |
296 IS_PALETTE_COLOR = 0x100, ///< color value is already a real palette color index, not an index of a StringColor |
296 IS_PALETTE_COLOR = 0x100, ///< color value is already a real palette color index, not an index of a StringColor |
297 } StringColorFlags; |
297 }; |
298 |
298 |
299 |
299 |
300 #ifdef _DEBUG |
300 #ifdef _DEBUG |
301 extern bool _dbg_screen_rect; |
301 extern bool _dbg_screen_rect; |
302 #endif |
302 #endif |