(svn r2127) Get rid again of the CmdSetNewMapSize(), which was agreed to be just useless clutter. (Perhaps we should get rid of CmdSetNewLandscapeType() too, but I won't take responsibility for that. ;-)
authorpasky
Sat, 02 Apr 2005 15:59:07 +0000
changeset 1623 30298d952174
parent 1622 2cde8f050c51
child 1624 30351c8532f9
(svn r2127) Get rid again of the CmdSetNewMapSize(), which was agreed to be just useless clutter. (Perhaps we should get rid of CmdSetNewLandscapeType() too, but I won't take responsibility for that. ;-)
command.c
command.h
intro_gui.c
--- a/command.c	Sat Apr 02 15:08:31 2005 +0000
+++ b/command.c	Sat Apr 02 15:59:07 2005 +0000
@@ -167,8 +167,6 @@
 
 DEF_COMMAND(CmdReplaceVehicle);
 
-DEF_COMMAND(CmdSetNewMapSize);
-
 /* The master command table */
 static CommandProc * const _command_proc_table[] = {
 	CmdBuildRailroadTrack,				/* 0  */
@@ -310,7 +308,6 @@
 	CmdGiveMoney,									/* 113 */
 	CmdChangePatchSetting,				/* 114 */
 	CmdReplaceVehicle,						/* 115 */
-	CmdSetNewMapSize,						/* 116 */
 };
 
 /* This function range-checks a cmd, and checks if the cmd is not NULL */
--- a/command.h	Sat Apr 02 15:08:31 2005 +0000
+++ b/command.h	Sat Apr 02 15:59:07 2005 +0000
@@ -149,8 +149,6 @@
 	CMD_CHANGE_PATCH_SETTING = 114,
 
 	CMD_REPLACE_VEHICLE = 115,
-
-	CMD_SET_NEW_MAP_SIZE = 116,
 };
 
 enum {
--- a/intro_gui.c	Sat Apr 02 15:08:31 2005 +0000
+++ b/intro_gui.c	Sat Apr 02 15:59:07 2005 +0000
@@ -79,13 +79,16 @@
 		case 4: DoCommandP(0, InteractiveRandom(), 0, NULL, CMD_CREATE_SCENARIO); break;
 		case 5: ShowSaveLoadDialog(SLD_LOAD_SCENARIO); break;
 		case 6: case 7: case 8: case 9:
+			// XXX: Useless usage of the CMD infrastructure?
 			DoCommandP(0, e->click.widget - 6, 0, NULL, CMD_SET_NEW_LANDSCAPE_TYPE);
 			break;
 		case 10: case 11: case 12: case 13: case 14: case 15:
-			DoCommandP(0, 6 + e->click.widget - 10, _patches.map_y, NULL, CMD_SET_NEW_MAP_SIZE);
+			_patches.map_x = 6 + e->click.widget - 10;
+			InvalidateWindowClasses(WC_SELECT_GAME);
 			break;
 		case 16: case 17: case 18: case 19: case 20: case 21:
-			DoCommandP(0, _patches.map_x, 6 + e->click.widget - 16, NULL, CMD_SET_NEW_MAP_SIZE);
+			_patches.map_y = 6 + e->click.widget - 16;
+			InvalidateWindowClasses(WC_SELECT_GAME);
 			break;
 		case 23:
 #ifdef ENABLE_NETWORK
@@ -326,9 +329,6 @@
 int32 CmdSetNewMapSize(int x, int y, uint32 flags, uint32 p1, uint32 p2)
 {
 	if (flags & DC_EXEC) {
-		_patches.map_x = p1;
-		_patches.map_y = p2;
-		InvalidateWindowClasses(WC_SELECT_GAME);
 	}
 	return 0;
 }