stratagus-cvs
[Top][All Lists]
Advanced

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

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


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src/map minimap.c
Date: 27 Jan 2004 10:10:28 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/27 10:10:28

Modified files:
        src/map        : minimap.c 

Log message:
        Changed width to pitch

Patches:
Index: stratagus/src/map/minimap.c
diff -u stratagus/src/map/minimap.c:1.93 stratagus/src/map/minimap.c:1.94
--- stratagus/src/map/minimap.c:1.93    Thu Jan 15 17:44:25 2004
+++ stratagus/src/map/minimap.c Tue Jan 27 10:10:28 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: minimap.c,v 1.93 2004/01/15 06:44:25 jsalmon3 Exp $
+//     $Id: minimap.c,v 1.94 2004/01/26 23:10:28 jsalmon3 Exp $
 
 //@{
 
@@ -195,10 +195,10 @@
                        xofs = TileSizeX * (tile % tilepitch);
                        yofs = TileSizeY * (tile / tilepitch);
 
-                       ((Uint8*)MinimapTerrainSurface->pixels)[mx + my * 
TheUI.MinimapW] =
+                       ((Uint8*)MinimapTerrainSurface->pixels)[mx + my * 
MinimapTerrainSurface->pitch] =
                                ((Uint8*)TheMap.TileGraphic->Surface->pixels)
                                        [xofs + 7 + (mx % scalex) * 8 + (yofs + 
6 + (my % scaley) * 8)
-                                       * TheMap.TileGraphic->Surface->w];
+                                       * TheMap.TileGraphic->Surface->pitch];
                }
        }
        SDL_UnlockSurface(MinimapTerrainSurface);
@@ -261,10 +261,10 @@
                        xofs = TileSizeX * (tile % tilepitch);
                        yofs = TileSizeY * (tile / tilepitch);
 
-                       ((Uint8*)MinimapTerrainSurface->pixels)[mx + my * 
TheUI.MinimapW] =
+                       ((Uint8*)MinimapTerrainSurface->pixels)[mx + my * 
MinimapTerrainSurface->pitch] =
                                ((Uint8*)TheMap.TileGraphic->Surface->pixels)
                                        [xofs + 7 + (mx % scalex) * 8 + (yofs + 
6 + (my % scaley) * 8)
-                                       * TheMap.TileGraphic->Surface->w];
+                                       * TheMap.TileGraphic->Surface->pitch];
                }
        }
        SDL_UnlockSurface(TheMap.TileGraphic->Surface);
@@ -324,7 +324,7 @@
                h = h0;
                while (h-- >= 0) {
                        SDL_GetRGB(color, TheScreen->format, &c.r, &c.g, &c.b);
-                       ((Uint8*)MinimapSurface->pixels)[mx + w + (my + h) * 
TheUI.MinimapW] =
+                       ((Uint8*)MinimapSurface->pixels)[mx + w + (my + h) * 
MinimapSurface->pitch] =
                                VideoMapRGB(MinimapSurface->format, c.r, c.g, 
c.b);
                }
        }
@@ -359,10 +359,10 @@
                        }
 
                        if (MinimapWithTerrain && (visiontype > 1 || 
(visiontype == 1 && ((mx & 1) == (my & 1))))) {
-                               ((Uint8*)MinimapSurface->pixels)[mx + my * 
TheUI.MinimapW] =
-                                       
((Uint8*)MinimapTerrainSurface->pixels)[mx + my * TheUI.MinimapW];
+                               ((Uint8*)MinimapSurface->pixels)[mx + my * 
MinimapSurface->pitch] =
+                                       
((Uint8*)MinimapTerrainSurface->pixels)[mx + my * MinimapTerrainSurface->pitch];
                        } else if (visiontype > 0) {
-                               ((Uint8*)MinimapSurface->pixels)[mx + my * 
TheUI.MinimapW] =
+                               ((Uint8*)MinimapSurface->pixels)[mx + my * 
MinimapSurface->pitch] =
                                        VideoMapRGB(MinimapSurface->format, 0, 
0, 0);
                        }
                }




reply via email to

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