gee that looks so familiar, i just haven't touched it in 15 years
i'm not positive but it looks like you are reading older code samples, possibly borland c++. this looks like error checking when setting graphic mode (like when using *.bgi drivers...).
yes, it is a turbo c code. The code is the interface software for a pc based oscilloscope i'm currently studying. Quite complicated.
15 YEARS!!!???, wow you've been around for quite some time. :lol:
Thanks for the info. Now things are getting a bit clearer. what does the grOK expression do? It's the one that confuses me the most.
I'll appreciate any link to graphics programming in c.
Thanks for the info. Now things are getting a bit clearer. what does the grOK expression do? It's the one that confuses me the most.
I'll appreciate any link to graphics programming in c.
I would imagine it's simply a constant?, used to check for a "Graphics Error" - graphics OK.
I can't help in C, as I never use it, but DOS based graphics programming is VERY complicated, because of the large number of completely different graphics cards. The idea of the Borland graphics libraries is to give a standard interface across the supported types, and it generally works pretty well.
Those are just functions from the borland graphics interface.
A crappy and slow set of graphics functions included into all the old borland compilers for dos (pascal & c(++))
not recommended for writing new programs for dos...
accessing video memory directly is MUCH faster, not difficult and safe enough - all dos games did it, and they ran fine (better then windows?)
The itoa(), getch(),... funtions are part of the standard C libraries.
you should be able to find info on google about those...
@ Nigel: The BGI interface never had any real use, it only supported lower resolutions (320*200*8bit - 640*480*4bit), in these modes all video cards act the same. It's only for higher resolutions that cards act diffirent.
It was a nice interface if you wanted to write something quick and didnt have time to write your own set of routines, but when speed was required BGI falls to its knees ...
@ daniel: grOk is just a value from a enum, not a class reference, thats something completely diffirent..