{=====================================================} {=== GRAPHICS.TPU Written By Franz-Josef Ayestaran ===} {=====================================================} { *** Public Variables *** } { ************************ } var iconpalette : array[0..15] of byte; PlaneSize : byte; bitmap,virtualiconxy : pointer; icons : array[1..9,1..50*50] of byte; bitmap_width,bitmap_height,bitmap_bits,avifileposition:word; const Mode1Addr : pointer=ptr($a000,0); { *** Public Procedures / Functions *** } { ************************************* } { 'Graphic_mode' variable requires of 1-4 } { (256Col) 1:320x200 2:640x480 3:800x600 4:1024x768 } { (16Col) 5:640x480 } { Modes 2-4 may need setting according to } { the graphics card installed in the PC } {*** Init Routines ***} {*********************} Procedure asmInitGraphics(graphic_mode:byte); Procedure AsmCloseGraph; procedure AsmRetrace; procedure AsmCopyScreen(source,dest:word); procedure AsmCopybytes(source,dest,amount:word); procedure AsmCopywords(source,dest,amount:word); procedure AsmClsUser(colour:byte;amount:word;where:word); {*** Cut & Paste ***} {*******************} procedure GetImageUser(x1,y1,x2,y2:integer;source:word); procedure PutImageUser(x,y:integer;mode:byte;dest:word); {*** Files Routines ***} {**********************} procedure Load320Image(filename:string;addr:pointer;size:word); procedure Save320Image(filename:string;addr:pointer;size:word); procedure Load256Palette(filename:string); procedure Save256Palette(filename:string); Procedure Load_graphic_modes(filename:string); Procedure Save_Graphic_Modes(filename:string;mode2,mode3,mode4:word); Procedure bitmap_information; function authentic_bitmap(filename:string; graphic_mode : byte):boolean; Procedure Load_Bitmap_Palette(filename:string); Procedure Load_Bitmap(Filename : string; graphic_mode : byte); Procedure Load_Avi_Palette(filename:string); procedure play_avi_movie(xpos,ypos:integer;filename:string); {*** Icon Routines ***} {*********************} Procedure InitVirtualIcon(filename:string); procedure FreeVIconMem; Procedure load_Icons(Filename:string); Procedure PutVirtualIcon(Xpos, Ypos : integer); Procedure PutIcon(Icon_No, Xpos, Ypos : integer); {*** Drawing Routines ***} {************************} Procedure AsmPutPixel(x,y:word;colour:byte); procedure AsmPutPixelUser(x,y:word;colour:byte;where:word); function AsmGetPixel(x,y:word):byte; Procedure Line_(xs,ys,xe,ye:integer;colour:byte); Procedure Lineuser(xs,ys,xe,ye:integer;colour:byte;where:word); procedure Rectangle_(x1,y1,x2,y2:integer;colour:byte); procedure Rectangleuser(x1,y1,x2,y2:integer;colour:byte;where:word); Procedure Circle_(x,y:integer;mag:real;colour:byte); Procedure Circleuser(x,y:integer;mag:real;colour:byte;where:word); Procedure PuTFill(Startx,Starty,EndX,EndY:word;colour:byte); Procedure PuTFilluser(Startx,Starty,EndX,EndY:word;colour:byte;where:word); Procedure Horizlineuser(x1,x2,y:word;colour:byte;where:word); Procedure Polyuser(x1,y1,x2,y2,x3,y3,x4,y4:integer;colour:byte;where:word); procedure GetFont(var FontSeg,FontOfs : word); procedure OutTextXYuser(XPos,YPos:word;Colour:byte;ScreenText:string;where:word); {*** Palette Routines ***} {************************} Procedure ClearPalettearray; Procedure AsmInitPalette; procedure PaletteGraph(graphic_mode:byte); procedure PaletteGraphuser(x,y,row,column,square_size,pitch:byte;where:word); Procedure FadeOut(time:word); Procedure FadeIn(time:word); Procedure SetRGB(colour,red,green,blue:byte); Function GetRed(Colour:byte):byte; Function GetGreen(Colour:byte):byte; Function GetBlue(Colour:byte):byte; Procedure AsmSetDirectRGB(Colour,red,green,blue:Byte); Function AsmGetDirectRed(Colour:Byte):byte; Function AsmGetDirectGreen(Colour:Byte):byte; Function AsmGetDirectBlue(Colour:Byte):byte; Procedure Shift_Palette_One(first_colour,last_colour:byte;direction:boolean); procedure Dump_palette(graphic_mode:byte); procedure Dump_Paletteuser(graphic_mode:byte;where:word); Procedure RGBW_palette; Procedure shade_palette(red,green,blue:byte); {*** Misc Routines ***} {*********************} procedure progress(x,y,boxes,square_size,first,last, current,foreground,background:integer); Procedure rotate_horizuser_one(ystart,yend:word;direction,shift:boolean;where:word); procedure pan320(Xs,Ys:integer); procedure menubar(where:word); { ************************************* }