[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/ui menus.c
From: |
Russell Smith |
Subject: |
[Stratagus-CVS] stratagus/src/ui menus.c |
Date: |
Wed, 29 Oct 2003 07:44:38 -0500 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Russell Smith <address@hidden> 03/10/29 07:44:38
Modified files:
src/ui : menus.c
Log message:
You will never guess, we have actually got rid of the TileSet Enums
from this file
Patches:
Index: stratagus/src/ui/menus.c
diff -u stratagus/src/ui/menus.c:1.580 stratagus/src/ui/menus.c:1.581
--- stratagus/src/ui/menus.c:1.580 Wed Oct 29 01:07:29 2003
+++ stratagus/src/ui/menus.c Wed Oct 29 07:44:37 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: menus.c,v 1.580 2003/10/29 06:07:29 jsalmon3 Exp $
+// $Id: menus.c,v 1.581 2003/10/29 12:44:37 mr-russ Exp $
//@{
@@ -4231,6 +4231,8 @@
menu->Items[12].d.pulldown.curopt = 0;
}
}
+ // Initials to Number of Tilesets + 1 for default option.
+ menu->Items[14].d.pulldown.noptions = NumTilesets + 1;
}
/**
@@ -4337,13 +4339,9 @@
*/
local void GameTSSAction(Menuitem *mi, int i)
{
- // FIXME: TilesetSummer, ... shouldn't be used, they will be removed.
- int v[] = { SettingsPresetMapDefault, TilesetSummer, TilesetWinter,
TilesetWasteland, TilesetSwamp };
-
- DebugLevel0Fn("FIXME: The enums TilesetSummer, TilesetWinter, ... will be
removed in version 1.19\n");
-
if (!mi || mi->d.pulldown.curopt == i) {
- GameSettings.Terrain = v[i];
+ // Subtract 1 for default option.
+ GameSettings.Terrain = i - 1;
ServerSetupState.TssOpt = i;
if (mi) {
NetworkServerResyncClients();
@@ -5188,8 +5186,6 @@
char width[10];
char height[10];
char description[36];
- // FIXME: TilesetSummer, ... shouldn't be used, they will be removed.
- int v[] = { TilesetSummer, TilesetWinter, TilesetWasteland, TilesetSwamp };
VideoLockScreen();
MenusSetBackground();
@@ -5211,7 +5207,7 @@
strcpy(height, "128~!_");
menu->Items[5].d.input.nch = strlen(width) - 3;
menu->Items[5].d.input.maxch = 4;
-
+ menu->Items[7].d.pulldown.noptions = NumTilesets;
ProcessMenu("menu-editor-new", 1);
if (EditorCancelled) {
@@ -5224,7 +5220,7 @@
TheMap.Info = calloc(1, sizeof(MapInfo));
description[strlen(description) - 3] = '\0';
TheMap.Info->Description = strdup(description);
- TheMap.Info->MapTerrain = v[menu->Items[7].d.pulldown.curopt];
+ TheMap.Info->MapTerrain = menu->Items[7].d.pulldown.curopt;
TheMap.Info->MapWidth = atoi(width);
TheMap.Info->MapHeight = atoi(height);
@@ -5944,8 +5940,6 @@
{
Menu *menu;
char *description;
- // FIXME: TilesetSummer, ... shouldn't be used, they will be removed.
- int v[] = { TilesetSummer, TilesetWinter, TilesetWasteland, TilesetSwamp };
int old;
char *s;
@@ -5958,8 +5952,8 @@
// Change the terrain
old=TheMap.Info->MapTerrain;
- if (old != v[menu->Items[6].d.pulldown.curopt]) {
- TheMap.Info->MapTerrain = v[menu->Items[6].d.pulldown.curopt];
+ if (old != menu->Items[6].d.pulldown.curopt) {
+ TheMap.Info->MapTerrain = menu->Items[6].d.pulldown.curopt;
free(TheMap.Info->MapTerrainName);
TheMap.Info->MapTerrainName =
strdup(TilesetWcNames[TheMap.Info->MapTerrain]);
TheMap.Terrain = TheMap.Info->MapTerrain;
- [Stratagus-CVS] stratagus/src/ui menus.c, (continued)
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/17
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/17
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/20
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/25
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/25
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/25
- [Stratagus-CVS] stratagus/src/ui menus.c, Russell Smith, 2003/10/27
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/27
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/28
- [Stratagus-CVS] stratagus/src/ui menus.c, Jimmy Salmon, 2003/10/29
- [Stratagus-CVS] stratagus/src/ui menus.c,
Russell Smith <=