2018-12-06 19:11:13 +00:00
|
|
|
; Redefined versions of master.lib's grcg_setmode() and grcg_setcolor().
|
|
|
|
|
|
|
|
GRCG_SETMODE_RMW_DEF macro instance
|
2019-09-15 16:23:33 +00:00
|
|
|
; void pascal near grcg_setmode_rmw(void);
|
|
|
|
public GRCG_SETMODE_RMW_&instance
|
|
|
|
grcg_setmode_rmw_&instance proc near
|
2018-12-06 19:11:13 +00:00
|
|
|
GRCG_SETMODE_VIA_MOV al, GC_RMW
|
|
|
|
ret
|
2019-09-15 16:23:33 +00:00
|
|
|
grcg_setmode_rmw_&instance endp
|
2018-12-06 19:11:13 +00:00
|
|
|
nop
|
|
|
|
endm
|
|
|
|
|
|
|
|
GRCG_SETCOLOR_DIRECT_NOINT_DEF macro instance
|
|
|
|
; Takes the GC_* color parameter in AH.
|
|
|
|
|
2019-09-15 16:23:33 +00:00
|
|
|
; void pascal near grcg_setcolor_direct_noint(void);
|
|
|
|
public GRCG_SETCOLOR_DIRECT_NOINT_&instance
|
|
|
|
grcg_setcolor_direct_noint_&instance proc near
|
2018-12-06 19:11:13 +00:00
|
|
|
cli
|
|
|
|
GRCG_SETCOLOR_DIRECT_CLOBBERING dx, ah
|
|
|
|
sti
|
|
|
|
ret
|
2019-09-15 16:23:33 +00:00
|
|
|
grcg_setcolor_direct_noint_&instance endp
|
2018-12-06 19:11:13 +00:00
|
|
|
endm
|
2018-12-21 22:03:25 +00:00
|
|
|
|
|
|
|
; Convenience macro to prepare ES:DI.
|
|
|
|
GRCG_FILL_PLAYFIELD_ROWS macro y:req, num_rows:req, scratch_sgm:=<ax>
|
|
|
|
mov scratch_sgm, GRAM_400 + (((y + PLAYFIELD_Y) * ROW_SIZE) shr 4)
|
|
|
|
mov es, scratch_sgm
|
|
|
|
mov di, ((num_rows - 1) * ROW_SIZE) + PLAYFIELD_VRAM_X
|
|
|
|
call _grcg_fill_playfield_rows
|
|
|
|
endm
|