drawImage() function :
The usage is like this :
Code:
#define drawImage 0D6A45Ch
mov r12, #pof(imgHeader) ; use sfe 2.27 or later, otherwise use q and p
mov r13, #pag(imgHeader) ; q=pof, p=pag
mov [-r0], r13
mov [-r0], r12
mov r12, #0 ; X
mov r13, #0 ; Y
mov r14, #101 ; drawArea_width
mov r15, #80 ; drawArea_height
calls drawImage
add r0, #4
rets
#define imgData 0eb4222h ; just example, this is an easter-egg image data
;if you want to supply own data, just put it as a define bytes (db) here...
imgHeader:
db 101,80 ; img_width & img_height
db 1,0 ; leave like this
dw pof(imgData), pag(imgData)
drawString() function:
I did publish the modified SNN: Show both Name and Number patch using drawString function. It can be used to eliminate the needed of changing (and more) images just to draw text and numbers in the screen (using well-known drawImgIdx) ... also it has a built-in centered function (so it is drawStringCentered, not drawString actually). I did not found the drawString() function yet ...
Here is the syntax:
Code:
#define drawString 0d6a358h
mov [-r0], #fontStyle
mov [-r0], #pag(TextBuff)
mov [-r0], #pof(TextBuff)
mov r12, #X ; relatif position to r14
mov r13, #Y
mov r14, #drawAreaWidth
mov r15, #drawAreaHeight
calls drawString
add r0, #6
rets
rizapn