equal
deleted
inserted
replaced
9 #include "strings.h" |
9 #include "strings.h" |
10 #include "gfx.h" |
10 #include "gfx.h" |
11 #include "landscape.h" |
11 #include "landscape.h" |
12 #include "viewport.h" |
12 #include "viewport.h" |
13 #include "saveload.h" |
13 #include "saveload.h" |
14 #include "hal.h" |
|
15 #include "console.h" |
14 #include "console.h" |
16 #include "string.h" |
15 #include "string.h" |
17 #include "variables.h" |
16 #include "variables.h" |
18 #include "table/sprites.h" |
17 #include "table/sprites.h" |
19 #include "blitter/factory.hpp" |
18 #include "blitter/factory.hpp" |
20 #include <stdarg.h> /* va_list */ |
19 #include <stdarg.h> /* va_list */ |
21 #include "date.h" |
20 #include "date.h" |
22 #include "texteff.hpp" |
21 #include "texteff.hpp" |
|
22 #include "video/video_driver.hpp" |
23 |
23 |
24 enum { |
24 enum { |
25 MAX_TEXTMESSAGE_LENGTH = 200, |
25 MAX_TEXTMESSAGE_LENGTH = 200, |
26 INIT_NUM_TEXT_MESSAGES = 20, |
26 INIT_NUM_TEXT_MESSAGES = 20, |
27 MAX_CHAT_MESSAGES = 10, |
27 MAX_CHAT_MESSAGES = 10, |
166 |
166 |
167 _textmessage_visible = false; |
167 _textmessage_visible = false; |
168 /* Put our 'shot' back to the screen */ |
168 /* Put our 'shot' back to the screen */ |
169 blitter->CopyFromBuffer(blitter->MoveTo(_screen.dst_ptr, x, y), _textmessage_backup, width, height); |
169 blitter->CopyFromBuffer(blitter->MoveTo(_screen.dst_ptr, x, y), _textmessage_backup, width, height); |
170 /* And make sure it is updated next time */ |
170 /* And make sure it is updated next time */ |
171 _video_driver->make_dirty(x, y, width, height); |
171 _video_driver->MakeDirty(x, y, width, height); |
172 |
172 |
173 _textmessage_dirty = true; |
173 _textmessage_dirty = true; |
174 } |
174 } |
175 } |
175 } |
176 |
176 |
246 for (uint y = 13; count-- != 0; y += 13) { |
246 for (uint y = 13; count-- != 0; y += 13) { |
247 DoDrawString(_textmsg_list[count].message, _textmsg_box.x + 3, _screen.height - _textmsg_box.y - y + 1, _textmsg_list[count].color); |
247 DoDrawString(_textmsg_list[count].message, _textmsg_box.x + 3, _screen.height - _textmsg_box.y - y + 1, _textmsg_list[count].color); |
248 } |
248 } |
249 |
249 |
250 /* Make sure the data is updated next flush */ |
250 /* Make sure the data is updated next flush */ |
251 _video_driver->make_dirty(x, y, width, height); |
251 _video_driver->MakeDirty(x, y, width, height); |
252 |
252 |
253 _textmessage_visible = true; |
253 _textmessage_visible = true; |
254 _textmessage_dirty = false; |
254 _textmessage_dirty = false; |
255 } |
255 } |
256 |
256 |