Warhammer Dark Omen Forum

Modifications => Tools => Topic started by: jon on March 14, 2024, 01:49:20 AM



Title: What is x and y in a frame from an .SPR sprite file?
Post by: jon on March 14, 2024, 01:49:20 AM
In http://wiki.dark-omen.org/do/Updated_Sprite_Format, (http://wiki.dark-omen.org/do/Updated_Sprite_Format,) we have:

signed short X;        // = X position of this frame
signed short Y;        // = Y position of this frame

But I don't really get what they are meant to be used for. For example, here's a random set of x,y,width,height from one sprite's frame:

x: -23, y: -31, width: 49, height: 31

Even in this example, if the sprite is 31 pixels tall, what could a y position of -31 be referring to?

Any ideas?


Title: Re: What is x and y in a frame from an .SPR sprite file?
Post by: olly on March 15, 2024, 12:06:02 AM
Good question and will investigate on the weekend and maybe refers to distance to the centre point like with Rob's rdose. When using it I position each frame over the red dot, so the animation is aligned properly.

http://en.dark-omen.org/downloads/view-details/1.-modding-tools/3.-sprite-editors/rdose.html (http://en.dark-omen.org/downloads/view-details/1.-modding-tools/3.-sprite-editors/rdose.html)


Title: Re: What is x and y in a frame from an .SPR sprite file?
Post by: jon on March 17, 2024, 04:03:34 AM
After some quick experimenting, I was able to find out some info, but I don't have a definitive answer for whether we can say x and y are for purpose P for every sprite (I could still be wrong).

I wrote my findings up here so it was easier to attach images: https://gist.github.com/jonathaningram/79fe2fdf331f6b98c2e4542c83e625e0



Title: Re: What is x and y in a frame from an .SPR sprite file?
Post by: olly on March 17, 2024, 11:55:21 PM
Well done, good research.