tag:blogger.com,1999:blog-34057821.post5133492088893627139..comments2024-03-29T16:17:36.198+01:00Comments on Bilou HomeBrew's Blog: BoxWidget ... beyond the code.PypeBroshttp://www.blogger.com/profile/10564522267743689261noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-34057821.post-15390527757043556162012-05-03T15:38:18.712+02:002012-05-03T15:38:18.712+02:00We want the GOB to be assimilated to [x+0,y+0]-[x+...We want the GOB to be assimilated to [x+0,y+0]-[x+wbox,y+hbox] by the collision engine. It implies that, in the game engine, all limbs coordinates should be expressed relatively to the top-left corner of the 'solid' box.<br /><br />Because the ANIM data is shared by all the GobAnims using the same data (that should be rare, btw), the .SPR file must contain 'aligned' definitions with offsets of the C_UPDATE|I_COORDS defined relatively to the box.<br /><br />A C_DEFINE|I_ORIGIN additional entry can be used to keep adjust the sprite's location on the frame editor. It will be applied when un-packing the C_UPDATE commands into a TIFrame list and substracted when packing back into C_UPDATE commands.PypeBroshttps://www.blogger.com/profile/10564522267743689261noreply@blogger.com