Ejemplo n.º 1
0
void Module1600::createScene(int sceneNum, int which) {
	debug(1, "Module1600::createScene(%d, %d)", sceneNum, which);
	_sceneNum = sceneNum;
	switch (_sceneNum) {
	case 0:
		_vm->gameState().sceneNum = 0;
		createNavigationScene(0x004B39D0, which);
		break;
	case 1:
		_vm->gameState().sceneNum = 1;
		createNavigationScene(0x004B3A30, which);
		break;
	case 2:
		_vm->gameState().sceneNum = 2;
		createNavigationScene(0x004B3A60, which);
		break;
	case 3:
		_vm->gameState().sceneNum = 3;
		createNavigationScene(0x004B3A90, which);
		break;
	case 4:
		_vm->gameState().sceneNum = 4;
		createNavigationScene(0x004B3B20, which);
		break;
	case 5:
		_vm->gameState().sceneNum = 5;
		createNavigationScene(0x004B3B50, which);
		break;
	case 6:
		_vm->gameState().sceneNum = 6;
		createNavigationScene(0x004B3B80, which);
		break;
	case 7:
		_vm->gameState().sceneNum = 7;
		_childObject = new Scene1608(_vm, this, which);
		break;
	case 8:
		_vm->gameState().sceneNum = 8;
		_childObject = new Scene1609(_vm, this);
		break;
	case 1001:
		_vm->gameState().sceneNum = 1;
		if (getGlobalVar(V_TALK_COUNTING_INDEX) == 1)
			createSmackerScene(0x80050200, true, true, false);
		else if (getGlobalVar(V_TALK_COUNTING_INDEX) == 2)
			createSmackerScene(0x80090200, true, true, false);
		else
			createSmackerScene(0x80000200, true, true, false);
		if (getGlobalVar(V_TALK_COUNTING_INDEX) >= 2)
			setGlobalVar(V_TALK_COUNTING_INDEX, 0);
		else
			incGlobalVar(V_TALK_COUNTING_INDEX, +1);
		break;
	}
	SetUpdateHandler(&Module1600::updateScene);
	_childObject->handleUpdate();
}
Ejemplo n.º 2
0
void Module2600::createScene(int sceneNum, int which) {
	debug("Module2600::createScene(%d, %d)", sceneNum, which);
	_sceneNum = sceneNum;
	switch (_sceneNum) {
	case 0:
		_vm->gameState().sceneNum = 0;
		createNavigationScene(0x004B8608, which);
		break;
	case 1:
		_vm->gameState().sceneNum = 1;
		createNavigationScene(0x004B8638, which);
		break;
	case 2:
		_vm->gameState().sceneNum = 2;
		createNavigationScene(0x004B86C8, which);
		break;
	case 3:
		_vm->gameState().sceneNum = 3;
		if (getGlobalVar(V_CREATURE_ANGRY))
			createNavigationScene(0x004B8758, which);
		else
			createNavigationScene(0x004B86F8, which);
		break;
	case 4:
		_vm->gameState().sceneNum = 4;
		createNavigationScene(0x004B87B8, which);
		break;
	case 6:
		_vm->gameState().sceneNum = 6;
		createNavigationScene(0x004B8698, which);
		break;
	case 7:
		_vm->gameState().sceneNum = 7;
		_vm->_soundMan->deleteGroup(0x40271018);
		createSmackerScene(0x30090001, true, true, false);
		break;
	case 8:
		_vm->gameState().sceneNum = 8;
		_childObject = new Scene2609(_vm, this, which);
		break;
	case 1002:
		_vm->gameState().sceneNum = 2;
		if (getGlobalVar(V_FRUIT_COUNTING_INDEX) == 1)
			createSmackerScene(0x018C0404, true, true, false);
		else if (getGlobalVar(V_FRUIT_COUNTING_INDEX) == 2)
			createSmackerScene(0x018C0407, true, true, false);
		else
			createSmackerScene(0x818C0405, true, true, false);
		if (getGlobalVar(V_FRUIT_COUNTING_INDEX) >= 2)
			setGlobalVar(V_FRUIT_COUNTING_INDEX, 0);
		else
			incGlobalVar(V_FRUIT_COUNTING_INDEX, +1);
		break;
	case 1003:
		_vm->gameState().sceneNum = 3;
		createSmackerScene(0x001C0007, true, true, false);
		break;
	case 1006:
		_vm->gameState().sceneNum = 6;
		if (getGlobalVar(V_WATER_RUNNING))
			createSmackerScene(0x049A1181, true, true, false);
		else
			createSmackerScene(0x04981181, true, true, false);
		break;
	case 1008:
		_vm->gameState().sceneNum = 8;
		if (getGlobalVar(V_WATER_RUNNING))
			createSmackerScene(0x42B80941, true, true, false);
		else
			createSmackerScene(0x42980941, true, true, false);
		break;
	case 9999:
		createDemoScene();
		break;
	}
	SetUpdateHandler(&Module2600::updateScene);
	_childObject->handleUpdate();
}