Commit 39c4a71e authored by gerstrong@gmail.com's avatar gerstrong@gmail.com

More python support

parent c09ec283
...@@ -12,11 +12,13 @@ ...@@ -12,11 +12,13 @@
#include "CMessages.h" #include "CMessages.h"
#include "base/utils/StringUtils.h" #include "base/utils/StringUtils.h"
#include <base/GsLogging.h> #include <base/GsLogging.h>
#include <base/GsPython.h>
#include "fileio/KeenFiles.h"
#include "engine/core/CBehaviorEngine.h" #include "engine/core/CBehaviorEngine.h"
#include <cstring> #include <cstring>
CMessages::CMessages(unsigned char *p_exebuf, char episode, bool demo, int version) : CMessages::CMessages(unsigned char *p_exebuf, int episode, bool demo, int version) :
mp_exe(p_exebuf), mp_exe(p_exebuf),
mOffset(0) mOffset(0)
{ {
...@@ -188,7 +190,7 @@ bool CMessages::extractEp4Strings(std::map<std::string, std::string>& StringMap) ...@@ -188,7 +190,7 @@ bool CMessages::extractEp4Strings(std::map<std::string, std::string>& StringMap)
StringMap.insert( extractNextString( "STORY_TEXT" ) ); StringMap.insert( extractNextString( "STORY_TEXT" ) );
return true; return true;
} break; }
} }
return false; return false;
} }
...@@ -327,9 +329,9 @@ bool CMessages::extractEp6DemoStrings(std::map<std::string, std::string>& String ...@@ -327,9 +329,9 @@ bool CMessages::extractEp6DemoStrings(std::map<std::string, std::string>& String
return false; return false;
} }
bool CMessages::extractGlobalStrings() bool CMessages::extractGlobalStringsUsingExe()
{ {
std::map<std::string, std::string> StringMap; // Structure which stores all the extracted string std::map<std::string, std::string> stringMap; // Structure which stores all the extracted string
// Here we begin to extract all the proper Strings // Here we begin to extract all the proper Strings
switch(m_episode) switch(m_episode)
...@@ -340,31 +342,31 @@ bool CMessages::extractGlobalStrings() ...@@ -340,31 +342,31 @@ bool CMessages::extractGlobalStrings()
{ {
case 131: case 131:
{ {
StringMap.insert( extractString( "CTSPACECHEAT", 0x14DEE, 0x14E51 ) ); stringMap.insert( extractString( "CTSPACECHEAT", 0x14DEE, 0x14E51 ) );
StringMap.insert( extractString( "GODMODEON", 0x14EF6, 0x14F06 ) ); stringMap.insert( extractString( "GODMODEON", 0x14EF6, 0x14F06 ) );
StringMap.insert( extractString( "GODMODEOFF", 0x14F07, 0x14F18 ) ); stringMap.insert( extractString( "GODMODEOFF", 0x14F07, 0x14F18 ) );
StringMap.insert( extractString( "EP1_StatusBox" , 0x15052, 0x150F5, -512 ) ); stringMap.insert( extractString( "EP1_StatusBox" , 0x15052, 0x150F5, -512 ) );
StringMap.insert( extractString( "EP1_SHIP" , 0x1679B, 0x167D3, -512 ) ); stringMap.insert( extractString( "EP1_SHIP" , 0x1679B, 0x167D3, -512 ) );
StringMap.insert( extractString( "LIVES_LEFT" , 0x160D8, 0x160E5, -512 ) ); stringMap.insert( extractString( "LIVES_LEFT" , 0x160D8, 0x160E5, -512 ) );
// Message hint Dialogs // Message hint Dialogs
StringMap.insert( extractString( "EP1_YSIYM_LVL2" , 0x15280, 0x15314, -512 ) ); stringMap.insert( extractString( "EP1_YSIYM_LVL2" , 0x15280, 0x15314, -512 ) );
StringMap.insert( extractString( "EP1_YSIYM_LVL6" , 0x1531A, 0x153B2, -512 ) ); stringMap.insert( extractString( "EP1_YSIYM_LVL6" , 0x1531A, 0x153B2, -512 ) );
StringMap.insert( extractString( "EP1_YSIYM_LVL9" , 0x153B4, 0x1544C, -512 ) ); stringMap.insert( extractString( "EP1_YSIYM_LVL9" , 0x153B4, 0x1544C, -512 ) );
StringMap.insert( extractString( "EP1_YSIYM_LVL10" , 0x1544E, 0x154E6, -512 ) ); stringMap.insert( extractString( "EP1_YSIYM_LVL10" , 0x1544E, 0x154E6, -512 ) );
StringMap.insert( extractString( "EP1_YSIYM_LVL11" , 0x154E8, 0x1553E, -512 ) ); stringMap.insert( extractString( "EP1_YSIYM_LVL11" , 0x154E8, 0x1553E, -512 ) );
StringMap.insert( extractString( "EP1_YSIYM_LVL12" , 0x15540, 0x155D9, -512 ) ); stringMap.insert( extractString( "EP1_YSIYM_LVL12" , 0x15540, 0x155D9, -512 ) );
StringMap.insert( extractString( "EP1_YSIYM_LVL15" , 0x155DB, 0x1565D, -512 ) ); stringMap.insert( extractString( "EP1_YSIYM_LVL15" , 0x155DB, 0x1565D, -512 ) );
// Finale Text // Finale Text
StringMap.insert( extractString( "EP1_ESEQ_PART1" , 0x15E24, 0x15EB0, -512 ) ); stringMap.insert( extractString( "EP1_ESEQ_PART1" , 0x15E24, 0x15EB0, -512 ) );
StringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE1" , 0x15EBD, 0x15EFA, -512 ) ); stringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE1" , 0x15EBD, 0x15EFA, -512 ) );
StringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE2" , 0x15EFB, 0x15F2F, -512 ) ); stringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE2" , 0x15EFB, 0x15F2F, -512 ) );
StringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE3" , 0x15F30, 0x15F7F, -512 ) ); stringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE3" , 0x15F30, 0x15F7F, -512 ) );
StringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE4" , 0x15F80, 0x15F9B, -512 ) ); stringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE4" , 0x15F80, 0x15F9B, -512 ) );
StringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE5" , 0x15F9C, 0x15FE1, -512 ) ); stringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE5" , 0x15F9C, 0x15FE1, -512 ) );
StringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE6" , 0x15FE2, 0x15FF5, -512 ) ); stringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE6" , 0x15FE2, 0x15FF5, -512 ) );
StringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE7" , 0x15FF6, 0x16006, -512 ) ); stringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE7" , 0x15FF6, 0x16006, -512 ) );
StringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE8" , 0x16007, 0x16071, -512 ) ); stringMap.insert( extractString( "EP1_ESEQ_PART2_PAGE8" , 0x16007, 0x16071, -512 ) );
StringMap.insert( extractString( "TO_BE_CONTINUED" , 0x16072, 0x16085, -512 ) ); stringMap.insert( extractString( "TO_BE_CONTINUED" , 0x16072, 0x16085, -512 ) );
} break; } break;
} }
} break; } break;
...@@ -374,29 +376,29 @@ bool CMessages::extractGlobalStrings() ...@@ -374,29 +376,29 @@ bool CMessages::extractGlobalStrings()
{ {
case 131: case 131:
{ {
StringMap.insert( extractString( "CTSPACECHEAT", 0x19AC6, 0x19B1B, -512 ) ); stringMap.insert( extractString( "CTSPACECHEAT", 0x19AC6, 0x19B1B, -512 ) );
StringMap.insert( extractString( "GODMODEON", 0x19BE4, 0x19BF4, -512 ) ); stringMap.insert( extractString( "GODMODEON", 0x19BE4, 0x19BF4, -512 ) );
StringMap.insert( extractString( "GODMODEOFF", 0x19BF5, 0x19C06, -512 ) ); stringMap.insert( extractString( "GODMODEOFF", 0x19BF5, 0x19C06, -512 ) );
StringMap.insert( extractString( "EP2_StatusBox" , 0x19C40, 0x19CAE, -804 ) ); stringMap.insert( extractString( "EP2_StatusBox" , 0x19C40, 0x19CAE, -804 ) );
StringMap.insert( extractString( "LIVES_LEFT" , 0x1A9B2, 0x1A9BF, -776 ) ); stringMap.insert( extractString( "LIVES_LEFT" , 0x1A9B2, 0x1A9BF, -776 ) );
StringMap.insert( extractString( "EP2_VE_NOJUMPINDARK" , 0x1A2D2, 0x1A391, -774 ) ); stringMap.insert( extractString( "EP2_VE_NOJUMPINDARK" , 0x1A2D2, 0x1A391, -774 ) );
StringMap.insert( extractString( "EP2_VE_EVILBELTS" , 0x1A392, 0x1A4A5, -774) ); stringMap.insert( extractString( "EP2_VE_EVILBELTS" , 0x1A392, 0x1A4A5, -774) );
StringMap.insert( extractString( "EP2_LVL4_TargetName" , 0x19CCF, 0x19CD5, -804) ); stringMap.insert( extractString( "EP2_LVL4_TargetName" , 0x19CCF, 0x19CD5, -804) );
StringMap.insert( extractString( "EP2_LVL6_TargetName" , 0x19CD6, 0x19CDB, -804) ); stringMap.insert( extractString( "EP2_LVL6_TargetName" , 0x19CD6, 0x19CDB, -804) );
StringMap.insert( extractString( "EP2_LVL7_TargetName" , 0x19CDC, 0x19CE2, -804) ); stringMap.insert( extractString( "EP2_LVL7_TargetName" , 0x19CDC, 0x19CE2, -804) );
StringMap.insert( extractString( "EP2_LVL9_TargetName" , 0x19CE3, 0x19CEB, -804) ); stringMap.insert( extractString( "EP2_LVL9_TargetName" , 0x19CE3, 0x19CEB, -804) );
StringMap.insert( extractString( "EP2_LVL11_TargetName" , 0x19CEC, 0x19CF1, -804) ); stringMap.insert( extractString( "EP2_LVL11_TargetName" , 0x19CEC, 0x19CF1, -804) );
StringMap.insert( extractString( "EP2_LVL13_TargetName" , 0x19CF2, 0x19CF6, -804) ); stringMap.insert( extractString( "EP2_LVL13_TargetName" , 0x19CF2, 0x19CF6, -804) );
StringMap.insert( extractString( "EP2_LVL15_TargetName" , 0x19CF7, 0x19CFD, -804) ); stringMap.insert( extractString( "EP2_LVL15_TargetName" , 0x19CF7, 0x19CFD, -804) );
StringMap.insert( extractString( "EP2_LVL16_TargetName" , 0x19CFE, 0x19D07, -804) ); stringMap.insert( extractString( "EP2_LVL16_TargetName" , 0x19CFE, 0x19D07, -804) );
// Message Boxes // Message Boxes
StringMap.insert( extractString( "EP2_ESEQ_PART1" , 0x1A4A7, 0x1A558, -774) ); stringMap.insert( extractString( "EP2_ESEQ_PART1" , 0x1A4A7, 0x1A558, -774) );
StringMap.insert( extractString( "EP2_ESEQ_PART2" , 0x1A559, 0x1A5F0, -774) ); stringMap.insert( extractString( "EP2_ESEQ_PART2" , 0x1A559, 0x1A5F0, -774) );
StringMap.insert( extractString( "EP2_ESEQ_PART3_PAGE1" , 0x1A5FD, 0x1A638, -774) ); stringMap.insert( extractString( "EP2_ESEQ_PART3_PAGE1" , 0x1A5FD, 0x1A638, -774) );
StringMap.insert( extractString( "EP2_ESEQ_PART3_PAGE2" , 0x1A639, 0x1A6CD, -774) ); stringMap.insert( extractString( "EP2_ESEQ_PART3_PAGE2" , 0x1A639, 0x1A6CD, -774) );
StringMap.insert( extractString( "EP2_ESEQ_PART3_PAGE3" , 0x1A6CF, 0x1A72D, -774) ); stringMap.insert( extractString( "EP2_ESEQ_PART3_PAGE3" , 0x1A6CF, 0x1A72D, -774) );
StringMap.insert( extractString( "EP2_ESEQ_PART3_PAGE4" , 0x1A72F, 0x1A739, -774) ); stringMap.insert( extractString( "EP2_ESEQ_PART3_PAGE4" , 0x1A72F, 0x1A739, -774) );
StringMap.insert( extractString( "TO_BE_CONTINUED" , 0x1A73A, 0x1A74D, -774 ) ); stringMap.insert( extractString( "TO_BE_CONTINUED" , 0x1A73A, 0x1A74D, -774 ) );
} break; } break;
} }
} break; } break;
...@@ -406,49 +408,49 @@ bool CMessages::extractGlobalStrings() ...@@ -406,49 +408,49 @@ bool CMessages::extractGlobalStrings()
{ {
case 131: case 131:
{ {
StringMap.insert( extractString( "CTSPACECHEAT", 0x1BC9E, 0x1BCF3, -512 ) ); stringMap.insert( extractString( "CTSPACECHEAT", 0x1BC9E, 0x1BCF3, -512 ) );
StringMap.insert( extractString( "GODMODEON", 0x1BD80, 0x1BD90, -512 ) ); stringMap.insert( extractString( "GODMODEON", 0x1BD80, 0x1BD90, -512 ) );
StringMap.insert( extractString( "GODMODEOFF", 0x1BD91, 0x1BDA2, -512 ) ); stringMap.insert( extractString( "GODMODEOFF", 0x1BD91, 0x1BDA2, -512 ) );
StringMap.insert( extractString( "EP3_StatusBox" , 0x1BCF4, 0x1BD60, -512 ) ); stringMap.insert( extractString( "EP3_StatusBox" , 0x1BCF4, 0x1BD60, -512 ) );
StringMap.insert( extractString( "LIVES_LEFT" , 0x1CAEE, 0x1CAFB, -806 ) ); stringMap.insert( extractString( "LIVES_LEFT" , 0x1CAEE, 0x1CAFB, -806 ) );
// Ship Messages // Ship Messages
StringMap.insert( extractString( "EP3_SHIP1" , 0x1D101, 0x1D173, -765) ); stringMap.insert( extractString( "EP3_SHIP1" , 0x1D101, 0x1D173, -765) );
StringMap.insert( extractString( "EP3_SHIP2" , 0x1D175, 0x1D1D1, -765) ); stringMap.insert( extractString( "EP3_SHIP2" , 0x1D175, 0x1D1D1, -765) );
StringMap.insert( extractString( "EP3_SHIP3" , 0x1D1D3, 0x1D24C, -765) ); stringMap.insert( extractString( "EP3_SHIP3" , 0x1D1D3, 0x1D24C, -765) );
StringMap.insert( extractString( "EP3_SHIP4" , 0x1D24E, 0x1D2C4, -765) ); stringMap.insert( extractString( "EP3_SHIP4" , 0x1D24E, 0x1D2C4, -765) );
//Mortimer //Mortimer
StringMap.insert( extractString( "EP3_MORTIMER" , 0x1C3B2, 0x1C3D7, -805) ); stringMap.insert( extractString( "EP3_MORTIMER" , 0x1C3B2, 0x1C3D7, -805) );
StringMap.insert( extractString( "EP3_MORTIMER2" , 0x1C3D8, 0x1C499, -805) ); stringMap.insert( extractString( "EP3_MORTIMER2" , 0x1C3D8, 0x1C499, -805) );
StringMap.insert( extractString( "EP3_MORTIMER3" , 0x1C49B, 0x1C53E, -805) ); stringMap.insert( extractString( "EP3_MORTIMER3" , 0x1C49B, 0x1C53E, -805) );
StringMap.insert( extractString( "EP3_MORTIMER4" , 0x1C53F, 0x1C606, -805) ); stringMap.insert( extractString( "EP3_MORTIMER4" , 0x1C53F, 0x1C606, -805) );
StringMap.insert( extractString( "EP3_MORTIMER5" , 0x1C607, 0x1C629, -805) ); stringMap.insert( extractString( "EP3_MORTIMER5" , 0x1C607, 0x1C629, -805) );
StringMap.insert( extractString( "EP3_MORTIMER6" , 0x1C62A, 0x1C692, -805) ); stringMap.insert( extractString( "EP3_MORTIMER6" , 0x1C62A, 0x1C692, -805) );
// Ending Pages // Ending Pages
StringMap.insert( extractString( "EP3_ESEQ_PAGE1" , 0x1C692, 0x1C72E, -805) ); stringMap.insert( extractString( "EP3_ESEQ_PAGE1" , 0x1C692, 0x1C72E, -805) );
StringMap.insert( extractString( "EP3_ESEQ_PAGE2" , 0x1C730, 0x1C7A5, -805) ); stringMap.insert( extractString( "EP3_ESEQ_PAGE2" , 0x1C730, 0x1C7A5, -805) );
StringMap.insert( extractString( "EP3_ESEQ_PAGE3" , 0x1C7A7, 0x1C811, -805) ); stringMap.insert( extractString( "EP3_ESEQ_PAGE3" , 0x1C7A7, 0x1C811, -805) );
StringMap.insert( extractString( "EP3_ESEQ_PAGE4" , 0x1C813, 0x1C81F, -805) ); stringMap.insert( extractString( "EP3_ESEQ_PAGE4" , 0x1C813, 0x1C81F, -805) );
StringMap.insert( extractString( "THE_END" , 0x1C82D, 0x1C845, -806) ); stringMap.insert( extractString( "THE_END" , 0x1C82D, 0x1C845, -806) );
} break; } break;
} }
} break; } break;
case 4: case 4:
{ {
if(!extractEp4Strings(StringMap)) if(!extractEp4Strings(stringMap))
gLogging.textOut(FONTCOLORS::RED,"This version of the game is not supported!"); gLogging.textOut(FONTCOLORS::RED,"This version of the game is not supported!");
} break; } break;
case 5: case 5:
{ {
if(!extractEp5Strings(StringMap)) if(!extractEp5Strings(stringMap))
gLogging.textOut(FONTCOLORS::RED,"This version of the game is not supported!"); gLogging.textOut(FONTCOLORS::RED,"This version of the game is not supported!");
} break; } break;
case 6: case 6:
{ {
if(!(m_demo ? extractEp6DemoStrings(StringMap) : if(!(m_demo ? extractEp6DemoStrings(stringMap) :
extractEp6Strings(StringMap))) extractEp6Strings(stringMap)))
gLogging.textOut(FONTCOLORS::RED,"This version of the game is not supported!"); gLogging.textOut(FONTCOLORS::RED,"This version of the game is not supported!");
} break; } break;
...@@ -459,18 +461,58 @@ bool CMessages::extractGlobalStrings() ...@@ -459,18 +461,58 @@ bool CMessages::extractGlobalStrings()
} }
} }
// Now pass all the Map to the global text structure // Now pass all the Map to the global text structure
// Still a bad idea, because it's global string. if(!stringMap.empty())
if(!StringMap.empty())
{ {
std::map<std::string, std::string>::iterator i; std::map<std::string, std::string>::iterator i;
for( i = StringMap.begin() ; i != StringMap.end() ; i++ ) for( i = stringMap.begin() ; i != stringMap.end() ; i++ )
{ {
gBehaviorEngine.setMessage(i->first, i->second); gBehaviorEngine.setMessage(i->first, i->second);
} }
gLogging.ftextOut("Loaded %d strings from the exe-file.<br>", StringMap.size()); gLogging.ftextOut("Loaded a total of %d strings from the Exe.<br>", stringMap.size());
return true; return true;
} }
return false; return false;
} }
bool CMessages::extractGlobalStringsUsingPython()
{
std::map<std::string, std::string> stringMap; // Structure which stores all the extracted string
#if USE_PYTHON3
auto pModule = gPython.loadModule( "messageMap", gKeenFiles.gameDir );
if (pModule != nullptr)
{
for(int i=0 ; i<=18 ; i++)
{
const std::string levelKey = "LEVEL" + to_string(i) + "_LOAD_TEXT";
std::string value;
const auto ok = loadStrFunction(pModule, "getLevelLoadMsg", value, i);
if(ok)
{
stringMap[levelKey] = value;
}
}
}
#endif
// Now pass all the Map to the global text structure
if(!stringMap.empty())
{
std::map<std::string, std::string>::iterator i;
for( i = stringMap.begin() ; i != stringMap.end() ; i++ )
{
gBehaviorEngine.setMessage(i->first, i->second);
}
gLogging.ftextOut("Loaded a total of %d strings using Python.<br>", stringMap.size());
return true;
}
return false;
}
...@@ -13,9 +13,20 @@ ...@@ -13,9 +13,20 @@
class CMessages { class CMessages {
public: public:
CMessages(unsigned char *p_exebuf, char episode, bool demo, int version);
/**
* @brief CMessages NOTE: The parameters are not using when
* extracting with python
* @param p_exebuf
* @param episode
* @param demo
* @param version
*/
CMessages(unsigned char *p_exebuf, int episode, bool demo, int version);
bool extractGlobalStrings(); bool extractGlobalStringsUsingExe();
bool extractGlobalStringsUsingPython();
void setDecodeOffset(const unsigned int off); void setDecodeOffset(const unsigned int off);
...@@ -38,7 +49,7 @@ private: ...@@ -38,7 +49,7 @@ private:
bool extractEp6DemoStrings(std::map<std::string, std::string>& StringMap); bool extractEp6DemoStrings(std::map<std::string, std::string>& StringMap);
unsigned char *mp_exe; unsigned char *mp_exe;
char m_episode; int m_episode;
bool m_demo; bool m_demo;
int m_version; int m_version;
......
...@@ -208,7 +208,7 @@ bool GalaxyEngine::loadResources( const Uint8 flags ) ...@@ -208,7 +208,7 @@ bool GalaxyEngine::loadResources( const Uint8 flags )
{ {
// load the strings. // load the strings.
CMessages Messages(p_exedata, Episode, ExeFile.isDemo(), version); CMessages Messages(p_exedata, Episode, ExeFile.isDemo(), version);
Messages.extractGlobalStrings(); Messages.extractGlobalStringsUsingExe();
mLoader.setPermilage(450); mLoader.setPermilage(450);
} }
...@@ -248,6 +248,8 @@ bool GalaxyEngine::loadResources( const Uint8 flags ) ...@@ -248,6 +248,8 @@ bool GalaxyEngine::loadResources( const Uint8 flags )
{ {
mLoader.setPermilage(50); mLoader.setPermilage(50);
const int episode = gBehaviorEngine.getEpisode();
if( (mFlags & LOADGFX) == LOADGFX ) if( (mFlags & LOADGFX) == LOADGFX )
{ {
// Decode the entire graphics for the game (Only EGAGRAPH.CK?) // Decode the entire graphics for the game (Only EGAGRAPH.CK?)
...@@ -265,9 +267,8 @@ bool GalaxyEngine::loadResources( const Uint8 flags ) ...@@ -265,9 +267,8 @@ bool GalaxyEngine::loadResources( const Uint8 flags )
if( (mFlags & LOADSTR) == LOADSTR ) if( (mFlags & LOADSTR) == LOADSTR )
{ {
// load the strings. // load the strings.
/*CMessages Messages(p_exedata, Episode, ExeFile.isDemo(), version); CMessages Messages(nullptr, episode, false, 0);
Messages.extractGlobalStrings(); Messages.extractGlobalStringsUsingPython();
mLoader.setPermilage(450);*/
} }
...@@ -284,9 +285,7 @@ bool GalaxyEngine::loadResources( const Uint8 flags ) ...@@ -284,9 +285,7 @@ bool GalaxyEngine::loadResources( const Uint8 flags )
gLogging.ftextOut("Loading game constants...<br>"); gLogging.ftextOut("Loading game constants...<br>");
/* gBehaviorEngine.getPhysicsSettings().loadGameConstants(episode, nullptr);
gBehaviorEngine.getPhysicsSettings().loadGameConstants(Episode, p_exedata);
*/
gLogging.ftextOut("Done loading the resources...<br>"); gLogging.ftextOut("Done loading the resources...<br>");
......
...@@ -2543,7 +2543,7 @@ void CPlayerLevel::verifyFalling() ...@@ -2543,7 +2543,7 @@ void CPlayerLevel::verifyFalling()
// Falling code // Falling code
void CPlayerLevel::processFalling() void CPlayerLevel::processFalling()
{ {
// Check Keen could hang on a cliff and do so if possible // Check Keen could hang on a cliff and do so if possible
if(checkandtriggerforCliffHanging()) if(checkandtriggerforCliffHanging())
return; return;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
namespace galaxy namespace galaxy
{ {
const int FONT_ID = 0; //constexpr int FONT_ID = 0;
CMessageBoxBitmapGalaxy::CMessageBoxBitmapGalaxy(int sprVar, CMessageBoxBitmapGalaxy::CMessageBoxBitmapGalaxy(int sprVar,
const std::string& Text, const std::string& Text,
......
...@@ -48,13 +48,13 @@ CMapLoaderGalaxy(ObjectPtr, inventoryVec) ...@@ -48,13 +48,13 @@ CMapLoaderGalaxy(ObjectPtr, inventoryVec)
// 31 seem to be the stoppers, those are not created because the platform // 31 seem to be the stoppers, those are not created because the platform
// get this from the object map directly // get this from the object map directly
constexpr unsigned int PLATFORM_HORIZ_ALT = 28; //constexpr unsigned int PLATFORM_HORIZ_ALT = 28;
constexpr unsigned int PLATFORM_VERT = 29; //constexpr unsigned int PLATFORM_VERT = 29;
constexpr unsigned int PLATFORM_HORIZ = 30; //constexpr unsigned int PLATFORM_HORIZ = 30;
// 31 does not count, because it's a blocker. // 31 does not count, because it's a blocker.
constexpr unsigned int PLATFORM_DROP = 32; //constexpr unsigned int PLATFORM_DROP = 32;
constexpr unsigned int DIVE_SUIT = 35; //constexpr unsigned int DIVE_SUIT = 35;
bool CMapLoaderGalaxyEp5::isKeenPlayer(const int foeID) bool CMapLoaderGalaxyEp5::isKeenPlayer(const int foeID)
{ {
......
...@@ -164,7 +164,7 @@ bool VorticonEngine::loadResources( const Uint8 flags ) ...@@ -164,7 +164,7 @@ bool VorticonEngine::loadResources( const Uint8 flags )
{ {
// load the strings. // load the strings.
CMessages Messages(p_exedata, mEp, false, version); CMessages Messages(p_exedata, mEp, false, version);
Messages.extractGlobalStrings(); Messages.extractGlobalStringsUsingExe();
mLoader.setPermilage(500); mLoader.setPermilage(500);
} }
......
...@@ -15,7 +15,7 @@ GsButton(text, ev) ...@@ -15,7 +15,7 @@ GsButton(text, ev)
} }
void Button::setupButtonSurface() void Button::setupButtonSurface(const std::string &)
{ {
GsFont &Font = gGraphics.getFont(mFontID); GsFont &Font = gGraphics.getFont(mFontID);
......
#ifndef __VORTICONBUTTON_H__ #ifndef VORTICONBUTTON_H
#define __VORTICONBUTTON_H__ #define VORTICONBUTTON_H
#include <widgets/GsButton.h> #include <widgets/GsButton.h>
...@@ -16,7 +16,7 @@ public: ...@@ -16,7 +16,7 @@ public:
private: private:
void setupButtonSurface(); void setupButtonSurface(const std::string &);
void drawVorticonStyle(SDL_Rect& lRect); void drawVorticonStyle(SDL_Rect& lRect);
...@@ -24,4 +24,4 @@ private: ...@@ -24,4 +24,4 @@ private:
} }
#endif /* __VORTICONBUTTON_H__ */ #endif /* VORTICONBUTTON_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment