diff -Naur gemrb-master-src/gemrb/core/GUI/TextSystem/Font.cpp gemrb-atari-src/gemrb/core/GUI/TextSystem/Font.cpp --- gemrb-master-src/gemrb/core/GUI/TextSystem/Font.cpp 2020-08-23 20:32:26.000000000 +0200 +++ gemrb-atari-src/gemrb/core/GUI/TextSystem/Font.cpp 2021-05-17 22:06:39.479161000 +0200 @@ -28,6 +28,8 @@ #include "Video.h" #include +#include +#include namespace GemRB { @@ -598,7 +600,7 @@ for (; i < string.length(); i++) { const Glyph& curGlyph = GetGlyph(string[i]); eos = (i == string.length() - 1); - ws = std::iswspace(string[i]); + ws = iswspace(string[i]); if (!ws) { ieWord chrW = curGlyph.size.w; if (lineW > 0) { // kerning diff -Naur gemrb-master-src/gemrb/core/GUI/TextSystem/GemMarkup.cpp gemrb-atari-src/gemrb/core/GUI/TextSystem/GemMarkup.cpp --- gemrb-master-src/gemrb/core/GUI/TextSystem/GemMarkup.cpp 2020-08-23 20:32:26.000000000 +0200 +++ gemrb-atari-src/gemrb/core/GUI/TextSystem/GemMarkup.cpp 2021-05-22 22:32:59.265252000 +0200 @@ -20,6 +20,8 @@ #include "GameData.h" +#include + namespace GemRB { GemMarkupParser::PaletteCache GemMarkupParser::PalCache; @@ -33,7 +35,7 @@ Color palCol = { 0, 0, 0, 0 }; unsigned int r, g, b; - swscanf(colorString.c_str(), L"%02X%02X%02X", &r, &g, &b); +// swscanf(colorString.c_str(), L"%02X%02X%02X", &r, &g, &b); qwerty palCol.r = r; palCol.g = g; palCol.b = b; diff -Naur gemrb-master-src/gemrb/core/Interface.cpp gemrb-atari-src/gemrb/core/Interface.cpp --- gemrb-master-src/gemrb/core/Interface.cpp 2020-08-23 20:32:26.000000000 +0200 +++ gemrb-atari-src/gemrb/core/Interface.cpp 2021-05-17 22:35:24.242019000 +0200 @@ -97,7 +97,7 @@ #ifdef WIN32 #include "CodepageToIconv.h" #else -#include +//#include #endif namespace GemRB { @@ -270,7 +270,8 @@ SystemEncoding = nullptr; #endif// HAVE_ICONV #else // WIN32 - SystemEncoding = nl_langinfo(CODESET); +// SystemEncoding = nl_langinfo(CODESET); + SystemEncoding = ""; #endif // WIN32 TLKEncoding.encoding = "ISO-8859-1"; diff -Naur gemrb-master-src/gemrb/core/PathFinder.cpp gemrb-atari-src/gemrb/core/PathFinder.cpp --- gemrb-master-src/gemrb/core/PathFinder.cpp 2020-08-23 20:32:26.000000000 +0200 +++ gemrb-atari-src/gemrb/core/PathFinder.cpp 2021-05-17 22:38:16.187005000 +0200 @@ -71,7 +71,7 @@ size_t tries = 0; NormalizeDeltas(dx, dy, double(gamedata->GetStepTime()) / caller->speed); while (SquaredDistance(p, s) < unsigned(maxPathLength * maxPathLength * SEARCHMAP_SQUARE_DIAGONAL * SEARCHMAP_SQUARE_DIAGONAL)) { - if (!(GetBlockedInRadius(std::lround(p.x + 3 * xSign * dx), std::lround(p.y + 3 * ySign * dy), size) & PATH_MAP_PASSABLE)) { + if (!(GetBlockedInRadius(lround(p.x + 3 * xSign * dx), lround(p.y + 3 * ySign * dy), size) & PATH_MAP_PASSABLE)) { tries++; // Give up and call the pathfinder if backed into a corner if (tries > RAND_DEGREES_OF_FREEDOM) break; diff -Naur gemrb-master-src/gemrb/core/PluginLoader.cpp gemrb-atari-src/gemrb/core/PluginLoader.cpp --- gemrb-master-src/gemrb/core/PluginLoader.cpp 2020-08-23 20:32:26.000000000 +0200 +++ gemrb-atari-src/gemrb/core/PluginLoader.cpp 2021-05-17 22:46:14.422966000 +0200 @@ -39,7 +39,7 @@ #include #include #include -#include +//#include #endif #ifdef HAVE_FORBIDDEN_OBJECT_TO_FUNCTION_CAST @@ -78,7 +78,7 @@ typedef void *(* voidvoid)(void); static inline voidvoid my_dlsym(void *handle, const char *symbol) { - void *value = dlsym(handle,symbol); + void *value = NULL; //dlsym(handle,symbol); voidvoid ret; assert(sizeof(ret)==sizeof(value) ); memcpy(&ret, &value, sizeof(ret) ); @@ -92,8 +92,8 @@ #define FREE_PLUGIN( handle ) FreeLibrary( handle ) #define GET_PLUGIN_SYMBOL( handle, name ) GetProcAddress( handle, name ) #else -#define FREE_PLUGIN( handle ) dlclose( handle ) -#define GET_PLUGIN_SYMBOL( handle, name ) my_dlsym( handle, name ) +//#define FREE_PLUGIN( handle ) dlclose( handle ) +//#define GET_PLUGIN_SYMBOL( handle, name ) my_dlsym( handle, name ) #endif /** Return names of all *.so or *.dll files in the given directory */ @@ -211,28 +211,28 @@ // Note: the RTLD_GLOBAL is necessary to export symbols to modules // which python may have to dlopen (-wjp, 20060716) // (to reproduce, try 'import bz2' or another .so module) - void* hMod = dlopen( path, RTLD_NOW | RTLD_GLOBAL ); + void* hMod = NULL; //dlopen( path, RTLD_NOW | RTLD_GLOBAL ); #endif if (hMod == NULL) { - Log(ERROR, "PluginLoader", "Cannot Load \"" TCHAR_FORMAT "\", skipping...", path); + Log(ERROR, "PluginLoader", "Cannot (mj) Load \"" TCHAR_FORMAT "\", skipping...", path); continue; } //using C bindings, so we don't need to jump through extra hoops //with the symbol name - Version_t LibVersion = ( Version_t ) (void*) GET_PLUGIN_SYMBOL( hMod, "GemRBPlugin_Version" ); - Description_t Description = ( Description_t ) (void*) GET_PLUGIN_SYMBOL( hMod, "GemRBPlugin_Description" ); - ID_t ID = ( ID_t ) (void*) GET_PLUGIN_SYMBOL( hMod, "GemRBPlugin_ID" ); - Register_t Register = ( Register_t ) (void*) GET_PLUGIN_SYMBOL( hMod, "GemRBPlugin_Register" ); + Version_t LibVersion = NULL; // ( Version_t ) (void*) GET_PLUGIN_SYMBOL( hMod, "GemRBPlugin_Version" ); + Description_t Description = NULL; // ( Description_t ) (void*) GET_PLUGIN_SYMBOL( hMod, "GemRBPlugin_Description" ); + ID_t ID = NULL; // ( ID_t ) (void*) GET_PLUGIN_SYMBOL( hMod, "GemRBPlugin_ID" ); + Register_t Register = NULL; // ( Register_t ) (void*) GET_PLUGIN_SYMBOL( hMod, "GemRBPlugin_Register" ); if (LibVersion==NULL) { Log(ERROR, "PluginLoader", "Skipping invalid plugin \"" TCHAR_FORMAT "\".", path); - FREE_PLUGIN( hMod ); +// FREE_PLUGIN( hMod ); continue; } if (strcmp(LibVersion(), VERSION_GEMRB) ) { Log(ERROR, "PluginLoader", "Skipping plugin \"" TCHAR_FORMAT "\" with version mistmatch.", path); - FREE_PLUGIN( hMod ); +// FREE_PLUGIN( hMod ); continue; } @@ -240,13 +240,13 @@ if (libs.find(desc.ID) != libs.end()) { Log(WARNING, "PluginLoader", "Plug-in \"" TCHAR_FORMAT "\" already loaded!", path); - FREE_PLUGIN( hMod ); +// FREE_PLUGIN( hMod ); continue; } if (desc.Register != NULL) { if (!desc.Register(PluginMgr::Get())) { Log(WARNING, "PluginLoader", "Plugin Registration Failed! Perhaps a duplicate?"); - FREE_PLUGIN( hMod ); +// FREE_PLUGIN( hMod ); } } libs.insert(desc.ID); diff -Naur gemrb-master-src/gemrb/core/System/Logging.h gemrb-atari-src/gemrb/core/System/Logging.h --- gemrb-master-src/gemrb/core/System/Logging.h 2020-08-23 20:32:26.000000000 +0200 +++ gemrb-atari-src/gemrb/core/System/Logging.h 2021-05-15 20:28:43.470881000 +0200 @@ -29,6 +29,8 @@ #include "exports.h" #include "win32def.h" +#include + namespace GemRB { #ifdef WIN32 diff -Naur gemrb-master-src/gemrb/core/System/String.h gemrb-atari-src/gemrb/core/System/String.h --- gemrb-master-src/gemrb/core/System/String.h 2020-08-23 20:32:26.000000000 +0200 +++ gemrb-atari-src/gemrb/core/System/String.h 2021-05-17 16:03:37.783200000 +0200 @@ -37,9 +37,9 @@ #define WHITESPACE_STRING L"\n\t\r " namespace GemRB { - +typedef std::basic_string String; //typedef std::basic_string String; -typedef std::wstring String; +//typedef std::wstring String; // String creators GEM_EXPORT char* ConvertCharEncoding(const char * string, const char * from, const char* to); GEM_EXPORT String* StringFromCString(const char* string); diff -Naur gemrb-master-src/gemrb/includes/RGBAColor.h gemrb-atari-src/gemrb/includes/RGBAColor.h --- gemrb-master-src/gemrb/includes/RGBAColor.h 2020-08-23 20:32:26.000000000 +0200 +++ gemrb-atari-src/gemrb/includes/RGBAColor.h 2021-05-17 22:00:36.414191000 +0200 @@ -35,9 +35,7 @@ tint.b = (tint.b * tintMod->b) >> 8; } } -#ifdef __GNUC__ - __attribute__((aligned(4))) -#endif + ; // close of Color struct static const Color ColorBlack = {0x00, 0x00, 0x00, 0xff}; diff -Naur gemrb-master-src/gemrb/plugins/CREImporter/CREImporter.cpp gemrb-atari-src/gemrb/plugins/CREImporter/CREImporter.cpp --- gemrb-master-src/gemrb/plugins/CREImporter/CREImporter.cpp 2020-08-23 20:32:26.000000000 +0200 +++ gemrb-atari-src/gemrb/plugins/CREImporter/CREImporter.cpp 2021-05-21 19:23:37.435581000 +0200 @@ -237,7 +237,7 @@ // still needs to happen first or the laxer check below can misclassify // first translate the actual kit to a column index to make them comparable // luckily they are in order - int kit2 = std::log2(kit/0x8000); // 0x8000 is the first cleric kit + int kit2 = log2(kit/0x8000); // 0x8000 is the first cleric kit if (IsDomain(name, level, kit2) >= 0) return IE_IWD2_SPELL_DOMAIN; // try harder for the rest @@ -336,7 +336,7 @@ } // translate the actual kit to a column index to make them comparable // luckily they are in order - kit = std::log2(kit/0x8000); // 0x8000 is the first cleric kit + kit = log2(kit/0x8000); // 0x8000 is the first cleric kit ret = domlist[index].FindSpell(level, kit); if (ret) { return ret; @@ -350,7 +350,7 @@ break; } // translate the actual kit to a column index to make them comparable - kit = std::log2(kit/0x40); // 0x40 is the first mage kit + kit = log2(kit/0x40); // 0x40 is the first mage kit //if it is a specialist spell, return it now ret = maglist[index].FindSpell(level, kit); if ( ret) {