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

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

[Wesnoth-cvs-commits] wesnoth ./Makefile.am src/image.cpp


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth ./Makefile.am src/image.cpp
Date: Mon, 27 Dec 2004 18:36:51 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    04/12/27 23:25:29

Modified files:
        .              : Makefile.am 
        src            : image.cpp 

Log message:
        in tinygui mode, scale down many more images including terrains and 
units

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/Makefile.am.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/image.cpp.diff?tr1=1.67&tr2=1.68&r1=text&r2=text

Patches:
Index: wesnoth/Makefile.am
diff -u wesnoth/Makefile.am:1.20 wesnoth/Makefile.am:1.21
--- wesnoth/Makefile.am:1.20    Sun Nov  7 14:17:01 2004
+++ wesnoth/Makefile.am Mon Dec 27 23:25:29 2004
@@ -32,13 +32,17 @@
          $(install_sh_DATA) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
        done
 if TINYGUI
-       (cd $(top_srcdir) && find images/portraits $(findfilterflags) -o 
-print) | while read p; do \
+       (cd $(top_srcdir) && find images images/terrain \( $(findfilterflags) 
-o -name '*.png' -print \) ) | while read p; do \
          $(w_preparefileinstall) \
-         convert -size 80x80 -resize 80x80 "$$d$$p" 
"$(DESTDIR)$(pkgdatadir)/$$f"; \
-       done
-       (cd $(top_srcdir) && find images/maps images/campaigns/*/maps 
images/campaigns/*/story $(findfilterflags) -o -print) | while read p; do \
-         $(w_preparefileinstall) \
-         convert -size 240x180 -resize 240x180 "$$d$$p" 
"$(DESTDIR)$(pkgdatadir)/$$f"; \
+         eval `pngmeta --all $$d$$p | grep -E 'image-(width|height):' | tr -d 
' -' | tr : =` ;\
+         case $${imagewidth}x$$imageheight in \
+         1024x768) dstsize=320x240 ;; \
+         640x480)  dstsize=240x180 ;; \
+         205x205)  dstsize=80x80 ;; \
+         *) if [ $$imageheight -gt $$imagewidth ]; then max=`expr 
$$imageheight / 2`; else max=`expr $$imagewidth / 2`; fi ;\
+            dstsize=$${max}x$${max} ;; \
+         esac ; \
+         convert -size $$dstsize -resize $$dstsize "$$d$$p" 
"$(DESTDIR)$(pkgdatadir)/$$f"; \
        done
 endif
 
Index: wesnoth/src/image.cpp
diff -u wesnoth/src/image.cpp:1.67 wesnoth/src/image.cpp:1.68
--- wesnoth/src/image.cpp:1.67  Sat Nov 27 09:49:44 2004
+++ wesnoth/src/image.cpp       Mon Dec 27 23:25:29 2004
@@ -47,7 +47,11 @@
 
 SDL_PixelFormat* pixel_format = NULL;
 
+#ifdef USE_TINY_GUI
+const int tile_size = 36;
+#else
 const int tile_size = 72;
+#endif
 int zoom = tile_size;
 
 //The "pointer to surfaces" vector is not cleared anymore (the surface are




reply via email to

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