aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus/neighborhood/tsa/fulltsa.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2012-09-21 02:18:54 +0200
committerJohannes Schickel2012-09-21 02:35:50 +0200
commit8aceef971106ba35ab234b165dbe6e19c842f336 (patch)
treedc1286a31068872960cd3d5925acba78a2b912a7 /engines/pegasus/neighborhood/tsa/fulltsa.cpp
parentb0079f4fa67099cec2c58e7907bf3fe09d0755cf (diff)
downloadscummvm-rg350-8aceef971106ba35ab234b165dbe6e19c842f336.tar.gz
scummvm-rg350-8aceef971106ba35ab234b165dbe6e19c842f336.tar.bz2
scummvm-rg350-8aceef971106ba35ab234b165dbe6e19c842f336.zip
PEGASUS: Replace FunctionPtr by our Functor code in Common.
This "fixes" a segmentation fault in our buildbot's toolchain for DC. The segmentation fault occured while compiling engines/pegasus/ai/ai_condition.cpp. Thanks to clone2727 for looking over this and testing it.
Diffstat (limited to 'engines/pegasus/neighborhood/tsa/fulltsa.cpp')
-rw-r--r--engines/pegasus/neighborhood/tsa/fulltsa.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/pegasus/neighborhood/tsa/fulltsa.cpp b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
index 2269ea7122..98c70aa09d 100644
--- a/engines/pegasus/neighborhood/tsa/fulltsa.cpp
+++ b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
@@ -663,8 +663,8 @@ void FullTSA::init() {
entry->hotspotItem = kPegasusBiochip;
}
-void uncreatedInTSAFunction(FunctionPtr *, void *tsa) {
- ((FullTSA *)tsa)->die(kDeathUncreatedInTSA);
+void FullTSA::dieUncreatedInTSA() {
+ die(kDeathUncreatedInTSA);
}
void FullTSA::start() {
@@ -672,7 +672,7 @@ void FullTSA::start() {
if (!GameState.getScoringEnterTSA()) {
_utilityFuse.primeFuse(GameState.getTSAFuseTimeLimit());
- _utilityFuse.setFunctionPtr(&uncreatedInTSAFunction, (void *)this);
+ _utilityFuse.setFunctor(new Common::Functor0Mem<void, FullTSA>(this, &FullTSA::dieUncreatedInTSA));
_utilityFuse.lightFuse();
} else if (GameState.getTSAState() == kTSAPlayerDetectedRip || GameState.getTSAState() == kTSAPlayerNeedsHistoricalLog) {
_ripTimer.initImage();