/* 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. * * $URL$ * $Id$ * */ #include "kyra/kyra_v2.h" namespace Kyra { int KyraEngine_v2::o2_getCharacterX(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_getCharacterX(%p) ()", (const void *)script); return _mainCharacter.x1; } int KyraEngine_v2::o2_getCharacterY(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_getCharacterY(%p) ()", (const void *)script); return _mainCharacter.y1; } int KyraEngine_v2::o2_getCharacterFacing(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_getCharacterFacing(%p) ()", (const void *)script); return _mainCharacter.facing; } int KyraEngine_v2::o2_getCharacterScene(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_getCharacterScene(%p) ()", (const void *)script); return _mainCharacter.sceneId; } int KyraEngine_v2::o2_trySceneChange(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_trySceneChange(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); _unkHandleSceneChangeFlag = 1; int success = inputSceneChange(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); _unkHandleSceneChangeFlag = 0; if (success) { _emc->init(script, script->dataPtr); _unk4 = 0; _unk3 = -1; _unk5 = 1; return 0; } else { return (_unk4 != 0) ? 1 : 0; } } int KyraEngine_v2::o2_moveCharacter(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_moveCharacter(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); moveCharacter(stackPos(0), stackPos(1), stackPos(2)); return 0; } } // end of namespace Kyra