TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JABO
from: KURT KUZBA
date: 1998-03-21 01:30:00
subject: VESATEST.CPP 2/3

J>   i use Turbo C++ 3.0.  would you be able to upload those onto the
J>   message? (attach)   maybe it was when i was copying them, the
J>   errors occured?!
J>   the errors were
J>   void GraphicsScreen::PutPixel(int ...)
J>   { if(x 319 ...) return;
J>   *((char*)0xA0000000L + x = (y<< 8)
J>    ^^^^^^^^^^^^^^^^^^
J>   said cant change const char to sumtin
   Hmmm.. Here is the original function():
void GraphicsScreen::PutPixel(int x, int y, int c)
{
   if(x  319 || y  199)   return;
   *((char*)0xA0000000L + x + (y << 8) + (y << 6)) = (char)c;
}
   There is no const char there anywhere. Most strange.
   It takes a long integer, adds the horizontal value, adds
   the vertical value times 256, adds the vertical value times
   64, (to make it times 320), casts that value to a char*,
   and then dereferences that pointer and stores the integer
   value c, cast to a char value, in it. It should work
   perfectly well. Try isolating the math before the cast.
   *((char*)(0xA0000000L + x + (y << 8) + (y << 6))) = (char)c;
   The TC++3.0 may not be parsing it correctly, though I've
   never heard of such a thing happening before.
   Is there an error in this code that anyone can see?
   If you are NOT using the .BGI libraries and have them turned
   on in the Options menu, perhaps that is where the const char
   is being generated, though that also makes little sense to
   me. It may be so. Also, do not include .
   Do you have an internet email address?
   I could send you the source in it's entirety in one post,
   and you could just save it to your compiler work directory.
> ] Wait a minute... ///\oo/\\\ Almonds don't have legs.........
---
---------------
* Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.