; Gr Definitions, Copr. 1994 Matthias K”ppe

		LOCALS	@@
		JUMPS

_extrn		EQU	EXTRN

	IDEAL
IFNDEF C
  MACRO _dat
    PUSHSTATE
    IDEAL
    SEGMENT 	DATA WORD PUBLIC
		ASSUME	DS: DATA
    POPSTATE
  ENDM
  MACRO __dat
    ENDS
  ENDM
  MACRO _code
    PUSHSTATE
    IDEAL
    SEGMENT 	CODE BYTE PUBLIC
		ASSUME	CS: CODE
    POPSTATE
  ENDM
  MACRO __code
    ENDS
  ENDM
ELSE
  MODEL	LARGE
  MACRO _dat
    PUSHSTATE
    MASM
    .DATA?
    POPSTATE
  ENDM
  MACRO __dat
    ENDS
  ENDM
  MACRO _code
    CODESEG
  ENDM
  MACRO __code
    ENDS
  ENDM
ENDIF
	MASM
	LOCALS @@
	.286

TPOINT		STRUC
	X	DW	?
	Y	DW	?
TPOINT        	ENDS

TRECT		STRUC
	A	TPOINT	?
	B	TPOINT	?
TRECT		ENDS

_code
__code

_dat
		_extrn	GrMode: WORD, \
			SizeX: WORD, SizeY: WORD

		_extrn	Page0Seg: WORD, Free0Seg: WORD, Page1Seg: WORD, \
			Free1Seg: WORD, EndSeg: WORD, \
			GrFlags: WORD, ScreenF: WORD, \
			Granularity: BYTE, MapFlags: BYTE

		_extrn	ActivePage: WORD, ActiveSeg: WORD, \
			ActivePSeg: WORD, ActivePOfs: WORD, \
			ActiveWindow: WORD, \
			BkColor: WORD, BkMode: WORD, \
			GransPerWindow: WORD, \
			MapGranRight: BYTE, MapGranLeft: BYTE, \
			WindowNum: WORD, WindowAddr: DWORD

	;		BytesPerLine: WORD, MapGranMask: WORD, \
	;		WindowSize: WORD, OffsetMask: WORD, \
	;		RealBytesPerLine: WORD

		_extrn	RealBytesPerLine32: DWORD, \
			BytesPerLine32: DWORD, \
			WindowSize32: DWORD, \
			OffsetMask32: DWORD, \
			MapGranMask32: DWORD, \
			MapGran32: BYTE, \
			ActiveLinear32: DWORD

RealBytesPerLine EQU	(WORD PTR RealBytesPerLine32)
BytesPerLine	EQU	(WORD PTR BytesPerLine32)
WindowSize	EQU	(WORD PTR WindowSize32)
OffsetMask	EQU	(WORD PTR OffsetMask32)
MapGranMask	EQU	(WORD PTR MapGranMask32)

		_extrn	PhysicalX: WORD, PhysicalY: WORD, \
			GrActive: BYTE, DrawOrigin: TPOINT, \
			ClipRect: TRECT, TempMem: DWORD, \
			MetaState: WORD, MetaClipRect: TRECT, \
			MetaOrigin: TPOINT

		_extrn	ExtSave: DWORD, \
			LineProc: DWORD, ClipNotifyProc: DWORD, \
			InitGraphProc: DWORD, CloseGraphProc: DWORD, \
			ActivePageProc: DWORD, ChParamsProc: DWORD, \
			GrNotifyProc: DWORD, MapAddrProc: DWORD, \
			SetDispStartProc: DWORD, \
			UserRegArea: BYTE: 7

		_extrn	SavedTextMode: BYTE

		_extrn	Seg0040: WORD, SegA000: WORD
__dat

ms_Draw		EQU  	1
ms_Record	EQU	2
ms_BGI		EQU	4
ms_Execute	EQU	8
ms_Clear	EQU	16
ms_Play		EQU	32

gf16  		EQU	0
gf256 		EQU	1
gfMap		EQU	2

grVgaLoStd      EQU 0
grVgaLoPak      EQU 1
grVgaMedStd     EQU 2
grVgaMedOne     EQU 3
grVgaMedPak     EQU 4
grVgaHiStd      EQU 5
grSvgaStd       EQU 6
grVga256Std     EQU 7
grVgaWdMedStd   EQU 8
grVgaWdMedOne   EQU 9
grVgaWdMedPak   EQU 10
grVgaWdHiStd    EQU 11
gr640x480x256   EQU 12
gr800x600x256   EQU 13
gr1024x768x16   EQU 14
gr1024x768x256  EQU 15
gr1280x1024x16  EQU 16
gr1280x1024x256 EQU 17
gr640x400x256   EQU 18
gr640x200x16	EQU grVgaLoPak
gr640x350x16	EQU grVgaMedOne
gr640x480x16  	EQU grVgaHiStd
gr800x600x16  	EQU grSvgaStd
gr320x200x256 	EQU grVga256Std
gr720x350x16  	EQU grVgaWdMedOne
gr720x480x16  	EQU grVgaWdHiStd

gcnUpdAll    EQU 1
gcnUpdOrigin EQU 2

gcnStopUpd   EQU 10
gcnContUpd   EQU 11
gcnHaltUpd   EQU 12
gcnStartUpd  EQU 13
gcnUpdOnReq  EQU 14

gcpColor     EQU 1
gcpLineStyle EQU 2
gcpSolidThLn EQU 3
gcpGetSize   EQU $000
gcpGetParams EQU $100
gcpSetParams EQU $200

npInstall    EQU 0
npUninstall  EQU 1
npGetQuality EQU 2
npSetNext    EQU 3

gnpInitGraphics  EQU 100
gnpCloseGraphics EQU 101
gnpBkMode        EQU 102
gnpPalette       EQU 103

