Commit 52c2925b authored by Gerhard Stein's avatar Gerhard Stein

Message Box code cutoffs

parent d99389b0
......@@ -282,8 +282,7 @@ void CPlayGameGalaxy::looseManagement( const int playerID,
if(allGameOver) // Game over?
{
const std::string end_text("GAME OVER!\n");
eventContainer.add( new EventSendDialog(end_text) );
eventContainer.add( new EventEndGamePlay() );
showMsg(end_text, new EventEndGamePlay());
return;
}
else if(allDead) // not yet!
......@@ -320,57 +319,10 @@ void CPlayGameGalaxy::pumpEvent(const CEvent *evPtr)
// In this part we will poll all the relevant Events that are important for the
// Galaxy Main Engine itself. For example, load map, setup world map, show Highscore
// are some of those events.
CEventContainer &eventContainer = gEventManager;
if( const EventSendBitmapDialogMsg *ev = dynamic_cast<const EventSendBitmapDialogMsg*>(evPtr) )
{
std::unique_ptr<CMessageBoxBitmapGalaxy> pMsgBox( new CMessageBoxBitmapGalaxy( ev->Msg, ev->BitmapRef, ev->Direction ) );
pMsgBox->init();
// Create the special merge effect (Fadeout) if requested
if( gEffectController.runningEffect() )
{
CColorMerge *pColorMerge = dynamic_cast<CColorMerge*>(gEffectController.Effect());
if( pColorMerge != NULL )
{
SDL_Surface *fxSfc = pColorMerge->getSfc().get();
SDL_Rect cutRect = pMsgBox->getRect();
SDL_Surface *msgSfc = pMsgBox->getSfc();
SDL_BlitSurface(msgSfc, NULL, fxSfc, &cutRect);
}
CDimDark *pDimDark = dynamic_cast<CDimDark*>(gEffectController.Effect());
if( pDimDark != NULL )
{
SDL_Surface *fxSfc = pDimDark->getSfc().get();
SDL_Surface *darkSfc = pDimDark->getDarkSfc().get();
SDL_Rect cutRect = pMsgBox->getRect();
SDL_Surface *msgSfc = pMsgBox->getSfc();
SDL_BlitSurface(msgSfc, NULL, fxSfc, &cutRect);
SDL_BlitSurface(msgSfc, NULL, darkSfc, &cutRect);
}
}
gInput.flushAll();
mMessageBoxes.push_back( move(pMsgBox) );
}
else if( const EventSendBitmapDialogMessages *ev = dynamic_cast<const EventSendBitmapDialogMessages*>(evPtr) )
{
for( auto &it : ev->msgs )
{
std::unique_ptr<CMessageBoxBitmapGalaxy> pMsgBox( new CMessageBoxBitmapGalaxy( it->Msg, it->BitmapRef, it->Direction ) );
pMsgBox->init();
mMessageBoxes.push_back( move(pMsgBox) );
}
gInput.flushAll();
}
else if( const EventSendDialog *ev = dynamic_cast<const EventSendDialog*>(evPtr) )
if( const EventSendDialog *ev = dynamic_cast<const EventSendDialog*>(evPtr) )
{
std::unique_ptr<CMessageBoxGalaxy> pMsgBox( new CMessageBoxGalaxy( ev->Msg ) );
pMsgBox->init();
mMessageBoxes.push_back( move(pMsgBox) );
mMessageBoxes.push_back( ev->mMsgBox );
gInput.flushAll();
}
else if( const EventSendSelectionDialogMsg* ev = dynamic_cast<const EventSendSelectionDialogMsg*>(evPtr) )
......@@ -382,66 +334,64 @@ void CPlayGameGalaxy::pumpEvent(const CEvent *evPtr)
mMessageBoxes.push_back( move(pMsgBox) );
}
//if(mMessageBoxes.empty())
else if( const EventEnterLevel *ev = dynamic_cast<const EventEnterLevel*>(evPtr) )
{
if( const EventEnterLevel *ev = dynamic_cast<const EventEnterLevel*>(evPtr) )
if(ev->data >= 0xC000) // Start a new level!
{
if(ev->data >= 0xC000) // Start a new level!
const Uint16 NewLevel = ev->data - 0xC000;
if(NewLevel < 50)
{
const Uint16 NewLevel = ev->data - 0xC000;
if(NewLevel < 50)
{
g_pMusicPlayer->stop();
m_WorldMap.setActive(false);
m_LevelPlay.loadLevel(NewLevel);
g_pSound->playSound( SOUND_ENTER_LEVEL );
m_LevelPlay.setActive(true);
}
g_pMusicPlayer->stop();
m_WorldMap.setActive(false);
m_LevelPlay.loadLevel(NewLevel);
g_pSound->playSound( SOUND_ENTER_LEVEL );
m_LevelPlay.setActive(true);
}
}
else if( dynamic_cast<const EventRestartLevel*>(evPtr) )
{
g_pMusicPlayer->stop();
m_LevelPlay.reloadLevel();
}
else if( const EventExitLevel *ev = dynamic_cast<const EventExitLevel*>(evPtr) )
{
m_LevelPlay.setActive(false);
m_WorldMap.setActive(true);
m_WorldMap.loadAndPlayMusic();
}
else if( dynamic_cast<const EventRestartLevel*>(evPtr) )
{
g_pMusicPlayer->stop();
m_LevelPlay.reloadLevel();
}
else if( const EventExitLevel *ev = dynamic_cast<const EventExitLevel*>(evPtr) )
{
m_LevelPlay.setActive(false);
m_WorldMap.setActive(true);
m_WorldMap.loadAndPlayMusic();
const EventExitLevel &evCopy = *ev;
const EventExitLevel &evCopy = *ev;
eventContainer.add( new EventPlayerEndLevel(evCopy) );
}
else if( const EventDieKeenPlayer *ev = dynamic_cast<const EventDieKeenPlayer*>(evPtr) )
{
looseManagement(ev->playerID,
ev->gameOver,
ev->levelObj,
ev->levelName);
gEventManager.add( new EventPlayerEndLevel(evCopy) );
}
else if( const EventDieKeenPlayer *ev = dynamic_cast<const EventDieKeenPlayer*>(evPtr) )
{
looseManagement(ev->playerID,
ev->gameOver,
ev->levelObj,
ev->levelName);
}
else if( const EventExitLevelWithFoot *ev = dynamic_cast<const EventExitLevelWithFoot*>(evPtr) )
{
g_pMusicPlayer->stop();
m_LevelPlay.setActive(false);
m_WorldMap.setActive(true);
m_WorldMap.loadAndPlayMusic();
eventContainer.add( new EventPlayerRideFoot(*ev) );
}
else if( const EventPlayTrack *ev = dynamic_cast<const EventPlayTrack*>(evPtr) )
{
g_pMusicPlayer->stop();
if( g_pMusicPlayer->loadTrack(m_ExeFile, ev->track) )
g_pMusicPlayer->play();
}
else if( dynamic_cast<const EventEndGamePlay*>(evPtr) )
{
m_endgame = true;
}
}
else if( const EventExitLevelWithFoot *ev = dynamic_cast<const EventExitLevelWithFoot*>(evPtr) )
{
g_pMusicPlayer->stop();
m_LevelPlay.setActive(false);
m_WorldMap.setActive(true);
m_WorldMap.loadAndPlayMusic();
gEventManager.add( new EventPlayerRideFoot(*ev) );
}
else if( const EventPlayTrack *ev = dynamic_cast<const EventPlayTrack*>(evPtr) )
{
g_pMusicPlayer->stop();
if( g_pMusicPlayer->loadTrack(m_ExeFile, ev->track) )
g_pMusicPlayer->play();
}
else if( dynamic_cast<const EventEndGamePlay*>(evPtr) )
{
m_endgame = true;
}
m_WorldMap.pumpEvent(evPtr);
m_LevelPlay.pumpEvent(evPtr);
}
......@@ -454,9 +404,6 @@ void CPlayGameGalaxy::ponder(const float deltaT)
if(g_pSound->pauseGamePlay() )
return;
CEventContainer &eventContainer = gEventManager;
//eventContainer.update();
if( !gMenuController.active() )
{
processInput();
......@@ -523,18 +470,18 @@ void CPlayGameGalaxy::ponder(const float deltaT)
m_Cheatmode.jump = !m_Cheatmode.jump;
std::string jumpstring = "Jump-Cheat has been ";
jumpstring += ((m_Cheatmode.jump) ? "enabled" : "disabled");
eventContainer.add( new EventSendDialog(jumpstring) );
showMsg(jumpstring);
}
else if(gInput.getHoldedKey(KG))
{
m_Cheatmode.god = !m_Cheatmode.god;
std::string godstring = "God-Mode has been ";
godstring += ((m_Cheatmode.god) ? "enabled" : "disabled");
eventContainer.add( new EventSendDialog(godstring) );
showMsg(godstring);
}
else if(gInput.getHoldedKey(KI))
{
eventContainer.add( new EventSendDialog("Get all Items!") );
showMsg("Get all Items!");
for( auto &inv : mInventoryVec )
inv.Item.triggerAllItemsCheat();
......@@ -544,7 +491,7 @@ void CPlayGameGalaxy::ponder(const float deltaT)
else if(gInput.getHoldedKey(KN))
{
m_Cheatmode.noclipping = true;
eventContainer.add( new EventSendDialog("No clipping toggle!") );
showMsg("No clipping toggle!");
}
else if(gInput.getHoldedKey(KS))
{
......@@ -554,7 +501,7 @@ void CPlayGameGalaxy::ponder(const float deltaT)
m_Cheatmode.items = true;
m_Cheatmode.god = true;
m_Cheatmode.jump = true;
eventContainer.add( new EventSendDialog("Super Cheat!") );
showMsg("Super Cheat!");
}
}
......
......@@ -66,12 +66,6 @@ private:
std::vector<bool> mGameOver;
};
struct ShowBmpMsgAndTrigger : EventSendBitmapDialogMessages
{
ShowBmpMsgAndTrigger( std::vector< std::shared_ptr<EventSendBitmapDialogMsg> > lMsgs ) :
EventSendBitmapDialogMessages(lMsgs) {}
};
}
#endif /* CPLAYGAMEGALAXY_H_ */
......@@ -69,9 +69,9 @@ void CMessageBoxBitmapGalaxy::init()
void showMsgWithBmp( const std::string &text,
const std::string &bmp,
const direction_t alignment,
CEvent *closeEv)
const std::string &bmp,
const direction_t alignment,
CEvent *closeEv)
{
CMessageBoxBitmapGalaxy *pMsgBoxBmp =
new CMessageBoxBitmapGalaxy( text,
......@@ -99,5 +99,4 @@ void showMsgWithBmp( const std::string &text,
}
}
......@@ -26,7 +26,7 @@ public:
*/
CMessageBoxBitmapGalaxy(const std::string& Text, const GsBitmap &BitmapRef,
const direction_t alignment,
CEvent *closeEv);
CEvent *closeEv = nullptr);
virtual ~CMessageBoxBitmapGalaxy() {}
......@@ -39,9 +39,10 @@ private:
void showMsgWithBmp(const std::string &text,
const std::string &bmp,
const direction_t alignment ,
const direction_t alignment,
const CEvent *closeEv = nullptr);
void showMsgWithBmp(const std::string &text,
const unsigned int bmpID,
const direction_t alignment ,
......
......@@ -147,9 +147,9 @@ void showMsg( const std::string &text, CEvent *closeEv )
}
void showMsgVec(std::vector<CMessageBoxGalaxy *> &msgs )
void showMsgVec( std::vector<CMessageBoxGalaxy*> &msgs )
{
// TODO: Code for joining
// TODO: Code for joining
}
......
......@@ -72,7 +72,7 @@ struct EventSendDialog : CEvent
mMsgBox( msgBox ) {}
};
void showMsgVec( std::vector< CMessageBoxGalaxy* > &msgs );
void showMsgVec( std::vector<CMessageBoxGalaxy*> &msgs );
}
......
......@@ -7,6 +7,7 @@
#include "CCouncilMember.h"
#include "../../common/ai/CPlayerLevel.h"
#include "../../common/dialog/CMessageBoxBitmapGalaxy.h"
#include "misc.h"
#include "sdl/sound/CSound.h"
#include "sdl/music/CMusic.h"
......@@ -118,8 +119,6 @@ void CCouncilMember::process()
void CCouncilMember::performJanitorMode()
{
CEventContainer& EventContainer = gEventManager;
std::string elder_text[4];
elder_text[0] = g_pBehaviorEngine->getString("JANITOR_TEXT1");
......@@ -127,23 +126,14 @@ void CCouncilMember::performJanitorMode()
elder_text[2] = g_pBehaviorEngine->getString("JANITOR_TEXT3");
elder_text[3] = g_pBehaviorEngine->getString("JANITOR_TEXT4");
std::vector< std::shared_ptr<EventSendBitmapDialogMsg> > msgs;
std::unique_ptr<EventSendBitmapDialogMsg> msg1(
new EventSendBitmapDialogMsg(gGraphics.getBitmapFromId(104), elder_text[0], LEFT) );
std::unique_ptr<EventSendBitmapDialogMsg> msg2(
new EventSendBitmapDialogMsg(gGraphics.getBitmapFromId(104), elder_text[1], LEFT) );
std::unique_ptr<EventSendBitmapDialogMsg> msg3(
new EventSendBitmapDialogMsg(*gGraphics.getBitmapFromStr("KEENTALKING"), elder_text[2], RIGHT) );
std::unique_ptr<EventSendBitmapDialogMsg> msg4(
new EventSendBitmapDialogMsg(gGraphics.getBitmapFromId(104), elder_text[3], LEFT) );
std::vector<CMessageBoxGalaxy*> msgs;
msgs.push_back( move(msg1) );
msgs.push_back( move(msg2) );
msgs.push_back( move(msg3) );
msgs.push_back( move(msg4) );
msgs.push_back( new CMessageBoxBitmapGalaxy(elder_text[0], gGraphics.getBitmapFromId(104), LEFT) );
msgs.push_back( new CMessageBoxBitmapGalaxy(elder_text[1], gGraphics.getBitmapFromId(104), LEFT) );
msgs.push_back( new CMessageBoxBitmapGalaxy(elder_text[2], *gGraphics.getBitmapFromStr("KEENTALKING"), RIGHT) );
msgs.push_back( new CMessageBoxBitmapGalaxy(elder_text[3], gGraphics.getBitmapFromId(104), LEFT) );
EventContainer.add( new EventSendBitmapDialogMessages(msgs) );
showMsgVec( msgs );
rescued = true;
}
......@@ -155,7 +145,6 @@ void CCouncilMember::getTouchedBy(CSpriteObject &theObject)
return;
// When Keen touches the Council Member exit the level and add one to the council list
//if( typeid(theObject) == typeid(CPlayerLevel) )
if( CPlayerBase *player = dynamic_cast<CPlayerBase*>(&theObject) )
{
int &rescuedelders = player->m_Inventory.Item.m_special.ep4.elders;
......@@ -186,44 +175,45 @@ void CCouncilMember::getTouchedBy(CSpriteObject &theObject)
}
std::vector< std::shared_ptr<EventSendBitmapDialogMsg> > msgs;
std::vector<CMessageBoxGalaxy*> msgs;
std::unique_ptr<EventSendBitmapDialogMsg> msg1(
new EventSendBitmapDialogMsg(gGraphics.getBitmapFromId(104), elder_text[0], LEFT));
std::unique_ptr<EventSendBitmapDialogMsg> msg2(
new EventSendBitmapDialogMsg(*gGraphics.getBitmapFromStr("KEENTHUMBSUP"), elder_text[1], RIGHT));
msgs.push_back( move(msg1) );
msgs.push_back( move(msg2) );
msgs.push_back( new CMessageBoxBitmapGalaxy(elder_text[0], gGraphics.getBitmapFromId(104), LEFT) );
gEventManager.add( new EventSendBitmapDialogMessages(msgs) );
rescuedelders++;
if(rescuedelders >= NumberToRescue) // In this case the game ends.
{
std::unique_ptr<EventSendBitmapDialogMsg> msg1(
new EventSendBitmapDialogMsg(*gGraphics.getBitmapFromStr("KEENTHUMBSUP"),
g_pBehaviorEngine->getString(answermap[8]),
RIGHT));
msgs.push_back( new CMessageBoxBitmapGalaxy(elder_text[1],
*gGraphics.getBitmapFromStr("KEENTHUMBSUP"),
RIGHT) );
msgs.push_back( new CMessageBoxBitmapGalaxy(g_pBehaviorEngine->getString(answermap[8]),
*gGraphics.getBitmapFromStr("KEENTHUMBSUP"), RIGHT) );
std::unique_ptr<EventSendBitmapDialogMsg> new CMessageBoxBitmapGalaxy
msgs.push_back( move(msg1) );
const std::string end_text("End of Episode.\n"
"The game will be restarted.\n"
"You can replay it again or\n"
"try another Episode for more fun!\n"
"The original epilog is under construction.");
gEventManager.add( new EventSendDialog(end_text) );
gEventManager.add( new EventEndGamePlay() );
msgs.push_back( new CMessageBoxGalaxy(end_text, new EventEndGamePlay()) );
}
else
{
gEventManager.add( new EventExitLevel(mp_Map->getLevel(), true, false, mSprVar) );
msgs.push_back( new CMessageBoxBitmapGalaxy(
elder_text[1],
*gGraphics.getBitmapFromStr("KEENTHUMBSUP"),
RIGHT,
new EventExitLevel(mp_Map->getLevel(), true, false, mSprVar)) );
}
showMsgVec( msgs );
player->m_Inventory.Item.m_gem.clear();
rescued = true;
......
......@@ -7,6 +7,7 @@
#include "CDiveSuit.h"
#include "../../common/ai/CPlayerLevel.h"
#include "../../common/dialog/CMessageBoxBitmapGalaxy.h"
namespace galaxy {
......@@ -37,10 +38,9 @@ void CDiveSuit::getTouchedBy(CSpriteObject &theObject)
g_pSound->playSound( SOUND_GET_WETSUIT, PLAY_PAUSEALL );
taken = swimsuit = true;
EventContainer.add( new EventSendBitmapDialogMsg(*gGraphics.getBitmapFromStr("KEENTHUMBSUP"),
g_pBehaviorEngine->getString("SWIM_SUIT_TEXT"), LEFT) );
showMsgWithBmp("SWIM_SUIT_TEXT", "KEENTHUMBSUP", LEFT,
new EventExitLevel(mp_Map->getLevel(), true, false, mSprVar));
EventContainer.add( new EventExitLevel(mp_Map->getLevel(), true, false, mSprVar) );
player->m_Inventory.Item.m_gem.clear();
}
}
......
......@@ -7,6 +7,7 @@
#include "CLindsey.h"
#include "../../common/ai/CPlayerLevel.h"
#include "../../common/dialog/CMessageBoxBitmapGalaxy.h"
namespace galaxy {
......@@ -81,19 +82,13 @@ void CLindsey::getTouchedBy(CSpriteObject &theObject)
}
std::vector< std::shared_ptr<EventSendBitmapDialogMsg> > msgs;
std::vector<CMessageBoxGalaxy*> msgs;
std::unique_ptr<EventSendBitmapDialogMsg> msg1(
new EventSendBitmapDialogMsg(gGraphics.getBitmapFromId(108), lindsey_text[0], LEFT) );
std::unique_ptr<EventSendBitmapDialogMsg> msg2(
new EventSendBitmapDialogMsg(gGraphics.getBitmapFromId(108), lindsey_text[1], LEFT) );
std::unique_ptr<EventSendBitmapDialogMsg> msg3(
new EventSendBitmapDialogMsg(*gGraphics.getBitmapFromStr("KEENTHUMBSUP"), lindsey_text[2], RIGHT) );
msgs.push_back( move(msg1) );
msgs.push_back( move(msg2) );
msgs.push_back( move(msg3) );
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) );
EventContainer.add( new EventSendBitmapDialogMessages(msgs) );
showMsgVec( msgs );
prepareToVanish = true;
}
......
#include "CGrabbiter.h"
#include "../../common/ai/CPlayerBase.h"
#include "../../common/dialog/CMessageBoxGalaxy.h"
namespace galaxy
{
......@@ -55,7 +56,8 @@ void CGrabbiter::getTouchedBy(CSpriteObject& theObject)
player->m_Inventory.Item.m_special.ep6.sandwich--;
// Show grabbiter message
EventContainer.add( new EventSendDialog( g_pBehaviorEngine->getString("KEEN_GRABBITER_SLEEPY") ) );
showMsg( g_pBehaviorEngine->getString("KEEN_GRABBITER_SLEEPY") );
setAction(A_GRABBITER_NAPPING);
playSound(SOUND_GRABBITER_SLEEP);
}
......@@ -65,7 +67,7 @@ void CGrabbiter::getTouchedBy(CSpriteObject& theObject)
g_pSound->playSound(SOUND_GRABBITER_HUNGRY, PLAY_PAUSEALL);
// Show grabbiter message
EventContainer.add( new EventSendDialog( g_pBehaviorEngine->getString("KEEN_GRABBITER_HUNGRY") ) );
showMsg( g_pBehaviorEngine->getString("KEEN_GRABBITER_HUNGRY") );
}
}
}
......
#include "CMolly.h"
#include "../../common/ai/CPlayerBase.h"
#include "../../common/dialog/CMessageBoxBitmapGalaxy.h"
namespace galaxy
{
......@@ -48,25 +49,20 @@ void CMolly::getTouchedBy(CSpriteObject& theObject)
{
CEventContainer& EventContainer = gEventManager;
std::vector< std::shared_ptr<EventSendBitmapDialogMsg> > msgs;
std::unique_ptr<EventSendBitmapDialogMsg> msg1(
new EventSendBitmapDialogMsg(gGraphics.getBitmapFromId(3), "Thanks for the rescue", LEFT));
std::unique_ptr<EventSendBitmapDialogMsg> msg2(
new EventSendBitmapDialogMsg(*gGraphics.getBitmapFromStr("KEENTHUMBSUP"), "Null Problemo", RIGHT));
msgs.push_back( move(msg1) );
msgs.push_back( move(msg2) );
EventContainer.add( new EventSendBitmapDialogMessages(msgs) );
const std::string end_text("End of Episode.\n"
"The game will be restarted.\n"
"You can replay it again or\n"
"try another Episode for more fun!\n"
"The original epilog is under construction.");
EventContainer.add( new EventSendDialog(end_text) );
EventContainer.add( new EventEndGamePlay() );
std::vector<CMessageBoxGalaxy*> msgs;
msgs.push_back( new CMessageBoxBitmapGalaxy( "Thanks for the rescue", gGraphics.getBitmapFromId(3), LEFT) );
msgs.push_back( new CMessageBoxBitmapGalaxy( "Null Problemo", *gGraphics.getBitmapFromStr("KEENTHUMBSUP"), RIGHT ) );
const std::string end_text("End of Episode.\n"
"The game will be restarted.\n"
"You can replay it again or\n"
"try another Episode for more fun!\n"
"The original epilog is under construction.");
msgs.push_back( new CMessageBoxGalaxy( end_text, new EventEndGamePlay() ) );
showMsgVec(msgs);
rescued = true;
}
......
......@@ -3,7 +3,7 @@
#include "../../common/ai/CPlayerLevel.h"
#include "../../common/dialog/CMessageBoxGalaxy.h"
#include "../../common/dialog/CMessageBoxBitmapGalaxy.h"
/*
......@@ -237,10 +237,10 @@ void CNospike::getTouchedBy(CSpriteObject& theObject)
{
if( mCanFinishGame && getActionNumber(A_NOSPIKE_STUNNED) ) // This will only happen in the Keen 8 Mod!
{
std::vector< CMessageBoxGalaxy* > msg;
std::vector<CMessageBoxGalaxy*> msg;
msg.push_back( new CMessageBoxBitmapGalaxy(gGraphics.getBitmapFromId(3), "Thanks for the rescue", LEFT));
msg.push_back( new CMessageBoxBitmapGalaxy(*gGraphics.getBitmapFromStr("KEENTHUMBSUP"), "Null Problemo", RIGHT));
msg.push_back( new CMessageBoxBitmapGalaxy( "Thanks for the rescue", gGraphics.getBitmapFromId(3), LEFT));
msg.push_back( new CMessageBoxBitmapGalaxy( "Null Problemo", *gGraphics.getBitmapFromStr("KEENTHUMBSUP"), RIGHT));
const std::string end_text("End of Episode.\n"
"The game will be restarted.\n"
......@@ -248,7 +248,7 @@ void CNospike::getTouchedBy(CSpriteObject& theObject)
"try another Episode for more fun!\n"
"The original epilog is under construction.");
msg.push_back( new CMessageBoxGalaxy(end_text, new EventEndGamePlay()) )
msg.push_back( new CMessageBoxGalaxy(end_text, new EventEndGamePlay()) );
showMsgVec(msg);
......
#include "CRocket.h"
#include "../../common/ai/CPlayerBase.h"
#include "../../common/dialog/CMessageBoxBitmapGalaxy.h"
namespace galaxy
......@@ -135,12 +136,7 @@ void CRocket::getTouchedBy(CSpriteObject& theObject)
else
{
// Tell the player he cannot climb yet
CEventContainer& EventContainer = gEventManager;
EventContainer.add( new EventSendBitmapDialogMsg(
gGraphics.getBitmapFromId(29),
g_pBehaviorEngine->getString("KEEN_KEYCARD_REQUIRED"),
RIGHT) );
showMsgWithBmp(g_pBehaviorEngine->getString("KEEN_KEYCARD_REQUIRED"), 29, RIGHT);
player->moveYDir((1<<CSF)/2);
}
}
......
#include "CSpecialItem.h"
#include "../../common/ai/CPlayerBase.h"
#include "../../common/dialog/CMessageBoxBitmapGalaxy.h"
namespace galaxy
{
......@@ -31,9 +32,7 @@ void CSpecialItem::getTouchedBy(CSpriteObject& theObject)
g_pSound->playSound(SOUND_GET_SPECIAL_ITEM, PLAY_PAUSEALL);
// Show got item message
EventContainer.add( new EventSendBitmapDialogMsg(
gGraphics.getBitmapFromId(30),g_pBehaviorEngine->getString(answermap[mFoeID-0x63]), LEFT) );
showMsgWithBmp( g_pBehaviorEngine->getString(answermap[mFoeID-0x63]), 30, LEFT );
switch(mFoeID)
{
......
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