Commit 92951ed0 authored by Gerhard Stein's avatar Gerhard Stein

More python support, dying improvements, Version update

parent f56b3fb6
v1.9.8.3:
---------
- Hackable Lindsey Messages through python3
- Problems with doors and ship levels fixed
v1.9.8.2:
----------
- More python support. Oracle Member Texts are fully hackable
- More Computer Wrist and Page stuff to read within the game
v1.9.7:
----------
- More python support
......
......@@ -336,6 +336,9 @@ bool CCamera::outOfSight()
else if( playerDown < camY - cam_height )
outofsight |= true;
if(mp_Map)
return outofsight;
}
......
......@@ -635,7 +635,7 @@ void CPlayerBase::processDying()
{
dead = true;
honorPriority = true;
}
}
}
......
......@@ -2871,6 +2871,8 @@ void CPlayerLevel::TurnGiantSwitchOn(const int x, const int y)
int CPlayerLevel::checkSolidU(int x1, int x2, int y1, const bool push_mode )
{
if(m_dying) return 0;
if(hitdetectWithTilePropertyHor(1, x1, x2, y1-COLISION_RES, 1<<CSF))
return 0;
......@@ -2942,6 +2944,8 @@ int CPlayerLevel::checkSolidD( int x1, int x2, int y2, const bool push_mode )
{
std::vector<CTileProperties> &TileProperty = gpBehaviorEngine->getTileProperties();
if(m_dying) return 0;
y2 += COLISION_RES;
// Check for sloped tiles here. They must be handled differently
......
......@@ -1016,10 +1016,10 @@ void CPlayerWM::startLevel(Uint16 object)
default : shipLevel = 0;
};
/*if(ep == 4)
if(ep == 4)
{
shipLevel = gKeenFiles.exeFile.getRawData()[0x60FD];
}*/
}
const Uint16 flag_dest = level + 0xF000;
......
......@@ -166,8 +166,9 @@ void CCouncilMember::getTouchedBy(CSpriteObject &theObject)
std::string elder_text[2];
// TODO: Inject python3 code here for own dialogs
// Python3 own dialogs
bool customDlgs = false;
#if USE_PYTHON3
auto pModule = gPython.loadModule( "messageMap", gKeenFiles.gameDir );
......
......@@ -63,7 +63,7 @@ void CLindsey::getTouchedBy(CSpriteObject &theObject)
{
g_pSound->playSound(SOUND_GET_WETSUIT, PLAY_PAUSEALL);
std::string lindsey_text[3];
std::array< std::string, 3> lindsey_text;
lindsey_text[0] = gpBehaviorEngine->getString(answermap[0]);
......@@ -82,9 +82,39 @@ void CLindsey::getTouchedBy(CSpriteObject &theObject)
std::vector<CMessageBoxGalaxy*> msgs;
msgs.push_back( new CMessageBoxBitmapGalaxy(lindsey_text[0], gGraphics.getBitmapFromId(108), LEFT) );
msgs.push_back( new CMessageBoxBitmapGalaxy(lindsey_text[1], gGraphics.getBitmapFromId(108), LEFT) );
msgs.push_back( new CMessageBoxBitmapGalaxy(lindsey_text[2], *gGraphics.getBitmapFromStr("KEENTHUMBSUP"), RIGHT) );
// Python3 own dialogs
bool customDlgs = false;
#if USE_PYTHON3
auto pModule = gPython.loadModule( "messageMap", gKeenFiles.gameDir );
if (pModule != nullptr)
{
customDlgs = true;
int level = mp_Map->getLevel();
bool ok = true;
ok &= loadStrFunction(pModule, "getLindseyDialog", lindsey_text[0], level);
ok &= loadStrFunction(pModule, "getLindseyAnswer", lindsey_text[1], level);
}
#endif
if(!customDlgs)
{
msgs.push_back( new CMessageBoxBitmapGalaxy(lindsey_text[0], gGraphics.getBitmapFromId(108), LEFT) );
msgs.push_back( new CMessageBoxBitmapGalaxy(lindsey_text[1], gGraphics.getBitmapFromId(108), LEFT) );
msgs.push_back( new CMessageBoxBitmapGalaxy(lindsey_text[2], *gGraphics.getBitmapFromStr("KEENTHUMBSUP"), RIGHT) );
}
else
{
msgs.push_back( new CMessageBoxBitmapGalaxy(lindsey_text[0], gGraphics.getBitmapFromId(108), LEFT) );
msgs.push_back( new CMessageBoxBitmapGalaxy(lindsey_text[1], *gGraphics.getBitmapFromStr("KEENTHUMBSUP"), RIGHT) );
}
showMsgVec( msgs );
......
#ifndef __CG__VERSION_H__
#define __CG__VERSION_H__
#define CGVERSION "1.9.8.2-Beta"
#define CGVERSION "1.9.8.3-Beta"
#endif
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