home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / cdactual / demobin / share / program / Pascal / BGI256.ZIP / SDATA.INC < prev    next >
Encoding:
Text File  |  1993-04-19  |  18.8 KB  |  549 lines

  1. ;SDATA.INC - Copyright 1991,1992,1993 Knight Software
  2. ;
  3. ; History: 
  4. ;   17 May 1991 - first release
  5. ;   14 Jul 1991 - Corrected Line draw default from MoveByte to ForeByte
  6. ;   19 Aug 1992 - Added mode error flag
  7. ;   22 Nov 1992 - Addapted for protected mode operation
  8. ;   17 Apr 1993 - Added GetImage/GetPixel animation enhancement vars
  9. ;
  10. ;----------------------------------------------------------------------
  11. ;
  12. ; Data variables and constants for BGI driver
  13. ;
  14. ; NOTE: The data in this file resides in the data selector
  15. ;       when operating in protected mode. The data segment is 
  16. ;       shared with the code segment in real mode.
  17. ;
  18. ;----------------------------------------------------------------------
  19.  
  20. ;register structure used for processing real mode interrupts 
  21. ;from protected mode operation
  22. SimIntStruc struc
  23.   RealDI    DD 0
  24.   RealSI    DD 0
  25.   RealBP    DD 0
  26.   RealXX    DD 0
  27.   RealBX    DD 0
  28.   RealDX    DD 0
  29.   RealCX    DD 0
  30.   RealAX    DD 0
  31.   RealFlags    DW 0
  32.   RealES    DW 0
  33.   RealDS    DW 0
  34.   RealFS    DW 0
  35.   RealGS    DW 0
  36.   RealIP    DW 0
  37.   RealCS    DW 0
  38.   RealSP    DW 0
  39.   RealSS    DW 0
  40. SimIntStruc ends
  41.  
  42. SimInt:    SimIntStruc <>
  43.  
  44.  
  45. ;======================================================================
  46. ;The following are declared constants. They are set at compile time.
  47. ;======================================================================
  48. grOk        =   0    ;Normal Operation, No errors
  49. grNoInitGraph    =  -1
  50. grNotDetected    =  -2
  51. grFileNotFound    =  -3
  52. grInvalidDriver    =  -4
  53. grNoLoadMem    =  -5
  54. grNoScanMem    =  -6
  55. grNoFloodMem    =  -7
  56. grFontNotFound    =  -8
  57. grNoFontMem    =  -9
  58. grInvalidMode    = -10
  59. grError        = -11    ;Generic Driver Error
  60. grIOerror    = -12
  61. grInvalidFont    = -13
  62. grInvalidFontNum   = -14
  63. grInvalidDeviceNum = -15
  64.  
  65.  
  66. ;======================================================================
  67. ;The Status Block is used to detect and control the operation
  68. ;of the driver. The Status Block is set by the INSTALL procedure
  69. ;by copying the appropriate mode table into the common access table.
  70. ;======================================================================
  71.  
  72. StatBlockSize    EQU    26    ;Stat block size in bytes
  73. status struc
  74.   stat        DB    0    ; 0 = no errors
  75.   devtyp     DB    0    ; device type 0=screen 1=printer 2=plotter
  76.   xres        DW    639 ;799 ;639    ; full resolution
  77.   yres        DW    479 ;599 ;479
  78.   xefres     DW    639 ;799 ;639    ; effective resolution
  79.   yefres     DW    479 ;599 ;479
  80.   xinch        DW    9000    ; device size in inches*1000
  81.   yinch        DW    7000
  82.   aspec        DW    10000    ; aspect ratio
  83.   chsizx     DB    8
  84.   chsizy    DB    8    ; standard char size x,y (points)
  85.   ctblf     DB    255    ;foreground colors
  86.   ctblb        DB    255    ;background colors
  87.   BytesPerScanLine DW    640 ;# bytes in a scan line
  88.   TotalScanLines   DW    480 ;# scan lines on display
  89.   MaxColor       DW    256 ;max colors available
  90.   PixelBits       DB    8   ;Number of bits per pixel
  91. status ends
  92.  
  93. StatBlock:    status <>
  94.  
  95. ;----------------------------------------------------------------------
  96. ;Table of Pointers to the available mode status blocks 
  97.  
  98.     EVEN        ;make sure this starts on word boundry
  99.  
  100. StatusPtrTable:
  101.     DW    Mode0Statblock ;320x200
  102.     DW    Mode1Statblock ;640x400
  103.     DW    Mode2Statblock ;640x480
  104.     DW    Mode3Statblock ;800x600
  105.     DW    Mode4Statblock ;1024x768
  106.     DW    Mode5Statblock ;2048x1024
  107.     DW    Mode0Statblock ;320x200 ;dummy fill table to 8 pos
  108.     DW    Mode0Statblock ;320x200
  109.  
  110. Mode0StatBlock:    ; 320 x 200 x 256
  111.     DB    0    ; stat      0 = no errors
  112.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  113.     DW    319    ; xres      full resolution
  114.     DW    199    ; yres    
  115.     DW    319    ; xefres  effective resolution
  116.     DW    199    ; yefres 
  117.     DW    9000    ; xinch      device size in inches*1000
  118.     DW    7000    ; yinch    
  119.     DW    8333    ; aspec      aspect ratio
  120.     DB    8    ; chsizx     
  121.     DB    8    ; chsizy  standard char size x,y (points)
  122.     DB    255    ; ctblf   foreground colors
  123.     DB    255    ; ctblb      background colors
  124.     DW    320     ; BytesPerScanLine  # bytes in a scan line
  125.     DW    200     ; TotalScanLines    # scan lines on display
  126.     DW    256     ; MaxColor        max colors available
  127.     DB    8    ; PixelBits         Number of bits per pixel
  128.  
  129. Mode1StatBlock:    ; 640 x 400 x 256
  130.     DB    0    ; stat      0 = no errors
  131.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  132.     DW    639    ; xres      full resolution
  133.     DW    399    ; yres    
  134.     DW    639    ; xefres  effective resolution
  135.     DW    399    ; yefres 
  136.     DW    9000    ; xinch      device size in inches*1000
  137.     DW    7000    ; yinch    
  138.     DW    8333    ; aspec      aspect ratio
  139.     DB    8    ; chsizx 
  140.     DB    8    ; chsizy  standard char size x,y (points)
  141.     DB    255    ; ctblf   foreground colors
  142.     DB    255    ; ctblb      background colors
  143.     DW    640     ; BytesPerScanLine  # bytes in a scan line
  144.     DW    400     ; TotalScanLines    # scan lines on display
  145.     DW    256     ; MaxColor        max colors available
  146.     DB    8    ; PixelBits         Number of bits per pixel
  147.  
  148. Mode2StatBlock:    ; 640 x 480 x 256
  149.     DB    0    ; stat      0 = no errors
  150.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  151.     DW    639    ; xres      full resolution
  152.     DW    479    ; yres    
  153.     DW    639    ; xefres  effective resolution
  154.     DW    479    ; yefres 
  155.     DW    9000    ; xinch      device size in inches*1000
  156.     DW    7000    ; yinch    
  157.     DW    10000    ; aspec      aspect ratio
  158.     DB    8    ; chsizx 
  159.     DB    8    ; chsizy  standard char size x,y (points)
  160.     DB    255    ; ctblf   foreground colors
  161.     DB    255    ; ctblb      background colors
  162.     DW    640     ; BytesPerScanLine  # bytes in a scan line
  163.     DW    480     ; TotalScanLines    # scan lines on display
  164.     DW    256     ; MaxColor        max colors available
  165.     DB    8    ; PixelBits         Number of bits per pixel
  166.  
  167. Mode3StatBlock:    ; 800 x 600 x 256
  168.     DB    0    ; stat      0 = no errors
  169.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  170.     DW    799    ; xres      full resolution
  171.     DW    599    ; yres    
  172.     DW    799    ; xefres  effective resolution
  173.     DW    599    ; yefres 
  174.     DW    9000    ; xinch      device size in inches*1000
  175.     DW    7000    ; yinch    
  176.     DW    10000    ; aspec      aspect ratio
  177.     DB    8    ; chsizx 
  178.     DB    8    ; chsizy  standard char size x,y (points)
  179.     DB    255    ; ctblf   foreground colors
  180.     DB    255    ; ctblb      background colors
  181.     DW    800     ; BytesPerScanLine  # bytes in a scan line
  182.     DW    600     ; TotalScanLines    # scan lines on display
  183.     DW    256     ; MaxColor        max colors available
  184.     DB    8    ; PixelBits         Number of bits per pixel
  185.  
  186. Mode4StatBlock:    ; 1024 x 768 x 256
  187.     DB    0    ; stat      0 = no errors
  188.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  189.     DW    1023    ; xres      full resolution
  190.     DW    767    ; yres    
  191.     DW    1023    ; xefres  effective resolution
  192.     DW    767    ; yefres 
  193.     DW    9000    ; xinch      device size in inches*1000
  194.     DW    7000    ; yinch    
  195.     DW    10000    ; aspec      aspect ratio
  196.     DB    8    ; chsizx 
  197.     DB    8    ; chsizy  standard char size x,y (points)
  198.     DB    255    ; ctblf   foreground colors
  199.     DB    255    ; ctblb      background colors
  200.     DW    1024     ; BytesPerScanLine  # bytes in a scan line
  201.     DW    768     ; TotalScanLines    # scan lines on display
  202.     DW    256     ; MaxColor        max colors available
  203.     DB    8    ; PixelBits         Number of bits per pixel
  204.  
  205. Mode5StatBlock:    ; 2048 x 1024 x 256
  206.     DB    0    ; stat      0 = no errors
  207.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  208.     DW    2047    ; xres      full resolution
  209.     DW    1023    ; yres    
  210.     DW    2047    ; xefres  effective resolution
  211.     DW    1023    ; yefres 
  212.     DW    9000    ; xinch      device size in inches*1000
  213.     DW    7000    ; yinch    
  214.     DW    10000    ; aspec      aspect ratio
  215.     DB    8    ; chsizx 
  216.     DB    8    ; chsizy  standard char size x,y (points)
  217.     DB    255    ; ctblf   foreground colors
  218.     DB    255    ; ctblb      background colors
  219.     DW    2048     ; BytesPerScanLine  # bytes in a scan line
  220.     DW    1024     ; TotalScanLines    # scan lines on display
  221.     DW    256     ; MaxColor        max colors available
  222.     DB    8    ; PixelBits         Number of bits per pixel
  223.  
  224. ;----------------------------------------------------------------------
  225. ;Mode names - One entry for each selectable mode
  226. ModeNameSize    EQU 15    ;Each name entry in the table is 15 bytes long
  227. ModeName    DB 10
  228.         DB '320 x 200 ',0,0,0,0    ;0
  229.         DB 10
  230.         DB '640 x 400 ',0,0,0,0    ;1
  231.         DB 10
  232.         DB '640 x 480 ',0,0,0,0    ;2
  233.         DB 10
  234.         DB '800 x 600 ',0,0,0,0    ;3
  235.         DB 11
  236.         DB '1024 x 768 ',0,0,0    ;4
  237.         DB 12
  238.         DB '2048 x 1024 ',0,0    ;5
  239. ModeNameError    DB 8
  240.         DB 'Unknown ',0
  241. ModeNameBad    DB 6
  242.         DB 'Error ',0
  243.  
  244. ModeNameMax    EQU 40        ;40 character mode name string max
  245. ModeNameBuffer    DB ModeNameMax DUP(0)
  246.  
  247. DefaultMode    EQU 0        ;start in mode 0 unless otherwise set
  248.  
  249. VidMode     DW 0        ;Video mode we will be using
  250.  
  251. CardNamePtr    DW DummyCard    ;pointer to card name
  252.  
  253.  
  254. ;======================================================================
  255. ;The pattern tables control how fills and line draws are performed.
  256. ;======================================================================
  257.  
  258.     EVEN        ;make sure this starts on word boundry
  259.  
  260. ;fill pattern data table
  261. FillTable:
  262.     DB 000h,000h,000h,000h,000h,000h,000h,000h  ;0  No Fill
  263.     DB 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh  ;1  Solid Fill
  264.     DB 0FFh,0FFh,000h,000h,0FFh,0FFh,000h,000h  ;2  Line Fill
  265.     DB 001h,002h,004h,008h,010h,020h,040h,080h  ;3  Lt Slash Fill
  266.     DB 0E0h,0C1h,083h,007h,00Eh,01Ch,038h,070h  ;4  Slash Fill
  267.     DB 0F0h,078h,03Ch,01Eh,00Fh,087h,0C3h,0E1h  ;5  Backslash Fill
  268.     DB 0A5h,0D2h,069h,0B4h,05Ah,02Dh,096h,04Bh  ;6  Lt Bkslash Fill
  269.     DB 0FFh,088h,088h,088h,0FFh,088h,088h,088h  ;7  Hatch Fill
  270.     DB 081h,042h,024h,018h,018h,024h,042h,081h  ;8  XHatch Fill
  271.     DB 0CCh,033h,0CCh,033h,0CCh,033h,0CCh,033h  ;9  Interleave Fill
  272.     DB 080h,000h,008h,000h,080h,000h,008h,000h  ;10 Wide Dot Fill
  273.     DB 088h,000h,022h,000h,088h,000h,022h,000h  ;11 Close Dot Fill
  274.  
  275. ;Line pattern used for drawing lines - SetLineStyle
  276. LinePatternTable:
  277.     DW    1111111111111111B ;AL = 0 : Solid Line Style
  278.     DW    1100110011001100B ;AL = 1 : Dotted Line            
  279.     DW    1111110001111000B ;AL = 2 : Center Line            
  280.     DW    1111100011111000B ;AL = 3 : Dashed line            
  281.                        ;AL > 3 : User-defined line style
  282.  
  283. ;======================================================================
  284. ;The EGA palette is just here for compatibility.
  285. ;======================================================================
  286. ;This defines the EGA palette that is loaded at init time
  287. EgaPalette    DB    16    ;palette size
  288.         DB    0    ;palette zero (background)
  289.         DB    1
  290.         DB    2
  291.         DB    3
  292.         DB    4
  293.         DB    5
  294.         DB    6
  295.         DB    7
  296.         DB    8
  297.         DB    9
  298.         DB    10
  299.         DB    11
  300.         DB    12
  301.         DB    13
  302.         DB    14
  303.         DB    15    ;palette 15
  304.         DB    0    ;overscan register
  305.  
  306.  
  307. ;======================================================================
  308. ;The following are fixed variables. They are set once by INSTALL.
  309. ;======================================================================
  310.  
  311.     EVEN        ;make sure this starts on word boundry
  312.  
  313. VideoSegment    DW    0A000H    ;Video Segment location
  314. NumberModes    DW    6    ;Number modes available
  315. WinGran        DW    1    ;Window granularity multiplier
  316. DisplayType    DW    1    ;Display type in use
  317. ScanLineLength    DW    320    ;scan line length in bytes
  318.  
  319. ModeSelect    DB    0    ;Selected display mode number
  320. InitColor    DB    0    ;initial background color
  321. CharSizeX    DB    8    ;Character size
  322. CharSizeY    DB    8
  323. ModeErrorFlag    DB    0    ;set NZ when unsupported mode selected
  324.  
  325. ;======================================================================
  326. ;The following are reference variables. They are set by various procs.
  327. ;======================================================================
  328. ;color definition variables
  329. DrawForeColor       DB    255    ;line drawing foreground color
  330. DrawBackColor       DB    0    ;line drawing background color
  331. FillForeColor       DB    255    ;fill foreground color
  332. FillBackColor       DB    0    ;fill background color
  333. PutImageBackColor  DB    0    ;bitmap background color 
  334. GetImageBackColor  DB    0    ;bitmap background color 
  335. TextBackColor       DB    0    ;Text background color
  336.                 ;(text foreground uses drawcolor)
  337. PixelBackColor       DB    0    ;pixel drawing background color
  338.                 ;(pixel foreground uses passed color)
  339. ;Note: forecolor is whatever is specified at the time the object
  340. ;is being drawn (setcolor or setfill commands). Drawcolor is set 
  341. ;via setcolor command, fillcolor is set via setfill command.
  342. ;backcolor is set via the specific setwritemode command.
  343.  
  344.  
  345.     EVEN        ;make sure this starts on word boundry
  346.  
  347. ;positioning variables
  348. CPX        DW    0    ;master cursor position x
  349. CPY        DW    0    ;master cursor position y
  350. ClipX1        DW    0
  351. ClipY1        DW    0    ;clip boundries
  352. ClipX2        DW    639
  353. ClipY2        DW    479
  354.  
  355. ;line drawing variables
  356. PlotStyle    DW    1    ;0=dotperx, 1=x+y, 2=overlap 
  357. LinePattern    DW    1111111111111111B
  358. LineWidth    DB    1
  359.  
  360. ;Fill pattern working array
  361. ;do fill from this array - default = Solid Fill
  362. FillPattern:
  363.     DB 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh  ;(1)  Solid Fill
  364.  
  365. ;Text variables
  366. FontNumber    DB    0    ;Font number selected
  367. FontDir        DB    0    ;Direction to draw font
  368. FontSizeX    DB    8    ;Full size of font
  369. FontSizeY    DB    8    ; (CharSize*FontMult)
  370. FontMultX    DB    1    ;Character size multiplier
  371. FontMultY    DB    1    ;
  372.  
  373.  
  374. ;**********************************************************************
  375. ;The following procedure pointers are used to control program flow
  376. ;**********************************************************************
  377.  
  378. ;======================================================================
  379. ;The draw mode table is a table of near pointers (set at compile time)
  380. ;to the appropriate pixel routine to place the pixel on the screen 
  381. ;(32 entries) Currently the only valid seletions are 0-23. 
  382. ;Selections 24-31 are invalid, but will map to the first eight to keep 
  383. ;the code happy just in case we overflow the table. 
  384. ;======================================================================
  385.  
  386.     EVEN        ;make sure this starts on word boundry
  387.  
  388. DrawModeTable:
  389.     DW    MoveByte    ;#0 Overwrite mode
  390.     DW    XorByte        ;#1 XOR write mode
  391.     DW    OrByte        ;#2 OR write mode
  392.     DW    AndByte        ;#3 AND write mode
  393.     DW    NotByte        ;#4 Complement write mode
  394.     DW    NxorByte    ;#5 NXOR write mode
  395.     DW    NorByte        ;#6 NOR write mode
  396.     DW    NandByte    ;#7 NAND write mode
  397.     DW    ForeByte    ;#8 Foreground Only write mode
  398.     DW    ForeXorByte    ;#9 Foreground XOR write mode
  399.     DW    ForeOrByte    ;#10 Foreground OR write mode
  400.     DW    ForeAndByte    ;#11 Foreground AND write mode
  401.     DW    ForeNotByte    ;#12 Foreground NOT write mode
  402.     DW    ForeNxorByte    ;#13 Foreground NXOR write mode
  403.     DW    ForeNorByte    ;#14 Foreground NOR write mode
  404.     DW    ForeAndByte    ;#15 Foreground AND write mode
  405.     DW    BackByte    ;#16 Background Only write mode
  406.     DW    BackXorByte    ;#17 Background XOR write mode
  407.     DW    BackOrByte    ;#18 Background OR write mode
  408.     DW    BackAndByte    ;#19 Background AND write mode
  409.     DW    BackNotByte    ;#20 Background NOT write mode
  410.     DW    BackNxorByte    ;#21 Background NXOR write mode
  411.     DW    BackNorByte    ;#22 Background NOR write mode
  412.     DW    BackNandByte    ;#23 Background NAND write mode
  413.     ;the following are undefined, but we must have something here
  414.     ;to keep the code happy. These may change in the future
  415.     DW    MoveByte    ;#24 Overwrite mode
  416.     DW    XorByte        ;#25 XOR write mode
  417.     DW    OrByte        ;#26 OR write mode
  418.     DW    AndByte        ;#27 AND write mode
  419.     DW    NotByte        ;#28 Complement write mode
  420.     DW    NxorByte    ;#29 NXOR write mode
  421.     DW    NorByte        ;#30 NOR write mode
  422.     DW    NandByte    ;#31 NAND write mode
  423.  
  424. ;----------------------------------------------------------------------
  425. ;The initDisplayProc pointer points to the routine to init the display
  426. ;to the selected mode. This allows multiple display inits.
  427. InitDisplayProc    DW    VGA320x200Init    ;(default init select)
  428.  
  429. ;----------------------------------------------------------------------
  430. ;This points to the code that controls bank switching for the given
  431. ;pixel address in PixelX/PixelY. It is set by the Install proc.
  432. BankSelectProc DW    VGABankSelect    ;(default bank sel proc)
  433.  
  434. ;----------------------------------------------------------------------
  435. ;the following four near pointers contain the drawing mode pointer
  436. ;for the specified function of the pointer. 
  437. ;These procs can be changed through the SetWriteMode function
  438. FillPixelProc        DW    MoveByte  ;proc ptr for bar procs
  439. DrawPixelProc        DW    MoveByte  ;proc ptr for pixel procs
  440. LinePixelProc        DW    ForeByte  ;proc ptr for line procs
  441. TextPixelProc        DW    ForeByte  ;proc ptr for text procs
  442. PutImagePixelProc    DW    MoveByte  ;proc ptr for bit map procs
  443. GetImagePixelProc    DW    MoveByte  ;proc ptr for bit map procs
  444.  
  445. ;----------------------------------------------------------------------
  446. ;This proc pointer is set via the DeviceClear, Bar, PutImage, or GetImage
  447. ;procedure calls and controls how DoBitMap is processed. 
  448. BitMapProc        DW    WriteBitMap  ;proc ptr for main proc code
  449.  
  450. ;----------------------------------------------------------------------
  451. ;These variables store the selected write mode in use for procs
  452. FillPixelWriteMode    DB    0
  453. DrawPixelWriteMode    DB    0
  454. LinePixelWriteMode    DB    8
  455. TextPixelWriteMode    DB    8
  456. PutImagePixelWriteMode    DB    0
  457. GetImagePixelWriteMode    DB    0
  458.  
  459.  
  460. ;----------------------------------------------------------------------
  461. ;These flags control the operation of the image read functions
  462. GetPixelSwapFlag    DB    0 ;if NZ, causes GetPixel to draw too
  463. GetImageSwapFlag    DB     0 ;if NZ, causes GetImage to draw too
  464.  
  465. ;----------------------------------------------------------------------
  466. ;This variable selects the type of flood fill to use. default = zero
  467. ;                       ;bit     description
  468. FloodFillType    DB 0    ; 0: 0=border fill,  1=seed fill
  469.             ; 1: 0 (not used)
  470.             ; 2: 0=normal stack, 1=compressed stack
  471.             ; 3: 0=auto search,  1=slow search
  472.             ; 4: 0=draw on scan, 1=draw after scan (slow)
  473.             ; 5: 0=no tracer,    1=tracer if bit4=1
  474.             ; 6: 0 (not used)
  475.             ; 7: 0=fast fill,    1=slow fill (computed)
  476. ;note: bit seven is computed at start of floodfill operation based on
  477. ;the search mode selected (bit 1) and the fillstyle (move/xor/etc)
  478.  
  479. SeedFill    EQU 01H    ;fill everything not seed else all but border
  480. ComplexFill    EQU 04H    ;force complex fill method (else auto select)
  481. StackCompress    EQU 08H    ;use compressed XY stack during fill
  482. DelayedDraw    EQU 10H    ;draw after scanning is done (on slowfill only)
  483. TracerOn    EQU 20H ;show tracer during fill scan
  484. SlowFill    EQU 80H    ;use slow stack piggy complex fill method
  485.             ; (slow fill required for complex fills)
  486.  
  487. ;**********************************************************************
  488. ;Misc temp variables. These are only used internally.
  489. ;**********************************************************************
  490.  
  491.     EVEN        ;make sure this starts on word boundry
  492.  
  493. ;word variables go first followed by the byte variables 
  494. CurBank        DW    0    ;current selected bank
  495.  
  496. PixelAddress    DW    0    ;pixel vars
  497. PixelSegment    DW    0
  498. PixelSegmentLength DW    0
  499. PixelX        DW    0
  500. PixelY        DW    0
  501. PixelX1        DW    0
  502. PixelY1        DW    0
  503. PixelX2        DW    0
  504. PixelY2        DW    0
  505.  
  506. PlotStepX    DW    0    ;line plot vars
  507. PlotStepY    DW    0
  508. PlotDeltaX    DW    0
  509. PlotDeltaY    DW    0
  510. PlotSlope    DW    0
  511.  
  512. RightX        DW    0    ;flood fill vars
  513. LeftX        DW    0
  514. ScanLeftX    DW    0
  515. ScanRightX    DW    0
  516. FillFlipX1    DW    0
  517. FillFlipX2    DW    0
  518. FillFlipY    DW    0
  519. OldFlipColors    DW    0
  520. PrevStackIndex    DW    0
  521. XYStackIndex    DW    0
  522. XYStackAdj    DW    0
  523. XYStackPeak    DW    0
  524. XYStackFree    DW    0
  525.  
  526. TempChar    DW    0,0,0,0,0,0,0,0  ;temp bitmap text vars
  527. RetValue    DW    0    ;used to ret value in GetMaxMode calls
  528.  
  529. ;---------------------------------------
  530. ;misc byte oriented variables
  531. SeedColor    DB    0
  532. BorderColor    DB    0
  533. ModeXflag    DB    0
  534. LinePixelCount    DB    0
  535. FloodFillFlags    DB    0
  536.         DB    0    ;dummy spare to make even byte count
  537.  
  538. ;---------------------------------------
  539. ;other stuff goes here
  540.  
  541. FILEHANDLE    DW    0
  542. FLOODNAME    DB    'FLOOD.DAT',0
  543.  
  544.     EVEN        ;make sure this starts on word boundry
  545. TempWork    DB 512  DUP(0)    ;general temp working scratch buffer
  546.  
  547. ;======================================================================
  548.  
  549.