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 @@
class CMessages {
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);
......@@ -38,7 +49,7 @@ private:
bool extractEp6DemoStrings(std::map<std::string, std::string>& StringMap);
unsigned char *mp_exe;
char m_episode;
int m_episode;
bool m_demo;
int m_version;
......
......@@ -208,7 +208,7 @@ bool GalaxyEngine::loadResources( const Uint8 flags )
{
// load the strings.
CMessages Messages(p_exedata, Episode, ExeFile.isDemo(), version);
Messages.extractGlobalStrings();
Messages.extractGlobalStringsUsingExe();
mLoader.setPermilage(450);
}
......@@ -248,6 +248,8 @@ bool GalaxyEngine::loadResources( const Uint8 flags )
{
mLoader.setPermilage(50);
const int episode = gBehaviorEngine.getEpisode();
if( (mFlags & LOADGFX) == LOADGFX )
{
// Decode the entire graphics for the game (Only EGAGRAPH.CK?)
......@@ -265,9 +267,8 @@ bool GalaxyEngine::loadResources( const Uint8 flags )
if( (mFlags & LOADSTR) == LOADSTR )
{
// load the strings.
/*CMessages Messages(p_exedata, Episode, ExeFile.isDemo(), version);
Messages.extractGlobalStrings();
mLoader.setPermilage(450);*/
CMessages Messages(nullptr, episode, false, 0);
Messages.extractGlobalStringsUsingPython();
}
......@@ -284,9 +285,7 @@ bool GalaxyEngine::loadResources( const Uint8 flags )
gLogging.ftextOut("Loading game constants...<br>");
/*
gBehaviorEngine.getPhysicsSettings().loadGameConstants(Episode, p_exedata);
*/
gBehaviorEngine.getPhysicsSettings().loadGameConstants(episode, nullptr);
gLogging.ftextOut("Done loading the resources...<br>");
......
......@@ -2543,7 +2543,7 @@ void CPlayerLevel::verifyFalling()
// Falling code
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())
return;
......
......@@ -14,7 +14,7 @@
namespace galaxy
{
const int FONT_ID = 0;
//constexpr int FONT_ID = 0;
CMessageBoxBitmapGalaxy::CMessageBoxBitmapGalaxy(int sprVar,
const std::string& Text,
......
......@@ -48,13 +48,13 @@ CMapLoaderGalaxy(ObjectPtr, inventoryVec)
// 31 seem to be the stoppers, those are not created because the platform
// get this from the object map directly
constexpr unsigned int PLATFORM_HORIZ_ALT = 28;
constexpr unsigned int PLATFORM_VERT = 29;
constexpr unsigned int PLATFORM_HORIZ = 30;
//constexpr unsigned int PLATFORM_HORIZ_ALT = 28;
//constexpr unsigned int PLATFORM_VERT = 29;
//constexpr unsigned int PLATFORM_HORIZ = 30;
// 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)
{
......
......@@ -164,7 +164,7 @@ bool VorticonEngine::loadResources( const Uint8 flags )
{
// load the strings.
CMessages Messages(p_exedata, mEp, false, version);
Messages.extractGlobalStrings();
Messages.extractGlobalStringsUsingExe();
mLoader.setPermilage(500);
}
......
......@@ -15,7 +15,7 @@ GsButton(text, ev)
}
void Button::setupButtonSurface()
void Button::setupButtonSurface(const std::string &)
{
GsFont &Font = gGraphics.getFont(mFontID);
......
#ifndef __VORTICONBUTTON_H__
#define __VORTICONBUTTON_H__
#ifndef VORTICONBUTTON_H
#define VORTICONBUTTON_H
#include <widgets/GsButton.h>
......@@ -16,7 +16,7 @@ public:
private:
void setupButtonSurface();
void setupButtonSurface(const std::string &);
void drawVorticonStyle(SDL_Rect& lRect);
......@@ -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