Post by BeasTie on Jan 4, 2013 5:02:42 GMT -5
originally posted by utunnels @ chronocrash.com
Here are the new drawmethod commands, I changed some of the from the old logic (like using 0~1.0 instead of 0~256 for scale to make it more user friendly)
drawmethod scale {scalex} {scaley}
If scaley is not specified, it is the same as scalex. For example, drawmethod scale 1.5 will scale the whole sprite by 1.5.
drawmethod scalex {scalex}
drawmethod scaley {scalex}
These 2 are subset of the previous scale command.
drawmethod flipx {0/1}
drawmethod flipy {0/1}
drawmethod shiftx {value}
Others may call that "shear" or "lean", but anyway, it is usually for gfxshadow, it is unlikely you need this. A value of 1.0 is the same as 256 in old drawmethod command.
drawmethod rotate {angle}
Rotate the sprite, clockwise.
drawmethod fliprotate {0/1}
If the rotation is affected by entity direction.
drawmethod fillcolor {color}
Like the old command. You can either use a raw integer value or in R_G_B format, the later has better compatibility obviously.
drawmethod remap {int}
Leave it alone or use -1 if you want to use current map. Don't use 0, because it means default palette.
drawmethod alpha {int}
Like above, use -1 or leave alone to avoid overriding.
drawmethod channel {r} {b} {b}
When using alpha 6, you can specify opacity for each channel (r, g or b), or leave the other 2 alone to set all the 3 channels.
For example the code below will grand the entity 25% opacity:
drawmethod alpha 6
drawmethod channel 0.25
drawmethod channelr {r}
drawmethod channelg {g}
drawmethod channelb {b}
These are subset of channel.
drawmethod tintmode {int}
drawmethod tintcolor {color}
These 2 will tint the sprite with given tintcolor, in alpha mode tintmode. The color use same format as fillcolor.
drawmethod clip {x} {y} {w} {h}
This one is on svn but is still experimental.
Here are the new drawmethod commands, I changed some of the from the old logic (like using 0~1.0 instead of 0~256 for scale to make it more user friendly)
drawmethod scale {scalex} {scaley}
If scaley is not specified, it is the same as scalex. For example, drawmethod scale 1.5 will scale the whole sprite by 1.5.
drawmethod scalex {scalex}
drawmethod scaley {scalex}
These 2 are subset of the previous scale command.
drawmethod flipx {0/1}
drawmethod flipy {0/1}
drawmethod shiftx {value}
Others may call that "shear" or "lean", but anyway, it is usually for gfxshadow, it is unlikely you need this. A value of 1.0 is the same as 256 in old drawmethod command.
drawmethod rotate {angle}
Rotate the sprite, clockwise.
drawmethod fliprotate {0/1}
If the rotation is affected by entity direction.
drawmethod fillcolor {color}
Like the old command. You can either use a raw integer value or in R_G_B format, the later has better compatibility obviously.
drawmethod remap {int}
Leave it alone or use -1 if you want to use current map. Don't use 0, because it means default palette.
drawmethod alpha {int}
Like above, use -1 or leave alone to avoid overriding.
drawmethod channel {r} {b} {b}
When using alpha 6, you can specify opacity for each channel (r, g or b), or leave the other 2 alone to set all the 3 channels.
For example the code below will grand the entity 25% opacity:
drawmethod alpha 6
drawmethod channel 0.25
drawmethod channelr {r}
drawmethod channelg {g}
drawmethod channelb {b}
These are subset of channel.
drawmethod tintmode {int}
drawmethod tintcolor {color}
These 2 will tint the sprite with given tintcolor, in alpha mode tintmode. The color use same format as fillcolor.
drawmethod clip {x} {y} {w} {h}
This one is on svn but is still experimental.