I downloaded the source of LaserTank and compiled it in LCC. There were 2
problems :
[1] My original executable is 439,902 bytes long. Removing debug info only
cuts that by 6 bytes. Fiddling with the various compiler settings like
optimise , debug and rebuild gave me .exe sizes like 307,232 and 306,208. I
could not find what I had to do to get it down to the size in the lasertank
package which was 302,112. What am I doing wrong?
[2] LCC generated this warning in lasertank.err :
Warning c:\lcc\ltank32\ltank2.c: 537 assignment of pointer to struct
tagBITMAPINFO to pointer to char
This appears to be the line it is complaining about :
LPBITMAPINFO P;
HBITMAP bm;
LPVOID P2;
if (Header->bfType != 0x4d42) return (0);
P = (char *)Header + sizeof(BITMAPFILEHEADER);
It looks like you have not cast the RHS correctly.
Here is the definition of LPBITMAPINFO from WIN.h :
typedef struct tagBITMAPINFO
{
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[1];
} BITMAPINFO , *LPBITMAPINFO , *PBITMAPINFO;
Vic