diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-07-24 00:13:24 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-07-24 00:13:24 +0000 |
commit | 13e48bb0b5872499bcc849496cf299b853b226ef (patch) | |
tree | 962f01af9bcda5a495be098f345ec0220411cb65 | |
parent | 476f99d5089d6b00242344fb7da4e2771c54e4a8 (diff) | |
download | clientdata-13e48bb0b5872499bcc849496cf299b853b226ef.tar.gz clientdata-13e48bb0b5872499bcc849496cf299b853b226ef.tar.bz2 clientdata-13e48bb0b5872499bcc849496cf299b853b226ef.tar.xz clientdata-13e48bb0b5872499bcc849496cf299b853b226ef.zip |
Implemented caching of spritesets, including a lot of cleanups to the new
animation system. Action now refers to the Spriteset directly and
AnimatedSprite refers to the current Action directly instead of using the
std::map with a std::string constantly. Some methods and parameters are marked
as const. The READ_PROP macro was replaced by static methods. Warnings are
logged when unnamed actions are defined or when actions refer to undefined
imagesets. Code is more tolerant towards missing actions.
-rw-r--r-- | graphics/sprites/npc.xml | 9 | ||||
-rw-r--r-- | graphics/sprites/weapons.xml | 9 |
2 files changed, 5 insertions, 13 deletions
diff --git a/graphics/sprites/npc.xml b/graphics/sprites/npc.xml index bc75d230..bbf05229 100644 --- a/graphics/sprites/npc.xml +++ b/graphics/sprites/npc.xml @@ -1,11 +1,10 @@ <?xml version="1.0"?> <sprite variants="42" variant_offset="1"> - <imageset name="base" src="graphics/sprites/npcs.png" width="50" height="80" /> - <action name="" imageset="base"> + + <action name="stand" imageset="base"> <animation direction="default"> - <frame index="0" /> + <frame index="0" /> </animation> </action> - -</sprite>
\ No newline at end of file +</sprite> diff --git a/graphics/sprites/weapons.xml b/graphics/sprites/weapons.xml index d3430507..0e2ce8b7 100644 --- a/graphics/sprites/weapons.xml +++ b/graphics/sprites/weapons.xml @@ -1,14 +1,8 @@ <?xml version="1.0"?> <sprite name="player" action="stand"> - <imageset name="dagger" src="graphics/sprites/weapon0.png" width="64" height="64" /> <imageset name="bow" src="graphics/sprites/weapon1.png" width="64" height="64" /> - <action name="" imageset="base"> - <animation direction="default"> - </animation> - </action> - <action name="attack_stab" imageset="dagger"> <animation direction="down"> <sequence start="0" end="3" delay="75" /> @@ -38,5 +32,4 @@ <sequence start="15" end="19" delay="75" /> </animation> </action> - -</sprite>
\ No newline at end of file +</sprite> |