setdrawmethod(entity, int flag, int scalex, int scaley, int flipx, int flipy, int shiftx, int alpha, int colourmap, int fillcolour, int rotate, int rotateflip, int transparencybg)
Set drawmethod for an entity or define a global drawmethod for other script functions.
entity must be a valid entity handle or an empty value.
All other parameters are optional.
flag defines whether the drawmethod is active, when set to 0, the drawmethod will not take effect.
scalex defines how the sprite will be stretch in x direction: sizex = original_sizex * scalex / 256
scaley defines how the sprite will be stretch in y direction: sizey = original_sizey * scaley / 256
flipx defines whether the sprite will be flipped left/right. 0 means don't flip and 1 means flip.
flipy defines whether the sprite will be flipped top/bottom. 0 means don't flip and 1 means flip.
shiftx defines how the sprite leans, like lightx in gfxshadow feature, in most situations you don't need this.
alpha defines which alpha blending effect will be used. 0 means no alpha effect. -1 means the entity(if given) will use its own alpha value.
colourmap(entity only) defines which colourmap will be used. 0 means no colourmap. -1 means the entity(if given) will use its current colourmap.
fillcolour is the colour used by the entire sprite. 0 means don't fill the sprites.
rotate is the rotate angle(clockwise), the range is from 0 to 359.
rotateflip(entity only) means whether the entity will flip its rotate direction if the facing is changed.
transparencybg(screen only) means whether the screen will use transparency colour.
Notice: In 8bit mode, fillcolour is the index in palette, otherwise, it will be a RGB value which needs to be calculate first(no system functions available now).
Notice: For screen, transparency colour is the first colour in palette(8bit) or pure black colour(which is also 0).
Notice: If the entity parameter is an empty value, it will change the global drawmethod, and can be used by other script functions like drawsprite or drawscreen.