stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/map map_save.c


From: Jimmy Salmon
Subject: [Stratagus-CVS] stratagus/src/map map_save.c
Date: Sat, 27 Sep 2003 00:52:46 -0400

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Jimmy Salmon <address@hidden>   03/09/27 00:52:46

Modified files:
        src/map        : map_save.c 

Log message:
        Cleanup

Patches:
Index: stratagus/src/map/map_save.c
diff -u stratagus/src/map/map_save.c:1.19 stratagus/src/map/map_save.c:1.20
--- stratagus/src/map/map_save.c:1.19   Sun Aug 17 11:57:07 2003
+++ stratagus/src/map/map_save.c        Sat Sep 27 00:52:46 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: map_save.c,v 1.19 2003/08/17 15:57:07 n0body Exp $
+//     $Id: map_save.c,v 1.20 2003/09/27 04:52:46 jsalmon3 Exp $
 
 //@{
 
@@ -67,92 +67,92 @@
     int h;
     int i;
 
-    CLprintf(file,"\n;;; -----------------------------------------\n");
-    CLprintf(file,";;; MODULE: map $Id: map_save.c,v 1.19 2003/08/17 15:57:07 
n0body Exp $\n");
+    CLprintf(file, "\n;;; -----------------------------------------\n");
+    CLprintf(file, ";;; MODULE: map $Id: map_save.c,v 1.20 2003/09/27 04:52:46 
jsalmon3 Exp $\n");
 
-    CLprintf(file,"(stratagus-map\n");
+    CLprintf(file, "(stratagus-map\n");
 
-    CLprintf(file,"  'version \"" StratagusFormatString "\"\n",
-           StratagusFormatArgs(StratagusVersion));
-    CLprintf(file,"  'description \"%s\"\n",TheMap.Description);
+    CLprintf(file, "  'version \"" StratagusFormatString "\"\n",
+       StratagusFormatArgs(StratagusVersion));
+    CLprintf(file, "  'description \"%s\"\n", TheMap.Description);
 
-    CLprintf(file,"  'the-map '(\n");
+    CLprintf(file, "  'the-map '(\n");
 
     // FIXME: Why terrain? TheMap->Tileset->Class should be correct
-    CLprintf(file,"  terrain (%s \"%s\")\n"
-           ,TheMap.TerrainName,Tilesets[TheMap.Terrain]->Class);
+    CLprintf(file, "  terrain (%s \"%s\")\n",
+       TheMap.TerrainName,Tilesets[TheMap.Terrain]->Class);
 
-    CLprintf(file,"  size (%d %d)\n",TheMap.Width,TheMap.Height);
-    CLprintf(file,"  %s\n",TheMap.NoFogOfWar ? "no-fog-of-war" : "fog-of-war");
+    CLprintf(file, "  size (%d %d)\n", TheMap.Width, TheMap.Height);
+    CLprintf(file, "  %s\n", TheMap.NoFogOfWar ? "no-fog-of-war" : 
"fog-of-war");
 
-    CLprintf(file,"  map-fields (\n");
-    for( h=0; h<TheMap.Height; ++h ) {
-       CLprintf(file,"  ; %d\n",h);
-       for( w=0; w<TheMap.Width; ++w ) {
+    CLprintf(file, "  map-fields (\n");
+    for (h = 0; h < TheMap.Height; ++h) {
+       CLprintf(file, "  ; %d\n", h);
+       for (w = 0; w < TheMap.Width; ++w) {
            MapField* mf;
 
-           mf=&TheMap.Fields[h*TheMap.Width+w];
-           CLprintf(file,"  (%3d %3d",mf->Tile,mf->SeenTile);
-           if( mf->Value ) {
-               CLprintf(file," %d",mf->Value);
-           }
-           for( i=0; i < PlayerMax; ++i ) {
-               if( mf->Visible[i] == 1) {
-                   CLprintf(file," explored %d",i);
+           mf = &TheMap.Fields[h * TheMap.Width + w];
+           CLprintf(file, "  (%3d %3d", mf->Tile, mf->SeenTile);
+           if (mf->Value) {
+               CLprintf(file, " %d", mf->Value);
+           }
+           for (i = 0; i < PlayerMax; ++i) {
+               if (mf->Visible[i] == 1) {
+                   CLprintf(file, " explored %d", i);
                }
            }
-           if( mf->Flags&MapFieldHuman ) {
-               CLprintf(file," human");
+           if (mf->Flags & MapFieldHuman) {
+               CLprintf(file, " human");
            }
-           if( mf->Flags&MapFieldLandAllowed ) {
-               CLprintf(file," land");
+           if (mf->Flags & MapFieldLandAllowed) {
+               CLprintf(file, " land");
            }
-           if( mf->Flags&MapFieldCoastAllowed ) {
-               CLprintf(file," coast");
+           if (mf->Flags & MapFieldCoastAllowed) {
+               CLprintf(file, " coast");
            }
-           if( mf->Flags&MapFieldWaterAllowed ) {
-               CLprintf(file," water");
+           if (mf->Flags & MapFieldWaterAllowed) {
+               CLprintf(file, " water");
            }
-           if( mf->Flags&MapFieldNoBuilding ) {
-               CLprintf(file," mud");
+           if (mf->Flags & MapFieldNoBuilding) {
+               CLprintf(file, " mud");
            }
-           if( mf->Flags&MapFieldUnpassable ) {
-               CLprintf(file," block");
+           if (mf->Flags & MapFieldUnpassable) {
+               CLprintf(file, " block");
            }
-           if( mf->Flags&MapFieldWall ) {
-               CLprintf(file," wall");
+           if (mf->Flags&MapFieldWall) {
+               CLprintf(file, " wall");
            }
-           if( mf->Flags&MapFieldRocks ) {
-               CLprintf(file," rock");
+           if (mf->Flags & MapFieldRocks) {
+               CLprintf(file, " rock");
            }
-           if( mf->Flags&MapFieldForest ) {
-               CLprintf(file," wood");
+           if (mf->Flags & MapFieldForest) {
+               CLprintf(file, " wood");
            }
 #if 1
            // Not Required for save
            // These are required for now, UnitType::FieldFlags is 0 until
            // UpdateStats is called which is after the game is loaded
-           if( mf->Flags&MapFieldLandUnit ) {
-               CLprintf(file," ground");
+           if (mf->Flags & MapFieldLandUnit) {
+               CLprintf(file, " ground");
            }
-           if( mf->Flags&MapFieldAirUnit ) {
-               CLprintf(file," air");
+           if (mf->Flags & MapFieldAirUnit) {
+               CLprintf(file, " air");
            }
-           if( mf->Flags&MapFieldSeaUnit ) {
-               CLprintf(file," sea");
+           if (mf->Flags & MapFieldSeaUnit) {
+               CLprintf(file, " sea");
            }
-           if( mf->Flags&MapFieldBuilding ) {
-               CLprintf(file," building");
+           if (mf->Flags&MapFieldBuilding) {
+               CLprintf(file, " building");
            }
 #endif
-           if( w&1 ) {
-               CLprintf(file,")\n");
+           if (w & 1) {
+               CLprintf(file, ")\n");
            } else {
-               CLprintf(file,")\t");
+               CLprintf(file, ")\t");
            }
        }
     }
-    CLprintf(file,")))\n");
+    CLprintf(file, ")))\n");
 }
 
 //@}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]