Difference between revisions of "83Plus:BCALLs:4C42"

From WikiTI
Jump to: navigation, search
 
m (Dumb code optimization)
Line 28: Line 28:
 
   ld hl,0
 
   ld hl,0
 
   ld (penCol),hl
 
   ld (penCol),hl
   ld a,'A'
+
   ld l,'A'
  ld l,a
+
 
   add hl,hl ;*2
 
   add hl,hl ;*2
 
   add hl,hl ;*4
 
   add hl,hl ;*4

Revision as of 23:13, 18 December 2006

Synopsis

Unofficial Name: VPutMapRec

BCALL Address: 4C42

Displays the character data at sFont_record at the current screen coordinates (the same as VPutMap).

Inputs

  • sFont_record = character data
  • penRow = row to display at
  • penCol = column to display at

Outputs

  • Character is displayed

Destroys

  • Unknown

Comments

This routine works exactly the same as VPutMap except that it uses the character data at sFont_record instead of a character equate in A. In theory, this means you can draw any character or sprite you can think up (within reason).

It will reset fracDrawLFont,(iy+fontFlags) many times, even more times if A = 8 (for whatever reason).

Example

Example code to display a capital A in the top left corner of the screen:

 ld hl,0
 ld (penCol),hl
 ld l,'A'
 add hl,hl ;*2
 add hl,hl ;*4
 add hl,hl ;*8
 B_CALL Load_SFont ;load font data for 'A' to sFont_record
 B_CALL VPutMapRec ;display sFont_record data
...