src/texteff.cpp
branchnoai
changeset 9723 eee46cb39750
parent 9722 ebf0ece7d8f6
child 9724 b39bc69bb2f2
--- a/src/texteff.cpp	Fri Nov 23 16:59:30 2007 +0000
+++ b/src/texteff.cpp	Wed Jan 09 18:11:12 2008 +0000
@@ -4,23 +4,23 @@
 
 #include "stdafx.h"
 #include "openttd.h"
-#include "functions.h"
-#include "macros.h"
-#include "strings.h"
-#include "gfx.h"
+#include "tile_cmd.h"
 #include "landscape.h"
-#include "viewport.h"
+#include "gfx_func.h"
 #include "saveload.h"
 #include "console.h"
-#include "string.h"
 #include "variables.h"
 #include "table/sprites.h"
 #include "blitter/factory.hpp"
 #include <stdarg.h> /* va_list */
-#include "date.h"
 #include "texteff.hpp"
 #include "video/video_driver.hpp"
 #include "transparency.h"
+#include "strings_func.h"
+#include "core/alloc_func.hpp"
+#include "date_func.h"
+#include "functions.h"
+#include "viewport_func.h"
 
 enum {
 	MAX_TEXTMESSAGE_LENGTH = 200,
@@ -58,7 +58,7 @@
 
 /* The chatbox grows from the bottom so the coordinates are pixels from
  * the left and pixels from the bottom. The height is the maximum height */
-static const Oblong _chatmsg_box = {10, 30, 500, 150};
+static const PointDimension _chatmsg_box = {10, 30, 500, 150};
 static uint8 _chatmessage_backup[150 * 500 * 6]; // (height * width)
 
 static inline uint GetChatMessageCount()
@@ -292,7 +292,7 @@
 	/* If there is none found, we grow the array */
 	if (i == _num_text_effects) {
 		_num_text_effects += 25;
-		_text_effect_list = (TextEffect*) realloc(_text_effect_list, _num_text_effects * sizeof(TextEffect));
+		_text_effect_list = ReallocT<TextEffect>(_text_effect_list, _num_text_effects);
 		for (; i < _num_text_effects; i++) _text_effect_list[i].string_id = INVALID_STRING_ID;
 		i = _num_text_effects - 1;
 	}