Attempting to compile on Linux (built using the nostatic option):
In FrontEndLib/BitmapManager.h, in line 150:
CBitmapManager:
arkenTileWithMultiTileMask should be DarkenTileWithMultiTileMask
[fixed -- mrimer]
../../FrontEndLib/BitmapManager.h:150:7: error: extra qualification ‘CBitmapManager::’ on member ‘DarkenTileWithMultiTileMask’ [-fpermissive]
https://stackoverflow.com/questions/5642367/extra-qualification-error-in-c
I'm also getting a bunch of errors such as
../../FrontEndLib/Sound.cpp:988:42: error: cannot bind non-const lvalue reference of type ‘std::string&’ {aka ‘std::__cxx11::basic_string<
char>
&’} to an rvalue of type ‘std::string’ {aka ‘std::__cxx11::basic_string<
char>
’}
related to the UnicodeToUTF8 function.
Figured out the problem. These calls to UnicodeToUTF8 are called with a char* argument, which is implicitly converted to std::string.
Fixed this by adding this too Wchar.h
#include <
cstring>
...
static inline void UnicodeToUTF8(const WCHAR *pwsz, char* cstr)
{ std::string str; UnicodeToUTF8(pwsz, str); strcpy(cstr,str.c_str()); }
[fixed -- mrimer]
Now to the next error...
../../DROD/GameScreen.cpp:3023:84: error: no matching function for call to ‘min(int, float)’
3023 | const float durationFraction = min(1, (dwNow - dwStart) / (float)dwDeathDuration);
Fix - replace 1 with 1.f. (Somewhat off topic, why float and not double?)
[fixed -- mrimer]
Next error - requires another variation of UnicodeToUTF8():
static inline void UnicodeToUTF8(const WSTRING& wstr, char *cstr)
{ UnicodeToUTF8(wstr.c_str(), cstr); }
[fixed -- mrimer]
Runtime problems:
Problem with old pngs and new libpng versions:
Fixed with the line
png_set_option(pPNG,PNG_MAXIMUM_INFLATE_WINDOW,PNG_OPTION_ON);
added on line 117 of PNGHandler.cpp.
(This probably needs an ifdef around it.)
It is finally running now.
An old problem: The font spacing is messed up. (The screenshot is from the help screen, but the title screen also shows it.)
A new problem: The backgrounds of the roaches crawling across the title screen are opaque.
[Last edited by mrimer at 11-17-2020 09:32 AM]