MD>Does anyone know how to put a red pixel at location 10,30?
MD>am i not being able to do it because graphics.h is screwed up?
HS> Are you using the bgi? If so, don't try custom code. Use the functions
HS> it provides. If, however, you want to do custom graphics. Here are som
HS> functions.
HS> I hope you have a 32bit compiler handy.
HS> #ifdef __DJGPP__
HS> char *vga = NULL;
HS> #endif
HS> #ifdef __WATCOM__
HS> char *vga = (char *) 0x0A0000;
HS> #endif
HS> void setmode(unsigned char mode)
HS> {
HS> #ifdef __WATCOM__
HS> union REGS r;
HS> r.h.al = mode;
HS> r.h.ah = 0x0;
HS> int86(0x10, &r, &r);
HS> #endif
HS> #ifdef __DJGPP_
HS> __dpmi_regs r;
HS> r.h.al = mode;
HS> r.h.ah = 0x0;
HS> __dpmi_int(0x10, &r);
HS> __djgpp_nearptr_enable()
HS> vga = (char *)(0xA0000 + djgpp_conventional_base);
HS> #endif
HS> };
HS> void putpixel(int x, int y, int c)
HS> {
HS> vga[y*320+x]=c;
HS> };
HS> int getpixel(int x, int y)
HS> {
HS> return vga[y*320+x];
HS> };
hm. I'm inquiring from the source that I need DJGPP
i want the equivelant of this in Qbasic.
pset(10,30),10
in C++ borland ver3 for DOS.
... "I've smoked since I was five; mother insisted." -- Gomez Addams
--- Telegard v3.09.g1/mL
---------------
* Origin: INFINITE DARKNESS NODE 2 - Fort Lauderdale, FL (1:369/23)
|