[Reduction] #425: grcg_settile_1line

This commit is contained in:
nmlgc 2014-09-01 07:39:11 +02:00
parent a27c177235
commit 1276b727ff
2 changed files with 74 additions and 32 deletions

View File

@ -0,0 +1,70 @@
PAGE 98,120
; graphics - grcg - tile - 1line
;
; Description:
; タイルパターンの設定(1 line)
;
; Function/Procedures:
;C: void [_far] _pascal grcg_settile_1line( int mode, long tile ) ;
;
;Pas: procedure grcg_settile_1line( mode : integer, tile : longint ) ;
; Parameters:
; int mode GRCGのモード。
; long tile タイルパターン。下位バイトから1バイト単位に
; B,R,G,Iプレーンとなる。
; 0x000000FFLが、青プレーンのみ全てON,それ以外
; 全てOFFの値となる。
;
; Binding Target:
; Microsoft-C / Turbo-C / Turbo Pascal
;
; Running Target:
; NEC PC-9801 Normal mode
;
; Requiring Resources:
; CPU: V30
; GRAPHICS ACCERALATOR: GRCG
;
; Compiler/Assembler:
; TASM 3.0
; OPTASM 1.6 ( MASM 5.0互換ならば OK )
;
; NOTES:
;
; AUTHOR:
; 恋塚昭彦
;
; 関連関数:
; grcg_setcolor()
; grcg_off()
;
; HISTORY:
; 92/ 6/28 Initial
func GRCG_SETTILE_1LINE
mov CX,BP
mov BP,SP
; parameters
@@mode = (retsize+2)*2
@@tileh = (retsize+1)*2
@@tilel = (retsize+0)*2
mov AL,[BP+@@mode]
out 7ch,AL
mov DX,007eh
mov AX,[BP+@@tilel]
out DX,AL ; B
mov AL,AH
out DX,AL ; R
mov AX,[BP+@@tileh]
out DX,AL ; G
mov AL,AH
out DX,AL ; I
mov BP,CX
ret 6
endfunc

View File

@ -57,35 +57,7 @@ include libs/master.lib/grcg_fill.asm
include libs/master.lib/grcg_hline.asm include libs/master.lib/grcg_hline.asm
include libs/master.lib/grcg_line.asm include libs/master.lib/grcg_line.asm
include libs/master.lib/grcg_setcolor.asm include libs/master.lib/grcg_setcolor.asm
include libs/master.lib/grcg_settile_1line.asm
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_F8C proc far
; sub_14511+91P ...
arg_0 = word ptr 4
arg_2 = word ptr 6
arg_4 = byte ptr 8
mov cx, bp
mov bp, sp
mov al, [bp+arg_4]
out 7Ch, al
mov dx, 7Eh ; '~'
mov ax, [bp+arg_0]
out dx, al
mov al, ah
out dx, al
mov ax, [bp+arg_2]
out dx, al
mov al, ah
out dx, al
mov bp, cx
retf 6
sub_F8C endp
include libs/master.lib/grcg_triangle.asm include libs/master.lib/grcg_triangle.asm
include libs/master.lib/grcg_vline.asm include libs/master.lib/grcg_vline.asm
@ -24864,7 +24836,7 @@ var_2 = word ptr -2
call egc_off call egc_off
push 0C0h ; 'À' push 0C0h ; 'À'
push large 0AA0055AAh push large 0AA0055AAh
call sub_F8C call grcg_settile_1line
mov [bp+var_4], 0 mov [bp+var_4], 0
mov si, 0Bh mov si, 0Bh
jmp short loc_14594 jmp short loc_14594
@ -24906,7 +24878,7 @@ loc_14594:
jg short loc_1454D jg short loc_1454D
push 0C0h ; 'À' push 0C0h ; 'À'
push large 0FF00AA55h push large 0FF00AA55h
call sub_F8C call grcg_settile_1line
mov [bp+var_4], 0 mov [bp+var_4], 0
mov si, 6 mov si, 6
jmp short loc_145F8 jmp short loc_145F8
@ -24948,7 +24920,7 @@ loc_145F8:
jg short loc_145B1 jg short loc_145B1
push 0C0h ; 'À' push 0C0h ; 'À'
push large 0FF55FF55h push large 0FF55FF55h
call sub_F8C call grcg_settile_1line
mov [bp+var_4], 0 mov [bp+var_4], 0
mov si, 3 mov si, 3
jmp short loc_1465C jmp short loc_1465C