]> 4ch.mooo.com Git - 16.git/blobdiff - 16/x_/modex.pas
wwww
[16.git] / 16 / x_ / modex.pas
diff --git a/16/x_/modex.pas b/16/x_/modex.pas
new file mode 100755 (executable)
index 0000000..7d9d26e
--- /dev/null
@@ -0,0 +1,194 @@
+(*\r
+   Turbo Pascal interface to the MODEX library\r
+   Copyright (c) 1993,1994 by Alessandro Scotti\r
+*)\r
+unit ModeX;\r
+interface\r
+\r
+const\r
+  (* Video modes *)\r
+  MX_TEXT       = 0;\r
+  MX_320x175    = 1;\r
+  MX_320x200    = 2;\r
+  MX_320x240    = 3;\r
+  MX_320x350    = 4;\r
+  MX_320x400    = 5;\r
+  MX_320x480    = 6;\r
+  MX_360x175    = 7;\r
+  MX_360x200    = 8;\r
+  MX_360x240    = 9;\r
+  MX_360x350    = 10;\r
+  MX_360x400    = 11;\r
+  MX_360x480    = 12;\r
+  MX_400x600    = 13;\r
+\r
+  (* Fade effects *)\r
+  MX_FADEIN     = 0;\r
+  MX_FADEOUT    = 1;\r
+\r
+  (* Raster ops *)\r
+  OP_SET        = 0;\r
+  OP_AND        = 1;\r
+  OP_OR         = 2;\r
+  OP_XOR        = 3;\r
+  OP_TRANS      = 4;\r
+  OP_ADD        = 5;\r
+  OP_MOVE       = 0;                    (* Alias for OP_SET *)\r
+\r
+procedure mxBitBlt( SX, SY: integer; Width, Height: word; DX, DY: integer );\r
+procedure mxCircle( CX, CY: integer; Radius: word; Color: byte );\r
+procedure mxChangeMode( Mode: word );\r
+procedure mxColorToGray( ColorPalette, GrayPalette: pointer; Count: word );\r
+procedure mxFadePalette( Palette: pointer; Cmd, Start, Count, R, G, B: word );\r
+procedure mxFillBox( X, Y: integer; Width, Height: word; Color: byte; Op: word );\r
+procedure mxGammaCorrect( ColorPalette, GammaPalette: pointer; Count: word );\r
+procedure mxGetAspect( var AspectX, AspectY: word );\r
+function  mxGetClipRegion( var X1, Y1, Width, Height: word ): boolean;\r
+function  mxGetClip: boolean;\r
+procedure mxGetImage( Image: pointer; X, Y: integer; Width, Height: word );\r
+procedure mxGetPalette( Palette: pointer; Start, Count: word );\r
+function  mxGetPixel( X, Y: word ): byte;\r
+procedure mxGetScreenSize( var Width, Height: word );\r
+procedure mxGetTextStep( var DeltaX, DeltaY: integer );\r
+function  mxGetVersion: word;\r
+procedure mxGetVirtualScreen( var Width, Height: word );\r
+procedure mxInit;\r
+procedure mxLine( X1, Y1, X2, Y2: integer; Color, Op: word );\r
+procedure mxOutChar( X, Y: integer; C: char );\r
+procedure mxOutText( X, Y: integer; S: pointer );\r
+procedure mxPan( X, Y: word );\r
+procedure mxPutImage( Image: pointer; X, Y: integer; Width, Height, Op: word );\r
+procedure mxPutPixel( X, Y: word; C: byte );\r
+procedure mxPutTile( Tile: pointer; X, Y: integer; Width, Height: word );\r
+procedure mxReadPlane( Plane: byte );\r
+procedure mxRotatePalette( Palette: pointer; Count: word; Step: integer );\r
+procedure mxRowAddress( RowAddress: byte );\r
+function  mxSetClip( Clip: boolean ): boolean;\r
+procedure mxSetClipRegion( X1, Y1, Width, Height: word );\r
+procedure mxSetColor( Index, R, G, B: word );\r
+procedure mxSetFont( Font: pointer; Width, Height: word );\r
+procedure mxSetMode( Mode: word );\r
+procedure mxSetPalette( Palette: pointer; Start, Count: word );\r
+procedure mxSetTextColor( Color, Op: word );\r
+procedure mxSetTextStep( DeltaX, DeltaY: integer );\r
+procedure mxSetVirtualScreen( Width, Height: word );\r
+procedure mxStretchImage( Image: pointer; X, Y: integer; Width, Height, NewWidth, NewHeight, Op: word );\r
+procedure mxSplitScreen( Line: word );\r
+procedure mxStartAddress( StartAddress: word );\r
+procedure mxStartLine( Line: word );\r
+procedure mxTerm;\r
+procedure mxTransPutTile( Tile: pointer; X, Y: integer; Width, Height: word );\r
+procedure mxWaitDisplay;\r
+procedure mxWaitRetrace;\r
+procedure mxWriteMode( Mode: byte );\r
+procedure mxWritePlane( Plane: byte );\r
+\r
+procedure mxFillPoly( Count: word; var Map, Points; Color: word );\r
+procedure mxGouraudPoly( Count: word; var Map, Points, Colors; BaseColor: word );\r
+procedure mxTexturePoly( Count: word; var Map, Points, ImgPoints, Texture; Width: word );\r
+\r
+procedure mxOutStr( X, Y: integer; S: string );\r
+\r
+implementation\r
+\r
+procedure mxBitBlt;                                             external;\r
+procedure mxChangeMode( Mode: word );                           external;\r
+procedure mxCircle;                                             external;\r
+procedure mxColorToGray;                                        external;\r
+procedure mxFadePalette;                                        external;\r
+procedure mxFillBox;                                            external;\r
+procedure mxGammaCorrect;                                       external;\r
+procedure mxGetAspect( var AspectX, AspectY: word );            external;\r
+function  mxGetClipRegion;                                      external;\r
+function  mxGetClip: boolean;                                   external;\r
+procedure mxGetImage;                                           external;\r
+procedure mxGetPalette( Palette: pointer; Start, Count: word ); external;\r
+function  mxGetPixel( X, Y: word ): byte;                       external;\r
+procedure mxGetScreenSize( var Width, Height: word );           external;\r
+procedure mxGetTextStep( var DeltaX, DeltaY: integer );         external;\r
+function  mxGetVersion: word;                                   external;\r
+procedure mxGetVirtualScreen( var Width, Height: word );        external;\r
+procedure mxInit;                                               external;\r
+procedure mxLine( X1, Y1, X2, Y2: integer; Color, Op: word );   external;\r
+procedure mxOutChar( X, Y: integer; C: char );                  external;\r
+procedure mxOutText( X, Y: integer; S: pointer );               external;\r
+procedure mxPan( X, Y: word );                                  external;\r
+procedure mxPutImage;                                           external;\r
+procedure mxPutPixel( X, Y: word; C: byte );                    external;\r
+procedure mxPutTile;                                            external;\r
+procedure mxReadPlane( Plane: byte );                           external;\r
+procedure mxRotatePalette;                                      external;\r
+procedure mxRowAddress( RowAddress: byte );                     external;\r
+function  mxSetClip( Clip: boolean ): boolean;                  external;\r
+procedure mxSetClipRegion( X1, Y1, Width, Height: word );       external;\r
+procedure mxSetColor( Index, R, G, B: word );                   external;\r
+procedure mxSetFont( Font: pointer; Width, Height: word );      external;\r
+procedure mxSetMode( Mode: word );                              external;\r
+procedure mxSetPalette( Palette: pointer; Start, Count: word ); external;\r
+procedure mxSetTextColor( Color, Op: word );                    external;\r
+procedure mxSetTextStep( DeltaX, DeltaY: integer );             external;\r
+procedure mxSetVirtualScreen( Width, Height: word );            external;\r
+procedure mxSplitScreen( Line: word );                          external;\r
+procedure mxStartAddress( StartAddress: word );                 external;\r
+procedure mxStartLine;                                          external;\r
+procedure mxStretchImage;                                       external;\r
+procedure mxTerm;                                               external;\r
+procedure mxTransPutTile;                                       external;\r
+procedure mxWaitDisplay;                                        external;\r
+procedure mxWaitRetrace;                                        external;\r
+procedure mxWriteMode( Mode: byte );                            external;\r
+procedure mxWritePlane( Plane: byte );                          external;\r
+\r
+procedure mxFillPoly;                                           external;\r
+procedure mxGouraudPoly;                                        external;\r
+procedure mxTexturePoly;                                        external;\r
+{$L MXPB}\r
+{$L MXPF}\r
+{$L MXPG}\r
+{$L MXPT}\r
+\r
+{$L MXBB}\r
+{$L MXCC}\r
+{$L MXCG}\r
+{$L MXCL}\r
+{$L MXCR}\r
+{$L MXFB}\r
+{$L MXFP}\r
+{$L MXGI}\r
+{$L MXGM}\r
+{$L MXGP}\r
+{$L MXGV}\r
+{$L MXHL}\r
+{$L MXIT}\r
+{$L MXLN}\r
+{$L MXOT}\r
+{$L MXPI}\r
+{$L MXPN}\r
+{$L MXPP}\r
+{$L MXRA}\r
+{$L MXRP}\r
+{$L MXSA}\r
+{$L MXSC}\r
+{$L MXSI}\r
+{$L MXSL}\r
+{$L MXSM}\r
+{$L MXSP}\r
+{$L MXSS}\r
+{$L MXTL}\r
+{$L MXVS}\r
+{$L MXWD}\r
+{$L MXWM}\r
+{$L MXWP}\r
+{$L MXWR}\r
+\r
+(*\r
+   Prints a Turbo Pascal string.\r
+   Note: BP 7.0 supports ASCIIZ strings (PChar type).\r
+*)\r
+procedure mxOutStr;\r
+begin\r
+  S := S + #0;\r
+  mxOutText( X, Y, @S[1] );\r
+end;\r
+\r
+end.\r