1
0
Fork 0

(svn r2996) 0xFFFF -> INVALID_STRING_ID

release/0.4.5
tron 2005-09-28 21:49:55 +00:00
parent ce1c72cf6e
commit 3a964862f7
2 changed files with 8 additions and 8 deletions

View File

@ -115,7 +115,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, byte bridge_type)
{ {
uint j = 0; uint j = 0;
int32 ret; int32 ret;
uint16 errmsg; StringID errmsg;
DeleteWindowById(WC_BUILD_BRIDGE, 0); DeleteWindowById(WC_BUILD_BRIDGE, 0);
@ -123,7 +123,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, byte bridge_type)
_bridgedata.start_tile = start; _bridgedata.start_tile = start;
_bridgedata.end_tile = end; _bridgedata.end_tile = end;
errmsg = 0xFFFF; errmsg = INVALID_STRING_ID;
// only query bridge building possibility once, result is the same for all bridges! // only query bridge building possibility once, result is the same for all bridges!
// returns CMD_ERROR on failure, and priCe on success // returns CMD_ERROR on failure, and priCe on success

View File

@ -236,7 +236,7 @@ void AddTextEffect(StringID msg, int x, int y, uint16 duration)
if (_game_mode == GM_MENU) if (_game_mode == GM_MENU)
return; return;
for (te = _text_effect_list; te->string_id != 0xFFFF; ) { for (te = _text_effect_list; te->string_id != INVALID_STRING_ID; ) {
if (++te == endof(_text_effect_list)) if (++te == endof(_text_effect_list))
return; return;
} }
@ -259,7 +259,7 @@ void AddTextEffect(StringID msg, int x, int y, uint16 duration)
static void MoveTextEffect(TextEffect *te) static void MoveTextEffect(TextEffect *te)
{ {
if (te->duration < 8) { if (te->duration < 8) {
te->string_id = 0xFFFF; te->string_id = INVALID_STRING_ID;
} else { } else {
te->duration-=8; te->duration-=8;
te->y--; te->y--;
@ -273,7 +273,7 @@ void MoveAllTextEffects(void)
TextEffect *te; TextEffect *te;
for (te = _text_effect_list; te != endof(_text_effect_list); te++ ) { for (te = _text_effect_list; te != endof(_text_effect_list); te++ ) {
if (te->string_id != 0xFFFF) if (te->string_id != INVALID_STRING_ID)
MoveTextEffect(te); MoveTextEffect(te);
} }
} }
@ -283,7 +283,7 @@ void InitTextEffects(void)
TextEffect *te; TextEffect *te;
for (te = _text_effect_list; te != endof(_text_effect_list); te++ ) { for (te = _text_effect_list; te != endof(_text_effect_list); te++ ) {
te->string_id = 0xFFFF; te->string_id = INVALID_STRING_ID;
} }
} }
@ -293,7 +293,7 @@ void DrawTextEffects(DrawPixelInfo *dpi)
if (dpi->zoom < 1) { if (dpi->zoom < 1) {
for (te = _text_effect_list; te != endof(_text_effect_list); te++ ) { for (te = _text_effect_list; te != endof(_text_effect_list); te++ ) {
if (te->string_id == 0xFFFF) if (te->string_id == INVALID_STRING_ID)
continue; continue;
/* intersection? */ /* intersection? */
@ -306,7 +306,7 @@ void DrawTextEffects(DrawPixelInfo *dpi)
} }
} else if (dpi->zoom == 1) { } else if (dpi->zoom == 1) {
for (te = _text_effect_list; te != endof(_text_effect_list); te++ ) { for (te = _text_effect_list; te != endof(_text_effect_list); te++ ) {
if (te->string_id == 0xFFFF) if (te->string_id == INVALID_STRING_ID)
continue; continue;
/* intersection? */ /* intersection? */