src/texteff.cpp
changeset 8345 6caa3fdb972c
parent 8245 dc1637bc2c56
child 8533 a9b708fe4a00
equal deleted inserted replaced
8344:b8b77e2e11c9 8345:6caa3fdb972c
    18 #include "blitter/factory.hpp"
    18 #include "blitter/factory.hpp"
    19 #include <stdarg.h> /* va_list */
    19 #include <stdarg.h> /* va_list */
    20 #include "date.h"
    20 #include "date.h"
    21 #include "texteff.hpp"
    21 #include "texteff.hpp"
    22 #include "video/video_driver.hpp"
    22 #include "video/video_driver.hpp"
       
    23 #include "transparency.h"
    23 
    24 
    24 enum {
    25 enum {
    25 	MAX_TEXTMESSAGE_LENGTH = 200,
    26 	MAX_TEXTMESSAGE_LENGTH = 200,
    26 	INIT_NUM_TEXT_MESSAGES =  20,
    27 	INIT_NUM_TEXT_MESSAGES =  20,
    27 	MAX_CHAT_MESSAGES      =  10,
    28 	MAX_CHAT_MESSAGES      =  10,
   388 				if (te->string_id != INVALID_STRING_ID &&
   389 				if (te->string_id != INVALID_STRING_ID &&
   389 						dpi->left <= te->right &&
   390 						dpi->left <= te->right &&
   390 						dpi->top  <= te->bottom &&
   391 						dpi->top  <= te->bottom &&
   391 						dpi->left + dpi->width  > te->x &&
   392 						dpi->left + dpi->width  > te->x &&
   392 						dpi->top  + dpi->height > te->y) {
   393 						dpi->top  + dpi->height > te->y) {
   393 					if (te->mode == TE_RISING || (_patches.loading_indicators && !HASBIT(_transparent_opt, TO_LOADING))) {
   394 					if (te->mode == TE_RISING || (_patches.loading_indicators && !IsTransparencySet(TO_LOADING))) {
   394 						AddStringToDraw(te->x, te->y, te->string_id, te->params_1, te->params_2);
   395 						AddStringToDraw(te->x, te->y, te->string_id, te->params_1, te->params_2);
   395 					}
   396 					}
   396 				}
   397 				}
   397 			}
   398 			}
   398 			break;
   399 			break;
   403 				if (te->string_id != INVALID_STRING_ID &&
   404 				if (te->string_id != INVALID_STRING_ID &&
   404 						dpi->left <= te->right  * 2 - te->x &&
   405 						dpi->left <= te->right  * 2 - te->x &&
   405 						dpi->top  <= te->bottom * 2 - te->y &&
   406 						dpi->top  <= te->bottom * 2 - te->y &&
   406 						dpi->left + dpi->width  > te->x &&
   407 						dpi->left + dpi->width  > te->x &&
   407 						dpi->top  + dpi->height > te->y) {
   408 						dpi->top  + dpi->height > te->y) {
   408 					if (te->mode == TE_RISING || (_patches.loading_indicators && !HASBIT(_transparent_opt, TO_LOADING))) {
   409 					if (te->mode == TE_RISING || (_patches.loading_indicators && !IsTransparencySet(TO_LOADING))) {
   409 						AddStringToDraw(te->x, te->y, (StringID)(te->string_id - 1), te->params_1, te->params_2);
   410 						AddStringToDraw(te->x, te->y, (StringID)(te->string_id - 1), te->params_1, te->params_2);
   410 					}
   411 					}
   411 				}
   412 				}
   412 			}
   413 			}
   413 			break;
   414 			break;