1. Equivelant C routines

Hi.  I am wandering if anyone here can tell be the equivalent c routines to
some euphoria ones.  I'm new to C.  Also what header files need to be
included and what libs to link with.  Here they are:

        get_screen_char()
        put_screen_char()
        clear_screen()

Any help would be appreciated.

new topic     » topic index » view message » categorize

2. Re: Equivelant C routines

>From: stewartml89 at msn.com
>Subject: Equivelant C routines
>
   Stupid Topica unsubscribed me before I answered.
>
>
>Hi.  I am wandering if anyone here can tell be the equivalent c routines to
>some euphoria ones.  I'm new to C.  Also what header files need to be
>included and what libs to link with.  Here they are:
>
>        get_screen_char()
#include <conio.h>
int gettext(int left, int top, int right, int bottom, void *destin);

gets the rectangle bounded by left, top, right, and bottom and puts it in 
destin.

>        put_screen_char()
#include <conio.h>
int puttext(int left, int top, int right, int bottom, void *source);

puts the rectangular region (of left, top, right, bottom)  on the screen.

   Remember that each position takes up two bytes in memory, one for the 
actual character and one for its attributes. Also, text starts at 1, 1 in 
the top-left corner.

>        clear_screen()
#include <conio.h>
void clrscr(void);

clears the screen and places the cursor at 1, 1.
>
>Any help would be appreciated.
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Equivelant C routines

Thanks for the help.


>From: Elliott Sales de Andrade <quantum_analyst at hotmail.com>
>Subject: Re: Equivelant C routines
>
>
>>From: stewartml89 at msn.com
>>Subject: Equivelant C routines
>>
>   Stupid Topica unsubscribed me before I answered.
>>
>>
>>Hi.  I am wandering if anyone here can tell be the equivalent c routines 
>>to
>>some euphoria ones.  I'm new to C.  Also what header files need to be
>>included and what libs to link with.  Here they are:
>>
>>        get_screen_char()
>#include <conio.h>
>int gettext(int left, int top, int right, int bottom, void *destin);
>
>gets the rectangle bounded by left, top, right, and bottom and puts it in 
>destin.
>
>>        put_screen_char()
>#include <conio.h>
>int puttext(int left, int top, int right, int bottom, void *source);
>
>puts the rectangular region (of left, top, right, bottom)  on the screen.
>
>   Remember that each position takes up two bytes in memory, one for the 
>actual character and one for its attributes. Also, text starts at 1, 1 in 
>the top-left corner.
>
>>        clear_screen()
>#include <conio.h>
>void clrscr(void);
>
>clears the screen and places the cursor at 1, 1.
>>
>>Any help would be appreciated.
>>
>
>
>
>TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Equivelant C routines

Can any one tell me the c routines for these euphoria routines:

          graphics_mode()
          pixel()
          display_image()
          polygon()           <-- do i have to write my own for this one?


I would also like to know if there is an easy way to implement sequences in 
C.

Thanks in advance.
sml.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Equivelant C routines

>From: stewartml89 at msn.com
>Subject: Re: Equivelant C routines
>
>
>Can any one tell me the c routines for these euphoria routines:
>
>          graphics_mode()

void textmode(int newmode);

   but i think this only sets text modes, maybe not graphics modes, although 
some of the following constants seem to be for colour graphics modes. Im' 
going by Borland docs for this, so a DOS compiler may have more graphics 
modes.

    /* DOS-compatible modes */

    LASTMODE = -1,
    BW40     = 0,
    C40,
    BW80,
    C80,
    MONO     = 7,
    C4350    = 64,

    /* New Color modes */

    C40X14   = 8,
    C40X21,
    C40X28,
    C40X43,
    C40X50,
    C40X60,

    C80X14,
    C80X21,
    C80X28,
    C80X43,
    C80X50,
    C80X60,

    /* New Black & White modes */

    BW40X14,
    BW40X21,
    BW40X28,
    BW40X43,
    BW40X50,
    BW40X60,

    BW80X14,
    BW80X21,
    BW80X28,
    BW80X43,
    BW80X50,
    BW80X60,

    /* New Monochrome modes */

    MONO14,             /* Invalid VGA mode */
    MONO21,
    MONO28,
    MONO43,
    MONO50,
    MONO60,

    _ORIGMODE = 65      /* original mode at program startup */


>          pixel()
short setpixel(short x, short y);

   could be _setpixel. Sets pixel to current colour.

>          display_image()

  You'll probably have to write this yourself, as display_image() isn't 
built-in either.

>          polygon()           <-- do i have to write my own for this one?
something polygon(int screen, int arraylen, int *xyarray, int colour);

I'm not sure about this one. I've only seen it in some code.

>
>
>I would also like to know if there is an easy way to implement sequences in 
>C.
>

  The closest you can get is an array. You need to malloc() it and realloc() 
it when needed.

>Thanks in advance.
>sml.
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: Equivelant C routines

On Wednesday 08 October 2003 11:54 pm, you wrote:

> From: stewartml89 at msn.com
>
> >Reply-To: EUforum at topica.com
> >To: EUforum <EUforum at topica.com>
> >Subject: Re: Equivelant C routines
> >Date: Wed, 08 Oct 2003 16:53:36 +0100
> >
> >Can any one tell me the c routines for these euphoria routines:
> >
> >          graphics_mode()
>
> void textmode(int newmode);
>
>    but i think this only sets text modes, maybe not graphics modes,
> although some of the following constants seem to be for colour graphics
> modes. Im' going by Borland docs for this, so a DOS compiler may have more
> graphics modes.

This website has a nice description of graphics in C:
http://www.brackeen.com/home/vga/

Irv

new topic     » goto parent     » topic index » view message » categorize

7. Re: Equivelant C routines

Thanks for the help.

>
>This website has a nice description of graphics in C:
>http://www.brackeen.com/home/vga/
>
>Irv

This site is quite good, i'm chicking it out now...

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu