wesnoth-cvs-commits
[Top][All Lists]
Advanced

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

[Wesnoth-cvs-commits] wesnoth/src display.cpp sdl_utils.cpp multiplay...


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src display.cpp sdl_utils.cpp multiplay...
Date: Tue, 09 Nov 2004 22:16:43 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    04/11/10 03:10:34

Modified files:
        src            : display.cpp sdl_utils.cpp 
                         multiplayer_connect.cpp 

Log message:
        fixed compile errors on VC++

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/display.cpp.diff?tr1=1.272&tr2=1.273&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/sdl_utils.cpp.diff?tr1=1.62&tr2=1.63&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_connect.cpp.diff?tr1=1.87&tr2=1.88&r1=text&r2=text

Patches:
Index: wesnoth/src/display.cpp
diff -u wesnoth/src/display.cpp:1.272 wesnoth/src/display.cpp:1.273
--- wesnoth/src/display.cpp:1.272       Thu Nov  4 23:26:46 2004
+++ wesnoth/src/display.cpp     Wed Nov 10 03:10:33 2004
@@ -1,4 +1,4 @@
-/* $Id: display.cpp,v 1.272 2004/11/04 23:26:46 ydirson Exp $ */
+/* $Id: display.cpp,v 1.273 2004/11/10 03:10:33 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -47,11 +47,11 @@
        const int DefaultZoom = 72;
        const int MaxZoom = 200;
 
-       const int MinZoom(const gamemap& map, const SDL_Rect& viewport)
+       int MinZoom(const gamemap& map, const SDL_Rect& viewport)
        {
                const int min_zoom1 = viewport.w/((map.x()*3)/4);
                const int min_zoom2 = viewport.h/map.y();
-               const int min_zoom = maximum<int>(min_zoom1,min_zoom2);
+               return maximum<int>(min_zoom1,min_zoom2);
        }
 
        const size_t SideBarGameStatus_x = 16;
Index: wesnoth/src/multiplayer_connect.cpp
diff -u wesnoth/src/multiplayer_connect.cpp:1.87 
wesnoth/src/multiplayer_connect.cpp:1.88
--- wesnoth/src/multiplayer_connect.cpp:1.87    Tue Nov  9 20:11:13 2004
+++ wesnoth/src/multiplayer_connect.cpp Wed Nov 10 03:10:34 2004
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_connect.cpp,v 1.87 2004/11/09 20:11:13 gruikya Exp $ */
+/* $Id: multiplayer_connect.cpp,v 1.88 2004/11/10 03:10:34 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -627,7 +627,7 @@
                                side["controller"] = "null";
                                side["description"] = "";
                                break;
-                       case 5:
+                       case 5: {
                                side["controller"] = "human";
                                side["description"] = preferences::login();
                                for(size_t m = 0; m != combos_type_.size(); 
++m) {
@@ -640,7 +640,8 @@
                                                }
                                        }
                                }
-                               break;
+                               break;
+                       }
                        case 4:
                                combos_type_[n].set_selected(0);
                        case 0:
Index: wesnoth/src/sdl_utils.cpp
diff -u wesnoth/src/sdl_utils.cpp:1.62 wesnoth/src/sdl_utils.cpp:1.63
--- wesnoth/src/sdl_utils.cpp:1.62      Sun Oct 31 20:50:13 2004
+++ wesnoth/src/sdl_utils.cpp   Wed Nov 10 03:10:34 2004
@@ -1,4 +1,4 @@
-/* $Id: sdl_utils.cpp,v 1.62 2004/10/31 20:50:13 silene Exp $ */
+/* $Id: sdl_utils.cpp,v 1.63 2004/11/10 03:10:34 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -37,8 +37,8 @@
 SDL_Rect intersect_rects(SDL_Rect const &rect1, SDL_Rect const &rect2)
 {
        SDL_Rect res;
-       res.x = maximum(rect1.x, rect2.x);
-       res.y = maximum(rect1.y, rect2.y);
+       res.x = maximum<int>(rect1.x, rect2.x);
+       res.y = maximum<int>(rect1.y, rect2.y);
        res.w = maximum<int>(minimum<int>(rect1.x + rect1.w, rect2.x + rect2.w) 
- res.x, 0);
        res.h = maximum<int>(minimum<int>(rect1.y + rect1.h, rect2.y + rect2.h) 
- res.y, 0);
        return res;




reply via email to

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