Introduction: The VGAKIT.OBJ - file is created to add a new graphics- mode to your TP (or why not TC) applications. It implementes a few graphic-routines for an un-standard mode 320 x 400 x 256. It features 2 screens. ****************************************************************************** The usage of each command: Set320by400mode ------------------------------------------------------------------------------ Sets up the graphic mode and clears the screen. Textmode ------------------------------------------------------------------------------ Closes the graphics green and returns to normal screen. Putpixel(x,y,c,not) ------------------------------------------------------------------------------ Puts a pixel to graphic screen in coordinate x,y with colour c. Also if the colour c = not then the pixel is not drawn. Getpixel(x,y) ---------------------------------------------------------------------------- A function that returns with the pixel colour in coordinate x,y Cline(x1,y1,x2,y2,c) ------------------------------------------------------------------------------ Draws a line from x1,y1 to x2,y2 with colour c Rectangle(x1,y1,x2,y2) ------------------------------------------------------------------------------ Draws a rectangle from x1,y1 to x2,y2 with current colour Setcolor(c) -------------------------------------------------------------------------- Sets the colour with c. ( look Rectangle ) Showpage(p) -------------------------------------------------------------------------- Shows page 0 ,if p = 0 ; these two Shows page 1 ,if p <> 0 ; commands make it possible ; to achieve animation Procpage(p) ; without flickering -------------- ; Processes page 0 ,if p = 0 ; Processes page 1 ,if p <>0 ; Txy(x,y,c) ------------------------------------------------------------------------- Writes a string 'lame simulation v1.0' to the screen beginning at coordinate x,y with colour c (This is because the routine for writing text is almost ready ,but not quite... all the letters and routines are ready. ) Tpd(x,y,digit) ---------------------------------------------------------------------- Writes the value of digit to the screen beginning from coordinate x,y with colour c. Writes the value in hexadesimal word-lenght ,ie. Tpd(10,10,15) would write '000f'.... Startadd(y) -------------------------------------------------------------------------- Alters the start row of the screen drawing... y can get values 0-399. Makes smooth vertical scrolling possible. Though the screen flickers ,I is because the routine doesn't wait the screen to draw... That's also ready but it's a bit slower... I can make it with a turn of my hand ,so if you want it ,just ask.... Xpan(x) ---------------------------------------------------------------------- When ready, this scrolls the screen vertically.... setRGBpalette(c,r,g,b) ----------------------------------------------------------------------- Sets the palette values for colour c , first comes Red ,then Green and finally Blue. rotateRGB(s) --------------------------------------------------------------------------- rotates the colours 1-255 with speed s. s is a positive value that can be divided with 3 ,ie. s = 3,6,9,12,15,18..... fade(a,b) ------------------------------------------------------------------------ fades the colours a-b to black and then returns. ALL the colours must be defined before that with setRGBpalette. That is because the routine doesn't directly fade the values but reads them from a table etc.... If you get what I mean.... Check the examples... ------------------------------------------------------------------------------ Read this: As you can see, the routines aren't user-friendly. That means that you can give them "illegal" values and they may go berserk. For instance, the x and y coordinate can be given wrong and the result may be shit on the screen or something. Also you can give illegal values for many things... So watch it! The reason for this is that these routines are optimized for speed ,not user friendly- multipurposes that are slow but flexible. The other reason is that is such a drag to program all sorts of checkers for values... (lazyness...) though the main reason is the speed. Have fun with these routines. If you find bugs (you will!) or something to suggest etc. , don't hesitate to contact me. (C) MCMXCIII by Antti Kangas Email: scorpion@phoenix.oulu.fi @zombie.oulu.fi gigolo@otitsun.oulu.fi Home address: Kalliotie 18 a 27 90500 Oulu Finland