325 void DrawTextEffects(DrawPixelInfo *dpi) |
325 void DrawTextEffects(DrawPixelInfo *dpi) |
326 { |
326 { |
327 const TextEffect* te; |
327 const TextEffect* te; |
328 |
328 |
329 switch (dpi->zoom) { |
329 switch (dpi->zoom) { |
330 case 0: |
330 case ZOOM_LVL_NORMAL: |
331 for (te = _text_effect_list; te != endof(_text_effect_list); te++) { |
331 for (te = _text_effect_list; te != endof(_text_effect_list); te++) { |
332 if (te->string_id != INVALID_STRING_ID && |
332 if (te->string_id != INVALID_STRING_ID && |
333 dpi->left <= te->right && |
333 dpi->left <= te->right && |
334 dpi->top <= te->bottom && |
334 dpi->top <= te->bottom && |
335 dpi->left + dpi->width > te->x && |
335 dpi->left + dpi->width > te->x && |
337 AddStringToDraw(te->x, te->y, te->string_id, te->params_1, te->params_2); |
337 AddStringToDraw(te->x, te->y, te->string_id, te->params_1, te->params_2); |
338 } |
338 } |
339 } |
339 } |
340 break; |
340 break; |
341 |
341 |
342 case 1: |
342 case ZOOM_LVL_OUT_2X: |
343 for (te = _text_effect_list; te != endof(_text_effect_list); te++) { |
343 for (te = _text_effect_list; te != endof(_text_effect_list); te++) { |
344 if (te->string_id != INVALID_STRING_ID && |
344 if (te->string_id != INVALID_STRING_ID && |
345 dpi->left <= te->right * 2 - te->x && |
345 dpi->left <= te->right * 2 - te->x && |
346 dpi->top <= te->bottom * 2 - te->y && |
346 dpi->top <= te->bottom * 2 - te->y && |
347 dpi->left + dpi->width > te->x && |
347 dpi->left + dpi->width > te->x && |
348 dpi->top + dpi->height > te->y) { |
348 dpi->top + dpi->height > te->y) { |
349 AddStringToDraw(te->x, te->y, (StringID)(te->string_id-1), te->params_1, te->params_2); |
349 AddStringToDraw(te->x, te->y, (StringID)(te->string_id-1), te->params_1, te->params_2); |
350 } |
350 } |
351 } |
351 } |
352 break; |
352 break; |
|
353 |
|
354 case ZOOM_LVL_OUT_4X: |
|
355 case ZOOM_LVL_OUT_8X: |
|
356 case ZOOM_LVL_OUT_16X: |
|
357 break; |
|
358 |
|
359 default: NOT_REACHED(); |
353 } |
360 } |
354 } |
361 } |
355 |
362 |
356 void DeleteAnimatedTile(TileIndex tile) |
363 void DeleteAnimatedTile(TileIndex tile) |
357 { |
364 { |