delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/03/04/07:45:41

From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Help with textcolor and ScreenGetCursor?
Date: 4 Mar 2003 10:33:42 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 31
Message-ID: <b41ve6$sta$1@antares.lu.erisoft.se>
References: <b41s53$1al$1 AT newsg2 DOT svr DOT pol DOT co DOT uk>
NNTP-Posting-Host: lws256.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Graham Rounce (graham AT rounce DOT freeserve DOT co DOT uk) wrote:
: Can anyone please tell me why textcolor isn't working, and ScreenGetCursor
: seems to return y and y instead of x and y?

: The prog below prints "hello" 16 times all in the same color, then "11 11".

:        #include <stdio.h>
:        #include <pc.h>

:        main() {
:                int i,*x,*y;

x and y point anywhere.

:                for (i=0;i<16;i++) {
:                        textcolor(i);
:                        printf("\nhello");
:                }

:                ScreenSetCursor(5,11);
:                ScreenGetCursor(x,y);

Here you let ScreenGetCursor() overwrite whatever x and y point to.

:                printf("%d %d",*x,*y);
:        }


Right,

					MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019