From b757e22f881797f51fa1fb951dd78a88d3ae15d9 Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Fri, 16 Sep 2011 12:23:26 +0000 Subject: NEVERHOOD: Multiple changes to make the game logic code cleaner (hopefully :) - Introduce Scene::insertStaticSprite to create static sprites instead of the old "addSprite(new StaticSprite" (not used everywhere yet) - Introduce macro InsertKlayman to create the Klayman object - Change sendMessage semantics from "receiver->sendMessage(num,arg,sender)" to "sendMessage(receiver,num,arg)", the sender is always the sending object ("this") - Similar changes using macros will follow - And fixed a bug in the elevator --- engines/neverhood/diskplayerscene.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/neverhood/diskplayerscene.cpp') diff --git a/engines/neverhood/diskplayerscene.cpp b/engines/neverhood/diskplayerscene.cpp index dd2c837dbd..3eeef9204d 100644 --- a/engines/neverhood/diskplayerscene.cpp +++ b/engines/neverhood/diskplayerscene.cpp @@ -225,10 +225,10 @@ uint32 DiskplayerPlayButton::handleMessage(int messageNum, const MessageParam &p case 0x1011: if (!_diskplayerScene->getFlag3()) { if (_isPlaying) { - _diskplayerScene->sendMessage(0x2001, 0, this); + sendMessage(_diskplayerScene, 0x2001, 0); release(); } else { - _diskplayerScene->sendMessage(0x2000, 0, this); + sendMessage(_diskplayerScene, 0x2000, 0); press(); } } @@ -500,7 +500,7 @@ uint32 DiskplayerScene::handleMessage(int messageNum, const MessageParam ¶m, case 0x0001: // TODO: Debug/Cheat if (param.asPoint().x <= 20 || param.asPoint().x >= 620) { - _parentModule->sendMessage(0x1009, 0, this); + sendMessage(_parentModule, 0x1009, 0); } else if (!_flag3 && param.asPoint().x > 38 && param.asPoint().x < 598 && param.asPoint().y > 400 && param.asPoint().y < 460) { -- cgit v1.2.3