Refactored trash terrain gfx macros into a separate file, removed TRI prefix

The macro-less portions of these terrain graphics rules are now the
TRASH_A and LITTER_BASE macros. I tried to the best of my ability to
understand how they are supposed to work together, so this is the naming
scheme and parameter set I found to be the most optimal:

    #define TRASH_A TERRAIN PROB IMAGESTEM
        Covers the first and second rules, which are used on a single
        terrain pattern.
    #define LITTER_BASE TERRAIN IMAGESTEM
        Covers the third rule, which affects both trash terrains.
This commit is contained in:
Ignacio R. Morelle 2014-02-13 22:53:41 -03:00
parent 3486ad75d5
commit a21d13f1f4
2 changed files with 288 additions and 303 deletions

View file

@ -821,312 +821,17 @@
# Default terrain
{TERRAIN_BASE * void/void}
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type=*^Edt
set_no_flag=litter_base
[/tile]
probability=33
[image]
name=misc/detritus/trashA-@V.png
variations="1;2;3;4;5"
base=90,144
center=90,144
layer=-201
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type=*^Edb
set_no_flag=litter_base
[/tile]
probability=33
[image]
name=misc/detritus/detritusA-@V.png
variations="1;2;3;4;5"
base=90,144
center=90,144
layer=-201
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type=*^Edb,*^Edt
set_no_flag=litter_base
[/tile]
probability=100
[image]
name=misc/detritus/liter@V.png
variations=";2;3;4;5;6"
base=90,144
center=90,144
layer=-201
[/image]
[/terrain_graphics]
##################### two neighbours ########################
#define TRI_TRASH_B TERRAIN FLAG PROB VARIATIONS IMAGE
# set flags
[terrain_graphics]
map="
, *
* , *
, 1
2 , 2
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
type={TERRAIN}
has_flag=litter_base
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
[terrain_graphics]
map="
, *
* , 2
, 1
* , 2
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
type={TERRAIN}
has_flag=litter_base
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
[terrain_graphics]
map="
, *
2 , 2
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
type={TERRAIN}
has_flag=litter_base
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
[terrain_graphics]
map="
, *
2 , *
, 1
2 , *
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
type={TERRAIN}
has_flag=litter_base
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
# draw images
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
has_flag={FLAG}
set_no_flag={FLAG}_drawn
[/tile]
probability={PROB}
[image]
name={IMAGE}-@V.png
variations={VARIATIONS}
base=90,144
center=90,144
layer=-200
[/image]
[/terrain_graphics]
#enddef
{TRI_TRASH_B (*^Edt) (trash_medium) (70) ("1;2;3;4;5;6;7;8;9;10") (misc/detritus/trashB)}
{TRI_TRASH_B (*^Edb) (detritus_medium) (70) ("1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16") (misc/detritus/detritusB)}
############################## Major ##########################
#define TRI_TRASH_C TERRAIN FLAG FLAG2 PROB VARIATIONS IMAGE
# set flags
[terrain_graphics]
map="
, 2
3 , 3
, 1
3 , 3
, 2"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
has_flag={FLAG2}
no_flag={FLAG}
[/tile]
[tile]
pos=3
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
[terrain_graphics]
map="
, 3
3 , 2
, 1
2 , 3
, 3"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
has_flag={FLAG2}
no_flag={FLAG}
[/tile]
[tile]
pos=3
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
[terrain_graphics]
map="
, 3
2 , 3
, 1
3 , 2
, 3"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
has_flag={FLAG2}
no_flag={FLAG}
[/tile]
[tile]
pos=3
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
# draw images
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
has_flag={FLAG}
set_no_flag={FLAG}_drawn
[/tile]
probability={PROB}
[image]
name={IMAGE}-@V.png
variations={VARIATIONS}
base=90,144
center=90,144
layer=-199
[/image]
[/terrain_graphics]
#enddef
{TRI_TRASH_C (*^Edt) (trash_big) (trash_medium) (30) ("1;2;3;4") (misc/detritus/trashC)}
{TRI_TRASH_C (*^Edb) (detritus_big) (detritus_medium) (50) ("1;2;3;4;5;6;7") (misc/detritus/detritusC)}
# Trash/remains
{TRASH_A *^Edt 33 misc/detritus/trashA}
{TRASH_A *^Edb 33 misc/detritus/detritusA}
{LITTER_BASE *^Edb,*^Edt misc/detritus/liter}
{TRASH_B *^Edt trash_medium 70 "1;2;3;4;5;6;7;8;9;10" misc/detritus/trashB}
{TRASH_B *^Edb detritus_medium 70 "1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16" misc/detritus/detritusB}
{TRASH_C *^Edt trash_big trash_medium 30 "1;2;3;4" misc/detritus/trashC}
{TRASH_C *^Edb detritus_big detritus_medium 50 "1;2;3;4;5;6;7" misc/detritus/detritusC}
#wmlindent: stop ignoring

View file

@ -0,0 +1,280 @@
#textdomain wesnoth
#define TRASH_A TERRAIN PROB IMAGESTEM
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag=litter_base
[/tile]
probability={PROB}
[image]
name={IMAGESTEM}-@V.png
variations="1;2;3;4;5"
base=90,144
center=90,144
layer=-201
[/image]
[/terrain_graphics]
#enddef
#define LITTER_BASE TERRAIN IMAGESTEM
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag=litter_base
[/tile]
probability=100
[image]
name={IMAGESTEM}@V.png
variations=";2;3;4;5;6"
base=90,144
center=90,144
layer=-201
[/image]
[/terrain_graphics]
#enddef
##################### two neighbours ########################
#define TRASH_B TERRAIN FLAG PROB VARIATIONS IMAGE
# set flags
[terrain_graphics]
map="
, *
* , *
, 1
2 , 2
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
type={TERRAIN}
has_flag=litter_base
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
[terrain_graphics]
map="
, *
* , 2
, 1
* , 2
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
type={TERRAIN}
has_flag=litter_base
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
[terrain_graphics]
map="
, *
2 , 2
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
type={TERRAIN}
has_flag=litter_base
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
[terrain_graphics]
map="
, *
2 , *
, 1
2 , *
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
type={TERRAIN}
has_flag=litter_base
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
# draw images
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
has_flag={FLAG}
set_no_flag={FLAG}_drawn
[/tile]
probability={PROB}
[image]
name={IMAGE}-@V.png
variations={VARIATIONS}
base=90,144
center=90,144
layer=-200
[/image]
[/terrain_graphics]
#enddef
############################## Major ##########################
#define TRASH_C TERRAIN FLAG FLAG2 PROB VARIATIONS IMAGE
# set flags
[terrain_graphics]
map="
, 2
3 , 3
, 1
3 , 3
, 2"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
has_flag={FLAG2}
no_flag={FLAG}
[/tile]
[tile]
pos=3
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
[terrain_graphics]
map="
, 3
3 , 2
, 1
2 , 3
, 3"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
has_flag={FLAG2}
no_flag={FLAG}
[/tile]
[tile]
pos=3
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
[terrain_graphics]
map="
, 3
2 , 3
, 1
3 , 2
, 3"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[tile]
pos=2
has_flag={FLAG2}
no_flag={FLAG}
[/tile]
[tile]
pos=3
no_flag={FLAG}
[/tile]
probability=100
[/terrain_graphics]
# draw images
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
has_flag={FLAG}
set_no_flag={FLAG}_drawn
[/tile]
probability={PROB}
[image]
name={IMAGE}-@V.png
variations={VARIATIONS}
base=90,144
center=90,144
layer=-199
[/image]
[/terrain_graphics]
#enddef