0 Members and 1 Guest are viewing this topic.
|05 | identity(5,"HEXSTRING",x,y,w,h,logic,flip,update_lcd)| | | PUTSPRITE | Works just like the xLIB command real(1,...) except that | | the Pic and the coordinates on that Pic file are not| | defined.| | | | Instead, a string consisting of hex digits is used to| | define the sprite as inline data. For example, if you| | wanted to draw a black 8*8 block at the top-left corner of| | the screen with XOR logic and drawn immediately...| | | | identity(5,"FFFFFFFFFFFFFFFF",0,0,1,8,3,0,1)| | | | Useful for those that want to display sprites without the| | use of bulky image files.| | | | For large sprites, each byte goes LEFT first, then DOWN,| | so specifying "80FF0180000180000180FF01" would relate to| | such a perfect box 3 bytes wide and 4 pixels down.| | | | | | | | | | | | | | | | Note that any missing arguments will default to the value| | of zero (0) instead of 32 as in xLIB.
|01 | real(1,x,y,w,h,pic_n,pic_x,pic_y,logic,flip,update_lcd)| | | DrawSprite | Draws a sprite on the screen at (x,y), being the top-left| | corner of the sprite.| | | | W = width in bytes. i.e. 1=8pixels, 2=16pixels, etc to 11=.| | H = heigth of sprite in pixels.| | | | pic_n refers to the pic # to source the sprite from. Pic1=1| | , Pic9=9, Pic0=10. Use your imagination for other numbers.| | | | pic_x and pic_y are the top-left coordinates to start| | sourcing the sprite from. pic_x MUST be 0 thru 11 as they| | are "aligned". On-screen, this is a multiple of 8.| | | | "logic" is a number 0 thru 3, refers to sprite drawing| | method to employ.| | 0:Overwrite| | 1:AND| | 2:OR| | 3:XOR| | | | If 4 is added to "logic", the sprite will be inverted.| | | | If "flip" = 1, horizontal flipping is applied to sprite.| | | | If update_lcd is set to something other than zero, the LCD| | will be updated along with the sprite draw.