From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: Some Allegro questions (Shawn?) Date: 5 Mar 1997 15:24:24 GMT Organization: Oxford University Lines: 131 Message-ID: <5fk378$kaa@news.ox.ac.uk> References: <5fdsds$p42 AT freenet-news DOT carleton DOT ca> <5fj3dn$e3u AT freenet-news DOT carleton DOT ca> NNTP-Posting-Host: mc31.merton.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Paul Derbyshire (ao950 AT FreeNet DOT Carleton DOT CA) wrote: : Shawn Hargreaves (Shawn AT talula DOT demon DOT co DOT uk) writes: : > Paul Derbyshire writes: : >>* Why, when using a SVGA mode e.g. GFX_AUTODETECT 640x480, does a : >> fade_in(palette) or a fade_out() seem to do 4 fades in series instead of : >> just 1? Fades work as expected in GFX_MODEX. Is it a bug or a "feature"? : > : > It's a bug. Whether yours or mine, I don't know, though :-) Does this : > happen with any of my test progs, eg. the demo game? (that does a lot of : > pallete fades). When reporting bugs, it's helpful if you can say which, : > if any, of my examples demonstrate the problem: then I know which bit of : > my code is likely to be at fault, or whether the routines are just being : > used wrongly... : > : > In this case, two possibilities spring to mind. Are you sure the palette : > is in the right format, ie. you haven't confused the 0-63 color format : > with a 0-255 range? : There are two formats? I've just seen one in all the allegro docs... the : PALLETE and RGB pair. What Shawn is referring to is the fact that the VGA hardware only recognises 64 levels of red, green and blue, while some graphics systems (e.g. Windows IIRC) use numbers from 0 to 255 for these values. As a simple test, try running this: #include int main(void) { int c; RGB rgb; allegro_init(); set_gfx_mode(GFX_AUTODETECT,320,200,320,200); for (c=63;c>=0;c--) { vsync(); rgb.r=rgb.g=rgb.b=c; set_color(0,&rgb); } return 0; } The screen should go white, and fade to black once only. Try other resolutions and try specifying drivers by GFX_* constant, rather than autodetecting. : VESA2L requires that I find a f*cking video driver that doesn't whine : about money and die after 21 days. Did these video companies ever discover : that the world has students in it? Have they ever seen, let alone paid : for, a tuition? : I haven't a clue what's autodetected. Since I have an S3 video card, I : would assume it autodetects S3. Since I don't have a vesa driver, no : thanks to power and money hungry people who obviously don't seem to adhere : to the GNU/FSF philosophy, I doubt it's any driver whose name involves : "VESA" or "VBE". Your point of view here really disturbs me; since we disagree so vehemently, I'm not going to bother presenting my view here. I hope I never see you charging for your work, though (computer software or otherwise). : (What is "VBE" anyways? VESA is Video something Standard something I guess.) VBE = VESA BIOS Extensions. : >>* What functions in allegro are typically inlined? : > : > Load up allegro.h and search for "inline". There's a lot of them, but : > most are just wrappers to implement the indirection via bitmap vtables : > (a slightly roundabout approach that results from the fact that C : > doesn't provide virtual functions). : Virtual functions? Look through the Allegro source code; Shawn's techniques should be more understandable than a brief text description would be. : >>* Do you know where UniVBE 5.1 can be obtained? : >> It seems to be the most up-to-date version that DOESN'T cripple itself : >> after 21 days. : > : > I have no idea, and I wouldn't tell you if I did. The reason it disables : > itself is that you are supposed to pay for it, because SciTech are : > trying to make a living from their work. : Then, where can one obtain a FREE vesa 2.0 driver? I'm not exactly made of : money. In fact not only do I live on a student budget, but I am more broke : as of a week ago than usual even. Besides, to order that sort of crap you : need a credit card and/or snail mail access. With this income I don't have : a credit card. Without snail mail access I can't mail money orders. Several points: 1) UniVBE hardly breaks the bank, and is a great asset. 2) Perhaps whatever you did a week ago wasn't such a good idea. 3) Surely it's not that far to the post box? 4) Maybe you should complain to your video hardware manufacturer that it doesn't do VESA 2 internally. : This wasn't a crash; I ran it with a breakpoint, then inspected some : variables, edited, and recompiled. Is there any way to call allegro_exit : after such a thing without having to run the program all the rest of the : way through? Switch back to the running program and press CTRL-ALT-END (if you've installed Allegro's keyboard handler). Or, write a quick program that initialises Allegro and its subcomponents, then exits immediately. : >>Also, using an S3, and lacking a non-crippled UniVBE supporting Vesa 2.0, : >>is it possible to get a "modex" mode 320x240 that is not limited to 256 k? : > : > The easy solution is to register UniVBE: I can't recommend it highly : > enough. : If you tell me a way I can quickly get fifty-some-odd bucks and then : teleport it to their sales department, sure. Sure... it's really simple. This is not a scam. Send $1 to each of the following addresses, and you'll get $50,000 within a week.... ;) As for the teleporting... can't help you there. -- George Foot Merton College, Oxford.