diff options
Diffstat (limited to 'engines/neverhood/module1000.cpp')
-rw-r--r-- | engines/neverhood/module1000.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/engines/neverhood/module1000.cpp b/engines/neverhood/module1000.cpp index 011ea9e1de..7c3c3ba138 100644 --- a/engines/neverhood/module1000.cpp +++ b/engines/neverhood/module1000.cpp @@ -410,27 +410,26 @@ Scene1001::Scene1001(NeverhoodEngine *vm, Module *parentModule, int which) if (which < 0) { setRectList(0x004B49F0); - _klayman = new KmScene1001(_vm, this, 200, 433); + InsertKlayman(KmScene1001, 200, 433); setMessageList(0x004B4888); } else if (which == 1) { setRectList(0x004B49F0); - _klayman = new KmScene1001(_vm, this, 640, 433); + InsertKlayman(KmScene1001, 640, 433); setMessageList(0x004B4898); } else if (which == 2) { setRectList(0x004B49F0); if (getGlobalVar(0xC0418A02)) { - _klayman = new KmScene1001(_vm, this, 390, 433); + InsertKlayman(KmScene1001, 390, 433); _klayman->setDoDeltaX(1); } else { - _klayman = new KmScene1001(_vm, this, 300, 433); + InsertKlayman(KmScene1001, 300, 433); } setMessageList(0x004B4970); } else { setRectList(0x004B4A00); - _klayman = new KmScene1001(_vm, this, 200, 433); + InsertKlayman(KmScene1001, 200, 433); setMessageList(0x004B4890); } - addSprite(_klayman); tempSprite = insertStaticSprite(0x2080A3A8, 1300); @@ -1425,7 +1424,7 @@ Scene1002::Scene1002(NeverhoodEngine *vm, Module *parentModule, int which) if (which < 0) { if (_vm->_gameState.field2 == 0) { - InsertKlayman(KmScene1002, 90, 226, (_class599, _ssLadderArch)); + InsertKlaymanInitArgs(KmScene1002, 90, 226, (_class599, _ssLadderArch)); _class478 = addSprite(new Class478(_vm, _klayman)); setMessageList(0x004B4270); _klayman->getSurface()->getClipRect().x1 = 31; @@ -1435,7 +1434,7 @@ Scene1002::Scene1002(NeverhoodEngine *vm, Module *parentModule, int which) _class478->getSurface()->getClipRect() = _klayman->getSurface()->getClipRect(); _klayman->setRepl(64, 0); } else { - InsertKlayman(KmScene1002, 379, 435, (_class599, _ssLadderArch)); + InsertKlaymanInitArgs(KmScene1002, 379, 435, (_class599, _ssLadderArch)); _class478 = addSprite(new Class478(_vm, _klayman)); setMessageList(0x004B4270); _klayman->getSurface()->getClipRect().x1 = _ssLadderArch->getSurface()->getDrawRect().x; @@ -1445,7 +1444,7 @@ Scene1002::Scene1002(NeverhoodEngine *vm, Module *parentModule, int which) _class478->getSurface()->getClipRect() = _klayman->getSurface()->getClipRect(); } } else if (which == 1) { - InsertKlayman(KmScene1002, 650, 435, (_class599, _ssLadderArch)); + InsertKlaymanInitArgs(KmScene1002, 650, 435, (_class599, _ssLadderArch)); _class478 = addSprite(new Class478(_vm, _klayman)); setMessageList(0x004B4478); _klayman->getSurface()->getClipRect().x1 = _ssLadderArch->getSurface()->getDrawRect().x; @@ -1455,7 +1454,7 @@ Scene1002::Scene1002(NeverhoodEngine *vm, Module *parentModule, int which) _class478->getSurface()->getClipRect() = _klayman->getSurface()->getClipRect(); _vm->_gameState.field2 = 1; } else if (which == 2) { - InsertKlayman(KmScene1002, 68, 645, (_class599, _ssLadderArch)); + InsertKlaymanInitArgs(KmScene1002, 68, 645, (_class599, _ssLadderArch)); _class478 = addSprite(new Class478(_vm, _klayman)); setMessageList(0x004B4298); _klayman->getSurface()->getClipRect().x1 = _ssLadderArch->getSurface()->getDrawRect().x; @@ -1466,7 +1465,7 @@ Scene1002::Scene1002(NeverhoodEngine *vm, Module *parentModule, int which) _vm->_gameState.field2 = 1; sendMessage(_klayman, 0x4820, 0); } else { - InsertKlayman(KmScene1002, 90, 226, (_class599, _ssLadderArch)); + InsertKlaymanInitArgs(KmScene1002, 90, 226, (_class599, _ssLadderArch)); _class478 = addSprite(new Class478(_vm, _klayman)); setMessageList(0x004B4470); _klayman->getSurface()->getClipRect().x1 = 31; @@ -1766,20 +1765,18 @@ Scene1004::Scene1004(NeverhoodEngine *vm, Module *parentModule, int which) if (which < 0) { setRectList(0x004B7C70); - _klayman = new KmScene1004(_vm, this, 330, 327); + InsertKlayman(KmScene1004, 330, 327); setMessageList(0x004B7C18); } else if (which == 1) { setRectList(0x004B7C70); - _klayman = new KmScene1004(_vm, this, 330, 327); + InsertKlayman(KmScene1004, 330, 327); setMessageList(0x004B7C08); } else { loadDataResource(0x01900A04); - _klayman = new KmScene1004(_vm, this, _dataResource.getPoint(0x80052A29).x, 27); + InsertKlayman(KmScene1004, _dataResource.getPoint(0x80052A29).x, 27); setMessageList(0x004B7BF0); } - addSprite(_klayman); - updatePaletteArea(); _class478 = addSprite(new Class478(_vm, _klayman)); |