Mail Archives: djgpp/1997/01/19/03:19:50
From: | "Gautam N. Lad" <gautam AT interlog DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Blitting warning under GRX 2.0 using GrBitBlt
|
Date: | 18 Jan 1997 22:47:38 GMT
|
Organization: | InterLog Internet Services
|
Lines: | 47
|
Message-ID: | <5brjua$q1q@news.interlog.com>
|
NNTP-Posting-Host: | ip203-89.cc.interlog.com
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi,
I was pleased with Hartmut Schirmer's reply concerning
getimage() / putimate() equivalent functions under GRX (blitting).
Unfotrunately, since I like my compiles to be Warnings/Errors
free, I have a problem. Here's the snippet I used that Harmut
gave me (I filled in the variables for the x1,y1, and the width,height
that are required for the size of the portion of the screen):
/* Global variables */
GrContext ic;
char *memory[4]; /* 4 is magic */
int planes, planesze, i;
void GetBuf()
{
planes = GrNumPlanes();
planesze = GrPlaneSize(400,175);
for (i=0; i < planes; ++i)
memory[i] = malloc(planesze);
while (i<4) memory[i++] = NULL;
GrCreateContext(420,195, memory, &ic);
GrBitBlt(&ic, 0, 0, NULL, 190,170, 610,365, GrWRITE);
}
And here's the warning I get after compilation:
tb.cpp: In function `void GetBuf()':
tb.cpp:390: warning: ANSI C++ forbids implicit conversion from
`void *' in assignment
Any suggestions?
Bye!
****************************************************
* Gautam N. Lad *
*--------------------------------------------------*
* *
* E-Mail : gautam AT interlog DOT com *
* Website : http://www.interlog.com/~gautam *
* *
* OS/2, DOS/Windows, Graphics Gallery, Software, *
* Links, Rayzor Editor/2, POV-Ray, and more. *
****************************************************
- Raw text -