equal
deleted
inserted
replaced
1 /* $Id$ */ |
1 /* $Id$ */ |
|
2 |
|
3 /** @file texteff.cpp */ |
2 |
4 |
3 #include "stdafx.h" |
5 #include "stdafx.h" |
4 #include "openttd.h" |
6 #include "openttd.h" |
5 #include "functions.h" |
7 #include "functions.h" |
6 #include "macros.h" |
8 #include "macros.h" |
7 #include "strings.h" |
9 #include "strings.h" |
8 #include "gfx.h" |
10 #include "gfx.h" |
|
11 #include "landscape.h" |
9 #include "viewport.h" |
12 #include "viewport.h" |
10 #include "saveload.h" |
13 #include "saveload.h" |
11 #include "hal.h" |
14 #include "hal.h" |
12 #include "console.h" |
15 #include "console.h" |
13 #include "string.h" |
16 #include "string.h" |
119 for (i = 0; i < MAX_CHAT_MESSAGES; i++) { |
122 for (i = 0; i < MAX_CHAT_MESSAGES; i++) { |
120 _textmsg_list[i].message[0] = '\0'; |
123 _textmsg_list[i].message[0] = '\0'; |
121 } |
124 } |
122 } |
125 } |
123 |
126 |
124 /* Hide the textbox */ |
127 /** Hide the textbox */ |
125 void UndrawTextMessage() |
128 void UndrawTextMessage() |
126 { |
129 { |
127 if (_textmessage_visible) { |
130 if (_textmessage_visible) { |
128 /* Sometimes we also need to hide the cursor |
131 /* Sometimes we also need to hide the cursor |
129 * This is because both textmessage and the cursor take a shot of the |
132 * This is because both textmessage and the cursor take a shot of the |
170 |
173 |
171 _textmessage_dirty = true; |
174 _textmessage_dirty = true; |
172 } |
175 } |
173 } |
176 } |
174 |
177 |
175 /* Check if a message is expired every day */ |
178 /** Check if a message is expired every day */ |
176 void TextMessageDailyLoop() |
179 void TextMessageDailyLoop() |
177 { |
180 { |
178 uint i; |
181 uint i; |
179 |
182 |
180 for (i = 0; i < MAX_CHAT_MESSAGES; i++) { |
183 for (i = 0; i < MAX_CHAT_MESSAGES; i++) { |
194 i--; |
197 i--; |
195 } |
198 } |
196 } |
199 } |
197 } |
200 } |
198 |
201 |
199 /* Draw the textmessage-box */ |
202 /** Draw the textmessage-box */ |
200 void DrawTextMessage() |
203 void DrawTextMessage() |
201 { |
204 { |
202 if (!_textmessage_dirty) return; |
205 if (!_textmessage_dirty) return; |
203 |
206 |
204 /* First undraw if needed */ |
207 /* First undraw if needed */ |