mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-27 03:10:37 +00:00
added 'touche' engine for the game 'Touche: The Adventures of the 5th Musketeer'
svn-id: r24592
This commit is contained in:
parent
c71e6599bc
commit
13d9cdbd26
@ -150,6 +150,9 @@ public:
|
||||
#ifndef DISABLE_AGI
|
||||
LINK_PLUGIN(AGI)
|
||||
#endif
|
||||
#ifndef DISABLE_TOUCHE
|
||||
LINK_PLUGIN(TOUCHE)
|
||||
#endif
|
||||
|
||||
return pl;
|
||||
}
|
||||
@ -181,7 +184,7 @@ PluginManager::~PluginManager() {
|
||||
delete *pp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PluginManager::addPluginProvider(PluginProvider *pp) {
|
||||
_providers.push_back(pp);
|
||||
}
|
||||
|
8
configure
vendored
8
configure
vendored
@ -60,6 +60,7 @@ _build_kyra=yes
|
||||
_build_lure=no
|
||||
_build_cine=yes
|
||||
_build_agi=no
|
||||
_build_touche=no
|
||||
_need_memalign=no
|
||||
_build_plugins=no
|
||||
_nasm=auto
|
||||
@ -332,6 +333,7 @@ Optional Features:
|
||||
--enable-lure build the Lure of the Temptress engine
|
||||
--disable-cine don't build the Cinematique engine evo 1
|
||||
--enable-agi build the AGI engine
|
||||
--enable-touche build the Touche: The Adventures of the Fifth Musketeer engine
|
||||
--enable-plugins build engines as loadable modules instead of
|
||||
static linking them
|
||||
--disable-mt32emu don't enable the integrated MT-32 emulator
|
||||
@ -400,6 +402,7 @@ for ac_option in $@; do
|
||||
--enable-lure) _build_lure=yes ;;
|
||||
--disable-cine) _build_cine=no ;;
|
||||
--enable-agi) _build_agi=yes ;;
|
||||
--enable-touche) _build_touche=yes ;;
|
||||
--disable-hq-scalers) _build_hq_scalers=no ;;
|
||||
--disable-scalers) _build_scalers=no ;;
|
||||
--enable-alsa) _alsa=yes ;;
|
||||
@ -685,6 +688,7 @@ add_flag_to_config_mk $_build_gob 'DISABLE_GOB'
|
||||
add_flag_to_config_mk $_build_lure 'DISABLE_LURE'
|
||||
add_flag_to_config_mk $_build_cine 'DISABLE_CINE'
|
||||
add_flag_to_config_mk $_build_agi 'DISABLE_AGI'
|
||||
add_flag_to_config_mk $_build_touche 'DISABLE_TOUCHE'
|
||||
add_flag_to_config_mk $_build_hq_scalers 'DISABLE_HQ_SCALERS'
|
||||
add_flag_to_config_mk $_build_scalers 'DISABLE_SCALERS'
|
||||
|
||||
@ -1270,10 +1274,12 @@ fi
|
||||
if test "$_build_cine" = yes ; then
|
||||
echo " Cinematique evo 1"
|
||||
fi
|
||||
|
||||
if test "$_build_agi" = yes ; then
|
||||
echo " AGI"
|
||||
fi
|
||||
if test "$_build_touche" = yes ; then
|
||||
echo " Touche: The Adventures of the Fifth Musketeer"
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
|
@ -45,19 +45,19 @@ endif
|
||||
|
||||
ifdef DISABLE_SAGA
|
||||
DEFINES += -DDISABLE_SAGA
|
||||
else
|
||||
else
|
||||
MODULES += engines/saga
|
||||
endif
|
||||
|
||||
ifdef DISABLE_KYRA
|
||||
DEFINES += -DDISABLE_KYRA
|
||||
else
|
||||
else
|
||||
MODULES += engines/kyra
|
||||
endif
|
||||
|
||||
ifdef DISABLE_GOB
|
||||
DEFINES += -DDISABLE_GOB
|
||||
else
|
||||
else
|
||||
MODULES += engines/gob
|
||||
endif
|
||||
|
||||
@ -69,13 +69,18 @@ endif
|
||||
|
||||
ifdef DISABLE_CINE
|
||||
DEFINES += -DDISABLE_CINE
|
||||
else
|
||||
else
|
||||
MODULES += engines/cine
|
||||
endif
|
||||
|
||||
ifdef DISABLE_AGI
|
||||
DEFINES += -DDISABLE_AGI
|
||||
else
|
||||
else
|
||||
MODULES += engines/agi
|
||||
endif
|
||||
|
||||
ifdef DISABLE_TOUCHE
|
||||
DEFINES += -DDISABLE_TOUCHE
|
||||
else
|
||||
MODULES += engines/touche
|
||||
endif
|
||||
|
210
engines/touche/graphics.cpp
Normal file
210
engines/touche/graphics.cpp
Normal file
@ -0,0 +1,210 @@
|
||||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2006 The ScummVM project
|
||||
*
|
||||
* 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 "common/stdafx.h"
|
||||
#include "common/endian.h"
|
||||
|
||||
#include "touche/graphics.h"
|
||||
|
||||
namespace Touche {
|
||||
|
||||
int Graphics::getStringWidth16(const char *str) {
|
||||
int w = 0;
|
||||
while (*str) {
|
||||
char chr = *str++;
|
||||
w += getCharWidth16((uint8)chr);
|
||||
if (*str == '\\') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
int Graphics::getCharWidth16(uint8 chr) {
|
||||
assert(chr >= 32 && chr < 174);
|
||||
const uint8 *chrData = _fontData + _fontOffs[chr - 32];
|
||||
return chrData[2];
|
||||
}
|
||||
|
||||
void Graphics::drawString16(uint8 *dst, int dstPitch, uint16 color, int x, int y, const char *str) {
|
||||
while (*str) {
|
||||
uint8 chr = (uint8)*str++;
|
||||
x += drawChar16(dst, dstPitch, chr, x, y, color);
|
||||
}
|
||||
}
|
||||
|
||||
int Graphics::drawChar16(uint8 *dst, int dstPitch, uint8 chr, int x, int y, uint16 color) {
|
||||
dst += y * dstPitch + x;
|
||||
uint8 color1 = color & 0xFF;
|
||||
uint8 color2 = color >> 8;
|
||||
assert(chr >= 32 && chr < 174);
|
||||
const uint8 *chrData = _fontData + _fontOffs[chr - 32];
|
||||
int chrHeight = chrData[1];
|
||||
int chrWidth = chrData[2];
|
||||
chrData += 3;
|
||||
while (chrHeight--) {
|
||||
int shiftCount = 0;
|
||||
int mask = 0;
|
||||
for (int i = 0; i < chrWidth; ++i) {
|
||||
if (shiftCount == 0) {
|
||||
mask = READ_BE_UINT16(chrData); chrData += 2;
|
||||
shiftCount = 8;
|
||||
}
|
||||
int b = (mask & 0xC000) >> 14;
|
||||
mask <<= 2;
|
||||
--shiftCount;
|
||||
if (b) {
|
||||
if (b & 2) {
|
||||
dst[i] = color2;
|
||||
} else {
|
||||
dst[i] = color1;
|
||||
}
|
||||
}
|
||||
}
|
||||
dst += dstPitch;
|
||||
}
|
||||
return chrWidth;
|
||||
}
|
||||
|
||||
void Graphics::fillRect(uint8 *dst, int dstPitch, int x, int y, int w, int h, uint8 color) {
|
||||
dst += y * dstPitch + x;
|
||||
while (h--) {
|
||||
memset(dst, color, w);
|
||||
dst += dstPitch;
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::drawRect(uint8 *dst, int dstPitch, int x, int y, int w, int h, uint8 color1, uint8 color2) {
|
||||
int x1 = x;
|
||||
int y1 = y;
|
||||
int x2 = x + w - 1;
|
||||
int y2 = y + h - 1;
|
||||
drawLineHV(dst, dstPitch, x1, y1, x2, y1, color1);
|
||||
drawLineHV(dst, dstPitch, x1, y1, x1, y2, color1);
|
||||
drawLineHV(dst, dstPitch, x2, y1 + 1, x2, y2, color2);
|
||||
drawLineHV(dst, dstPitch, x1 + 1, y2, x2, y2, color2);
|
||||
}
|
||||
|
||||
void Graphics::drawLineHV(uint8 *dst, int dstPitch, int x1, int y1, int x2, int y2, uint8 color) {
|
||||
if (x2 < x1) {
|
||||
SWAP(x2, x1);
|
||||
}
|
||||
if (y2 < y1) {
|
||||
SWAP(y2, y1);
|
||||
}
|
||||
if (y1 == y2) {
|
||||
for (int x = x1; x < x2; ++x) {
|
||||
dst[y1 * dstPitch + x] = color;
|
||||
}
|
||||
} else {
|
||||
for (int y = y1; y < y2; ++y) {
|
||||
dst[y * dstPitch + x1] = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::drawLine(uint8 *dst, int dstPitch, int x1, int y1, int x2, int y2, uint8 color) {
|
||||
assert(x1 >= 0 && y1 >= 0 && x2 >= 0 && y2 >= 0);
|
||||
|
||||
dst += y1 * dstPitch + x1;
|
||||
|
||||
int yInc, dy = y2 - y1;
|
||||
if (dy < 0) {
|
||||
dy = -dy;
|
||||
yInc = -dstPitch;
|
||||
} else {
|
||||
yInc = dstPitch;
|
||||
}
|
||||
|
||||
int xInc, dx = x2 - x1;
|
||||
if (dx < 0) {
|
||||
dx = -dx;
|
||||
xInc = -1;
|
||||
} else {
|
||||
xInc = 1;
|
||||
}
|
||||
|
||||
int step = 0;
|
||||
|
||||
if (dx > dy) {
|
||||
for (int i = 0; i < dx + 1; ++i) {
|
||||
*dst = color;
|
||||
dst += xInc;
|
||||
step += dy;
|
||||
if (step > dx) {
|
||||
step -= dx;
|
||||
dst += yInc;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < dy + 1; ++i) {
|
||||
*dst = color;
|
||||
dst += yInc;
|
||||
step += dx;
|
||||
if (step > 0) {
|
||||
step -= dy;
|
||||
dst += xInc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::copyRect(uint8 *dst, int dstPitch, int dstX, int dstY, const uint8 *src, int srcPitch, int srcX, int srcY, int w, int h, int flags) {
|
||||
if (w != 0 && h != 0) {
|
||||
if (flags & kHFlipped) {
|
||||
srcY += h - 1;
|
||||
srcPitch = -srcPitch;
|
||||
}
|
||||
int u = 1;
|
||||
if (flags & kVFlipped) {
|
||||
srcX += w - 1;
|
||||
u = -1;
|
||||
}
|
||||
dst += dstY * dstPitch + dstX;
|
||||
src += srcY * srcPitch + srcX;
|
||||
while (h--) {
|
||||
for (int i = 0; i < w; ++i) {
|
||||
if ((flags & kTransparent) == 0 || src[u * i] != 0) {
|
||||
dst[i] = src[u * i];
|
||||
}
|
||||
}
|
||||
dst += dstPitch;
|
||||
src += srcPitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::copyMask(uint8 *dst, int dstPitch, int dstX, int dstY, const uint8 *src, int srcPitch, int srcX, int srcY, int w, int h, uint8 fillColor) {
|
||||
dst += dstY * dstPitch * dstX;
|
||||
src += srcY * srcPitch + srcX;
|
||||
while (h--) {
|
||||
for (int i = 0; i < w; ++i) {
|
||||
if (src[i] != 0) {
|
||||
dst[i] = fillColor;
|
||||
}
|
||||
}
|
||||
dst += dstPitch;
|
||||
src += srcPitch;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Touche
|
54
engines/touche/graphics.h
Normal file
54
engines/touche/graphics.h
Normal file
@ -0,0 +1,54 @@
|
||||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2006 The ScummVM project
|
||||
*
|
||||
* 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: $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TOUCHE_GRAPHICS_H
|
||||
#define TOUCHE_GRAPHICS_H
|
||||
|
||||
#include "common/util.h"
|
||||
|
||||
namespace Touche {
|
||||
|
||||
struct Graphics {
|
||||
enum {
|
||||
kVFlipped = 1 << 0,
|
||||
kHFlipped = 1 << 1,
|
||||
kTransparent = 1 << 2
|
||||
};
|
||||
|
||||
static int getStringWidth16(const char *str);
|
||||
static int getCharWidth16(uint8 chr);
|
||||
static void drawString16(uint8 *dst, int dstPitch, uint16 color, int x, int y, const char *str);
|
||||
static int drawChar16(uint8 *dst, int dstPitch, uint8 chr, int x, int y, uint16 color);
|
||||
static void fillRect(uint8 *dst, int dstPitch, int x, int y, int w, int h, uint8 color);
|
||||
static void drawRect(uint8 *dst, int dstPitch, int x, int y, int w, int h, uint8 color1, uint8 color2);
|
||||
static void drawLineHV(uint8 *dst, int dstPitch, int x1, int y1, int x2, int y2, uint8 color);
|
||||
static void drawLine(uint8 *dst, int dstPitch, int x1, int y1, int x2, int y2, uint8 color);
|
||||
static void copyRect(uint8 *dst, int dstPitch, int dstX, int dstY, const uint8 *src, int srcPitch, int srcX, int srcY, int w, int h, int flags = 0);
|
||||
static void copyMask(uint8 *dst, int dstPitch, int dstX, int dstY, const uint8 *src, int srcPitch, int srcX, int srcY, int w, int h, uint8 fillColor);
|
||||
|
||||
static const uint16 _fontOffs[];
|
||||
static const uint8 _fontData[];
|
||||
};
|
||||
|
||||
} // namespace Touche
|
||||
|
||||
#endif
|
19
engines/touche/module.mk
Normal file
19
engines/touche/module.mk
Normal file
@ -0,0 +1,19 @@
|
||||
MODULE := engines/touche
|
||||
|
||||
MODULE_OBJS := \
|
||||
graphics.o \
|
||||
plugin.o \
|
||||
opcodes.o \
|
||||
resource.o \
|
||||
saveload.o \
|
||||
staticres.o \
|
||||
touche.o \
|
||||
ui.o
|
||||
|
||||
# This module can be built as a plugin
|
||||
ifdef BUILD_PLUGINS
|
||||
PLUGIN := 1
|
||||
endif
|
||||
|
||||
# Include common rules
|
||||
include $(srcdir)/rules.mk
|
822
engines/touche/opcodes.cpp
Normal file
822
engines/touche/opcodes.cpp
Normal file
@ -0,0 +1,822 @@
|
||||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2006 The ScummVM project
|
||||
*
|
||||
* 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 "common/stdafx.h"
|
||||
|
||||
#include "touche/touche.h"
|
||||
|
||||
namespace Touche {
|
||||
|
||||
void ToucheEngine::op_nop() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_nop()");
|
||||
}
|
||||
|
||||
void ToucheEngine::op_jnz() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_jnz()");
|
||||
if (*_script.stackDataPtr != 0) {
|
||||
_script.dataOffset = _script.readNextWord();
|
||||
} else {
|
||||
_script.dataOffset += 2;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_jz() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_jz()");
|
||||
if (*_script.stackDataPtr == 0) {
|
||||
_script.dataOffset = _script.readNextWord();
|
||||
} else {
|
||||
_script.dataOffset += 2;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_jmp() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_jmp()");
|
||||
_script.dataOffset = _script.readNextWord();
|
||||
}
|
||||
|
||||
void ToucheEngine::op_true() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_true()");
|
||||
*_script.stackDataPtr = -1;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_false() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_false()");
|
||||
*_script.stackDataPtr = 0;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_push() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_push()");
|
||||
--_script.stackDataPtr;
|
||||
*_script.stackDataPtr = 0;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_testFalse() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_testFalse()");
|
||||
if (*_script.stackDataPtr == 0) {
|
||||
*_script.stackDataPtr = -1;
|
||||
} else {
|
||||
*_script.stackDataPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_add() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_add()");
|
||||
int16 val = *_script.stackDataPtr++;
|
||||
*_script.stackDataPtr += val;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_sub() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_sub()");
|
||||
int16 val = *_script.stackDataPtr++;
|
||||
*_script.stackDataPtr -= val;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_mul() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_mul()");
|
||||
int16 val = *_script.stackDataPtr++;
|
||||
*_script.stackDataPtr *= val;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_div() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_div()");
|
||||
int16 val = *_script.stackDataPtr++;
|
||||
if (val != 0) {
|
||||
*_script.stackDataPtr /= val;
|
||||
} else {
|
||||
*_script.stackDataPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_mod() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_mod()");
|
||||
int16 val = *_script.stackDataPtr++;
|
||||
if (val != 0) {
|
||||
*_script.stackDataPtr %= val;
|
||||
} else {
|
||||
*_script.stackDataPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_and() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_and()");
|
||||
uint16 val = *_script.stackDataPtr++;
|
||||
*_script.stackDataPtr &= val;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_or() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_or()");
|
||||
uint16 val = *_script.stackDataPtr++;
|
||||
*_script.stackDataPtr |= val;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_not() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_not()");
|
||||
uint16 val = *_script.stackDataPtr;
|
||||
*_script.stackDataPtr = ~val;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_testGreater() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_testGreater()");
|
||||
int16 val = *_script.stackDataPtr++;
|
||||
if (val > *_script.stackDataPtr) {
|
||||
*_script.stackDataPtr = -1;
|
||||
} else {
|
||||
*_script.stackDataPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_testEquals() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_testEquals()");
|
||||
int16 val = *_script.stackDataPtr++;
|
||||
if (val == *_script.stackDataPtr) {
|
||||
*_script.stackDataPtr = -1;
|
||||
} else {
|
||||
*_script.stackDataPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_testLower() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_testLower()");
|
||||
int16 val = *_script.stackDataPtr++;
|
||||
if (val < *_script.stackDataPtr) {
|
||||
*_script.stackDataPtr = -1;
|
||||
} else {
|
||||
*_script.stackDataPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_fetchScriptWord() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_fetchScriptWord()");
|
||||
int16 val = _script.readNextWord();
|
||||
*_script.stackDataPtr = val;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_testGreaterOrEquals() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_testGreaterOrEquals()");
|
||||
int16 val = *_script.stackDataPtr++;
|
||||
if (val >= *_script.stackDataPtr) {
|
||||
*_script.stackDataPtr = -1;
|
||||
} else {
|
||||
*_script.stackDataPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_testLowerOrEquals() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_testLowerOrEquals()");
|
||||
int16 val = *_script.stackDataPtr++;
|
||||
if (val <= *_script.stackDataPtr) {
|
||||
*_script.stackDataPtr = -1;
|
||||
} else {
|
||||
*_script.stackDataPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_testNotEquals() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_testNotEquals()");
|
||||
int16 val = *_script.stackDataPtr++;
|
||||
if (val != *_script.stackDataPtr) {
|
||||
*_script.stackDataPtr = -1;
|
||||
} else {
|
||||
*_script.stackDataPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_endConversation() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_endConversation()");
|
||||
_script.quitFlag = 1;
|
||||
_conversationEnded = true;
|
||||
_disabledInputCounter = false;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_stopScript() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_stopScript()");
|
||||
_script.quitFlag = 1;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_getFlag() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_getFlag()");
|
||||
uint16 fl = _script.readNextWord();
|
||||
*_script.stackDataPtr = _flagsTable[fl];
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setFlag() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setFlag()");
|
||||
uint16 flag = _script.readNextWord();
|
||||
int16 val = *_script.stackDataPtr;
|
||||
_flagsTable[flag] = val;
|
||||
switch (flag) {
|
||||
case 104:
|
||||
_currentKeyCharNum = val;
|
||||
break;
|
||||
case 612:
|
||||
_flagsTable[613] = getRandomNumber(val);
|
||||
break;
|
||||
case 614:
|
||||
case 615:
|
||||
_fullRedrawCounter = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_fetchScriptByte() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_fetchScriptByte()");
|
||||
int16 val = _script.readNextByte();
|
||||
*_script.stackDataPtr = val;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_getScriptValue() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_getScriptValue()");
|
||||
uint8 index = _script.readNextByte();
|
||||
assert(index < _script.stackDataBasePtr[2]);
|
||||
*_script.stackDataPtr = _script.stackDataBasePtr[3 + index];
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setScriptValue() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setScriptValue()");
|
||||
uint8 index = _script.readNextByte();
|
||||
assert(index < _script.stackDataBasePtr[2]);
|
||||
_script.stackDataBasePtr[3 + index] = *_script.stackDataPtr;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_getKeyCharWalkBox() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_getKeyCharWalkBox()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
*_script.stackDataPtr = _keyCharsTable[keyChar].walkDataNum;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_startSound() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_startSound()");
|
||||
_newSoundNum = _script.readNextWord();
|
||||
_newSoundDelay = _script.readNextWord();
|
||||
_newSoundPriority = 1;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_initKeyCharTalk() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_initKeyCharTalk()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
int16 num = _script.readNextWord();
|
||||
if (num == -1) {
|
||||
num = _script.readNextWord();
|
||||
num = _keyCharsTable[num].pointsDataNum;
|
||||
}
|
||||
sortPointsData(-1, num);
|
||||
buildWalkPointsList(keyChar);
|
||||
_keyCharsTable[keyChar].flags &= ~0x10;
|
||||
if (_script.keyCharNum == keyChar) {
|
||||
removeFromTalkTable(_script.keyCharNum);
|
||||
_keyCharsTable[keyChar].waitingKeyCharPosTable[0] = -1;
|
||||
_keyCharsTable[keyChar].waitingKeyCharPosTable[2] = -1;
|
||||
_keyCharsTable[keyChar].waitingKeyChar = _script.keyCharNum;
|
||||
_keyCharsTable[keyChar].waitingKeyCharPosTable[1] = num;
|
||||
_script.quitFlag = 3;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_loadRoom() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_loadRoom()");
|
||||
int16 num = _script.readNextWord();
|
||||
res_loadRoom(num);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_updateRoom() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_updateRoom()");
|
||||
int16 area = _script.readNextWord();
|
||||
updateRoomAreas(area, 0);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_startTalk() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_startTalk()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
int16 num = _script.readNextWord();
|
||||
if (num == 750) {
|
||||
return;
|
||||
}
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
num += _currentKeyCharNum & 1;
|
||||
}
|
||||
addToTalkTable(keyChar, num, _script.keyCharNum);
|
||||
_script.quitFlag = 3;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_loadSprite() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_loadSprite()");
|
||||
int16 index = _script.readNextWord();
|
||||
int16 num = _script.readNextWord();
|
||||
res_loadSprite(num, index);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_loadSequence() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_loadSequence()");
|
||||
int16 index = _script.readNextWord();
|
||||
int16 num = _script.readNextWord();
|
||||
res_loadSequence(num, index);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setKeyCharBox() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setKeyCharBox()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
int16 num = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
setKeyCharBox(keyChar, num);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_initKeyCharScript() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_initKeyCharScript()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
int16 color = _script.readNextWord();
|
||||
int16 f1 = _script.readNextWord();
|
||||
int16 f2 = _script.readNextWord();
|
||||
int16 f3 = _script.readNextWord();
|
||||
setKeyCharTextColor(keyChar, color);
|
||||
initKeyCharScript(keyChar, f1, f2, f3);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setKeyCharFrame() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setKeyCharFrame()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
int16 val1 = _script.readNextWord();
|
||||
int16 val2 = _script.readNextWord();
|
||||
int16 val3 = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
setKeyCharFrame(keyChar, val1, val2, val3);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setKeyCharDirection() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setKeyCharDirection()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
int16 dir = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
setKeyCharFacingDirection(keyChar, dir);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_clearConversationChoices() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_clearConversationChoices()");
|
||||
clearConversationChoices();
|
||||
}
|
||||
|
||||
void ToucheEngine::op_addConversationChoice() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_addConversationChoice()");
|
||||
int16 num = _script.readNextWord();
|
||||
addConversationChoice(num);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_removeConversationChoice() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_removeConversationChoice()");
|
||||
int16 num = _script.readNextWord();
|
||||
removeConversationChoice(num);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_getInventoryItem() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_getInventoryItem()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
uint16 item = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
|
||||
assert(item < sizeof(_keyCharsTable[keyChar].inventoryItems));
|
||||
*_script.stackDataPtr = _keyCharsTable[keyChar].inventoryItems[item];
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setInventoryItem() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setInventoryItem()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
uint16 item = _script.readNextWord();
|
||||
if (item == 4) {
|
||||
setKeyCharMoney();
|
||||
}
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
|
||||
assert(item < sizeof(_keyCharsTable[keyChar].inventoryItems));
|
||||
_keyCharsTable[keyChar].inventoryItems[item] = *_script.stackDataPtr;
|
||||
if (item == 4 && !_hideInventoryTexts) {
|
||||
drawAmountOfMoneyInInventory();
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_startEpisode() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_startEpisode()");
|
||||
_newEpisodeNum = _script.readNextWord();
|
||||
_flagsTable[0] = _script.readNextWord();
|
||||
_disabledInputCounter = 1;
|
||||
_script.quitFlag = 1;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setConversationNum() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setConversationNum()");
|
||||
_conversationNum = _script.readNextWord();
|
||||
}
|
||||
|
||||
void ToucheEngine::op_enableInventoryItem() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_enableInventoryItem()");
|
||||
int16 flag = _script.readNextWord();
|
||||
int16 item = _script.readNextWord();
|
||||
int16 rnd = _script.readNextWord();
|
||||
changeInventoryItemState(flag, item, rnd, 1);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_enableInput() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_enableInput()");
|
||||
++_disabledInputCounter;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_disableInput() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_disableInput()");
|
||||
if (_disabledInputCounter != 0) {
|
||||
--_disabledInputCounter;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_faceKeyChar() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_faceKeyChar()");
|
||||
int16 keyChar1 = _script.readNextWord();
|
||||
int16 keyChar2 = _script.readNextWord();
|
||||
if (keyChar1 == 256) {
|
||||
keyChar1 = _currentKeyCharNum;
|
||||
}
|
||||
if (_keyCharsTable[keyChar1].xPos <= _keyCharsTable[keyChar2].xPos) {
|
||||
_keyCharsTable[keyChar2].facingDirection = 3;
|
||||
} else {
|
||||
_keyCharsTable[keyChar2].facingDirection = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_getKeyCharCurrentAnim() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_getKeyCharCurrentAnim()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
|
||||
*_script.stackDataPtr = _keyCharsTable[keyChar].currentAnim;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_getCurrentKeyChar() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_getCurrentKeyChar()");
|
||||
*_script.stackDataPtr = _currentKeyCharNum;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_isKeyCharActive() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_isKeyCharActive()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
|
||||
*_script.stackDataPtr = _keyCharsTable[keyChar].num != 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setPalette() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setPalette()");
|
||||
int16 r = _script.readNextWord();
|
||||
int16 g = _script.readNextWord();
|
||||
int16 b = _script.readNextWord();
|
||||
setPalette(0, 240, r, g, b);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_changeWalkPath() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_changeWalkPath()");
|
||||
int16 num1 = _script.readNextWord();
|
||||
int16 num2 = _script.readNextWord();
|
||||
int16 val = _script.readNextWord();
|
||||
changeWalkPath(num1, num2, val);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_lockWalkPath() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_lockWalkPath()");
|
||||
int16 num1 = _script.readNextWord();
|
||||
int16 num2 = _script.readNextWord();
|
||||
lockWalkPath(num1, num2);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_initializeKeyChar() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_initializeKeyChar()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
initKeyChars(keyChar);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setupWaitingKeyChars() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setupWaitingKeyChars()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
int16 val1 = _script.readNextWord();
|
||||
int16 val2 = _script.readNextWord();
|
||||
if (val1 == -1) {
|
||||
_waitingSetKeyCharNum2 = keyChar;
|
||||
_waitingSetKeyCharNum1 = val2;
|
||||
_waitingSetKeyCharNum3 = _script.keyCharNum;
|
||||
_script.quitFlag = 3;
|
||||
} else {
|
||||
_keyCharsTable[_script.keyCharNum].waitingKeyCharPosTable[0] = -1;
|
||||
_keyCharsTable[_script.keyCharNum].waitingKeyCharPosTable[1] = -1;
|
||||
_keyCharsTable[_script.keyCharNum].waitingKeyCharPosTable[2] = -1;
|
||||
_keyCharsTable[_script.keyCharNum].waitingKeyChar = keyChar;
|
||||
assert(val1 >= 0 && val1 < 3);
|
||||
_keyCharsTable[_script.keyCharNum].waitingKeyCharPosTable[val1] = val2;
|
||||
_script.quitFlag = 3;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_updateRoomAreas() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setupWaitingKeyChars()");
|
||||
int16 area = _script.readNextWord();
|
||||
updateRoomAreas(area, 1);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_unlockWalkPath() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_unlockWalkPath()");
|
||||
int16 num1 = _script.readNextWord();
|
||||
int16 num2 = _script.readNextWord();
|
||||
unlockWalkPath(num1, num2);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_addItemToInventoryAndRedraw() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_addItemToInventoryAndRedraw()");
|
||||
int16 inventory = _script.readNextWord();
|
||||
int16 item = *_script.stackDataPtr;
|
||||
if (inventory == 256) {
|
||||
inventory = _currentKeyCharNum;
|
||||
}
|
||||
addItemToInventory(inventory, item);
|
||||
if (_currentKeyCharNum == inventory && !_hideInventoryTexts) {
|
||||
drawInventory(_currentKeyCharNum, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_giveItemTo() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_giveItemTo()");
|
||||
_giveItemToCounter = 1;
|
||||
_giveItemToObjectNum = _script.readNextWord();
|
||||
_giveItemToKeyCharNum = _script.keyCharNum;
|
||||
_script.quitFlag = 3;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_resetHitBoxes() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_resetHitBoxes()");
|
||||
int16 num = _script.readNextWord();
|
||||
if (num & 0x4000) {
|
||||
num &= 0xFF;
|
||||
_keyCharsTable[num].strNum = 1;
|
||||
} else {
|
||||
for (uint i = 0; i < _programHitBoxTable.size(); ++i) {
|
||||
if (_programHitBoxTable[i].item == num) {
|
||||
_programHitBoxTable[i].str = _programHitBoxTable[i].defaultStr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_fadePalette() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_fadePalette()");
|
||||
int16 fadeOut = _script.readNextWord();
|
||||
if (fadeOut) {
|
||||
fadePalette(0, 240, 255, -2, 128);
|
||||
} else {
|
||||
fadePalette(0, 240, 0, 2, 128);
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_disableInventoryItem() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_disableInventoryItem()");
|
||||
int16 flag = _script.readNextWord();
|
||||
int16 item = _script.readNextWord();
|
||||
int16 rnd = _script.readNextWord();
|
||||
changeInventoryItemState(flag, item, rnd, 0);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_getInventoryItemFlags() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_getInventoryItemFlags()");
|
||||
int16 item = _script.readNextWord();
|
||||
int16 flags = _inventoryItemsInfoTable[item];
|
||||
if (flags & 0x10) {
|
||||
flags &= 0xF;
|
||||
} else {
|
||||
flags &= ~0xF;
|
||||
}
|
||||
*_script.stackDataPtr = flags;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_drawInventory() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_drawInventory()");
|
||||
int16 num = _script.readNextWord();
|
||||
drawInventory(num, 1);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_stopKeyCharScript() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_stopKeyCharScript()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
|
||||
_keyCharsTable[keyChar].flags |= kScriptStopped;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_restartKeyCharScript() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_restartKeyCharScript()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
|
||||
KeyChar *key = &_keyCharsTable[keyChar];
|
||||
key->flags &= ~(kScriptStopped | kScriptPaused);
|
||||
key->scriptDataOffset = key->scriptDataStartOffset;
|
||||
key->scriptStackPtr = &key->scriptStackTable[39];
|
||||
}
|
||||
|
||||
void ToucheEngine::op_getKeyCharCurrentWalkBox() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_getKeyCharCurrentWalkBox()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
|
||||
*_script.stackDataPtr = _keyCharsTable[keyChar].currentWalkBox;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_getKeyCharPointsDataNum() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_getKeyCharPointsDataNum()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
|
||||
*_script.stackDataPtr = _keyCharsTable[keyChar].pointsDataNum;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setupFollowingKeyChar() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setupFollowingKeyChar()");
|
||||
int16 val = _script.readNextWord();
|
||||
int16 keyChar = _script.readNextWord();
|
||||
assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
|
||||
_keyCharsTable[keyChar].followingKeyCharNum = val;
|
||||
_keyCharsTable[keyChar].flags |= 0x10;
|
||||
_keyCharsTable[keyChar].followingKeyCharPos = -1;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_startAnimation() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_startAnimation()");
|
||||
int16 num = _script.readNextWord();
|
||||
int16 pos = _script.readNextWord();
|
||||
int16 keyChar = *_script.stackDataPtr;
|
||||
addToAnimationTable(num, pos, keyChar, 3);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setKeyCharTextColor() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setKeyCharTextColor()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
uint16 color = _script.readNextWord();
|
||||
setKeyCharTextColor(keyChar, color);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_startMusic() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_startMusic()");
|
||||
_newMusicNum = _script.readNextWord();
|
||||
}
|
||||
|
||||
void ToucheEngine::op_copyPaletteColor() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_copyPaletteColor()");
|
||||
int16 src = _script.readNextWord();
|
||||
int16 dst = _script.readNextWord();
|
||||
copyPaletteColor(src, dst);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_delay() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_delay()");
|
||||
int16 delay = _script.readNextWord();
|
||||
_keyCharsTable[_script.keyCharNum].delay = delay;
|
||||
_script.quitFlag = 3;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_lockHitBox() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_lockHitBox()");
|
||||
int16 num = _script.readNextWord();
|
||||
lockUnlockHitBox(num, 1);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_removeItemFromInventory() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_removeItemFromInventory()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
int16 item = *_script.stackDataPtr;
|
||||
if (keyChar == 256) {
|
||||
keyChar = _currentKeyCharNum;
|
||||
}
|
||||
removeItemFromInventory(keyChar, item);
|
||||
if (keyChar == _currentKeyCharNum && !_hideInventoryTexts) {
|
||||
drawInventory(_currentKeyCharNum, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::op_unlockHitBox() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_unlockHitBox()");
|
||||
int16 num = _script.readNextWord();
|
||||
lockUnlockHitBox(num, 0);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_addRoomArea() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_addRoomArea()");
|
||||
int16 num = _script.readNextWord();
|
||||
uint16 flag = _script.readNextWord();
|
||||
addRoomArea(num, flag);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setKeyCharFlags() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setKeyCharFlags()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
uint16 flags = _script.readNextWord();
|
||||
flags &= 0xFF00;
|
||||
_keyCharsTable[keyChar].flags |= flags;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_unsetKeyCharFlags() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_unsetKeyCharFlags()");
|
||||
int16 keyChar = _script.readNextWord();
|
||||
uint16 flags = _script.readNextWord();
|
||||
flags &= 0xFF00;
|
||||
_keyCharsTable[keyChar].flags &= ~flags;
|
||||
}
|
||||
|
||||
void ToucheEngine::op_loadVoice() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_loadVoice()");
|
||||
int16 num = _script.readNextWord();
|
||||
res_loadSpeech(num);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_drawSpriteOnBackdrop() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_drawSpriteOnBackdrop()");
|
||||
int16 num = _script.readNextWord();
|
||||
int16 x = _script.readNextWord();
|
||||
int16 y = _script.readNextWord();
|
||||
drawSpriteOnBackdrop(num, x, y);
|
||||
}
|
||||
|
||||
void ToucheEngine::op_startPaletteFadeIn() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_startPaletteFadeIn()");
|
||||
_flagsTable[290] = 0;
|
||||
_flagsTable[605] = 0;
|
||||
_flagsTable[607] = 0;
|
||||
_flagsTable[608] = 0xFF;
|
||||
_flagsTable[609] = 0xFF;
|
||||
_flagsTable[610] = 0;
|
||||
_flagsTable[603] = _script.readNextWord();
|
||||
}
|
||||
|
||||
void ToucheEngine::op_startPaletteFadeOut() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_startPaletteFadeOut()");
|
||||
_flagsTable[290] = 0;
|
||||
_flagsTable[605] = 0xFF;
|
||||
_flagsTable[607] = 0;
|
||||
_flagsTable[608] = 0xFF;
|
||||
_flagsTable[609] = 0xFF;
|
||||
_flagsTable[610] = 0;
|
||||
_flagsTable[603] = -_script.readNextWord();
|
||||
}
|
||||
|
||||
void ToucheEngine::op_setRoomAreaState() {
|
||||
debugC(9, kDebugOpcodes, "ToucheEngine::op_setRoomAreaState()");
|
||||
int16 num = _script.readNextWord();
|
||||
int16 val = _script.readNextWord();
|
||||
setRoomAreaState(num, val);
|
||||
}
|
||||
|
||||
} // namespace Touche
|
154
engines/touche/plugin.cpp
Normal file
154
engines/touche/plugin.cpp
Normal file
@ -0,0 +1,154 @@
|
||||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2006 The ScummVM project
|
||||
*
|
||||
* 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 "common/stdafx.h"
|
||||
#include "common/config-manager.h"
|
||||
#include "common/fs.h"
|
||||
#include "common/md5.h"
|
||||
|
||||
#include "base/plugins.h"
|
||||
|
||||
#include "touche/touche.h"
|
||||
|
||||
struct GameVersion {
|
||||
const char *description;
|
||||
uint32 filesize;
|
||||
const char *md5digest;
|
||||
Common::Language language;
|
||||
Common::Platform platform;
|
||||
};
|
||||
|
||||
static const GameVersion toucheGameVersionsTable[] = {
|
||||
{
|
||||
"Touche: The Adventures of the Fifth Musketeer",
|
||||
26350211,
|
||||
"2af0177f8887e3430f345e6b4d8b1414",
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformPC
|
||||
},
|
||||
{
|
||||
"Touche: Les Aventures du Cinquieme Mousquetaire",
|
||||
26558232,
|
||||
"1caa20bb4d4fc2ce8eb867b6610082b3",
|
||||
Common::FR_FRA,
|
||||
Common::kPlatformPC
|
||||
}
|
||||
};
|
||||
|
||||
static const PlainGameDescriptor toucheGameDescriptor = {
|
||||
"touche", "Touche: The Adventures of the Fifth Musketeer"
|
||||
};
|
||||
|
||||
static const char *toucheDetectFileName = "TOUCHE.DAT";
|
||||
|
||||
static Common::String Engine_TOUCHE_md5digest(const FilesystemNode *file) {
|
||||
static const int md5DataSize = 4096;
|
||||
uint8 md5digest[16];
|
||||
if (Common::md5_file(*file, md5digest, md5DataSize)) {
|
||||
char md5sum[32 + 1];
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
sprintf(md5sum + i * 2, "%02x", (int)md5digest[i]);
|
||||
}
|
||||
return md5sum;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
static uint32 Engine_TOUCHE_filesize(const FilesystemNode *file) {
|
||||
Common::File f;
|
||||
if (f.open(file->path().c_str())) {
|
||||
return f.size();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
GameList Engine_TOUCHE_gameIDList() {
|
||||
GameList games;
|
||||
games.push_back(toucheGameDescriptor);
|
||||
return games;
|
||||
}
|
||||
|
||||
GameDescriptor Engine_TOUCHE_findGameID(const char *gameid) {
|
||||
if (scumm_stricmp(toucheGameDescriptor.gameid, gameid) == 0) {
|
||||
return toucheGameDescriptor;
|
||||
}
|
||||
return GameDescriptor();
|
||||
}
|
||||
|
||||
DetectedGameList Engine_TOUCHE_detectGames(const FSList &fslist) {
|
||||
bool foundFile = false;
|
||||
FSList::const_iterator file;
|
||||
for (file = fslist.begin(); file != fslist.end(); ++file) {
|
||||
if (file->isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
for (int i = 0; i < ARRAYSIZE(toucheGameVersionsTable); ++i) {
|
||||
if (scumm_stricmp(file->name().c_str(), toucheDetectFileName) == 0) {
|
||||
foundFile = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundFile) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
DetectedGameList detectedGames;
|
||||
if (foundFile) {
|
||||
Common::String md5digest = Engine_TOUCHE_md5digest(file);
|
||||
if (!md5digest.empty()) {
|
||||
for (int i = 0; i < ARRAYSIZE(toucheGameVersionsTable); ++i) {
|
||||
const GameVersion *gv = &toucheGameVersionsTable[i];
|
||||
if (md5digest.equalsIgnoreCase(gv->md5digest)) {
|
||||
DetectedGame dg(toucheGameDescriptor.gameid, gv->description, gv->language, gv->platform);
|
||||
detectedGames.push_back(dg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (detectedGames.empty()) {
|
||||
const uint32 filesize = Engine_TOUCHE_filesize(file);
|
||||
printf("Datafile size (%d) and MD5 (%s) are unknown !\n", filesize, md5digest.c_str());
|
||||
printf("Please report the details (language, platform, etc.) of this game to the ScummVM team.\n");
|
||||
detectedGames.push_back(toucheGameDescriptor);
|
||||
}
|
||||
}
|
||||
}
|
||||
return detectedGames;
|
||||
}
|
||||
|
||||
PluginError Engine_TOUCHE_create(OSystem *system, Engine **engine) {
|
||||
FSList fslist;
|
||||
FilesystemNode dir(ConfMan.get("path"));
|
||||
if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
|
||||
warning("ToucheEngine: invalid game path '%s'", dir.path().c_str());
|
||||
return kInvalidPathError;
|
||||
}
|
||||
DetectedGameList game = Engine_TOUCHE_detectGames(fslist);
|
||||
if (game.size() != 1) {
|
||||
warning("ToucheEngine: Unable to locate game data in '%s'", dir.path().c_str());
|
||||
return kNoGameDataFoundError;
|
||||
}
|
||||
assert(engine);
|
||||
*engine = new Touche::ToucheEngine(system, game[0].language);
|
||||
return kNoError;
|
||||
}
|
||||
|
||||
REGISTER_PLUGIN(TOUCHE, "Touche: The Adventures of the 5th Musketeer", "Touche: The Adventures of the 5th Musketeer (C) US Gold");
|
645
engines/touche/resource.cpp
Normal file
645
engines/touche/resource.cpp
Normal file
@ -0,0 +1,645 @@
|
||||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2006 The ScummVM project
|
||||
*
|
||||
* 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 "common/stdafx.h"
|
||||
|
||||
#include "sound/flac.h"
|
||||
#include "sound/mixer.h"
|
||||
#include "sound/mp3.h"
|
||||
#include "sound/voc.h"
|
||||
#include "sound/vorbis.h"
|
||||
|
||||
#include "touche/touche.h"
|
||||
#include "touche/graphics.h"
|
||||
|
||||
namespace Touche {
|
||||
|
||||
enum {
|
||||
kCurrentSpeechDataVersion = 1,
|
||||
kSpeechDataFileHeaderSize = 4
|
||||
};
|
||||
|
||||
struct CompressedSpeechFile {
|
||||
const char *filename;
|
||||
Audio::AudioStream *(*makeStream)(Common::File *file, uint32 size);
|
||||
};
|
||||
|
||||
static const CompressedSpeechFile compressedSpeechFilesTable[] = {
|
||||
#ifdef USE_MAD
|
||||
{ "TOUCHE.SO3", Audio::makeMP3Stream },
|
||||
#endif
|
||||
#ifdef USE_VORBIS
|
||||
{ "TOUCHE.SOG", Audio::makeVorbisStream },
|
||||
#endif
|
||||
#ifdef USE_FLAC
|
||||
{ "TOUCHE.SOF", Audio::makeFlacStream },
|
||||
#endif
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
void ToucheEngine::res_openDataFile() {
|
||||
if (!_fData.open("TOUCHE.DAT")) {
|
||||
error("Unable to open 'TOUCHE.DAT' for reading");
|
||||
}
|
||||
for (int i = 0; compressedSpeechFilesTable[i].filename; ++i) {
|
||||
if (_fSpeech[0].open(compressedSpeechFilesTable[i].filename)) {
|
||||
_compressedSpeechData = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// _fSpeech[0] opening/closing is driven by the scripts
|
||||
_fSpeech[1].open("OBJ");
|
||||
_compressedSpeechData = -1;
|
||||
}
|
||||
|
||||
void ToucheEngine::res_closeDataFile() {
|
||||
_fData.close();
|
||||
_fSpeech[0].close();
|
||||
_fSpeech[1].close();
|
||||
}
|
||||
|
||||
void ToucheEngine::res_allocateTables() {
|
||||
_fData.seek(64);
|
||||
uint32 textDataOffs = _fData.readUint32LE();
|
||||
uint32 textDataSize = _fData.readUint32LE();
|
||||
_textData = (uint8 *)malloc(textDataSize);
|
||||
if (!_textData) {
|
||||
error("Unable to allocate memory for text data");
|
||||
}
|
||||
_fData.seek(textDataOffs);
|
||||
_fData.read(_textData, textDataSize);
|
||||
|
||||
_fData.seek(2);
|
||||
const int bw = _fData.readUint16LE();
|
||||
const int bh = _fData.readUint16LE();
|
||||
uint32 size = bw * bh;
|
||||
_backdropBuffer = (uint8 *)malloc(size);
|
||||
if (!_backdropBuffer) {
|
||||
error("Unable to allocate memory for backdrop buffer");
|
||||
}
|
||||
|
||||
_menuKitData = (uint8 *)malloc(5040);
|
||||
if (!_menuKitData) {
|
||||
error("Unable to allocate memory for menu kit data");
|
||||
}
|
||||
|
||||
_convKitData = (uint8 *)malloc(12160);
|
||||
if (!_convKitData) {
|
||||
error("Unable to allocate memory for conv kit data");
|
||||
}
|
||||
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
_sequenceDataTable[i] = (uint8 *)malloc(16384);
|
||||
if (!_sequenceDataTable[i]) {
|
||||
error("Unable to allocate memory for sequence data %d", i);
|
||||
}
|
||||
}
|
||||
|
||||
_programData = (uint8 *)malloc(61440);
|
||||
if (!_programData) {
|
||||
error("Unable to allocate memory for program data");
|
||||
}
|
||||
|
||||
_mouseData = (uint8 *)malloc(58 * 42);
|
||||
if (!_mouseData) {
|
||||
error("Unable to allocate memory for mouse data");
|
||||
}
|
||||
|
||||
_iconData = (uint8 *)malloc(58 * 42);
|
||||
if (!_iconData) {
|
||||
error("Unable to allocate memory for object data");
|
||||
}
|
||||
for (int i = 0; i < NUM_SPRITES; ++i) {
|
||||
_spritesTable[i].ptr = (uint8 *)malloc(_spritesTable[i].size);
|
||||
if (!_spritesTable[i].ptr) {
|
||||
error("Unable to allocate memory for sprite %d", i);
|
||||
}
|
||||
}
|
||||
|
||||
_offscreenBuffer = (uint8 *)malloc(640 * 400);
|
||||
if (!_offscreenBuffer) {
|
||||
error("Unable to allocate memory for offscreen buffer");
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::res_deallocateTables() {
|
||||
free(_textData);
|
||||
_textData = 0;
|
||||
|
||||
free(_backdropBuffer);
|
||||
_backdropBuffer = 0;
|
||||
|
||||
free(_menuKitData);
|
||||
_menuKitData = 0;
|
||||
|
||||
free(_convKitData);
|
||||
_convKitData = 0;
|
||||
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
free(_sequenceDataTable[i]);
|
||||
_sequenceDataTable[i] = 0;
|
||||
}
|
||||
|
||||
free(_programData);
|
||||
_programData = 0;
|
||||
|
||||
free(_mouseData);
|
||||
_mouseData = 0;
|
||||
|
||||
free(_iconData);
|
||||
_iconData = 0;
|
||||
|
||||
for (int i = 0; i < NUM_SPRITES; ++i) {
|
||||
free(_spritesTable[i].ptr);
|
||||
}
|
||||
|
||||
free(_offscreenBuffer);
|
||||
_offscreenBuffer = 0;
|
||||
}
|
||||
|
||||
uint32 ToucheEngine::res_getDataOffset(ResourceType type, int num, uint32 *size) {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_getDataOffset() type=%d num=%d", type, num);
|
||||
static const struct ResourceData {
|
||||
int offs;
|
||||
int count;
|
||||
int type;
|
||||
} dataTypesTable[] = {
|
||||
{ 0x048, 100, kResourceTypeRoomImage },
|
||||
{ 0x228, 30, kResourceTypeSequence },
|
||||
{ 0x2A0, 50, kResourceTypeSpriteImage },
|
||||
{ 0x390, 100, kResourceTypeIconImage },
|
||||
{ 0x6B0, 80, kResourceTypeRoomInfo },
|
||||
{ 0x908, 150, kResourceTypeProgram },
|
||||
{ 0xB60, 50, kResourceTypeMusic },
|
||||
{ 0xC28, 120, kResourceTypeSound }
|
||||
};
|
||||
|
||||
const ResourceData *rd = NULL;
|
||||
for (unsigned int i = 0; i < ARRAYSIZE(dataTypesTable); ++i) {
|
||||
rd = &dataTypesTable[i];
|
||||
if (rd->type == type) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (rd == NULL) {
|
||||
error("Invalid resource type %d", type);
|
||||
}
|
||||
if (num < 0 || num > rd->count) {
|
||||
error("Invalid resource number %d (type %d)", num, type);
|
||||
}
|
||||
_fData.seek(rd->offs + num * 4);
|
||||
uint32 offs = _fData.readUint32LE();
|
||||
assert(offs != 0);
|
||||
if (size) {
|
||||
uint32 nextOffs = _fData.readUint32LE();
|
||||
*size = nextOffs - offs;
|
||||
}
|
||||
return offs;
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadSpriteImage(int num, uint8 *dst) {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_loadSpriteImage() num=%d", num);
|
||||
const uint32 offs = res_getDataOffset(kResourceTypeSpriteImage, num);
|
||||
_fData.seek(offs);
|
||||
_currentImageWidth = _fData.readUint16LE();
|
||||
_currentImageHeight = _fData.readUint16LE();
|
||||
for (int i = 0; i < _currentImageHeight; ++i) {
|
||||
res_decodeScanLineImageRLE(dst + _currentImageWidth * i, _currentImageWidth);
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadProgram(int num) {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_loadProgram() num=%d", num);
|
||||
const uint32 offs = res_getDataOffset(kResourceTypeProgram, num, &_programDataSize);
|
||||
_fData.seek(offs);
|
||||
_fData.read(_programData, _programDataSize);
|
||||
}
|
||||
|
||||
void ToucheEngine::res_decodeProgramData() {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_decodeProgramData()");
|
||||
|
||||
uint8 *p;
|
||||
uint8 *programDataEnd = _programData + _programDataSize;
|
||||
|
||||
p = _programData + READ_LE_UINT32(_programData + 32);
|
||||
_script.init(p);
|
||||
|
||||
p = _programData + READ_LE_UINT32(_programData + 4);
|
||||
_programTextDataPtr = p;
|
||||
|
||||
_programRectsTable.clear();
|
||||
p = _programData + READ_LE_UINT32(_programData + 20);
|
||||
while (p < programDataEnd) {
|
||||
int16 x = READ_LE_UINT16(p); p += 2;
|
||||
int16 y = READ_LE_UINT16(p); p += 2;
|
||||
int16 w = READ_LE_UINT16(p); p += 2;
|
||||
int16 h = READ_LE_UINT16(p); p += 2;
|
||||
_programRectsTable.push_back(Common::Rect(x, y, x + w, y + h));
|
||||
if (x == -1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_programPointsTable.clear();
|
||||
p = _programData + READ_LE_UINT32(_programData + 24);
|
||||
while (p < programDataEnd) {
|
||||
ProgramPointData ppd;
|
||||
ppd.x = READ_LE_UINT16(p); p += 2;
|
||||
ppd.y = READ_LE_UINT16(p); p += 2;
|
||||
ppd.z = READ_LE_UINT16(p); p += 2;
|
||||
ppd.priority = READ_LE_UINT16(p); p += 2;
|
||||
_programPointsTable.push_back(ppd);
|
||||
if (ppd.x == -1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_programWalkTable.clear();
|
||||
p = _programData + READ_LE_UINT32(_programData + 28);
|
||||
while (p < programDataEnd) {
|
||||
ProgramWalkData pwd;
|
||||
pwd.point1 = READ_LE_UINT16(p); p += 2;
|
||||
if (pwd.point1 == -1) {
|
||||
break;
|
||||
}
|
||||
assert((uint16)pwd.point1 < _programPointsTable.size());
|
||||
pwd.point2 = READ_LE_UINT16(p); p += 2;
|
||||
assert((uint16)pwd.point2 < _programPointsTable.size());
|
||||
pwd.clippingRect = READ_LE_UINT16(p); p += 2;
|
||||
pwd.area1 = READ_LE_UINT16(p); p += 2;
|
||||
pwd.area2 = READ_LE_UINT16(p); p += 2;
|
||||
p += 12; // unused
|
||||
_programWalkTable.push_back(pwd);
|
||||
}
|
||||
|
||||
_programAreaTable.clear();
|
||||
p = _programData + READ_LE_UINT32(_programData + 8);
|
||||
while (p < programDataEnd) {
|
||||
ProgramAreaData pad;
|
||||
int16 x = READ_LE_UINT16(p); p += 2;
|
||||
if (x == -1) {
|
||||
break;
|
||||
}
|
||||
int16 y = READ_LE_UINT16(p); p += 2;
|
||||
int16 w = READ_LE_UINT16(p); p += 2;
|
||||
int16 h = READ_LE_UINT16(p); p += 2;
|
||||
pad.area.r = Common::Rect(x, y, x + w, y + h);
|
||||
pad.area.srcX = READ_LE_UINT16(p); p += 2;
|
||||
pad.area.srcY = READ_LE_UINT16(p); p += 2;
|
||||
pad.id = READ_LE_UINT16(p); p += 2;
|
||||
pad.state = READ_LE_UINT16(p); p += 2;
|
||||
pad.animCount = READ_LE_UINT16(p); p += 2;
|
||||
pad.animNext = READ_LE_UINT16(p); p += 2;
|
||||
_programAreaTable.push_back(pad);
|
||||
}
|
||||
|
||||
_programBackgroundTable.clear();
|
||||
p = _programData + READ_LE_UINT32(_programData + 12);
|
||||
while (p < programDataEnd) {
|
||||
ProgramBackgroundData pbd;
|
||||
int16 x = READ_LE_UINT16(p); p += 2;
|
||||
if (x == -1) {
|
||||
break;
|
||||
}
|
||||
int16 y = READ_LE_UINT16(p); p += 2;
|
||||
int16 w = READ_LE_UINT16(p); p += 2;
|
||||
int16 h = READ_LE_UINT16(p); p += 2;
|
||||
pbd.area.r = Common::Rect(x, y, x + w, y + h);
|
||||
pbd.area.srcX = READ_LE_UINT16(p); p += 2;
|
||||
pbd.area.srcY = READ_LE_UINT16(p); p += 2;
|
||||
pbd.type = READ_LE_UINT16(p); p += 2;
|
||||
pbd.offset = READ_LE_UINT16(p); p += 2;
|
||||
pbd.scaleMul = READ_LE_UINT16(p); p += 2;
|
||||
pbd.scaleDiv = READ_LE_UINT16(p); p += 2;
|
||||
_programBackgroundTable.push_back(pbd);
|
||||
}
|
||||
|
||||
_programHitBoxTable.clear();
|
||||
p = _programData + READ_LE_UINT32(_programData + 16);
|
||||
while (p < programDataEnd) {
|
||||
ProgramHitBoxData phbd;
|
||||
phbd.item = READ_LE_UINT16(p); p += 2;
|
||||
if (phbd.item == 0) {
|
||||
break;
|
||||
}
|
||||
phbd.talk = READ_LE_UINT16(p); p += 2;
|
||||
phbd.state = READ_LE_UINT16(p); p += 2;
|
||||
phbd.str = READ_LE_UINT16(p); p += 2;
|
||||
phbd.defaultStr = READ_LE_UINT16(p); p += 2;
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
phbd.actions[i] = READ_LE_UINT16(p); p += 2;;
|
||||
}
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
int16 x = READ_LE_UINT16(p); p += 2;
|
||||
int16 y = READ_LE_UINT16(p); p += 2;
|
||||
int16 w = READ_LE_UINT16(p); p += 2;
|
||||
int16 h = READ_LE_UINT16(p); p += 2;
|
||||
phbd.hitBoxes[i].left = x;
|
||||
phbd.hitBoxes[i].top = y;
|
||||
phbd.hitBoxes[i].right = x + w;
|
||||
phbd.hitBoxes[i].bottom = y + h;
|
||||
}
|
||||
p += 8; // unused
|
||||
_programHitBoxTable.push_back(phbd);
|
||||
}
|
||||
|
||||
_programActionScriptOffsetTable.clear();
|
||||
p = _programData + READ_LE_UINT32(_programData + 36);
|
||||
while (p < programDataEnd) {
|
||||
ProgramActionScriptOffsetData pasod;
|
||||
pasod.object1 = READ_LE_UINT16(p); p += 2;
|
||||
if (pasod.object1 == 0) {
|
||||
break;
|
||||
}
|
||||
pasod.action = READ_LE_UINT16(p); p += 2;
|
||||
pasod.object2 = READ_LE_UINT16(p); p += 2;
|
||||
pasod.offset = READ_LE_UINT16(p); p += 2;
|
||||
_programActionScriptOffsetTable.push_back(pasod);
|
||||
}
|
||||
|
||||
_programConversationTable.clear();
|
||||
int count = (READ_LE_UINT32(_programData + 44) - READ_LE_UINT32(_programData + 40)) / 6;
|
||||
assert(count >= 0);
|
||||
p = _programData + READ_LE_UINT32(_programData + 40);
|
||||
while (p < programDataEnd && count != 0) {
|
||||
ProgramConversationData pcd;
|
||||
pcd.num = READ_LE_UINT16(p); p += 2;
|
||||
pcd.offset = READ_LE_UINT16(p); p += 2;
|
||||
pcd.msg = READ_LE_UINT16(p); p += 2;
|
||||
_programConversationTable.push_back(pcd);
|
||||
--count;
|
||||
}
|
||||
|
||||
_programKeyCharScriptOffsetTable.clear();
|
||||
p = _programData + READ_LE_UINT32(_programData + 44);
|
||||
while (p < programDataEnd) {
|
||||
ProgramKeyCharScriptOffsetData pksod;
|
||||
pksod.keyChar = READ_LE_UINT16(p); p += 2;
|
||||
if (pksod.keyChar == 0) {
|
||||
break;
|
||||
}
|
||||
pksod.offset = READ_LE_UINT16(p); p += 2;
|
||||
_programKeyCharScriptOffsetTable.push_back(pksod);
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadRoom(int num) {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_loadRoom() num=%d flag115=%d", num, _flagsTable[115]);
|
||||
|
||||
_currentRoomNum = num;
|
||||
_updatedRoomAreasTable[0] = 1;
|
||||
|
||||
const uint32 offsInfo = res_getDataOffset(kResourceTypeRoomInfo, num);
|
||||
_fData.seek(offsInfo);
|
||||
_fData.readUint16LE();
|
||||
const int roomImageNum = _fData.readUint16LE();
|
||||
_fData.readUint16LE();
|
||||
for (int i = 0; i < 256; ++i) {
|
||||
_fData.read(&_paletteBuffer[i * 4], 3);
|
||||
_paletteBuffer[i * 4 + 3] = 0;
|
||||
}
|
||||
|
||||
const uint32 offsImage = res_getDataOffset(kResourceTypeRoomImage, roomImageNum);
|
||||
_fData.seek(offsImage);
|
||||
res_loadBackdrop();
|
||||
|
||||
if (_flagsTable[115] == 0) {
|
||||
updatePalette();
|
||||
}
|
||||
_fullRedrawCounter = 1;
|
||||
_roomNeedRedraw = true;
|
||||
|
||||
_sequenceEntryTable[5].sprNum = -1;
|
||||
_sequenceEntryTable[5].seqNum = -1;
|
||||
_sequenceEntryTable[6].sprNum = -1;
|
||||
_sequenceEntryTable[6].seqNum = -1;
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadSprite(int num, int index) {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_loadSprite() num=%d index=%d", num, index);
|
||||
assert(index >= 0 && index < NUM_SEQUENCES);
|
||||
_sequenceEntryTable[index].sprNum = num;
|
||||
SpriteData *spr = &_spritesTable[index];
|
||||
const uint32 offs = res_getDataOffset(kResourceTypeSpriteImage, num);
|
||||
_fData.seek(offs);
|
||||
_currentImageWidth = _fData.readUint16LE();
|
||||
_currentImageHeight = _fData.readUint16LE();
|
||||
for (int i = 0; i < _currentImageHeight; ++i) {
|
||||
res_decodeScanLineImageRLE(spr->ptr + _currentImageWidth * i, _currentImageWidth);
|
||||
}
|
||||
spr->bitmapWidth = _currentImageWidth;
|
||||
spr->bitmapHeight = _currentImageHeight;
|
||||
if (_flagsTable[268] == 0) {
|
||||
res_loadImageHelper(spr->ptr, _currentImageWidth, _currentImageHeight);
|
||||
}
|
||||
spr->w = _currentImageWidth;
|
||||
spr->h = _currentImageHeight;
|
||||
Graphics::copyRect(_offscreenBuffer, 640, 0, 0,
|
||||
_backdropBuffer, _currentImageWidth, _flagsTable[614], _flagsTable[615],
|
||||
640, 100);
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadSequence(int num, int index) {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_loadSequence() num=%d index=%d", num, index);
|
||||
assert(index < NUM_SEQUENCES);
|
||||
_sequenceEntryTable[index].seqNum = num;
|
||||
const uint32 offs = res_getDataOffset(kResourceTypeSequence, num);
|
||||
_fData.seek(offs);
|
||||
_fData.read(_sequenceDataTable[index], 16000);
|
||||
}
|
||||
|
||||
void ToucheEngine::res_decodeScanLineImageRLE(uint8 *dst, int lineWidth) {
|
||||
int w = 0;
|
||||
while (w < lineWidth) {
|
||||
uint8 code = _fData.readByte();
|
||||
if ((code & 0xC0) == 0xC0) {
|
||||
int len = code & 0x3F;
|
||||
uint8 color = _fData.readByte();
|
||||
memset(dst, color, len);
|
||||
dst += len;
|
||||
w += len;
|
||||
} else {
|
||||
*dst = code;
|
||||
++dst;
|
||||
++w;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadBackdrop() {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_loadBackdrop()");
|
||||
_currentBitmapWidth = _fData.readUint16LE();
|
||||
_currentBitmapHeight = _fData.readUint16LE();
|
||||
uint8 *dst = _backdropBuffer;
|
||||
for (int i = 0; i < _currentBitmapHeight; ++i) {
|
||||
res_decodeScanLineImageRLE(dst + _currentBitmapWidth * i, _currentBitmapWidth);
|
||||
}
|
||||
_roomWidth = _currentBitmapWidth;
|
||||
dst = _backdropBuffer;
|
||||
for (int i = 0; i < _currentBitmapWidth; ++i) {
|
||||
if (*dst == 255) {
|
||||
_roomWidth = i;
|
||||
*dst = 0;
|
||||
break;
|
||||
}
|
||||
++dst;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadImage(int num, uint8 *dst) {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_loadImage() num=%d", num);
|
||||
const uint32 offsInfo = res_getDataOffset(kResourceTypeIconImage, num);
|
||||
_fData.seek(offsInfo);
|
||||
_currentImageWidth = _fData.readUint16LE();
|
||||
_currentImageHeight = _fData.readUint16LE();
|
||||
for (int i = 0; i < _currentImageHeight; ++i) {
|
||||
res_decodeScanLineImageRLE(dst + _currentImageWidth * i, _currentImageWidth);
|
||||
}
|
||||
res_loadImageHelper(dst, _currentImageWidth, _currentImageHeight);
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadImageHelper(uint8 *imgData, int imgWidth, int imgHeight) {
|
||||
uint8 *p = imgData;
|
||||
for (_currentImageHeight = 0; _currentImageHeight < imgHeight; ++_currentImageHeight, p += imgWidth) {
|
||||
if (*p == 64 || *p == 255) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
p = imgData;
|
||||
for (_currentImageWidth = 0; _currentImageWidth < imgWidth; ++_currentImageWidth, ++p) {
|
||||
if (*p == 64 || *p == 255) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (_flagsTable[267] == 0) {
|
||||
for (int i = 0; i < imgWidth * imgHeight; ++i) {
|
||||
uint8 color = imgData[i];
|
||||
if (color != 0) {
|
||||
if (color < 64) {
|
||||
color += 192;
|
||||
} else {
|
||||
color = 0;
|
||||
}
|
||||
}
|
||||
imgData[i] = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadSound(int priority, int num) {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_loadSound() num=%d", num);
|
||||
if (priority >= _defaultSoundPriority) {
|
||||
uint32 size;
|
||||
const uint32 offs = res_getDataOffset(kResourceTypeSound, num, &size);
|
||||
_fData.seek(offs);
|
||||
Audio::AudioStream *stream = Audio::makeVOCStream(_fData);
|
||||
if (stream) {
|
||||
_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadMusic(int num) {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_loadMusic() num=%d", num);
|
||||
warning("UNIMPLEMENTED ToucheEngine::res_loadMusic() num=%d", num);
|
||||
uint32 size;
|
||||
const uint32 offs = res_getDataOffset(kResourceTypeMusic, num, &size);
|
||||
_fData.seek(offs);
|
||||
// XXX start MIDI data playback
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadSpeech(int num) {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_loadSpeech() num=%d", num);
|
||||
if (num == -1) {
|
||||
// XXX stop all sounds currently playing
|
||||
} else {
|
||||
if (_compressedSpeechData < 0) { // uncompressed speech data
|
||||
if (_fSpeech[0].isOpen()) {
|
||||
_fSpeech[0].close();
|
||||
}
|
||||
char filename[10];
|
||||
sprintf(filename, "V%d", num);
|
||||
_fSpeech[0].open(filename);
|
||||
}
|
||||
if (_fSpeech[0].isOpen()) {
|
||||
_flagsTable[617] = num;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::res_loadSpeechSegment(int num) {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_loadSpeechSegment() num=%d", num);
|
||||
if (_talkTextMode != kTalkModeTextOnly) {
|
||||
Audio::AudioStream *stream = 0;
|
||||
if (_compressedSpeechData < 0) { // uncompressed speech data
|
||||
int i = 0;
|
||||
if (num >= 750) {
|
||||
num -= 750;
|
||||
i = 1;
|
||||
}
|
||||
if (!_fSpeech[i].isOpen()) {
|
||||
return;
|
||||
}
|
||||
_fSpeech[i].seek(num * 8);
|
||||
uint32 offs = _fSpeech[i].readUint32LE();
|
||||
uint32 size = _fSpeech[i].readUint32LE();
|
||||
if (size == 0) {
|
||||
return;
|
||||
}
|
||||
_fSpeech[i].seek(offs);
|
||||
stream = Audio::makeVOCStream(_fSpeech[i]);
|
||||
} else {
|
||||
if (num >= 750) {
|
||||
num -= 750;
|
||||
_fSpeech[0].seek(kSpeechDataFileHeaderSize);
|
||||
} else {
|
||||
assert(_flagsTable[617] > 0 && _flagsTable[617] < 140);
|
||||
_fSpeech[0].seek(kSpeechDataFileHeaderSize + _flagsTable[617] * 4);
|
||||
}
|
||||
uint32 dataOffs = _fSpeech[0].readUint32LE();
|
||||
if (dataOffs == 0) {
|
||||
return;
|
||||
}
|
||||
_fSpeech[0].seek(dataOffs + num * 8);
|
||||
uint32 offs = _fSpeech[0].readUint32LE();
|
||||
uint32 size = _fSpeech[0].readUint32LE();
|
||||
if (size == 0) {
|
||||
return;
|
||||
}
|
||||
_fSpeech[0].seek(offs);
|
||||
stream = (compressedSpeechFilesTable[_compressedSpeechData].makeStream)(&_fSpeech[0], size);
|
||||
}
|
||||
if (stream) {
|
||||
_speechPlaying = true;
|
||||
_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::res_stopSpeech() {
|
||||
debugC(9, kDebugResource, "ToucheEngine::res_stopSpeech()");
|
||||
_mixer->stopHandle(_speechHandle);
|
||||
_speechPlaying = false;
|
||||
_defaultSoundPriority = 0;
|
||||
}
|
||||
|
||||
} // namespace Touche
|
418
engines/touche/saveload.cpp
Normal file
418
engines/touche/saveload.cpp
Normal file
@ -0,0 +1,418 @@
|
||||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2006 The ScummVM project
|
||||
*
|
||||
* 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 "common/stdafx.h"
|
||||
#include "common/savefile.h"
|
||||
|
||||
#include "touche/graphics.h"
|
||||
#include "touche/touche.h"
|
||||
|
||||
namespace Touche {
|
||||
|
||||
enum {
|
||||
kCurrentGameStateVersion = 5,
|
||||
kGameStateDescriptionLen = 32
|
||||
};
|
||||
|
||||
template <class S, class T>
|
||||
static void saveOrLoad(S &s, T &t);
|
||||
|
||||
template <>
|
||||
static void saveOrLoad(Common::WriteStream &stream, uint16 &i) {
|
||||
stream.writeUint16LE(i);
|
||||
}
|
||||
|
||||
template <>
|
||||
static void saveOrLoad(Common::ReadStream &stream, uint16 &i) {
|
||||
i = stream.readUint16LE();
|
||||
}
|
||||
|
||||
template <>
|
||||
static void saveOrLoad(Common::WriteStream &stream, int16 &i) {
|
||||
stream.writeSint16LE(i);
|
||||
}
|
||||
|
||||
template <>
|
||||
static void saveOrLoad(Common::ReadStream &stream, int16 &i) {
|
||||
i = stream.readSint16LE();
|
||||
}
|
||||
|
||||
template <class S, class T>
|
||||
static void saveOrLoadPtr(S &s, T *&t, T *base);
|
||||
|
||||
template <>
|
||||
static void saveOrLoadPtr(Common::WriteStream &stream, int16 *&p, int16 *base) {
|
||||
int32 offset = (int32)(p - base);
|
||||
stream.writeSint32LE(offset);
|
||||
}
|
||||
|
||||
template <>
|
||||
static void saveOrLoadPtr(Common::ReadStream &stream, int16 *&p, int16 *base) {
|
||||
int32 offset = stream.readSint32LE();
|
||||
p = base + offset;
|
||||
}
|
||||
|
||||
template <class S>
|
||||
static void saveOrLoad(S &s, Common::Rect &r) {
|
||||
saveOrLoad(s, r.left);
|
||||
saveOrLoad(s, r.top);
|
||||
saveOrLoad(s, r.right);
|
||||
saveOrLoad(s, r.bottom);
|
||||
}
|
||||
|
||||
template <class S>
|
||||
static void saveOrLoad(S &s, SequenceEntry &seq) {
|
||||
saveOrLoad(s, seq.sprNum);
|
||||
saveOrLoad(s, seq.seqNum);
|
||||
}
|
||||
|
||||
template <class S>
|
||||
static void saveOrLoad(S &s, KeyChar &key) {
|
||||
saveOrLoad(s, key.num);
|
||||
saveOrLoad(s, key.flags);
|
||||
saveOrLoad(s, key.currentAnimCounter);
|
||||
saveOrLoad(s, key.strNum);
|
||||
saveOrLoad(s, key.walkDataNum);
|
||||
saveOrLoad(s, key.spriteNum);
|
||||
saveOrLoad(s, key.prevBoundingRect);
|
||||
saveOrLoad(s, key.boundingRect);
|
||||
saveOrLoad(s, key.xPos);
|
||||
saveOrLoad(s, key.yPos);
|
||||
saveOrLoad(s, key.zPos);
|
||||
saveOrLoad(s, key.xPosPrev);
|
||||
saveOrLoad(s, key.yPosPrev);
|
||||
saveOrLoad(s, key.zPosPrev);
|
||||
saveOrLoad(s, key.prevWalkDataNum);
|
||||
saveOrLoad(s, key.textColor);
|
||||
for (uint i = 0; i < 4; ++i) {
|
||||
saveOrLoad(s, key.inventoryItems[i]);
|
||||
}
|
||||
saveOrLoad(s, key.money);
|
||||
saveOrLoad(s, key.pointsDataNum);
|
||||
saveOrLoad(s, key.currentWalkBox);
|
||||
saveOrLoad(s, key.prevPointsDataNum);
|
||||
saveOrLoad(s, key.currentAnim);
|
||||
saveOrLoad(s, key.facingDirection);
|
||||
saveOrLoad(s, key.currentAnimSpeed);
|
||||
for (uint i = 0; i < 16; ++i) {
|
||||
saveOrLoad(s, key.framesList[i]);
|
||||
}
|
||||
saveOrLoad(s, key.framesListCount);
|
||||
saveOrLoad(s, key.currentFrame);
|
||||
saveOrLoad(s, key.anim1Start);
|
||||
saveOrLoad(s, key.anim1Count);
|
||||
saveOrLoad(s, key.anim2Start);
|
||||
saveOrLoad(s, key.anim2Count);
|
||||
saveOrLoad(s, key.anim3Start);
|
||||
saveOrLoad(s, key.anim3Count);
|
||||
saveOrLoad(s, key.followingKeyCharNum);
|
||||
saveOrLoad(s, key.followingKeyCharPos);
|
||||
saveOrLoad(s, key.sequenceDataIndex);
|
||||
saveOrLoad(s, key.sequenceDataOffset);
|
||||
saveOrLoad(s, key.walkPointsListCount);
|
||||
for (uint i = 0; i < 40; ++i) {
|
||||
saveOrLoad(s, key.walkPointsList[i]);
|
||||
}
|
||||
saveOrLoad(s, key.scriptDataStartOffset);
|
||||
saveOrLoad(s, key.scriptDataOffset);
|
||||
saveOrLoadPtr(s, key.scriptStackPtr, &key.scriptStackTable[39]);
|
||||
saveOrLoad(s, key.delay);
|
||||
saveOrLoad(s, key.waitingKeyChar);
|
||||
for (uint i = 0; i < 3; ++i) {
|
||||
saveOrLoad(s, key.waitingKeyCharPosTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < 40; ++i) {
|
||||
saveOrLoad(s, key.scriptStackTable[i]);
|
||||
}
|
||||
}
|
||||
|
||||
template <class S>
|
||||
static void saveOrLoad(S &s, TalkEntry &entry) {
|
||||
saveOrLoad(s, entry.otherKeyChar);
|
||||
saveOrLoad(s, entry.talkingKeyChar);
|
||||
saveOrLoad(s, entry.num);
|
||||
}
|
||||
|
||||
template <class S>
|
||||
static void saveOrLoad(S &s, ProgramHitBoxData &data) {
|
||||
saveOrLoad(s, data.item);
|
||||
saveOrLoad(s, data.talk);
|
||||
saveOrLoad(s, data.state);
|
||||
saveOrLoad(s, data.str);
|
||||
saveOrLoad(s, data.defaultStr);
|
||||
for (uint i = 0; i < 8; ++i) {
|
||||
saveOrLoad(s, data.actions[i]);
|
||||
}
|
||||
for (uint i = 0; i < 2; ++i) {
|
||||
saveOrLoad(s, data.hitBoxes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
template <class S>
|
||||
static void saveOrLoad(S &s, Area &area) {
|
||||
saveOrLoad(s, area.r);
|
||||
saveOrLoad(s, area.srcX);
|
||||
saveOrLoad(s, area.srcY);
|
||||
}
|
||||
|
||||
template <class S>
|
||||
static void saveOrLoad(S &s, ProgramBackgroundData &data) {
|
||||
saveOrLoad(s, data.area);
|
||||
saveOrLoad(s, data.type);
|
||||
saveOrLoad(s, data.offset);
|
||||
saveOrLoad(s, data.scaleMul);
|
||||
saveOrLoad(s, data.scaleDiv);
|
||||
}
|
||||
|
||||
template <class S>
|
||||
static void saveOrLoad(S &s, ProgramAreaData &data) {
|
||||
saveOrLoad(s, data.area);
|
||||
saveOrLoad(s, data.id);
|
||||
saveOrLoad(s, data.state);
|
||||
saveOrLoad(s, data.animCount);
|
||||
saveOrLoad(s, data.animNext);
|
||||
}
|
||||
|
||||
template <class S>
|
||||
static void saveOrLoad(S &s, ProgramWalkData &data) {
|
||||
saveOrLoad(s, data.point1);
|
||||
saveOrLoad(s, data.point2);
|
||||
saveOrLoad(s, data.clippingRect);
|
||||
saveOrLoad(s, data.area1);
|
||||
saveOrLoad(s, data.area2);
|
||||
}
|
||||
|
||||
template <class S>
|
||||
static void saveOrLoad(S &s, ProgramPointData &data) {
|
||||
saveOrLoad(s, data.x);
|
||||
saveOrLoad(s, data.y);
|
||||
saveOrLoad(s, data.z);
|
||||
saveOrLoad(s, data.priority);
|
||||
}
|
||||
|
||||
void ToucheEngine::saveGameStateData(Common::WriteStream *stream) {
|
||||
setKeyCharMoney();
|
||||
stream->writeUint16LE(_currentEpisodeNum);
|
||||
stream->writeUint16LE(_currentMusicNum);
|
||||
stream->writeUint16LE(_currentRoomNum);
|
||||
stream->writeUint16LE(_flagsTable[614]);
|
||||
stream->writeUint16LE(_flagsTable[615]);
|
||||
stream->writeUint16LE(_disabledInputCounter);
|
||||
for (uint i = 0; i < _programHitBoxTable.size(); ++i) {
|
||||
saveOrLoad(*stream, _programHitBoxTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < _programBackgroundTable.size(); ++i) {
|
||||
saveOrLoad(*stream, _programBackgroundTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < _programAreaTable.size(); ++i) {
|
||||
saveOrLoad(*stream, _programAreaTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < _programWalkTable.size(); ++i) {
|
||||
saveOrLoad(*stream, _programWalkTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < _programPointsTable.size(); ++i) {
|
||||
saveOrLoad(*stream, _programPointsTable[i]);
|
||||
}
|
||||
stream->write(_updatedRoomAreasTable, 200);
|
||||
for (uint i = 0; i < 6; ++i) {
|
||||
saveOrLoad(*stream, _sequenceEntryTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < 1024; ++i) {
|
||||
saveOrLoad(*stream, _flagsTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < 100; ++i) {
|
||||
saveOrLoad(*stream, _inventoryList1[i]);
|
||||
}
|
||||
for (uint i = 0; i < 100; ++i) {
|
||||
saveOrLoad(*stream, _inventoryList2[i]);
|
||||
}
|
||||
for (uint i = 0; i < 6; ++i) {
|
||||
saveOrLoad(*stream, _inventoryList3[i]);
|
||||
}
|
||||
for (uint i = 0; i < NUM_KEYCHARS; ++i) {
|
||||
saveOrLoad(*stream, _keyCharsTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < NUM_INVENTORY_ITEMS; ++i) {
|
||||
saveOrLoad(*stream, _inventoryItemsInfoTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < NUM_TALK_ENTRIES; ++i) {
|
||||
saveOrLoad(*stream, _talkTable[i]);
|
||||
}
|
||||
stream->writeUint16LE(_talkListEnd);
|
||||
stream->writeUint16LE(_talkListCurrent);
|
||||
}
|
||||
|
||||
void ToucheEngine::loadGameStateData(Common::ReadStream *stream) {
|
||||
setKeyCharMoney();
|
||||
clearDirtyRects();
|
||||
clearAreaTable();
|
||||
_flagsTable[115] = 0;
|
||||
clearRoomArea();
|
||||
int16 room_offs_x, room_offs_y;
|
||||
_currentEpisodeNum = stream->readUint16LE();
|
||||
_currentMusicNum = stream->readUint16LE();
|
||||
_currentRoomNum = stream->readUint16LE();
|
||||
res_loadRoom(_currentRoomNum);
|
||||
room_offs_x = stream->readUint16LE();
|
||||
room_offs_y = stream->readUint16LE();
|
||||
_disabledInputCounter = stream->readUint16LE();
|
||||
res_loadProgram(_currentEpisodeNum);
|
||||
setupEpisode(-1);
|
||||
for (uint i = 0; i < _programHitBoxTable.size(); ++i) {
|
||||
saveOrLoad(*stream, _programHitBoxTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < _programBackgroundTable.size(); ++i) {
|
||||
saveOrLoad(*stream, _programBackgroundTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < _programAreaTable.size(); ++i) {
|
||||
saveOrLoad(*stream, _programAreaTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < _programWalkTable.size(); ++i) {
|
||||
saveOrLoad(*stream, _programWalkTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < _programPointsTable.size(); ++i) {
|
||||
saveOrLoad(*stream, _programPointsTable[i]);
|
||||
}
|
||||
stream->read(_updatedRoomAreasTable, 200);
|
||||
for (uint i = 1; i <= _updatedRoomAreasTable[0]; ++i) {
|
||||
updateRoomAreas(_updatedRoomAreasTable[i], -1);
|
||||
}
|
||||
for (uint i = 0; i < 6; ++i) {
|
||||
saveOrLoad(*stream, _sequenceEntryTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < 1024; ++i) {
|
||||
saveOrLoad(*stream, _flagsTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < 100; ++i) {
|
||||
saveOrLoad(*stream, _inventoryList1[i]);
|
||||
}
|
||||
for (uint i = 0; i < 100; ++i) {
|
||||
saveOrLoad(*stream, _inventoryList2[i]);
|
||||
}
|
||||
for (uint i = 0; i < 6; ++i) {
|
||||
saveOrLoad(*stream, _inventoryList3[i]);
|
||||
}
|
||||
for (uint i = 0; i < NUM_KEYCHARS; ++i) {
|
||||
saveOrLoad(*stream, _keyCharsTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < NUM_INVENTORY_ITEMS; ++i) {
|
||||
saveOrLoad(*stream, _inventoryItemsInfoTable[i]);
|
||||
}
|
||||
for (uint i = 0; i < NUM_TALK_ENTRIES; ++i) {
|
||||
saveOrLoad(*stream, _talkTable[i]);
|
||||
}
|
||||
_talkListEnd = stream->readUint16LE();
|
||||
_talkListCurrent = stream->readUint16LE();
|
||||
_flagsTable[614] = room_offs_x;
|
||||
_flagsTable[615] = room_offs_y;
|
||||
for (uint i = 0; i < 6; ++i) {
|
||||
if (_sequenceEntryTable[i].seqNum != -1) {
|
||||
res_loadSequence(_sequenceEntryTable[i].seqNum, i);
|
||||
}
|
||||
if (_sequenceEntryTable[i].sprNum != -1) {
|
||||
res_loadSprite(_sequenceEntryTable[i].sprNum, i);
|
||||
}
|
||||
}
|
||||
_currentKeyCharNum = _flagsTable[104];
|
||||
_inventoryListCount[0] = 0;
|
||||
_inventoryListCount[3] = 0;
|
||||
_inventoryListCount[6] = 0;
|
||||
drawInventory(_currentKeyCharNum, 1);
|
||||
Graphics::copyRect(_offscreenBuffer, 640, 0, 0, _backdropBuffer, _currentBitmapWidth, _flagsTable[614], _flagsTable[615], 640, 352);
|
||||
updateEntireScreen();
|
||||
if (_flagsTable[617] != 0) {
|
||||
res_loadSpeech(_flagsTable[617]);
|
||||
}
|
||||
}
|
||||
|
||||
bool ToucheEngine::saveGameState(int num, const char *description) {
|
||||
bool saveOk = false;
|
||||
char gameStateFileName[16];
|
||||
generateGameStateFileName(num, gameStateFileName, 15);
|
||||
Common::OutSaveFile *f = _saveFileMan->openForSaving(gameStateFileName);
|
||||
if (f) {
|
||||
f->writeUint16LE(kCurrentGameStateVersion);
|
||||
f->writeUint16LE(0);
|
||||
char headerDescription[kGameStateDescriptionLen];
|
||||
memset(headerDescription, 0, kGameStateDescriptionLen);
|
||||
strncpy(headerDescription, description, kGameStateDescriptionLen - 1);
|
||||
f->write(headerDescription, kGameStateDescriptionLen);
|
||||
saveGameStateData(f);
|
||||
f->flush();
|
||||
if (!f->ioFailed()) {
|
||||
saveOk = true;
|
||||
} else {
|
||||
warning("Can't write file '%s'", gameStateFileName);
|
||||
}
|
||||
delete f;
|
||||
}
|
||||
return saveOk;
|
||||
}
|
||||
|
||||
bool ToucheEngine::loadGameState(int num, const char *description) {
|
||||
bool loadOk = false;
|
||||
char gameStateFileName[16];
|
||||
generateGameStateFileName(num, gameStateFileName, 15);
|
||||
Common::InSaveFile *f = _saveFileMan->openForLoading(gameStateFileName);
|
||||
if (f) {
|
||||
uint16 version = f->readUint16LE();
|
||||
if (version < kCurrentGameStateVersion) {
|
||||
warning("Unsupported gamestate version %d\n", version);
|
||||
} else {
|
||||
f->skip(2 + kGameStateDescriptionLen);
|
||||
loadGameStateData(f);
|
||||
if (!f->ioFailed()) {
|
||||
loadOk = true;
|
||||
} else {
|
||||
warning("Can't read file '%s'", gameStateFileName);
|
||||
}
|
||||
}
|
||||
delete f;
|
||||
}
|
||||
return loadOk;
|
||||
}
|
||||
|
||||
void ToucheEngine::readGameStateDescription(int num, char *description, int len) {
|
||||
char gameStateFileName[16];
|
||||
generateGameStateFileName(num, gameStateFileName, 15);
|
||||
Common::InSaveFile *f = _saveFileMan->openForLoading(gameStateFileName);
|
||||
if (f) {
|
||||
uint16 version = f->readUint16LE();
|
||||
if (version >= kCurrentGameStateVersion) {
|
||||
f->readUint16LE();
|
||||
f->read(description, MIN<int>(len, kGameStateDescriptionLen));
|
||||
description[len] = 0;
|
||||
}
|
||||
delete f;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::generateGameStateFileName(int num, char *dst, int len, bool prefixOnly) const {
|
||||
if (prefixOnly) {
|
||||
snprintf(dst, len, "%s.", _targetName.c_str());
|
||||
} else {
|
||||
snprintf(dst, len, "%s.%d", _targetName.c_str(), num);
|
||||
}
|
||||
dst[len] = 0;
|
||||
}
|
||||
|
||||
} // namespace Touche
|
659
engines/touche/staticres.cpp
Normal file
659
engines/touche/staticres.cpp
Normal file
@ -0,0 +1,659 @@
|
||||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2006 The ScummVM project
|
||||
*
|
||||
* 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 "common/stdafx.h"
|
||||
|
||||
#include "touche/graphics.h"
|
||||
#include "touche/touche.h"
|
||||
|
||||
namespace Touche {
|
||||
|
||||
ToucheEngine::OpcodeProc ToucheEngine::_opcodesTable[NUM_OPCODES] = {
|
||||
/* 0x00 */
|
||||
&ToucheEngine::op_nop,
|
||||
&ToucheEngine::op_jnz,
|
||||
&ToucheEngine::op_jz,
|
||||
&ToucheEngine::op_jmp,
|
||||
/* 0x04 */
|
||||
&ToucheEngine::op_true,
|
||||
&ToucheEngine::op_false,
|
||||
&ToucheEngine::op_push,
|
||||
&ToucheEngine::op_testFalse,
|
||||
/* 0x08 */
|
||||
&ToucheEngine::op_add,
|
||||
&ToucheEngine::op_sub,
|
||||
&ToucheEngine::op_mul,
|
||||
&ToucheEngine::op_div,
|
||||
/* 0x0C */
|
||||
&ToucheEngine::op_mod,
|
||||
&ToucheEngine::op_and,
|
||||
&ToucheEngine::op_or,
|
||||
&ToucheEngine::op_not,
|
||||
/* 0x10 */
|
||||
&ToucheEngine::op_testGreater,
|
||||
&ToucheEngine::op_testEquals,
|
||||
&ToucheEngine::op_testLower,
|
||||
&ToucheEngine::op_fetchScriptWord,
|
||||
/* 0x14 */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
/* 0x18 */
|
||||
&ToucheEngine::op_testGreaterOrEquals,
|
||||
&ToucheEngine::op_testLowerOrEquals,
|
||||
&ToucheEngine::op_testNotEquals,
|
||||
&ToucheEngine::op_endConversation,
|
||||
/* 0x1C */
|
||||
&ToucheEngine::op_stopScript,
|
||||
&ToucheEngine::op_getFlag,
|
||||
&ToucheEngine::op_setFlag,
|
||||
0,
|
||||
/* 0x20 */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&ToucheEngine::op_fetchScriptByte,
|
||||
/* 0x24 */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
/* 0x28 */
|
||||
&ToucheEngine::op_getScriptValue,
|
||||
&ToucheEngine::op_setScriptValue,
|
||||
0,
|
||||
0,
|
||||
/* 0x2C */
|
||||
0,
|
||||
0,
|
||||
&ToucheEngine::op_getKeyCharWalkBox,
|
||||
&ToucheEngine::op_startSound,
|
||||
/* 0x30 */
|
||||
&ToucheEngine::op_initKeyCharTalk,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
/* 0x34 */
|
||||
&ToucheEngine::op_loadRoom,
|
||||
&ToucheEngine::op_updateRoom,
|
||||
&ToucheEngine::op_startTalk,
|
||||
&ToucheEngine::op_setKeyCharBox,
|
||||
/* 0x38 */
|
||||
&ToucheEngine::op_initKeyCharScript,
|
||||
&ToucheEngine::op_loadSprite,
|
||||
&ToucheEngine::op_loadSequence,
|
||||
&ToucheEngine::op_setKeyCharFrame,
|
||||
/* 0x3C */
|
||||
&ToucheEngine::op_setKeyCharDirection,
|
||||
&ToucheEngine::op_clearConversationChoices,
|
||||
&ToucheEngine::op_addConversationChoice,
|
||||
&ToucheEngine::op_removeConversationChoice,
|
||||
/* 0x40 */
|
||||
&ToucheEngine::op_getInventoryItem,
|
||||
&ToucheEngine::op_setInventoryItem,
|
||||
&ToucheEngine::op_startEpisode,
|
||||
&ToucheEngine::op_setConversationNum,
|
||||
/* 0x44 */
|
||||
&ToucheEngine::op_enableInventoryItem,
|
||||
&ToucheEngine::op_enableInput,
|
||||
&ToucheEngine::op_disableInput,
|
||||
&ToucheEngine::op_faceKeyChar,
|
||||
/* 0x48 */
|
||||
&ToucheEngine::op_getKeyCharCurrentAnim,
|
||||
&ToucheEngine::op_getCurrentKeyChar,
|
||||
&ToucheEngine::op_isKeyCharActive,
|
||||
&ToucheEngine::op_setPalette,
|
||||
/* 0x4C */
|
||||
&ToucheEngine::op_changeWalkPath,
|
||||
&ToucheEngine::op_lockWalkPath,
|
||||
&ToucheEngine::op_initializeKeyChar,
|
||||
&ToucheEngine::op_setupWaitingKeyChars,
|
||||
/* 0x50 */
|
||||
&ToucheEngine::op_updateRoomAreas,
|
||||
&ToucheEngine::op_unlockWalkPath,
|
||||
0,
|
||||
&ToucheEngine::op_addItemToInventoryAndRedraw,
|
||||
/* 0x54 */
|
||||
&ToucheEngine::op_giveItemTo,
|
||||
&ToucheEngine::op_resetHitBoxes,
|
||||
&ToucheEngine::op_fadePalette,
|
||||
0,
|
||||
/* 0x58 */
|
||||
&ToucheEngine::op_disableInventoryItem,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
/* 0x5C */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
/* 0x60 */
|
||||
0,
|
||||
&ToucheEngine::op_getInventoryItemFlags,
|
||||
&ToucheEngine::op_drawInventory,
|
||||
&ToucheEngine::op_stopKeyCharScript,
|
||||
/* 0x64 */
|
||||
&ToucheEngine::op_restartKeyCharScript,
|
||||
&ToucheEngine::op_getKeyCharCurrentWalkBox,
|
||||
&ToucheEngine::op_getKeyCharPointsDataNum,
|
||||
&ToucheEngine::op_setupFollowingKeyChar,
|
||||
/* 0x68 */
|
||||
&ToucheEngine::op_startAnimation,
|
||||
&ToucheEngine::op_setKeyCharTextColor,
|
||||
0,
|
||||
0,
|
||||
/* 0x6C */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
/* 0x70 */
|
||||
&ToucheEngine::op_startMusic,
|
||||
0,
|
||||
0,
|
||||
&ToucheEngine::op_copyPaletteColor,
|
||||
/* 0x74 */
|
||||
&ToucheEngine::op_delay,
|
||||
&ToucheEngine::op_lockHitBox,
|
||||
&ToucheEngine::op_removeItemFromInventory,
|
||||
&ToucheEngine::op_unlockHitBox,
|
||||
/* 0x78 */
|
||||
&ToucheEngine::op_addRoomArea,
|
||||
&ToucheEngine::op_setKeyCharFlags,
|
||||
0,
|
||||
0,
|
||||
/* 0x7C */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
/* 0x80 */
|
||||
&ToucheEngine::op_unsetKeyCharFlags,
|
||||
&ToucheEngine::op_drawSpriteOnBackdrop,
|
||||
&ToucheEngine::op_loadVoice,
|
||||
0,
|
||||
/* 0x84 */
|
||||
&ToucheEngine::op_startPaletteFadeIn,
|
||||
&ToucheEngine::op_startPaletteFadeOut,
|
||||
&ToucheEngine::op_setRoomAreaState
|
||||
};
|
||||
|
||||
SpriteData ToucheEngine::_spritesTable[NUM_SPRITES] = {
|
||||
{ 0x34BC0, 0,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||
char ToucheEngine::_saveLoadDescriptionsTable[10][33] = {
|
||||
"[Empty.1.......................]",
|
||||
"[Empty.2.......................]",
|
||||
"[Empty.3.......................]",
|
||||
"[Empty.4.......................]",
|
||||
"[Empty.5.......................]",
|
||||
"[Empty.6.......................]",
|
||||
"[Empty.7.......................]",
|
||||
"[Empty.8.......................]",
|
||||
"[Empty.9.......................]"
|
||||
};
|
||||
|
||||
const Common::Rect ToucheEngine::_inventoryAreasTable[13] = {
|
||||
Common::Rect( 0, 354, 50, 400),
|
||||
Common::Rect( 66, 354, 124, 380),
|
||||
Common::Rect( 74, 380, 116, 398),
|
||||
Common::Rect(116, 380, 158, 398),
|
||||
Common::Rect(144, 354, 198, 380),
|
||||
Common::Rect(202, 354, 238, 396),
|
||||
Common::Rect(242, 354, 300, 396),
|
||||
Common::Rect(300, 354, 358, 396),
|
||||
Common::Rect(358, 354, 416, 396),
|
||||
Common::Rect(416, 354, 474, 396),
|
||||
Common::Rect(474, 354, 532, 396),
|
||||
Common::Rect(532, 354, 590, 396),
|
||||
Common::Rect(594, 354, 640, 395)
|
||||
};
|
||||
|
||||
const uint16 Graphics::_fontOffs[] = {
|
||||
0x0000, 0x0007, 0x0024, 0x0043, 0x0072, 0x00AD, 0x00E0, 0x0113, 0x0124, 0x0141,
|
||||
0x015E, 0x0191, 0x01C4, 0x01E3, 0x01F8, 0x0215, 0x0232, 0x0269, 0x0286, 0x02BD,
|
||||
0x02F4, 0x032B, 0x0362, 0x0399, 0x03D0, 0x0407, 0x043E, 0x045B, 0x047C, 0x0495,
|
||||
0x04C0, 0x04D9, 0x0510, 0x054B, 0x0582, 0x05B9, 0x05F0, 0x0627, 0x065E, 0x0695,
|
||||
0x06CC, 0x0703, 0x0720, 0x0757, 0x078E, 0x07C5, 0x07FC, 0x0833, 0x086A, 0x08A1,
|
||||
0x08D8, 0x090F, 0x0946, 0x097D, 0x09B4, 0x09EB, 0x0A3C, 0x0A73, 0x0AAA, 0x0AE1,
|
||||
0x0B00, 0x0B1D, 0x0B3C, 0x0B77, 0x0BAA, 0x0BBB, 0x0BF2, 0x0C29, 0x0C60, 0x0C97,
|
||||
0x0CCE, 0x0CEB, 0x0D2E, 0x0D65, 0x0D82, 0x0DA5, 0x0DDC, 0x0DF9, 0x0E30, 0x0E67,
|
||||
0x0E9E, 0x0EE1, 0x0F24, 0x0F41, 0x0F78, 0x0F95, 0x0FCC, 0x1003, 0x103A, 0x1071,
|
||||
0x10B4, 0x10EB, 0x110A, 0x112B, 0x114A, 0x116D, 0x1178, 0x11BB, 0x11F2, 0x1229,
|
||||
0x1260, 0x1297, 0x12CE, 0x1305, 0x1348, 0x137F, 0x13B6, 0x13ED, 0x1424, 0x1441,
|
||||
0x145E, 0x149D, 0x14A8, 0x14B3, 0x14EA, 0x14F5, 0x152C, 0x1563, 0x159A, 0x15D1,
|
||||
0x1608, 0x1613, 0x161E, 0x1629, 0x1634, 0x163F, 0x164A, 0x1655, 0x1660, 0x1697,
|
||||
0x16B4, 0x16EB, 0x1722, 0x1759, 0x1764, 0x176F, 0x177A, 0x17B1, 0x17BC, 0x17C7,
|
||||
0x17D2, 0x17DD
|
||||
};
|
||||
|
||||
const uint8 Graphics::_fontData[] = {
|
||||
0x01, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0D, 0x05, 0x3C, 0x03, 0xD7, 0x0D, 0xD7, 0xCD,
|
||||
0xD7, 0xCD, 0xD7, 0xCD, 0xD7, 0xC3, 0xD7, 0xC0, 0xD7, 0xC0, 0x3F, 0xC0, 0xD7, 0x00, 0xD7, 0xC0,
|
||||
0x3F, 0xC0, 0x0F, 0x00, 0x02, 0x07, 0x09, 0x3C, 0x3C, 0x00, 0x0C, 0xD7, 0xD7, 0x00, 0x37, 0xD7,
|
||||
0xD7, 0xC0, 0xF7, 0xD7, 0xD7, 0xC3, 0x55, 0xD7, 0xD7, 0xC0, 0xDF, 0x3F, 0xFF, 0xC3, 0xDF, 0x0F,
|
||||
0x0F, 0x0D, 0x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0x70, 0x00, 0xD7, 0xDF, 0xDC, 0x00, 0xD7, 0xDF, 0xFF, 0xC0, 0xFF, 0x35, 0x7D, 0x70, 0x3F, 0xDF,
|
||||
0xF7, 0xFC, 0x00, 0xDF, 0xDF, 0xF0, 0x00, 0x35, 0x7F, 0x00, 0x00, 0x0F, 0xFC, 0x00, 0x00, 0x03,
|
||||
0xF0, 0x00, 0x00, 0x01, 0x07, 0x05, 0x3C, 0x00, 0xD7, 0x00, 0xD7, 0xC3, 0xD7, 0xC3, 0xD7, 0xCD,
|
||||
0xFF, 0xCD, 0x3F, 0x0D, 0x01, 0x0D, 0x06, 0x03, 0x00, 0x0D, 0xC3, 0x37, 0xF0, 0x37, 0xC0, 0xDF,
|
||||
0xC0, 0xDF, 0x00, 0xDF, 0x00, 0xDF, 0x00, 0x37, 0x00, 0x37, 0xC0, 0x0D, 0xC3, 0x03, 0xF0, 0x00,
|
||||
0xC0, 0x01, 0x0D, 0x06, 0x30, 0x00, 0xDC, 0x00, 0x37, 0x00, 0x37, 0xC0, 0x0D, 0xC0, 0x0D, 0xF0,
|
||||
0x0D, 0xF3, 0x0D, 0xF0, 0x37, 0xF0, 0x37, 0xC0, 0xDF, 0xC0, 0x3F, 0x00, 0x0C, 0x00, 0x02, 0x0C,
|
||||
0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x03, 0x0F, 0x7C, 0x00,
|
||||
0x0D, 0x37, 0x77, 0x00, 0x0D, 0x3D, 0x5F, 0xC0, 0xFD, 0xD5, 0xD5, 0xC3, 0x55, 0x3D, 0x5F, 0xF0,
|
||||
0xFD, 0x37, 0x77, 0xC0, 0x3D, 0x0F, 0x7F, 0xC0, 0x0D, 0x03, 0xFF, 0x00, 0x03, 0x00, 0x30, 0x00,
|
||||
0x00, 0x02, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,
|
||||
0x03, 0x70, 0x00, 0x00, 0x03, 0x7C, 0x00, 0x00, 0x3F, 0x7F, 0x00, 0x00, 0xD5, 0x55, 0xC0, 0x00,
|
||||
0x3F, 0x7F, 0xF0, 0x00, 0x0F, 0x7F, 0xC0, 0x3C, 0x03, 0x7C, 0x00, 0xD7, 0x00, 0xFC, 0x00, 0xD7,
|
||||
0x00, 0x30, 0x03, 0x5F, 0x01, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0F, 0x00, 0x35, 0xC0, 0x35, 0xF0, 0xD7, 0xF0, 0x3F,
|
||||
0xC0, 0x0F, 0x00, 0x01, 0x09, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3F, 0xC0, 0xD5, 0x70, 0x3F, 0xFC, 0x0F, 0xF0, 0x01, 0x0D, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3C, 0x03, 0xD7, 0x0D, 0xD7,
|
||||
0xCD, 0x3F, 0xC3, 0x0F, 0x00, 0x01, 0x0D, 0x08, 0x00, 0x00, 0x00, 0x30, 0x00, 0xDC, 0x03, 0x7F,
|
||||
0x03, 0x7C, 0x0D, 0xFC, 0x0D, 0xF0, 0x37, 0xF0, 0x37, 0xC0, 0xDF, 0xC0, 0xDF, 0x00, 0x3F, 0x00,
|
||||
0x0C, 0x00, 0x02, 0x0D, 0x09, 0x0F, 0xF0, 0x00, 0x0F, 0x35, 0x5C, 0x00, 0xF5, 0xD7, 0xD7, 0x03,
|
||||
0x55, 0xD7, 0xD7, 0xC0, 0xF5, 0xD7, 0xD7, 0xC0, 0x35, 0xD7, 0xD7, 0xC0, 0x35, 0xD7, 0xD7, 0xC0,
|
||||
0x35, 0xD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 0x03, 0xD7, 0xC3, 0x3F, 0xC0, 0x0F, 0x03, 0x01, 0x0F, 0x05, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0xD7, 0x00, 0xD7, 0xC0, 0x3F, 0xC0, 0x3F, 0x00,
|
||||
0xD7, 0x00, 0xD7, 0xC0, 0x37, 0xC0, 0xDF, 0xC0, 0x3F, 0x00, 0x0C, 0x00, 0x01, 0x0B, 0x07, 0x00,
|
||||
0x00, 0x00, 0xC0, 0x03, 0x70, 0x0D, 0xFC, 0x37, 0xF0, 0xDF, 0xC0, 0x37, 0x00, 0x0D, 0xC0, 0x03,
|
||||
0x70, 0x00, 0xFC, 0x00, 0x30, 0x02, 0x0A, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0x00, 0x00, 0x03, 0x70, 0x3F, 0xFC, 0x00, 0xDC, 0xD5, 0x57, 0x00, 0x37, 0x3F, 0xFF, 0xC0, 0x0D,
|
||||
0x3F, 0xFF, 0x00, 0x37, 0xD5, 0x57, 0x00, 0xDF, 0x3F, 0xFF, 0xC3, 0x7F, 0x0F, 0xFF, 0x00, 0xFC,
|
||||
0x01, 0x0B, 0x07, 0x00, 0x00, 0x30, 0x00, 0xDC, 0x00, 0x37, 0x00, 0x0D, 0xC0, 0x03, 0x70, 0x0D,
|
||||
0xFC, 0x37, 0xF0, 0xDF, 0xC0, 0x3F, 0x00, 0x0C, 0x00, 0x02, 0x0D, 0x09, 0x0F, 0xF0, 0x00, 0x00,
|
||||
0x35, 0x5C, 0x00, 0x00, 0xD7, 0xD7, 0x00, 0x00, 0xD7, 0xD7, 0xC0, 0x00, 0x3F, 0xD7, 0xC0, 0x00,
|
||||
0x0F, 0x5F, 0xC0, 0x00, 0x0D, 0x7F, 0x00, 0x00, 0x0D, 0x7C, 0x00, 0x00, 0x03, 0xFC, 0x00, 0x00,
|
||||
0x0D, 0x70, 0x00, 0x00, 0x0D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0x00, 0x37, 0xC0, 0x0D, 0xC0, 0x0D,
|
||||
0xF0, 0x03, 0x70, 0x03, 0x7C, 0x00, 0xDC, 0x00, 0xDF, 0x00, 0x3F, 0x00, 0x0C, 0x01, 0x0E, 0x06,
|
||||
0x3F, 0x00, 0xD5, 0xC0, 0x3D, 0xF0, 0x0D, 0xF0, 0x0D, 0xF0, 0x0D, 0xF0, 0x0D, 0xF0, 0x0D, 0xF0,
|
||||
0x0D, 0xF0, 0x0D, 0xF0, 0x3D, 0xF0, 0xD5, 0xF0, 0x3F, 0xF0, 0x0F, 0xC0, 0x02, 0x0E, 0x0A, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x03, 0x70, 0x00, 0x00, 0x0D,
|
||||
0x5C, 0x00, 0x03, 0x37, 0x77, 0x00, 0x0D, 0xDF, 0x7D, 0xC0, 0x35, 0x3F, 0x7F, 0xF0, 0x0D, 0x0F,
|
||||
0x7C, 0xC0, 0x03, 0x03, 0x7C, 0x00, 0x00, 0x03, 0x7C, 0x00, 0x00, 0x03, 0x7C, 0x00, 0x00, 0x00,
|
||||
0xFC, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x02, 0x0C, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x03, 0x70, 0x00, 0x00, 0x0D, 0xFC, 0x00, 0x00, 0x37, 0xFF,
|
||||
0xC0, 0x00, 0xD5, 0x55, 0x70, 0x00, 0x37, 0xFF, 0xFC, 0x00, 0x0D, 0xFF, 0xF0, 0x00, 0x03, 0x70,
|
||||
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x01, 0x07, 0x04, 0x0C, 0x00, 0x37,
|
||||
0x00, 0xD7, 0x00, 0xD7, 0x00, 0xD7, 0x03, 0xDC, 0x0D, 0x30, 0x03, 0x02, 0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0x03, 0x03, 0xFF, 0x00, 0x00, 0x02, 0x0D, 0x0B, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x03, 0xC0, 0x3C, 0xD7,
|
||||
0x0D, 0x70, 0xD7, 0xD7, 0xCD, 0x7C, 0xD7, 0x35, 0xF5, 0xFC, 0x35, 0x35, 0xF5, 0xF0, 0x35, 0x0D,
|
||||
0x57, 0xF0, 0x35, 0x03, 0x5F, 0xC0, 0x0D, 0x03, 0x5F, 0x00, 0x0D, 0x00, 0xFF, 0x00, 0x03, 0x00,
|
||||
0x3C, 0x00, 0x00, 0x02, 0x0D, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3C, 0x00, 0x3C, 0x03, 0xD7, 0x3C, 0xD7, 0x0D, 0xD7, 0xD7, 0xD7, 0xC3, 0x35, 0xD7,
|
||||
0x5F, 0xC0, 0x35, 0xD7, 0x5F, 0x00, 0x35, 0x55, 0x5F, 0x00, 0x0D, 0x7D, 0x7F, 0x03, 0x0D, 0x7D,
|
||||
0x7C, 0x0D, 0x03, 0xFF, 0xFC, 0x03, 0x00, 0xF0, 0xF0, 0x00, 0x02, 0x0D, 0x0B, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x03, 0xC0, 0x3C, 0xD7, 0x0D, 0x70,
|
||||
0xD7, 0x35, 0xF5, 0xFC, 0xD7, 0x0D, 0x57, 0xF0, 0x35, 0x03, 0x5F, 0xC0, 0x35, 0x0D, 0x57, 0x00,
|
||||
0x0D, 0x35, 0xF5, 0xC0, 0x0D, 0xD7, 0xFD, 0x70, 0x03, 0x3F, 0xC3, 0xFC, 0x03, 0x0F, 0x00, 0xF0,
|
||||
0x0D, 0x02, 0x10, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3C, 0x03, 0xC0, 0x0F, 0xD7, 0x0D, 0x70, 0x35, 0xD7, 0xCD, 0x7C, 0x0F, 0x35, 0xF5, 0xFC, 0x03,
|
||||
0x35, 0xF5, 0xF0, 0x03, 0x0D, 0x57, 0xF0, 0x0D, 0x0D, 0x57, 0xC0, 0x35, 0x03, 0x5F, 0xC0, 0x35,
|
||||
0x03, 0x5F, 0x00, 0x0F, 0x0D, 0x7F, 0x00, 0x03, 0x35, 0xFC, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00,
|
||||
0x03, 0xC0, 0x00, 0x00, 0x02, 0x0D, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3F, 0xFC, 0x00, 0x00, 0xD5, 0x57, 0x00, 0x00, 0x3F, 0xD7, 0xC0, 0x00, 0x0F,
|
||||
0x5F, 0xC0, 0x00, 0x0D, 0x7F, 0x00, 0x00, 0x35, 0xFC, 0x00, 0x00, 0xD7, 0xFC, 0x00, 0x00, 0xD5,
|
||||
0x57, 0x00, 0x00, 0x3F, 0xFF, 0xC0, 0x00, 0x0F, 0xFF, 0x00, 0x00, 0x01, 0x0E, 0x07, 0x00, 0x00,
|
||||
0x03, 0xC0, 0x0D, 0x70, 0x37, 0xFC, 0x37, 0xF0, 0x37, 0xC0, 0xDF, 0xC0, 0xDF, 0x00, 0x37, 0x00,
|
||||
0x37, 0xC0, 0x37, 0xC0, 0x0D, 0x70, 0x03, 0xFC, 0x00, 0xF0, 0x01, 0x0F, 0x04, 0x30, 0x00, 0xDC,
|
||||
0x0F, 0xDF, 0x35, 0xDF, 0x0F, 0xDF, 0x03, 0xDF, 0x03, 0xDF, 0x00, 0xDF, 0x00, 0xDF, 0x03, 0xDF,
|
||||
0x03, 0xDF, 0x0F, 0xDF, 0x35, 0xDF, 0x0F, 0x3F, 0x03, 0x0C, 0x00, 0x01, 0x0E, 0x07, 0x00, 0x00,
|
||||
0x3C, 0x00, 0xD7, 0x00, 0x3D, 0xC0, 0x0D, 0xF0, 0x0D, 0xF0, 0x03, 0x70, 0x03, 0x7C, 0x0D, 0xFC,
|
||||
0x0D, 0xF0, 0x3D, 0xF0, 0xD7, 0xF0, 0x3F, 0xC0, 0x0F, 0x00, 0x02, 0x08, 0x0A, 0x00, 0x00, 0x00,
|
||||
0xC0, 0x00, 0x00, 0x03, 0x70, 0x0F, 0x00, 0x03, 0x70, 0x35, 0xC3, 0x00, 0xC0, 0xDF, 0x7D, 0xC0,
|
||||
0x00, 0x3F, 0xD7, 0xF0, 0x00, 0x0C, 0x3F, 0xC0, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x01, 0x04, 0x03,
|
||||
0x30, 0x00, 0xDC, 0x00, 0xDC, 0x00, 0x30, 0x00, 0x02, 0x10, 0x0A, 0x03, 0xFC, 0x00, 0x00, 0x0D,
|
||||
0x57, 0x00, 0x00, 0x35, 0xF5, 0xC0, 0x00, 0xD7, 0xFD, 0xF0, 0x00, 0xD7, 0xC3, 0xF0, 0x00, 0xD7,
|
||||
0xC0, 0xC0, 0x00, 0xD7, 0xC0, 0x00, 0x00, 0xD7, 0xC3, 0x00, 0x00, 0xD7, 0xCD, 0xC0, 0x00, 0x35,
|
||||
0xF5, 0xF0, 0x00, 0x0D, 0x57, 0xF0, 0x00, 0x03, 0x7F, 0xC0, 0x00, 0x03, 0xDF, 0x00, 0x00, 0x01,
|
||||
0xDF, 0x00, 0x00, 0x03, 0x7C, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x02, 0x0D, 0x09, 0x0C, 0x0C,
|
||||
0x00, 0x00, 0x37, 0x37, 0x00, 0x00, 0xD7, 0xD7, 0xC0, 0x03, 0x3F, 0xFF, 0xC0, 0x00, 0x3F, 0x3F,
|
||||
0x00, 0x03, 0xD7, 0xD7, 0x00, 0x0D, 0xD7, 0xD7, 0xC0, 0x35, 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0xD7, 0xC3, 0x5F, 0x35, 0x57, 0xC0, 0xD5, 0x0F,
|
||||
0xFF, 0xC0, 0x3F, 0x03, 0xFF, 0x00, 0x0F, 0x02, 0x0D, 0x09, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF0,
|
||||
0x00, 0x03, 0x03, 0x5C, 0x00, 0x0D, 0x00, 0xFF, 0x00, 0x03, 0x0F, 0xF0, 0x00, 0x0F, 0x35, 0x5C,
|
||||
0x00, 0x35, 0xD7, 0xD7, 0x00, 0xD7, 0x3D, 0x57, 0xC0, 0x3D, 0x35, 0xD7, 0xC0, 0x35, 0xD7, 0xD7,
|
||||
0xC0, 0xD7, 0x35, 0x57, 0xC0, 0x35, 0x0F, 0xFF, 0xC0, 0x0F, 0x03, 0xFF, 0x00, 0x03, 0x02, 0x0D,
|
||||
0x09, 0x00, 0xC0, 0x00, 0x00, 0x03, 0x70, 0x00, 0x00, 0x0D, 0xDC, 0x00, 0x00, 0x03, 0x7F, 0x00,
|
||||
0x03, 0x0F, 0xFC, 0x00, 0x0D, 0x35, 0x5C, 0x00, 0x35, 0xD7, 0xD7, 0x00, 0x35, 0x3D, 0x57, 0xC0,
|
||||
0x35, 0x35, 0xD7, 0xC0, 0x35, 0xD7, 0xD7, 0xC0, 0x35, 0x35, 0x57, 0xC0, 0x0D, 0x0F, 0xFF, 0xC0,
|
||||
0x03, 0x03, 0xFF, 0x00, 0x03, 0x02, 0x10, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
|
||||
0x00, 0x00, 0x00, 0x0D, 0x0F, 0xF0, 0x00, 0x03, 0x35, 0x5C, 0x00, 0x03, 0xD7, 0xD7, 0x00, 0x0D,
|
||||
0xD7, 0xFF, 0xC0, 0x35, 0xD7, 0xCF, 0x00, 0x35, 0xD7, 0xFC, 0x00, 0x35, 0xD7, 0xD7, 0x00, 0x35,
|
||||
0x35, 0x5F, 0xC0, 0x0D, 0x0D, 0xFF, 0x00, 0x03, 0x0F, 0x7C, 0x00, 0x00, 0x07, 0x7C, 0x00, 0x00,
|
||||
0x0D, 0xF0, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x02, 0x0D, 0x09, 0x03, 0xC0, 0x00, 0x0C, 0x0D,
|
||||
0x70, 0x00, 0x37, 0x37, 0xDC, 0x00, 0xD7, 0x0F, 0xFF, 0x00, 0x3F, 0x0F, 0xFC, 0x00, 0x0F, 0x35,
|
||||
0x5C, 0x00, 0x35, 0xD7, 0xD7, 0x00, 0xD7, 0xD5, 0x57, 0xC0, 0xD5, 0xD7, 0xFF, 0xC0, 0xD7, 0xD7,
|
||||
0xD7, 0x00, 0xD7, 0x35, 0x5F, 0xC0, 0x35, 0x0F, 0xFF, 0x00, 0x0F, 0x03, 0xFC, 0x00, 0x03, 0x02,
|
||||
0x0D, 0x09, 0x0C, 0x0C, 0x00, 0x03, 0x37, 0x37, 0x00, 0x0D, 0xD7, 0xD7, 0xC0, 0x03, 0x3F, 0xFF,
|
||||
0xC0, 0x00, 0x0F, 0xFF, 0x00, 0x03, 0x35, 0x5C, 0x00, 0x0D, 0xD7, 0xD7, 0x00, 0x35, 0xD5, 0x57,
|
||||
0xC0, 0x35, 0xD7, 0xFF, 0xC0, 0x35, 0xD7, 0xD7, 0x00, 0x35, 0x35, 0x5F, 0xC0, 0x0D, 0x0F, 0xFF,
|
||||
0x00, 0x03, 0x03, 0xFC, 0x00, 0x00, 0x02, 0x0D, 0x09, 0x0C, 0x00, 0x00, 0x03, 0x37, 0xC0, 0x00,
|
||||
0x0D, 0x0D, 0x70, 0x00, 0x35, 0x03, 0xFC, 0x00, 0x0F, 0x0F, 0xF0, 0x00, 0x03, 0x35, 0x5C, 0x00,
|
||||
0x03, 0xD7, 0xD7, 0x00, 0x03, 0xD5, 0x57, 0xC0, 0x03, 0xD7, 0xFF, 0xC0, 0x03, 0xD7, 0xD7, 0x00,
|
||||
0x03, 0x35, 0x5F, 0xC0, 0x03, 0x0F, 0xFF, 0x00, 0x00,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0xD7, 0xC0, 0x00, 0xD7, 0xD7, 0xC0, 0x00, 0xD7, 0xD7, 0xC0, 0x00, 0x35, 0x57, 0xC0, 0x00,
|
||||
0x0F, 0xFF, 0xC0, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x01, 0x04, 0x03, 0x30, 0x30, 0xDC, 0xDC, 0xDC,
|
||||
0xDC, 0x30, 0x30, 0x01, 0x04, 0x03, 0x30, 0x30, 0xDC, 0xDC, 0xDC, 0xDC, 0x30, 0x30, 0x01, 0x04,
|
||||
0x03, 0x30, 0x30, 0xDC, 0xDC, 0xDC, 0xDC, 0x30, 0x30, 0x01, 0x04, 0x03, 0x30, 0x00, 0xDC, 0x03,
|
||||
0xDC, 0x03, 0x30, 0x00, 0x01, 0x04, 0x03, 0x30, 0x30, 0xDC, 0xDC, 0xDC, 0xDC, 0x30, 0x30, 0x01,
|
||||
0x04, 0x03, 0x30, 0x30, 0xDC, 0xDC, 0xDC, 0xDC, 0x30, 0x30, 0x01, 0x04, 0x03, 0x30, 0x30, 0xDC,
|
||||
0xDC, 0xDC, 0xDC, 0x30, 0x30, 0x01, 0x04, 0x03, 0x30, 0x00, 0xDC, 0x00, 0xDC, 0x00, 0x30, 0x00,
|
||||
0x02, 0x0D, 0x09, 0x00, 0x30, 0x00, 0x03, 0x03, 0xDC, 0x00, 0x3D, 0x0D, 0x7F, 0x00, 0xD7, 0x03,
|
||||
0xFC, 0x00, 0x3F, 0x0F, 0xF0, 0x00, 0x3C, 0x35, 0x5C, 0x00, 0xD7, 0xD7, 0xD7, 0x00, 0xD7, 0x3D,
|
||||
0x57, 0xC0, 0xD7, 0x35, 0xD7, 0xC0, 0xD7, 0xD7, 0xD7, 0xC0, 0xD7, 0x35, 0x57, 0xC0, 0xD7, 0x0F,
|
||||
0xFF, 0xC0, 0x3F, 0x03, 0xFF, 0x00, 0x0F, 0x01, 0x0D, 0x06, 0x03, 0x00, 0x3D, 0xC0, 0xD7, 0xF0,
|
||||
0x3F, 0xC0, 0x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
|
||||
0x00, 0x3F, 0xFF, 0xC0, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x01, 0x04, 0x03, 0x30, 0x30, 0xDC, 0xDC,
|
||||
0xDC, 0xDC, 0x30, 0x30, 0x01, 0x04, 0x03, 0x30, 0x30, 0xDC, 0xDC, 0xDC, 0xDC, 0x30, 0x30, 0x01,
|
||||
0x04, 0x03, 0x30, 0x00, 0xDC, 0x00, 0xDC, 0x00, 0x30, 0x00, 0x02, 0x0D, 0x09, 0x03, 0xC0, 0x00,
|
||||
0x00, 0x0D, 0x70, 0x00, 0x00, 0x0D, 0x7C, 0x00, 0x00, 0x03, 0xFC, 0x00, 0x00, 0x0D, 0x70, 0x00,
|
||||
0x00, 0x0D, 0x7C, 0x00, 0x00, 0x35, 0xFC, 0x00, 0x00, 0xD7, 0xFC, 0x00, 0x00, 0xD7, 0xD7, 0x00,
|
||||
0x00, 0xD7, 0xD7, 0xC0, 0x00, 0x35, 0x5F, 0xC0, 0x00, 0x0F, 0xFF, 0x00, 0x00, 0x03, 0xFC, 0x00,
|
||||
0x00, 0x01, 0x04, 0x03, 0x30, 0x30, 0xDC, 0xDC, 0xDC, 0xDC, 0x30, 0x30, 0x01, 0x04, 0x03, 0x30,
|
||||
0x30, 0xDC, 0xDC, 0xDC, 0xDC, 0x30, 0x30, 0x01, 0x04, 0x03, 0x30, 0x30, 0xDC, 0xDC, 0xDC, 0xDC,
|
||||
0x30, 0x30, 0x01, 0x04, 0x03, 0x30, 0x00, 0xDC, 0x00, 0xDC, 0x00, 0x30, 0x00, 0x01, 0x0F, 0x06,
|
||||
0x00, 0x00, 0x03, 0x00, 0x0D, 0xC0, 0x35, 0xF0, 0x37, 0xF0, 0x0F, 0xC0, 0x0D, 0xC0, 0x35, 0xF0,
|
||||
0x35, 0xF0, 0x35, 0xF0, 0x35, 0xF0, 0xD5, 0xF0, 0xD7, 0xF0, 0x3F, 0xC0, 0x0F, 0x00, 0x02, 0x0F,
|
||||
0x0C, 0x0F, 0xFF, 0xC0, 0x00, 0x35, 0x55, 0x70, 0x00, 0xD7, 0xDF, 0x5C, 0x00, 0xDF, 0x5F, 0x5F,
|
||||
0x00, 0x3F, 0x5F, 0x5F, 0x00, 0x0F, 0x5D, 0x7F, 0x00, 0x03, 0x5D, 0x5C, 0x00, 0x03, 0x5F, 0x5F,
|
||||
0x00, 0x0D, 0x57, 0x5F, 0x00, 0x0D, 0x75, 0x7F, 0x00, 0x0D, 0x7F, 0xFC, 0x00, 0x0D, 0xFF, 0xF0,
|
||||
0x00, 0x35, 0xF0, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00
|
||||
};
|
||||
|
||||
} // namespace Touche
|
3271
engines/touche/touche.cpp
Normal file
3271
engines/touche/touche.cpp
Normal file
File diff suppressed because it is too large
Load Diff
778
engines/touche/touche.h
Normal file
778
engines/touche/touche.h
Normal file
@ -0,0 +1,778 @@
|
||||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2006 The ScummVM project
|
||||
*
|
||||
* 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: $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TOUCHE_ENGINE_H
|
||||
#define TOUCHE_ENGINE_H
|
||||
|
||||
#include "common/array.h"
|
||||
#include "common/endian.h"
|
||||
#include "common/file.h"
|
||||
#include "common/rect.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "sound/mixer.h"
|
||||
|
||||
#include "engines/engine.h"
|
||||
|
||||
namespace Touche {
|
||||
|
||||
struct Area {
|
||||
Common::Rect r;
|
||||
int16 srcX, srcY;
|
||||
|
||||
Area() {
|
||||
srcX = srcY = 0;
|
||||
}
|
||||
|
||||
Area(int16 x, int16 y, int16 w, int16 h) {
|
||||
r = Common::Rect(x, y, x + w, y + h);
|
||||
srcX = srcY = 0;
|
||||
}
|
||||
|
||||
bool clip(const Common::Rect &rect) {
|
||||
const int dx = r.left - rect.left;
|
||||
if (dx < 0) {
|
||||
srcX -= dx;
|
||||
}
|
||||
const int dy = r.top - rect.top;
|
||||
if (dy < 0) {
|
||||
srcY -= dy;
|
||||
}
|
||||
if (rect.left > r.left) {
|
||||
r.left = rect.left;
|
||||
}
|
||||
if (rect.top > r.top) {
|
||||
r.top = rect.top;
|
||||
}
|
||||
if (rect.right < r.right) {
|
||||
r.right = rect.right;
|
||||
}
|
||||
if (rect.bottom < r.bottom) {
|
||||
r.bottom = rect.bottom;
|
||||
}
|
||||
return (r.right > r.left && r.bottom > r.top);
|
||||
}
|
||||
};
|
||||
|
||||
struct KeyChar {
|
||||
uint16 num;
|
||||
uint16 flags;
|
||||
int16 currentAnimCounter;
|
||||
int16 strNum;
|
||||
int16 walkDataNum;
|
||||
int16 spriteNum;
|
||||
Common::Rect prevBoundingRect;
|
||||
Common::Rect boundingRect;
|
||||
int16 xPos;
|
||||
int16 yPos;
|
||||
int16 zPos;
|
||||
int16 xPosPrev;
|
||||
int16 yPosPrev;
|
||||
int16 zPosPrev;
|
||||
int16 prevWalkDataNum;
|
||||
uint16 textColor;
|
||||
int16 inventoryItems[4];
|
||||
int16 money;
|
||||
int16 pointsDataNum;
|
||||
int16 currentWalkBox;
|
||||
uint16 prevPointsDataNum;
|
||||
int16 currentAnim;
|
||||
int16 facingDirection;
|
||||
int16 currentAnimSpeed;
|
||||
int16 framesList[16];
|
||||
int16 framesListCount;
|
||||
int16 currentFrame;
|
||||
int16 anim1Start;
|
||||
int16 anim1Count;
|
||||
int16 anim2Start;
|
||||
int16 anim2Count;
|
||||
int16 anim3Start;
|
||||
int16 anim3Count;
|
||||
int16 followingKeyCharNum;
|
||||
int16 followingKeyCharPos;
|
||||
uint16 sequenceDataIndex;
|
||||
uint16 sequenceDataOffset;
|
||||
int16 walkPointsListCount;
|
||||
int16 walkPointsList[40];
|
||||
uint16 scriptDataStartOffset;
|
||||
uint16 scriptDataOffset;
|
||||
int16 *scriptStackPtr;
|
||||
int16 delay;
|
||||
int16 waitingKeyChar;
|
||||
int16 waitingKeyCharPosTable[3];
|
||||
int16 scriptStackTable[40];
|
||||
};
|
||||
|
||||
struct Script {
|
||||
uint8 opcodeNum;
|
||||
uint32 dataOffset;
|
||||
int16 keyCharNum;
|
||||
uint8 *dataPtr;
|
||||
int16 *stackDataPtr;
|
||||
int16 *stackDataBasePtr;
|
||||
int16 quitFlag;
|
||||
int16 stackDataTable[500];
|
||||
|
||||
void init(uint8 *data) {
|
||||
dataPtr = data;
|
||||
stackDataPtr = stackDataBasePtr = &stackDataTable[499];
|
||||
dataOffset = 0;
|
||||
quitFlag = 0;
|
||||
}
|
||||
|
||||
uint8 readByte(uint32 offs) const {
|
||||
return *(dataPtr + offs);
|
||||
}
|
||||
|
||||
int16 readWord(uint32 offs) const {
|
||||
return READ_LE_UINT16(dataPtr + offs);
|
||||
}
|
||||
|
||||
uint8 readNextByte() {
|
||||
uint8 val = readByte(dataOffset);
|
||||
++dataOffset;
|
||||
return val;
|
||||
}
|
||||
|
||||
int16 readNextWord() {
|
||||
int16 val = readWord(dataOffset);
|
||||
dataOffset += 2;
|
||||
return val;
|
||||
}
|
||||
};
|
||||
|
||||
struct TalkEntry {
|
||||
int16 otherKeyChar;
|
||||
int16 talkingKeyChar;
|
||||
int16 num;
|
||||
};
|
||||
|
||||
struct ConversationChoice {
|
||||
int16 num;
|
||||
int16 msg;
|
||||
};
|
||||
|
||||
struct AnimationEntry {
|
||||
int16 num;
|
||||
int16 x;
|
||||
int16 y;
|
||||
int16 dx;
|
||||
int16 dy;
|
||||
int16 posNum;
|
||||
int16 delayCounter;
|
||||
int16 displayCounter;
|
||||
Common::Rect displayRect;
|
||||
};
|
||||
|
||||
struct SequenceEntry {
|
||||
int16 sprNum;
|
||||
int16 seqNum;
|
||||
};
|
||||
|
||||
struct SpriteData {
|
||||
uint32 size;
|
||||
uint8 *ptr;
|
||||
uint16 bitmapWidth;
|
||||
uint16 bitmapHeight;
|
||||
uint16 w;
|
||||
uint16 h;
|
||||
};
|
||||
|
||||
struct MidiContext {
|
||||
uint8 unk2;
|
||||
uint8 unkA;
|
||||
uint8 unkB;
|
||||
uint16 volume;
|
||||
uint8 unkF;
|
||||
uint16 currentVolume;
|
||||
};
|
||||
|
||||
struct ProgramPointData {
|
||||
int16 x, y, z;
|
||||
int16 priority;
|
||||
};
|
||||
|
||||
struct ProgramWalkData {
|
||||
int16 point1;
|
||||
int16 point2;
|
||||
int16 clippingRect;
|
||||
int16 area1;
|
||||
int16 area2;
|
||||
};
|
||||
|
||||
struct ProgramAreaData {
|
||||
Area area;
|
||||
int16 id;
|
||||
int16 state;
|
||||
int16 animCount;
|
||||
int16 animNext;
|
||||
};
|
||||
|
||||
struct ProgramBackgroundData {
|
||||
Area area;
|
||||
int16 type;
|
||||
int16 offset;
|
||||
int16 scaleMul;
|
||||
int16 scaleDiv;
|
||||
};
|
||||
|
||||
struct ProgramHitBoxData {
|
||||
int16 item;
|
||||
int16 talk;
|
||||
uint16 state;
|
||||
int16 str;
|
||||
int16 defaultStr;
|
||||
int16 actions[8];
|
||||
Common::Rect hitBoxes[2];
|
||||
};
|
||||
|
||||
struct ProgramActionScriptOffsetData {
|
||||
int16 object1;
|
||||
int16 action;
|
||||
int16 object2;
|
||||
uint16 offset;
|
||||
};
|
||||
|
||||
struct ProgramKeyCharScriptOffsetData {
|
||||
int16 keyChar;
|
||||
uint16 offset;
|
||||
};
|
||||
|
||||
struct ProgramConversationData {
|
||||
int16 num;
|
||||
uint16 offset;
|
||||
int16 msg;
|
||||
};
|
||||
|
||||
enum {
|
||||
kDebugEngine = 1 << 0,
|
||||
kDebugGraphics = 1 << 1,
|
||||
kDebugResource = 1 << 2,
|
||||
kDebugOpcodes = 1 << 3,
|
||||
kDebugUserIntf = 1 << 4
|
||||
};
|
||||
|
||||
enum ResourceType {
|
||||
kResourceTypeRoomImage = 0,
|
||||
kResourceTypeSequence,
|
||||
kResourceTypeSpriteImage,
|
||||
kResourceTypeIconImage,
|
||||
kResourceTypeRoomInfo,
|
||||
kResourceTypeProgram,
|
||||
kResourceTypeMusic,
|
||||
kResourceTypeSound
|
||||
};
|
||||
|
||||
enum TalkMode {
|
||||
kTalkModeTextOnly = 0,
|
||||
kTalkModeVoiceOnly,
|
||||
kTalkModeVoiceAndText,
|
||||
kTalkModeCount
|
||||
};
|
||||
|
||||
enum ScriptFlag {
|
||||
kScriptStopped = 1 << 0,
|
||||
kScriptPaused = 1 << 1
|
||||
};
|
||||
|
||||
class ToucheEngine: public Engine {
|
||||
public:
|
||||
|
||||
enum {
|
||||
NUM_OPCODES = 135,
|
||||
NUM_FLAGS = 2000,
|
||||
NUM_KEYCHARS = 32,
|
||||
NUM_AREAS = 10,
|
||||
NUM_SPRITES = 5,
|
||||
NUM_SEQUENCES = 7,
|
||||
NUM_CONVERSATION_CHOICES = 40,
|
||||
NUM_TALK_ENTRIES = 16,
|
||||
NUM_ANIMATION_ENTRIES = 4,
|
||||
NUM_INVENTORY_ITEMS = 100,
|
||||
NUM_DIRTY_RECTS = 50,
|
||||
NUM_GAMESTATE_FILES = 100
|
||||
};
|
||||
|
||||
typedef void (ToucheEngine::*OpcodeProc)();
|
||||
|
||||
ToucheEngine(OSystem *system, Common::Language language);
|
||||
virtual ~ToucheEngine();
|
||||
|
||||
virtual int init();
|
||||
virtual int go();
|
||||
|
||||
protected:
|
||||
|
||||
void restart();
|
||||
void mainLoop();
|
||||
void processEvents();
|
||||
void runCycle();
|
||||
int16 getRandomNumber(int max);
|
||||
void changePaletteRange();
|
||||
void playSoundInRange();
|
||||
void resetSortedKeyCharsTable();
|
||||
void setupEpisode(int num);
|
||||
void setupNewEpisode();
|
||||
void drawKeyChar(KeyChar *key);
|
||||
void sortKeyChars();
|
||||
void runKeyCharScript(KeyChar *key);
|
||||
void runCurrentKeyCharScript(int mode);
|
||||
void executeScriptOpcode(int16 param);
|
||||
void initKeyChars(int keyChar);
|
||||
void setKeyCharTextColor(int keyChar, uint16 color);
|
||||
void waitForKeyCharPosition(int keyChar);
|
||||
void setKeyCharBox(int keyChar, int value);
|
||||
void setKeyCharFrame(int keyChar, int16 type, int16 value1, int16 value2);
|
||||
void setKeyCharFacingDirection(int keyChar, int16 dir);
|
||||
void initKeyCharScript(int keyChar, int16 spriteNum, int16 seqDataIndex, int16 seqDataOffs);
|
||||
uint16 findProgramKeyCharScriptOffset(int keyChar) const;
|
||||
bool scrollRoom(int keyChar);
|
||||
void drawIcon(int x, int y, int num);
|
||||
void centerScreenToKeyChar(int keyChar);
|
||||
void waitForKeyCharsSet();
|
||||
void redrawRoom();
|
||||
void fadePalette(int firstColor, int lastColor, int scale, int scaleInc, int fadingStepsCount);
|
||||
void fadePaletteFromFlags();
|
||||
void moveKeyChar(uint8 *dst, int dstPitch, KeyChar *key);
|
||||
void changeKeyCharFrame(KeyChar *key, int keyChar);
|
||||
void setKeyCharRandomFrame(KeyChar *key);
|
||||
void setKeyCharMoney();
|
||||
const char *getString(int num) const;
|
||||
int getStringWidth(int m, int num) const;
|
||||
void drawString(uint8 *dst, int dstPitch, int m, uint16 color, int x, int y, int16 num);
|
||||
void drawGameString(int m, uint16 color, int x1, int y, const char *str);
|
||||
int restartKeyCharScriptOnAction(int action, int obj1, int obj2);
|
||||
void buildSpriteScalingTable(int z1, int z2);
|
||||
void drawSpriteOnBackdrop(int num, int x, int y);
|
||||
void updateTalkFrames(int keyChar);
|
||||
void setKeyCharTalkingFrame(int keyChar);
|
||||
void lockUnlockHitBox(int num, int lock);
|
||||
void drawHitBoxes();
|
||||
void setCursor(int num);
|
||||
void updateCursor(int num);
|
||||
void handleMouseButtonClicked();
|
||||
void handleMouseButtonPressed();
|
||||
void handleMouseInput(int flag);
|
||||
void handleMouseInputRoomArea(int flag);
|
||||
void handleMouseInputInventoryArea(int flag);
|
||||
void scrollScreenToPos(int num);
|
||||
void clearRoomArea();
|
||||
void startNewMusic();
|
||||
void startNewSound();
|
||||
void updateSpeech();
|
||||
int handleActionMenuUnderCursor(const int16 *actions, int offs, int y, int str);
|
||||
|
||||
void redrawBackground();
|
||||
void processAreaTable();
|
||||
void clearAreaTable();
|
||||
void addToAreaTable(const Area *area);
|
||||
void addRoomArea(int num, int flag);
|
||||
void updateRoomAreas(int num, int flags);
|
||||
void setRoomAreaState(int num, uint16 state);
|
||||
void findAndRedrawRoomRegion(int num);
|
||||
void updateRoomRegions();
|
||||
void redrawRoomRegion(int num, bool markForRedraw);
|
||||
|
||||
void initInventoryObjectsTable();
|
||||
void initInventoryLists();
|
||||
void drawInventory(int index, int flag);
|
||||
void drawAmountOfMoneyInInventory();
|
||||
void packInventoryItems(int index);
|
||||
void appendItemToInventoryList(int index);
|
||||
void addItemToInventory(int inventory, int16 item);
|
||||
void removeItemFromInventory(int inventory, int16 item);
|
||||
void changeInventoryItemState(int flag, int itemNum, int itemRnd, int inventoryItem);
|
||||
|
||||
void resetTalkingVars();
|
||||
int updateKeyCharTalk(int pauseFlag);
|
||||
const char *formatTalkText(int mode, int *y, int *h, const char *text);
|
||||
void addToTalkTable(int talkingKeyChar, int num, int otherKeyChar);
|
||||
void removeFromTalkTable(int keyChar);
|
||||
void addConversationChoice(int16 num);
|
||||
void removeConversationChoice(int16 num);
|
||||
void runConversationScript(uint16 offset);
|
||||
void findConversationByNum(int16 num);
|
||||
void clearConversationChoices();
|
||||
void drawCharacterConversationRepeat2();
|
||||
void drawCharacterConversationRepeat();
|
||||
void drawCharacterConversation();
|
||||
void drawConversationString(int num, uint16 color);
|
||||
void clearConversationArea();
|
||||
void setupConversationScript(int num);
|
||||
void handleConversation();
|
||||
|
||||
void buildWalkPointsList(int keyChar);
|
||||
int findWalkDataNum(int pointNum1, int pointNum2);
|
||||
void changeWalkPath(int num1, int num2, int16 val);
|
||||
void adjustKeyCharPosToWalkBox(KeyChar *key, int moveType);
|
||||
void lockWalkPath(int num1, int num2);
|
||||
void unlockWalkPath(int num1, int num2);
|
||||
void resetPointsData(int num);
|
||||
bool sortPointsData(int num1, int num2);
|
||||
void updateKeyCharWalkPath(KeyChar *key, int16 dx, int16 dy, int16 dz);
|
||||
void markWalkPoints(int keyChar);
|
||||
void buildWalkPath(int dstPosX, int dstPosY, int keyChar);
|
||||
|
||||
void addToAnimationTable(int num, int posNum, int keyChar, int delayCounter);
|
||||
void copyAnimationImage(int dstX, int dstY, int w, int h, const uint8 *src, int srcX, int srcY, int fillColor);
|
||||
void drawAnimationImage(AnimationEntry *anim);
|
||||
void processAnimationTable();
|
||||
void clearAnimationTable();
|
||||
|
||||
void addToDirtyRect(const Common::Rect &r);
|
||||
void clearDirtyRects();
|
||||
void setPalette(int firstColor, int colorCount, int redScale, int greenScale, int blueScale);
|
||||
void copyPaletteColor(int srcColorIndex, int dstColorIndex);
|
||||
void updateScreenArea(const uint8 *src, int srcPitch, int srcX, int srcY, int dstX, int dstY, int w, int h);
|
||||
void updateEntireScreen();
|
||||
void updateDirtyScreenAreas();
|
||||
void updatePalette();
|
||||
|
||||
void saveGameStateData(Common::WriteStream *stream);
|
||||
void loadGameStateData(Common::ReadStream *stream);
|
||||
bool saveGameState(int num, const char *description);
|
||||
bool loadGameState(int num, const char *description);
|
||||
void readGameStateDescription(int num, char *description, int len);
|
||||
void generateGameStateFileName(int num, char *dst, int len, bool prefixOnly = false) const;
|
||||
|
||||
void op_nop();
|
||||
void op_jnz();
|
||||
void op_jz();
|
||||
void op_jmp();
|
||||
void op_true();
|
||||
void op_false();
|
||||
void op_push();
|
||||
void op_testFalse();
|
||||
void op_add();
|
||||
void op_sub();
|
||||
void op_mul();
|
||||
void op_div();
|
||||
void op_mod();
|
||||
void op_and();
|
||||
void op_or();
|
||||
void op_not();
|
||||
void op_testGreater();
|
||||
void op_testEquals();
|
||||
void op_testLower();
|
||||
void op_fetchScriptWord();
|
||||
void op_testGreaterOrEquals();
|
||||
void op_testLowerOrEquals();
|
||||
void op_testNotEquals();
|
||||
void op_endConversation();
|
||||
void op_stopScript();
|
||||
void op_getFlag();
|
||||
void op_setFlag();
|
||||
void op_fetchScriptByte();
|
||||
void op_getScriptValue();
|
||||
void op_setScriptValue();
|
||||
void op_getKeyCharWalkBox();
|
||||
void op_startSound();
|
||||
void op_initKeyCharTalk();
|
||||
void op_loadRoom();
|
||||
void op_updateRoom();
|
||||
void op_startTalk();
|
||||
void op_loadSprite();
|
||||
void op_loadSequence();
|
||||
void op_setKeyCharBox();
|
||||
void op_initKeyCharScript();
|
||||
void op_setKeyCharFrame();
|
||||
void op_setKeyCharDirection();
|
||||
void op_clearConversationChoices();
|
||||
void op_addConversationChoice();
|
||||
void op_removeConversationChoice();
|
||||
void op_getInventoryItem();
|
||||
void op_setInventoryItem();
|
||||
void op_startEpisode();
|
||||
void op_setConversationNum();
|
||||
void op_enableInventoryItem();
|
||||
void op_enableInput();
|
||||
void op_disableInput();
|
||||
void op_faceKeyChar();
|
||||
void op_getKeyCharCurrentAnim();
|
||||
void op_getCurrentKeyChar();
|
||||
void op_isKeyCharActive();
|
||||
void op_setPalette();
|
||||
void op_changeWalkPath();
|
||||
void op_lockWalkPath();
|
||||
void op_initializeKeyChar();
|
||||
void op_setupWaitingKeyChars();
|
||||
void op_updateRoomAreas();
|
||||
void op_unlockWalkPath();
|
||||
void op_addItemToInventoryAndRedraw();
|
||||
void op_giveItemTo();
|
||||
void op_resetHitBoxes();
|
||||
void op_fadePalette();
|
||||
void op_disableInventoryItem();
|
||||
void op_getInventoryItemFlags();
|
||||
void op_drawInventory();
|
||||
void op_stopKeyCharScript();
|
||||
void op_restartKeyCharScript();
|
||||
void op_getKeyCharCurrentWalkBox();
|
||||
void op_getKeyCharPointsDataNum();
|
||||
void op_setupFollowingKeyChar();
|
||||
void op_startAnimation();
|
||||
void op_setKeyCharTextColor();
|
||||
void op_startMusic();
|
||||
void op_copyPaletteColor();
|
||||
void op_delay();
|
||||
void op_lockHitBox();
|
||||
void op_removeItemFromInventory();
|
||||
void op_unlockHitBox();
|
||||
void op_addRoomArea();
|
||||
void op_setKeyCharFlags();
|
||||
void op_unsetKeyCharFlags();
|
||||
void op_loadVoice();
|
||||
void op_drawSpriteOnBackdrop();
|
||||
void op_startPaletteFadeIn();
|
||||
void op_startPaletteFadeOut();
|
||||
void op_setRoomAreaState();
|
||||
|
||||
void res_openDataFile();
|
||||
void res_closeDataFile();
|
||||
void res_allocateTables();
|
||||
void res_deallocateTables();
|
||||
uint32 res_getDataOffset(ResourceType type, int num, uint32 *size = NULL);
|
||||
void res_loadSpriteImage(int num, uint8 *dst);
|
||||
void res_loadProgram(int num);
|
||||
void res_decodeProgramData();
|
||||
void res_loadRoom(int num);
|
||||
void res_loadSprite(int num, int index);
|
||||
void res_loadSequence(int num, int index);
|
||||
void res_decodeScanLineImageRLE(uint8 *dst, int lineWidth);
|
||||
void res_loadBackdrop();
|
||||
void res_loadImage(int num, uint8 *dst);
|
||||
void res_loadImageHelper(uint8 *imgData, int imgWidth, int imgHeight);
|
||||
void res_loadSound(int flag, int num);
|
||||
void res_loadMusic(int num);
|
||||
void res_loadSpeech(int num);
|
||||
void res_loadSpeechSegment(int num);
|
||||
void res_stopSpeech();
|
||||
|
||||
bool ui_processEvents();
|
||||
void ui_drawButtonBorders(const Common::Rect *r, int count);
|
||||
void ui_drawMusicVolumeBar();
|
||||
void ui_drawTalkMode();
|
||||
void ui_drawAllBorders();
|
||||
void ui_drawSaveGamesList(int page);
|
||||
void ui_drawSaveLoadMenu(int page, int saveOrLoad);
|
||||
int ui_getButtonPressed(const Common::Rect *r, int count) const;
|
||||
void ui_drawButtonText(const int16 *texts, const Common::Rect *r, int count, bool centerTexts);
|
||||
void ui_drawArrow(int x, int y, int dx, uint8 color);
|
||||
void ui_drawOptionsMenu();
|
||||
void ui_drawCurrentGameStateDescription();
|
||||
int ui_handleSaveLoad(int saveOrLoad);
|
||||
void ui_handleOptions(int forceDisplay);
|
||||
void ui_drawActionsPanel(int dstX, int dstY, int deltaX, int deltaY);
|
||||
void ui_drawConversationPanelBorder(int dstY, int srcX, int srcY);
|
||||
void ui_drawConversationPanel();
|
||||
void ui_printStatusString(const char *str);
|
||||
void ui_clearStatusString();
|
||||
int ui_displayQuitDialog();
|
||||
void ui_displayTextMode(int str);
|
||||
|
||||
|
||||
Common::Language _language;
|
||||
Common::RandomSource _rnd;
|
||||
|
||||
Common::Point _inp_mousePos;
|
||||
bool _inp_mouseButtonClicked;
|
||||
bool _inp_mouseButtonPressed;
|
||||
int _disabledInputCounter;
|
||||
bool _hideInventoryTexts;
|
||||
|
||||
bool _displayQuitDialog;
|
||||
int _saveLoadCurrentPage;
|
||||
int _saveLoadCurrentSlot;
|
||||
bool _saveLoadMarks[NUM_GAMESTATE_FILES];
|
||||
char _saveLoadCurrentDescription[33];
|
||||
int _saveLoadCurrentDescriptionLen;
|
||||
|
||||
int _defaultSoundPriority;
|
||||
int _newMusicNum;
|
||||
int _currentMusicNum;
|
||||
int _newSoundNum;
|
||||
int _newSoundDelay;
|
||||
int _newSoundPriority;
|
||||
int _playSoundCounter;
|
||||
Audio::SoundHandle _sfxHandle;
|
||||
Audio::SoundHandle _speechHandle;
|
||||
MidiContext _snd_midiContext;
|
||||
|
||||
int16 _inventoryList1[101];
|
||||
int16 _inventoryList2[101];
|
||||
int16 _inventoryList3[7];
|
||||
int16 *_inventoryListPtrs[3];
|
||||
int16 _inventoryListCount[9];
|
||||
int16 _inventoryItemsInfoTable[NUM_INVENTORY_ITEMS];
|
||||
int16 *_inventoryVar1;
|
||||
int16 *_inventoryVar2;
|
||||
int _currentCursorObject;
|
||||
|
||||
int _talkTextMode;
|
||||
int _talkListEnd;
|
||||
int _talkListCurrent;
|
||||
bool _talkTextRectDefined;
|
||||
bool _talkTextDisplayed;
|
||||
bool _talkTextInitialized;
|
||||
bool _skipTalkText;
|
||||
int _talkTextSpeed;
|
||||
int _keyCharTalkCounter;
|
||||
int _talkTableLastTalkingKeyChar;
|
||||
int _talkTableLastOtherKeyChar;
|
||||
int _talkTableLastStringNum;
|
||||
int _objectDescriptionNum;
|
||||
char _talkTextBuffer[200];
|
||||
TalkEntry _talkTable[NUM_TALK_ENTRIES];
|
||||
|
||||
bool _conversationChoicesUpdated;
|
||||
int _conversationReplyNum;
|
||||
bool _conversationEnded;
|
||||
int _conversationNum;
|
||||
int _drawCharacterConversionRepeatCounter;
|
||||
int _currentConversation;
|
||||
bool _disableConversationScript;
|
||||
bool _conversationAreaCleared;
|
||||
ConversationChoice _conversationChoicesTable[NUM_CONVERSATION_CHOICES];
|
||||
|
||||
int16 _flagsTable[NUM_FLAGS];
|
||||
KeyChar _keyCharsTable[NUM_KEYCHARS];
|
||||
KeyChar *_sortedKeyCharsTable[NUM_KEYCHARS];
|
||||
int _currentKeyCharNum;
|
||||
|
||||
int _newEpisodeNum;
|
||||
int _currentEpisodeNum;
|
||||
|
||||
Area _areaTable[NUM_AREAS];
|
||||
int _areaTableCount;
|
||||
|
||||
int _currentAmountOfMoney;
|
||||
int _giveItemToKeyCharNum;
|
||||
int _giveItemToObjectNum;
|
||||
int _giveItemToCounter;
|
||||
int _currentRoomNum;
|
||||
int _waitingSetKeyCharNum1;
|
||||
int _waitingSetKeyCharNum2;
|
||||
int _waitingSetKeyCharNum3;
|
||||
uint8 _updatedRoomAreasTable[200];
|
||||
Common::Rect _moveKeyCharRect;
|
||||
Common::Point _screenOffset;
|
||||
int _currentObjectNum;
|
||||
int _processRandomPaletteCounter;
|
||||
int16 _spriteScalingIndex[1000];
|
||||
int16 _spriteScalingTable[1000];
|
||||
|
||||
bool _fastWalkMode;
|
||||
|
||||
AnimationEntry _animationTable[NUM_ANIMATION_ENTRIES];
|
||||
|
||||
Script _script;
|
||||
|
||||
Common::File _fData;
|
||||
Common::File _fSpeech[2];
|
||||
int _compressedSpeechData;
|
||||
|
||||
uint8 *_textData;
|
||||
uint8 *_backdropBuffer;
|
||||
uint8 *_menuKitData;
|
||||
uint8 *_convKitData;
|
||||
uint8 *_sequenceDataTable[5];
|
||||
uint8 *_programData;
|
||||
uint32 _programDataSize;
|
||||
uint8 *_mouseData;
|
||||
uint8 *_iconData;
|
||||
|
||||
SequenceEntry _sequenceEntryTable[NUM_SEQUENCES];
|
||||
int _currentBitmapWidth;
|
||||
int _currentBitmapHeight;
|
||||
int _currentImageWidth;
|
||||
int _currentImageHeight;
|
||||
bool _speechPlaying;
|
||||
int _roomWidth;
|
||||
|
||||
uint8 *_programTextDataPtr;
|
||||
Common::Array<Common::Rect> _programRectsTable;
|
||||
Common::Array<ProgramPointData> _programPointsTable;
|
||||
Common::Array<ProgramWalkData> _programWalkTable;
|
||||
Common::Array<ProgramAreaData> _programAreaTable;
|
||||
Common::Array<ProgramBackgroundData> _programBackgroundTable;
|
||||
Common::Array<ProgramHitBoxData> _programHitBoxTable;
|
||||
Common::Array<ProgramActionScriptOffsetData> _programActionScriptOffsetTable;
|
||||
Common::Array<ProgramKeyCharScriptOffsetData> _programKeyCharScriptOffsetTable;
|
||||
Common::Array<ProgramConversationData> _programConversationTable;
|
||||
Common::Rect _cursorObjectRect;
|
||||
Common::Rect _talkTextRect, _talkTextRect2;
|
||||
Common::Rect _screenRect;
|
||||
Common::Rect _roomAreaRect;
|
||||
|
||||
bool _roomNeedRedraw;
|
||||
int _fullRedrawCounter;
|
||||
int _redrawScreenCounter1;
|
||||
uint8 *_offscreenBuffer;
|
||||
uint8 _paletteBuffer[256 * 4];
|
||||
|
||||
static OpcodeProc _opcodesTable[NUM_OPCODES];
|
||||
static SpriteData _spritesTable[NUM_SPRITES];
|
||||
static const uint8 _directionsTable[];
|
||||
static char _saveLoadDescriptionsTable[10][33];
|
||||
static const Common::Rect _inventoryAreasTable[13];
|
||||
};
|
||||
|
||||
/*
|
||||
FLAGS LIST
|
||||
|
||||
115 : don't set backdrop palette on room loading
|
||||
118 : current amount of money
|
||||
119 : current cursor object
|
||||
176 : keychar max direction
|
||||
266 : keychar direction override
|
||||
267 : don't decode picture/sprite images (in load_image_helper)
|
||||
268 : don't decode picture/sprite images
|
||||
270 : play random sound
|
||||
290 : process random palette
|
||||
295 : game cycle counter (incremented)
|
||||
296 : game cycle counter (incremented)
|
||||
297 : game cycle counter (incremented)
|
||||
298 : game cycle counter (decremented)
|
||||
299 : game cycle counter (decremented)
|
||||
600 : last ascii key press
|
||||
603 : fade palette "scale" increment (in vbl handler)
|
||||
605 : fade palette "scale"
|
||||
606 : inventory redraw disabled
|
||||
607 : first palette color to fade
|
||||
608 : last palette color to fade
|
||||
609 : max fade palette "scale"
|
||||
610 : min fade palette "scale"
|
||||
611 : quit game
|
||||
612 : random number modulo
|
||||
613 : last generated random number
|
||||
614 : room scroll x offset
|
||||
615 : room scroll y offset
|
||||
616 : disable room scrolling
|
||||
617 : current speech file number
|
||||
621 : enable french version "features"
|
||||
902 : debug/draw walk boxes
|
||||
911 : load scripts/programs from external files
|
||||
*/
|
||||
|
||||
} // namespace Touche
|
||||
|
||||
#endif
|
557
engines/touche/ui.cpp
Normal file
557
engines/touche/ui.cpp
Normal file
@ -0,0 +1,557 @@
|
||||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2006 The ScummVM project
|
||||
*
|
||||
* 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 "common/stdafx.h"
|
||||
#include "common/system.h"
|
||||
#include "common/savefile.h"
|
||||
|
||||
#include "touche/graphics.h"
|
||||
#include "touche/touche.h"
|
||||
|
||||
namespace Touche {
|
||||
|
||||
static const Common::Rect buttonsRectTable1[15] = {
|
||||
Common::Rect(108, 120, 444, 135),
|
||||
Common::Rect(108, 136, 444, 151),
|
||||
Common::Rect(108, 152, 444, 167),
|
||||
Common::Rect(108, 168, 444, 183),
|
||||
Common::Rect(108, 184, 444, 199),
|
||||
Common::Rect(108, 200, 444, 215),
|
||||
Common::Rect(108, 216, 444, 231),
|
||||
Common::Rect(108, 232, 444, 247),
|
||||
Common::Rect(108, 248, 444, 263),
|
||||
Common::Rect(108, 264, 444, 279),
|
||||
Common::Rect(452, 120, 546, 144),
|
||||
Common::Rect(452, 152, 546, 176),
|
||||
Common::Rect(452, 216, 546, 240),
|
||||
Common::Rect(452, 248, 546, 272),
|
||||
Common::Rect(452, 184, 546, 208)
|
||||
};
|
||||
|
||||
static const Common::Rect buttonsRectTable2[10] = {
|
||||
Common::Rect(396, 130, 420, 154),
|
||||
Common::Rect(396, 160, 420, 184),
|
||||
Common::Rect(396, 190, 420, 214),
|
||||
Common::Rect(126, 130, 380, 154),
|
||||
Common::Rect(126, 160, 380, 184),
|
||||
Common::Rect(126, 190, 380, 214),
|
||||
Common::Rect(126, 250, 150, 274),
|
||||
Common::Rect(396, 250, 420, 274),
|
||||
Common::Rect(154, 256, 392, 268),
|
||||
Common::Rect(126, 222, 420, 242)
|
||||
};
|
||||
|
||||
static int16 settingsMenuTextsTable[] = { 0, 0, 0, -92, -93, -94, -87, -88, 0, -91 };
|
||||
|
||||
static const int16 optionsMenuTextsTable[] = { -52, -53, -54, -55, -90 };
|
||||
|
||||
static const int16 saveMenuTextsTable[] = { 2000, -56, -52, 2001, 0 };
|
||||
|
||||
static const int16 loadMenuTextsTable[] = { 2000, -56, -53, 2001, 0 };
|
||||
|
||||
bool ToucheEngine::ui_processEvents() {
|
||||
bool quit = false;
|
||||
OSystem::Event event;
|
||||
while (_system->pollEvent(event)) {
|
||||
switch (event.type) {
|
||||
case OSystem::EVENT_QUIT:
|
||||
quit = true;
|
||||
break;
|
||||
case OSystem::EVENT_KEYDOWN:
|
||||
if (_saveLoadCurrentDescriptionLen != -1) {
|
||||
if (event.kbd.keycode == 8) {
|
||||
if (_saveLoadCurrentDescriptionLen > 0) {
|
||||
--_saveLoadCurrentDescriptionLen;
|
||||
_saveLoadCurrentDescription[_saveLoadCurrentDescriptionLen] = 0;
|
||||
}
|
||||
} else if (isprint((char)event.kbd.ascii)) {
|
||||
if (_saveLoadCurrentDescriptionLen < 32) {
|
||||
_saveLoadCurrentDescription[_saveLoadCurrentDescriptionLen] = (char)event.kbd.ascii;
|
||||
++_saveLoadCurrentDescriptionLen;
|
||||
_saveLoadCurrentDescription[_saveLoadCurrentDescriptionLen] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case OSystem::EVENT_MOUSEMOVE:
|
||||
_inp_mousePos.x = event.mouse.x;
|
||||
_inp_mousePos.y = event.mouse.y;
|
||||
break;
|
||||
case OSystem::EVENT_LBUTTONDOWN:
|
||||
_inp_mousePos.x = event.mouse.x;
|
||||
_inp_mousePos.y = event.mouse.y;
|
||||
_inp_mouseButtonClicked = true;
|
||||
break;
|
||||
case OSystem::EVENT_LBUTTONUP:
|
||||
_inp_mousePos.x = event.mouse.x;
|
||||
_inp_mousePos.y = event.mouse.y;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
_system->updateScreen();
|
||||
_system->delayMillis(50);
|
||||
return quit;
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawButtonBorders(const Common::Rect *r, int count) {
|
||||
while (count--) {
|
||||
Graphics::drawRect(_offscreenBuffer, 640, r->left, r->top, r->width(), r->height(), 0xF7, 0xF9);
|
||||
++r;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawMusicVolumeBar() {
|
||||
int volume = _snd_midiContext.volume * 232 / 256;
|
||||
if (volume != 0) {
|
||||
Graphics::fillRect(_offscreenBuffer, 640, 157, 259, volume, 6, 0xF0);
|
||||
}
|
||||
if (volume <= 232) {
|
||||
Graphics::fillRect(_offscreenBuffer, 640, 157 + volume, 259, 232 - volume, 6, 0xD2);
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawTalkMode() {
|
||||
settingsMenuTextsTable[0] = 0;
|
||||
settingsMenuTextsTable[1] = 0;
|
||||
settingsMenuTextsTable[2] = 0;
|
||||
settingsMenuTextsTable[_talkTextMode] = -86;
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawAllBorders() {
|
||||
Graphics::fillRect(_offscreenBuffer, 640, 90, 102, 460, 196, 248);
|
||||
Graphics::drawRect(_offscreenBuffer, 640, 90, 102, 460, 196, 0xF7, 0xF9);
|
||||
Graphics::drawRect(_offscreenBuffer, 640, 106, 118, 340, 164, 0xF9, 0xF7);
|
||||
ui_drawButtonBorders(&buttonsRectTable1[10], 5);
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawSaveGamesList(int page) {
|
||||
ui_drawAllBorders();
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
const Common::Rect *r = &buttonsRectTable1[i];
|
||||
uint8 color = (_saveLoadCurrentSlot == i) ? 0xCB : 0xD9;
|
||||
char num[10];
|
||||
sprintf(num, "%d.", page + i);
|
||||
Graphics::drawString16(_offscreenBuffer, 640, color, r->left, r->top, num);
|
||||
Graphics::drawString16(_offscreenBuffer, 640, color, r->left + 30, r->top, _saveLoadDescriptionsTable[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawCurrentGameStateDescription() {
|
||||
const Common::Rect *r = &buttonsRectTable1[_saveLoadCurrentSlot];
|
||||
Graphics::fillRect(_offscreenBuffer, 640, r->left, r->top, r->width(), r->height(), 0xF8);
|
||||
|
||||
int y = r->top;
|
||||
int x = r->left;
|
||||
char num[10];
|
||||
sprintf(num, "%d.", _saveLoadCurrentSlot);
|
||||
Graphics::drawString16(_offscreenBuffer, 640, 0xCB, x, y, num);
|
||||
x += 30;
|
||||
Graphics::drawString16(_offscreenBuffer, 640, 0xCB, x, y, _saveLoadCurrentDescription);
|
||||
x += Graphics::getStringWidth16(_saveLoadCurrentDescription);
|
||||
Graphics::drawString16(_offscreenBuffer, 640, 0xCB, x, y, "_");
|
||||
|
||||
updateScreenArea(_offscreenBuffer, 640, r->left, r->top, r->left, r->top, r->width(), r->height());
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawSaveLoadMenu(int page, int saveOrLoad) {
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
_saveLoadDescriptionsTable[i][0] = 0;
|
||||
const int gameState = page + i;
|
||||
if (_saveLoadMarks[gameState]) {
|
||||
readGameStateDescription(gameState, _saveLoadDescriptionsTable[i], 32);
|
||||
}
|
||||
}
|
||||
ui_drawSaveGamesList(page);
|
||||
if (saveOrLoad == 0) {
|
||||
ui_drawButtonText(loadMenuTextsTable, &buttonsRectTable1[10], 5, true);
|
||||
} else {
|
||||
ui_drawButtonText(saveMenuTextsTable, &buttonsRectTable1[10], 5, true);
|
||||
}
|
||||
updateScreenArea(_offscreenBuffer, 640, 90, 102, 90, 102, 460, 196);
|
||||
}
|
||||
|
||||
int ToucheEngine::ui_getButtonPressed(const Common::Rect *r, int count) const {
|
||||
for (int i = 0; i < count; ++i) {
|
||||
if (r[i].contains(_inp_mousePos)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawButtonText(const int16 *texts, const Common::Rect *r, int count, bool centerTexts) {
|
||||
for (int i = 0; i < count; ++i, ++texts, ++r) {
|
||||
int x, y;
|
||||
if (*texts < 2000) {
|
||||
const char *str = getString(*texts);
|
||||
x = r->left;
|
||||
y = r->top;
|
||||
if (centerTexts) {
|
||||
const int w = getStringWidth(16, *texts);
|
||||
x += (r->width() - w) / 2;
|
||||
y += (r->height() - 16) / 2;
|
||||
}
|
||||
Graphics::drawString16(_offscreenBuffer, 640, 0xFF, x, y, str);
|
||||
} else {
|
||||
x = r->left + r->width() / 2;
|
||||
y = r->top + r->height() / 2;
|
||||
int dx, dy;
|
||||
switch (*texts) {
|
||||
case 2000: // up arrow
|
||||
dx = 1;
|
||||
dy = 2;
|
||||
break;
|
||||
case 2001: // down arrow
|
||||
dx = -1;
|
||||
dy = -2;
|
||||
break;
|
||||
}
|
||||
ui_drawArrow(x, y + dy + 1, dx, 0xD2);
|
||||
ui_drawArrow(x, y + dy, dx, 0xFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawArrow(int x, int y, int dx, uint8 color) {
|
||||
static const int16 arrowCoordsTable[] = {
|
||||
5, 0, 9, 0,
|
||||
5, 0, 5, 4,
|
||||
-5, 4, 5, 4,
|
||||
-5, 0, -5, 4,
|
||||
-9, 0, -5, 0,
|
||||
-9, 0, 0, -9,
|
||||
0, -9, 9, 0
|
||||
};
|
||||
for (uint i = 0; i < ARRAYSIZE(arrowCoordsTable) / 4; ++i) {
|
||||
const int x1 = x + arrowCoordsTable[i * 4 + 0];
|
||||
const int y1 = y + arrowCoordsTable[i * 4 + 1] * dx;
|
||||
const int x2 = x + arrowCoordsTable[i * 4 + 2];
|
||||
const int y2 = y + arrowCoordsTable[i * 4 + 3] * dx;
|
||||
Graphics::drawLine(_offscreenBuffer, 640, x1, y1, x2, y2, color);
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawOptionsMenu() {
|
||||
ui_drawTalkMode();
|
||||
ui_drawAllBorders();
|
||||
ui_drawButtonText(optionsMenuTextsTable, &buttonsRectTable1[10], 5, true);
|
||||
ui_drawButtonBorders(buttonsRectTable2, 10);
|
||||
ui_drawButtonText(settingsMenuTextsTable, buttonsRectTable2, 10, true);
|
||||
ui_drawMusicVolumeBar();
|
||||
updateScreenArea(_offscreenBuffer, 640, 90, 102, 90, 102, 460, 196);
|
||||
}
|
||||
|
||||
int ToucheEngine::ui_handleSaveLoad(int saveOrLoad) {
|
||||
char gameStateFileName[16];
|
||||
generateGameStateFileName(999, gameStateFileName, 15, true);
|
||||
_saveFileMan->listSavefiles(gameStateFileName, _saveLoadMarks, NUM_GAMESTATE_FILES);
|
||||
int ret = 0;
|
||||
bool quitMenu = false;
|
||||
while (!quitMenu) {
|
||||
_saveLoadCurrentDescription[0] = 0;
|
||||
_saveLoadCurrentDescriptionLen = 0;
|
||||
ui_drawSaveLoadMenu(_saveLoadCurrentPage, saveOrLoad);
|
||||
int descriptionLen = 0;
|
||||
int button = -1;
|
||||
while (button == -1 && !quitMenu) {
|
||||
button = ui_getButtonPressed(buttonsRectTable1, 15);
|
||||
if (!_inp_mouseButtonClicked) {
|
||||
button = -1;
|
||||
}
|
||||
if (saveOrLoad == 0) {
|
||||
_saveLoadCurrentPage = (_saveLoadCurrentSlot / 10) * 10;
|
||||
if (_saveLoadCurrentDescriptionLen != descriptionLen) {
|
||||
descriptionLen = _saveLoadCurrentDescriptionLen;
|
||||
ui_drawCurrentGameStateDescription();
|
||||
strcpy(_saveLoadDescriptionsTable[_saveLoadCurrentSlot % 10], _saveLoadCurrentDescription);
|
||||
}
|
||||
}
|
||||
quitMenu = ui_processEvents();
|
||||
}
|
||||
_inp_mouseButtonClicked = false;
|
||||
switch (button) {
|
||||
case 10:
|
||||
_saveLoadCurrentPage -= 10;
|
||||
if (_saveLoadCurrentPage < 0) {
|
||||
_saveLoadCurrentPage = 90;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
quitMenu = true;
|
||||
ret = 0;
|
||||
break;
|
||||
case 12:
|
||||
quitMenu = true;
|
||||
ret = 1;
|
||||
if (saveOrLoad == 0) {
|
||||
if (saveGameState(_saveLoadCurrentSlot, _saveLoadDescriptionsTable[_saveLoadCurrentSlot % 10])) {
|
||||
ret = 2;
|
||||
}
|
||||
} else {
|
||||
if (loadGameState(_saveLoadCurrentSlot, _saveLoadDescriptionsTable[_saveLoadCurrentSlot % 10])) {
|
||||
ret = 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
_saveLoadCurrentPage += 10;
|
||||
if (_saveLoadCurrentPage > 90) {
|
||||
_saveLoadCurrentPage = 0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (button >= 0 && button <= 9) {
|
||||
_saveLoadCurrentSlot = _saveLoadCurrentPage + button;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_handleOptions(int forceDisplay) {
|
||||
if (_disabledInputCounter == 0 || forceDisplay != 0) {
|
||||
_saveLoadCurrentDescriptionLen = -1;
|
||||
updateCursor(_currentKeyCharNum);
|
||||
int16 mode = _flagsTable[618];
|
||||
_flagsTable[618] = 0;
|
||||
updateEntireScreen();
|
||||
bool quitMenu = false;
|
||||
while (!quitMenu) {
|
||||
ui_drawOptionsMenu();
|
||||
int button = -1;
|
||||
while (button == -1 && !quitMenu) {
|
||||
if (_inp_mouseButtonClicked) {
|
||||
button = ui_getButtonPressed(buttonsRectTable1, 15);
|
||||
if (button < 10) {
|
||||
button = ui_getButtonPressed(buttonsRectTable2, 10) + 20;
|
||||
}
|
||||
}
|
||||
quitMenu = ui_processEvents();
|
||||
}
|
||||
_inp_mouseButtonClicked = false;
|
||||
switch (button) {
|
||||
case 10:
|
||||
if (ui_handleSaveLoad(1) == 2) {
|
||||
quitMenu = true;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (ui_handleSaveLoad(0) == 2) {
|
||||
quitMenu = true;
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
quitMenu = true;
|
||||
break;
|
||||
case 13:
|
||||
quitMenu = true;
|
||||
_flagsTable[611] = 1;
|
||||
break;
|
||||
case 14:
|
||||
restart();
|
||||
quitMenu = true;
|
||||
break;
|
||||
case 20:
|
||||
_talkTextMode = kTalkModeTextOnly;
|
||||
break;
|
||||
case 21:
|
||||
_talkTextMode = kTalkModeVoiceOnly;
|
||||
break;
|
||||
case 22:
|
||||
_talkTextMode = kTalkModeVoiceAndText;
|
||||
break;
|
||||
case 26:
|
||||
if (_snd_midiContext.volume > 0) {
|
||||
_snd_midiContext.volume -= 16;
|
||||
}
|
||||
break;
|
||||
case 27:
|
||||
if (_snd_midiContext.volume < 256) {
|
||||
_snd_midiContext.volume += 16;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
_fullRedrawCounter = 2;
|
||||
_flagsTable[618] = mode;
|
||||
if (_flagsTable[611] != 0) {
|
||||
_flagsTable[611] = ui_displayQuitDialog();
|
||||
}
|
||||
_snd_midiContext.currentVolume = _snd_midiContext.volume;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawActionsPanel(int dstX, int dstY, int deltaX, int deltaY) {
|
||||
Graphics::copyRect(_offscreenBuffer, 640, dstX, dstY,
|
||||
_menuKitData, 42, 0, 0,
|
||||
14, 24,
|
||||
Graphics::kTransparent);
|
||||
Graphics::copyRect(_offscreenBuffer, 640, deltaX - 14 + dstX, dstY,
|
||||
_menuKitData, 42, 0, 40,
|
||||
14, 24,
|
||||
Graphics::kTransparent);
|
||||
Graphics::copyRect(_offscreenBuffer, 640, dstX, deltaY - 16 + dstY,
|
||||
_menuKitData, 42, 0, 24,
|
||||
14, 16,
|
||||
Graphics::kTransparent);
|
||||
Graphics::copyRect(_offscreenBuffer, 640, deltaX - 14 + dstX, deltaY - 16 + dstY,
|
||||
_menuKitData, 42, 0, 64,
|
||||
14, 16,
|
||||
Graphics::kTransparent);
|
||||
int x1 = deltaX - 28;
|
||||
int x2 = dstX + 14;
|
||||
while (x1 > 0) {
|
||||
int w = (x1 > 14) ? 14 : x1;
|
||||
Graphics::copyRect(_offscreenBuffer, 640, x2, dstY,
|
||||
_menuKitData, 42, 0, 80,
|
||||
w, 24,
|
||||
Graphics::kTransparent);
|
||||
Graphics::copyRect(_offscreenBuffer, 640, x2, deltaY - 16 + dstY,
|
||||
_menuKitData, 42, 0, 104,
|
||||
w, 16,
|
||||
Graphics::kTransparent);
|
||||
x1 -= 14;
|
||||
x2 += 14;
|
||||
}
|
||||
x1 = deltaY - 40;
|
||||
x2 = dstY + 24;
|
||||
while (x1 > 0) {
|
||||
int w = (x1 > 120) ? 120 : x1;
|
||||
Graphics::copyRect(_offscreenBuffer, 640, dstX, x2,
|
||||
_menuKitData, 42, 14, 0,
|
||||
14, w,
|
||||
Graphics::kTransparent);
|
||||
Graphics::copyRect(_offscreenBuffer, 640, deltaX - 14 + dstX, x2,
|
||||
_menuKitData, 42, 28, 0,
|
||||
14, w,
|
||||
Graphics::kTransparent);
|
||||
x1 -= 120;
|
||||
x2 += 120;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawConversationPanelBorder(int dstY, int srcX, int srcY) {
|
||||
int dstX = 24;
|
||||
int w = 48;
|
||||
for (int i = 0; i < 13; ++i) {
|
||||
if (i == 12) {
|
||||
w = 34;
|
||||
}
|
||||
Graphics::copyRect(_offscreenBuffer, 640, dstX, dstY, _convKitData, 152, srcX, srcY, w, 6);
|
||||
dstX += w;
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_drawConversationPanel() {
|
||||
Graphics::copyRect(_offscreenBuffer, 640, 0, 320, _convKitData, 152, 0, 0, 72, 80);
|
||||
int dstX = 54;
|
||||
int dstY = 326;
|
||||
int w = 96;
|
||||
for (int i = 0; i < 7; ++i) {
|
||||
if (i == 5) {
|
||||
w = 50;
|
||||
}
|
||||
Graphics::copyRect(_offscreenBuffer, 640, dstX, dstY, _convKitData, 152, 24, 6, w, 68);
|
||||
dstX += w;
|
||||
}
|
||||
--dstX;
|
||||
Graphics::copyRect(_offscreenBuffer, 640, dstX, 320, _convKitData, 152, 120, 0, 7, 80);
|
||||
dstX -= 3;
|
||||
if (_drawCharacterConversionRepeatCounter != 0) {
|
||||
ui_drawConversationPanelBorder(320, 72, 0);
|
||||
Graphics::copyRect(_offscreenBuffer, 640, 0, 320, _convKitData, 152, 128, 0, 24, 21);
|
||||
Graphics::copyRect(_offscreenBuffer, 640, dstX, 320, _convKitData, 152, 128, 34, 10, 10);
|
||||
} else {
|
||||
ui_drawConversationPanelBorder(320, 24, 0);
|
||||
}
|
||||
if (_conversationChoicesTable[_drawCharacterConversionRepeatCounter + 4].msg != 0) {
|
||||
ui_drawConversationPanelBorder(394, 72, 74);
|
||||
Graphics::copyRect(_offscreenBuffer, 640, 0, 379, _convKitData, 152, 128, 59, 24, 21);
|
||||
Graphics::copyRect(_offscreenBuffer, 640, dstX, 394, _convKitData, 152, 128, 46, 10, 6);
|
||||
} else {
|
||||
ui_drawConversationPanelBorder(394, 24, 74);
|
||||
}
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_printStatusString(const char *str) {
|
||||
Graphics::fillRect(_offscreenBuffer, 640, 0, 0, 640, 16, 0xD7);
|
||||
Graphics::drawRect(_offscreenBuffer, 640, 0, 0, 640, 16, 0xD6, 0xD8);
|
||||
Graphics::drawString16(_offscreenBuffer, 640, 0xFF, 0, 0, str);
|
||||
updateScreenArea(_offscreenBuffer, 640, 0, 0, 0, 0, 640, 16);
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_clearStatusString() {
|
||||
Graphics::copyRect(_offscreenBuffer, 640, 0, 0,
|
||||
_backdropBuffer, _currentBitmapWidth, _flagsTable[614], _flagsTable[615],
|
||||
640, 16);
|
||||
updateScreenArea(_offscreenBuffer, 640, 0, 0, 0, 0, 640, 16);
|
||||
}
|
||||
|
||||
int ToucheEngine::ui_displayQuitDialog() {
|
||||
debug(kDebugUserIntf, "ui_displayQuitDialog()");
|
||||
ui_printStatusString(getString(-85));
|
||||
int ret = 0;
|
||||
bool quitLoop = false;
|
||||
while (!quitLoop) {
|
||||
OSystem::Event event;
|
||||
while (_system->pollEvent(event)) {
|
||||
switch (event.type) {
|
||||
case OSystem::EVENT_QUIT:
|
||||
quitLoop = true;
|
||||
ret = 1;
|
||||
break;
|
||||
case OSystem::EVENT_KEYDOWN:
|
||||
quitLoop = true;
|
||||
switch (_language) {
|
||||
case Common::FR_FRA:
|
||||
if (event.kbd.ascii == 'o' || event.kbd.ascii == 'O') {
|
||||
ret = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (event.kbd.ascii == 'y' || event.kbd.ascii == 'Y') {
|
||||
ret = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
_system->delayMillis(50);
|
||||
}
|
||||
ui_clearStatusString();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ToucheEngine::ui_displayTextMode(int str) {
|
||||
debug(kDebugUserIntf, "ui_displayTextMode(%d)", str);
|
||||
ui_printStatusString(getString(str));
|
||||
_system->delayMillis(1000);
|
||||
ui_clearStatusString();
|
||||
}
|
||||
|
||||
} // namespace Touche
|
Loading…
Reference in New Issue
Block a user