wesnoth/data/core/macros/image-utils.cfg
Celtic Minstrel b295aab4ba Deprecate {MAGENTA_IS_THE_TEAM_COLOR}
The magenta colour is now the default flag_rgb colour if one is not specified.
2016-08-05 00:49:39 -04:00

272 lines
6.0 KiB
INI

#textdomain wesnoth
# Utility macros for images, overlays, and display effects.
# These don't depend on any other macros. Please don't change this.
#define COLOR_HEAL
color="0,255,0"
#enddef
#define COLOR_HARM
color="255,0,0"
#enddef
#define COLOR_WHITE
color="255,255,255"
#enddef
#define IS_HERO
# Embed this into a unit declaration to add a hero icon to the unit.
overlays="misc/hero-icon.png"
ellipse="misc/ellipse-hero"
#enddef
#define IS_LOYAL
# Embed this into a unit declaration to add a loyalty icon to the unit.
overlays="misc/loyal-icon.png"
#enddef
#define IS_EXPENDABLE_LEADER
# Embed this into a unit declaration to add an expendable leader icon to the unit.
overlays="misc/leader-expendable.png"
#enddef
#define NEW_JOURNEY X Y
# Make a new journey mark on a tracking map
[image]
x,y={X},{Y}
file=misc/new-journey.png
delay=500
centered=yes
[/image]
#enddef
#define OLD_JOURNEY X Y
# Make an old journey mark on a tracking map
[image]
x,y={X},{Y}
file=misc/dot-white.png
centered=yes
[/image]
#enddef
#define NEW_BATTLE X Y
# Make a new battle mark on a tracking map, with a blinking animation.
# Because of the animation, generally you should only use this as the final
# journey marker in any given story screen.
[image]
x,y={X},{Y}
file=misc/new-battle2.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/new-battle.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/new-battle2.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/new-battle.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/new-battle2.png
delay=500
centered=yes
[/image]
#enddef
#define OLD_BATTLE X Y
# Make an old battle mark on a tracking map
[image]
x,y={X},{Y}
file=misc/cross-white.png
centered=yes
[/image]
#enddef
#define NEW_REST X Y
# Make a new rest mark on a tracking map, with a blinking animation.
# Because of the animation, generally you should only use this as the final
# journey marker in any given story screen.
[image]
x,y={X},{Y}
file=misc/flag-red.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/flag-red2.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/flag-red.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/flag-red2.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/flag-red.png
delay=500
centered=yes
[/image]
#enddef
#define OLD_REST X Y
# Make an old rest mark on a tracking map
[image]
x,y={X},{Y}
file=misc/flag-white.png
centered=yes
[/image]
#enddef
#define PLACE_IMAGE IMAGE X Y
# Place an image at a specified location on the map.
[item]
x={X}
y={Y}
image={IMAGE}
[/item]
#enddef
#define REMOVE_IMAGE X Y
# Removes a previously set image from a tile.
#
# Example:
#! {REMOVE_IMAGE 14 5}
[remove_item]
x,y={X},{Y}
[/remove_item]
#enddef
#define TEAM_COLOR_OVERRIDE FILTER TEAMCOLOR_ID
# Override the team color of filtered units.
[object]
silent=yes
[filter]
{FILTER}
[/filter]
[effect]
apply_to=image_mod
add=RC(magenta>{TEAMCOLOR_ID})
[/effect]
[/object]
#enddef
#define MAKE_HERO ID_STRING
# Give an existing unit a hero overlay
[unit_overlay]
id={ID_STRING}
image=misc/hero-icon.png
[/unit_overlay]
[object]
silent=yes
duration=forever
[filter]
id={ID_STRING}
[/filter]
[effect]
apply_to=ellipse
ellipse="misc/ellipse-hero"
[/effect]
[/object]
#enddef
#define UNMAKE_HERO ID_STRING
# Remove the hero overlay from a unit
[remove_unit_overlay]
id={ID_STRING}
image=misc/hero-icon.png
[/remove_unit_overlay]
[object]
silent=yes
duration=forever
[filter]
id={ID_STRING}
[/filter]
[effect]
apply_to=ellipse
ellipse="misc/ellipse"
[/effect]
[/object]
#enddef
#define FLAG_VARIANT NAME
# Enable the specified flag variant: knalgan, loyalist, ragged,
# long, undead, or wood-elvish. Use within a [side] block; only
# affects that side.
# Since the ragged variant has six frames instead of the usual four,
# for that flag it's better to use FLAG_VARIANT6 below instead.
# wmlscope: start ignoring
flag=flags/{NAME}-flag-[1~4].png:150
flag_icon=flags/{NAME}-flag-icon.png
# wmlscope: stop ignoring
#enddef
#define FLAG_VARIANT6 NAME
# Like FLAG_VARIANT, but this supports flags with six frames.
# Currently only the ragged flag has six frames.
# wmlscope: start ignoring
flag=flags/{NAME}-flag-[1~6].png:150
flag_icon=flags/{NAME}-flag-icon.png
# wmlscope: stop ignoring
#enddef
#define ANIMATED_MAUSOLEUM X Y
# Embed this at scenario toplevel, not within an event.
# Note that it will freeze while dialogue popups are onscreen.
[terrain_graphics]
x={X}
y={Y}
[tile]
x=0
y=0
set_flag=mausoleum
[/tile]
[/terrain_graphics]
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
has_flag=mausoleum
[/tile]
[image]
layer=0
center=92,138
# wmlscope: start ignoring
# FIXME: More implicit-path breakage
name="../scenery/mausoleum[01~18].png:140"
# wmlscope: stop ignoring
[/image]
[/terrain_graphics]
#enddef