[Scummvm-cvs-logs] scummvm master -> cb01f16007012c75744780d565f9714f471d0ad6

bluegr bluegr at gmail.com
Sat Oct 5 21:19:47 CEST 2013


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8d1f601518 NEVERHOOD: Split sprites from their scenes in modules 1000 and 1100
4cfb9ee82b NEVERHOOD: Clean up some includes
cb01f16007 NEVERHOOD: Move specialized Klaymen code for modules 1000 and 1100


Commit: 8d1f601518971d1b90408fb714007a07deaa307b
    https://github.com/scummvm/scummvm/commit/8d1f601518971d1b90408fb714007a07deaa307b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-10-05T11:50:33-07:00

Commit Message:
NEVERHOOD: Split sprites from their scenes in modules 1000 and 1100

Changed paths:
  A engines/neverhood/modules/module1000_sprites.cpp
  A engines/neverhood/modules/module1000_sprites.h
  A engines/neverhood/modules/module1100_sprites.cpp
  A engines/neverhood/modules/module1100_sprites.h
    engines/neverhood/module.mk
    engines/neverhood/modules/module1000.cpp
    engines/neverhood/modules/module1000.h
    engines/neverhood/modules/module1100.cpp
    engines/neverhood/modules/module1100.h
    engines/neverhood/modules/module1300.cpp
    engines/neverhood/modules/module1400.cpp
    engines/neverhood/modules/module2200.cpp
    engines/neverhood/modules/module2200.h
    engines/neverhood/modules/module2400.cpp
    engines/neverhood/modules/module2800.cpp



diff --git a/engines/neverhood/module.mk b/engines/neverhood/module.mk
index 6f4b494..718bedb 100644
--- a/engines/neverhood/module.mk
+++ b/engines/neverhood/module.mk
@@ -15,7 +15,9 @@ MODULE_OBJS = \
 	microtiles.o \
 	module.o \
 	modules/module1000.o \
+	modules/module1000_sprites.o \
 	modules/module1100.o \
+	modules/module1100_sprites.o \
 	modules/module1200.o \
 	modules/module1200_sprites.o \
 	modules/module1300.o \
diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp
index 14ce5f4..534fb2e 100644
--- a/engines/neverhood/modules/module1000.cpp
+++ b/engines/neverhood/modules/module1000.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1000_sprites.h"
 
 namespace Neverhood {
 
@@ -118,219 +119,6 @@ void Module1000::updateScene() {
 	}
 }
 
-// Scene1001
-
-AsScene1001Door::AsScene1001Door(NeverhoodEngine *vm)
-	: AnimatedSprite(vm, 1100) {
-
-	createSurface(800, 137, 242);
-	_x = 726;
-	_y = 440;
-	stShowIdleDoor();
-	loadSound(1, 0xED403E03);
-	SetUpdateHandler(&AnimatedSprite::update);
-	SetMessageHandler(&AsScene1001Door::handleMessage);
-}
-
-uint32 AsScene1001Door::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x2000:
-		hammerHitsDoor();
-		break;
-	case 0x3002:
-		gotoNextState();
-		break;
-	}
-	return 0;
-}
-
-void AsScene1001Door::hammerHitsDoor() {
-	switch (getGlobalVar(V_DOOR_STATUS)) {
-	case 0:
-	case 1:
-		playSound(0, 0x65482F03);
-		startAnimation(0x624C0498, 1, 3);
-		NextState(&AsScene1001Door::stShowIdleDoor);
-		break;
-	case 2:
-		playSound(1);
-		startAnimation(0x624C0498, 6, 6);
-		NextState(&AsScene1001Door::stBustedDoorMove);
-		break;
-	default:
-		// Nothing
-		break;
-	}
-	incGlobalVar(V_DOOR_STATUS, 1);
-}
-
-void AsScene1001Door::stShowIdleDoor() {
-	switch (getGlobalVar(V_DOOR_STATUS)) {
-	case 1:
-		startAnimation(0x624C0498, 4, -1);
-		_newStickFrameIndex = 4;
-		break;
-	case 2:
-		startAnimation(0x624C0498, 1, -1);
-		_newStickFrameIndex = 1;
-		break;
-	case 3:
-		stopAnimation();
-		setVisible(false);
-		break;
-	default:
-		startAnimation(0x624C0498, 0, -1);
-		_newStickFrameIndex = 0;
-		break;
-	}
-}
-
-void AsScene1001Door::stBustedDoorMove() {
-	setGlobalVar(V_DOOR_BUSTED, 1);
-	startAnimation(0x624C0498, 6, 6);
-	NextState(&AsScene1001Door::stBustedDoorGone);
-	_x = 30;
-}
-
-void AsScene1001Door::stBustedDoorGone() {
-	playSound(0);
-	stopAnimation();
-	setVisible(false);
-}
-
-AsScene1001Hammer::AsScene1001Hammer(NeverhoodEngine *vm, Sprite *asDoor)
-	: AnimatedSprite(vm, 1100), _asDoor(asDoor) {
-
-	_x = 547;
-	_y = 206;
-	createSurface(900, 177, 192);
-	startAnimation(0x022C90D4, -1, -1);
-	_newStickFrameIndex = STICK_LAST_FRAME;
-	SetUpdateHandler(&AnimatedSprite::update);
-	SetMessageHandler(&AsScene1001Hammer::handleMessage);
-}
-
-uint32 AsScene1001Hammer::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x100D:
-		if (param.asInteger() == 0x00352100)
-			sendMessage(_asDoor, 0x2000, 0);
-		else if (param.asInteger() == 0x0A1A0109)
-			playSound(0, 0x66410886);
-		break;
-	case 0x2000:
-		startAnimation(0x022C90D4, 1, -1);
-		playSound(0, 0xE741020A);
-		_newStickFrameIndex = STICK_LAST_FRAME;
-		break;
-	}
-	return 0;
-}
-
-AsScene1001Window::AsScene1001Window(NeverhoodEngine *vm)
-	: AnimatedSprite(vm, 1200) {
-
-	_x = 320;
-	_y = 240;
-	createSurface(100, 66, 129);
-	startAnimation(0xC68C2299, 0, -1);
-	_newStickFrameIndex = 0;
-	SetUpdateHandler(&AnimatedSprite::update);
-	SetMessageHandler(&AsScene1001Window::handleMessage);
-}
-
-uint32 AsScene1001Window::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x100D:
-		if (param.asInteger() == 0x0E0A1410)
-			playSound(0, 0x60803F10);
-		break;
-	case 0x2001:
-		startAnimation(0xC68C2299, 0, -1);
-		break;
-	case 0x3002:
-		SetMessageHandler(NULL);
-		setGlobalVar(V_WINDOW_OPEN, 1);
-		setVisible(false);
-		break;
-	}
-	return 0;
-}
-
-AsScene1001Lever::AsScene1001Lever(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, int deltaXType)
-	: AnimatedSprite(vm, 1100), _parentScene(parentScene) {
-
-	createSurface(1010, 71, 73);
-	setDoDeltaX(deltaXType);
-	startAnimation(0x04A98C36, 0, -1);
-	_newStickFrameIndex = 0;
-	_x = x;
-	_y = y;
-	SetUpdateHandler(&AnimatedSprite::update);
-	SetMessageHandler(&AsScene1001Lever::handleMessage);
-}
-
-uint32 AsScene1001Lever::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x100D:
-		if (param.asInteger() == 0x00C0C444)
-			sendMessage(_parentScene, 0x480F, 0);
-		else if (param.asInteger() == 0xC41A02C0)
-			playSound(0, 0x40581882);
-		break;
-	case 0x1011:
-		sendMessage(_parentScene, 0x4826, 0);
-		messageResult = 1;
-		break;
-	case 0x3002:
-		startAnimation(0x04A98C36, 0, -1);
-		_newStickFrameIndex = 0;
-		break;
-	case 0x480F:
-		startAnimation(0x04A98C36, 0, -1);
-		break;
-	case 0x482A:
-		sendMessage(_parentScene, 0x1022, 990);
-		break;
-	case 0x482B:
-		sendMessage(_parentScene, 0x1022, 1010);
-		break;
-	}
-	return messageResult;
-}
-
-SsCommonButtonSprite::SsCommonButtonSprite(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, int surfacePriority, uint32 soundFileHash)
-	: StaticSprite(vm, fileHash, surfacePriority), _parentScene(parentScene), _countdown(0) {
-
-	_priority = 1100;
-	_soundFileHash = soundFileHash ? soundFileHash : 0x44141000;
-	setVisible(false);
-	SetUpdateHandler(&SsCommonButtonSprite::update);
-	SetMessageHandler(&SsCommonButtonSprite::handleMessage);
-}
-
-void SsCommonButtonSprite::update() {
-	if (_countdown != 0 && (--_countdown) == 0)
-		setVisible(false);
-}
-
-uint32 SsCommonButtonSprite::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x480B:
-		sendMessage(_parentScene, 0x480B, 0);
-		setVisible(true);
-		_countdown = 8;
-		playSound(0, _soundFileHash);
-		break;
-	}
-	return messageResult;
-}
-
 Scene1001::Scene1001(NeverhoodEngine *vm, Module *parentModule, int which)
 	: Scene(vm, parentModule), _asDoor(NULL), _asWindow(NULL) {
 
@@ -439,719 +227,6 @@ uint32 Scene1001::handleMessage(int messageNum, const MessageParam &param, Entit
 	return messageResult;
 }
 
-// Scene1002
-
-AsScene1002Ring::AsScene1002Ring(NeverhoodEngine *vm, Scene *parentScene, bool isSpecial, int16 x, int16 y, int16 clipY1, bool isRingLow)
-	: AnimatedSprite(vm, 1100), _parentScene(parentScene), _isSpecial(isSpecial) {
-
-	SetUpdateHandler(&AsScene1002Ring::update);
-
-	if (_isSpecial) {
-		createSurface(990, 68, 314);
-		if (isRingLow) {
-			startAnimation(0x04103090, 0, -1);
-			SetMessageHandler(&AsScene1002Ring::hmRingHangingLow);
-		} else {
-			startAnimation(0xA85C4011, _vm->_rnd->getRandomNumber(15), -1);
-			SetMessageHandler(&AsScene1002Ring::hmRingIdle);
-		}
-	} else {
-		createSurface(990, 68, 138);
-		startAnimation(0xA85C4011, _vm->_rnd->getRandomNumber(15), -1);
-		SetMessageHandler(&AsScene1002Ring::hmRingIdle);
-	}
-
-	setClipRect(0, clipY1, 640, 480);
-
-	_x = x;
-	_y = y;
-
-	setDoDeltaX(_vm->_rnd->getRandomNumber(1));
-
-}
-
-void AsScene1002Ring::update() {
-	updateAnim();
-	updatePosition();
-}
-
-uint32 AsScene1002Ring::hmRingIdle(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x4806:
-		setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0);
-		sendMessage(_parentScene, 0x4806, 0);
-		SetMessageHandler(&AsScene1002Ring::hmRingPulled1);
-		startAnimation(_isSpecial ? 0x87502558 : 0x80DD4010, 0, -1);
-		break;
-	case 0x480F:
-		setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0);
-		sendMessage(_parentScene, 0x480F, 0);
-		SetMessageHandler(&AsScene1002Ring::hmRingPulled2);
-		startAnimation(0x861A2020, 0, -1);
-		break;
-	case 0x482A:
-		sendMessage(_parentScene, 0x1022, 990);
-		break;
-	case 0x482B:
-		sendMessage(_parentScene, 0x1022, 1010);
-		break;
-	}
-	return messageResult;
-}
-
-uint32 AsScene1002Ring::hmRingPulled1(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x3002:
-		startAnimation(_isSpecial ? 0x78D0A812 : 0xB85D2A10, 0, -1);
-		SetMessageHandler(&AsScene1002Ring::hmRingHangingLow);
-		break;
-	case 0x4807:
-		sendMessage(_parentScene, 0x4807, 0);
-		setDoDeltaX(_vm->_rnd->getRandomNumber(1));
-		startAnimation(0x8258A030, 0, -1);
-		SetMessageHandler(&AsScene1002Ring::hmRingReleased);
-		break;
-	case 0x482A:
-		sendMessage(_parentScene, 0x1022, 990);
-		break;
-	case 0x482B:
-		sendMessage(_parentScene, 0x1022, 1010);
-		break;
-	}
-	return messageResult;
-}
-
-uint32 AsScene1002Ring::hmRingPulled2(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x3002:
-		startAnimation(0x04103090, 0, -1);
-		SetMessageHandler(&AsScene1002Ring::hmRingHangingLow);
-		break;
-	case 0x482A:
-		sendMessage(_parentScene, 0x1022, 990);
-		break;
-	case 0x482B:
-		sendMessage(_parentScene, 0x1022, 1010);
-		break;
-	}
-	return messageResult;
-}
-
-uint32 AsScene1002Ring::hmRingHangingLow(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x4807:
-		sendMessage(_parentScene, 0x4807, 0);
-		setDoDeltaX(_vm->_rnd->getRandomNumber(1));
-		startAnimation(0x8258A030, 0, -1);
-		SetMessageHandler(&AsScene1002Ring::hmRingReleased);
-		break;
-	case 0x482A:
-		sendMessage(_parentScene, 0x1022, 990);
-		break;
-	case 0x482B:
-		sendMessage(_parentScene, 0x1022, 1010);
-		break;
-	}
-	return messageResult;
-}
-
-uint32 AsScene1002Ring::hmRingReleased(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = hmRingIdle(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x100D:
-		if (param.asInteger() == 0x05410F72)
-			playSound(0, 0x21EE40A9);
-		break;
-	case 0x3002:
-		startAnimation(0xA85C4011, 0, -1);
-		break;
-	case 0x482A:
-		sendMessage(_parentScene, 0x1022, 990);
-		break;
-	case 0x482B:
-		sendMessage(_parentScene, 0x1022, 1010);
-		break;
-	}
-	return messageResult;
-}
-
-AsScene1002Door::AsScene1002Door(NeverhoodEngine *vm, NRect &clipRect)
-	: StaticSprite(vm, 1200) {
-
-	loadSprite(0x1052370F, kSLFDefDrawOffset | kSLFSetPosition, 800, 526, getGlobalVar(V_FLYTRAP_RING_DOOR) ? 49 : 239);
-	setClipRect(clipRect);
-	SetUpdateHandler(&AsScene1002Door::update);
-	SetMessageHandler(&AsScene1002Door::handleMessage);
-	SetSpriteUpdate(NULL);
-}
-
-void AsScene1002Door::update() {
-	handleSpriteUpdate();
-	updatePosition();
-}
-
-uint32 AsScene1002Door::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x4808:
-		setGlobalVar(V_FLYTRAP_RING_DOOR, 1);
-		SetSpriteUpdate(&AsScene1002Door::suOpenDoor);
-		break;
-	case 0x4809:
-		setGlobalVar(V_FLYTRAP_RING_DOOR, 0);
-		SetSpriteUpdate(&AsScene1002Door::suCloseDoor);
-		break;
-	}
-	return messageResult;
-}
-
-void AsScene1002Door::suOpenDoor() {
-	if (_y > 49) {
-		_y -= 8;
-		if (_y < 49) {
-			SetSpriteUpdate(NULL);
-			_y = 49;
-		}
-		_needRefresh = true;
-	}
-}
-
-void AsScene1002Door::suCloseDoor() {
-	if (_y < 239) {
-		_y += 8;
-		if (_y > 239) {
-			SetSpriteUpdate(NULL);
-			_y = 239;
-		}
-		_needRefresh = true;
-	}
-}
-
-AsScene1002BoxingGloveHitEffect::AsScene1002BoxingGloveHitEffect(NeverhoodEngine *vm)
-	: AnimatedSprite(vm, 1400) {
-
-	createSurface(1025, 88, 165);
-	setVisible(false);
-	SetUpdateHandler(&AnimatedSprite::update);
-	SetMessageHandler(&AsScene1002BoxingGloveHitEffect::handleMessage);
-}
-
-uint32 AsScene1002BoxingGloveHitEffect::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x2004:
-		_x = ((Sprite*)sender)->getX() - 98;
-		_y = ((Sprite*)sender)->getY() - 111;
-		startAnimation(0x0422255A, 0, -1);
-		setVisible(true);
-		break;
-	case 0x3002:
-		stopAnimation();
-		setVisible(false);
-		break;
-	}
-	return messageResult;
-}
-
-AsScene1002DoorSpy::AsScene1002DoorSpy(NeverhoodEngine *vm, NRect &clipRect, Scene *parentScene, Sprite *asDoor, Sprite *asScene1002BoxingGloveHitEffect)
-	: AnimatedSprite(vm, 1300), _clipRect(clipRect), _parentScene(parentScene), _asDoor(asDoor), _asBoxingGloveHitEffect(asScene1002BoxingGloveHitEffect) {
-
-	createSurface(800, 136, 147);
-	setClipRect(clipRect);
-	suDoorSpy();
-	loadSound(0, 0xC0C40298);
-	startAnimation(0x586C1D48, 0, 0);
-	SetUpdateHandler(&AnimatedSprite::update);
-	SetMessageHandler(&AsScene1002DoorSpy::handleMessage);
-	SetSpriteUpdate(&AsScene1002DoorSpy::suDoorSpy);
-}
-
-uint32 AsScene1002DoorSpy::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x100D:
-		if (param.asInteger() == 0xA61CA1C2)
-			sendMessage(_asBoxingGloveHitEffect, 0x2004, 0);
-		else if (param.asInteger() == 0x14CE0620)
-			playSound(0);
-		break;
-	case 0x2003:
-		stDoorSpyBoxingGlove();
-		break;
-	}
-	return messageResult;
-}
-
-uint32 AsScene1002DoorSpy::hmDoorSpyAnimation(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x3002:
-		gotoNextState();
-		break;
-	}
-	return messageResult;
-}
-
-void AsScene1002DoorSpy::suDoorSpy() {
-	_x = _asDoor->getX() + 34;
-	_y = _asDoor->getY() + 175;
-}
-
-void AsScene1002DoorSpy::stDoorSpyIdle() {
-	setClipRect(_clipRect);
-	_parentScene->setSurfacePriority(getSurface(), 800);
-	startAnimation(0x586C1D48, 0, 0);
-	SetMessageHandler(&AsScene1002DoorSpy::handleMessage);
-}
-
-void AsScene1002DoorSpy::stDoorSpyBoxingGlove() {
-	setClipRect(0, 0, 640, 480);
-	_parentScene->setSurfacePriority(getSurface(), 1200);
-	startAnimation(0x586C1D48, 1, -1);
-	SetMessageHandler(&AsScene1002DoorSpy::hmDoorSpyAnimation);
-	NextState(&AsScene1002DoorSpy::stDoorSpyIdle);
-}
-
-SsCommonPressButton::SsCommonPressButton(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int surfacePriority, uint32 soundFileHash)
-	: StaticSprite(vm, 1100), _parentScene(parentScene), _status(0), _countdown(0) {
-
-	_soundFileHash = soundFileHash != 0 ? soundFileHash : 0x44141000;
-	_fileHashes[0] = fileHash1;
-	_fileHashes[1] = fileHash2;
-	createSurface(surfacePriority, 40, 40);
-	loadSprite(fileHash1, kSLFDefDrawOffset | kSLFDefPosition);
-	setVisible(false);
-	SetUpdateHandler(&SsCommonPressButton::update);
-	SetMessageHandler(&SsCommonPressButton::handleMessage);
-}
-
-void SsCommonPressButton::setFileHashes(uint32 fileHash1, uint32 fileHash2) {
-	_fileHashes[0] = fileHash1;
-	_fileHashes[1] = fileHash2;
-	loadSprite(_status == 2 ? fileHash2 : fileHash1, kSLFDefDrawOffset | kSLFDefPosition);
-}
-
-void SsCommonPressButton::update() {
-	if (_countdown != 0 && (--_countdown) == 0) {
-		if (_status == 1) {
-			_status = 2;
-			loadSprite(_fileHashes[1], kSLFDefDrawOffset | kSLFDefPosition);
-			_countdown = 4;
-		} else if (_status == 2) {
-			_status = 3;
-			loadSprite(_fileHashes[0], kSLFDefDrawOffset | kSLFDefPosition);
-			_countdown = 4;
-		} else if (_status == 3) {
-			_status = 0;
-			setVisible(false);
-		}
-	}
-}
-
-uint32 SsCommonPressButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x480B:
-		sendMessage(_parentScene, 0x480B, 0);
-		_status = 1;
-		_countdown = 4;
-		setVisible(true);
-		playSound(0, _soundFileHash);
-		break;
-	}
-	return messageResult;
-}
-
-AsScene1002VenusFlyTrap::AsScene1002VenusFlyTrap(NeverhoodEngine *vm, Scene *parentScene, Sprite *klaymen, bool isSecond)
-	: AnimatedSprite(vm, 1100), _parentScene(parentScene), _klaymen(klaymen), _isSecond(isSecond), _countdown(0) {
-
-	createSurface(995, 175, 195);
-	if (!_isSecond) {
-		if (getGlobalVar(V_FLYTRAP_RING_DOOR)) {
-			setDoDeltaX(1);
-			_x = 366;
-			_y = 435;
-			stRingGrabbed();
-		} else {
-			_x = 174 + getGlobalVar(V_FLYTRAP_POSITION_1) * 32;
-			_y = 435;
-			stIdle();
-		}
-	} else {
-		_x = 186 + getGlobalVar(V_FLYTRAP_POSITION_2) * 32;
-		_y = 364;
-		if (getGlobalVar(V_FLYTRAP_RING_BRIDGE) || getGlobalVar(V_FLYTRAP_RING_FENCE)) {
-			stRingGrabbed();
-		} else {
-			stIdle();
-		}
-	}
-	_flags = 4;
-	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
-	SetMessageHandler(&AsScene1002VenusFlyTrap::handleMessage);
-	SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
-}
-
-void AsScene1002VenusFlyTrap::update() {
-	if (_countdown != 0 && (--_countdown == 0))
-		gotoNextState();
-	AnimatedSprite::update();
-}
-
-void AsScene1002VenusFlyTrap::upIdle() {
-	if (_countdown == 0 && _klaymen->getX() - 20 > _x)
-		setDoDeltaX(1);
-	else if (_klaymen->getX() + 20 < _x)
-		setDoDeltaX(0);
-	update();
-}
-
-uint32 AsScene1002VenusFlyTrap::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x100D:
-		if (param.asInteger() == 0x000890C4)
-			playSound(0, 0xC21190D8);
-		else if (param.asInteger() == 0x522200A0)
-			playSound(0, 0x931080C8);
-		break;
-	case 0x1011:
-		if (_isSecond) {
-			if (_x >= 154 && _x <= 346) {
-				sendMessage(_parentScene, 0x2000, 0);
-				messageResult = 1;
-			}
-		} else {
-			if (_x >= 174 && _x <= 430) {
-				sendMessage(_parentScene, 0x2000, 0);
-				messageResult = 1;
-			}
-		}
-		break;
-	case 0x480B:
-		setDoDeltaX(param.asInteger() != 0 ? 1 : 0);
-		if (!_isSecond) {
-			if (getGlobalVar(V_FLYTRAP_RING_DOOR))
-				stRelease();
-			else
-				stWalk();
-		} else {
-			if (getGlobalVar(V_FLYTRAP_RING_BRIDGE) || getGlobalVar(V_FLYTRAP_RING_FENCE))
-				stRelease();
-			else
-				stWalk();
-		}
-		break;
-	case 0x480C:
-		if (_isSecond) {
-			if (_x >= 154 && _x <= 346)
-				messageResult = 1;
-			else
-				messageResult = 0;
-		} else {
-			if (_x >= 174 && _x <= 430)
-				messageResult = 1;
-			else
-				messageResult = 0;
-		}
-		break;
-	case 0x480E:
-		if (param.asInteger() == 1)
-			stGrabRing();
-		break;
-	case 0x4810:
-		swallowKlaymen();
-		break;
-	case 0x482A:
-		sendMessage(_parentScene, 0x1022, 995);
-		break;
-	case 0x482B:
-		sendMessage(_parentScene, 0x1022, 1015);
-		break;
-	}
-	return messageResult;
-}
-
-uint32 AsScene1002VenusFlyTrap::hmAnimationSimple(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x3002:
-		gotoNextState();
-		break;
-	}
-	return messageResult;
-}
-
-uint32 AsScene1002VenusFlyTrap::hmAnimationExt(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x100D:
-		if (param.asInteger() == 0x000890C4)
-			playSound(0, 0xC21190D8);
-		else if (param.asInteger() == 0x41881801) {
-			if (_isSecond) {
-				if (_x > 330)
-					sendMessage(_klaymen, 0x4811, 2);
-				else
-					sendMessage(_klaymen, 0x4811, 0);
-			} else {
-				sendMessage(_klaymen, 0x4811, 0);
-			}
-		} else if (param.asInteger() == 0x522200A0)
-			playSound(0, 0x931080C8);
-		break;
-	case 0x3002:
-		gotoNextState();
-		break;
-	case 0x482A:
-		sendMessage(_parentScene, 0x1022, 995);
-		break;
-	case 0x482B:
-		sendMessage(_parentScene, 0x1022, 1015);
-		break;
-	}
-	return messageResult;
-}
-
-void AsScene1002VenusFlyTrap::stWalkBack() {
-	setDoDeltaX(2);
-	startAnimation(0xC4080034, 0, -1);
-	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
-	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
-	NextState(&AsScene1002VenusFlyTrap::stIdle);
-}
-
-void AsScene1002VenusFlyTrap::stWalk() {
-	startAnimation(0xC4080034, 0, -1);
-	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
-	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationSimple);
-	NextState(&AsScene1002VenusFlyTrap::stIdle);
-}
-
-void AsScene1002VenusFlyTrap::stRelease() {
-	sendMessage(_parentScene, 0x4807, 0);
-	startAnimation(0x82292851, 0, -1);
-	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
-	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationSimple);
-	NextState(&AsScene1002VenusFlyTrap::stIdle);
-}
-
-void AsScene1002VenusFlyTrap::stGrabRing() {
-	setDoDeltaX(1);
-	startAnimation(0x86A82A11, 0, -1);
-	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
-	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationSimple);
-	NextState(&AsScene1002VenusFlyTrap::stRingGrabbed);
-}
-
-void AsScene1002VenusFlyTrap::stRingGrabbed() {
-	startAnimation(0xB5A86034, 0, -1);
-	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
-	SetMessageHandler(&AsScene1002VenusFlyTrap::handleMessage);
-}
-
-void AsScene1002VenusFlyTrap::stKlaymenInside() {
-	startAnimation(0x31303094, 0, -1);
-	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
-	SetMessageHandler(NULL);
-	NextState(&AsScene1002VenusFlyTrap::stKlaymenInsideMoving);
-	_countdown = 24;
-}
-
-void AsScene1002VenusFlyTrap::stIdle() {
-	startAnimation(0xC8204250, 0, -1);
-	SetUpdateHandler(&AsScene1002VenusFlyTrap::upIdle);
-	SetMessageHandler(&AsScene1002VenusFlyTrap::handleMessage);
-	if (_isSecond) {
-		if (_x >= 154 && _x <= 346)
-			setGlobalVar(V_FLYTRAP_POSITION_2, (_x - 186) / 32);
-		else {
-			NextState(&AsScene1002VenusFlyTrap::stWalkBack);
-			_countdown = 12;
-		}
-	} else {
-		if (_x >= 174 && _x <= 430)
-			setGlobalVar(V_FLYTRAP_POSITION_1, (_x - 174) / 32);
-		else {
-			NextState(&AsScene1002VenusFlyTrap::stWalkBack);
-			_countdown = 12;
-		}
-	}
-}
-
-void AsScene1002VenusFlyTrap::stKlaymenInsideMoving() {
-	startAnimation(0x152920C4, 0, -1);
-	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
-	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
-	NextState(&AsScene1002VenusFlyTrap::stSpitOutKlaymen);
-}
-
-void AsScene1002VenusFlyTrap::stSpitOutKlaymen() {
-	startAnimation(0x84001117, 0, -1);
-	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
-	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
-	NextState(&AsScene1002VenusFlyTrap::stIdle);
-}
-
-void AsScene1002VenusFlyTrap::swallowKlaymen() {
-	if (_x - 15 < _klaymen->getX() && _x + 15 > _klaymen->getX()) {
-		if (_isSecond)
-			setDoDeltaX(_x > 265 && _x < 330 ? 1 : 0);
-		else
-			setDoDeltaX(_x > 320 ? 1 : 0);
-		sendMessage(_klaymen, 0x2001, 0);
-		startAnimation(0x8C2C80D4, 0, -1);
-		SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
-		SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
-		NextState(&AsScene1002VenusFlyTrap::stKlaymenInside);
-	}
-}
-
-AsScene1002OutsideDoorBackground::AsScene1002OutsideDoorBackground(NeverhoodEngine *vm)
-	: AnimatedSprite(vm, 1200), _countdown(0), _isDoorClosed(true) {
-
-	createSurface(850, 186, 212);
-	_x = 320;
-	_y = 240;
-	if (getGlobalVar(V_FLYTRAP_RING_DOOR)) {
-		startAnimation(0x004A4495, -1, -1);
-		_newStickFrameIndex = STICK_LAST_FRAME;
-	} else
-		setVisible(false);
-	SetUpdateHandler(&AsScene1002OutsideDoorBackground::update);
-	SetMessageHandler(&AsScene1002OutsideDoorBackground::handleMessage);
-}
-
-void AsScene1002OutsideDoorBackground::update() {
-	if (_countdown != 0 && (--_countdown == 0)) {
-		if (_isDoorClosed)
-			stCloseDoor();
-		else
-			stOpenDoor();
-	}
-	AnimatedSprite::update();
-}
-
-uint32 AsScene1002OutsideDoorBackground::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageResult) {
-	case 0x4808:
-		_isDoorClosed = false;
-		_countdown = 2;
-		break;
-	case 0x4809:
-		_isDoorClosed = true;
-		_countdown = 2;
-		break;
-	}
-	return messageResult;
-}
-
-uint32 AsScene1002OutsideDoorBackground::hmAnimation(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = handleMessage(messageNum, param, sender);
-	switch (messageResult) {
-	case 0x3002:
-		gotoNextState();
-		break;
-	}
-	return messageResult;
-}
-
-void AsScene1002OutsideDoorBackground::stOpenDoor() {
-	startAnimation(0x004A4495, 0, -1);
-	_newStickFrameIndex = STICK_LAST_FRAME;
-	setVisible(true);
-	SetMessageHandler(&AsScene1002OutsideDoorBackground::handleMessage);
-}
-
-void AsScene1002OutsideDoorBackground::stCloseDoor() {
-	startAnimation(0x004A4495, -1, -1);
-	_playBackwards = true;
-	setVisible(true);
-	SetMessageHandler(&AsScene1002OutsideDoorBackground::hmAnimation);
-	NextState(&AsScene1002OutsideDoorBackground::stDoorClosed);
-}
-
-void AsScene1002OutsideDoorBackground::stDoorClosed() {
-	setVisible(false);
-	stopAnimation();
-}
-
-AsScene1002KlaymenLadderHands::AsScene1002KlaymenLadderHands(NeverhoodEngine *vm, Klaymen *klaymen)
-	: AnimatedSprite(vm, 1200), _klaymen(klaymen) {
-
-	createSurface(1200, 40, 163);
-	setVisible(false);
-	SetUpdateHandler(&AsScene1002KlaymenLadderHands::update);
-	SetMessageHandler(&Sprite::handleMessage);
-}
-
-void AsScene1002KlaymenLadderHands::update() {
-	if (_klaymen->getCurrAnimFileHash() == 0x3A292504) {
-		startAnimation(0xBA280522, _klaymen->getFrameIndex(), -1);
-		_newStickFrameIndex = _klaymen->getFrameIndex();
-		setVisible(true);
-		_x = _klaymen->getX();
-		_y = _klaymen->getY();
-		setDoDeltaX(_klaymen->isDoDeltaX() ? 1 : 0);
-	} else if (_klaymen->getCurrAnimFileHash() == 0x122D1505) {
-		startAnimation(0x1319150C, _klaymen->getFrameIndex(), -1);
-		_newStickFrameIndex = _klaymen->getFrameIndex();
-		setVisible(true);
-		_x = _klaymen->getX();
-		_y = _klaymen->getY();
-		setDoDeltaX(_klaymen->isDoDeltaX() ? 1 : 0);
-	} else
-		setVisible(false);
-	AnimatedSprite::update();
-}
-
-AsScene1002KlaymenPeekHand::AsScene1002KlaymenPeekHand(NeverhoodEngine *vm, Scene *parentScene, Klaymen *klaymen)
-	: AnimatedSprite(vm, 1200), _parentScene(parentScene), _klaymen(klaymen),
-	_isClipRectSaved(false) {
-
-	createSurface(1000, 33, 41);
-	setVisible(false);
-	SetUpdateHandler(&AsScene1002KlaymenPeekHand::update);
-	SetMessageHandler(&AsScene1002KlaymenPeekHand::handleMessage);
-}
-
-void AsScene1002KlaymenPeekHand::update() {
-	if (_klaymen->getCurrAnimFileHash() == 0xAC20C012 && _klaymen->getFrameIndex() < 50) {
-		startAnimation(0x9820C913, _klaymen->getFrameIndex(), -1);
-		_newStickFrameIndex = _klaymen->getFrameIndex();
-		setVisible(true);
-		_x = _klaymen->getX();
-		_y = _klaymen->getY();
-		setDoDeltaX(_klaymen->isDoDeltaX() ? 1 : 0);
-	} else
-		setVisible(false);
-	AnimatedSprite::update();
-}
-
-uint32 AsScene1002KlaymenPeekHand::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x100D:
-		if (param.asInteger() == 0x4AB28209) {
-			sendMessage(_parentScene, 0x1022, 1200);
-			_isClipRectSaved = true;
-			_savedClipRect = _surface->getClipRect();
-			setClipRect(0, 0, 640, 480);
-		} else if (param.asInteger() == 0x88001184) {
-			sendMessage(_parentScene, 0x1022, 1000);
-			if (_isClipRectSaved)
-				setClipRect(_savedClipRect);
-		}
-		break;
-	}
-	return messageResult;
-}
-
 Scene1002::Scene1002(NeverhoodEngine *vm, Module *parentModule, int which)
 	: Scene(vm, parentModule), _isKlaymenFloor(false), _isClimbingLadder(false) {
 
@@ -1383,38 +458,6 @@ uint32 Scene1002::handleMessage(int messageNum, const MessageParam &param, Entit
 	return messageResult;
 }
 
-// Scene1004
-
-AsScene1004TrashCan::AsScene1004TrashCan(NeverhoodEngine *vm)
-	: AnimatedSprite(vm, 1100) {
-
-	_x = 330;
-	_y = 327;
-	createSurface(800, 56, 50);
-	setVisible(false);
-	SetUpdateHandler(&AnimatedSprite::update);
-	SetMessageHandler(&AsScene1004TrashCan::handleMessage);
-}
-
-uint32 AsScene1004TrashCan::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x100D:
-		if (param.asInteger() == 0x225A8587)
-			playSound(0, 0x109AFC4C);
-		break;
-	case 0x2002:
-		startAnimation(0xEB312C11, 0, -1);
-		setVisible(true);
-		break;
-	case 0x3002:
-		stopAnimation();
-		setVisible(false);
-		break;
-	}
-	return 0;
-}
-
 Scene1004::Scene1004(NeverhoodEngine *vm, Module *parentModule, int which)
 	: Scene(vm, parentModule), _paletteAreaStatus(-1) {
 
@@ -1513,8 +556,6 @@ void Scene1004::updatePaletteArea() {
 	}
 }
 
-// Scene1005
-
 Scene1005::Scene1005(NeverhoodEngine *vm, Module *parentModule, int which)
 	: Scene(vm, parentModule) {
 
diff --git a/engines/neverhood/modules/module1000.h b/engines/neverhood/modules/module1000.h
index 9e97e82..4b17c92 100644
--- a/engines/neverhood/modules/module1000.h
+++ b/engines/neverhood/modules/module1000.h
@@ -29,8 +29,6 @@
 
 namespace Neverhood {
 
-// Module1000
-
 class Module1000 : public Module {
 public:
 	Module1000(NeverhoodEngine *vm, Module *parentModule, int which);
@@ -42,53 +40,6 @@ protected:
 	void updateScene();
 };
 
-// Scene1001
-
-class AsScene1001Door : public AnimatedSprite {
-public:
-	AsScene1001Door(NeverhoodEngine *vm);
-protected:
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-	void hammerHitsDoor();
-	void stShowIdleDoor();
-	void stBustedDoorMove();
-	void stBustedDoorGone();
-};
-
-class AsScene1001Hammer : public AnimatedSprite {
-public:
-	AsScene1001Hammer(NeverhoodEngine *vm, Sprite *asDoor);
-protected:
-	Sprite *_asDoor;
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
-
-class AsScene1001Window : public AnimatedSprite {
-public:
-	AsScene1001Window(NeverhoodEngine *vm);
-protected:
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
-
-class AsScene1001Lever : public AnimatedSprite {
-public:
-	AsScene1001Lever(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, int deltaXType);
-protected:
-	Scene *_parentScene;
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
-
-class SsCommonButtonSprite : public StaticSprite {
-public:
-	SsCommonButtonSprite(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, int surfacePriority, uint32 soundFileHash);
-protected:
-	Scene *_parentScene;
-	uint32 _soundFileHash;
-	int16 _countdown;
-	void update();
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
-
 class Scene1001 : public Scene {
 public:
 	Scene1001(NeverhoodEngine *vm, Module *parentModule, int which);
@@ -102,127 +53,6 @@ protected:
 	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
 };
 
-// Scene1002
-
-class AsScene1002Ring : public AnimatedSprite {
-public:
-	AsScene1002Ring(NeverhoodEngine *vm, Scene *parentScene, bool isSpecial, int16 x, int16 y, int16 clipY1, bool isRingLow);
-protected:
-	Scene *_parentScene;
-	bool _isSpecial;
-	void update();
-	uint32 hmRingIdle(int messageNum, const MessageParam &param, Entity *sender);
-	uint32 hmRingPulled1(int messageNum, const MessageParam &param, Entity *sender);
-	uint32 hmRingPulled2(int messageNum, const MessageParam &param, Entity *sender);
-	uint32 hmRingHangingLow(int messageNum, const MessageParam &param, Entity *sender);
-	uint32 hmRingReleased(int messageNum, const MessageParam &param, Entity *sender);
-};
-
-class AsScene1002Door : public StaticSprite {
-public:
-	AsScene1002Door(NeverhoodEngine *vm, NRect &clipRect);
-protected:
-	void update();
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-	void suOpenDoor();
-	void suCloseDoor();
-};
-
-class AsScene1002BoxingGloveHitEffect : public AnimatedSprite {
-public:
-	AsScene1002BoxingGloveHitEffect(NeverhoodEngine *vm);
-protected:
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
-
-class AsScene1002DoorSpy : public AnimatedSprite {
-public:
-	AsScene1002DoorSpy(NeverhoodEngine *vm, NRect &clipRect, Scene *parentScene, Sprite *asDoor, Sprite *asScene1002BoxingGloveHitEffect);
-protected:
-	Scene *_parentScene;
-	Sprite *_asDoor;
-	Sprite *_asBoxingGloveHitEffect;
-	NRect _clipRect;
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-	uint32 hmDoorSpyAnimation(int messageNum, const MessageParam &param, Entity *sender);
-	void suDoorSpy();
-	void stDoorSpyIdle();
-	void stDoorSpyBoxingGlove();
-};
-
-class SsCommonPressButton : public StaticSprite {
-public:
-	SsCommonPressButton(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int surfacePriority, uint32 soundFileHash);
-	void setFileHashes(uint32 fileHash1, uint32 fileHash2);
-protected:
-	Scene *_parentScene;
-	uint32 _soundFileHash;
-	uint32 _fileHashes[2];
-	int _status;
-	int _countdown;
-	void update();
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
-
-class AsScene1002VenusFlyTrap : public AnimatedSprite {
-public:
-	AsScene1002VenusFlyTrap(NeverhoodEngine *vm, Scene *parentScene, Sprite *klaymen, bool isSecond);
-protected:
-	Scene *_parentScene;
-	Sprite *_klaymen;
-	int _countdown;
-	bool _isSecond;
-	void update();
-	void upIdle();
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-	uint32 hmAnimationSimple(int messageNum, const MessageParam &param, Entity *sender);
-	uint32 hmAnimationExt(int messageNum, const MessageParam &param, Entity *sender);
-	void stWalkBack();
-	void stWalk();
-	void stRelease();
-	void stGrabRing();
-	void stRingGrabbed();
-	void stKlaymenInside();
-	void stIdle();
-	void stKlaymenInsideMoving();
-	void stSpitOutKlaymen();
-	void swallowKlaymen();
-};
-
-class AsScene1002OutsideDoorBackground : public AnimatedSprite {
-public:
-	AsScene1002OutsideDoorBackground(NeverhoodEngine *vm);
-protected:
-	int _countdown;
-	bool _isDoorClosed;
-	void update();
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-	uint32 hmAnimation(int messageNum, const MessageParam &param, Entity *sender);
-	void stOpenDoor();
-	void stCloseDoor();
-	void stDoorClosed();
-};
-
-class AsScene1002KlaymenLadderHands : public AnimatedSprite {
-public:
-	AsScene1002KlaymenLadderHands(NeverhoodEngine *vm, Klaymen *klaymen);
-protected:
-	Klaymen *_klaymen;
-	void update();
-};
-
-class AsScene1002KlaymenPeekHand : public AnimatedSprite {
-public:
-	AsScene1002KlaymenPeekHand(NeverhoodEngine *vm, Scene *parentScene, Klaymen *klaymen);
-protected:
-	Scene *_parentScene;
-	Klaymen *_klaymen;
-	bool _isClipRectSaved;
-	NRect _savedClipRect;
-	void update();
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
-
 class Scene1002 : public Scene {
 public:
 	Scene1002(NeverhoodEngine *vm, Module *parentModule, int which);
@@ -251,15 +81,6 @@ protected:
 	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
 };
 
-// Scene1004
-
-class AsScene1004TrashCan : public AnimatedSprite {
-public:
-	AsScene1004TrashCan(NeverhoodEngine *vm);
-protected:
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
-
 class Scene1004 : public Scene {
 public:
 	Scene1004(NeverhoodEngine *vm, Module *parentModule, int which);
@@ -272,8 +93,6 @@ protected:
 	void updatePaletteArea();
 };
 
-// Scene1005
-
 class Scene1005 : public Scene {
 public:
 	Scene1005(NeverhoodEngine *vm, Module *parentModule, int which);
diff --git a/engines/neverhood/modules/module1000_sprites.cpp b/engines/neverhood/modules/module1000_sprites.cpp
new file mode 100644
index 0000000..d75d721
--- /dev/null
+++ b/engines/neverhood/modules/module1000_sprites.cpp
@@ -0,0 +1,979 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "neverhood/modules/module1000_sprites.h"
+
+namespace Neverhood {
+
+AsScene1001Door::AsScene1001Door(NeverhoodEngine *vm)
+	: AnimatedSprite(vm, 1100) {
+
+	createSurface(800, 137, 242);
+	_x = 726;
+	_y = 440;
+	stShowIdleDoor();
+	loadSound(1, 0xED403E03);
+	SetUpdateHandler(&AnimatedSprite::update);
+	SetMessageHandler(&AsScene1001Door::handleMessage);
+}
+
+uint32 AsScene1001Door::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x2000:
+		hammerHitsDoor();
+		break;
+	case 0x3002:
+		gotoNextState();
+		break;
+	}
+	return 0;
+}
+
+void AsScene1001Door::hammerHitsDoor() {
+	switch (getGlobalVar(V_DOOR_STATUS)) {
+	case 0:
+	case 1:
+		playSound(0, 0x65482F03);
+		startAnimation(0x624C0498, 1, 3);
+		NextState(&AsScene1001Door::stShowIdleDoor);
+		break;
+	case 2:
+		playSound(1);
+		startAnimation(0x624C0498, 6, 6);
+		NextState(&AsScene1001Door::stBustedDoorMove);
+		break;
+	default:
+		// Nothing
+		break;
+	}
+	incGlobalVar(V_DOOR_STATUS, 1);
+}
+
+void AsScene1001Door::stShowIdleDoor() {
+	switch (getGlobalVar(V_DOOR_STATUS)) {
+	case 1:
+		startAnimation(0x624C0498, 4, -1);
+		_newStickFrameIndex = 4;
+		break;
+	case 2:
+		startAnimation(0x624C0498, 1, -1);
+		_newStickFrameIndex = 1;
+		break;
+	case 3:
+		stopAnimation();
+		setVisible(false);
+		break;
+	default:
+		startAnimation(0x624C0498, 0, -1);
+		_newStickFrameIndex = 0;
+		break;
+	}
+}
+
+void AsScene1001Door::stBustedDoorMove() {
+	setGlobalVar(V_DOOR_BUSTED, 1);
+	startAnimation(0x624C0498, 6, 6);
+	NextState(&AsScene1001Door::stBustedDoorGone);
+	_x = 30;
+}
+
+void AsScene1001Door::stBustedDoorGone() {
+	playSound(0);
+	stopAnimation();
+	setVisible(false);
+}
+
+AsScene1001Hammer::AsScene1001Hammer(NeverhoodEngine *vm, Sprite *asDoor)
+	: AnimatedSprite(vm, 1100), _asDoor(asDoor) {
+
+	_x = 547;
+	_y = 206;
+	createSurface(900, 177, 192);
+	startAnimation(0x022C90D4, -1, -1);
+	_newStickFrameIndex = STICK_LAST_FRAME;
+	SetUpdateHandler(&AnimatedSprite::update);
+	SetMessageHandler(&AsScene1001Hammer::handleMessage);
+}
+
+uint32 AsScene1001Hammer::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x100D:
+		if (param.asInteger() == 0x00352100)
+			sendMessage(_asDoor, 0x2000, 0);
+		else if (param.asInteger() == 0x0A1A0109)
+			playSound(0, 0x66410886);
+		break;
+	case 0x2000:
+		startAnimation(0x022C90D4, 1, -1);
+		playSound(0, 0xE741020A);
+		_newStickFrameIndex = STICK_LAST_FRAME;
+		break;
+	}
+	return 0;
+}
+
+AsScene1001Window::AsScene1001Window(NeverhoodEngine *vm)
+	: AnimatedSprite(vm, 1200) {
+
+	_x = 320;
+	_y = 240;
+	createSurface(100, 66, 129);
+	startAnimation(0xC68C2299, 0, -1);
+	_newStickFrameIndex = 0;
+	SetUpdateHandler(&AnimatedSprite::update);
+	SetMessageHandler(&AsScene1001Window::handleMessage);
+}
+
+uint32 AsScene1001Window::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x100D:
+		if (param.asInteger() == 0x0E0A1410)
+			playSound(0, 0x60803F10);
+		break;
+	case 0x2001:
+		startAnimation(0xC68C2299, 0, -1);
+		break;
+	case 0x3002:
+		SetMessageHandler(NULL);
+		setGlobalVar(V_WINDOW_OPEN, 1);
+		setVisible(false);
+		break;
+	}
+	return 0;
+}
+
+AsScene1001Lever::AsScene1001Lever(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, int deltaXType)
+	: AnimatedSprite(vm, 1100), _parentScene(parentScene) {
+
+	createSurface(1010, 71, 73);
+	setDoDeltaX(deltaXType);
+	startAnimation(0x04A98C36, 0, -1);
+	_newStickFrameIndex = 0;
+	_x = x;
+	_y = y;
+	SetUpdateHandler(&AnimatedSprite::update);
+	SetMessageHandler(&AsScene1001Lever::handleMessage);
+}
+
+uint32 AsScene1001Lever::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x100D:
+		if (param.asInteger() == 0x00C0C444)
+			sendMessage(_parentScene, 0x480F, 0);
+		else if (param.asInteger() == 0xC41A02C0)
+			playSound(0, 0x40581882);
+		break;
+	case 0x1011:
+		sendMessage(_parentScene, 0x4826, 0);
+		messageResult = 1;
+		break;
+	case 0x3002:
+		startAnimation(0x04A98C36, 0, -1);
+		_newStickFrameIndex = 0;
+		break;
+	case 0x480F:
+		startAnimation(0x04A98C36, 0, -1);
+		break;
+	case 0x482A:
+		sendMessage(_parentScene, 0x1022, 990);
+		break;
+	case 0x482B:
+		sendMessage(_parentScene, 0x1022, 1010);
+		break;
+	}
+	return messageResult;
+}
+
+SsCommonButtonSprite::SsCommonButtonSprite(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, int surfacePriority, uint32 soundFileHash)
+	: StaticSprite(vm, fileHash, surfacePriority), _parentScene(parentScene), _countdown(0) {
+
+	_priority = 1100;
+	_soundFileHash = soundFileHash ? soundFileHash : 0x44141000;
+	setVisible(false);
+	SetUpdateHandler(&SsCommonButtonSprite::update);
+	SetMessageHandler(&SsCommonButtonSprite::handleMessage);
+}
+
+void SsCommonButtonSprite::update() {
+	if (_countdown != 0 && (--_countdown) == 0)
+		setVisible(false);
+}
+
+uint32 SsCommonButtonSprite::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x480B:
+		sendMessage(_parentScene, 0x480B, 0);
+		setVisible(true);
+		_countdown = 8;
+		playSound(0, _soundFileHash);
+		break;
+	}
+	return messageResult;
+}
+
+AsScene1002Ring::AsScene1002Ring(NeverhoodEngine *vm, Scene *parentScene, bool isSpecial, int16 x, int16 y, int16 clipY1, bool isRingLow)
+	: AnimatedSprite(vm, 1100), _parentScene(parentScene), _isSpecial(isSpecial) {
+
+	SetUpdateHandler(&AsScene1002Ring::update);
+
+	if (_isSpecial) {
+		createSurface(990, 68, 314);
+		if (isRingLow) {
+			startAnimation(0x04103090, 0, -1);
+			SetMessageHandler(&AsScene1002Ring::hmRingHangingLow);
+		} else {
+			startAnimation(0xA85C4011, _vm->_rnd->getRandomNumber(15), -1);
+			SetMessageHandler(&AsScene1002Ring::hmRingIdle);
+		}
+	} else {
+		createSurface(990, 68, 138);
+		startAnimation(0xA85C4011, _vm->_rnd->getRandomNumber(15), -1);
+		SetMessageHandler(&AsScene1002Ring::hmRingIdle);
+	}
+
+	setClipRect(0, clipY1, 640, 480);
+
+	_x = x;
+	_y = y;
+
+	setDoDeltaX(_vm->_rnd->getRandomNumber(1));
+
+}
+
+void AsScene1002Ring::update() {
+	updateAnim();
+	updatePosition();
+}
+
+uint32 AsScene1002Ring::hmRingIdle(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x4806:
+		setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0);
+		sendMessage(_parentScene, 0x4806, 0);
+		SetMessageHandler(&AsScene1002Ring::hmRingPulled1);
+		startAnimation(_isSpecial ? 0x87502558 : 0x80DD4010, 0, -1);
+		break;
+	case 0x480F:
+		setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0);
+		sendMessage(_parentScene, 0x480F, 0);
+		SetMessageHandler(&AsScene1002Ring::hmRingPulled2);
+		startAnimation(0x861A2020, 0, -1);
+		break;
+	case 0x482A:
+		sendMessage(_parentScene, 0x1022, 990);
+		break;
+	case 0x482B:
+		sendMessage(_parentScene, 0x1022, 1010);
+		break;
+	}
+	return messageResult;
+}
+
+uint32 AsScene1002Ring::hmRingPulled1(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x3002:
+		startAnimation(_isSpecial ? 0x78D0A812 : 0xB85D2A10, 0, -1);
+		SetMessageHandler(&AsScene1002Ring::hmRingHangingLow);
+		break;
+	case 0x4807:
+		sendMessage(_parentScene, 0x4807, 0);
+		setDoDeltaX(_vm->_rnd->getRandomNumber(1));
+		startAnimation(0x8258A030, 0, -1);
+		SetMessageHandler(&AsScene1002Ring::hmRingReleased);
+		break;
+	case 0x482A:
+		sendMessage(_parentScene, 0x1022, 990);
+		break;
+	case 0x482B:
+		sendMessage(_parentScene, 0x1022, 1010);
+		break;
+	}
+	return messageResult;
+}
+
+uint32 AsScene1002Ring::hmRingPulled2(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x3002:
+		startAnimation(0x04103090, 0, -1);
+		SetMessageHandler(&AsScene1002Ring::hmRingHangingLow);
+		break;
+	case 0x482A:
+		sendMessage(_parentScene, 0x1022, 990);
+		break;
+	case 0x482B:
+		sendMessage(_parentScene, 0x1022, 1010);
+		break;
+	}
+	return messageResult;
+}
+
+uint32 AsScene1002Ring::hmRingHangingLow(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x4807:
+		sendMessage(_parentScene, 0x4807, 0);
+		setDoDeltaX(_vm->_rnd->getRandomNumber(1));
+		startAnimation(0x8258A030, 0, -1);
+		SetMessageHandler(&AsScene1002Ring::hmRingReleased);
+		break;
+	case 0x482A:
+		sendMessage(_parentScene, 0x1022, 990);
+		break;
+	case 0x482B:
+		sendMessage(_parentScene, 0x1022, 1010);
+		break;
+	}
+	return messageResult;
+}
+
+uint32 AsScene1002Ring::hmRingReleased(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = hmRingIdle(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x100D:
+		if (param.asInteger() == 0x05410F72)
+			playSound(0, 0x21EE40A9);
+		break;
+	case 0x3002:
+		startAnimation(0xA85C4011, 0, -1);
+		break;
+	case 0x482A:
+		sendMessage(_parentScene, 0x1022, 990);
+		break;
+	case 0x482B:
+		sendMessage(_parentScene, 0x1022, 1010);
+		break;
+	}
+	return messageResult;
+}
+
+AsScene1002Door::AsScene1002Door(NeverhoodEngine *vm, NRect &clipRect)
+	: StaticSprite(vm, 1200) {
+
+	loadSprite(0x1052370F, kSLFDefDrawOffset | kSLFSetPosition, 800, 526, getGlobalVar(V_FLYTRAP_RING_DOOR) ? 49 : 239);
+	setClipRect(clipRect);
+	SetUpdateHandler(&AsScene1002Door::update);
+	SetMessageHandler(&AsScene1002Door::handleMessage);
+	SetSpriteUpdate(NULL);
+}
+
+void AsScene1002Door::update() {
+	handleSpriteUpdate();
+	updatePosition();
+}
+
+uint32 AsScene1002Door::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x4808:
+		setGlobalVar(V_FLYTRAP_RING_DOOR, 1);
+		SetSpriteUpdate(&AsScene1002Door::suOpenDoor);
+		break;
+	case 0x4809:
+		setGlobalVar(V_FLYTRAP_RING_DOOR, 0);
+		SetSpriteUpdate(&AsScene1002Door::suCloseDoor);
+		break;
+	}
+	return messageResult;
+}
+
+void AsScene1002Door::suOpenDoor() {
+	if (_y > 49) {
+		_y -= 8;
+		if (_y < 49) {
+			SetSpriteUpdate(NULL);
+			_y = 49;
+		}
+		_needRefresh = true;
+	}
+}
+
+void AsScene1002Door::suCloseDoor() {
+	if (_y < 239) {
+		_y += 8;
+		if (_y > 239) {
+			SetSpriteUpdate(NULL);
+			_y = 239;
+		}
+		_needRefresh = true;
+	}
+}
+
+AsScene1002BoxingGloveHitEffect::AsScene1002BoxingGloveHitEffect(NeverhoodEngine *vm)
+	: AnimatedSprite(vm, 1400) {
+
+	createSurface(1025, 88, 165);
+	setVisible(false);
+	SetUpdateHandler(&AnimatedSprite::update);
+	SetMessageHandler(&AsScene1002BoxingGloveHitEffect::handleMessage);
+}
+
+uint32 AsScene1002BoxingGloveHitEffect::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x2004:
+		_x = ((Sprite*)sender)->getX() - 98;
+		_y = ((Sprite*)sender)->getY() - 111;
+		startAnimation(0x0422255A, 0, -1);
+		setVisible(true);
+		break;
+	case 0x3002:
+		stopAnimation();
+		setVisible(false);
+		break;
+	}
+	return messageResult;
+}
+
+AsScene1002DoorSpy::AsScene1002DoorSpy(NeverhoodEngine *vm, NRect &clipRect, Scene *parentScene, Sprite *asDoor, Sprite *asScene1002BoxingGloveHitEffect)
+	: AnimatedSprite(vm, 1300), _clipRect(clipRect), _parentScene(parentScene), _asDoor(asDoor), _asBoxingGloveHitEffect(asScene1002BoxingGloveHitEffect) {
+
+	createSurface(800, 136, 147);
+	setClipRect(clipRect);
+	suDoorSpy();
+	loadSound(0, 0xC0C40298);
+	startAnimation(0x586C1D48, 0, 0);
+	SetUpdateHandler(&AnimatedSprite::update);
+	SetMessageHandler(&AsScene1002DoorSpy::handleMessage);
+	SetSpriteUpdate(&AsScene1002DoorSpy::suDoorSpy);
+}
+
+uint32 AsScene1002DoorSpy::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x100D:
+		if (param.asInteger() == 0xA61CA1C2)
+			sendMessage(_asBoxingGloveHitEffect, 0x2004, 0);
+		else if (param.asInteger() == 0x14CE0620)
+			playSound(0);
+		break;
+	case 0x2003:
+		stDoorSpyBoxingGlove();
+		break;
+	}
+	return messageResult;
+}
+
+uint32 AsScene1002DoorSpy::hmDoorSpyAnimation(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x3002:
+		gotoNextState();
+		break;
+	}
+	return messageResult;
+}
+
+void AsScene1002DoorSpy::suDoorSpy() {
+	_x = _asDoor->getX() + 34;
+	_y = _asDoor->getY() + 175;
+}
+
+void AsScene1002DoorSpy::stDoorSpyIdle() {
+	setClipRect(_clipRect);
+	_parentScene->setSurfacePriority(getSurface(), 800);
+	startAnimation(0x586C1D48, 0, 0);
+	SetMessageHandler(&AsScene1002DoorSpy::handleMessage);
+}
+
+void AsScene1002DoorSpy::stDoorSpyBoxingGlove() {
+	setClipRect(0, 0, 640, 480);
+	_parentScene->setSurfacePriority(getSurface(), 1200);
+	startAnimation(0x586C1D48, 1, -1);
+	SetMessageHandler(&AsScene1002DoorSpy::hmDoorSpyAnimation);
+	NextState(&AsScene1002DoorSpy::stDoorSpyIdle);
+}
+
+SsCommonPressButton::SsCommonPressButton(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int surfacePriority, uint32 soundFileHash)
+	: StaticSprite(vm, 1100), _parentScene(parentScene), _status(0), _countdown(0) {
+
+	_soundFileHash = soundFileHash != 0 ? soundFileHash : 0x44141000;
+	_fileHashes[0] = fileHash1;
+	_fileHashes[1] = fileHash2;
+	createSurface(surfacePriority, 40, 40);
+	loadSprite(fileHash1, kSLFDefDrawOffset | kSLFDefPosition);
+	setVisible(false);
+	SetUpdateHandler(&SsCommonPressButton::update);
+	SetMessageHandler(&SsCommonPressButton::handleMessage);
+}
+
+void SsCommonPressButton::setFileHashes(uint32 fileHash1, uint32 fileHash2) {
+	_fileHashes[0] = fileHash1;
+	_fileHashes[1] = fileHash2;
+	loadSprite(_status == 2 ? fileHash2 : fileHash1, kSLFDefDrawOffset | kSLFDefPosition);
+}
+
+void SsCommonPressButton::update() {
+	if (_countdown != 0 && (--_countdown) == 0) {
+		if (_status == 1) {
+			_status = 2;
+			loadSprite(_fileHashes[1], kSLFDefDrawOffset | kSLFDefPosition);
+			_countdown = 4;
+		} else if (_status == 2) {
+			_status = 3;
+			loadSprite(_fileHashes[0], kSLFDefDrawOffset | kSLFDefPosition);
+			_countdown = 4;
+		} else if (_status == 3) {
+			_status = 0;
+			setVisible(false);
+		}
+	}
+}
+
+uint32 SsCommonPressButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x480B:
+		sendMessage(_parentScene, 0x480B, 0);
+		_status = 1;
+		_countdown = 4;
+		setVisible(true);
+		playSound(0, _soundFileHash);
+		break;
+	}
+	return messageResult;
+}
+
+AsScene1002VenusFlyTrap::AsScene1002VenusFlyTrap(NeverhoodEngine *vm, Scene *parentScene, Sprite *klaymen, bool isSecond)
+	: AnimatedSprite(vm, 1100), _parentScene(parentScene), _klaymen(klaymen), _isSecond(isSecond), _countdown(0) {
+
+	createSurface(995, 175, 195);
+	if (!_isSecond) {
+		if (getGlobalVar(V_FLYTRAP_RING_DOOR)) {
+			setDoDeltaX(1);
+			_x = 366;
+			_y = 435;
+			stRingGrabbed();
+		} else {
+			_x = 174 + getGlobalVar(V_FLYTRAP_POSITION_1) * 32;
+			_y = 435;
+			stIdle();
+		}
+	} else {
+		_x = 186 + getGlobalVar(V_FLYTRAP_POSITION_2) * 32;
+		_y = 364;
+		if (getGlobalVar(V_FLYTRAP_RING_BRIDGE) || getGlobalVar(V_FLYTRAP_RING_FENCE)) {
+			stRingGrabbed();
+		} else {
+			stIdle();
+		}
+	}
+	_flags = 4;
+	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+	SetMessageHandler(&AsScene1002VenusFlyTrap::handleMessage);
+	SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+}
+
+void AsScene1002VenusFlyTrap::update() {
+	if (_countdown != 0 && (--_countdown == 0))
+		gotoNextState();
+	AnimatedSprite::update();
+}
+
+void AsScene1002VenusFlyTrap::upIdle() {
+	if (_countdown == 0 && _klaymen->getX() - 20 > _x)
+		setDoDeltaX(1);
+	else if (_klaymen->getX() + 20 < _x)
+		setDoDeltaX(0);
+	update();
+}
+
+uint32 AsScene1002VenusFlyTrap::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x100D:
+		if (param.asInteger() == 0x000890C4)
+			playSound(0, 0xC21190D8);
+		else if (param.asInteger() == 0x522200A0)
+			playSound(0, 0x931080C8);
+		break;
+	case 0x1011:
+		if (_isSecond) {
+			if (_x >= 154 && _x <= 346) {
+				sendMessage(_parentScene, 0x2000, 0);
+				messageResult = 1;
+			}
+		} else {
+			if (_x >= 174 && _x <= 430) {
+				sendMessage(_parentScene, 0x2000, 0);
+				messageResult = 1;
+			}
+		}
+		break;
+	case 0x480B:
+		setDoDeltaX(param.asInteger() != 0 ? 1 : 0);
+		if (!_isSecond) {
+			if (getGlobalVar(V_FLYTRAP_RING_DOOR))
+				stRelease();
+			else
+				stWalk();
+		} else {
+			if (getGlobalVar(V_FLYTRAP_RING_BRIDGE) || getGlobalVar(V_FLYTRAP_RING_FENCE))
+				stRelease();
+			else
+				stWalk();
+		}
+		break;
+	case 0x480C:
+		if (_isSecond) {
+			if (_x >= 154 && _x <= 346)
+				messageResult = 1;
+			else
+				messageResult = 0;
+		} else {
+			if (_x >= 174 && _x <= 430)
+				messageResult = 1;
+			else
+				messageResult = 0;
+		}
+		break;
+	case 0x480E:
+		if (param.asInteger() == 1)
+			stGrabRing();
+		break;
+	case 0x4810:
+		swallowKlaymen();
+		break;
+	case 0x482A:
+		sendMessage(_parentScene, 0x1022, 995);
+		break;
+	case 0x482B:
+		sendMessage(_parentScene, 0x1022, 1015);
+		break;
+	}
+	return messageResult;
+}
+
+uint32 AsScene1002VenusFlyTrap::hmAnimationSimple(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x3002:
+		gotoNextState();
+		break;
+	}
+	return messageResult;
+}
+
+uint32 AsScene1002VenusFlyTrap::hmAnimationExt(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x100D:
+		if (param.asInteger() == 0x000890C4)
+			playSound(0, 0xC21190D8);
+		else if (param.asInteger() == 0x41881801) {
+			if (_isSecond) {
+				if (_x > 330)
+					sendMessage(_klaymen, 0x4811, 2);
+				else
+					sendMessage(_klaymen, 0x4811, 0);
+			} else {
+				sendMessage(_klaymen, 0x4811, 0);
+			}
+		} else if (param.asInteger() == 0x522200A0)
+			playSound(0, 0x931080C8);
+		break;
+	case 0x3002:
+		gotoNextState();
+		break;
+	case 0x482A:
+		sendMessage(_parentScene, 0x1022, 995);
+		break;
+	case 0x482B:
+		sendMessage(_parentScene, 0x1022, 1015);
+		break;
+	}
+	return messageResult;
+}
+
+void AsScene1002VenusFlyTrap::stWalkBack() {
+	setDoDeltaX(2);
+	startAnimation(0xC4080034, 0, -1);
+	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
+	NextState(&AsScene1002VenusFlyTrap::stIdle);
+}
+
+void AsScene1002VenusFlyTrap::stWalk() {
+	startAnimation(0xC4080034, 0, -1);
+	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationSimple);
+	NextState(&AsScene1002VenusFlyTrap::stIdle);
+}
+
+void AsScene1002VenusFlyTrap::stRelease() {
+	sendMessage(_parentScene, 0x4807, 0);
+	startAnimation(0x82292851, 0, -1);
+	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationSimple);
+	NextState(&AsScene1002VenusFlyTrap::stIdle);
+}
+
+void AsScene1002VenusFlyTrap::stGrabRing() {
+	setDoDeltaX(1);
+	startAnimation(0x86A82A11, 0, -1);
+	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationSimple);
+	NextState(&AsScene1002VenusFlyTrap::stRingGrabbed);
+}
+
+void AsScene1002VenusFlyTrap::stRingGrabbed() {
+	startAnimation(0xB5A86034, 0, -1);
+	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+	SetMessageHandler(&AsScene1002VenusFlyTrap::handleMessage);
+}
+
+void AsScene1002VenusFlyTrap::stKlaymenInside() {
+	startAnimation(0x31303094, 0, -1);
+	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+	SetMessageHandler(NULL);
+	NextState(&AsScene1002VenusFlyTrap::stKlaymenInsideMoving);
+	_countdown = 24;
+}
+
+void AsScene1002VenusFlyTrap::stIdle() {
+	startAnimation(0xC8204250, 0, -1);
+	SetUpdateHandler(&AsScene1002VenusFlyTrap::upIdle);
+	SetMessageHandler(&AsScene1002VenusFlyTrap::handleMessage);
+	if (_isSecond) {
+		if (_x >= 154 && _x <= 346)
+			setGlobalVar(V_FLYTRAP_POSITION_2, (_x - 186) / 32);
+		else {
+			NextState(&AsScene1002VenusFlyTrap::stWalkBack);
+			_countdown = 12;
+		}
+	} else {
+		if (_x >= 174 && _x <= 430)
+			setGlobalVar(V_FLYTRAP_POSITION_1, (_x - 174) / 32);
+		else {
+			NextState(&AsScene1002VenusFlyTrap::stWalkBack);
+			_countdown = 12;
+		}
+	}
+}
+
+void AsScene1002VenusFlyTrap::stKlaymenInsideMoving() {
+	startAnimation(0x152920C4, 0, -1);
+	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
+	NextState(&AsScene1002VenusFlyTrap::stSpitOutKlaymen);
+}
+
+void AsScene1002VenusFlyTrap::stSpitOutKlaymen() {
+	startAnimation(0x84001117, 0, -1);
+	SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+	SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
+	NextState(&AsScene1002VenusFlyTrap::stIdle);
+}
+
+void AsScene1002VenusFlyTrap::swallowKlaymen() {
+	if (_x - 15 < _klaymen->getX() && _x + 15 > _klaymen->getX()) {
+		if (_isSecond)
+			setDoDeltaX(_x > 265 && _x < 330 ? 1 : 0);
+		else
+			setDoDeltaX(_x > 320 ? 1 : 0);
+		sendMessage(_klaymen, 0x2001, 0);
+		startAnimation(0x8C2C80D4, 0, -1);
+		SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+		SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
+		NextState(&AsScene1002VenusFlyTrap::stKlaymenInside);
+	}
+}
+
+AsScene1002OutsideDoorBackground::AsScene1002OutsideDoorBackground(NeverhoodEngine *vm)
+	: AnimatedSprite(vm, 1200), _countdown(0), _isDoorClosed(true) {
+
+	createSurface(850, 186, 212);
+	_x = 320;
+	_y = 240;
+	if (getGlobalVar(V_FLYTRAP_RING_DOOR)) {
+		startAnimation(0x004A4495, -1, -1);
+		_newStickFrameIndex = STICK_LAST_FRAME;
+	} else
+		setVisible(false);
+	SetUpdateHandler(&AsScene1002OutsideDoorBackground::update);
+	SetMessageHandler(&AsScene1002OutsideDoorBackground::handleMessage);
+}
+
+void AsScene1002OutsideDoorBackground::update() {
+	if (_countdown != 0 && (--_countdown == 0)) {
+		if (_isDoorClosed)
+			stCloseDoor();
+		else
+			stOpenDoor();
+	}
+	AnimatedSprite::update();
+}
+
+uint32 AsScene1002OutsideDoorBackground::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageResult) {
+	case 0x4808:
+		_isDoorClosed = false;
+		_countdown = 2;
+		break;
+	case 0x4809:
+		_isDoorClosed = true;
+		_countdown = 2;
+		break;
+	}
+	return messageResult;
+}
+
+uint32 AsScene1002OutsideDoorBackground::hmAnimation(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = handleMessage(messageNum, param, sender);
+	switch (messageResult) {
+	case 0x3002:
+		gotoNextState();
+		break;
+	}
+	return messageResult;
+}
+
+void AsScene1002OutsideDoorBackground::stOpenDoor() {
+	startAnimation(0x004A4495, 0, -1);
+	_newStickFrameIndex = STICK_LAST_FRAME;
+	setVisible(true);
+	SetMessageHandler(&AsScene1002OutsideDoorBackground::handleMessage);
+}
+
+void AsScene1002OutsideDoorBackground::stCloseDoor() {
+	startAnimation(0x004A4495, -1, -1);
+	_playBackwards = true;
+	setVisible(true);
+	SetMessageHandler(&AsScene1002OutsideDoorBackground::hmAnimation);
+	NextState(&AsScene1002OutsideDoorBackground::stDoorClosed);
+}
+
+void AsScene1002OutsideDoorBackground::stDoorClosed() {
+	setVisible(false);
+	stopAnimation();
+}
+
+AsScene1002KlaymenLadderHands::AsScene1002KlaymenLadderHands(NeverhoodEngine *vm, Klaymen *klaymen)
+	: AnimatedSprite(vm, 1200), _klaymen(klaymen) {
+
+	createSurface(1200, 40, 163);
+	setVisible(false);
+	SetUpdateHandler(&AsScene1002KlaymenLadderHands::update);
+	SetMessageHandler(&Sprite::handleMessage);
+}
+
+void AsScene1002KlaymenLadderHands::update() {
+	if (_klaymen->getCurrAnimFileHash() == 0x3A292504) {
+		startAnimation(0xBA280522, _klaymen->getFrameIndex(), -1);
+		_newStickFrameIndex = _klaymen->getFrameIndex();
+		setVisible(true);
+		_x = _klaymen->getX();
+		_y = _klaymen->getY();
+		setDoDeltaX(_klaymen->isDoDeltaX() ? 1 : 0);
+	} else if (_klaymen->getCurrAnimFileHash() == 0x122D1505) {
+		startAnimation(0x1319150C, _klaymen->getFrameIndex(), -1);
+		_newStickFrameIndex = _klaymen->getFrameIndex();
+		setVisible(true);
+		_x = _klaymen->getX();
+		_y = _klaymen->getY();
+		setDoDeltaX(_klaymen->isDoDeltaX() ? 1 : 0);
+	} else
+		setVisible(false);
+	AnimatedSprite::update();
+}
+
+AsScene1002KlaymenPeekHand::AsScene1002KlaymenPeekHand(NeverhoodEngine *vm, Scene *parentScene, Klaymen *klaymen)
+	: AnimatedSprite(vm, 1200), _parentScene(parentScene), _klaymen(klaymen),
+	_isClipRectSaved(false) {
+
+	createSurface(1000, 33, 41);
+	setVisible(false);
+	SetUpdateHandler(&AsScene1002KlaymenPeekHand::update);
+	SetMessageHandler(&AsScene1002KlaymenPeekHand::handleMessage);
+}
+
+void AsScene1002KlaymenPeekHand::update() {
+	if (_klaymen->getCurrAnimFileHash() == 0xAC20C012 && _klaymen->getFrameIndex() < 50) {
+		startAnimation(0x9820C913, _klaymen->getFrameIndex(), -1);
+		_newStickFrameIndex = _klaymen->getFrameIndex();
+		setVisible(true);
+		_x = _klaymen->getX();
+		_y = _klaymen->getY();
+		setDoDeltaX(_klaymen->isDoDeltaX() ? 1 : 0);
+	} else
+		setVisible(false);
+	AnimatedSprite::update();
+}
+
+uint32 AsScene1002KlaymenPeekHand::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x100D:
+		if (param.asInteger() == 0x4AB28209) {
+			sendMessage(_parentScene, 0x1022, 1200);
+			_isClipRectSaved = true;
+			_savedClipRect = _surface->getClipRect();
+			setClipRect(0, 0, 640, 480);
+		} else if (param.asInteger() == 0x88001184) {
+			sendMessage(_parentScene, 0x1022, 1000);
+			if (_isClipRectSaved)
+				setClipRect(_savedClipRect);
+		}
+		break;
+	}
+	return messageResult;
+}
+
+AsScene1004TrashCan::AsScene1004TrashCan(NeverhoodEngine *vm)
+	: AnimatedSprite(vm, 1100) {
+
+	_x = 330;
+	_y = 327;
+	createSurface(800, 56, 50);
+	setVisible(false);
+	SetUpdateHandler(&AnimatedSprite::update);
+	SetMessageHandler(&AsScene1004TrashCan::handleMessage);
+}
+
+uint32 AsScene1004TrashCan::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x100D:
+		if (param.asInteger() == 0x225A8587)
+			playSound(0, 0x109AFC4C);
+		break;
+	case 0x2002:
+		startAnimation(0xEB312C11, 0, -1);
+		setVisible(true);
+		break;
+	case 0x3002:
+		stopAnimation();
+		setVisible(false);
+		break;
+	}
+	return 0;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1000_sprites.h b/engines/neverhood/modules/module1000_sprites.h
new file mode 100644
index 0000000..51c2486
--- /dev/null
+++ b/engines/neverhood/modules/module1000_sprites.h
@@ -0,0 +1,205 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_MODULES_MODULE1000_SPRITES_H
+#define NEVERHOOD_MODULES_MODULE1000_SPRITES_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+class AsScene1001Door : public AnimatedSprite {
+public:
+	AsScene1001Door(NeverhoodEngine *vm);
+protected:
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+	void hammerHitsDoor();
+	void stShowIdleDoor();
+	void stBustedDoorMove();
+	void stBustedDoorGone();
+};
+
+class AsScene1001Hammer : public AnimatedSprite {
+public:
+	AsScene1001Hammer(NeverhoodEngine *vm, Sprite *asDoor);
+protected:
+	Sprite *_asDoor;
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1001Window : public AnimatedSprite {
+public:
+	AsScene1001Window(NeverhoodEngine *vm);
+protected:
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1001Lever : public AnimatedSprite {
+public:
+	AsScene1001Lever(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, int deltaXType);
+protected:
+	Scene *_parentScene;
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsCommonButtonSprite : public StaticSprite {
+public:
+	SsCommonButtonSprite(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, int surfacePriority, uint32 soundFileHash);
+protected:
+	Scene *_parentScene;
+	uint32 _soundFileHash;
+	int16 _countdown;
+	void update();
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1002Ring : public AnimatedSprite {
+public:
+	AsScene1002Ring(NeverhoodEngine *vm, Scene *parentScene, bool isSpecial, int16 x, int16 y, int16 clipY1, bool isRingLow);
+protected:
+	Scene *_parentScene;
+	bool _isSpecial;
+	void update();
+	uint32 hmRingIdle(int messageNum, const MessageParam &param, Entity *sender);
+	uint32 hmRingPulled1(int messageNum, const MessageParam &param, Entity *sender);
+	uint32 hmRingPulled2(int messageNum, const MessageParam &param, Entity *sender);
+	uint32 hmRingHangingLow(int messageNum, const MessageParam &param, Entity *sender);
+	uint32 hmRingReleased(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1002Door : public StaticSprite {
+public:
+	AsScene1002Door(NeverhoodEngine *vm, NRect &clipRect);
+protected:
+	void update();
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+	void suOpenDoor();
+	void suCloseDoor();
+};
+
+class AsScene1002BoxingGloveHitEffect : public AnimatedSprite {
+public:
+	AsScene1002BoxingGloveHitEffect(NeverhoodEngine *vm);
+protected:
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1002DoorSpy : public AnimatedSprite {
+public:
+	AsScene1002DoorSpy(NeverhoodEngine *vm, NRect &clipRect, Scene *parentScene, Sprite *asDoor, Sprite *asScene1002BoxingGloveHitEffect);
+protected:
+	Scene *_parentScene;
+	Sprite *_asDoor;
+	Sprite *_asBoxingGloveHitEffect;
+	NRect _clipRect;
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+	uint32 hmDoorSpyAnimation(int messageNum, const MessageParam &param, Entity *sender);
+	void suDoorSpy();
+	void stDoorSpyIdle();
+	void stDoorSpyBoxingGlove();
+};
+
+class SsCommonPressButton : public StaticSprite {
+public:
+	SsCommonPressButton(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int surfacePriority, uint32 soundFileHash);
+	void setFileHashes(uint32 fileHash1, uint32 fileHash2);
+protected:
+	Scene *_parentScene;
+	uint32 _soundFileHash;
+	uint32 _fileHashes[2];
+	int _status;
+	int _countdown;
+	void update();
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1002VenusFlyTrap : public AnimatedSprite {
+public:
+	AsScene1002VenusFlyTrap(NeverhoodEngine *vm, Scene *parentScene, Sprite *klaymen, bool isSecond);
+protected:
+	Scene *_parentScene;
+	Sprite *_klaymen;
+	int _countdown;
+	bool _isSecond;
+	void update();
+	void upIdle();
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+	uint32 hmAnimationSimple(int messageNum, const MessageParam &param, Entity *sender);
+	uint32 hmAnimationExt(int messageNum, const MessageParam &param, Entity *sender);
+	void stWalkBack();
+	void stWalk();
+	void stRelease();
+	void stGrabRing();
+	void stRingGrabbed();
+	void stKlaymenInside();
+	void stIdle();
+	void stKlaymenInsideMoving();
+	void stSpitOutKlaymen();
+	void swallowKlaymen();
+};
+
+class AsScene1002OutsideDoorBackground : public AnimatedSprite {
+public:
+	AsScene1002OutsideDoorBackground(NeverhoodEngine *vm);
+protected:
+	int _countdown;
+	bool _isDoorClosed;
+	void update();
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+	uint32 hmAnimation(int messageNum, const MessageParam &param, Entity *sender);
+	void stOpenDoor();
+	void stCloseDoor();
+	void stDoorClosed();
+};
+
+class AsScene1002KlaymenLadderHands : public AnimatedSprite {
+public:
+	AsScene1002KlaymenLadderHands(NeverhoodEngine *vm, Klaymen *klaymen);
+protected:
+	Klaymen *_klaymen;
+	void update();
+};
+
+class AsScene1002KlaymenPeekHand : public AnimatedSprite {
+public:
+	AsScene1002KlaymenPeekHand(NeverhoodEngine *vm, Scene *parentScene, Klaymen *klaymen);
+protected:
+	Scene *_parentScene;
+	Klaymen *_klaymen;
+	bool _isClipRectSaved;
+	NRect _savedClipRect;
+	void update();
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1004TrashCan : public AnimatedSprite {
+public:
+	AsScene1004TrashCan(NeverhoodEngine *vm);
+protected:
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1000_SPRITES_H */
diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp
index faa0516..1b226de 100644
--- a/engines/neverhood/modules/module1100.cpp
+++ b/engines/neverhood/modules/module1100.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "neverhood/modules/module1100.h"
+#include "neverhood/modules/module1100_sprites.h"
 #include "neverhood/gamemodule.h"
 #include "neverhood/navigationscene.h"
 
@@ -236,6 +237,13 @@ void Module1100::updateScene() {
 	}
 }
 
+static const uint32 kScene1105BackgroundFileHashes[] = {
+	0x20018662,
+	0x20014202,
+	0x20012202,
+	0x20010002 // CHECKME: This used ??
+};
+
 static const uint32 kScene1105FileHashes[] = {
 	0x00028006,
 	0x0100A425,
@@ -249,186 +257,6 @@ static const uint32 kScene1105FileHashes[] = {
 	0xB14A891E
 };
 
-static const uint32 kScene1105BackgroundFileHashes[] = {
-	0x20018662,
-	0x20014202,
-	0x20012202,
-	0x20010002 // CHECKME: This used ??
-};
-
-static const uint32 kSsScene1105SymbolDieFileHashes[] = {
-	0,
-	0x90898414,
-	0x91098414,
-	0x92098414,
-	0x94098414,
-	0x98098414,
-	0x80098414,
-	0xB0098414,
-	0xD0098414,
-	0x10098414
-};
-
-SsScene1105Button::SsScene1105Button(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, NRect &collisionBounds)
-	: StaticSprite(vm, fileHash, 200), _parentScene(parentScene), _countdown(0) {
-
-	_collisionBounds = collisionBounds;
-	SetMessageHandler(&SsScene1105Button::handleMessage);
-	SetUpdateHandler(&SsScene1105Button::update);
-	setVisible(false);
-}
-
-void SsScene1105Button::update() {
-	if (_countdown != 0 && (--_countdown == 0)) {
-		sendMessage(_parentScene, 0x4807, 0);
-		setVisible(false);
-	}
-}
-
-uint32 SsScene1105Button::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x1011:
-		if (_countdown == 0) {
-			sendMessage(_parentScene, 0x4826, 0);
-			messageResult = 1;
-		}
-		break;
-	case 0x480B:
-		_countdown = 8;
-		setVisible(true);
-		playSound(0, 0x44141000);
-		break;
-	}
-	return messageResult;
-}
-
-SsScene1105Symbol::SsScene1105Symbol(NeverhoodEngine *vm, uint32 fileHash, int16 x, int16 y)
-	: StaticSprite(vm, 0) {
-
-	loadSprite(fileHash, kSLFCenteredDrawOffset | kSLFSetPosition, 200, x, y);
-}
-
-void SsScene1105Symbol::hide() {
-	setVisible(false);
-	_needRefresh = true;
-	updatePosition();
-}
-
-SsScene1105SymbolDie::SsScene1105SymbolDie(NeverhoodEngine *vm, uint dieIndex, int16 x, int16 y)
-	: StaticSprite(vm, 1100), _dieIndex(dieIndex) {
-
-	_x = x;
-	_y = y;
-	createSurface(200, 50, 50);
-	loadSymbolSprite();
-	SetMessageHandler(&SsScene1105SymbolDie::handleMessage);
-}
-
-uint32 SsScene1105SymbolDie::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x2000:
-		loadSymbolSprite();
-		break;
-	}
-	return messageResult;
-}
-
-void SsScene1105SymbolDie::loadSymbolSprite() {
-	loadSprite(kSsScene1105SymbolDieFileHashes[getSubVar(VA_CURR_DICE_NUMBERS, _dieIndex)], kSLFCenteredDrawOffset);
-}
-
-void SsScene1105SymbolDie::hide() {
-	setVisible(false);
-	_needRefresh = true;
-	updatePosition();
-}
-
-AsScene1105TeddyBear::AsScene1105TeddyBear(NeverhoodEngine *vm, Scene *parentScene)
-	: AnimatedSprite(vm, 1100), _parentScene(parentScene) {
-
-	createSurface(100, 556, 328);
-	_x = 320;
-	_y = 240;
-	SetUpdateHandler(&AnimatedSprite::update);
-	SetMessageHandler(&AsScene1105TeddyBear::handleMessage);
-	startAnimation(0x65084002, 0, -1);
-	_newStickFrameIndex = 0;
-	setVisible(false);
-	_needRefresh = true;
-	updatePosition();
-	loadSound(0, 0xCE840261);
-	loadSound(1, 0xCCA41A62);
-}
-
-uint32 AsScene1105TeddyBear::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x2002:
-		if (getGlobalVar(V_ROBOT_TARGET)) {
-			startAnimation(0x6B0C0432, 0, -1);
-			playSound(0);
-		} else {
-			startAnimation(0x65084002, 0, -1);
-			playSound(1);
-		}
-		break;
-	case 0x3002:
-		sendMessage(_parentScene, 0x2003, 0);
-		stopAnimation();
-		break;
-	}
-	return messageResult;
-}
-
-void AsScene1105TeddyBear::show() {
-	setVisible(true);
-	_needRefresh = true;
-	updatePosition();
-}
-
-void AsScene1105TeddyBear::hide() {
-	setVisible(false);
-	_needRefresh = true;
-	updatePosition();
-}
-
-SsScene1105OpenButton::SsScene1105OpenButton(NeverhoodEngine *vm, Scene *parentScene)
-	: StaticSprite(vm, 900), _parentScene(parentScene), _countdown(0), _isClicked(false) {
-
-	loadSprite(0x8228A46C, kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 400);
-	setVisible(false);
-	loadSound(0, 0x44045140);
-	SetUpdateHandler(&SsScene1105OpenButton::update);
-	SetMessageHandler(&SsScene1105OpenButton::handleMessage);
-}
-
-void SsScene1105OpenButton::update() {
-	updatePosition();
-	if (_countdown != 0 && (--_countdown == 0)) {
-		setVisible(false);
-		sendMessage(_parentScene, 0x2001, 0);
-	}
-}
-
-uint32 SsScene1105OpenButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
-	uint32 messageResult = 0;
-	Sprite::handleMessage(messageNum, param, sender);
-	switch (messageNum) {
-	case 0x1011:
-		if (_countdown == 0 && !_isClicked) {
-			playSound(0);
-			setVisible(true);
-			_isClicked = true;
-			_countdown = 4;
-		}
-		messageResult = 1;
-		break;
-	}
-	return messageResult;
-}
-
 Scene1105::Scene1105(NeverhoodEngine *vm, Module *parentModule)
 	: Scene(vm, parentModule), _countdown(0), _isPanelOpen(false), _isActionButtonClicked(false), _doMoveTeddy(false),
 	_isClosePanelDone(false), _leaveResult(0), _backgroundIndex(0) {
diff --git a/engines/neverhood/modules/module1100.h b/engines/neverhood/modules/module1100.h
index 373f6b7..38bac1f 100644
--- a/engines/neverhood/modules/module1100.h
+++ b/engines/neverhood/modules/module1100.h
@@ -29,8 +29,6 @@
 
 namespace Neverhood {
 
-// Module1100
-
 class Module1100 : public Module {
 public:
 	Module1100(NeverhoodEngine *vm, Module *parentModule, int which);
@@ -42,52 +40,9 @@ protected:
 	void updateScene();
 };
 
-class SsScene1105Button : public StaticSprite {
-public:
-	SsScene1105Button(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, NRect &collisionBounds);
-protected:
-	Scene *_parentScene;
-	int _countdown;
-	void update();
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
-
-class SsScene1105Symbol : public StaticSprite {
-public:
-	SsScene1105Symbol(NeverhoodEngine *vm, uint32 fileHash, int16 x, int16 y);
-	void hide();
-};
-
-class SsScene1105SymbolDie : public StaticSprite {
-public:
-	SsScene1105SymbolDie(NeverhoodEngine *vm, uint dieIndex, int16 x, int16 y);
-	void hide();
-protected:
-	uint _dieIndex;
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-	void loadSymbolSprite();
-};
-
-class AsScene1105TeddyBear : public AnimatedSprite {
-public:
-	AsScene1105TeddyBear(NeverhoodEngine *vm, Scene *parentScene);
-	void show();
-	void hide();
-protected:
-	Scene *_parentScene;
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
-
-class SsScene1105OpenButton : public StaticSprite {
-public:
-	SsScene1105OpenButton(NeverhoodEngine *vm, Scene *parentScene);
-protected:
-	Scene *_parentScene;
-	int _countdown;
-	bool _isClicked;
-	void update();
-	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
-};
+class AsScene1105TeddyBear;
+class SsScene1105Symbol;
+class SsScene1105SymbolDie;
 
 class Scene1105 : public Scene {
 public:
diff --git a/engines/neverhood/modules/module1100_sprites.cpp b/engines/neverhood/modules/module1100_sprites.cpp
new file mode 100644
index 0000000..d421d85
--- /dev/null
+++ b/engines/neverhood/modules/module1100_sprites.cpp
@@ -0,0 +1,200 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "neverhood/modules/module1100_sprites.h"
+
+namespace Neverhood {
+
+static const uint32 kSsScene1105SymbolDieFileHashes[] = {
+	0,
+	0x90898414,
+	0x91098414,
+	0x92098414,
+	0x94098414,
+	0x98098414,
+	0x80098414,
+	0xB0098414,
+	0xD0098414,
+	0x10098414
+};
+
+SsScene1105Button::SsScene1105Button(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, NRect &collisionBounds)
+	: StaticSprite(vm, fileHash, 200), _parentScene(parentScene), _countdown(0) {
+
+	_collisionBounds = collisionBounds;
+	SetMessageHandler(&SsScene1105Button::handleMessage);
+	SetUpdateHandler(&SsScene1105Button::update);
+	setVisible(false);
+}
+
+void SsScene1105Button::update() {
+	if (_countdown != 0 && (--_countdown == 0)) {
+		sendMessage(_parentScene, 0x4807, 0);
+		setVisible(false);
+	}
+}
+
+uint32 SsScene1105Button::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x1011:
+		if (_countdown == 0) {
+			sendMessage(_parentScene, 0x4826, 0);
+			messageResult = 1;
+		}
+		break;
+	case 0x480B:
+		_countdown = 8;
+		setVisible(true);
+		playSound(0, 0x44141000);
+		break;
+	}
+	return messageResult;
+}
+
+SsScene1105Symbol::SsScene1105Symbol(NeverhoodEngine *vm, uint32 fileHash, int16 x, int16 y)
+	: StaticSprite(vm, 0) {
+
+	loadSprite(fileHash, kSLFCenteredDrawOffset | kSLFSetPosition, 200, x, y);
+}
+
+void SsScene1105Symbol::hide() {
+	setVisible(false);
+	_needRefresh = true;
+	updatePosition();
+}
+
+SsScene1105SymbolDie::SsScene1105SymbolDie(NeverhoodEngine *vm, uint dieIndex, int16 x, int16 y)
+	: StaticSprite(vm, 1100), _dieIndex(dieIndex) {
+
+	_x = x;
+	_y = y;
+	createSurface(200, 50, 50);
+	loadSymbolSprite();
+	SetMessageHandler(&SsScene1105SymbolDie::handleMessage);
+}
+
+uint32 SsScene1105SymbolDie::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x2000:
+		loadSymbolSprite();
+		break;
+	}
+	return messageResult;
+}
+
+void SsScene1105SymbolDie::loadSymbolSprite() {
+	loadSprite(kSsScene1105SymbolDieFileHashes[getSubVar(VA_CURR_DICE_NUMBERS, _dieIndex)], kSLFCenteredDrawOffset);
+}
+
+void SsScene1105SymbolDie::hide() {
+	setVisible(false);
+	_needRefresh = true;
+	updatePosition();
+}
+
+AsScene1105TeddyBear::AsScene1105TeddyBear(NeverhoodEngine *vm, Scene *parentScene)
+	: AnimatedSprite(vm, 1100), _parentScene(parentScene) {
+
+	createSurface(100, 556, 328);
+	_x = 320;
+	_y = 240;
+	SetUpdateHandler(&AnimatedSprite::update);
+	SetMessageHandler(&AsScene1105TeddyBear::handleMessage);
+	startAnimation(0x65084002, 0, -1);
+	_newStickFrameIndex = 0;
+	setVisible(false);
+	_needRefresh = true;
+	updatePosition();
+	loadSound(0, 0xCE840261);
+	loadSound(1, 0xCCA41A62);
+}
+
+uint32 AsScene1105TeddyBear::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x2002:
+		if (getGlobalVar(V_ROBOT_TARGET)) {
+			startAnimation(0x6B0C0432, 0, -1);
+			playSound(0);
+		} else {
+			startAnimation(0x65084002, 0, -1);
+			playSound(1);
+		}
+		break;
+	case 0x3002:
+		sendMessage(_parentScene, 0x2003, 0);
+		stopAnimation();
+		break;
+	}
+	return messageResult;
+}
+
+void AsScene1105TeddyBear::show() {
+	setVisible(true);
+	_needRefresh = true;
+	updatePosition();
+}
+
+void AsScene1105TeddyBear::hide() {
+	setVisible(false);
+	_needRefresh = true;
+	updatePosition();
+}
+
+SsScene1105OpenButton::SsScene1105OpenButton(NeverhoodEngine *vm, Scene *parentScene)
+	: StaticSprite(vm, 900), _parentScene(parentScene), _countdown(0), _isClicked(false) {
+
+	loadSprite(0x8228A46C, kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 400);
+	setVisible(false);
+	loadSound(0, 0x44045140);
+	SetUpdateHandler(&SsScene1105OpenButton::update);
+	SetMessageHandler(&SsScene1105OpenButton::handleMessage);
+}
+
+void SsScene1105OpenButton::update() {
+	updatePosition();
+	if (_countdown != 0 && (--_countdown == 0)) {
+		setVisible(false);
+		sendMessage(_parentScene, 0x2001, 0);
+	}
+}
+
+uint32 SsScene1105OpenButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+	uint32 messageResult = 0;
+	Sprite::handleMessage(messageNum, param, sender);
+	switch (messageNum) {
+	case 0x1011:
+		if (_countdown == 0 && !_isClicked) {
+			playSound(0);
+			setVisible(true);
+			_isClicked = true;
+			_countdown = 4;
+		}
+		messageResult = 1;
+		break;
+	}
+	return messageResult;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1100_sprites.h b/engines/neverhood/modules/module1100_sprites.h
new file mode 100644
index 0000000..d4858cd
--- /dev/null
+++ b/engines/neverhood/modules/module1100_sprites.h
@@ -0,0 +1,81 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_MODULES_MODULE1100_SPRITES_H
+#define NEVERHOOD_MODULES_MODULE1100_SPRITES_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+class SsScene1105Button : public StaticSprite {
+public:
+	SsScene1105Button(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, NRect &collisionBounds);
+protected:
+	Scene *_parentScene;
+	int _countdown;
+	void update();
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene1105Symbol : public StaticSprite {
+public:
+	SsScene1105Symbol(NeverhoodEngine *vm, uint32 fileHash, int16 x, int16 y);
+	void hide();
+};
+
+class SsScene1105SymbolDie : public StaticSprite {
+public:
+	SsScene1105SymbolDie(NeverhoodEngine *vm, uint dieIndex, int16 x, int16 y);
+	void hide();
+protected:
+	uint _dieIndex;
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+	void loadSymbolSprite();
+};
+
+class AsScene1105TeddyBear : public AnimatedSprite {
+public:
+	AsScene1105TeddyBear(NeverhoodEngine *vm, Scene *parentScene);
+	void show();
+	void hide();
+protected:
+	Scene *_parentScene;
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene1105OpenButton : public StaticSprite {
+public:
+	SsScene1105OpenButton(NeverhoodEngine *vm, Scene *parentScene);
+protected:
+	Scene *_parentScene;
+	int _countdown;
+	bool _isClicked;
+	void update();
+	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1100_SPRITES_H */
diff --git a/engines/neverhood/modules/module1300.cpp b/engines/neverhood/modules/module1300.cpp
index 9fa266c..656af29 100644
--- a/engines/neverhood/modules/module1300.cpp
+++ b/engines/neverhood/modules/module1300.cpp
@@ -20,7 +20,7 @@
  *
  */
 
-#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1000_sprites.h"
 #include "neverhood/modules/module1200_sprites.h"
 #include "neverhood/modules/module1300.h"
 #include "neverhood/modules/module1300_sprites.h"
diff --git a/engines/neverhood/modules/module1400.cpp b/engines/neverhood/modules/module1400.cpp
index 2766a1c..2fc1052 100644
--- a/engines/neverhood/modules/module1400.cpp
+++ b/engines/neverhood/modules/module1400.cpp
@@ -22,7 +22,7 @@
 
 #include "neverhood/diskplayerscene.h"
 #include "neverhood/gamemodule.h"
-#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1000_sprites.h"
 #include "neverhood/modules/module1200_sprites.h"
 #include "neverhood/modules/module1400.h"
 #include "neverhood/modules/module1400_sprites.h"
diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp
index 685f982..e6969cc 100644
--- a/engines/neverhood/modules/module2200.cpp
+++ b/engines/neverhood/modules/module2200.cpp
@@ -20,7 +20,7 @@
  *
  */
 
-#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1000_sprites.h"
 #include "neverhood/modules/module1200_sprites.h"
 #include "neverhood/modules/module2200.h"
 #include "neverhood/modules/module2200_sprites.h"
diff --git a/engines/neverhood/modules/module2200.h b/engines/neverhood/modules/module2200.h
index 89f00ad..6b41430 100644
--- a/engines/neverhood/modules/module2200.h
+++ b/engines/neverhood/modules/module2200.h
@@ -91,6 +91,8 @@ protected:
 	uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
 };
 
+class SsCommonPressButton;
+
 class Scene2205 : public Scene {
 public:
 	Scene2205(NeverhoodEngine *vm, Module *parentModule, int which);
diff --git a/engines/neverhood/modules/module2400.cpp b/engines/neverhood/modules/module2400.cpp
index 6cc441a..dab39b2 100644
--- a/engines/neverhood/modules/module2400.cpp
+++ b/engines/neverhood/modules/module2400.cpp
@@ -20,7 +20,7 @@
  *
  */
 
-#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1000_sprites.h"
 #include "neverhood/modules/module1200_sprites.h"
 #include "neverhood/modules/module2400.h"
 #include "neverhood/modules/module2100_sprites.h"
diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp
index 00d1f97..49acf47 100644
--- a/engines/neverhood/modules/module2800.cpp
+++ b/engines/neverhood/modules/module2800.cpp
@@ -22,7 +22,7 @@
 
 #include "neverhood/modules/module2800.h"
 #include "neverhood/gamemodule.h"
-#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1000_sprites.h"
 #include "neverhood/modules/module1200_sprites.h"
 #include "neverhood/modules/module1700_sprites.h"
 #include "neverhood/modules/module2200_sprites.h"


Commit: 4cfb9ee82bf88ab2e887ea0a4f5014766dbb4953
    https://github.com/scummvm/scummvm/commit/4cfb9ee82bf88ab2e887ea0a4f5014766dbb4953
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-10-05T12:06:47-07:00

Commit Message:
NEVERHOOD: Clean up some includes

Changed paths:
    engines/neverhood/modules/module1100.cpp
    engines/neverhood/modules/module1300.cpp
    engines/neverhood/modules/module1400_sprites.cpp
    engines/neverhood/modules/module1600_sprites.cpp
    engines/neverhood/modules/module1700.cpp
    engines/neverhood/modules/module1700_sprites.cpp
    engines/neverhood/modules/module1800.cpp
    engines/neverhood/modules/module1900.cpp
    engines/neverhood/modules/module1900_sprites.cpp
    engines/neverhood/modules/module2000.cpp
    engines/neverhood/modules/module2100.cpp
    engines/neverhood/modules/module2100_sprites.cpp
    engines/neverhood/modules/module2200.cpp
    engines/neverhood/modules/module2200_sprites.cpp
    engines/neverhood/modules/module2300.cpp
    engines/neverhood/modules/module2500.cpp
    engines/neverhood/modules/module2700.cpp
    engines/neverhood/modules/module2700_sprites.cpp
    engines/neverhood/modules/module2800.cpp
    engines/neverhood/modules/module2800_sprites.cpp
    engines/neverhood/modules/module2900.cpp
    engines/neverhood/modules/module2900_sprites.cpp
    engines/neverhood/modules/module3000.cpp
    engines/neverhood/modules/module3000_sprites.cpp



diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp
index 1b226de..af2df2e 100644
--- a/engines/neverhood/modules/module1100.cpp
+++ b/engines/neverhood/modules/module1100.cpp
@@ -20,10 +20,10 @@
  *
  */
 
-#include "neverhood/modules/module1100.h"
-#include "neverhood/modules/module1100_sprites.h"
 #include "neverhood/gamemodule.h"
 #include "neverhood/navigationscene.h"
+#include "neverhood/modules/module1100.h"
+#include "neverhood/modules/module1100_sprites.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module1300.cpp b/engines/neverhood/modules/module1300.cpp
index 656af29..312fb85 100644
--- a/engines/neverhood/modules/module1300.cpp
+++ b/engines/neverhood/modules/module1300.cpp
@@ -20,17 +20,15 @@
  *
  */
 
+#include "neverhood/diskplayerscene.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/menumodule.h"
 #include "neverhood/modules/module1000_sprites.h"
 #include "neverhood/modules/module1200_sprites.h"
 #include "neverhood/modules/module1300.h"
 #include "neverhood/modules/module1300_sprites.h"
 #include "neverhood/modules/module1400_sprites.h"
 #include "neverhood/modules/module2200_sprites.h"
-#include "neverhood/gamemodule.h"
-#include "neverhood/diskplayerscene.h"
-#include "neverhood/menumodule.h"
-#include "neverhood/navigationscene.h"
-#include "neverhood/smackerscene.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module1400_sprites.cpp b/engines/neverhood/modules/module1400_sprites.cpp
index aba9bc8..413b666 100644
--- a/engines/neverhood/modules/module1400_sprites.cpp
+++ b/engines/neverhood/modules/module1400_sprites.cpp
@@ -22,7 +22,6 @@
 
 #include "neverhood/modules/module1400_sprites.h"
 #include "neverhood/modules/module1400.h"
-#include "neverhood/gamemodule.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module1600_sprites.cpp b/engines/neverhood/modules/module1600_sprites.cpp
index b12a070..4473a83 100644
--- a/engines/neverhood/modules/module1600_sprites.cpp
+++ b/engines/neverhood/modules/module1600_sprites.cpp
@@ -20,11 +20,7 @@
  *
  */
 
-#include "neverhood/gamemodule.h"
-#include "neverhood/modules/module1200.h"
 #include "neverhood/modules/module1600_sprites.h"
-#include "neverhood/modules/module2200_sprites.h"
-#include "neverhood/modules/module3000_sprites.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module1700.cpp b/engines/neverhood/modules/module1700.cpp
index 4681e59..e3a5fc3 100644
--- a/engines/neverhood/modules/module1700.cpp
+++ b/engines/neverhood/modules/module1700.cpp
@@ -20,9 +20,9 @@
  *
  */
 
+#include "neverhood/gamemodule.h"
 #include "neverhood/modules/module1700.h"
 #include "neverhood/modules/module1700_sprites.h"
-#include "neverhood/gamemodule.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module1700_sprites.cpp b/engines/neverhood/modules/module1700_sprites.cpp
index 1a8dda3..87c8397 100644
--- a/engines/neverhood/modules/module1700_sprites.cpp
+++ b/engines/neverhood/modules/module1700_sprites.cpp
@@ -20,7 +20,6 @@
  *
  */
 
-#include "neverhood/gamemodule.h"
 #include "neverhood/modules/module1700_sprites.h"
 
 namespace Neverhood {
diff --git a/engines/neverhood/modules/module1800.cpp b/engines/neverhood/modules/module1800.cpp
index b312678..282292a 100644
--- a/engines/neverhood/modules/module1800.cpp
+++ b/engines/neverhood/modules/module1800.cpp
@@ -20,9 +20,10 @@
  *
  */
 
-#include "neverhood/modules/module1800.h"
-#include "neverhood/navigationscene.h"
+#include "neverhood/diskplayerscene.h"
 #include "neverhood/menumodule.h"
+#include "neverhood/navigationscene.h"
+#include "neverhood/modules/module1800.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module1900.cpp b/engines/neverhood/modules/module1900.cpp
index 3538c14..a920893 100644
--- a/engines/neverhood/modules/module1900.cpp
+++ b/engines/neverhood/modules/module1900.cpp
@@ -20,7 +20,6 @@
  *
  */
 
-#include "neverhood/gamemodule.h"
 #include "neverhood/modules/module1900.h"
 #include "neverhood/modules/module1900_sprites.h"
 
diff --git a/engines/neverhood/modules/module1900_sprites.cpp b/engines/neverhood/modules/module1900_sprites.cpp
index d7e4898..176731a 100644
--- a/engines/neverhood/modules/module1900_sprites.cpp
+++ b/engines/neverhood/modules/module1900_sprites.cpp
@@ -20,7 +20,6 @@
  *
  */
 
-#include "neverhood/gamemodule.h"
 #include "neverhood/modules/module1900.h"
 #include "neverhood/modules/module1900_sprites.h"
 
diff --git a/engines/neverhood/modules/module2000.cpp b/engines/neverhood/modules/module2000.cpp
index fcccdef..e5f0b3f 100644
--- a/engines/neverhood/modules/module2000.cpp
+++ b/engines/neverhood/modules/module2000.cpp
@@ -21,8 +21,6 @@
  */
 
 #include "neverhood/modules/module2000.h"
-#include "neverhood/gamemodule.h"
-#include "neverhood/navigationscene.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module2100.cpp b/engines/neverhood/modules/module2100.cpp
index 275659d..db7258b 100644
--- a/engines/neverhood/modules/module2100.cpp
+++ b/engines/neverhood/modules/module2100.cpp
@@ -20,7 +20,6 @@
  *
  */
 
-#include "neverhood/gamemodule.h"
 #include "neverhood/modules/module1200_sprites.h"
 #include "neverhood/modules/module2100.h"
 #include "neverhood/modules/module2100_sprites.h"
diff --git a/engines/neverhood/modules/module2100_sprites.cpp b/engines/neverhood/modules/module2100_sprites.cpp
index dbc866e..0dd904c 100644
--- a/engines/neverhood/modules/module2100_sprites.cpp
+++ b/engines/neverhood/modules/module2100_sprites.cpp
@@ -21,8 +21,6 @@
  */
 
 #include "neverhood/modules/module2100_sprites.h"
-#include "neverhood/gamemodule.h"
-#include "neverhood/modules/module1200.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp
index e6969cc..745af42 100644
--- a/engines/neverhood/modules/module2200.cpp
+++ b/engines/neverhood/modules/module2200.cpp
@@ -20,12 +20,12 @@
  *
  */
 
+#include "neverhood/diskplayerscene.h"
+#include "neverhood/gamemodule.h"
 #include "neverhood/modules/module1000_sprites.h"
 #include "neverhood/modules/module1200_sprites.h"
 #include "neverhood/modules/module2200.h"
 #include "neverhood/modules/module2200_sprites.h"
-#include "neverhood/gamemodule.h"
-#include "neverhood/diskplayerscene.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module2200_sprites.cpp b/engines/neverhood/modules/module2200_sprites.cpp
index fecca35..5a64106 100644
--- a/engines/neverhood/modules/module2200_sprites.cpp
+++ b/engines/neverhood/modules/module2200_sprites.cpp
@@ -21,10 +21,6 @@
  */
 
 #include "neverhood/modules/module2200_sprites.h"
-#include "neverhood/modules/module1000.h"
-#include "neverhood/modules/module1200.h"
-#include "neverhood/gamemodule.h"
-#include "neverhood/diskplayerscene.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module2300.cpp b/engines/neverhood/modules/module2300.cpp
index 2a46df1..689d535 100644
--- a/engines/neverhood/modules/module2300.cpp
+++ b/engines/neverhood/modules/module2300.cpp
@@ -20,8 +20,8 @@
  *
  */
 
-#include "neverhood/modules/module2300.h"
 #include "neverhood/navigationscene.h"
+#include "neverhood/modules/module2300.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module2500.cpp b/engines/neverhood/modules/module2500.cpp
index bda85e5..d0e60ad 100644
--- a/engines/neverhood/modules/module2500.cpp
+++ b/engines/neverhood/modules/module2500.cpp
@@ -20,11 +20,11 @@
  *
  */
 
-#include "neverhood/modules/module1600.h"
+#include "neverhood/modules/module1600.h"	// for Scene1608
 #include "neverhood/modules/module1600_sprites.h"
 #include "neverhood/modules/module2500.h"
 #include "neverhood/modules/module2500_sprites.h"
-#include "neverhood/modules/module2700.h"
+#include "neverhood/modules/module2700.h"	// for Scene2704
 #include "neverhood/modules/module2700_sprites.h"
 
 namespace Neverhood {
diff --git a/engines/neverhood/modules/module2700.cpp b/engines/neverhood/modules/module2700.cpp
index d05f142..1b78615 100644
--- a/engines/neverhood/modules/module2700.cpp
+++ b/engines/neverhood/modules/module2700.cpp
@@ -21,7 +21,6 @@
  */
 
 #include "neverhood/gamemodule.h"
-#include "neverhood/modules/module1000.h"
 #include "neverhood/modules/module1600_sprites.h"
 #include "neverhood/modules/module2700.h"
 #include "neverhood/modules/module2700_sprites.h"
diff --git a/engines/neverhood/modules/module2700_sprites.cpp b/engines/neverhood/modules/module2700_sprites.cpp
index abafcff..fe0dd60 100644
--- a/engines/neverhood/modules/module2700_sprites.cpp
+++ b/engines/neverhood/modules/module2700_sprites.cpp
@@ -21,8 +21,6 @@
  */
 
 #include "neverhood/modules/module2700_sprites.h"
-#include "neverhood/gamemodule.h"
-#include "neverhood/modules/module1000.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp
index 49acf47..0578a5d 100644
--- a/engines/neverhood/modules/module2800.cpp
+++ b/engines/neverhood/modules/module2800.cpp
@@ -20,14 +20,15 @@
  *
  */
 
-#include "neverhood/modules/module2800.h"
+#include "neverhood/diskplayerscene.h"
 #include "neverhood/gamemodule.h"
+#include "neverhood/scene.h"
 #include "neverhood/modules/module1000_sprites.h"
 #include "neverhood/modules/module1200_sprites.h"
 #include "neverhood/modules/module1700_sprites.h"
 #include "neverhood/modules/module2200_sprites.h"
+#include "neverhood/modules/module2800.h"
 #include "neverhood/modules/module2800_sprites.h"
-#include "neverhood/diskplayerscene.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module2800_sprites.cpp b/engines/neverhood/modules/module2800_sprites.cpp
index f7949b9..c7f4268 100644
--- a/engines/neverhood/modules/module2800_sprites.cpp
+++ b/engines/neverhood/modules/module2800_sprites.cpp
@@ -22,12 +22,6 @@
 
 #include "neverhood/modules/module2800.h"
 #include "neverhood/modules/module2800_sprites.h"
-#include "neverhood/gamemodule.h"
-#include "neverhood/modules/module1000.h"
-#include "neverhood/modules/module1200.h"
-#include "neverhood/modules/module1700.h"
-#include "neverhood/modules/module2200.h"
-#include "neverhood/diskplayerscene.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module2900.cpp b/engines/neverhood/modules/module2900.cpp
index 032f096..bb0b69f 100644
--- a/engines/neverhood/modules/module2900.cpp
+++ b/engines/neverhood/modules/module2900.cpp
@@ -22,7 +22,6 @@
 
 #include "neverhood/modules/module2900.h"
 #include "neverhood/modules/module2900_sprites.h"
-#include "neverhood/gamemodule.h"
 #include "neverhood/modules/module1100.h"
 #include "neverhood/modules/module1300.h"
 #include "neverhood/modules/module1700.h"
diff --git a/engines/neverhood/modules/module2900_sprites.cpp b/engines/neverhood/modules/module2900_sprites.cpp
index 33b7715..59780b3 100644
--- a/engines/neverhood/modules/module2900_sprites.cpp
+++ b/engines/neverhood/modules/module2900_sprites.cpp
@@ -21,7 +21,6 @@
  */
 
 #include "neverhood/modules/module2900_sprites.h"
-#include "neverhood/gamemodule.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module3000.cpp b/engines/neverhood/modules/module3000.cpp
index e17e9d4..a127766 100644
--- a/engines/neverhood/modules/module3000.cpp
+++ b/engines/neverhood/modules/module3000.cpp
@@ -20,10 +20,10 @@
  *
  */
 
-#include "neverhood/modules/module3000.h"
-#include "neverhood/modules/module3000_sprites.h"
 #include "neverhood/gamemodule.h"
 #include "neverhood/navigationscene.h"
+#include "neverhood/modules/module3000.h"
+#include "neverhood/modules/module3000_sprites.h"
 
 namespace Neverhood {
 
diff --git a/engines/neverhood/modules/module3000_sprites.cpp b/engines/neverhood/modules/module3000_sprites.cpp
index 420bd5e..7d0162d 100644
--- a/engines/neverhood/modules/module3000_sprites.cpp
+++ b/engines/neverhood/modules/module3000_sprites.cpp
@@ -22,8 +22,6 @@
 
 #include "neverhood/modules/module3000.h"
 #include "neverhood/modules/module3000_sprites.h"
-#include "neverhood/gamemodule.h"
-#include "neverhood/navigationscene.h"
 
 namespace Neverhood {
 


Commit: cb01f16007012c75744780d565f9714f471d0ad6
    https://github.com/scummvm/scummvm/commit/cb01f16007012c75744780d565f9714f471d0ad6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-10-05T12:18:59-07:00

Commit Message:
NEVERHOOD: Move specialized Klaymen code for modules 1000 and 1100

Changed paths:
  A engines/neverhood/modules/module1000_klaymen.cpp
  A engines/neverhood/modules/module1000_klaymen.h
  A engines/neverhood/modules/module1100_klaymen.cpp
  A engines/neverhood/modules/module1100_klaymen.h
    engines/neverhood/klaymen.cpp
    engines/neverhood/klaymen.h
    engines/neverhood/module.mk
    engines/neverhood/modules/module1000.cpp
    engines/neverhood/modules/module1100.cpp
    engines/neverhood/modules/module1300.cpp



diff --git a/engines/neverhood/klaymen.cpp b/engines/neverhood/klaymen.cpp
index 8ed27c8..100299f 100644
--- a/engines/neverhood/klaymen.cpp
+++ b/engines/neverhood/klaymen.cpp
@@ -53,11 +53,6 @@ static const KlaymenIdleTableItem klaymenIdleTable4[] = {
 	{1, kIdleHeadOff},
 };
 
-static const KlaymenIdleTableItem klaymenIdleTable1002[] = {
-	{1, kIdlePickEar},
-	{2, kIdleWonderAbout}
-};
-
 // Klaymen
 
 Klaymen::Klaymen(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, NRectArray *clipRects)
@@ -3344,331 +3339,6 @@ void Klaymen::stPeekInsideBlink() {
 	_blinkCounterMax = _vm->_rnd->getRandomNumber(64 - 1) + 24;
 }
 
-// KmScene1001
-
-KmScene1001::KmScene1001(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
-	: Klaymen(vm, parentScene, x, y) {
-}
-
-uint32 KmScene1001::xHandleMessage(int messageNum, const MessageParam &param) {
-	switch (messageNum) {
-	case 0x4001:
-	case 0x4800:
-		startWalkToX(param.asPoint().x, false);
-		break;
-	case 0x4004:
-		GotoState(&Klaymen::stTryStandIdle);
-		break;
-	case 0x4804:
-		if (param.asInteger() == 2)
-			GotoState(&Klaymen::stSleeping);
-		break;
-	case 0x480D:
-		GotoState(&Klaymen::stPullHammerLever);
-		break;
-	case 0x4812:
-		GotoState(&Klaymen::stPickUpGeneric);
-		break;
-	case 0x4816:
-		if (param.asInteger() == 1)
-			GotoState(&Klaymen::stPressButton);
-		else if (param.asInteger() == 2)
-			GotoState(&Klaymen::stPressFloorButton);
-		else
-			GotoState(&Klaymen::stPressButtonSide);
-		break;
-	case 0x4817:
-		setDoDeltaX(param.asInteger());
-		gotoNextStateExt();
-		break;
-	case 0x481B:
-		if (param.asPoint().y != 0)
-			startWalkToXDistance(param.asPoint().y, param.asPoint().x);
-		else
-			startWalkToAttachedSpriteXDistance(param.asPoint().x);
-		break;
-	case 0x481F:
-		if (param.asInteger() == 0)
-			GotoState(&Klaymen::stWonderAboutHalf);
-		else if (param.asInteger() == 1)
-			GotoState(&Klaymen::stWonderAboutAfter);
-		else if (param.asInteger() == 3)
-			GotoState(&Klaymen::stTurnToUseHalf);
-		else if (param.asInteger() == 4)
-			GotoState(&Klaymen::stTurnAwayFromUse);
-		else
-			GotoState(&Klaymen::stWonderAbout);
-		break;
-	case 0x482D:
-		setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
-		gotoNextStateExt();
-		break;
-	case 0x4836:
-		if (param.asInteger() == 1) {
-			sendMessage(_parentScene, 0x2002, 0);
-			GotoState(&Klaymen::stWakeUp);
-		}
-		break;
-	case 0x483F:
-		startSpecialWalkRight(param.asInteger());
-		break;
-	case 0x4840:
-		startSpecialWalkLeft(param.asInteger());
-		break;
-	}
-	return 0;
-}
-
-// KmScene1002
-
-KmScene1002::KmScene1002(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
-	: Klaymen(vm, parentScene, x, y) {
-
-	setKlaymenIdleTable1();
-}
-
-void KmScene1002::xUpdate() {
-	if (_x >= 250 && _x <= 435 && _y >= 420) {
-		if (_idleTableNum == 0) {
-			setKlaymenIdleTable(klaymenIdleTable1002, ARRAYSIZE(klaymenIdleTable1002));
-			_idleTableNum = 1;
-		}
-	} else if (_idleTableNum == 1) {
-		setKlaymenIdleTable1();
-		_idleTableNum = 0;
-	}
-}
-
-uint32 KmScene1002::xHandleMessage(int messageNum, const MessageParam &param) {
-	switch (messageNum) {
-	case 0x2001:
-		GotoState(&Klaymen::stStandIdleSpecial);
-		break;
-	case 0x2007:
-		_otherSprite = (Sprite*)param.asEntity();
-		break;
-	case 0x4001:
-	case 0x4800:
-		startWalkToX(param.asPoint().x, false);
-		break;
-	case 0x4004:
-		GotoState(&Klaymen::stTryStandIdle);
-		break;
-	case 0x4803:
-		if (param.asInteger() == 1)
-			GotoState(&Klaymen::stJumpAndFall);
-		else if (param.asInteger() == 2)
-			GotoState(&Klaymen::stDropFromRing);
-		break;
-	case 0x4804:
-		GotoState(&Klaymen::stPeekWall);
-		break;
-	case 0x4805:
-		switch (param.asInteger()) {
-		case 1:
-			GotoState(&Klaymen::stJumpToRing1);
-			break;
-		case 2:
-			GotoState(&Klaymen::stJumpToRing2);
-			break;
-		case 3:
-			GotoState(&Klaymen::stJumpToRing3);
-			break;
-		case 4:
-			GotoState(&Klaymen::stJumpToRing4);
-			break;
-		}
-		break;
-	case 0x480A:
-		GotoState(&Klaymen::stMoveVenusFlyTrap);
-		break;
-	case 0x480D:
-		GotoState(&Klaymen::stJumpToRingVenusFlyTrap);
-		break;
-	case 0x4816:
-		if (param.asInteger() == 0)
-			GotoState(&Klaymen::stPressDoorButton);
-		break;
-	case 0x4817:
-		setDoDeltaX(param.asInteger());
-		gotoNextStateExt();
-		break;
-	case 0x481B:
-		startWalkToAttachedSpriteXDistance(param.asInteger());
-		break;
-	case 0x4820:
-		sendMessage(_parentScene, 0x2005, 0);
-		GotoState(&Klaymen::stContinueClimbLadderUp);
-		break;
-	case 0x4821:
-		sendMessage(_parentScene, 0x2005, 0);
-		_destY = param.asInteger();
-		GotoState(&Klaymen::stStartClimbLadderDown);
-		break;
-	case 0x4822:
-		sendMessage(_parentScene, 0x2005, 0);
-		_destY = param.asInteger();
-		GotoState(&Klaymen::stStartClimbLadderUp);
-		break;
-	case 0x4823:
-		sendMessage(_parentScene, 0x2006, 0);
-		GotoState(&Klaymen::stClimbLadderHalf);
-		break;
-	case 0x482E:
-		if (param.asInteger() == 1)
-			GotoState(&Klaymen::stWalkToFrontNoStep);
-		else
-			GotoState(&Klaymen::stWalkToFront);
-		break;
-	case 0x482F:
-		if (param.asInteger() == 1)
-			GotoState(&Klaymen::stTurnToFront);
-		else
-			GotoState(&Klaymen::stTurnToBack);
-		break;
-	case 0x483F:
-		startSpecialWalkRight(param.asInteger());
-		break;
-	case 0x4840:
-		startSpecialWalkLeft(param.asInteger());
-		break;
-	}
-	return 0;
-}
-
-// KmScene1004
-
-KmScene1004::KmScene1004(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
-	: Klaymen(vm, parentScene, x, y) {
-
-	_dataResource.load(0x01900A04);
-}
-
-uint32 KmScene1004::xHandleMessage(int messageNum, const MessageParam &param) {
-	switch (messageNum) {
-	case 0x4001:
-	case 0x4800:
-		startWalkToX(param.asPoint().x, false);
-		break;
-	case 0x4004:
-		GotoState(&Klaymen::stTryStandIdle);
-		break;
-	case 0x4817:
-		setDoDeltaX(param.asInteger());
-		gotoNextStateExt();
-		break;
-	case 0x4818:
-		startWalkToX(_dataResource.getPoint(param.asInteger()).x, false);
-		break;
-	case 0x481E:
-		GotoState(&Klaymen::stReadNote);
-		break;
-	case 0x4820:
-		sendMessage(_parentScene, 0x2000, 0);
-		GotoState(&Klaymen::stContinueClimbLadderUp);
-		break;
-	case 0x4821:
-		sendMessage(_parentScene, 0x2000, 0);
-		_destY = param.asInteger();
-		GotoState(&Klaymen::stStartClimbLadderDown);
-		break;
-	case 0x4822:
-		sendMessage(_parentScene, 0x2000, 0);
-		_destY = param.asInteger();
-		GotoState(&Klaymen::stStartClimbLadderUp);
-		break;
-	case 0x4823:
-		sendMessage(_parentScene, 0x2001, 0);
-		GotoState(&Klaymen::stClimbLadderHalf);
-		break;
-	case 0x4824:
-		sendMessage(_parentScene, 0x2000, 0);
-		_destY = _dataResource.getPoint(param.asInteger()).y;
-		GotoState(&Klaymen::stStartClimbLadderDown);
-		break;
-	case 0x4825:
-		sendMessage(_parentScene, 0x2000, 0);
-		_destY = _dataResource.getPoint(param.asInteger()).y;
-		GotoState(&Klaymen::stStartClimbLadderUp);
-		break;
-	case 0x4828:
-		GotoState(&Klaymen::stTurnToBackToUse);
-		break;
-	case 0x483F:
-		startSpecialWalkRight(param.asInteger());
-		break;
-	case 0x4840:
-		startSpecialWalkLeft(param.asInteger());
-		break;
-	}
-	return 0;
-}
-
-KmScene1109::KmScene1109(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
-	: Klaymen(vm, parentScene, x, y) {
-
-	// Empty
-}
-
-uint32 KmScene1109::xHandleMessage(int messageNum, const MessageParam &param) {
-	uint32 messageResult = 0;
-	switch (messageNum) {
-	case 0x2000:
-		_isSittingInTeleporter = param.asInteger() != 0;
-		messageResult = 1;
-		break;
-	case 0x4001:
-	case 0x4800:
-		startWalkToX(param.asPoint().x, false);
-		break;
-	case 0x4004:
-		if (_isSittingInTeleporter)
-			GotoState(&Klaymen::stSitIdleTeleporter);
-		else
-			GotoState(&Klaymen::stTryStandIdle);
-		break;
-	case 0x4804:
-		if (param.asInteger() != 0) {
-			_destX = param.asInteger();
-			GotoState(&Klaymen::stWalkingFirst);
-		} else
-			GotoState(&Klaymen::stPeekWall);
-		break;
-	case 0x4817:
-		setDoDeltaX(param.asInteger());
-		gotoNextStateExt();
-		break;
-	case 0x481D:
-		if (_isSittingInTeleporter)
-			GotoState(&Klaymen::stTurnToUseInTeleporter);
-		break;
-	case 0x481E:
-		if (_isSittingInTeleporter)
-			GotoState(&Klaymen::stReturnFromUseInTeleporter);
-		break;
-	case 0x4834:
-		GotoState(&Klaymen::stStepOver);
-		break;
-	case 0x4835:
-		sendMessage(_parentScene, 0x2000, 1);
-		_isSittingInTeleporter = true;
-		GotoState(&Klaymen::stSitInTeleporter);
-		break;
-	case 0x4836:
-		sendMessage(_parentScene, 0x2000, 0);
-		_isSittingInTeleporter = false;
-		GotoState(&Klaymen::stGetUpFromTeleporter);
-		break;
-	case 0x483D:
-		teleporterAppear(0x2C2A4A1C);
-		break;
-	case 0x483E:
-		teleporterDisappear(0x3C2E4245);
-		break;
-	}
-	return messageResult;
-}
-
 // KmScene1201
 
 KmScene1201::KmScene1201(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
diff --git a/engines/neverhood/klaymen.h b/engines/neverhood/klaymen.h
index 9e461a9..45b7140 100644
--- a/engines/neverhood/klaymen.h
+++ b/engines/neverhood/klaymen.h
@@ -462,35 +462,6 @@ protected:
 
 };
 
-class KmScene1001 : public Klaymen {
-public:
-	KmScene1001(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
-protected:
-	uint32 xHandleMessage(int messageNum, const MessageParam &param);
-};
-
-class KmScene1002 : public Klaymen {
-public:
-	KmScene1002(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
-protected:
-	void xUpdate();
-	uint32 xHandleMessage(int messageNum, const MessageParam &param);
-};
-
-class KmScene1004 : public Klaymen {
-public:
-	KmScene1004(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
-protected:
-	uint32 xHandleMessage(int messageNum, const MessageParam &param);
-};
-
-class KmScene1109 : public Klaymen {
-public:
-	KmScene1109(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
-protected:
-	uint32 xHandleMessage(int messageNum, const MessageParam &param);
-};
-
 class KmScene1201 : public Klaymen {
 public:
 	KmScene1201(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
diff --git a/engines/neverhood/module.mk b/engines/neverhood/module.mk
index 718bedb..f3e28c1 100644
--- a/engines/neverhood/module.mk
+++ b/engines/neverhood/module.mk
@@ -15,8 +15,10 @@ MODULE_OBJS = \
 	microtiles.o \
 	module.o \
 	modules/module1000.o \
+	modules/module1000_klaymen.o \
 	modules/module1000_sprites.o \
 	modules/module1100.o \
+	modules/module1100_klaymen.o \
 	modules/module1100_sprites.o \
 	modules/module1200.o \
 	modules/module1200_sprites.o \
diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp
index 534fb2e..afacc99 100644
--- a/engines/neverhood/modules/module1000.cpp
+++ b/engines/neverhood/modules/module1000.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1000_klaymen.h"
 #include "neverhood/modules/module1000_sprites.h"
 
 namespace Neverhood {
diff --git a/engines/neverhood/modules/module1000_klaymen.cpp b/engines/neverhood/modules/module1000_klaymen.cpp
new file mode 100644
index 0000000..154959c
--- /dev/null
+++ b/engines/neverhood/modules/module1000_klaymen.cpp
@@ -0,0 +1,286 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "neverhood/modules/module1000_klaymen.h"
+
+namespace Neverhood {
+
+static const KlaymenIdleTableItem klaymenIdleTable1002[] = {
+	{1, kIdlePickEar},
+	{2, kIdleWonderAbout}
+};
+
+KmScene1001::KmScene1001(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+	: Klaymen(vm, parentScene, x, y) {
+}
+
+uint32 KmScene1001::xHandleMessage(int messageNum, const MessageParam &param) {
+	switch (messageNum) {
+	case 0x4001:
+	case 0x4800:
+		startWalkToX(param.asPoint().x, false);
+		break;
+	case 0x4004:
+		GotoState(&Klaymen::stTryStandIdle);
+		break;
+	case 0x4804:
+		if (param.asInteger() == 2)
+			GotoState(&Klaymen::stSleeping);
+		break;
+	case 0x480D:
+		GotoState(&Klaymen::stPullHammerLever);
+		break;
+	case 0x4812:
+		GotoState(&Klaymen::stPickUpGeneric);
+		break;
+	case 0x4816:
+		if (param.asInteger() == 1)
+			GotoState(&Klaymen::stPressButton);
+		else if (param.asInteger() == 2)
+			GotoState(&Klaymen::stPressFloorButton);
+		else
+			GotoState(&Klaymen::stPressButtonSide);
+		break;
+	case 0x4817:
+		setDoDeltaX(param.asInteger());
+		gotoNextStateExt();
+		break;
+	case 0x481B:
+		if (param.asPoint().y != 0)
+			startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+		else
+			startWalkToAttachedSpriteXDistance(param.asPoint().x);
+		break;
+	case 0x481F:
+		if (param.asInteger() == 0)
+			GotoState(&Klaymen::stWonderAboutHalf);
+		else if (param.asInteger() == 1)
+			GotoState(&Klaymen::stWonderAboutAfter);
+		else if (param.asInteger() == 3)
+			GotoState(&Klaymen::stTurnToUseHalf);
+		else if (param.asInteger() == 4)
+			GotoState(&Klaymen::stTurnAwayFromUse);
+		else
+			GotoState(&Klaymen::stWonderAbout);
+		break;
+	case 0x482D:
+		setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+		gotoNextStateExt();
+		break;
+	case 0x4836:
+		if (param.asInteger() == 1) {
+			sendMessage(_parentScene, 0x2002, 0);
+			GotoState(&Klaymen::stWakeUp);
+		}
+		break;
+	case 0x483F:
+		startSpecialWalkRight(param.asInteger());
+		break;
+	case 0x4840:
+		startSpecialWalkLeft(param.asInteger());
+		break;
+	}
+	return 0;
+}
+
+KmScene1002::KmScene1002(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+	: Klaymen(vm, parentScene, x, y) {
+
+	setKlaymenIdleTable1();
+}
+
+void KmScene1002::xUpdate() {
+	if (_x >= 250 && _x <= 435 && _y >= 420) {
+		if (_idleTableNum == 0) {
+			setKlaymenIdleTable(klaymenIdleTable1002, ARRAYSIZE(klaymenIdleTable1002));
+			_idleTableNum = 1;
+		}
+	} else if (_idleTableNum == 1) {
+		setKlaymenIdleTable1();
+		_idleTableNum = 0;
+	}
+}
+
+uint32 KmScene1002::xHandleMessage(int messageNum, const MessageParam &param) {
+	switch (messageNum) {
+	case 0x2001:
+		GotoState(&Klaymen::stStandIdleSpecial);
+		break;
+	case 0x2007:
+		_otherSprite = (Sprite*)param.asEntity();
+		break;
+	case 0x4001:
+	case 0x4800:
+		startWalkToX(param.asPoint().x, false);
+		break;
+	case 0x4004:
+		GotoState(&Klaymen::stTryStandIdle);
+		break;
+	case 0x4803:
+		if (param.asInteger() == 1)
+			GotoState(&Klaymen::stJumpAndFall);
+		else if (param.asInteger() == 2)
+			GotoState(&Klaymen::stDropFromRing);
+		break;
+	case 0x4804:
+		GotoState(&Klaymen::stPeekWall);
+		break;
+	case 0x4805:
+		switch (param.asInteger()) {
+		case 1:
+			GotoState(&Klaymen::stJumpToRing1);
+			break;
+		case 2:
+			GotoState(&Klaymen::stJumpToRing2);
+			break;
+		case 3:
+			GotoState(&Klaymen::stJumpToRing3);
+			break;
+		case 4:
+			GotoState(&Klaymen::stJumpToRing4);
+			break;
+		}
+		break;
+	case 0x480A:
+		GotoState(&Klaymen::stMoveVenusFlyTrap);
+		break;
+	case 0x480D:
+		GotoState(&Klaymen::stJumpToRingVenusFlyTrap);
+		break;
+	case 0x4816:
+		if (param.asInteger() == 0)
+			GotoState(&Klaymen::stPressDoorButton);
+		break;
+	case 0x4817:
+		setDoDeltaX(param.asInteger());
+		gotoNextStateExt();
+		break;
+	case 0x481B:
+		startWalkToAttachedSpriteXDistance(param.asInteger());
+		break;
+	case 0x4820:
+		sendMessage(_parentScene, 0x2005, 0);
+		GotoState(&Klaymen::stContinueClimbLadderUp);
+		break;
+	case 0x4821:
+		sendMessage(_parentScene, 0x2005, 0);
+		_destY = param.asInteger();
+		GotoState(&Klaymen::stStartClimbLadderDown);
+		break;
+	case 0x4822:
+		sendMessage(_parentScene, 0x2005, 0);
+		_destY = param.asInteger();
+		GotoState(&Klaymen::stStartClimbLadderUp);
+		break;
+	case 0x4823:
+		sendMessage(_parentScene, 0x2006, 0);
+		GotoState(&Klaymen::stClimbLadderHalf);
+		break;
+	case 0x482E:
+		if (param.asInteger() == 1)
+			GotoState(&Klaymen::stWalkToFrontNoStep);
+		else
+			GotoState(&Klaymen::stWalkToFront);
+		break;
+	case 0x482F:
+		if (param.asInteger() == 1)
+			GotoState(&Klaymen::stTurnToFront);
+		else
+			GotoState(&Klaymen::stTurnToBack);
+		break;
+	case 0x483F:
+		startSpecialWalkRight(param.asInteger());
+		break;
+	case 0x4840:
+		startSpecialWalkLeft(param.asInteger());
+		break;
+	}
+	return 0;
+}
+
+KmScene1004::KmScene1004(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+	: Klaymen(vm, parentScene, x, y) {
+
+	_dataResource.load(0x01900A04);
+}
+
+uint32 KmScene1004::xHandleMessage(int messageNum, const MessageParam &param) {
+	switch (messageNum) {
+	case 0x4001:
+	case 0x4800:
+		startWalkToX(param.asPoint().x, false);
+		break;
+	case 0x4004:
+		GotoState(&Klaymen::stTryStandIdle);
+		break;
+	case 0x4817:
+		setDoDeltaX(param.asInteger());
+		gotoNextStateExt();
+		break;
+	case 0x4818:
+		startWalkToX(_dataResource.getPoint(param.asInteger()).x, false);
+		break;
+	case 0x481E:
+		GotoState(&Klaymen::stReadNote);
+		break;
+	case 0x4820:
+		sendMessage(_parentScene, 0x2000, 0);
+		GotoState(&Klaymen::stContinueClimbLadderUp);
+		break;
+	case 0x4821:
+		sendMessage(_parentScene, 0x2000, 0);
+		_destY = param.asInteger();
+		GotoState(&Klaymen::stStartClimbLadderDown);
+		break;
+	case 0x4822:
+		sendMessage(_parentScene, 0x2000, 0);
+		_destY = param.asInteger();
+		GotoState(&Klaymen::stStartClimbLadderUp);
+		break;
+	case 0x4823:
+		sendMessage(_parentScene, 0x2001, 0);
+		GotoState(&Klaymen::stClimbLadderHalf);
+		break;
+	case 0x4824:
+		sendMessage(_parentScene, 0x2000, 0);
+		_destY = _dataResource.getPoint(param.asInteger()).y;
+		GotoState(&Klaymen::stStartClimbLadderDown);
+		break;
+	case 0x4825:
+		sendMessage(_parentScene, 0x2000, 0);
+		_destY = _dataResource.getPoint(param.asInteger()).y;
+		GotoState(&Klaymen::stStartClimbLadderUp);
+		break;
+	case 0x4828:
+		GotoState(&Klaymen::stTurnToBackToUse);
+		break;
+	case 0x483F:
+		startSpecialWalkRight(param.asInteger());
+		break;
+	case 0x4840:
+		startSpecialWalkLeft(param.asInteger());
+		break;
+	}
+	return 0;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1000_klaymen.h b/engines/neverhood/modules/module1000_klaymen.h
new file mode 100644
index 0000000..a4cde20
--- /dev/null
+++ b/engines/neverhood/modules/module1000_klaymen.h
@@ -0,0 +1,56 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_MODULES_MODULE1000_KLAYMEN_H
+#define NEVERHOOD_MODULES_MODULE1000_KLAYMEN_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+class KmScene1001 : public Klaymen {
+public:
+	KmScene1001(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+	uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1002 : public Klaymen {
+public:
+	KmScene1002(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+	void xUpdate();
+	uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1004 : public Klaymen {
+public:
+	KmScene1004(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+	uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1000_KLAYMEN_H */
diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp
index af2df2e..200a19b 100644
--- a/engines/neverhood/modules/module1100.cpp
+++ b/engines/neverhood/modules/module1100.cpp
@@ -23,6 +23,7 @@
 #include "neverhood/gamemodule.h"
 #include "neverhood/navigationscene.h"
 #include "neverhood/modules/module1100.h"
+#include "neverhood/modules/module1100_klaymen.h"
 #include "neverhood/modules/module1100_sprites.h"
 
 namespace Neverhood {
diff --git a/engines/neverhood/modules/module1100_klaymen.cpp b/engines/neverhood/modules/module1100_klaymen.cpp
new file mode 100644
index 0000000..497c9fb
--- /dev/null
+++ b/engines/neverhood/modules/module1100_klaymen.cpp
@@ -0,0 +1,92 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "neverhood/modules/module1100_klaymen.h"
+
+namespace Neverhood {
+
+KmScene1109::KmScene1109(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+	: Klaymen(vm, parentScene, x, y) {
+
+	// Empty
+}
+
+uint32 KmScene1109::xHandleMessage(int messageNum, const MessageParam &param) {
+	uint32 messageResult = 0;
+	switch (messageNum) {
+	case 0x2000:
+		_isSittingInTeleporter = param.asInteger() != 0;
+		messageResult = 1;
+		break;
+	case 0x4001:
+	case 0x4800:
+		startWalkToX(param.asPoint().x, false);
+		break;
+	case 0x4004:
+		if (_isSittingInTeleporter)
+			GotoState(&Klaymen::stSitIdleTeleporter);
+		else
+			GotoState(&Klaymen::stTryStandIdle);
+		break;
+	case 0x4804:
+		if (param.asInteger() != 0) {
+			_destX = param.asInteger();
+			GotoState(&Klaymen::stWalkingFirst);
+		} else
+			GotoState(&Klaymen::stPeekWall);
+		break;
+	case 0x4817:
+		setDoDeltaX(param.asInteger());
+		gotoNextStateExt();
+		break;
+	case 0x481D:
+		if (_isSittingInTeleporter)
+			GotoState(&Klaymen::stTurnToUseInTeleporter);
+		break;
+	case 0x481E:
+		if (_isSittingInTeleporter)
+			GotoState(&Klaymen::stReturnFromUseInTeleporter);
+		break;
+	case 0x4834:
+		GotoState(&Klaymen::stStepOver);
+		break;
+	case 0x4835:
+		sendMessage(_parentScene, 0x2000, 1);
+		_isSittingInTeleporter = true;
+		GotoState(&Klaymen::stSitInTeleporter);
+		break;
+	case 0x4836:
+		sendMessage(_parentScene, 0x2000, 0);
+		_isSittingInTeleporter = false;
+		GotoState(&Klaymen::stGetUpFromTeleporter);
+		break;
+	case 0x483D:
+		teleporterAppear(0x2C2A4A1C);
+		break;
+	case 0x483E:
+		teleporterDisappear(0x3C2E4245);
+		break;
+	}
+	return messageResult;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1100_klaymen.h b/engines/neverhood/modules/module1100_klaymen.h
new file mode 100644
index 0000000..aea3041
--- /dev/null
+++ b/engines/neverhood/modules/module1100_klaymen.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_MODULES_MODULE1000_KLAYMEN_H
+#define NEVERHOOD_MODULES_MODULE1000_KLAYMEN_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+class KmScene1109 : public Klaymen {
+public:
+	KmScene1109(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+	uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1000_KLAYMEN_H */
diff --git a/engines/neverhood/modules/module1300.cpp b/engines/neverhood/modules/module1300.cpp
index 312fb85..9216773 100644
--- a/engines/neverhood/modules/module1300.cpp
+++ b/engines/neverhood/modules/module1300.cpp
@@ -23,6 +23,7 @@
 #include "neverhood/diskplayerscene.h"
 #include "neverhood/gamemodule.h"
 #include "neverhood/menumodule.h"
+#include "neverhood/modules/module1000_klaymen.h"
 #include "neverhood/modules/module1000_sprites.h"
 #include "neverhood/modules/module1200_sprites.h"
 #include "neverhood/modules/module1300.h"






More information about the Scummvm-git-logs mailing list