It appears as if there are different options for the debug version and the release version. When I do compile, however, I get a lot of warnings that I never got with the debug version and when I run it, I get very strange looks and the files aren't loading likely as a result. I see a lot of rectangles for text when working with strings. These are the warnings I'm getting:
Code:
.\Interactive Animation.c(308) : warning C4133: 'function' : incompatible types - from 'char [512]' to 'LPCWSTR'
.\Interactive Animation.c(308) : warning C4133: 'function' : incompatible types - from 'char [27]' to 'LPCWSTR'
.\Interactive Animation.c(329) : warning C4133: 'function' : incompatible types - from 'char [192]' to 'LPWSTR'
.\Interactive Animation.c(339) : warning C4133: 'function' : incompatible types - from 'char [512]' to 'LPCWSTR'
.\Interactive Animation.c(339) : warning C4133: 'function' : incompatible types - from 'char [15]' to 'LPCWSTR'
.\Interactive Animation.c(374) : warning C4133: 'function' : incompatible types - from 'char [512]' to 'LPCWSTR'
.\Interactive Animation.c(374) : warning C4133: 'function' : incompatible types - from 'char [16]' to 'LPCWSTR'
.\Interactive Animation.c(391) : warning C4133: 'function' : incompatible types - from 'char [512]' to 'LPCWSTR'
.\Interactive Animation.c(391) : warning C4133: 'function' : incompatible types - from 'char [16]' to 'LPCWSTR'
.\Interactive Animation.c(428) : warning C4133: 'function' : incompatible types - from 'char [512]' to 'LPCWSTR'
.\Interactive Animation.c(428) : warning C4133: 'function' : incompatible types - from 'char [16]' to 'LPCWSTR'
.\Interactive Animation.c(447) : warning C4133: 'function' : incompatible types - from 'char [512]' to 'LPCWSTR'
.\Interactive Animation.c(447) : warning C4133: 'function' : incompatible types - from 'char [16]' to 'LPCWSTR'
.\Interactive Animation.c(1157) : warning C4133: 'function' : incompatible types - from 'char [512]' to 'LPCWSTR'
.\Interactive Animation.c(1157) : warning C4133: 'function' : incompatible types - from 'char [27]' to 'LPCWSTR'
.\Interactive Animation.c(1237) : warning C4133: 'function' : incompatible types - from 'char [512]' to 'LPCWSTR'
.\Interactive Animation.c(1237) : warning C4133: 'function' : incompatible types - from 'char [27]' to 'LPCWSTR'
.\Interactive Animation.c(1259) : warning C4133: 'function' : incompatible types - from 'char [512]' to 'LPCWSTR'
.\Interactive Animation.c(1259) : warning C4133: 'function' : incompatible types - from 'char [27]' to 'LPCWSTR'
.\Interactive Animation.c(1771) : warning C4133: 'function' : incompatible types - from 'char [512]' to 'LPCWSTR'
.\Interactive Animation.c(1771) : warning C4133: 'function' : incompatible types - from 'char [27]' to 'LPCWSTR'
.\Interactive Animation.c(1819) : warning C4133: 'function' : incompatible types - from 'char [16]' to 'LPCWSTR'
.\Interactive Animation.c(1845) : warning C4133: '=' : incompatible types - from 'char [8]' to 'LPCWSTR'
.\Interactive Animation.c(1890) : warning C4133: 'function' : incompatible types - from 'char [8]' to 'LPCWSTR'
.\Interactive Animation.c(1890) : warning C4133: 'function' : incompatible types - from 'char [32]' to 'LPCWSTR'
.\Interactive Animation.c(1980) : warning C4133: 'function' : incompatible types - from 'char [8]' to 'LPCWSTR'
I took a screenshot of the boxes and other gibberish to help explain, if necessary. The area this applies to is with the file loading (since I haven't copied the program yet to the correct area).
Code:
char LoadFile(const char FileName[64], char FileType, BITMAPINFOHEADER *BMPInfo, unsigned char *BMPData, char FogUsed, double ObjectScaling, char LoadType, unsigned int ArrayLength)
{
char BasePath[192]; // the base path, that of which started from
char FullFileName[256]; // the full path combining the base path and the parameter
unsigned int ArrayIndex = 0;
float NewColor = 0;
unsigned char ValuesBase[4]; // for fixing endianness
float FogIntensity = (float)ObjectScaling;
float FogRange = (float)visibility;
GetCurrentDirectory(MAX_PATH, BasePath);
// strcpy(BasePath, "C:\\My Documents\\My programs\\Interactive Animation\\"); // get the obvious base path first
sprintf(FullFileName, "%s\\images\\%s", BasePath, FileName); // combine the base path and file name
FileHandle = fopen(FullFileName, "rb"); // read the source file to display, binary mode
// FileHandle = fopen(FileName, "rb"); // read the source file to display, binary mode
if (FileHandle == 0) // if the file can't be found
{
sprintf(WarningString, "Error: This file cannot be found:\n%s\n\nIf this file isn't there, redownload the program and/or contact me.\nIf it is there or in a different directory, then you've found a bug. Please report it.", FullFileName); // an error since the file can't be found
MessageBox(hwnd, WarningString, "File not found", MB_OK | MB_ICONHAND);
return 1; // indicates an error occurred
}
Any ideas on what this may be? Why does it work fine with debug?