Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Pascal Форум Информер Страны мира
   Графика    >>    256colrs
   
 
 SuperVGA - TP 6.0 unit that for 256-color VGA Mode   Steve Madsen 31.10.1992

Here's a unit that does a bit of VGA manipulation. It will grab the palette, set the palette, write the palette to a FractInt-style .MAP file, read back from a .MAP, and produce some basic color fades (red, green, blue, grey).



2k 
 

I have been seeing a heck of a lot of stuff on manipulating the VGA's 256 color palette in ways that are decent (ie. no flicker or snow). Well, I posted my routine to set the palette without flicker on alt.msdos.programmer a few days ago, but these questions keep popping up. So, here's a unit I've been using that I wrote that does a bit of VGA manipulation. It will grab the palette, set the palette, write the palette to a FractInt-style .MAP file, read back from a .MAP, and produce some basic color fades (red, green, blue, grey). Use it, love it, change it, whatever. Just don't claim it as your own because this is PD stuff... As far as doing a fade to black goes, it really doesn't matter what color you fade to. (Note that this is one procedure not in this unit.. haven't gotten to that yet.) Simply tell some procedure the destination RGB values (for black that's 0,0,0) and the number of steps you want it to take (say, 30 changes between normal and faded palettes). Then just figure the step interval for each color in the palette and start doing some subtracting. It shouldn't do too hard, and if I get around to doing it I'll post that code too. But for now here's that unit. (It's called SuperVGA because I'll add higher-res stuff as I get to it.) Sorry it's not too well documented.. I just decided to release to all the netters about two minutes ago. :) -- Steve Madsen Miami University Oxford, OH Internet: sjmadsen@miavx1.acs.muohio.edu