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

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

[Wesnoth-cvs-commits] wesnoth data/terrain-graphics.cfg data/terrain....


From: Philippe Plantier
Subject: [Wesnoth-cvs-commits] wesnoth data/terrain-graphics.cfg data/terrain....
Date: Sat, 11 Sep 2004 13:22:34 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Philippe Plantier <address@hidden>      04/09/11 17:17:20

Modified files:
        data           : terrain-graphics.cfg terrain.cfg 
        data/terrain-graphics: castles.cfg util.cfg 
        src            : builder.cpp builder.hpp 
Added files:
        images/terrain : castle-concave-e.png castle-concave-ne.png 
                         castle-concave-nw.png castle-concave-se.png 
                         castle-concave-sw.png castle-concave-w.png 
                         castle-convex-e.png castle-convex-ne.png 
                         castle-convex-nw.png castle-convex-se.png 
                         castle-convex-sw.png castle-convex-w.png 
                         castle-walls.tmpl encampment-concave-e.png 
                         encampment-concave-ne.png 
                         encampment-concave-nw.png 
                         encampment-concave-se.png 
                         encampment-concave-sw.png 
                         encampment-concave-w.png 
                         encampment-convex-e.png 
                         encampment-convex-ne.png 
                         encampment-convex-nw.png 
                         encampment-convex-se.png 
                         encampment-convex-sw.png 
                         encampment-convex-w.png keep-inside-e.png 
                         keep-inside-ne.png keep-inside-nw.png 
                         keep-inside-se.png keep-inside-sw.png 
                         keep-inside-w.png keep-wall-0-e.png 
                         keep-wall-0-ne.png keep-wall-0-nw.png 
                         keep-wall-0-se.png keep-wall-0-sw.png 
                         keep-wall-0-w.png keep-wall-1-e.png 
                         keep-wall-1-ne.png keep-wall-1-nw.png 
                         keep-wall-1-se.png keep-wall-1-sw.png 
                         keep-wall-1-w.png keep-wall-e.png 
                         keep-wall-ne.png keep-wall-nw.png 
                         keep-wall-se.png keep-wall-sw.png 
                         keep-wall-w.png 
Removed files:
        images/terrain : castle-bg-concave-e.png 
                         castle-bg-concave-ne.png 
                         castle-bg-concave-nw.png 
                         castle-bg-concave-se.png 
                         castle-bg-concave-sw.png 
                         castle-bg-concave-w.png castle-bg-convex-e.png 
                         castle-bg-convex-ne.png castle-bg-convex-nw.png 
                         castle-bg-convex-se.png castle-bg-convex-sw.png 
                         castle-bg-convex-w.png castle-fg-concave-e.png 
                         castle-fg-concave-ne.png 
                         castle-fg-concave-nw.png 
                         castle-fg-concave-se.png 
                         castle-fg-concave-sw.png 
                         castle-fg-concave-w.png castle-fg-convex-e.png 
                         castle-fg-convex-ne.png castle-fg-convex-nw.png 
                         castle-fg-convex-se.png castle-fg-convex-sw.png 
                         castle-fg-convex-w.png 
                         encampment-bg-concave-e.png 
                         encampment-bg-concave-ne.png 
                         encampment-bg-concave-nw.png 
                         encampment-bg-concave-se.png 
                         encampment-bg-concave-sw.png 
                         encampment-bg-concave-w.png 
                         encampment-bg-convex-e.png 
                         encampment-bg-convex-ne.png 
                         encampment-bg-convex-nw.png 
                         encampment-bg-convex-se.png 
                         encampment-bg-convex-sw.png 
                         encampment-bg-convex-w.png 
                         encampment-fg-concave-e.png 
                         encampment-fg-concave-ne.png 
                         encampment-fg-concave-nw.png 
                         encampment-fg-concave-se.png 
                         encampment-fg-concave-sw.png 
                         encampment-fg-concave-w.png 
                         encampment-fg-convex-e.png 
                         encampment-fg-convex-ne.png 
                         encampment-fg-convex-nw.png 
                         encampment-fg-convex-se.png 
                         encampment-fg-convex-sw.png 
                         encampment-fg-convex-w.png keep-bg-inside-e.png 
                         keep-bg-inside-ne.png keep-bg-inside-nw.png 
                         keep-bg-inside-se.png keep-bg-inside-sw.png 
                         keep-bg-inside-w.png keep-bg-wall-0-e.png 
                         keep-bg-wall-0-ne.png keep-bg-wall-0-nw.png 
                         keep-bg-wall-0-se.png keep-bg-wall-0-sw.png 
                         keep-bg-wall-0-w.png keep-bg-wall-1-e.png 
                         keep-bg-wall-1-ne.png keep-bg-wall-1-nw.png 
                         keep-bg-wall-1-se.png keep-bg-wall-1-sw.png 
                         keep-bg-wall-1-w.png keep-bg-wall-e.png 
                         keep-bg-wall-ne.png keep-bg-wall-nw.png 
                         keep-bg-wall-se.png keep-bg-wall-sw.png 
                         keep-bg-wall-w.png keep-fg-inside-e.png 
                         keep-fg-inside-ne.png keep-fg-inside-nw.png 
                         keep-fg-inside-se.png keep-fg-inside-sw.png 
                         keep-fg-inside-w.png keep-fg-wall-0-e.png 
                         keep-fg-wall-0-ne.png keep-fg-wall-0-nw.png 
                         keep-fg-wall-0-se.png keep-fg-wall-0-sw.png 
                         keep-fg-wall-0-w.png keep-fg-wall-1-e.png 
                         keep-fg-wall-1-ne.png keep-fg-wall-1-nw.png 
                         keep-fg-wall-1-se.png keep-fg-wall-1-sw.png 
                         keep-fg-wall-1-w.png keep-fg-wall-e.png 
                         keep-fg-wall-ne.png keep-fg-wall-nw.png 
                         keep-fg-wall-se.png keep-fg-wall-sw.png 
                         keep-fg-wall-w.png 

Log message:
        Added a way to specify the actual position of multi-hex tiles, to fix 
several
        graphic glitches. Fixed several graphic clitches.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/terrain-graphics.cfg.diff?tr1=1.35&tr2=1.36&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/terrain.cfg.diff?tr1=1.43&tr2=1.44&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/terrain-graphics/castles.cfg.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/terrain-graphics/util.cfg.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-concave-e.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-concave-ne.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-concave-nw.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-concave-se.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-concave-sw.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-concave-w.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-convex-e.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-convex-ne.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-convex-nw.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-convex-se.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-convex-sw.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-convex-w.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/castle-walls.tmpl?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-concave-e.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-concave-ne.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-concave-nw.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-concave-se.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-concave-sw.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-concave-w.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-convex-e.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-convex-ne.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-convex-nw.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-convex-se.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-convex-sw.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/encampment-convex-w.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-inside-e.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-inside-ne.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-inside-nw.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-inside-se.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-inside-sw.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-inside-w.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-0-e.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-0-ne.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-0-nw.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-0-se.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-0-sw.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-0-w.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-1-e.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-1-ne.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-1-nw.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-1-se.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-1-sw.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-1-w.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-e.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-ne.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-nw.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-se.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-sw.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/terrain/keep-wall-w.png.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/builder.cpp.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/builder.hpp.diff?tr1=1.23&tr2=1.24&r1=text&r2=text

Patches:
Index: wesnoth/data/terrain-graphics.cfg
diff -u wesnoth/data/terrain-graphics.cfg:1.35 
wesnoth/data/terrain-graphics.cfg:1.36
--- wesnoth/data/terrain-graphics.cfg:1.35      Tue Aug 24 18:05:45 2004
+++ wesnoth/data/terrain-graphics.cfg   Sat Sep 11 17:17:20 2004
@@ -105,12 +105,12 @@
 {TERRAIN_BASE D cave-floor1}
 {TERRAIN_BASE t grassland-r1}
 
-{BUILDING Y ({IMG       -100 village-swampwater })}
-{BUILDING V ({IMG       -100 village-snow       })}
-{BUILDING Z ({IMG       -100 village-coast      })}
-{BUILDING v ({IMG       -100 village-human      })}
-{BUILDING D ({IMG       -100 dwarven-village    })}
-{BUILDING t ({IMG_NIGHT -100 village 
village-dusk,village-dusk2,village-dusk3,village-dusk4})} 
+{BUILDING Y ({VIMG       36,40 village-swampwater })}
+{BUILDING V ({VIMG       36,40 village-snow       })}
+{BUILDING Z ({VIMG       36,40 village-coast      })}
+{BUILDING v ({VIMG       36,40 village-human      })}
+{BUILDING D ({VIMG       36,40 dwarven-village    })}
+{BUILDING t ({VIMG_NIGHT 36,40 village 
village-dusk,village-dusk2,village-dusk3,village-dusk4})} 
 
 #
 # Transition between terrains
@@ -134,52 +134,68 @@
 # Castles base terrains
 #
 
+{DISABLE_TRANSITIONS K}
+
 {TERRAIN_BASE C castle}
 {TERRAIN_BASE o dwarven-castle-floor}
 {TERRAIN_BASE n dirt}
+{TERRAIN_BASE O orccastle}
 {TERRAIN_BASE_FLAG K keep-of-C castle}
 {TERRAIN_BASE_FLAG K keep-of-o dwarven-keep-floor}
 {TERRAIN_BASE_FLAG K keep-of-n dirt}
 
-{CASTLE_AND_COMPOSED_KEEP C K castle keep}
-{CASTLE_AND_SIMPLE_KEEP   n K encampment}
+# Loyalist castle
+{DISABLE_TRANSITIONS C}
+{TERRAIN_ADJACENT_CORNER       C      !CK    !CK     castle-convex}
+{TERRAIN_ADJACENT_CORNER       !CK    C      C       castle-concave}
+{TERRAIN_ADJACENT_CORNER       K      C      C       keep-inside}
+{TERRAIN_ADJACENT_CORNER_FLAG1 K      !CK    !CK     keep-of-C keep-wall}
+{TERRAIN_ADJACENT_CORNER       K      !CK    C       keep-wall-0}
+{TERRAIN_ADJACENT_CORNER       K      C      !CK     keep-wall-1} 
+
+# Encampments
+{DISABLE_TRANSITIONS n}
+{TERRAIN_ADJACENT_CORNER       n      !nK    !nK     encampment-convex}
+{TERRAIN_ADJACENT_CORNER       !nK    n      n       encampment-concave}
+{TERRAIN_ADJACENT_CORNER_FLAG1 K      !nK    !nK     keep-of-n 
encampment-convex}
+{TERRAIN_ADJACENT_CORNER       !nK    K      n       encampment-concave}
+{TERRAIN_ADJACENT_CORNER       !nK    n      K       encampment-concave}
+
+# Cave and dwarven castles
+{DISABLE_TRANSITIONS W}
+{DISABLE_TRANSITIONS o}
+{TERRAIN_ADJACENT_CORNER       W      !WoK   !WoK    cavewall-convex}
+{TERRAIN_ADJACENT_CORNER       !WoK   W      W       cavewall-concave}
+{TERRAIN_ADJACENT_CORNER       o      !WoK   !WoK    dwarven-castle-convex}
+{TERRAIN_ADJACENT_CORNER       !WoK   o      o       dwarven-castle-concave}
+{TERRAIN_ADJACENT_CORNER_FLAG1 K      !WoK   !WoK    keep-of-o 
dwarven-castle-convex}
+{TERRAIN_ADJACENT_CORNER       !WoK   K      o       dwarven-castle-concave}
+{TERRAIN_ADJACENT_CORNER       !WoK   o      K       dwarven-castle-concave}
+{TERRAIN_ADJACENT_CORNER       oK     W      W       
dwarven-castle-wall-convex}
+{TERRAIN_ADJACENT_CORNER       W      oK     oK      
dwarven-castle-wall-concave}
+{TERRAIN_ADJACENT_CORNER       oK     W      !WoK    dwarven-castle-wall-cw}
+{TERRAIN_ADJACENT_CORNER       oK     !WoK   W       dwarven-castle-wall-ccw}
+
+# Orcish castle
+{DISABLE_TRANSITIONS O}
+{TERRAIN_ADJACENT_CORNER       O      !O     !O      orccastle-convex}
+{TERRAIN_ADJACENT_CORNER       !O     O      O       orccastle-concave}
+#{TERRAIN_ADJACENT_CORNER   -50        K      O      O       <name>}
+#{TERRAIN_ADJACENT_CORNER_FLAG1 -50    K      !OK    !OK     keep-of-O <name>}
+#{TERRAIN_ADJACENT_CORNER   -50        K      O      !OK     <name>}
+#{TERRAIN_ADJACENT_CORNER   -50        K      !OK    O       <name>} 
 
 # Castle decorations and castle floors. Those must always be after the castles
 # are defined.
-{BUILDING_FLAG K ({IMG -100 tent}) keep-of-n}
-{BUILDING_FLAG K ({IMG -100 dwarven-keep}) keep-of-o}
+{BUILDING_FLAG K ({VIMG 36,40 tent}) keep-of-n}
+{BUILDING_FLAG K ({VIMG 36,40 dwarven-keep}) keep-of-o}
 
 # Forest, hills and mountains should always overlay on northern sides
-{TERRAIN_ADJACENT_NORTH    -90        m  !m   mountains}
-{TERRAIN_ADJACENT_NORTH    -90        H  !H   snow-hills}
-{TERRAIN_ADJACENT_NORTH    -90        h  !hm  hills} # No adj-north between 
hills and mountains
-#{TERRAIN_ADJACENT_NORTH    -80        F  !F   snow-forest}
-
-# Cave and dwarven castles
-{DISABLE_TRANSITIONS W}
-{DISABLE_TRANSITIONS o}
-{TERRAIN_ADJACENT_CORNER   -185        W      !WoK   !WoK    cavewall-convex}
-{TERRAIN_ADJACENT_CORNER   -185        !WoK   W      W       cavewall-concave}
-{TERRAIN_ADJACENT_CORNER   -185        o      !WoK   !WoK    
dwarven-castle-convex}
-{TERRAIN_ADJACENT_CORNER   -185        !WoK   o      o       
dwarven-castle-concave}
-{TERRAIN_ADJACENT_CORNER_FLAG1 -185  K      !WoK   !WoK keep-of-o 
dwarven-castle-convex}
-{TERRAIN_ADJACENT_CORNER_FLAG2 -185  !WoK   K      o    keep-of-o 
dwarven-castle-concave}
-{TERRAIN_ADJACENT_CORNER_FLAG3 -185  !WoK   o      K    keep-of-o 
dwarven-castle-concave}
-{TERRAIN_ADJACENT_CORNER   -185        oK     W      W       
dwarven-castle-wall-convex}
-{TERRAIN_ADJACENT_CORNER   -185        W      oK     oK      
dwarven-castle-wall-concave}
-{TERRAIN_ADJACENT_CORNER   -185        oK     W      !WoK    
dwarven-castle-wall-cw}
-{TERRAIN_ADJACENT_CORNER   -185        oK     !WoK   W       
dwarven-castle-wall-ccw}
-
-
-# forest-to-water transitions. Place before forest-to-any.
-#{TERRAIN_ADJACENT          -186        f      cZp\|/  forest-to-water}
-#{TERRAIN_ADJACENT          -186        f      s       forest-to-water}
-# use forest-to-water for forest-to-dirt and forest-to-desert too
-#{TERRAIN_ADJACENT          -187        f      r        forest-to-water}
-#{TERRAIN_ADJACENT          -186        f      d        forest-to-water}
+#{TERRAIN_ADJACENT_NORTH    -90        m  !m   mountains}
+#{TERRAIN_ADJACENT_NORTH    -90        H  !H   snow-hills}
+#{TERRAIN_ADJACENT_NORTH    -90        h  !hm  hills} # No adj-north between 
hills and mountains
 
 {TERRAIN_ADJACENT_OV       -186        f      !f      forest}
-#{TERRAIN_ADJACENT         -192        F      !SVF    snow}
 {TERRAIN_ADJACENT_OV       -187        F      !F      snow-forest}
 {TERRAIN_ADJACENT          -188        m      !m      mountains}
 {TERRAIN_ADJACENT          -189        H      !H      snow-hills}
Index: wesnoth/data/terrain-graphics/castles.cfg
diff -u wesnoth/data/terrain-graphics/castles.cfg:1.8 
wesnoth/data/terrain-graphics/castles.cfg:1.9
--- wesnoth/data/terrain-graphics/castles.cfg:1.8       Sun Aug 15 13:07:13 2004
+++ wesnoth/data/terrain-graphics/castles.cfg   Sat Sep 11 17:17:20 2004
@@ -1,275 +1,6 @@
-# Defines the given terrain will behave like the walls of a castle. Two
-# parameters are given: terrains that are considered to be a castle for this
-# macro's purpose and terrains that are not.
 
-#define CASTLE_WALLS CASTLE NOTCASTLE IMAGE
-{DISABLE_TRANSITIONS {CASTLE}}
 
-[terrain_graphics]
-       map="
-2
-  2
-1"
-       [tile]
-               pos=1
-               type={NOTCASTLE}
-       [/tile]
-       [tile]
-               pos=2
-               type={CASTLE}
-       [/tile]
-
-       [image]
-               layer=-50
-               name="address@hidden"
-       [/image]
-       [image]
-               layer=1
-               name="address@hidden"
-       [/image]
-       rotations=ne,e,se,sw,w,nw
-[/terrain_graphics]
-
-[terrain_graphics]
-       map="
-1
-  1
-2"
-       [tile]
-               pos=1
-               type={NOTCASTLE}
-       [/tile]
-       [tile]
-               pos=2
-               type={CASTLE}
-       [/tile]
-
-       [image]
-               layer=-50
-               name="address@hidden"
-       [/image]
-       [image]
-               layer=1
-               name="address@hidden"
-       [/image]
-       rotations=ne,e,se,sw,w,nw
-[/terrain_graphics]
-#enddef
-
-# Defines the given terrain will behave like the walls of a castles, with added
-# dynamically-drawn keeps.
-# Follows the "composed keep" model, to be documented.
-
-#define CASTLE_AND_COMPOSED_KEEP CASTLE KEEP CASTLE_IMAGE KEEP_IMAGE
-
-# Keep rules will only work if the keep is adjacent to a castle tile.
-{CASTLE_WALLS {CASTLE} !{CASTLE}{KEEP} {CASTLE_IMAGE}}
-{DISABLE_TRANSITIONS {KEEP}}
-
-[terrain_graphics]
-       map="
-2
-  2
-1"
-       [tile]
-               pos=1
-               type={KEEP}
-               has_flag=keep-of-{CASTLE}
-       [/tile]
-       [tile]
-               pos=2
-               type={CASTLE}
-       [/tile]
-
-       [image]
-               layer=-50
-               name="address@hidden"
-       [/image]
-       [image]
-               layer=1
-               name="address@hidden"
-       [/image]
-       rotations=ne,e,se,sw,w,nw
-[/terrain_graphics]
-
-[terrain_graphics]
-       map="
-3
-  3
-1"
-       [tile]
-               pos=1
-               type={KEEP}
-               has_flag=keep-of-{CASTLE}
-       [/tile]
-       [tile]
-               pos=3
-               type=!{CASTLE}{KEEP}
-       [/tile]
-
-       [image]
-               layer=-50
-               name="address@hidden"
-       [/image]
-       [image]
-               layer=1
-               name="address@hidden"
-       [/image]
-       rotations=ne,e,se,sw,w,nw
-[/terrain_graphics]
-
-[terrain_graphics]
-       map="
-2
-  3
-1"
-
-       [tile]
-               pos=1
-               type={KEEP}
-               has_flag=keep-of-{CASTLE}
-       [/tile]
-       [tile]
-               pos=2
-               type={CASTLE}
-       [/tile]
-       [tile]
-               pos=3
-               type=!{CASTLE}{KEEP}
-       [/tile]
-
-       [image]
-               layer=-50
-               name="address@hidden"
-       [/image]
-       [image]
-               layer=1
-               name="address@hidden"
-       [/image]
-       rotations=ne,e,se,sw,w,nw
-[/terrain_graphics]
-
-[terrain_graphics]
-       map="
-3
-  2
-1"
-
-       [tile]
-               pos=1
-               type={KEEP}
-               has_flag=keep-of-{CASTLE}
-       [/tile]
-       [tile]
-               pos=2
-               type={CASTLE}
-       [/tile]
-       [tile]
-               pos=3
-               type=!{CASTLE}{KEEP}
-       [/tile]
-       [image]
-               layer=-50
-               name="address@hidden"
-       [/image]
-       [image]
-               layer=1
-               name="address@hidden"
-       [/image]
-       rotations=ne,e,se,sw,w,nw
-[/terrain_graphics]
-#enddef
-
-# Defines the given terrain will behave like the walls of a castles, with added
-# keeps (not dynamically-drawn)
-# Follows the "simple keep" model: a keep is represented by a simple tile.
-
-#define CASTLE_AND_SIMPLE_KEEP CASTLE KEEP CASTLE_IMAGE 
-
-{DISABLE_TRANSITIONS {CASTLE}{KEEP}}
-
-[terrain_graphics]
-       map="
-2
-  2
-1"
-       [tile]
-               pos=1
-               type=!{CASTLE}{KEEP}
-       [/tile]
-       [tile]
-               pos=2
-               type={CASTLE}{KEEP}
-       [/tile]
-
-       [image]
-               layer=-50
-               name="address@hidden"
-       [/image]
-       [image]
-               layer=1
-               name="address@hidden"
-       [/image]
-       rotations=ne,e,se,sw,w,nw
-       precedence=16
-[/terrain_graphics]
-
-[terrain_graphics]
-       map="
-1
-  1
-2"
-       [tile]
-               pos=1
-               type=!{CASTLE}{KEEP}
-       [/tile]
-       [tile]
-               pos=2
-               type={CASTLE}
-       [/tile]
-
-       [image]
-               layer=-50
-               name="address@hidden"
-       [/image]
-       [image]
-               layer=1
-               name="address@hidden"
-       [/image]
-       rotations=ne,e,se,sw,w,nw
-       precedence=16
-[/terrain_graphics]
-
-[terrain_graphics]
-       map="
-1
-  1
-2"
-       [tile]
-               pos=1
-               type=!{CASTLE}{KEEP}
-       [/tile]
-       [tile]
-               pos=2
-               type={KEEP}
-               has_flag=keep-of-{CASTLE}
-       [/tile]
-
-       [image]
-               layer=-50
-               name="address@hidden"
-       [/image]
-       [image]
-               layer=1
-               name="address@hidden"
-       [/image]
-       rotations=ne,e,se,sw,w,nw
-       precedence=16
-[/terrain_graphics]
-
-#enddef
-
-#define TERRAIN_ADJACENT_CORNER LAYER TERRAIN1 TERRAIN2 TERRAIN3 IMAGE
+#define TERRAIN_ADJACENT_CORNER TERRAIN1 TERRAIN2 TERRAIN3 IMAGE
 [terrain_graphics]
        map="
 3
@@ -289,14 +20,15 @@
        [/tile]
 
        [image]
-               layer={LAYER}
+               base=54,72
+               position=vertical
                address@hidden
        [/image]
        rotations=ne,e,se,sw,w,nw
 [/terrain_graphics]
 #enddef
 
-#define TERRAIN_ADJACENT_CORNER_FLAG1 LAYER TERRAIN1 TERRAIN2 TERRAIN3 FLAG 
IMAGE
+#define TERRAIN_ADJACENT_CORNER_FLAG1 TERRAIN1 TERRAIN2 TERRAIN3 FLAG IMAGE
 [terrain_graphics]
        map="
 3
@@ -317,14 +49,15 @@
        [/tile]
 
        [image]
-               layer={LAYER}
+               base=54,72
+               position=vertical
                address@hidden
        [/image]
        rotations=ne,e,se,sw,w,nw
 [/terrain_graphics]
 #enddef
 
-#define TERRAIN_ADJACENT_CORNER_FLAG2 LAYER TERRAIN1 TERRAIN2 TERRAIN3 FLAG 
IMAGE
+#define TERRAIN_ADJACENT_CORNER_FLAG2 TERRAIN1 TERRAIN2 TERRAIN3 FLAG IMAGE
 [terrain_graphics]
        map="
 3
@@ -345,14 +78,15 @@
        [/tile]
 
        [image]
-               layer={LAYER}
+               base=54,72
+               position=vertical
                address@hidden
        [/image]
        rotations=ne,e,se,sw,w,nw
 [/terrain_graphics]
 #enddef
 
-#define TERRAIN_ADJACENT_CORNER_FLAG3 LAYER TERRAIN1 TERRAIN2 TERRAIN3 FLAG 
IMAGE
+#define TERRAIN_ADJACENT_CORNER_FLAG3 TERRAIN1 TERRAIN2 TERRAIN3 FLAG IMAGE
 [terrain_graphics]
        map="
 3
@@ -373,7 +107,8 @@
        [/tile]
 
        [image]
-               layer={LAYER}
+               base=54,72
+               position=vertical
                address@hidden
        [/image]
        rotations=ne,e,se,sw,w,nw
Index: wesnoth/data/terrain-graphics/util.cfg
diff -u wesnoth/data/terrain-graphics/util.cfg:1.5 
wesnoth/data/terrain-graphics/util.cfg:1.6
--- wesnoth/data/terrain-graphics/util.cfg:1.5  Sun Aug 22 12:21:07 2004
+++ wesnoth/data/terrain-graphics/util.cfg      Sat Sep 11 17:17:20 2004
@@ -1,16 +1,27 @@
 
 
-#define IMG LAYER NAME 
+#define HIMG LAYER NAME 
 [image]
        name={NAME}
+       position=horizontal
        layer={LAYER}
 [/image]
 
 #enddef
 
-#define IMG_NIGHT LAYER NAME NAME_NIGHT 
+#define VIMG BASE NAME 
 [image]
        name={NAME}
+       position=vertical
+       base={BASE}
+[/image]
+
+#enddef
+
+#define HIMG_NIGHT LAYER NAME NAME_NIGHT 
+[image]
+       name={NAME}
+       position=horizontal
        layer={LAYER}
 
        [variant]
@@ -33,6 +44,32 @@
 
 #enddef
 
+#define VIMG_NIGHT BASE NAME NAME_NIGHT 
+[image]
+       name={NAME}
+       position=vertical
+       base={BASE}
+
+       [variant]
+               tod=dusk
+               name={NAME_NIGHT}
+       [/variant]
+       [variant]
+               tod=first_watch
+               name={NAME_NIGHT}
+       [/variant]
+       [variant]
+               tod=second_watch
+               name={NAME_NIGHT}
+       [/variant]
+       [variant]
+               tod=dawn
+               name={NAME_NIGHT}
+       [/variant]
+[/image]
+
+#enddef
+
 # This utility macro disables standard transitions on a given terrain type. It
 # is used for castles and keeps, as those have custom transitions.
 
Index: wesnoth/data/terrain.cfg
diff -u wesnoth/data/terrain.cfg:1.43 wesnoth/data/terrain.cfg:1.44
--- wesnoth/data/terrain.cfg:1.43       Fri Aug 20 23:18:14 2004
+++ wesnoth/data/terrain.cfg    Sat Sep 11 17:17:20 2004
@@ -264,6 +264,13 @@
 [/terrain]
 
 [terrain]
+char=O
+name=orccastle
+aliasof=C
+image=orccastle
+[/terrain]
+
+[terrain]
 image=canyon-n-s
 name=canyon
 char=X
Index: wesnoth/src/builder.cpp
diff -u wesnoth/src/builder.cpp:1.32 wesnoth/src/builder.cpp:1.33
--- wesnoth/src/builder.cpp:1.32        Wed Aug 25 02:59:50 2004
+++ wesnoth/src/builder.cpp     Sat Sep 11 17:17:20 2004
@@ -1,4 +1,4 @@
-/* $Id: builder.cpp,v 1.32 2004/08/25 02:59:50 Sirp Exp $ */
+/* $Id: builder.cpp,v 1.33 2004/09/11 17:17:20 gruikya Exp $ */
 /*
    Copyright (C) 2004 by Philippe Plantier <address@hidden>
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -47,49 +47,60 @@
 
 }
 
+const int terrain_builder::rule_image::TILEWIDTH = 72;
+const int terrain_builder::rule_image::UNITPOS = 36 + 18;
+
+terrain_builder::rule_image::rule_image(int layer, bool global_image) : 
+       layer(layer), global_image(global_image),
+       position(HORIZONTAL), basex(0), basey(0) 
+{};
+
+terrain_builder::rule_image::rule_image(int x, int y, bool global_image) : 
+       layer(0), global_image(global_image),
+       position(VERTICAL), basex(x), basey(y) 
+{};
+
 terrain_builder::tile::tile() : last_tod("invalid_tod")
 {
                memset(adjacents, 0, sizeof(adjacents)); 
 }
 
-void terrain_builder::tile::rebuild_cache(const std::string &tod) const 
+void terrain_builder::tile::add_image_to_cache(const std::string &tod, 
ordered_ri_list::const_iterator itor) const
 {
-       images_background.clear();
-       images_foreground.clear();
-
-       // std::cerr << "rebuilding cache\n";
-       std::multimap<int, const rule_image*>::const_iterator itor;
+       rule_image_variantlist::const_iterator tod_variant =
+               itor->second->variants.find(tod);
 
-       util::array<std::string, 2> search_variants;
-       search_variants[0] = tod;
+       if(tod_variant == itor->second->variants.end())
+               tod_variant = itor->second->variants.find("");
 
-       for(itor = images.begin(); itor != images.end(); ++itor) {
-               // std::cerr << "layer is " << itor->first << "\n";
-               // std::cerr << "image is " << 
itor->second->variants.find("")->second.image.get_current_frame().get_filename()
 << "\n";
-
-               for(util::array<std::string, 2>::const_iterator var_name = 
search_variants.begin();
-                               var_name != search_variants.end(); ++var_name) {
-
-                       rule_image_variantlist::const_iterator tod_variant =
-                               itor->second->variants.find(*var_name);
+       if(tod_variant != itor->second->variants.end()) {
+               if(itor->first < 0) {
+                       images_background.push_back(tod_variant->second.image);
+               } else {
+                       images_foreground.push_back(tod_variant->second.image);
+               }
+       }
+}
 
-                       if(tod_variant != itor->second->variants.end()) {
-                               if(itor->first < 0) {
-                                       
images_background.push_back(tod_variant->second.image);
-                               } else {
-                                       
images_foreground.push_back(tod_variant->second.image);
-                               }
+void terrain_builder::tile::rebuild_cache(const std::string &tod) const 
+{
+       images_background.clear();
+       images_foreground.clear();
 
-                               break; // break the "variant search" loop
-                       }
-               }
+       ordered_ri_list::const_iterator itor;
+       for(itor = horizontal_images.begin(); itor != horizontal_images.end(); 
++itor) {
+               add_image_to_cache(tod, itor);
+       }
+       for(itor = vertical_images.begin(); itor != vertical_images.end(); 
++itor) {
+               add_image_to_cache(tod, itor);
        }
 }
 
 void terrain_builder::tile::clear() 
 {
        flags.clear();
-       images.clear();
+       horizontal_images.clear();
+       vertical_images.clear();
        images_foreground.clear();
        images_background.clear();
        last_tod = "invalid_tod";
@@ -279,6 +290,47 @@
                { {  1, 0, 0,  1 }, {  1,  1, -1, 0 }, { 0,  1, -1, -1 },
                  { -1, 0, 0, -1 }, { -1, -1,  1, 0 }, { 0, -1,  1,  1 } };
 
+       // The following array of matrices is intended to rotate the (x,y)
+       // coordinates of a point in a wesnoth hex (and wesnoth hexes are not
+       // regular hexes :) ).
+       // The base matrix for a 1-step rotation with the wesnoth tile shape
+       // is:
+       //
+       // r = s^-1 * t * s
+       //
+       // with s = [[ 1   0         ]
+       //           [ 0   -sqrt(3)/2 ]]
+       //
+       // and t =  [[ -1/2       sqrt(3)/2 ]
+       //           [ -sqrt(3)/2  1/2        ]]
+       //
+       // With t being the rotation matrix (pi/3 rotation), and s a matrix
+       // that transforms the coordinates of the wesnoth hex to make them
+       // those of a regular hex.
+       //
+       // (demonstration left as an exercise for the reader)
+       //
+       // So we have 
+       //
+       // r = [[ 1/2  -3/4 ]
+       //      [ 1    1/2  ]]
+       //
+       // And the following array contains I(2), r, r^2, r^3, r^4, r^5 (with
+       // r^3 == -I(2)), which are the successive rotations.
+       static const struct { 
+               double xx;
+               double xy;
+               double yx; 
+               double yy;
+       } xyrotations[6] = {
+               { 1.,         0.,  0., 1.    },
+               { 1./2. , -3./4.,  1., 1./2. },
+               { -1./2., -3./4.,   1, -1./2.},
+               { -1.   ,     0.,  0., -1.   },
+               { -1./2.,  3./4., -1., -1./2.},
+               { 1./2. ,  3./4., -1., 1./2. },
+       };
+
        assert(angle >= 0);
 
        angle %= 6;     
@@ -294,6 +346,24 @@
        ret.loc.x = rj;
        ret.loc.y = ri + (rj >= 0 ? rj/2 : (rj-1)/2);
 
+       for (rule_imagelist::iterator itor = ret.images.begin();
+                       itor != ret.images.end(); ++itor) {
+
+               if (itor->position == rule_image::HORIZONTAL)
+                       continue;
+
+               double vx, vy, rx, ry;
+
+               vx = double(itor->basex) - double(rule_image::TILEWIDTH)/2;
+               vy = double(itor->basey) - double(rule_image::TILEWIDTH)/2;
+
+               rx = xyrotations[angle].xx * vx + xyrotations[angle].xy * vy;
+               ry = xyrotations[angle].yx * vx + xyrotations[angle].yy * vy;
+
+               itor->basex = int(rx + rule_image::TILEWIDTH/2);
+               itor->basey = int(ry + rule_image::TILEWIDTH/2);
+       }
+
        return ret;
 }
 
@@ -407,19 +477,35 @@
        return ret;
 }
 
-void terrain_builder::add_images_from_config(rule_imagelist& images, const 
config &cfg, bool global)
+void terrain_builder::add_images_from_config(rule_imagelist& images, const 
config &cfg, bool global, int dx, int dy)
 {
        const config::child_list& cimages = cfg.get_children("image");
 
 
        for(config::child_list::const_iterator img = cimages.begin(); img != 
cimages.end(); ++img) {
 
-               // Adds the main (default) variant of the image, if present
-               const int layer = atoi((**img)["layer"].c_str());
                const std::string &name = (**img)["name"];
 
-               images.push_back(rule_image(layer, global));
+               if((**img)["position"].empty() || 
+                               (**img)["position"] == "horizontal") { 
 
+                       const int layer = atoi((**img)["layer"].c_str());
+                       images.push_back(rule_image(layer, global));
+
+               } else if((**img)["position"] == "vertical") {
+
+                       std::vector<std::string> base = 
config::split((**img)["base"]);
+                       int basex, basey;
+
+                       if(base.size() >= 2) {
+                               basex = atoi(base[0].c_str());
+                               basey = atoi(base[1].c_str());
+                       }
+                       images.push_back(rule_image(basex - dx, basey - dy, 
global));
+                       
+               }
+
+               // Adds the main (default) variant of the image, if present
                images.back().variants.insert(std::pair<std::string, 
rule_image_variant>("", rule_image_variant(name,"")));
 
                // Adds the other variants of the image
@@ -470,8 +556,12 @@
        add_constraint_item(constraint.has_flag, cfg, "has_flag");
        add_constraint_item(constraint.no_flag, cfg, "no_flag");
 
+       int x = loc.x * rule_image::TILEWIDTH / 2;
+       int y = loc.y * rule_image::TILEWIDTH + (loc.x % 2) * 
+               rule_image::TILEWIDTH / 2;
+
        add_images_from_config(constraint.images, cfg, false);
-       add_images_from_config(constraint.images, global_images, true);
+       add_images_from_config(constraint.images, global_images, true, x, y);
 }
 
 void terrain_builder::parse_mapstring(const std::string &mapstring,
@@ -770,7 +860,13 @@
                for(img = constraint->second.images.begin(); img != 
constraint->second.images.end(); ++img) {
                        //animated<image::locator> th(img->second, 
locator_string_initializer());
 
-                       btile.images.insert(std::pair<int, const 
rule_image*>(img->layer, &*img));
+                       if(img->position == rule_image::HORIZONTAL) {
+                               btile.horizontal_images.insert(std::pair<int, 
const rule_image*>(
+                                                       img->layer, &*img));
+                       } else if(img->position == rule_image::VERTICAL) {
+                               btile.vertical_images.insert(std::pair<int, 
const rule_image*>(
+                                               img->basey - 
rule_image::UNITPOS, &*img));
+                       }
                }
 
                // Sets flags
Index: wesnoth/src/builder.hpp
diff -u wesnoth/src/builder.hpp:1.23 wesnoth/src/builder.hpp:1.24
--- wesnoth/src/builder.hpp:1.23        Wed Aug 25 02:59:50 2004
+++ wesnoth/src/builder.hpp     Sat Sep 11 17:17:20 2004
@@ -1,4 +1,4 @@
-/* $Id: builder.hpp,v 1.23 2004/08/25 02:59:50 Sirp Exp $ */
+/* $Id: builder.hpp,v 1.24 2004/09/11 17:17:20 gruikya Exp $ */
 /*
    Copyright (C) 2004 by Philippe Plantier <address@hidden>
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -22,7 +22,18 @@
 #include <string>
 #include <map>
 
-//terrain_builder: returns the lst of images used to build a terrain tile
+/**
+ * The class terrain_builder is constructed from a config object, and a gamemap
+ * object. On construction, it parses the configuration and extracts the list
+ * of [terrain_graphics] rules. Each terrain_graphics rule attachs one or more
+ * images to a specific terrain pattern. 
+ * It then applies the rules loaded from the configuration to the current map,
+ * and calculates the list of images that must be associated to each hex of the
+ * map.
+ *
+ * The get_terrain_at method can then be used to obtain the list of images
+ * necessary to draw the terrain on a given tile.
+ */
 class terrain_builder
 {
 public:
@@ -48,7 +59,11 @@
        void rebuild_all();
        
 
-       // typedef std::multimap<int, std::string> rule_imagelist;
+       /**
+        * Each image may have several variants, which are used depending to
+        * the current time of day. The rule_image_variant structure represents
+        * an image variant.
+        */
        struct rule_image_variant {
                rule_image_variant(const std::string &image_string, const 
std::string &tod) :
                        image_string(image_string), tod(tod) {};
@@ -59,18 +74,50 @@
                std::string tod;
        };
 
+       /**
+        * A map associating a rule_image_variant to a string representing the
+        * time of day.
+        */
        typedef std::map<std::string, rule_image_variant> 
rule_image_variantlist;
+
+       /**
+        * Each terrain_graphics rule is associated a set of images, which are
+        * applied on the terrain if the rule matches. An image is more than
+        * graphics: it is graphics (with several possible tod-alternatives,)
+        * and a position for these graphics.
+        * The rule_image structure represents one such image.
+        */
        struct rule_image {
-               rule_image(int layer, bool global_image=false) : 
-                       layer(layer), global_image(global_image) {};
+               rule_image(int layer, bool global_image=false);
+               rule_image(int x, int y, bool global_image=false);
+
+               // There are 2 kinds of images:
+               // * Flat, horizontal, stacked images, who have a layer
+               // * Vertical images who have an x/y position
+               enum { HORIZONTAL, VERTICAL } position;
+
+               int layer;              // If the image is horizontal
+               int basex, basey;       // If the image is vertical
+
+               // The tile width used when using basex and basey. This is not,
+               // necessarily, the tile width in pixels, this is totally
+               // arbitrary. However, it will be set to 72 for convenience.
+               static const int TILEWIDTH;
+               // The position of unit graphics in a tile. Graphics whose y
+               // position is below this value are considered background for
+               // this tile; graphics whose y position is above this value are
+               // considered foreground.
+               static const int UNITPOS;
 
-               int layer;
                bool global_image;
                rule_image_variantlist variants;
        };
 
        typedef std::vector<rule_image> rule_imagelist;
 
+       /**
+        * Each terrain_graphics rule consists in a set of constraints.
+        */
        struct terrain_constraint
        {
                terrain_constraint() : loc() {};
@@ -86,15 +133,20 @@
                rule_imagelist images;
        };
 
+
        struct tile
        {
+               typedef std::multimap<int, const rule_image*> ordered_ri_list;
+
                tile(); 
+               void add_image_to_cache(const std::string &tod, 
ordered_ri_list::const_iterator itor) const;
                void rebuild_cache(const std::string &tod) const;
                void clear();
 
                std::set<std::string> flags;
 
-               std::multimap<int, const rule_image*> images;
+               ordered_ri_list horizontal_images;
+               ordered_ri_list vertical_images;
 
                mutable imagelist images_foreground;    //this is a mutable 
cache
                mutable imagelist images_background;    //this is a mutable 
cache
@@ -154,10 +206,11 @@
        void add_rotated_rules(building_ruleset& rules, building_rule& tpl, 
const std::string &rotations);
        void add_constraint_item(std::vector<std::string> &list, const config& 
cfg, const std::string &item);
 
-       void add_images_from_config(rule_imagelist &images, const config &cfg, 
bool global);
+       void add_images_from_config(rule_imagelist &images, const config &cfg, 
bool global,
+                       int dx=0, int dy=0);
 
        void add_constraints(std::map<gamemap::location, terrain_constraint>& 
constraints,
-                            const gamemap::location &loc, const std::string& 
type);
+                       const gamemap::location &loc, const std::string& type);
        void add_constraints(std::map<gamemap::location, terrain_constraint>& 
constraints,
                        const gamemap::location &loc, const config &cfg, const 
config& global_images);
        




reply via email to

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