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

More python support

parent c09ec283
This diff is collapsed.
...@@ -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