Hi, I finish the code to use weapon position relative to hand position. The main improvment is the xml <hand> tool. I also merged skins images.scr and config.xml into one uniq config.xml file. So, it's now something like that :
--------------------------- <?xml version="1.0" encoding="iso-8859-1"?> <resources> <author> <name>Laurent Defert Simonneau</name> <email>lodesi2 AT yahoo.fr</email> </author> <sprite name="walking"> <image file="alien.png"> <grid size="40,41" array="8,1" /> </image> <collision_rect dx="10" top="1" bottom="3" /> <wormux repetition="3" /> <hand frame="1" x="22" y="26" /> <hand frame="2" x="18" y="27" /> <hand frame="3" x="16" y="27" /> <hand frame="4" x="10" y="28" /> <hand frame="5" x="18" y="28" /> <hand frame="6" x="26" y="21" /> <hand frame="7" x="28" y="15" /> <hand frame="8" x="25" y="21" /> </sprite> <sprite name="animation"> <image file="clope-anim.png"> <grid pos="0,0" size="42,42" array="17,1" /> </image> <animation speed="150" /> <translation origin="top_left" x="31" y="0" /> </sprite> <sprite name="dead"> <image file="alien_mort.png" /> <collision_rect dx="0" top="0" bottom="4" /> </sprite> </resources> --------------------------- For hand position, you can use : <hand frame="*" x="0" y="0" /> or <hand frame="1" x="4" y="0" /> <hand frame="2" x="5" y="0" /> <hand frame="3" x="4" y="1" /> Another changes : - team/ subdir partially translated in english - data/graphism.scr renamed data/graphism.xml - weapons resources move to data/weapons.xml Todo : - Rename data/sound.scr - Move weapons resources (gfx & sound) in one folder per weapon (like a begin to do with dynamite) - Translate ~/.wormux/config.xml and game mode XML file - Remove sky folder : maps have to be indenpendent - Fix hand position for skins : someone can do this ? It's quite boring (some skins have 20 frames :-P) My aim is to prepare Wormux to be modulable : in the future, Wormux will be able to load one map in only one file (archive .zip), and the same for a weapon ... But for weapon, we have to add Python/C++/something else binding. Bye, Haypo