Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Исходники Форум Информер Страны мира
   Графика    >>    xlibp202
   
 
 XLIB v2.02 - Graphics Library for Turbo Pascal 7.0   Tristan Tarrant 26.01.1995

Графическая библиотека для X-Mode режимов. Поддерживает 17 графических режимов от 320x200x256 до 400x300x256, виртуальные экраны, фонты 8x8 и 8x14, page flipping, множество графических примитивов, синхронизацию с разверткой, сжатие и архивирование, чтение и сохранение файлов GIF/BMP.
This is a port to Turbo/Borland Pascal of XLib Library for C from Themie Gouthas.



347k 
 

+---------------------------------------------------------------+ | | | XLIB v2.02 - Graphics Library for Borland/Turbo Pascal 7.0 | | | | Tristan Tarrant - tristant@cogs.susx.ac.uk | | | +---------------------------------------------------------------+ | | | Credits | | | | Themie Gouthas | | | | Matthew MacKenzie | | | | Tore Bastiansen | | | | Andy Tam | | | | Douglas Webb | | | | John Schlagel | | | +---------------------------------------------------------------+ | | | I informally reserve all rights to the code in XLIB | | Rights to contributed code is also assumed to be reserved by | | the original authors. | | | +---------------------------------------------------------------+ +---------------------------------------------------------------+ | DISCLAIMER | +---------------------------------------------------------------+ This library is distributed AS IS. The author/s specifically disclaim any responsibility for any loss of profit or any incidental, consequential or other damages. +---------------------------------------------------------------+ | IMPORTANT NOTICE | +---------------------------------------------------------------+ Hi Xlib users, this is v2.02 of my port of XLib to Turbo/Borland Pascal. I would like to state a few things before you start using this package : I have ported all the useful stuff from Xlib for C v6.0, and added a few things of my own, apart from cleaning up the code and making it more Pascal-friendly. If there is any code you have written that you think is worth including in the next release, don't hesitate to send it to me and you will receive due credit. I have had a look at the new Xlib for C (6.11+) and the only addition it has is support for Windoze. What a pile o' shit. I am not going to add that feature (bug?) in Xlib for TP/BP. Sorry if this isn't up to your expectations but, hey, don't forget : XLIB is a user supported library, so send me your code and let's write the ultimate XMode game !!! Share and enjoy. +----------------------------------------------------------------+ | INTRODUCTION | +----------------------------------------------------------------+ XLIB is a "user supported freeware" graphics library specifically designed with game programming in mind. It has been placed in the public domain for the benefit of all, and represents *MANY* hours of work so it is requested that all users comply with the the wishes of the author/s as specified in the individual modules and: a) To leave the code in the public domain b) Not distribute any modified or incomplete versions of this library New contribution and comments are welcome and hopefully there will be more releases as the code evolves. Finally, do not trust this excuse for a manual if in doubt, as this code has undergone several revisions. The place to get the answers is in the code itself. +----------------------------------------------------------------+ | REQUIREMENTS | +----------------------------------------------------------------+ Minimum requirements 386 processor, VGA, Borland/Turbo Pascal v7.0 +----------------------------------------------------------------+ | GENERAL FEATURES | +----------------------------------------------------------------+ Support for a number of 256 colour tweaked graphics mode resolutions : 320x200 320x240 360x200 360x240 376x282 320x400 320x480 360x400 360x480 360x360 376x308 376x564 256x200 256x240 256x224 256x256 360x270 400x300 Please note that some of these resolutions best suit monitors with adjustable vertical height. Virtual screens larger than the physical screen (memory permitting) that can be panned at pixel resolution in all directions A split screen capability Text functions supporting 8x8 and 8x14 ROM fonts and user defined fonts Support for page flipping Graphics primitives such as line and rectangle drawing functions and of course bit block manipulation functions Virtual VSync Handler Compression and archiving GIF/BMP loading and saving +----------------------------------------------------------------+ | BUILDING THE LIBRARIES | +----------------------------------------------------------------+ To compile XLIB use the provided makefile. Just put all of the XLIB files in the same directory and type MAKE at the DOS prompt. This will build all the libraries and examples. If Borland Pascal isn't in your path just edit the makefile where indicated. BP 7.0 and TASM are required to compile the libraries. If you want to make units with full debug information, compile with MAKE -DDEBUG To make the DPMI versions of the units, compile with MAKE -DDPMI To make the help (XLIB2.TPH) file you need ScanHelp. I used version 3.26. MAKE HELP +----------------------------------------------------------------+ | USING THE LIBARY WITH YOUR PROGRAMS | +----------------------------------------------------------------+ Using the XLIB library in your programs is simple. Just include the XLIB units in the uses statement at the beginning of your program which will make all the procedures and functions composing the XLIB library available. +---------------------------------------------------------------+ | BUGS AND REVISIONS | +---------------------------------------------------------------+ The SplitScreen routines weren't handled by the Virtual VSync handler, sometime resulting in the program waiting twice for a vsync, and causing a choppy effect when scrolling the split screen. Now the mouse handler uses the VVH to redraw the pointer when necessary. Unfortunately it takes a bit too long and, if you are updating the whole palette AND using the mouse at the same time, you'll notice that the tip of the pointer disappears for an instant when it's at the top of the screen. The palette-updating part of the VVH has been sped up a bit. I have implemented 32-bit compiled bitmaps, even though they are bigger and (on my machine) slightly slower than normal CBMs. Maybe on VLB/PCI machines this isn't the case. Protected mode is still at an experimental stage, but it can do quite a few things already. Things that don't work (or are a bit odd) in protected mode are : - The Virtual VSync handler (self-modification works, but the rest doesn't) - VBM's on my machine are faster in pmode (??!?!?!) - I assume that the ROM font is at segment 0C000h because that's where the Video BIOS usually is. I have tested it on a Paradise (WD90c30), a Cirrus Logic (CL-54xx) and a Trident (9000i) with no problems. If you find some board that doesn't work please report it (though I don't know why you'd want to use ROM BIOS fonts anyway :-) - The palette scrolling in the XLIBDEMO is tooooooo slow... If you find a way of fixing these, or if you find more routines that don't like protected mode, email me please. Release v2.01 XConvert was broken. Fixed. XLArc and XLA2 were broken in DPMI. Fixed. Added file viewing in XLArc. If you want to know how to do CBMs in DPMI, read BLITDEMO.PAS. Makefile fixed. Bugfixes here and there. Release v2.02 Fixed clipping code. Now all clipping routines should not crash when displaying bitmaps that were allocated in areas of memory other than the data segment. +---------------------------------------------------------------+ | NOTES | +---------------------------------------------------------------+ A good idea for debugging programs that use XLib is to use Colin Buckley's UNCHAIN v2.1 program. The code for saving the screen information is built in the xsetmode function, but if you don't use UNCHAIN it should not make any difference. +---------------------------------------------------------------+ | APPLICATIONS THAT USE XLIB FOR TP/BP | +---------------------------------------------------------------+ I have decided to start a list of applications that have been written using a version of XLibPas, and where they can be found. Please mail me any additions. Chromatiks - The world's first multi-group music disk. Coordinated by Trixter (Jim Leonard). Site : wasp.eng.ufl.edu Directory : /pub/msdos/demos/music/disks Filename : chromat*.zip WadManager v1.50 - A GUI WAD manager for DOOM. Written by Tristan Tarrant. Site : infant2.sphs.indiana.edu Directory : /pub/doom/misc Filename : wm150.zip +---------------------------------------------------------------+ | CREDITS AND THANKS | +---------------------------------------------------------------+ Michael Abrash - The guy who started it all in the first place Themie Gouthas - The original maintainer of the XLIB for C library Matthew McKenzie - Compiled blits, circles and clipping. What more could I say Tore Bastiansen - For the Virtual VSync handler : a true masterpiece Andy Tam - For the LZS encoding/decoding routines Douglas Webb - For collecting loads of compression algorithms John Schlagel - For the bitmap scaling code iD Software - For giving me inspiration for XLAs Jim Leonard - For beta-testing this beast Colin Buckley - For his UNCHAIN program which made debugging hours so much easier Kai Rohrbacher - Author of ANIVGA for including so many fonts in his most excellent library Paul Silver and Aarron Shaughnessy - For letting me test this code on their machines Borland - For their excellent compiler suite Anybody on USENET who sent me suggestions