; MetaGraph global symbol definitions
; Copyright 1996 by Daniel Mahrenholz

; Meta256 symbols

SEGMENT	code	byte public

GLOBAL	P_HL_256stos: near, P_HL_256ors  : near, \
	P_HL_256ands: near, P_HL_256xors : near

GLOBAL	P_GetP_256 : near

GLOBAL	F_Point_256mov: near, F_Point_256and: near, \
	F_Point_256xor: near, F_Point_256or : near

GLOBAL	P_Point_256mov: near, P_Point_256and: near, \
	P_Point_256xor: near, P_Point_256or : near

GLOBAL	P_VL_256mov: near, P_VL_256and: near, \
	P_VL_256xor: near, P_VL_256or : near

GLOBAL	P_Bar_256stos: near, P_Bar_256ands: near, \
	P_Bar_256ors : near, P_Bar_256xors: near

GLOBAL	P_Line_256mov: near, P_Line_256and: near, \
	P_Line_256or : near, P_Line_256xor: near

; Meta16 symbols

GLOBAL	P_HL_16M: near, P_HL_16C : near

GLOBAL	P_GetP_16M: near

GLOBAL	F_Point_16M: near

GLOBAL	P_Point_16M: near

GLOBAL	P_VL_16M: near

GLOBAL	P_Bar_16M: near, P_Bar_16C: near

GLOBAL	P_Line_16M: near


; MetaInt symbols

GLOBAL	M_HL : near

GLOBAL	M_GetP: near

GLOBAL  F_Point16: near, F_Point256 : near

GLOBAL	M_Point : near

GLOBAL	M_VL : near

GLOBAL	M_Bar : near

GLOBAL	M_Line : near


; MetaDum symbols

GLOBAL	P_HL_nD : near

GLOBAL	P_GetP_nD : near

GLOBAL	P_Point_nD : near

GLOBAL	P_VL_nD : near

GLOBAL	P_Bar_nD : near

GLOBAL	P_Line_nD : near

; MetaFile symbols

EXTRN	Save : near

ENDS


; metagr unit datas

SEGMENT data word public
	assume ds: data

extrn	ErrorProc	: DWord
extrn	daError		: Word
extrn  	daDivConst	: Word
extrn	daLnStyle	: Word
extrn	daThickness	: Word
extrn	daFillStyle	: Word
extrn	daWriteMode	: Word

extrn	BackPtr		: Word
extrn	DrawPtr		: DWord
extrn	EndPtr		: Word
extrn	ExtPtr		: Word
extrn	ValidBuffer	: Word
extrn	ValidStack	: Word
extrn	MetaStack	: DWord
extrn	MColors		: DWord
extrn	MPalettes	: DWord

extrn	FillBase	: Word
extrn	FillNext	: Word
extrn	FillCur		: Word
extrn 	FillFlag	: Word
extrn	MetaError	: Word
extrn	csAlias		: Word
extrn	FillPattern	: DWord

extrn	DColor16	: Word
extrn	FColor16	: Word
extrn	HColor16	: Word
extrn	DColor256	: DWord
extrn	FColor256	: DWord
extrn	HColor256	: DWord

extrn	SF		: DWord

extrn	fx		: DWord
extrn	fy		: DWord
extrn	fc		: Word

extrn	xa		: Word
extrn	xe		: Word
extrn	xd		: Word
extrn	ya		: Word
extrn	ye		: Word
extrn	yd		: Word

extrn	Color		: Word
extrn	MGCMode		: Word
extrn	Style		: Word

extrn	P_VL		: Word
extrn	P_HL		: Word
extrn	P_Bar		: Word
extrn	P_Point		: Word
extrn	P_PointF	: Word
extrn	P_GetP		: Word
extrn	P_Line		: Word
extrn	P_LineD		: Word
extrn	F_Point		: Word

extrn	last_x		: Word
extrn	last_y		: Word


ENDS

MACRO   Metafile        ParamSize, Start
; prepares register for metafiling and calls save-proc

; Input    ParamSize    size of procs parameters in words
;           Start        new starting label for metafiled proc

           mov          cx, ParamSize
           mov          dx, offset(Start)
           call         Save

ENDM
