View Single Post
Old 07-30-2004, 04:21   #39 (permalink)
rizapn
No Life Poster
 
Join Date: Mar 2002
Location: -[r0]-
Age: 53
Posts: 834
Member: 9891
Status: Offline
Thanks Meter: 2
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
  Reply With Quote
 
Page generated in 0.08077 seconds with 7 queries