#49252 - QuantumDoja - Wed Jul 27, 2005 9:28 pm
Hi, I have the following code, to take a palette and data, and then in mode4 plot the screen, I can get it to work by not using a function, but its these damn pointers Im stuggling with....heres where im up to:
Calling the function:
I keep getting the errors:
warning: Passing arg1 of "copyscreen" from incompatible pointer type
warning: Passing arg2 of "copyscreen" from incompatible pointer type
_________________
Chris Davis
Code: |
void CopyScreen(u16 *data, u16 *palette) { u16 x,y; for(x = 0; x < 256; x++) { BGPaletteMem[x] = palette[x]; } for(y = 0; y < 160; y++) { for(x = 0; x < 120; x++) { PlotPixel(x,y,data[y*120+x]); } } } |
Calling the function:
Code: |
CopyScreen(&logoPalette,&logoData); |
I keep getting the errors:
warning: Passing arg1 of "copyscreen" from incompatible pointer type
warning: Passing arg2 of "copyscreen" from incompatible pointer type
_________________
Chris Davis