by hugepants » Feb 24, 2003 @ 9:43am
People, Thanks for all the really useful feedback.
Ive tried the following to write my image to the screen but it doesn't work (nothing happens!). Im using the 0xac0755a0 address as suggested and removed the begindraw() and enddraw()
my code is as follows (please dont laugh)
g_gxdp.cxWidth = 240;
g_gxdp.cyHeight = 320;
g_gxdp.cBPP = 16;
g_gxdp.ffFormat = 168;
g_gxdp.cbyPitch = 2;
g_gxdp.cbxPitch = -640;
unsigned short * pusLine = (unsigned short *) 0xac0755a0;
if (pusLine == NULL) return false; // NOT OK
for (unsigned int y = 0; y < g_gxdp.cyHeight; y++) {
unsigned short * pusDest = pusLine;
for (unsigned int x = 0; x < g_gxdp.cxWidth; x++) {
PixelCol = WarpedImage[y*imagewidth+x];
*pusDest = PixelCol;
pusDest += g_gxdp.cbxPitch >> 1;
}
pusLine += g_gxdp.cbyPitch >> 1;
}
Last edited by hugepants on Feb 25, 2003 @ 5:12am, edited 1 time in total.