GRAPHIC INTERFACE (deskto , explorer , ... ) how can i do th

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
_markus_

GRAPHIC INTERFACE (deskto , explorer , ... ) how can i do th

Post by _markus_ »

...

thx , Markus
Tom Fritz

RE:GRAPHIC INTERFACE (deskto , explorer , ... ) how can i do

Post by Tom Fritz »

It's not easy....as with all coding, but here is a old and graph init and putpixel ( fast )

int in13h;

void Set13h() // init graph 13h ( 320x300x256 )
{
   asm mov ax, 13h
   asm int 10h

   in13h = 1;
}

void SetTCGraph() // int graph 640x480x16 ( TC's graphics.h needed )
{
       /* request auto detection */
     int gdriver = DETECT, gmode, erro

     /* initialize graphics mode */
     initgraph(&gdriver, &gmode, "");
}

void PutPixel13h() // for putting pixels in 13h mode...if used TC's lib...
// use putpixel();
{
    if ( in13h = 1 )
    {
     asm{
     mov ax, VGA
     mov es, ax
     mov bx, [posx]
     mov dx, [posy]
     mov di, bx
     mov bx, dx
     shl dx, 8
     shl bx, 6
     add dx, bx
     add di, dx
     mov al, [pixcolor]
     stosb
     }
     }

  else printf( "Not In 13h Mode\n" );
}
sg

that's real not simple - but why does my compiler find 7 err

Post by sg »

...
thx , Markus
Tom Fritz

RE:GRAPHIC INTERFACE (deskto , explorer , ... ) how can i do

Post by Tom Fritz »

change this line
int gdriver = DETECT, gmode, erro

to

int gdriver = DETECT, gmode;

try that, and tell me what the errors are...(you need TC or TC++ to compile/link)
sg

now only 6 errors

Post by sg »

ok , that are the errors my compiler(TC++) finds:

   72: Declared Syntax error
   80: Unterminated string or character constant
   80: Character constant too long
   88: Unterminated string or character constant
   88: Character constant too long
   89: Declared Syntax error

  ( compiled with TC++ )
Tom Fritz

RE:now only 6 errors

Post by Tom Fritz »

did you #include <graphics.h>

?

also...c/p the lines that have errors AFTER trying including <graphics.h>
carbonBased

RE:now only 6 errors

Post by carbonBased »

With all due respect, if you can't get a grasp on BGI, how do you intend to write an operating system?

Also of note, BGI is (c) Borland.  I don't know that you can write an open source OS with it, let alone a commercial one (does anybody know for sure)?

Cheers,
Jeff
Post Reply