mirror of https://github.com/nmlgc/ReC98.git
[Reduction] #247: grcg_pset
This commit is contained in:
parent
eb6c0b5551
commit
366ba7a85f
|
@ -0,0 +1,79 @@
|
|||
PAGE 98,120
|
||||
; graphics - grcg - pset - PC98V
|
||||
;
|
||||
; DESCRIPTION:
|
||||
; 点の描画
|
||||
;
|
||||
; FUNCTION:
|
||||
; void far _pascal grcg_pset( int x, int y )
|
||||
|
||||
; PARAMETERS:
|
||||
; int x,y 点の座標
|
||||
;
|
||||
; BINDING TARGET:
|
||||
; Microsoft-C / Turbo-C
|
||||
;
|
||||
; RUNNING TARGET:
|
||||
; NEC PC-9801 Normal mode
|
||||
;
|
||||
; REQUIRING RESOURCES:
|
||||
; CPU: V30
|
||||
; GRAPHICS ACCELARATOR: GRAPHIC CHARGER
|
||||
;
|
||||
; COMPILER/ASSEMBLER:
|
||||
; TASM 3.0
|
||||
; OPTASM 1.6
|
||||
;
|
||||
; NOTES:
|
||||
; ・グラフィック画面の青プレーンにのみ描画します。
|
||||
; ・色をつけるには、グラフィックチャージャーを利用してください。
|
||||
; ・grc_setclip()によるクリッピングに対応しています。
|
||||
;
|
||||
; AUTHOR:
|
||||
; 恋塚昭彦
|
||||
;
|
||||
; 関連関数:
|
||||
; grc_setclip()
|
||||
;
|
||||
; HISTORY:
|
||||
; 92/6/12 Initial
|
||||
; 92/7/16 bugfix(^^;
|
||||
|
||||
func GRCG_PSET
|
||||
mov BX,BP ; save BP
|
||||
mov BP,SP
|
||||
|
||||
; parameters
|
||||
@@x = (RETSIZE+1)*2
|
||||
@@y = (RETSIZE+0)*2
|
||||
|
||||
mov CX,[BP+@@x]
|
||||
mov DX,[BP+@@y]
|
||||
|
||||
mov BP,BX ; restore BP
|
||||
|
||||
cmp CX,ClipXL
|
||||
jl short @@RETURN
|
||||
cmp CX,ClipXR
|
||||
jg short @@RETURN
|
||||
sub DX,ClipYT
|
||||
jl short @@RETURN
|
||||
cmp DX,ClipYH
|
||||
jg short @@RETURN
|
||||
|
||||
mov AX,DX
|
||||
shl AX,2
|
||||
add DX,AX
|
||||
add DX,ClipYT_seg
|
||||
mov ES,DX
|
||||
|
||||
mov BX,CX
|
||||
shr BX,3
|
||||
and CL,7
|
||||
mov AL,80h
|
||||
shr AL,CL
|
||||
|
||||
mov ES:[BX],AL
|
||||
@@RETURN:
|
||||
ret 4
|
||||
endfunc
|
|
@ -2762,46 +2762,7 @@ sub_140E endp
|
|||
|
||||
include libs/master.lib/dos_ropen.asm
|
||||
include libs/master.lib/grcg_setcolor.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: bp-based frame
|
||||
|
||||
sub_146A proc far
|
||||
|
||||
arg_0 = word ptr 4
|
||||
arg_2 = word ptr 6
|
||||
|
||||
mov bx, bp
|
||||
mov bp, sp
|
||||
mov cx, [bp+arg_2]
|
||||
mov dx, [bp+arg_0]
|
||||
mov bp, bx
|
||||
cmp cx, ClipXL
|
||||
jl short locret_14AA
|
||||
cmp cx, ClipXR
|
||||
jg short locret_14AA
|
||||
sub dx, ClipYT
|
||||
jl short locret_14AA
|
||||
cmp dx, ClipYH
|
||||
jg short locret_14AA
|
||||
mov ax, dx
|
||||
shl ax, 2
|
||||
add dx, ax
|
||||
add dx, ClipYT_seg
|
||||
mov es, dx
|
||||
assume es:nothing
|
||||
mov bx, cx
|
||||
shr bx, 3
|
||||
and cl, 7
|
||||
mov al, 80h ; '€'
|
||||
shr al, cl
|
||||
mov es:[bx], al
|
||||
|
||||
locret_14AA:
|
||||
retf 4
|
||||
sub_146A endp
|
||||
|
||||
include libs/master.lib/grcg_pset.asm
|
||||
include libs/master.lib/egc.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
|
|
@ -13748,7 +13748,7 @@ loc_2261D:
|
|||
mov ax, [bx+589Dh]
|
||||
sar ax, 4
|
||||
push ax
|
||||
call sub_146A
|
||||
call grcg_pset
|
||||
|
||||
loc_22652:
|
||||
inc [bp+var_1]
|
||||
|
|
|
@ -346,7 +346,7 @@ loc_5C8:
|
|||
mov bx, si
|
||||
shl bx, 2
|
||||
push word ptr [bx+288Ah]
|
||||
call sub_14E4
|
||||
call grcg_pset
|
||||
lea ax, [bp+var_2]
|
||||
push ax
|
||||
lea ax, [bp+var_4]
|
||||
|
@ -1173,45 +1173,7 @@ sub_139C endp
|
|||
|
||||
include libs/master.lib/grcg_hline.asm
|
||||
include libs/master.lib/grcg_setcolor.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: bp-based frame
|
||||
|
||||
sub_14E4 proc near
|
||||
|
||||
arg_0 = word ptr 2
|
||||
arg_2 = word ptr 4
|
||||
|
||||
mov bx, bp
|
||||
mov bp, sp
|
||||
mov cx, [bp+arg_2]
|
||||
mov dx, [bp+arg_0]
|
||||
mov bp, bx
|
||||
cmp cx, ClipXL
|
||||
jl short locret_1524
|
||||
cmp cx, ClipXR
|
||||
jg short locret_1524
|
||||
sub dx, ClipYT
|
||||
jl short locret_1524
|
||||
cmp dx, ClipYH
|
||||
jg short locret_1524
|
||||
mov ax, dx
|
||||
shl ax, 2
|
||||
add dx, ax
|
||||
add dx, ClipYT_seg
|
||||
mov es, dx
|
||||
mov bx, cx
|
||||
shr bx, 3
|
||||
and cl, 7
|
||||
mov al, 80h
|
||||
shr al, cl
|
||||
mov es:[bx], al
|
||||
|
||||
locret_1524:
|
||||
retn 4
|
||||
sub_14E4 endp
|
||||
|
||||
include libs/master.lib/grcg_pset.asm
|
||||
include libs/master.lib/egc.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
@ -1299,7 +1261,7 @@ loc_15FF:
|
|||
loc_160A:
|
||||
push [bp+arg_4]
|
||||
push [bp+arg_2]
|
||||
call sub_14E4
|
||||
call grcg_pset
|
||||
pop di
|
||||
pop si
|
||||
leave
|
||||
|
|
|
@ -566,8 +566,7 @@ loc_C9B:
|
|||
loc_CA6:
|
||||
push [bp+arg_4]
|
||||
push [bp+arg_2]
|
||||
push cs
|
||||
call near ptr sub_123A
|
||||
call grcg_pset
|
||||
pop di
|
||||
pop si
|
||||
leave
|
||||
|
@ -1343,47 +1342,7 @@ loc_122E:
|
|||
retf 8
|
||||
sub_109C endp
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
nop
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: bp-based frame
|
||||
|
||||
sub_123A proc far
|
||||
|
||||
arg_0 = word ptr 4
|
||||
arg_2 = word ptr 6
|
||||
|
||||
mov bx, bp
|
||||
mov bp, sp
|
||||
mov cx, [bp+arg_2]
|
||||
mov dx, [bp+arg_0]
|
||||
mov bp, bx
|
||||
cmp cx, ClipXL
|
||||
jl short locret_127A
|
||||
cmp cx, ClipXR
|
||||
jg short locret_127A
|
||||
sub dx, ClipYT
|
||||
jl short locret_127A
|
||||
cmp dx, ClipYH
|
||||
jg short locret_127A
|
||||
mov ax, dx
|
||||
shl ax, 2
|
||||
add dx, ax
|
||||
add dx, ClipYT_seg
|
||||
mov es, dx
|
||||
mov bx, cx
|
||||
shr bx, 3
|
||||
and cl, 7
|
||||
mov al, 80h ; '€'
|
||||
shr al, cl
|
||||
mov es:[bx], al
|
||||
|
||||
locret_127A:
|
||||
retf 4
|
||||
sub_123A endp
|
||||
|
||||
include libs/master.lib/grcg_pset.asm
|
||||
include libs/master.lib/grcg_setcolor.asm
|
||||
include libs/master.lib/grcg_vline.asm
|
||||
|
||||
|
@ -5336,8 +5295,7 @@ loc_4253:
|
|||
cmp byte ptr [si+0Eh], 0
|
||||
jnz short loc_4264
|
||||
nop
|
||||
push cs
|
||||
call near ptr sub_123A
|
||||
call grcg_pset
|
||||
jmp short loc_4270
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
|
@ -29605,7 +29563,7 @@ loc_11013:
|
|||
loc_11095:
|
||||
push [bp+var_2]
|
||||
push si
|
||||
call sub_123A
|
||||
call grcg_pset
|
||||
inc di
|
||||
mov al, [bp+var_3]
|
||||
add al, 4
|
||||
|
|
42
th03_op.asm
42
th03_op.asm
|
@ -775,45 +775,7 @@ loc_E62:
|
|||
retf 6
|
||||
sub_C6A endp
|
||||
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: bp-based frame
|
||||
|
||||
sub_E82 proc far
|
||||
|
||||
arg_0 = word ptr 4
|
||||
arg_2 = word ptr 6
|
||||
|
||||
mov bx, bp
|
||||
mov bp, sp
|
||||
mov cx, [bp+arg_2]
|
||||
mov dx, [bp+arg_0]
|
||||
mov bp, bx
|
||||
cmp cx, ClipXL
|
||||
jl short locret_EC2
|
||||
cmp cx, ClipXR
|
||||
jg short locret_EC2
|
||||
sub dx, ClipYT
|
||||
jl short locret_EC2
|
||||
cmp dx, ClipYH
|
||||
jg short locret_EC2
|
||||
mov ax, dx
|
||||
shl ax, 2
|
||||
add dx, ax
|
||||
add dx, ClipYT_seg
|
||||
mov es, dx
|
||||
mov bx, cx
|
||||
shr bx, 3
|
||||
and cl, 7
|
||||
mov al, 80h ; '€'
|
||||
shr al, cl
|
||||
mov es:[bx], al
|
||||
|
||||
locret_EC2:
|
||||
retf 4
|
||||
sub_E82 endp
|
||||
|
||||
include libs/master.lib/grcg_pset.asm
|
||||
include libs/master.lib/grcg_setcolor.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
@ -17702,7 +17664,7 @@ loc_B6CF:
|
|||
mov [bp+var_4], ax
|
||||
push [bp+var_2]
|
||||
push ax
|
||||
call sub_E82
|
||||
call grcg_pset
|
||||
inc [bp+var_6]
|
||||
|
||||
loc_B73B:
|
||||
|
|
|
@ -617,8 +617,7 @@ loc_11C7:
|
|||
loc_11D2:
|
||||
push [bp+arg_4]
|
||||
push [bp+arg_2]
|
||||
push cs
|
||||
call near ptr sub_1700
|
||||
call grcg_pset
|
||||
pop di
|
||||
pop si
|
||||
leave
|
||||
|
@ -1246,47 +1245,7 @@ loc_16F4:
|
|||
retf 8
|
||||
sub_1562 endp
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
nop
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: bp-based frame
|
||||
|
||||
sub_1700 proc far
|
||||
|
||||
arg_0 = word ptr 4
|
||||
arg_2 = word ptr 6
|
||||
|
||||
mov bx, bp
|
||||
mov bp, sp
|
||||
mov cx, [bp+arg_2]
|
||||
mov dx, [bp+arg_0]
|
||||
mov bp, bx
|
||||
cmp cx, ClipXL
|
||||
jl short locret_1740
|
||||
cmp cx, ClipXR
|
||||
jg short locret_1740
|
||||
sub dx, ClipYT
|
||||
jl short locret_1740
|
||||
cmp dx, ClipYH
|
||||
jg short locret_1740
|
||||
mov ax, dx
|
||||
shl ax, 2
|
||||
add dx, ax
|
||||
add dx, ClipYT_seg
|
||||
mov es, dx
|
||||
mov bx, cx
|
||||
shr bx, 3
|
||||
and cl, 7
|
||||
mov al, 80h ; '€'
|
||||
shr al, cl
|
||||
mov es:[bx], al
|
||||
|
||||
locret_1740:
|
||||
retf 4
|
||||
sub_1700 endp
|
||||
|
||||
include libs/master.lib/grcg_pset.asm
|
||||
include libs/master.lib/grcg_setcolor.asm
|
||||
include libs/master.lib/grcg_vline.asm
|
||||
|
||||
|
|
|
@ -397,8 +397,7 @@ loc_1089:
|
|||
loc_1094:
|
||||
push [bp+arg_4]
|
||||
push [bp+arg_2]
|
||||
push cs
|
||||
call near ptr sub_1A44
|
||||
call grcg_pset
|
||||
pop di
|
||||
pop si
|
||||
leave
|
||||
|
@ -1651,45 +1650,7 @@ loc_1A28:
|
|||
retf 6
|
||||
sub_18B4 endp
|
||||
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: bp-based frame
|
||||
|
||||
sub_1A44 proc far
|
||||
|
||||
arg_0 = word ptr 4
|
||||
arg_2 = word ptr 6
|
||||
|
||||
mov bx, bp
|
||||
mov bp, sp
|
||||
mov cx, [bp+arg_2]
|
||||
mov dx, [bp+arg_0]
|
||||
mov bp, bx
|
||||
cmp cx, ClipXL
|
||||
jl short locret_1A84
|
||||
cmp cx, ClipXR
|
||||
jg short locret_1A84
|
||||
sub dx, ClipYT
|
||||
jl short locret_1A84
|
||||
cmp dx, ClipYH
|
||||
jg short locret_1A84
|
||||
mov ax, dx
|
||||
shl ax, 2
|
||||
add dx, ax
|
||||
add dx, ClipYT_seg
|
||||
mov es, dx
|
||||
mov bx, cx
|
||||
shr bx, 3
|
||||
and cl, 7
|
||||
mov al, 80h ; '€'
|
||||
shr al, cl
|
||||
mov es:[bx], al
|
||||
|
||||
locret_1A84:
|
||||
retf 4
|
||||
sub_1A44 endp
|
||||
|
||||
include libs/master.lib/grcg_pset.asm
|
||||
include libs/master.lib/grcg_setcolor.asm
|
||||
include libs/master.lib/grcg_vline.asm
|
||||
|
||||
|
|
|
@ -608,8 +608,7 @@ loc_DB1:
|
|||
loc_DBC:
|
||||
push [bp+arg_4]
|
||||
push [bp+arg_2]
|
||||
push cs
|
||||
call near ptr sub_EE4
|
||||
call grcg_pset
|
||||
pop di
|
||||
pop si
|
||||
leave
|
||||
|
@ -702,45 +701,7 @@ loc_E58:
|
|||
sub_DCC endp
|
||||
|
||||
include libs/master.lib/grcg_hline.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: bp-based frame
|
||||
|
||||
sub_EE4 proc far
|
||||
|
||||
arg_0 = word ptr 4
|
||||
arg_2 = word ptr 6
|
||||
|
||||
mov bx, bp
|
||||
mov bp, sp
|
||||
mov cx, [bp+arg_2]
|
||||
mov dx, [bp+arg_0]
|
||||
mov bp, bx
|
||||
cmp cx, ClipXL
|
||||
jl short locret_F24
|
||||
cmp cx, ClipXR
|
||||
jg short locret_F24
|
||||
sub dx, ClipYT
|
||||
jl short locret_F24
|
||||
cmp dx, ClipYH
|
||||
jg short locret_F24
|
||||
mov ax, dx
|
||||
shl ax, 2
|
||||
add dx, ax
|
||||
add dx, ClipYT_seg
|
||||
mov es, dx
|
||||
mov bx, cx
|
||||
shr bx, 3
|
||||
and cl, 7
|
||||
mov al, 80h ; '€'
|
||||
shr al, cl
|
||||
mov es:[bx], al
|
||||
|
||||
locret_F24:
|
||||
retf 4
|
||||
sub_EE4 endp
|
||||
|
||||
include libs/master.lib/grcg_pset.asm
|
||||
include libs/master.lib/grcg_setcolor.asm
|
||||
include libs/master.lib/grcg_vline.asm
|
||||
|
||||
|
|
Loading…
Reference in New Issue