src/signs_gui.cpp
branchnoai
changeset 9723 eee46cb39750
parent 9722 ebf0ece7d8f6
child 9724 b39bc69bb2f2
--- a/src/signs_gui.cpp	Fri Nov 23 16:59:30 2007 +0000
+++ b/src/signs_gui.cpp	Wed Jan 09 18:11:12 2008 +0000
@@ -6,17 +6,20 @@
 #include "openttd.h"
 #include "table/strings.h"
 #include "table/sprites.h"
-#include "functions.h"
-#include "window.h"
 #include "gui.h"
-#include "gfx.h"
+#include "textbuf_gui.h"
+#include "window_gui.h"
 #include "player.h"
 #include "signs.h"
-#include "strings.h"
 #include "debug.h"
 #include "variables.h"
-#include "helpers.hpp"
-#include "command.h"
+#include "command_func.h"
+#include "strings_func.h"
+#include "core/alloc_func.hpp"
+#include "window_func.h"
+#include "map_func.h"
+#include "gfx_func.h"
+#include "viewport_func.h"
 
 static const Sign **_sign_sort;
 static uint _num_sign_sort;
@@ -47,7 +50,6 @@
 
 	/* Create array for sorting */
 	_sign_sort = ReallocT(_sign_sort, GetMaxSignIndex() + 1);
-	if (_sign_sort == NULL) error("Could not allocate memory for the sign-sorting-list");
 
 	FOR_ALL_SIGNS(si) _sign_sort[n++] = si;
 	_num_sign_sort = n;
@@ -184,7 +186,7 @@
 	WP(w, editsign_d).cur_sign = si->index;
 	InitializeTextBuffer(&WP(w, querystr_d).text, _edit_str_buf, 31, 255); // Allow 31 characters (including \0)
 
-	InvalidateWidget(w, QUERY_EDIT_SIGN_WIDGET_TEXT);
+	w->InvalidateWidget(QUERY_EDIT_SIGN_WIDGET_TEXT);
 }
 
 static void RenameSign(SignID index, const char *text)
@@ -315,7 +317,7 @@
 
 	WP(w, editsign_d).caption = STR_280B_EDIT_SIGN_TEXT;
 	WP(w, editsign_d).afilter = CS_ALPHANUMERAL;
-	LowerWindowWidget(w, QUERY_EDIT_SIGN_WIDGET_TEXT);
+	w->LowerWidget(QUERY_EDIT_SIGN_WIDGET_TEXT);
 
 	UpdateSignEditWindow(w, si);
 }