Merged revisions 32507-32513,32516,32518,32520-32521,32523-32524,32526-32548,32550-32562 via svnmerge from

https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r32563
This commit is contained in:
Christopher Page 2008-06-05 21:20:35 +00:00
commit cae6396ce7
68 changed files with 4772 additions and 2656 deletions

13
AUTHORS
View File

@ -81,14 +81,14 @@ ScummVM Team
Paul Gilbert
M4:
Torbjorn Andersson
Torbjorn Andersson
Paul Gilbert
Benjamin Haisch
Filippos Karapetis
Benjamin Haisch
Filippos Karapetis
MADE:
Benjamin Haisch
Benjamin Haisch
Parallaction:
peres
@ -139,6 +139,9 @@ ScummVM Team
Jurgen Braam
Lars Persson
Wii:
Andre Heider
Other subsystems
----------------
Infrastructure:

View File

@ -24,7 +24,7 @@ CXXFLAGS:= -Wall $(CXXFLAGS)
# Turn off some annoying and not-so-useful warnings
CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
# Enable even more warnings...
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wcast-align
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wwrite-strings
# Disable RTTI and exceptions, and enabled checking of pointers returned by "new"

View File

@ -25,7 +25,7 @@
//#include <NDS/ARM9/console.h> //basic print funcionality
#include "backends/fs/ds/ds-fs.h"
#include "dsmain.h"
#include "gba_nds_fat.h"
#include "fat/gba_nds_fat.h"

View File

@ -28,7 +28,7 @@
#include "zipreader.h"
#include "ramsave.h"
#include "scummconsole.h"
#include "gba_nds_fat.h"
#include "fat/gba_nds_fat.h"
#include "backends/fs/abstract-fs.h"
namespace DS {

View File

@ -8,26 +8,42 @@
* 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 CRUISE_STRING_SUPPORT_H
#define CRSUIE_STRING_SUPPORT_H
#if defined(__WII__)
namespace Cruise {
#include <unistd.h>
} // End of namespace Cruise
#include "backends/fs/wii/wii-fs-factory.h"
#include "backends/fs/wii/wii-fs.cpp"
DECLARE_SINGLETON(WiiFilesystemFactory);
AbstractFilesystemNode *WiiFilesystemFactory::makeRootFileNode() const {
return new WiiFilesystemNode();
}
AbstractFilesystemNode *WiiFilesystemFactory::makeCurrentDirectoryFileNode() const {
char buf[MAXPATHLEN];
if (getcwd(buf, MAXPATHLEN))
return new WiiFilesystemNode(buf, true);
else
return new WiiFilesystemNode();
}
AbstractFilesystemNode *WiiFilesystemFactory::makeFileNodePath(const String &path) const {
return new WiiFilesystemNode(path, true);
}
#endif

View File

@ -8,23 +8,43 @@
* 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 "cruise/cruise_main.h"
#ifndef _WII_FILESYSTEM_FACTORY_H_
#define _WII_FILESYSTEM_FACTORY_H_
namespace Cruise {
#include "common/singleton.h"
#include "backends/fs/fs-factory.h"
/**
* Creates WiiFilesystemNode objects.
*
* Parts of this class are documented in the base interface class, FilesystemFactory.
*/
class WiiFilesystemFactory : public FilesystemFactory, public Common::Singleton<WiiFilesystemFactory> {
public:
typedef Common::String String;
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
protected:
WiiFilesystemFactory() {};
private:
friend class Common::Singleton<SingletonBaseType>;
};
#endif /*Wii_FILESYSTEM_FACTORY_H*/
} // End of namespace Cruise

196
backends/fs/wii/wii-fs.cpp Normal file
View File

@ -0,0 +1,196 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#if defined(__WII__)
#include "backends/fs/abstract-fs.h"
#include <sys/dir.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
/**
* Implementation of the ScummVM file system API based on Wii.
*
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class WiiFilesystemNode : public AbstractFilesystemNode {
protected:
String _displayName;
String _path;
bool _isDirectory, _isReadable, _isWritable;
public:
/**
* Creates a WiiFilesystemNode with the root node as path.
*/
WiiFilesystemNode();
/**
* Creates a WiiFilesystemNode for a given path.
*
* @param path String with the path the new node should point to.
* @param verify true if the isValid and isDirectory flags should be verified during the construction.
*/
WiiFilesystemNode(const String &path, bool verify);
virtual bool exists() const;
virtual String getDisplayName() const { return _displayName; }
virtual String getName() const { return _displayName; }
virtual String getPath() const { return _path; }
virtual bool isDirectory() const { return _isDirectory; }
virtual bool isReadable() const { return _isReadable; }
virtual bool isWritable() const { return _isWritable; }
virtual AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
private:
virtual void setFlags();
};
/**
* Returns the last component of a given path.
*
* Examples:
* /foo/bar.txt would return /bar.txt
* /foo/bar/ would return /bar/
*
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
const char *lastPathComponent(const Common::String &str) {
if(str.empty())
return "";
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
while (cur >= start && *cur != '/') {
--cur;
}
return cur + 1;
}
void WiiFilesystemNode::setFlags() {
struct stat st;
_isDirectory = false;
_isReadable = false;
_isWritable = false;
if (!stat(_path.c_str(), &st)) {
_isDirectory = S_ISDIR(st.st_mode);
_isReadable = (st.st_mode & S_IRUSR) > 0;
_isWritable = (st.st_mode & S_IWUSR) > 0;
}
}
WiiFilesystemNode::WiiFilesystemNode() {
// The root dir.
_path = "fat:/";
_displayName = _path;
setFlags();
}
WiiFilesystemNode::WiiFilesystemNode(const String &p, bool verify) {
assert(p.size() > 0);
_path = p;
_displayName = lastPathComponent(_path);
if (verify)
setFlags();
}
bool WiiFilesystemNode::exists() const {
struct stat st;
return stat(_path.c_str (), &st) == 0;
}
AbstractFilesystemNode *WiiFilesystemNode::getChild(const String &n) const {
assert(_isDirectory);
String newPath(_path);
if (newPath.lastChar() != '/')
newPath += '/';
newPath += n;
return new WiiFilesystemNode(newPath, true);
}
bool WiiFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
assert(_isDirectory);
DIR_ITER* dp = diropen (_path.c_str());
if (dp == NULL)
return false;
char filename[MAXPATHLEN];
struct stat st;
while (dirnext(dp, filename, &st) == 0) {
if (strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0)
continue;
String newPath(_path);
if (newPath.lastChar() != '/')
newPath += '/';
newPath += filename;
bool isDir = S_ISDIR(st.st_mode);
if ((mode == FilesystemNode::kListFilesOnly && isDir) ||
(mode == FilesystemNode::kListDirectoriesOnly && !isDir))
continue;
if (isDir)
newPath += '/';
myList.push_back(new WiiFilesystemNode(newPath, true));
}
dirclose(dp);
return true;
}
AbstractFilesystemNode *WiiFilesystemNode::getParent() const {
if (_path == "/")
return 0;
const char *start = _path.c_str();
const char *end = lastPathComponent(_path);
return new WiiFilesystemNode(String(start, end - start), true);
}
#endif //#if defined(__WII__)

View File

@ -9,6 +9,7 @@ MODULE_OBJS := \
fs/psp/psp-fs-factory.o \
fs/symbian/symbian-fs-factory.o \
fs/windows/windows-fs-factory.o \
fs/wii/wii-fs-factory.o \
events/default/default-events.o \
midi/alsa.o \
midi/camd.o \

View File

@ -182,7 +182,7 @@ endif
LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -Wl,--wrap,time -mno-fpu -Wl,-Map,map.txt
INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source -I$(portdir)/source/fat \
INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source \
-I$(portdir)/data -I$(libndsdir)/include -I$(portdir)/../commoninclude\
-I$(libndsdir)/include -I$(libndsdir)/include/nds -I$(srcdir)/engines -I$(portdir)/source/mad\
-I$(portdir)/source/libcartreset -include $(srcdir)/common/scummsys.h

View File

@ -148,7 +148,7 @@ void OSystem_SDL::handleKbdMouse() {
_km.y_down_count = 1;
}
SDL_WarpMouse(_km.x, _km.y);
SDL_WarpMouse((Uint16)_km.x, (Uint16)_km.y);
}
}
}

View File

@ -406,7 +406,7 @@ bool OSystem_SDL::setSoundCallback(SoundProc proc, void *param) {
// about 1/32th of a second. Note that it must be a power of two.
// So e.g. at 22050 Hz, we request a sample buffer size of 2048.
int samples = 8192;
while (32 * samples >= _samplesPerSec) {
while (16 * samples >= _samplesPerSec) {
samples >>= 1;
}

View File

@ -0,0 +1,156 @@
DEBUG_WII = 1
ENABLE_SCUMM = 1
ENABLE_SCUMM_7_8 = 1
ENABLE_HE = 1
# ENABLE_AGI = 1
ENABLE_AGOS = 1
ENABLE_CINE = 1
ENABLE_CRUISE = 1
ENABLE_DRASCULA = 1
ENABLE_GOB = 1
ENABLE_IGOR = 1
ENABLE_KYRA = 1
ENABLE_LURE = 1
ENABLE_M4 = 1
ENABLE_MADE = 1
ENABLE_PARALLACTION = 1
ENABLE_QUEEN = 1
ENABLE_SAGA = 1
ENABLE_SKY = 1
ENABLE_SWORD1 = 1
ENABLE_SWORD2 = 1
ENABLE_TOUCHE = 1
DISABLE_HQ_SCALERS = 1
DISABLE_SCALERS = 1
USE_ZLIB = 1
USE_MAD = 1
USE_TREMOR = 1
USE_FLAC = 1
USE_MPEG2 = 1
USE_MT32EMU = 1
srcdir = ../../..
VPATH = $(srcdir)
HAVE_GCC3 = 1
DISTPATH = $(srcdir)/dists/wii
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
PREFIX = $(DEVKITPPC)/bin/powerpc-gekko-
CXX = $(PREFIX)g++
AS = $(PREFIX)gcc
LD = $(PREFIX)gcc
AR = $(PREFIX)ar cru
RANLIB = $(PREFIX)ranlib
STRIP = $(PREFIX)strip -g
OBJCOPY = $(PREFIX)objcopy
MKDIR = mkdir -p
RM = rm -f
CP = cp -f
TARGET = scummvm-wii
MACHDEP = -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float \
-ffunction-sections -fdata-sections -fmodulo-sched
INCDIR = $(srcdir) . $(srcdir)/engines/ $(DEVKITPRO)/libogc/include
LIBDIR = $(DEVKITPRO)/libogc/lib/wii
CXXFLAGS = -g -Os -Wall $(MACHDEP) -D__WII__ \
-Wno-multichar -fno-exceptions -fno-rtti
CXXFLAGS += $(addprefix -I,$(INCDIR))
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(TARGET).elf.map
LDFLAGS += $(addprefix -L,$(LIBDIR))
LIBS = -lstdc++ -lfat -lwiiuse -lbte -logc -lm
CXXFLAGS += -I$(DEVKITPRO)/3rd/wii/include
LDFLAGS += -L$(DEVKITPRO)/3rd/wii/lib
ifdef DEBUG_WII
CXXFLAGS += -DDEBUG_WII
LIBS += -ldb
endif
ifdef USE_ZLIB
CXXFLAGS += -DUSE_ZLIB
LIBS += -lz
endif
ifdef USE_MAD
CXXFLAGS += -DUSE_MAD -I$(DEVKITPRO)/libogc/include/mad
LIBS += -lmad
endif
ifdef USE_TREMOR
CXXFLAGS += -DUSE_VORBIS -DUSE_TREMOR
LIBS += -lvorbisidec
endif
ifdef USE_FLAC
CXXFLAGS += -DUSE_FLAC
LIBS += -lFLAC
endif
ifdef USE_MPEG2
CXXFLAGS += -DUSE_MPEG2
LIBS += -lmpeg2
endif
ifdef USE_MT32EMU
CXXFLAGS += -DUSE_MT32EMU
endif
OBJS := backends/platform/wii/main.o \
backends/platform/wii/gecko_console.o \
backends/platform/wii/gx_supp.o \
backends/platform/wii/osystem.o \
backends/platform/wii/osystem_gfx.o \
backends/platform/wii/osystem_sfx.o \
backends/platform/wii/osystem_events.o
include $(srcdir)/Makefile.common
.PHONY: clean-wii distclean-wii upload dist
all: $(TARGET).dol
$(TARGET).dol: $(TARGET).elf
$(OBJCOPY) -O binary $< $@
$(TARGET).elf: $(OBJS)
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@
clean: clean-wii
clean-wii:
@-$(RM) $(TARGET).elf $(TARGET).elf.map $(TARGET).dol
distclean: distclean-wii
distclean-wii:
@-$(RM) dist
upload:
$(DEVKITPPC)/bin/wiiload $(TARGET).dol
dist:
$(MKDIR) dist/apps/scummvm
$(CP) $(TARGET).dol dist/apps/scummvm/boot.dol
$(CP) $(DISTPATH)/meta.xml dist/apps/scummvm/
$(CP) $(DISTPATH)/icon.png dist/apps/scummvm/
$(CP) $(DISTPATH)/READMII dist/apps/scummvm/
$(CP) $(srcdir)/AUTHORS dist/apps/scummvm/
$(CP) $(srcdir)/COPYING dist/apps/scummvm/
$(CP) $(srcdir)/COPYRIGHT dist/apps/scummvm/
$(CP) $(srcdir)/NEWS dist/apps/scummvm/
$(CP) $(srcdir)/README dist/apps/scummvm/
$(CP) $(DIST_FILES_THEMES) dist/apps/scummvm/
$(CP) $(DIST_FILES_ENGINEDATA) dist/apps/scummvm/

View File

@ -0,0 +1,91 @@
/*-------------------------------------------------------------
Copyright (C) 2008
Hector Martin (marcan)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you use
this software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
-------------------------------------------------------------*/
#include <stdio.h>
#include <sys/iosupport.h>
#include <ogcsys.h>
#include <gccore.h>
#include <reent.h>
#include "gecko_console.h"
#ifdef __cplusplus
extern "C" {
#endif
static const devoptab_t *dotab_console;
int usb_sendbuffer_safe(s32 chn,const void *buffer,int size);
int usb_sendbuffer(s32 chn,const void *buffer,int size);
int __gecko_write(struct _reent *r,int fd,const char *ptr,int len) {
char *tmp = (char*)ptr;
u32 level;
if(dotab_console)
dotab_console->write_r(r,fd,ptr,len);
if(!tmp || len<=0)
return -1;
level = IRQ_Disable();
usb_sendbuffer(1, ptr, len);
IRQ_Restore(level);
return len;
}
const devoptab_t dotab_gecko = {
"stdout", // device name
0, // size of file structure
NULL, // device open
NULL, // device close
__gecko_write, // device write
NULL, // device read
NULL, // device seek
NULL, // device fstat
NULL, // device stat
NULL, // device link
NULL, // device unlink
NULL, // device chdir
NULL, // device rename
NULL, // device mkdir
0, // dirStateSize
NULL, // device diropen_r
NULL, // device dirreset_r
NULL, // device dirnext_r
NULL, // device dirclose_r
NULL // device statvfs_r
};
void gecko_console_init(int chain) {
dotab_console = NULL;
if(chain)
dotab_console = devoptab_list[STD_OUT];
devoptab_list[STD_OUT] = &dotab_gecko;
devoptab_list[STD_ERR] = &dotab_gecko;
}
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,14 @@
#ifndef _WII_GECKO_CONSOLE_H_
#define _WII_GECKO_CONSOLE_H_
#ifdef __cplusplus
extern "C" {
#endif
void gecko_console_init(int chain);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,264 @@
/****************************************************************************
* Generic GX Support for Emulators
* softdev 2007
*
* 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.
*
* NGC GX Video Functions
*
* These are pretty standard functions to setup and use GX scaling.
****************************************************************************/
#include <gccore.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#define DEFAULT_FIFO_SIZE (256 * 1024)
#define HASPECT 320
#define VASPECT 240
#ifdef __cplusplus
extern "C" {
#endif
/*** 2D ***/
static u32 whichfb;
static u32 *xfb[2];
static GXRModeObj *vmode;
/*** 3D GX ***/
static u8 *gp_fifo;
/*** Texture memory ***/
static u8 *texturemem;
static u32 texturesize;
GXTexObj texobj;
static Mtx view;
static u16 vwidth, vheight, oldvwidth, oldvheight;
/* New texture based scaler */
typedef struct tagcamera {
Vector pos;
Vector up;
Vector view;
} camera;
static s16 square[] ATTRIBUTE_ALIGN(32) = {
-HASPECT, VASPECT, 0,
HASPECT, VASPECT, 0,
HASPECT, -VASPECT, 0,
-HASPECT, -VASPECT, 0,
};
static camera cam = {
{ 0.0f, 0.0f, 370.0f },
{ 0.0f, 0.5f, 0.0f },
{ 0.0f, 0.0f, -0.5f }
};
void GX_InitVideo() {
vmode = VIDEO_GetPreferredMode(NULL);
VIDEO_Configure(vmode);
xfb[0] = (u32 *) MEM_K0_TO_K1 (SYS_AllocateFramebuffer(vmode));
xfb[1] = (u32 *) MEM_K0_TO_K1 (SYS_AllocateFramebuffer(vmode));
gp_fifo = (u8 *) memalign(32, DEFAULT_FIFO_SIZE);
VIDEO_ClearFrameBuffer(vmode, xfb[0], COLOR_BLACK);
VIDEO_ClearFrameBuffer(vmode, xfb[1], COLOR_BLACK);
whichfb = 0;
VIDEO_SetNextFramebuffer(xfb[whichfb]);
VIDEO_SetBlack(FALSE);
VIDEO_Flush();
VIDEO_WaitVSync();
if (vmode->viTVMode & VI_NON_INTERLACE)
VIDEO_WaitVSync();
}
/****************************************************************************
* Scaler Support Functions
****************************************************************************/
static void draw_init(void) {
GX_ClearVtxDesc();
GX_SetVtxDesc(GX_VA_POS, GX_INDEX8);
GX_SetVtxDesc(GX_VA_CLR0, GX_INDEX8);
GX_SetVtxDesc(GX_VA_TEX0, GX_DIRECT);
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
GX_SetArray(GX_VA_POS, square, 3 * sizeof(s16));
GX_SetNumTexGens(1);
GX_SetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY);
GX_InvalidateTexAll();
GX_InitTexObj(&texobj, texturemem, vwidth, vheight, GX_TF_RGB565,
GX_CLAMP, GX_CLAMP, GX_FALSE);
}
static void draw_vert(u8 pos, u8 c, f32 s, f32 t) {
GX_Position1x8(pos);
GX_Color1x8(c);
GX_TexCoord2f32(s, t);
}
static void draw_square(Mtx v) {
Mtx m;
Mtx mv;
guMtxIdentity(m);
guMtxTransApply(m, m, 0, 0, -100);
guMtxConcat(v, m, mv);
GX_LoadPosMtxImm(mv, GX_PNMTX0);
GX_Begin(GX_QUADS, GX_VTXFMT0, 4);
draw_vert(0, 0, 0.0, 0.0);
draw_vert(1, 0, 1.0, 0.0);
draw_vert(2, 0, 1.0, 1.0);
draw_vert(3, 0, 0.0, 1.0);
GX_End();
}
/****************************************************************************
* StartGX
****************************************************************************/
void GX_Start(u16 width, u16 height, s16 haspect, s16 vaspect) {
Mtx p;
GX_AbortFrame();
/*** Set new aspect ***/
square[0] = square[9] = -haspect;
square[3] = square[6] = haspect;
square[1] = square[4] = vaspect;
square[7] = square[10] = -vaspect;
/*** Allocate 32byte aligned texture memory ***/
texturesize = (width * height) * 2;
texturemem = (u8 *) memalign(32, texturesize);
GXColor gxbackground = { 0, 0, 0, 0xff };
/*** Clear out FIFO area ***/
memset(gp_fifo, 0, DEFAULT_FIFO_SIZE);
/*** Initialise GX ***/
GX_Init(gp_fifo, DEFAULT_FIFO_SIZE);
GX_SetCopyClear(gxbackground, 0x00ffffff);
GX_SetViewport(0, 0, vmode->fbWidth, vmode->efbHeight, 0, 1);
GX_SetDispCopyYScale((f32) vmode->xfbHeight / (f32) vmode->efbHeight);
GX_SetScissor(0, 0, vmode->fbWidth, vmode->efbHeight);
GX_SetDispCopySrc(0, 0, vmode->fbWidth, vmode->efbHeight);
GX_SetDispCopyDst(vmode->fbWidth, vmode->xfbHeight);
GX_SetCopyFilter(vmode->aa, vmode->sample_pattern, GX_TRUE,
vmode->vfilter);
GX_SetFieldMode(vmode->field_rendering,
((vmode->viHeight == 2 * vmode->xfbHeight) ?
GX_ENABLE : GX_DISABLE));
GX_SetPixelFmt(GX_PF_RGB8_Z24, GX_ZC_LINEAR);
GX_SetCullMode(GX_CULL_NONE);
GX_CopyDisp(xfb[whichfb ^ 1], GX_TRUE);
GX_SetDispCopyGamma(GX_GM_1_0);
guPerspective(p, 60, 1.33f, 10.0f, 1000.0f);
GX_LoadProjectionMtx(p, GX_PERSPECTIVE);
memset(texturemem, 0, texturesize);
GX_Flush();
/*** Setup for first call to scaler ***/
vwidth = vheight = -1;
}
/****************************************************************************
* GX_Render
*
* Pass in a buffer, width and height to update as a tiled RGB565 texture
****************************************************************************/
void GX_Render(u16 width, u16 height, u8 *buffer, u16 pitch) {
u16 h, w;
u64 *dst = (u64 *) texturemem;
u64 *src1 = (u64 *) buffer;
u64 *src2 = (u64 *) (buffer + pitch);
u64 *src3 = (u64 *) (buffer + (pitch * 2));
u64 *src4 = (u64 *) (buffer + (pitch * 3));
u16 rowpitch = (pitch >> 3) * 3 + pitch % 8;
vwidth = width;
vheight = height;
whichfb ^= 1;
if ((oldvheight != vheight) || (oldvwidth != vwidth)) {
/** Update scaling **/
oldvwidth = vwidth;
oldvheight = vheight;
draw_init();
memset(&view, 0, sizeof(Mtx));
guLookAt(view, &cam.pos, &cam.up, &cam.view);
GX_SetViewport(0, 0, vmode->fbWidth, vmode->efbHeight, 0, 1);
}
GX_InvVtxCache();
GX_InvalidateTexAll();
GX_SetTevOp(GX_TEVSTAGE0, GX_DECAL);
GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0);
for (h = 0; h < vheight; h += 4) {
for (w = 0; w < (vwidth >> 2); w++) {
*dst++ = *src1++;
*dst++ = *src2++;
*dst++ = *src3++;
*dst++ = *src4++;
}
src1 += rowpitch;
src2 += rowpitch;
src3 += rowpitch;
src4 += rowpitch;
}
DCFlushRange(texturemem, texturesize);
GX_SetNumChans(1);
GX_LoadTexObj(&texobj, GX_TEXMAP0);
draw_square(view);
GX_DrawDone();
GX_SetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
GX_SetColorUpdate(GX_TRUE);
GX_CopyDisp(xfb[whichfb], GX_TRUE);
GX_Flush();
VIDEO_SetNextFramebuffer(xfb[whichfb]);
VIDEO_Flush();
}
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,39 @@
/****************************************************************************
* Generic GX Scaler
* softdev 2007
*
* 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.
*
* NGC GX Video Functions
*
* These are pretty standard functions to setup and use GX scaling.
****************************************************************************/
#ifndef _WII_GX_SUPP_H_
#define _WII_GX_SUPP_H_
#ifdef __cplusplus
extern "C" {
#endif
void GX_InitVideo();
void GX_Start(u16 width, u16 height, s16 haspect, s16 vaspect);
void GX_Render(u16 width, u16 height, u8 *buffer, u16 pitch);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,88 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <fat.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>
#include "osystem.h"
#ifdef DEBUG_WII
#include <debug.h>
#include <gecko_console.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
int main(int argc, char *argv[]) {
s32 res;
VIDEO_Init();
PAD_Init();
AUDIO_Init(NULL);
#ifdef DEBUG_WII
gecko_console_init(0);
//DEBUG_Init(GDBSTUB_DEVICE_USB, 1);
#endif
printf("startup\n");
if (!fatInitDefault()) {
printf("fatInitDefault failed\n");
} else {
// set the default path if libfat couldnt set it
// this allows loading over tcp/usbgecko
char buf[MAXPATHLEN];
getcwd(buf, MAXPATHLEN);
if (!strcmp(buf, "fat:/"))
chdir("/apps/scummvm");
//fatEnableReadAhead(PI_DEFAULT, 32, 128);
}
g_system = new OSystem_Wii();
assert(g_system);
res = scummvm_main(argc, argv);
g_system->quit();
printf("shutdown\n");
if (!fatUnmount(PI_DEFAULT)) {
printf("fatUnmount failed\n");
fatUnsafeUnmount(PI_DEFAULT);
}
printf("reloading\n");
return res;
}
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,188 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "osystem.h"
#include "backends/fs/wii/wii-fs-factory.h"
#include <unistd.h>
#include <ogc/mutex.h>
#include <ogc/lwp_watchdog.h>
OSystem_Wii::OSystem_Wii() :
_startup_time(0),
_alarm(-1),
_palette(NULL),
_cursorPalette(NULL),
_cursorPaletteDisabled(true),
_gameWidth(0),
_gameHeight(0),
_gamePixels(NULL),
_overlayVisible(false),
_overlayWidth(0),
_overlayHeight(0),
_overlaySize(0),
_overlayPixels(NULL),
_lastScreenUpdate(0),
_texture(NULL),
_currentWidth(0),
_currentHeight(0),
_supportedGraphicsModes(NULL),
_activeGraphicsMode(-1),
_mouseVisible(false),
_mouseX(0),
_mouseY(0),
_mouseWidth(0),
_mouseHeight(0),
_mouseHotspotX(0),
_mouseHotspotY(0),
_mouseKeyColor(0),
_mouseCursor(NULL),
_savefile(NULL),
_mixer(NULL),
_timer(NULL) {
}
OSystem_Wii::~OSystem_Wii() {
if (_savefile) {
delete _savefile;
_savefile = NULL;
}
if (_mixer) {
delete _mixer;
_mixer = NULL;
}
if (_timer) {
delete _timer;
_timer = NULL;
}
}
void OSystem_Wii::initBackend() {
_startup_time = gettime();
_savefile = new DefaultSaveFileManager();
_mixer = new Audio::Mixer();
_timer = new DefaultTimerManager();
initGfx();
initSfx();
initEvents();
OSystem::initBackend();
}
void OSystem_Wii::quit() {
deinitEvents();
deinitSfx();
deinitGfx();
}
bool OSystem_Wii::hasFeature(Feature f) {
return f == kFeatureCursorHasPalette;
}
void OSystem_Wii::setFeatureState(Feature f, bool enable) {
}
bool OSystem_Wii::getFeatureState(Feature f) {
return false;
}
uint32 OSystem_Wii::getMillis() {
return ticks_to_millisecs(diff_ticks(_startup_time, gettime()));
}
void OSystem_Wii::delayMillis(uint msecs) {
usleep(msecs * 1000);
}
OSystem::MutexRef OSystem_Wii::createMutex() {
mutex_t *mutex = (mutex_t *) malloc(sizeof(mutex_t));
s32 res = LWP_MutexInit(mutex, false);
if (res) {
printf("ERROR creating mutex\n");
delete mutex;
return NULL;
}
return (MutexRef) mutex;
}
void OSystem_Wii::lockMutex(MutexRef mutex) {
s32 res = LWP_MutexLock(*(mutex_t *) mutex);
if (res)
printf("ERROR locking mutex %p (%d)\n", mutex, res);
}
void OSystem_Wii::unlockMutex(MutexRef mutex) {
s32 res = LWP_MutexUnlock(*(mutex_t *) mutex);
if (res)
printf("ERROR unlocking mutex %p (%d)\n", mutex, res);
}
void OSystem_Wii::deleteMutex(MutexRef mutex) {
s32 res = LWP_MutexDestroy(*(mutex_t *) mutex);
if (res)
printf("ERROR destroying mutex %p (%d)\n", mutex, res);
}
void OSystem_Wii::setWindowCaption(const char *caption) {
printf("window caption: %s\n", caption);
}
Common::SaveFileManager *OSystem_Wii::getSavefileManager() {
assert(_savefile);
return _savefile;
}
Audio::Mixer *OSystem_Wii::getMixer() {
assert(_mixer);
return _mixer;
}
Common::TimerManager *OSystem_Wii::getTimerManager() {
assert(_timer);
return _timer;
}
FilesystemFactory *OSystem_Wii::getFilesystemFactory() {
return &WiiFilesystemFactory::instance();
}
void OSystem_Wii::getTimeAndDate(struct tm &t) const {
time_t curTime = time(0);
t = *localtime(&curTime);
}

View File

@ -0,0 +1,163 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _WII_OSYSTEM_H_
#define _WII_OSYSTEM_H_
#include "common/system.h"
#include "base/main.h"
#include "common/rect.h"
#include "common/events.h"
#include "backends/saves/default/default-saves.h"
#include "backends/timer/default/default-timer.h"
#include "graphics/surface.h"
#include "sound/mixer.h"
#include <gctypes.h>
#include <gccore.h>
#include <ogcsys.h>
class OSystem_Wii : public OSystem {
private:
s64 _startup_time;
syswd_t _alarm;
u16 *_palette;
u16 *_cursorPalette;
bool _cursorPaletteDisabled;
u16 _gameWidth, _gameHeight;
u8 *_gamePixels;
Graphics::Surface _surface;
bool _overlayVisible;
u16 _overlayWidth, _overlayHeight;
u32 _overlaySize;
OverlayColor *_overlayPixels;
u32 _lastScreenUpdate;
u16 *_texture;
u16 _currentWidth, _currentHeight;
OSystem::GraphicsMode *_supportedGraphicsModes;
s32 _activeGraphicsMode;
bool _mouseVisible;
s32 _mouseX, _mouseY;
u32 _mouseWidth, _mouseHeight;
s32 _mouseHotspotX, _mouseHotspotY;
u8 _mouseKeyColor;
u8 *_mouseCursor;
u32 _lastPadCheck;
void initGfx();
void deinitGfx();
void initSfx();
void deinitSfx();
void initEvents();
void deinitEvents();
void updateEventScreenResolution();
protected:
Common::SaveFileManager *_savefile;
Audio::Mixer *_mixer;
DefaultTimerManager *_timer;
public:
OSystem_Wii();
virtual ~OSystem_Wii();
virtual void initBackend();
virtual bool hasFeature(Feature f);
virtual void setFeatureState(Feature f, bool enable);
virtual bool getFeatureState(Feature f);
virtual const GraphicsMode *getSupportedGraphicsModes() const;
virtual int getDefaultGraphicsMode() const;
bool setGraphicsMode(const char *name);
virtual bool setGraphicsMode(int mode);
virtual int getGraphicsMode() const;
virtual void initSize(uint width, uint height);
virtual int16 getWidth();
virtual int16 getHeight();
virtual void setPalette(const byte *colors, uint start, uint num);
virtual void grabPalette(byte *colors, uint start, uint num);
virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool disable);
virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y,
int w, int h);
virtual void updateScreen();
virtual Graphics::Surface *lockScreen();
virtual void unlockScreen();
virtual void setShakePos(int shakeOffset);
virtual void showOverlay();
virtual void hideOverlay();
virtual void clearOverlay();
virtual void grabOverlay(OverlayColor *buf, int pitch);
virtual void copyRectToOverlay(const OverlayColor *buf, int pitch,
int x, int y, int w, int h);
virtual int16 getOverlayWidth();
virtual int16 getOverlayHeight();
virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b);
virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b);
virtual OverlayColor ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b);
virtual void colorToARGB(OverlayColor color, uint8 &a, uint8 &r,
uint8 &g, uint8 &b);
virtual bool showMouse(bool visible);
virtual void warpMouse(int x, int y);
virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX,
int hotspotY, byte keycolor = 255,
int cursorTargetScale = 1);
virtual bool pollEvent(Common::Event &event);
virtual uint32 getMillis();
virtual void delayMillis(uint msecs);
virtual MutexRef createMutex();
virtual void lockMutex(MutexRef mutex);
virtual void unlockMutex(MutexRef mutex);
virtual void deleteMutex(MutexRef mutex);
typedef void (*SoundProc)(void *param, byte *buf, int len);
virtual int getOutputSampleRate() const;
virtual void quit();
virtual void setWindowCaption(const char *caption);
virtual Common::SaveFileManager *getSavefileManager();
virtual Audio::Mixer *getMixer();
virtual Common::TimerManager *getTimerManager();
FilesystemFactory *getFilesystemFactory();
void getTimeAndDate(struct tm &t) const;
};
#endif

View File

@ -0,0 +1,262 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <unistd.h>
#include <malloc.h>
#ifndef GAMECUBE
#include <wiiuse/wpad.h>
#endif
#include <ogc/lwp_watchdog.h>
#include "osystem.h"
#define TIMER_THREAD_STACKSIZE (1024 * 32)
#define TIMER_THREAD_PRIO 64
#define PAD_CHECK_TIME 40
#ifndef GAMECUBE
#define PADS_A (PAD_BUTTON_A | (WPAD_BUTTON_A << 16))
#define PADS_B (PAD_BUTTON_B | (WPAD_BUTTON_B << 16))
#define PADS_X (PAD_BUTTON_X | (WPAD_BUTTON_MINUS << 16))
#define PADS_Y (PAD_BUTTON_Y | (WPAD_BUTTON_PLUS << 16))
#define PADS_Z (PAD_TRIGGER_Z | (WPAD_BUTTON_2 << 16))
#define PADS_START (PAD_BUTTON_START | (WPAD_BUTTON_HOME << 16))
#define PADS_UP (PAD_BUTTON_UP | (WPAD_BUTTON_UP << 16))
#define PADS_DOWN (PAD_BUTTON_DOWN | (WPAD_BUTTON_DOWN << 16))
#define PADS_LEFT (PAD_BUTTON_LEFT | (WPAD_BUTTON_LEFT << 16))
#define PADS_RIGHT (PAD_BUTTON_RIGHT | (WPAD_BUTTON_RIGHT << 16))
#else
#define PADS_A PAD_BUTTON_A
#define PADS_B PAD_BUTTON_B
#define PADS_X PAD_BUTTON_X
#define PADS_Y PAD_BUTTON_Y
#define PADS_Z PAD_TRIGGER_Z
#define PADS_START PAD_BUTTON_START
#define PADS_UP PAD_BUTTON_UP
#define PADS_DOWN PAD_BUTTON_DOWN
#define PADS_LEFT PAD_BUTTON_LEFT
#define PADS_RIGHT PAD_BUTTON_RIGHT
#endif
static lwpq_t timer_queue;
static lwp_t timer_thread;
static u8 *timer_stack;
static bool timer_thread_running = false;
static bool timer_thread_quit = false;
static void * timer_thread_func(void *arg) {
while (!timer_thread_quit) {
DefaultTimerManager *tm =
(DefaultTimerManager *) g_system->getTimerManager();
tm->handler();
usleep(1000 * 10);
}
return NULL;
}
void OSystem_Wii::initEvents() {
timer_thread_quit = false;
timer_stack = (u8 *) memalign(32, TIMER_THREAD_STACKSIZE);
memset(timer_stack, 0, TIMER_THREAD_STACKSIZE);
LWP_InitQueue(&timer_queue);
s32 res = LWP_CreateThread(&timer_thread, timer_thread_func, NULL,
timer_stack, TIMER_THREAD_STACKSIZE,
TIMER_THREAD_PRIO);
if (res) {
printf("ERROR creating timer thread: %d\n", res);
LWP_CloseQueue(timer_queue);
}
timer_thread_running = res == 0;
#ifndef GAMECUBE
WPAD_Init();
WPAD_SetDataFormat(WPAD_CHAN_0, WPAD_FMT_BTNS_ACC_IR);
WPAD_SetIdleTimeout(120);
#endif
}
void OSystem_Wii::deinitEvents() {
if (timer_thread_running) {
timer_thread_quit = true;
LWP_ThreadBroadcast(timer_queue);
LWP_JoinThread(timer_thread, NULL);
LWP_CloseQueue(timer_queue);
timer_thread_running = false;
}
#ifndef GAMECUBE
WPAD_Shutdown();
#endif
}
void OSystem_Wii::updateEventScreenResolution() {
#ifndef GAMECUBE
WPAD_SetVRes(WPAD_CHAN_0, _currentWidth + _currentWidth / 5,
_currentHeight + _currentHeight / 5);
#endif
}
#define KBD_EVENT(pad_button, kbd_keycode, kbd_ascii) \
do { \
if ((bd | bu) & pad_button) { \
if (bd & pad_button) \
event.type = Common::EVENT_KEYDOWN; \
else \
event.type = Common::EVENT_KEYUP; \
event.kbd.keycode = kbd_keycode; \
event.kbd.ascii = kbd_ascii; \
return true; \
} \
} while (0)
bool OSystem_Wii::pollEvent(Common::Event &event) {
u32 bd, bh, bu;
PAD_ScanPads();
bd = PAD_ButtonsDown(0);
bh = PAD_ButtonsHeld(0);
bu = PAD_ButtonsUp(0);
#ifndef GAMECUBE
WPAD_ScanPads();
s32 res = WPAD_Probe(0, NULL);
if (res == WPAD_ERR_NONE) {
bd |= WPAD_ButtonsDown(0) << 16;
bh |= WPAD_ButtonsHeld(0) << 16;
bu |= WPAD_ButtonsUp(0) << 16;
}
#endif
if (bd || bu) {
if (bh & PADS_UP)
event.kbd.flags = Common::KBD_SHIFT;
KBD_EVENT(PADS_Z, Common::KEYCODE_RETURN, Common::ASCII_RETURN);
KBD_EVENT(PADS_X, Common::KEYCODE_ESCAPE, Common::ASCII_ESCAPE);
KBD_EVENT(PADS_Y, Common::KEYCODE_PERIOD, '.');
KBD_EVENT(PADS_START, Common::KEYCODE_F5, Common::ASCII_F5);
KBD_EVENT(PADS_UP, Common::KEYCODE_LSHIFT, 0);
KBD_EVENT(PADS_DOWN, Common::KEYCODE_0, '0');
KBD_EVENT(PADS_LEFT, Common::KEYCODE_y, 'y');
KBD_EVENT(PADS_RIGHT, Common::KEYCODE_n, 'n');
if ((bd | bu) & (PADS_A | PADS_B)) {
if (bd & PADS_A)
event.type = Common::EVENT_LBUTTONDOWN;
else if (bu & PADS_A)
event.type = Common::EVENT_LBUTTONUP;
else if (bd & PADS_B)
event.type = Common::EVENT_RBUTTONDOWN;
else if (bu & PADS_B)
event.type = Common::EVENT_RBUTTONUP;
event.mouse.x = _mouseX;
event.mouse.y = _mouseY;
return true;
}
}
s32 mx = _mouseX;
s32 my = _mouseY;
#ifndef GAMECUBE
if (res == WPAD_ERR_NONE) {
struct ir_t ir;
WPAD_IR(0, &ir);
if (ir.valid) {
mx = ir.x - _currentWidth / 10;
my = ir.y - _currentHeight / 10;
if (mx < 0)
mx = 0;
if (mx >= _currentWidth)
mx = _currentWidth - 1;
if (my < 0)
my = 0;
if (my >= _currentHeight)
my = _currentHeight - 1;
if ((mx != _mouseX) || (my != _mouseY)) {
event.type = Common::EVENT_MOUSEMOVE;
event.mouse.x = _mouseX = mx;
event.mouse.y = _mouseY = my;
return true;
}
}
}
#endif
uint32 time = getMillis();
if (time - _lastPadCheck > PAD_CHECK_TIME) {
_lastPadCheck = time;
if (abs (PAD_StickX(0)) > 16)
mx += PAD_StickX(0) / (4 * _overlayWidth / _currentWidth);
if (abs (PAD_StickY(0)) > 16)
my -= PAD_StickY(0) / (4 * _overlayHeight / _currentHeight);
if (mx < 0)
mx = 0;
if (mx >= _currentWidth)
mx = _currentWidth - 1;
if (my < 0)
my = 0;
if (my >= _currentHeight)
my = _currentHeight - 1;
if ((mx != _mouseX) || (my != _mouseY)) {
event.type = Common::EVENT_MOUSEMOVE;
event.mouse.x = _mouseX = mx;
event.mouse.y = _mouseY = my;
return true;
}
}
return false;
}

View File

@ -0,0 +1,453 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <malloc.h>
#include "osystem.h"
#include "gx_supp.h"
#define MAX_FPS 30
enum GraphicModeID {
GM_DEFAULT
};
void OSystem_Wii::initGfx() {
_surface.w = 0;
_surface.h = 0;
_surface.pitch = 0;
_surface.pixels = NULL;
_surface.bytesPerPixel = 0;
GX_InitVideo();
_overlayWidth = 640;
_overlayHeight = 480;
_overlaySize = _overlayWidth * _overlayHeight * 2;
_overlayPixels = (OverlayColor *) memalign(32, _overlaySize);
_palette = (u16 *) memalign(32, 256 * 2);
memset(_palette, 0, 256 * 2);
_cursorPalette = (u16 *) memalign(32, 256 * 2);
memset(_cursorPalette, 0, 256 * 2);
_supportedGraphicsModes = new OSystem::GraphicsMode[2];
_supportedGraphicsModes[0].name = strdup("gx");
_supportedGraphicsModes[0].description = strdup("wii hardware scaler");
_supportedGraphicsModes[0].id = GM_DEFAULT;
_supportedGraphicsModes[1].name = 0;
_supportedGraphicsModes[1].description = 0;
_supportedGraphicsModes[1].id = 0;
_texture = (u16 *) memalign(32, _overlaySize);
GX_Start(_overlayWidth, _overlayHeight, 320, 240);
}
void OSystem_Wii::deinitGfx() {
GX_AbortFrame();
if (_supportedGraphicsModes) {
delete[] _supportedGraphicsModes;
_supportedGraphicsModes = NULL;
}
if (_gamePixels) {
free(_gamePixels);
_gamePixels = NULL;
}
if (_palette) {
free(_palette);
_palette = NULL;
}
if (_overlayPixels) {
free(_overlayPixels);
_overlayPixels = NULL;
}
if (_mouseCursor) {
free(_mouseCursor);
_mouseCursor = NULL;
}
if (_cursorPalette) {
free(_cursorPalette);
_cursorPalette = NULL;
}
if (_texture) {
free(_texture);
_texture = NULL;
}
}
const OSystem::GraphicsMode* OSystem_Wii::getSupportedGraphicsModes() const {
return _supportedGraphicsModes;
}
int OSystem_Wii::getDefaultGraphicsMode() const {
return GM_DEFAULT;
}
bool OSystem_Wii::setGraphicsMode(const char *mode) {
setGraphicsMode(GM_DEFAULT);
return true;
}
bool OSystem_Wii::setGraphicsMode(int mode) {
return true;
}
int OSystem_Wii::getGraphicsMode() const {
return _activeGraphicsMode;
}
void OSystem_Wii::initSize(uint width, uint height) {
if (_gameWidth != width || _gameHeight != height) {
printf("initSize %u %u\n", width, height);
_gameWidth = width;
_gameHeight = height;
if(_gamePixels)
free(_gamePixels);
_gamePixels = (u8 *) memalign(32, _gameWidth * _gameHeight);
if (!_overlayVisible) {
_currentWidth = _gameWidth;
_currentHeight = _gameHeight;
updateEventScreenResolution();
}
}
}
int16 OSystem_Wii::getWidth() {
return _gameWidth;
}
int16 OSystem_Wii::getHeight() {
return _gameHeight;
}
void OSystem_Wii::setPalette(const byte *colors, uint start, uint num) {
const byte *p = colors;
for (uint i = 0; i < num; ++i) {
_palette[start + i] = RGBToColor(p[0], p[1], p[2]);
p += 4;
}
}
void OSystem_Wii::grabPalette(byte *colors, uint start, uint num) {
byte *p = colors;
u8 r, g, b;
for (uint i = 0; i < num; ++i) {
colorToRGB(_palette[start + i], r, g, b);
p[0] = r;
p[1] = g;
p[2] = b;
p[3] = 0xff;
p += 4;
}
}
void OSystem_Wii::setCursorPalette(const byte *colors, uint start, uint num) {
const byte *p = colors;
for (uint i = 0; i < num; ++i) {
_cursorPalette[start + i] = RGBToColor(p[0], p[1], p[2]);
p += 4;
}
_cursorPaletteDisabled = false;
}
void OSystem_Wii::disableCursorPalette(bool disable) {
_cursorPaletteDisabled = disable;
}
void OSystem_Wii::copyRectToScreen(const byte *buf, int pitch, int x, int y,
int w, int h) {
if (x < 0) {
w += x;
buf -= x;
x = 0;
}
if (y < 0) {
h += y;
buf -= y * pitch;
y = 0;
}
if (w > _gameWidth - x)
w = _gameWidth - x;
if (h > _gameHeight - y)
h = _gameHeight - y;
if (w <= 0 || h <= 0)
return;
byte *dst = _gamePixels + y * _gameWidth + x;
if (_gameWidth == pitch && pitch == w) {
memcpy(dst, buf, h * w);
} else {
do {
memcpy(dst, buf, w);
buf += pitch;
dst += _gameWidth;
} while (--h);
}
}
void OSystem_Wii::updateScreen() {
static u32 x, y, h, skip;
static s16 msx, msy, mox, moy, mskip;
static u16 mpx, mpy;
static u8 *s;
static u16 *d, *p;
u32 now = getMillis();
if (now - _lastScreenUpdate < 1000 / MAX_FPS)
return;
_lastScreenUpdate = now;
h = 0;
if (_overlayVisible) {
memcpy(_texture, _overlayPixels, _overlaySize);
} else {
for (y = 0; y < _gameHeight; ++y) {
for (x = 0; x < _gameWidth; ++x)
_texture[h + x] = _palette[_gamePixels[h + x]];
h += _gameWidth;
}
}
if (_mouseVisible) {
msx = _mouseX - _mouseHotspotX;
msy = _mouseY - _mouseHotspotY;
mox = 0;
moy = 0;
mpx = _mouseWidth;
mpy = _mouseHeight;
if (msx < 0) {
mox = -msx;
mpx -= mox;
msx = 0;
} else
if (msx + mpx > _currentWidth - 1)
mpx = _currentWidth - msx - 1;
if (msy < 0) {
moy = -msy;
mpy -= moy;
msy = 0;
} else
if (msy + mpy + 1 > _currentHeight - 1)
mpy = _currentHeight - msy - 1;
if (_cursorPaletteDisabled)
p = _palette;
else
p = _cursorPalette;
skip = _currentWidth - mpx;
mskip = _mouseWidth - mpx;
s = _mouseCursor + moy * _mouseWidth + mox;
d = _texture + (msy * _currentWidth + msx);
for (y = 0; y < mpy; ++y) {
for (x = 0; x < mpx; ++x) {
if (*s == _mouseKeyColor) {
s++;
d++;
continue;
}
*d++ = p[*s];
s++;
}
d += skip;
s += mskip;
}
}
GX_Render(_currentWidth, _currentHeight, (u8 *) _texture,
_currentWidth * 2);
}
Graphics::Surface *OSystem_Wii::lockScreen() {
_surface.pixels = _gamePixels;
_surface.w = _gameWidth;
_surface.h = _gameHeight;
_surface.pitch = _gameWidth;
_surface.bytesPerPixel = 1;
return &_surface;
}
void OSystem_Wii::unlockScreen() {
}
void OSystem_Wii::setShakePos(int shakeOffset) {
}
void OSystem_Wii::showOverlay() {
_mouseX = _overlayWidth / 2;
_mouseY = _overlayHeight / 2;
_overlayVisible = true;
_currentWidth = _overlayWidth;
_currentHeight = _overlayHeight;
updateEventScreenResolution();
}
void OSystem_Wii::hideOverlay() {
_mouseX = _gameWidth / 2;
_mouseY = _gameHeight / 2;
_overlayVisible = false;
_currentWidth = _gameWidth;
_currentHeight = _gameHeight;
updateEventScreenResolution();
}
void OSystem_Wii::clearOverlay() {
memset(_overlayPixels, 0, _overlaySize);
}
void OSystem_Wii::grabOverlay(OverlayColor *buf, int pitch) {
int h = _overlayHeight;
OverlayColor *src = _overlayPixels;
do {
memcpy(buf, src, _overlayWidth * sizeof(OverlayColor));
src += _overlayWidth;
buf += pitch;
} while (--h);
}
void OSystem_Wii::copyRectToOverlay(const OverlayColor *buf, int pitch, int x,
int y, int w, int h) {
if (x < 0) {
w += x;
buf -= x;
x = 0;
}
if (y < 0) {
h += y;
buf -= y * pitch;
y = 0;
}
if (w > _overlayWidth - x)
w = _overlayWidth - x;
if (h > _overlayHeight - y)
h = _overlayHeight - y;
if (w <= 0 || h <= 0)
return;
OverlayColor *dst = _overlayPixels + (y * _overlayWidth + x);
if (_overlayWidth == pitch && pitch == w) {
memcpy(dst, buf, h * w * sizeof(OverlayColor));
} else {
do {
memcpy(dst, buf, w * sizeof(OverlayColor));
buf += pitch;
dst += _overlayWidth;
} while (--h);
}
}
int16 OSystem_Wii::getOverlayWidth() {
return _overlayWidth;
}
int16 OSystem_Wii::getOverlayHeight() {
return _overlayHeight;
}
OverlayColor OSystem_Wii::RGBToColor(uint8 r, uint8 g, uint8 b) {
return (((r >> 3) & 0x1f) << 11) | (((g >> 2) & 0x3f) << 5 ) |
((b >> 3) & 0x1f);
}
void OSystem_Wii::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) {
r = ((color >> 11) & 0x1f) << 3;
g = ((color >> 5) & 0x3f) << 2;
b = (color & 0x1f) << 3;
}
OverlayColor OSystem_Wii::ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b) {
return RGBToColor(r, g, b);
}
void OSystem_Wii::colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g,
uint8 &b) {
a = 0xff;
colorToRGB(color, r, g, b);
}
bool OSystem_Wii::showMouse(bool visible) {
bool last = _mouseVisible;
_mouseVisible = visible;
return last;
}
void OSystem_Wii::warpMouse(int x, int y) {
_mouseX = x;
_mouseY = y;
}
void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX,
int hotspotY, byte keycolor,
int cursorTargetScale) {
(void) cursorTargetScale; // TODO
_mouseWidth = w;
_mouseHeight = h;
_mouseHotspotX = hotspotX;
_mouseHotspotY = hotspotY;
_mouseKeyColor = keycolor;
if (_mouseCursor)
free(_mouseCursor);
_mouseCursor = (u8 *) memalign(32, w * h);
memcpy(_mouseCursor, buf, w * h);
}

View File

@ -0,0 +1,133 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <malloc.h>
#include "osystem.h"
#define SFX_THREAD_STACKSIZE (1024 * 128)
#define SFX_THREAD_PRIO 80
#define SFX_THREAD_FRAG_SIZE 4096
static lwpq_t sfx_queue;
static lwp_t sfx_thread;
static u8 *sfx_stack;
static bool sfx_thread_running = false;
static bool sfx_thread_quit = false;
static u8 sb = 0;
static u8 *sound_buffer[2];
static OSystem_Wii::SoundProc sound_proc = NULL;
static void *proc_param = NULL;
static void audio_switch_buffers() {
AUDIO_StopDMA();
AUDIO_InitDMA((u32) sound_buffer[sb], SFX_THREAD_FRAG_SIZE);
AUDIO_StartDMA();
LWP_ThreadSignal(sfx_queue);
}
static void * sfx_thread_func(void *arg) {
u8 next_sb;
while (true) {
LWP_ThreadSleep(sfx_queue);
if (sfx_thread_quit)
break;
next_sb = sb ^ 1;
sound_proc(proc_param, sound_buffer[next_sb], SFX_THREAD_FRAG_SIZE);
DCFlushRange(sound_buffer[next_sb], SFX_THREAD_FRAG_SIZE);
sb = next_sb;
}
return NULL;
}
void OSystem_Wii::initSfx() {
sfx_thread_running = false;
sfx_thread_quit = false;
sfx_stack = (u8 *) memalign(32, SFX_THREAD_STACKSIZE);
memset(sfx_stack, 0, SFX_THREAD_STACKSIZE);
LWP_InitQueue(&sfx_queue);
s32 res = LWP_CreateThread(&sfx_thread, sfx_thread_func, NULL, sfx_stack,
SFX_THREAD_STACKSIZE, SFX_THREAD_PRIO);
if (res) {
printf("ERROR creating sfx thread: %d\n", res);
LWP_CloseQueue(sfx_queue);
return;
}
sfx_thread_running = true;
sound_buffer[0] = (u8 *) memalign(32, SFX_THREAD_FRAG_SIZE);
sound_buffer[1] = (u8 *) memalign(32, SFX_THREAD_FRAG_SIZE);
memset(sound_buffer[0], 0, SFX_THREAD_FRAG_SIZE);
memset(sound_buffer[1], 0, SFX_THREAD_FRAG_SIZE);
DCFlushRange(sound_buffer[0], SFX_THREAD_FRAG_SIZE);
DCFlushRange(sound_buffer[1], SFX_THREAD_FRAG_SIZE);
sound_proc = Audio::Mixer::mixCallback;
proc_param = _mixer;
_mixer->setReady(true);
AUDIO_SetDSPSampleRate(AI_SAMPLERATE_48KHZ);
AUDIO_RegisterDMACallback(audio_switch_buffers);
audio_switch_buffers();
}
void OSystem_Wii::deinitSfx() {
if (_mixer)
_mixer->setReady(false);
AUDIO_StopDMA();
AUDIO_RegisterDMACallback(NULL);
if (sfx_thread_running) {
sfx_thread_quit = true;
LWP_ThreadBroadcast(sfx_queue);
LWP_JoinThread(sfx_thread, NULL);
LWP_CloseQueue(sfx_queue);
sfx_thread_running = false;
free(sound_buffer[0]);
free(sound_buffer[1]);
}
}
int OSystem_Wii::getOutputSampleRate() const {
return 48000;
}

View File

@ -61,7 +61,7 @@ struct Point {
if (diffy >= 0x1000)
return 0xFFFFFF;
return diffx*diffx + diffy*diffy;
return uint(diffx*diffx + diffy*diffy);
}
};

View File

@ -369,6 +369,14 @@
#define STRINGBUFLEN 256
#define printf(fmt, ...) consolePrintf(fmt, ##__VA_ARGS__)
#elif defined(__WII__)
#define scumm_stricmp strcasecmp
#define scumm_strnicmp strncasecmp
#define SCUMM_BIG_ENDIAN
#define SCUMM_NEED_ALIGNMENT
#else
#error No system type defined

View File

@ -137,7 +137,7 @@ void OSystem::clearScreen() {
#endif
FilesystemFactory *OSystem::getFilesystemFactory() {
#if defined(__amigaos4__) || defined(__DC__) || defined(__SYMBIAN32__) || defined(UNIX) || defined(WIN32) || defined(__PSP__) || defined(__DS__)
#if defined(__amigaos4__) || defined(__DC__) || defined(__SYMBIAN32__) || defined(UNIX) || defined(WIN32) || defined(__WII__) || defined(__PSP__) || defined(__DS__)
// These ports already implement this function, so it should never be called.
return 0;
#elif defined(PALMOS_MODE)

6
configure vendored
View File

@ -943,6 +943,12 @@ if test "$_cxx_major" -ge "3" ; then
add_line_to_config_mk 'HAVE_GCC3 = 1'
fi;
if test "$_cxx_major" -ge "4" && test "$_cxx_minor" -ge "3" ; then
CXXFLAGS="$CXXFLAGS -Wno-parentheses -Wno-empty-body"
else
CXXFLAGS="$CXXFLAGS -Wconversion"
fi;
add_to_config_mk_if_no $_build_hq_scalers 'DISABLE_HQ_SCALERS = 1'
add_to_config_mk_if_no $_build_scalers 'DISABLE_SCALERS = 1'

View File

@ -243,12 +243,6 @@
<File
RelativePath="..\..\engines\cruise\stack.h">
</File>
<File
RelativePath="..\..\engines\cruise\stringSupport.cpp">
</File>
<File
RelativePath="..\..\engines\cruise\stringSupport.h">
</File>
<File
RelativePath="..\..\engines\cruise\various.cpp">
</File>

View File

@ -257,12 +257,6 @@
<File
RelativePath="..\..\engines\cruise\stack.h">
</File>
<File
RelativePath="..\..\engines\cruise\stringSupport.cpp">
</File>
<File
RelativePath="..\..\engines\cruise\stringSupport.h">
</File>
<File
RelativePath="..\..\engines\cruise\various.cpp">
</File>

View File

@ -356,14 +356,6 @@
RelativePath="..\..\engines\cruise\stack.h"
>
</File>
<File
RelativePath="..\..\engines\cruise\stringSupport.cpp"
>
</File>
<File
RelativePath="..\..\engines\cruise\stringSupport.h"
>
</File>
<File
RelativePath="..\..\engines\cruise\various.cpp"
>

View File

@ -357,14 +357,6 @@
RelativePath="..\..\engines\cruise\stack.h"
>
</File>
<File
RelativePath="..\..\engines\cruise\stringSupport.cpp"
>
</File>
<File
RelativePath="..\..\engines\cruise\stringSupport.h"
>
</File>
<File
RelativePath="..\..\engines\cruise\various.cpp"
>

64
dists/wii/READMII Normal file
View File

@ -0,0 +1,64 @@
Wii port of ScummVM README
--------------------------
features not compiled in:
- the AGI game engine
REQUIREMENTS
- sd card
- wiimote or gamecube controller in port 1
INSTALL
- copy the "apps" folder to the root of your sd card
- copy your demos and/or games onto the same sd card
each game goes into its own subdirectory, do not place those under
"/apps/scummvm", and do not set the "theme" or "extra" path to that folder
freeware versions: http://scummvm.org/downloads.php#extras
demos: http://scummvm.org/demos.php
RUN
either use the homebrew channel, available at
http://hbc.hackmii.com/
or load "boot.dol" with your favorite loader
CONTROLS
wiimote
analog stick: mouse movement
a: left mouse button
b: right mouse button
minus: escape
plus: "." (skip current line of text)
2: enter
home: f5 (scummvm menu)
dpad up: shift (mass add for the gui)
dpad down: "0"
dpad left: "y"
dpad right: "n"
gamecube pad
analog stick: mouse movement
a: left mouse button
b: right mouse button
x: escape
y: "." (skip current line of text)
z: enter
start: f5 (scummvm menu)
dpad up: shift (mass add for the gui)
dpad down: "0"
dpad left: "y"
dpad right: "n"
THANKS
shagkur and WinterMute, for devkitppc/libogc and the coorperation
svpe, for fixing the libfat feof/thread bugs on the last minute
para, for making wiiuse available in libogc

BIN
dists/wii/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

12
dists/wii/meta.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app version="1">
<name>ScummVM</name>
<coder>The ScummVM Team</coder>
<version>rev FIXME</version>
<release_date>FIXME</release_date>
<short_description>Point &amp; Click Adventures</short_description>
<long_description>ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files. The clever part about this: ScummVM just replaces the executables shipped with the games, allowing you to play them on systems for which they were never designed!
Some of the adventures ScummVM supports include Adventure Soft's Simon the Sorcerer 1 and 2; Revolution's Beneath A Steel Sky, Broken Sword 1 and Broken Sword 2; Flight of the Amazon Queen; Wyrmkeep's Inherit the Earth; Coktel Vision's Gobliiins; Westwood Studios' The Legend of Kyrandia and games based on LucasArts' SCUMM (Script Creation Utility for Maniac Mansion) system such as Monkey Island, Day of the Tentacle, Sam and Max and more.</long_description>
</app>

View File

@ -45,7 +45,6 @@
#include "cruise/stack.h"
#include "cruise/script.h"
#include "cruise/various.h"
#include "cruise/stringSupport.h"
#include "cruise/function.h"
#include "cruise/saveload.h"
#include "cruise/linker.h"

View File

@ -27,7 +27,6 @@ MODULE_OBJS := \
saveload.o \
script.o \
stack.o \
stringSupport.o \
various.o \
vars.o \
volume.o

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -68,6 +68,38 @@ enum Verbs {
kVerbMove = 6
};
// Items up to chapter 3
enum InventoryItems {
kItemMoney = 7,
kItemLeaves = 8,
kItemCross = 9,
kItemSpike = 10,
kItemEarplugs = 11,
kItemBook = 12,
kItemBubbleGum = 13,
kItemSickle = 14,
kItemTissues = 15,
kItemCigarettes = 16,
kItemCandle = 17,
kItemTwoCoins = 18,
kItemOneCoin = 19,
kItemReefer = 20,
kItemKey = 21,
kItemHandbag = 22,
kItemEarWithEarPlug = 23,
kItemPhone = 28
};
// Items from chapter 4 onwards
enum InventoryItems2 {
kItemKey2 = 7,
kItemCross2 = 9,
kItemRope2 = 19,
kItemReefer2 = 20,
kItemOneCoin2 = 22,
kItemPhone2 = 28
};
enum Colors {
kColorBrown = 1,
kColorDarkBlue = 2,
@ -105,7 +137,8 @@ enum IgorTalkerTypes {
struct DrasculaGameDescription;
struct RoomTalkAction {
int num;
int room;
int chapter;
int action;
int objectID;
int speechID;
@ -122,32 +155,32 @@ struct CharInfo {
int charType; // 0 - letters, 1 - signs, 2 - accented
};
#define CHARMAP_SIZE 93
#define NUM_SAVES 10
#define NUM_FLAGS 50
#define DIF_MASK 55
#define OBJWIDTH 40
#define OBJHEIGHT 25
#define CHARMAP_SIZE 93
#define NUM_SAVES 10
#define NUM_FLAGS 50
#define DIF_MASK 55
#define OBJWIDTH 40
#define OBJHEIGHT 25
#define DIF_MASK_HARE 72
#define DIF_MASK_ABC 22
#define CHAR_WIDTH 8
#define CHAR_HEIGHT 6
#define DIF_MASK_HARE 72
#define DIF_MASK_ABC 22
#define CHAR_WIDTH 8
#define CHAR_HEIGHT 6
#define TALK_HEIGHT 25
#define TALK_WIDTH 23
#define STEP_X 8
#define STEP_Y 3
#define CHARACTER_HEIGHT 70
#define CHARACTER_WIDTH 43
#define FEET_HEIGHT 12
#define TALK_HEIGHT 25
#define TALK_WIDTH 23
#define STEP_X 8
#define STEP_Y 3
#define CHARACTER_HEIGHT 70
#define CHARACTER_WIDTH 43
#define FEET_HEIGHT 12
#define CHAR_WIDTH_OPC 6
#define CHAR_HEIGHT_OPC 5
#define NO_DOOR 99
#define CHAR_WIDTH_OPC 6
#define CHAR_HEIGHT_OPC 5
#define NO_DOOR 99
#define COMPLETE_PAL 256
#define HALF_PAL 128
#define COMPLETE_PAL 256
#define HALF_PAL 128
static const int interf_x[] ={ 1, 65, 129, 193, 1, 65, 129 };
static const int interf_y[] ={ 51, 51, 51, 51, 83, 83, 83 };
@ -176,16 +209,20 @@ public:
void allocMemory();
void freeMemory();
void releaseGame();
void quitGame();
void loadPic(const char *NamePcc, byte *targetSurface, int colorCount);
void decompressPic(byte *targetSurface, int colorCount);
void loadPic(int roomNum, byte *targetSurface, int colorCount = 1) {
char rm[20];
sprintf(rm, "%i.alg", roomNum);
loadPic(rm, targetSurface, colorCount);
}
void loadPic(const char *NamePcc, byte *targetSurface, int colorCount = 1);
typedef char DacPalette256[256][3];
void setRGB(byte *dir_lectura, int plt);
void paleta_hare();
void updatePalette();
void assignDefaultPalette();
void setPalette(byte *PalBuf);
void copyBackground(int xorg, int yorg, int xdes, int ydes, int width,
int height, byte *src, byte *dest);
@ -208,9 +245,9 @@ public:
}
DacPalette256 gamePalette;
DacPalette256 palHare;
DacPalette256 palHareClaro;
DacPalette256 palHareOscuro;
DacPalette256 defaultPalette;
DacPalette256 brightPalette;
DacPalette256 darkPalette;
byte *VGA;
@ -230,8 +267,7 @@ public:
Common::ArjFile _arj;
int hay_sb;
int nivel_osc, previousMusic, roomMusic;
int previousMusic, roomMusic;
int roomNumber;
char roomDisk[20];
char currentData[20];
@ -242,10 +278,10 @@ public:
char iconName[44][13];
int objectNum[40], visible[40], isDoor[40];
int sitiobj_x[40], sitiobj_y[40], sentidobj[40];
int roomObjX[40], roomObjY[40], trackObj[40];
int inventoryObjects[43];
char _targetSurface[40][20];
int _destX[40], _destY[40], sentido_alkeva[40], alapuertakeva[40];
int _destX[40], _destY[40], trackCharacter_alkeva[40], alapuertakeva[40];
int x1[40], y1[40], x2[40], y2[40];
int takeObject, pickedObject;
int withVoices;
@ -254,28 +290,28 @@ public:
int frame_blind;
int frame_snore;
int frame_bat;
int c_mirar;
int c_poder;
int curExcuseLook;
int curExcuseAction;
int flags[NUM_FLAGS];
int frame_y;
int hare_x, hare_y, characterMoved, direccion_hare, sentido_hare, num_frame, hare_se_ve;
int sitio_x, sitio_y, checkFlags;
int curX, curY, characterMoved, curDirection, trackProtagonist, num_frame, hare_se_ve;
int roomX, roomY, checkFlags;
int doBreak;
int stepX, stepY;
int alto_hare, ancho_hare, feetHeight;
int curHeight, curWidth, feetHeight;
int talkHeight, talkWidth;
int suelo_x1, suelo_y1, suelo_x2, suelo_y2;
int floorX1, floorY1, floorX2, floorY2;
int near, far;
int sentido_final, walkToObject;
int trackFinal, walkToObject;
int objExit;
int diff_vez, conta_vez;
int timeDiff, startTime;
int hasAnswer;
int conta_blind_vez;
int savedTime;
int changeColor;
int breakOut;
int vb_x, sentido_vb, vb_se_mueve, frame_vb;
int vbX, trackVB, vbHasMoved, frame_vb;
float newHeight, newWidth;
int factor_red[202];
int frame_piano;
@ -283,9 +319,9 @@ public:
int frame_candles;
int color_solo;
int blinking;
int igorX, igorY, sentido_igor;
int x_dr, y_dr, sentido_dr;
int x_bj, y_bj, sentido_bj;
int igorX, igorY, trackIgor;
int x_dr, y_dr, trackDrascula;
int x_bj, y_bj, trackBJ;
int cont_sv;
int term_int;
int currentChapter;
@ -294,29 +330,217 @@ public:
int _color;
int musicStopped;
char select[23];
int hay_seleccion;
int selectionMade;
int mouseX;
int mouseY;
int mouseY_ant;
int button_izq;
int button_dch;
int leftMouseButton;
int rightMouseButton;
bool escoba();
bool runCurrentChapter();
void black();
void pickObject(int);
void walkUp();
void walkDown();
void pon_vb();
void lleva_vb(int pointX);
void moveVB();
void placeVB(int pointX);
void hipo_sin_nadie(int counter);
void openDoor(int nflag, int doorNum);
void showMap();
void setDarkPalette();
void withoutVerb();
void enterRoom(int);
void clearRoom();
void gotoObject(int, int);
void moveCursor();
void checkObjects();
void selectVerbFromBar();
bool verify1();
bool verify2();
Common::KeyCode getScan();
void selectVerb(int);
void updateVolume(Audio::Mixer::SoundType soundType, int prevVolume);
void volumeControls();
bool saveLoadScreen();
void print_abc(const char *, int, int);
void delay(int ms);
bool confirmExit();
void screenSaver();
void chooseObject(int objeto);
void addObject(int);
int removeObject(int osj);
void playFLI(const char *filefli, int vel);
void fadeFromBlack(int fadeSpeed);
char adjustToVGA(char value);
void color_abc(int cl);
void centerText(const char *,int,int);
void playSound(int soundNum);
bool animate(const char *animation, int FPS);
void fadeToBlack(int fadeSpeed);
void pause(int);
void placeIgor();
void placeBJ();
void placeDrascula();
void talkInit(const char *filename);
bool isTalkFinished(int* length);
void talk_igor(int, int);
void talk_drascula(int index, int talkerType = 0);
void talk_solo(const char *, const char *);
void talk_bartender(int, int talkerType = 0);
void talk_pen(const char *, const char *, int);
void talk_bj_bed(int);
void talk_htel(int);
void talk_bj(int);
void talk_baul(int);
void talk(int);
void talk(const char *, const char *);
void talk_sync(const char *, const char *, const char *);
void talk_drunk(int);
void talk_pianist(int);
void talk_wolf(int);
void talk_mus(int);
void talk_dr_grande(int);
void talk_vb(int);
void talk_vbpuerta(int);
void talk_blind(int);
void talk_hacker(const char *, const char *);
void hiccup(int);
void finishSound();
void stopSound();
void closeDoor(int nflag, int doorNum);
void playMusic(int p);
void stopMusic();
int musicStatus();
void updateRoom();
bool loadGame(const char *);
void updateDoor(int);
void setDefaultPalette();
void setPaletteBase(int darkness);
void assignBrightPalette();
void assignDarkPalette();
void setBrightPalette();
void updateVisible();
void startWalking();
void updateRefresh();
void updateRefresh_pre();
void moveCharacters();
void showMenu();
void clearMenu();
void removeObject();
bool exitRoom(int);
bool pickupObject();
bool checkAction(int);
void setCursorTable();
void enterName();
bool soundIsActive();
void WaitFrameSSN();
void MixVideo(byte *OldScreen, byte *NewScreen);
void Des_RLE(byte *BufferRLE, byte *MiVideoRLE);
void Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght);
byte *TryInMem();
int playFrameSSN();
byte *AuxBuffOrg;
byte *AuxBuffLast;
byte *AuxBuffDes;
byte *pointer;
int UsingMem;
byte CHUNK;
byte CMP, dacSSN[768];
byte *MiVideoSSN;
byte *mSession;
int FrameSSN;
int globalSpeed;
uint32 LastFrame;
int frame_pen;
int flag_tv;
byte *loadPCX(byte *NamePcc);
void WaitForNext(int FPS);
int getTime();
void reduce_hare_chico(int, int, int, int, int, int, int, byte *, byte *);
void quadrant_1();
void quadrant_2();
void quadrant_3();
void quadrant_4();
void saveGame(char[]);
void increaseFrameNum();
int whichObject();
bool checkMenuFlags();
void setupRoomsTable();
bool roomParse(int, int);
void converse(int);
void print_abc_opc(const char *, int, int, int);
void response(int);
void activatePendulum();
void MusicFadeout();
void playFile(const char *fname);
char *getLine(char *buf, int len);
void getIntFromLine(char *buf, int len, int* result);
void getStringFromLine(char *buf, int len, char* result);
void grr();
void updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delayVal = 3);
void updateAnim2(int y, int px, int py, int width, int height, int count, byte* src);
void room_0();
void room_1(int);
void room_2(int);
void room_3(int);
void room_4(int);
void room_5(int);
void room_6(int);
void room_7(int);
void room_8(int);
void room_9(int);
void room_12(int);
bool room_13(int fl);
void room_14(int);
void room_15(int);
void room_16(int);
void room_17(int);
void room_18(int);
void room_19(int);
bool room_21(int);
void room_22(int);
void room_23(int);
void room_24(int);
void room_26(int);
void room_27(int);
void room_29(int);
void room_30(int);
void room_31(int);
void room_34(int);
void room_35(int);
void room_44(int);
void room_49(int);
void room_53(int);
void room_54(int);
void room_55(int);
bool room_56(int);
void room_58(int);
void room_59(int);
bool room_60(int);
void room_61(int);
void room_62(int);
void room_63(int);
void room_102(int);
void animation_1_1();
void animation_2_1();
void animation_1_2();
void animation_2_2();
void animation_3_1();
void animation_4_1();
//
void animation_1_2();
void animation_2_2();
void animation_3_2();
void animation_4_2();
void animation_5_2();
@ -353,232 +577,15 @@ public:
void animation_34_2();
void animation_35_2();
void animation_36_2();
void update_1_pre();
void update_2();
void update_3();
void update_3_pre();
void update_4();
void update_5();
void update_5_pre();
void update_6_pre();
void update_7_pre();
void update_9_pre();
void update_12_pre();
void update_14_pre();
void update_15();
void update_16_pre();
void update_17_pre();
void update_17();
void update_18_pre();
void update_18();
void update_21_pre();
void update_22_pre();
void update_23_pre();
void update_24_pre();
void update_26_pre();
void update_26();
void update_27();
void update_27_pre();
void update_29();
void update_29_pre();
void update_30_pre();
void update_31_pre();
void update_34_pre();
void update_35_pre();
void update_31();
void update_34();
void update_35();
void hare_oscuro();
void withoutVerb();
bool para_cargar(char[]);
void carga_escoba(const char *);
void clearRoom();
void lleva_al_hare(int, int);
void moveCursor();
void checkObjects();
void elige_en_barra();
bool comprueba1();
bool comprueba2();
Common::KeyCode getScan();
void selectVerb(int);
void mesa();
bool saves();
void print_abc(const char *, int, int);
void delay(int ms);
bool confirmExit();
void screenSaver();
void chooseObject(int objeto);
void addObject(int);
int removeObject(int osj);
void fliplay(const char *filefli, int vel);
void fadeFromBlack(int fadeSpeed);
char adjustToVGA(char value);
void color_abc(int cl);
void centerText(const char *,int,int);
void playSound(int soundNum);
bool animate(const char *animation, int FPS);
void fadeToBlack(int fadeSpeed);
void pause(int);
void placeIgor();
void placeBJ();
void placeDrascula();
void talkInit(const char *filename);
bool isTalkFinished(int* length);
void talk_igor(int, int);
void talk_drascula(int index, int talkerType = 0);
void talk_solo(const char *, const char *);
void talk_bartender(int, int talkerType = 0);
void talk_pen(const char *, const char *, int);
void talk_bj_bed(int);
void talk_htel(int);
void talk_bj(int);
void talk_baul(int);
void talk(int);
void talk(const char *, const char *);
void talk_sinc(const char *, const char *, const char *);
void talk_drunk(int);
void talk_pianist(int);
void talk_wolf(int);
void talk_mus(int);
void talk_dr_grande(int);
void talk_vb(int);
void talk_vbpuerta(int);
void talk_blind(int);
void talk_hacker(const char *, const char *);
void hiccup(int);
void finishSound();
void stopSound();
void closeDoor(int nflag, int doorNum);
void playMusic(int p);
void stopMusic();
int musicStatus();
void updateRoom();
bool loadGame(const char *);
void updateDoor(int);
void color_hare();
void funde_hare(int oscuridad);
void paleta_hare_claro();
void paleta_hare_oscuro();
void hare_claro();
void updateVisible();
void startWalking();
void updateRefresh();
void updateRefresh_pre();
void pon_hare();
void showMenu();
void clearMenu();
void removeObject();
bool exitRoom(int);
bool pickupObject();
bool checkFlag(int);
void setCursorTable();
void enterName();
void para_grabar(char[]);
bool soundIsActive();
void openSSN(const char *Name, int Pause);
void WaitFrameSSN();
void MixVideo(byte *OldScreen, byte *NewScreen);
void Des_RLE(byte *BufferRLE, byte *MiVideoRLE);
void Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght);
void set_dacSSN(byte *dacSSN);
byte *TryInMem();
void EndSSN();
int playFrameSSN();
byte *AuxBuffOrg;
byte *AuxBuffLast;
byte *AuxBuffDes;
byte *pointer;
int UsingMem;
byte CHUNK;
byte CMP, dacSSN[768];
byte *MiVideoSSN;
byte *mSession;
int FrameSSN;
int globalSpeed;
uint32 LastFrame;
int frame_pen;
int flag_tv;
byte *loadPCX(byte *NamePcc);
void set_dac(byte *dac);
void WaitForNext(int FPS);
int getTime();
void reduce_hare_chico(int, int, int, int, int, int, int, byte *, byte *);
void quadrant_1();
void quadrant_2();
void quadrant_3();
void quadrant_4();
void update_62();
void update_62_pre();
void update_63();
void saveGame(char[]);
void increaseFrameNum();
int whichObject();
bool checkMenuFlags();
bool roomParse(RoomTalkAction*, int);
void room_0();
void room_1(int);
void room_2(int);
void room_3(int);
void room_4(int);
void room_5(int);
void room_6(int);
void room_7(int);
void room_8(int);
void room_9(int);
void room_12(int);
void room_14(int);
void room_15(int);
void room_16(int);
void room_17(int);
void room_18(int);
void room_19(int);
bool room_21(int);
void room_22(int);
void room_23(int);
void room_24(int);
void room_26(int);
void room_27(int);
void room_29(int);
void room_30(int);
void room_31(int);
void room_34(int);
void room_35(int);
void room_44(int);
void room_62(int);
void room_63(int);
void converse(const char *);
void print_abc_opc(const char *, int, int, int);
void response(int);
void MusicFadeout();
void playFile(const char *fname);
char *getLine(char *buf, int len);
void getIntFromLine(char *buf, int len, int* result);
void getStringFromLine(char *buf, int len, char* result);
void grr();
bool room_13(int fl);
void update_13();
void update_20();
void updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delayVal = 3);
void updateAnim2(int y, int px, int py, int width, int height, int count, byte* src);
//
void animation_1_3();
void animation_2_3();
void animation_3_3();
void animation_4_3();
void animation_5_3();
void animation_6_3();
void animation_rayo();
void animation_ray();
//
void animation_1_4();
void animation_2_4();
void animation_3_4();
@ -588,6 +595,7 @@ public:
void animation_7_4();
void animation_8_4();
void animation_9_4();
//
void animation_1_5();
void animation_2_5();
void animation_3_5();
@ -605,29 +613,7 @@ public:
void animation_15_5();
void animation_16_5();
void animation_17_5();
void room_49(int);
void room_53(int);
void room_54(int);
void room_55(int);
bool room_56(int);
void update_53_pre();
void update_54_pre();
void update_49_pre();
void update_56_pre();
void update_50();
void update_57();
void room_58(int);
void room_59(int);
bool room_60(int);
void room_61(int);
void room_pendulum(int);
void update_pendulum();
void update_58();
void update_58_pre();
void update_59_pre();
void update_60_pre();
void update_60();
void update_61();
//
void animation_1_6();
void animation_2_6();
void animation_3_6();
@ -644,7 +630,60 @@ public:
void animation_15_6();
void animation_18_6();
void animation_19_6();
void activatePendulum();
void update_1_pre();
void update_2();
void update_3();
void update_3_pre();
void update_4();
void update_5();
void update_5_pre();
void update_6_pre();
void update_7_pre();
void update_9_pre();
void update_12_pre();
void update_14_pre();
void update_13();
void update_15();
void update_16_pre();
void update_17_pre();
void update_17();
void update_18_pre();
void update_18();
void update_20();
void update_21_pre();
void update_22_pre();
void update_23_pre();
void update_24_pre();
void update_26_pre();
void update_26();
void update_27();
void update_27_pre();
void update_29();
void update_29_pre();
void update_30_pre();
void update_31_pre();
void update_34_pre();
void update_35_pre();
void update_31();
void update_34();
void update_35();
void update_49_pre();
void update_53_pre();
void update_54_pre();
void update_56_pre();
void update_50();
void update_57();
void update_58();
void update_58_pre();
void update_59_pre();
void update_60_pre();
void update_60();
void update_61();
void update_62();
void update_62_pre();
void update_63();
void update_102();
private:
int _lang;
@ -669,7 +708,7 @@ extern const char *_textd1[][11];
extern const ItemLocation itemLocations[];
extern int frame_x[20];
extern const int x_pol[44], y_pol[44];
extern const int x_barra[];
extern const int verbBarX[];
extern const int x1d_menu[], y1d_menu[];
extern const CharInfo charMap[];

File diff suppressed because it is too large Load Diff

View File

@ -116,7 +116,7 @@ const int y_pol[44] = {0, 1, 1, 1, 1, 1, 1, 1, 27, 27, 1,
1, 1, 1, 1, 1, 27, 27, 27, 27, 27,
1, 1, 1, 1, 1, 27, 27, 27, 27, 27,
27, 1, 1};
const int x_barra[] = {6, 51, 96, 141, 186, 232, 276, 321};
const int verbBarX[] = {6, 51, 96, 141, 186, 232, 276, 321};
const int x1d_menu[] = {280, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120,
160, 200, 240, 0, 40, 80, 120, 160, 200, 240, 0,
40, 80, 120, 160, 200, 240, 0};
@ -127,174 +127,426 @@ int frame_x[20] = {43, 87, 130, 173, 216, 259};
// Note: default action needs to be LAST for each group
// of actions with the same number
RoomTalkAction room0Actions[] = {
// num action object speech
{ 1, kVerbLook, -1, 54 },
{ 1, kVerbMove, -1, 19 },
{ 1, kVerbPick, -1, 11 },
{ 1, kVerbOpen, -1, 9 },
{ 1, kVerbClose, -1, 9 },
{ 1, kVerbTalk, -1, 16 },
{ 1, kVerbDefault, -1, 11 },
RoomTalkAction roomActions[] = {
//room num action object speech
{ 0, 1, kVerbLook, -1, 54 },
{ 0, 1, kVerbMove, -1, 19 },
{ 0, 1, kVerbPick, -1, 11 },
{ 0, 1, kVerbOpen, -1, 9 },
{ 0, 1, kVerbClose, -1, 9 },
{ 0, 1, kVerbTalk, -1, 16 },
{ 0, 1, kVerbDefault, -1, 11 },
// ----------------------------------
{ 2, kVerbMove, -1, 19 },
{ 2, kVerbOpen, -1, 9 },
{ 2, kVerbClose, -1, 9 },
{ 2, kVerbTalk, -1, 16 },
{ 0, 2, kVerbMove, -1, 19 },
{ 0, 2, kVerbOpen, -1, 9 },
{ 0, 2, kVerbClose, -1, 9 },
{ 0, 2, kVerbTalk, -1, 16 },
// ----------------------------------
{ 3, kVerbLook, -1, 316 },
{ 3, kVerbMove, -1, 317 },
{ 3, kVerbPick, -1, 318 },
{ 3, kVerbOpen, -1, 319 },
{ 3, kVerbClose, -1, 319 },
{ 3, kVerbTalk, -1, 320 },
{ 3, kVerbDefault, -1, 318 },
{ 0, 3, kVerbLook, -1, 316 },
{ 0, 3, kVerbMove, -1, 317 },
{ 0, 3, kVerbPick, -1, 318 },
{ 0, 3, kVerbOpen, -1, 319 },
{ 0, 3, kVerbClose, -1, 319 },
{ 0, 3, kVerbTalk, -1, 320 },
{ 0, 3, kVerbDefault, -1, 318 },
// ----------------------------------
{ 4, kVerbMove, -1, 19 },
{ 4, kVerbOpen, -1, 9 },
{ 4, kVerbClose, -1, 9 },
{ 4, kVerbTalk, -1, 16 },
{ 0, 4, kVerbMove, -1, 19 },
{ 0, 4, kVerbOpen, -1, 9 },
{ 0, 4, kVerbClose, -1, 9 },
{ 0, 4, kVerbTalk, -1, 16 },
// ----------------------------------
{ 5, kVerbOpen, -1, 9 },
{ 5, kVerbClose, -1, 9 },
{ 5, kVerbTalk, -1, 16 },
{ 0, 5, kVerbOpen, -1, 9 },
{ 0, 5, kVerbClose, -1, 9 },
{ 0, 5, kVerbTalk, -1, 16 },
// ----------------------------------
{ 6, kVerbMove, -1, 19 },
{ 6, kVerbOpen, -1, 9 },
{ 6, kVerbClose, -1, 9 },
{ 6, kVerbTalk, -1, 16 }
};
{ 0, 6, kVerbMove, -1, 19 },
{ 0, 6, kVerbOpen, -1, 9 },
{ 0, 6, kVerbClose, -1, 9 },
{ 0, 6, kVerbTalk, -1, 16 },
// ==================================
{ 1, -1, kVerbPick, 118, 5 },
{ 1, -1, kVerbOpen, 118, 3 },
{ 1, -1, kVerbClose, 118, 4 },
{ 1, -1, kVerbTalk, 118, 6 },
// ----------------------------------
{ 1, -1, kVerbLook, 119, 8 },
{ 1, -1, kVerbMove, 119, 13 },
{ 1, -1, kVerbClose, 119, 10 },
{ 1, -1, kVerbTalk, 119, 12 },
// ----------------------------------
{ 1, -1, kVerbMove, 120, 13 },
{ 1, -1, kVerbOpen, 120, 18 },
{ 1, -1, kVerbTalk, 120, 15 },
// ==================================
{ 3, -1, kVerbLook, 129, 21 },
{ 3, -1, kVerbPick, 129, 5 },
{ 3, -1, kVerbMove, 129, 24 },
{ 3, -1, kVerbOpen, 129, 22 },
{ 3, -1, kVerbClose, 129, 10 },
// ----------------------------------
{ 3, -1, kVerbLook, 131, 27 },
{ 3, -1, kVerbPick, 131, 5 },
{ 3, -1, kVerbMove, 131, 24 },
{ 3, -1, kVerbOpen, 131, 22 },
{ 3, -1, kVerbClose, 131, 10 },
{ 3, -1, kVerbTalk, 131, 23 },
// ----------------------------------
{ 3, -1, kVerbLook, 132, 28 },
{ 3, -1, kVerbPick, 132, 5 },
{ 3, -1, kVerbMove, 132, 24 },
{ 3, -1, kVerbOpen, 132, 22 },
{ 3, -1, kVerbClose, 132, 10 },
{ 3, -1, kVerbTalk, 132, 23 },
// ----------------------------------
{ 3, -1, kVerbLook, 133, 321 },
{ 3, -1, kVerbPick, 133, 31 },
{ 3, -1, kVerbMove, 133, 34 },
{ 3, -1, kVerbOpen, 133, 30 },
{ 3, -1, kVerbClose, 133, 10 },
// ----------------------------------
{ 3, -1, kVerbLook, 166, 55 },
{ 3, -1, kVerbPick, 166, 7 },
// ----------------------------------
{ 3, -1, kVerbLook, 211, 184 },
// ==================================
{ 4, -1, kVerbLook, 189, 182 },
// ----------------------------------
{ 4, -1, kVerbLook, 207, 175 },
{ 4, -1, kVerbTalk, 207, 176 },
// ----------------------------------
{ 4, -1, kVerbLook, 208, 177 },
// ----------------------------------
{ 4, -1, kVerbLook, 209, 179 },
// ----------------------------------
{ 4, -1, kVerbLook, 210, 180 },
{ 4, -1, kVerbOpen, 210, 181 },
// ==================================
{ 5, -1, kVerbMove, 136, 13 },
{ 5, -1, kVerbOpen, 136, 18 },
{ 5, -1, kVerbTalk, 136, 15 },
// ----------------------------------
{ 5, -1, kVerbLook, 212, 187 },
{ 5, -1, kVerbTalk, 212, 188 },
// ----------------------------------
{ 5, -1, kVerbLook, 213, 189 },
{ 5, -1, kVerbOpen, 213, 190 },
// ==================================
{ 6, -1, kVerbPick, 144, 43 },
// ----------------------------------
{ 6, -1, kVerbLook, 138, 35 },
{ 6, -1, kVerbTalk, 138, 6 },
// ----------------------------------
{ 6, -1, kVerbLook, 143, 37 },
{ 6, -1, kVerbPick, 143, 7 },
{ 6, -1, kVerbMove, 143, 7 },
{ 6, -1, kVerbTalk, 143, 38 },
// ----------------------------------
{ 6, -1, kVerbLook, 139, 36 },
// ----------------------------------
{ 6, -1, kVerbLook, 140, 147 },
// ==================================
{ 7, -1, kVerbLook, 164, 35 },
// ----------------------------------
{ 7, -1, kVerbLook, 169, 44 },
// ==================================
{ 9, -1, kVerbLook, 150, 35 },
{ 9, -1, kVerbTalk, 150, 6 },
// ----------------------------------
{ 9, -1, kVerbLook, 51, 60 },
// ==================================
{ 12, -1, kVerbLook, 154, 329 },
{ 12, -1, kVerbTalk, 154, 330 },
// ----------------------------------
{ 12, -1, kVerbMove, 155, 48 },
{ 12, -1, kVerbTalk, 155, 331 },
// ----------------------------------
{ 12, -1, kVerbLook, 156, 35 },
{ 12, -1, kVerbMove, 156, 48 },
{ 12, -1, kVerbTalk, 156, 50 },
// ==================================
{ 14, -1, kVerbLook, 200, 165 },
// ----------------------------------
{ 14, -1, kVerbLook, 201, 166 },
// ----------------------------------
{ 14, -1, kVerbLook, 202, 167 },
// ----------------------------------
{ 14, -1, kVerbLook, 203, 168 },
{ 14, -1, kVerbPick, 203, 170 },
{ 14, -1, kVerbMove, 203, 170 },
{ 14, -1, kVerbTalk, 203, 169 },
// ----------------------------------
{ 14, -1, kVerbLook, 204, 171 },
// ==================================
{ 15, -1, kVerbTalk, 188, 333 },
{ 15, -1, kVerbLook, 188, 334 },
// ----------------------------------
{ 15, -1, kVerbLook, 205, 172 },
// ----------------------------------
{ 15, -1, kVerbLook, 206, 173 },
{ 15, -1, kVerbMove, 206, 174 },
{ 15, -1, kVerbOpen, 206, 174 },
// ==================================
{ 16, -1, kVerbTalk, 163, 6 },
// ----------------------------------
{ 16, -1, kVerbLook, 183, 340 },
// ----------------------------------
{ 16, -1, kVerbLook, 185, 37 },
{ 16, -1, kVerbPick, 185, 7 },
{ 16, -1, kVerbMove, 185, 7 },
{ 16, -1, kVerbTalk, 185, 38 },
// ----------------------------------
{ 16, -1, kVerbTalk, 187, 345 },
// ==================================
{ 18, -1, kVerbLook, 181, 348 },
// ----------------------------------
{ 18, -1, kVerbLook, 182, 154 },
// ==================================
{ 19, -1, kVerbLook, 214, 191 },
// ==================================
{ 22, -1, kVerbPick, 140, 7 },
// ----------------------------------
{ 22, -1, kVerbLook, 52, 497 },
{ 22, -1, kVerbTalk, 52, 498 },
// ==================================
{ 24, -1, kVerbLook, 151, 461 },
// ==================================
{ 26, -1, kVerbOpen, 167, 467 },
// ----------------------------------
{ 26, -1, kVerbLook, 164, 470 },
{ 26, -1, kVerbOpen, 164, 471 },
// ----------------------------------
{ 26, -1, kVerbLook, 163, 472 },
{ 26, -1, kVerbPick, 163, 473 },
// ----------------------------------
{ 26, -1, kVerbLook, 165, 474 },
// ----------------------------------
{ 26, -1, kVerbLook, 168, 476 },
{ 26, -1, kVerbPick, 168, 477 },
// ==================================
{ 29, -1, kVerbLook, 152, 463 },
{ 29, -1, kVerbOpen, 152, 464 },
// ----------------------------------
{ 29, -1, kVerbLook, 153, 465 },
// ----------------------------------
{ 29, -1, kVerbPick, 154, 466 },
// ----------------------------------
{ 29, -1, kVerbOpen, 156, 467 },
// ==================================
{ 30, -1, kVerbOpen, 157, 468 },
// ----------------------------------
{ 30, -1, kVerbLook, 158, 469 },
// ==================================
{ 31, -1, kVerbLook, 161, 470 },
{ 31, -1, kVerbOpen, 161, 471 },
// ==================================
{ 34, -1, kVerbLook, 146, 458 },
{ 34, -1, kVerbPick, 146, 459 },
// ==================================
{ 44, -1, kVerbLook, 172, 428 },
// ==================================
{ 49, -1, kVerbLook, 51, 132 },
// ----------------------------------
{ 49, -1, kVerbLook, 200, 133 },
{ 49, -1, kVerbTalk, 200, 134 },
// ----------------------------------
{ 49, -1, kVerbLook, 201, 135 },
// ----------------------------------
{ 49, -1, kVerbLook, 203, 137 },
// ==================================
{ 53, -1, kVerbLook, 121, 128 },
// ----------------------------------
{ 53, -1, kVerbLook, 209, 129 },
// ----------------------------------
{ 53, -1, kVerbLook, 52, 447 },
{ 53, -1, kVerbTalk, 52, 131 },
// ==================================
{ 54, -1, kVerbLook, 53, 127 },
// ----------------------------------
{ 54, -1, kVerbOpen, 119, 125 },
{ 54, -1, kVerbLook, 119, 126 },
// ==================================
{ 55, -1, kVerbLook, 122, 138 },
// ----------------------------------
{ 55, -1, kVerbLook, 204, 139 },
// ----------------------------------
{ 55, -1, kVerbLook, 205, 140 },
// ==================================
{ 56, -1, kVerbLook, 124, 450 },
// ----------------------------------
{ 56, -1, kVerbOpen, 207, 141 },
// ----------------------------------
{ 56, -1, kVerbLook, 208, 142 },
// ==================================
{ 58, -1, kVerbLook, 104, 454 },
// ==================================
{ 60, -1, kVerbLook, 112, 440 },
// ----------------------------------
{ 60, -1, kVerbTalk, 115, 455 },
// ----------------------------------
{ 60, -1, kVerbTalk, 56, 455 },
// ----------------------------------
{ 60, -1, kVerbLook, 114, 167 },
// ----------------------------------
{ 60, -1, kVerbLook, 113, 168 },
{ 60, -1, kVerbPick, 113, 170 },
{ 60, -1, kVerbMove, 113, 170 },
{ 60, -1, kVerbTalk, 113, 169 },
// ==================================
{ 61, -1, kVerbLook, 116, 172 },
// ----------------------------------
{ 61, -1, kVerbLook, 117, 173 },
// ----------------------------------
{ 61, -1, kVerbMove, 117, 174 },
{ 61, -1, kVerbOpen, 117, 174 },
{ 62, -1, kVerbLook, 100, 168 },
{ 62, -1, kVerbTalk, 100, 169 },
{ 62, -1, kVerbPick, 100, 170 },
// ----------------------------------
{ 62, -1, kVerbLook, 101, 171 },
// ----------------------------------
{ 62, -1, kVerbLook, 102, 167 },
// ----------------------------------
{ 62, -1, kVerbLook, 103, 166 },
// ==================================
{ 63, -1, kVerbLook, 110, 172 },
// ----------------------------------
{ 63, -1, kVerbLook, 109, 173 },
{ 63, -1, kVerbMove, 109, 174 },
// ----------------------------------
{ 63, -1, kVerbLook, 108, 334 },
{ 63, -1, kVerbTalk, 108, 333 },
// ==================================
{ 102, -1, kVerbLook, 100, 452 },
{ 102, -1, kVerbLook, 101, 123 },
// ==================================
// Pseudoroom. checkAction() menuScreen == 1
{ 200, 1, kVerbLook, 28, 328 },
// ----------------------------------
{ 200, 2, kVerbLook, 28, 328 },
{ 200, 2, kVerbLook, 7, 143 },
{ 200, 2, kVerbLook, 8, 145 },
{ 200, 2, kVerbLook, 9, 147 },
{ 200, 2, kVerbLook, 10, 151 },
{ 200, 2, kVerbLook, 11, 152 },
{ 200, 2, kVerbLook, 12, 154 },
{ 200, 2, kVerbLook, 13, 155 },
{ 200, 2, kVerbLook, 14, 157 },
{ 200, 2, kVerbLook, 15, 58 },
{ 200, 2, kVerbLook, 16, 158 },
{ 200, 2, kVerbLook, 17, 159 },
{ 200, 2, kVerbLook, 18, 160 },
{ 200, 2, kVerbLook, 19, 161 },
{ 200, 2, kVerbLook, 23, 152 },
{ 200, 2, kVerbTalk, 7, 144 },
{ 200, 2, kVerbTalk, 8, 146 },
{ 200, 2, kVerbTalk, 9, 148 },
{ 200, 2, kVerbTalk, 11, 153 },
// ----------------------------------
{ 200, 3, kVerbLook, 22, 307 },
{ 200, 3, kVerbLook, 28, 328 },
{ 200, 3, kVerbLook, 7, 143 },
{ 200, 3, kVerbLook, 8, 145 },
{ 200, 3, kVerbLook, 9, 147 },
{ 200, 3, kVerbLook, 10, 151 },
{ 200, 3, kVerbLook, 11, 152 },
{ 200, 3, kVerbLook, 12, 154 },
{ 200, 3, kVerbLook, 13, 155 },
{ 200, 3, kVerbLook, 14, 157 },
{ 200, 3, kVerbLook, 15, 58 },
{ 200, 3, kVerbLook, 16, 158 },
{ 200, 3, kVerbLook, 17, 159 },
{ 200, 3, kVerbLook, 18, 160 },
{ 200, 3, kVerbLook, 19, 161 },
{ 200, 3, kVerbLook, 20, 162 },
{ 200, 3, kVerbLook, 23, 152 },
{ 200, 3, kVerbTalk, 7, 144 },
{ 200, 3, kVerbTalk, 8, 146 },
{ 200, 3, kVerbTalk, 9, 148 },
{ 200, 3, kVerbTalk, 11, 153 },
// ----------------------------------
{ 200, 4, kVerbLook, 7, 478 },
{ 200, 4, kVerbLook, 8, 480 },
{ 200, 4, kVerbLook, 10, 485 },
{ 200, 4, kVerbLook, 11, 488 },
{ 200, 4, kVerbLook, 12, 486 },
{ 200, 4, kVerbLook, 13, 490 },
{ 200, 4, kVerbLook, 14, 122 },
{ 200, 4, kVerbLook, 15, 117 },
{ 200, 4, kVerbLook, 16, 491 },
{ 200, 4, kVerbLook, 17, 478 },
{ 200, 4, kVerbLook, 18, 493 },
{ 200, 4, kVerbLook, 20, 162 },
{ 200, 4, kVerbLook, 21, 496 },
{ 200, 4, kVerbLook, 22, 161 },
{ 200, 4, kVerbLook, 28, 328 },
{ 200, 4, kVerbTalk, 15, 118 },
{ 200, 4, kVerbOpen, 15, 119 },
// ----------------------------------
{ 200, 5, kVerbLook, 7, 478 },
{ 200, 5, kVerbLook, 8, 120 },
{ 200, 5, kVerbLook, 11, 488 },
{ 200, 5, kVerbLook, 13, 490 },
{ 200, 5, kVerbLook, 14, 121 },
{ 200, 5, kVerbLook, 15, 117 },
{ 200, 5, kVerbLook, 17, 478 },
{ 200, 5, kVerbLook, 20, 162 },
{ 200, 5, kVerbLook, 28, 328 },
{ 200, 5, kVerbTalk, 15, 118 },
{ 200, 5, kVerbOpen, 15, 119 },
// ----------------------------------
{ 200, 6, kVerbLook, 20, 123 },
{ 200, 6, kVerbLook, 21, 441 },
{ 200, 6, kVerbLook, 28, 328 },
// ==================================
// Pseudoroom. checkAction() menuScreen != 1
{ 201, 1, kVerbLook, 50, 308 },
{ 201, 1, kVerbOpen, 50, 310 },
{ 201, 1, kVerbClose, 50, 311 },
{ 201, 1, kVerbMove, 50, 312 },
{ 201, 1, kVerbPick, 50, 313 },
{ 201, 1, kVerbTalk, 50, 314 },
// ----------------------------------
{ 201, 2, kVerbLook, 50, 308 },
{ 201, 2, kVerbOpen, 50, 310 },
{ 201, 2, kVerbClose, 50, 311 },
{ 201, 2, kVerbMove, 50, 312 },
{ 201, 2, kVerbPick, 50, 313 },
{ 201, 2, kVerbTalk, 50, 314 },
// ----------------------------------
{ 201, 3, kVerbLook, 50, 309 },
{ 201, 3, kVerbOpen, 50, 310 },
{ 201, 3, kVerbClose, 50, 311 },
{ 201, 3, kVerbMove, 50, 312 },
{ 201, 3, kVerbPick, 50, 313 },
{ 201, 3, kVerbTalk, 50, 314 },
// ----------------------------------
{ 201, 4, kVerbLook, 50, 309 },
{ 201, 4, kVerbOpen, 50, 310 },
{ 201, 4, kVerbClose, 50, 311 },
{ 201, 4, kVerbMove, 50, 312 },
{ 201, 4, kVerbPick, 50, 313 },
{ 201, 4, kVerbTalk, 50, 314 },
// ----------------------------------
{ 201, 5, kVerbLook, 50, 309 }, // Originally these are with
{ 201, 5, kVerbOpen, 50, 310 }, // completely wrong voices
{ 201, 5, kVerbClose, 50, 311 },
{ 201, 5, kVerbMove, 50, 312 },
{ 201, 5, kVerbPick, 50, 313 },
{ 201, 5, kVerbTalk, 50, 314 },
// ----------------------------------
{ 201, 6, kVerbOpen, 50, 310 },
{ 201, 6, kVerbClose, 50, 311 },
{ 201, 6, kVerbMove, 50, 312 },
{ 201, 6, kVerbPick, 50, 313 },
{ 201, 6, kVerbTalk, 50, 314 },
RoomTalkAction room1Actions[] = {
// num action object speech
{ -1, kVerbPick, 118, 5 },
{ -1, kVerbOpen, 118, 3 },
{ -1, kVerbClose, 118, 4 },
{ -1, kVerbTalk, 118, 6 },
// ----------------------------------
{ -1, kVerbLook, 119, 8 },
{ -1, kVerbMove, 119, 13 },
{ -1, kVerbClose, 119, 10 },
{ -1, kVerbTalk, 119, 12 },
// ----------------------------------
{ -1, kVerbMove, 120, 13 },
{ -1, kVerbOpen, 120, 18 },
{ -1, kVerbTalk, 120, 15 }
};
RoomTalkAction room3Actions[] = {
// num action object speech
{ -1, kVerbLook, 129, 21 },
{ -1, kVerbPick, 129, 5 },
{ -1, kVerbMove, 129, 24 },
{ -1, kVerbOpen, 129, 22 },
{ -1, kVerbClose, 129, 10 },
// ----------------------------------
{ -1, kVerbLook, 131, 27 },
{ -1, kVerbPick, 131, 5 },
{ -1, kVerbMove, 131, 24 },
{ -1, kVerbOpen, 131, 22 },
{ -1, kVerbClose, 131, 10 },
{ -1, kVerbTalk, 131, 23 },
// ----------------------------------
{ -1, kVerbLook, 132, 28 },
{ -1, kVerbPick, 132, 5 },
{ -1, kVerbMove, 132, 24 },
{ -1, kVerbOpen, 132, 22 },
{ -1, kVerbClose, 132, 10 },
{ -1, kVerbTalk, 132, 23 },
// ----------------------------------
{ -1, kVerbLook, 133, 321 },
{ -1, kVerbPick, 133, 31 },
{ -1, kVerbMove, 133, 34 },
{ -1, kVerbOpen, 133, 30 },
{ -1, kVerbClose, 133, 10 },
// ----------------------------------
{ -1, kVerbLook, 166, 55 },
{ -1, kVerbPick, 166, 7 },
// ----------------------------------
{ -1, kVerbLook, 211, 184 }
};
RoomTalkAction room4Actions[] = {
// num action object speech
{ -1, kVerbLook, 189, 182 },
// ----------------------------------
{ -1, kVerbLook, 207, 175 },
{ -1, kVerbTalk, 207, 176 },
// ----------------------------------
{ -1, kVerbLook, 208, 177 },
// ----------------------------------
{ -1, kVerbLook, 209, 179 },
// ----------------------------------
{ -1, kVerbLook, 210, 180 },
{ -1, kVerbOpen, 210, 181 }
};
RoomTalkAction room5Actions[] = {
// num action object speech
{ -1, kVerbMove, 136, 13 },
{ -1, kVerbOpen, 136, 18 },
{ -1, kVerbTalk, 136, 15 },
// ----------------------------------
{ -1, kVerbLook, 212, 187 },
{ -1, kVerbTalk, 212, 188 },
// ----------------------------------
{ -1, kVerbLook, 213, 189 },
{ -1, kVerbOpen, 213, 190 }
};
RoomTalkAction room6Actions[] = {
// num action object speech
{ -1, kVerbPick, 144, 43 },
// ----------------------------------
{ -1, kVerbLook, 138, 35 },
{ -1, kVerbTalk, 138, 6 },
// ----------------------------------
{ -1, kVerbLook, 143, 37 },
{ -1, kVerbPick, 143, 7 },
{ -1, kVerbMove, 143, 7 },
{ -1, kVerbTalk, 143, 38 },
// ----------------------------------
{ -1, kVerbLook, 139, 36 },
// ----------------------------------
{ -1, kVerbLook, 140, 147 }
};
RoomTalkAction room12Actions[] = {
// num action object speech
{ -1, kVerbLook, 154, 329 },
{ -1, kVerbTalk, 154, 330 },
// ----------------------------------
{ -1, kVerbMove, 155, 48 },
{ -1, kVerbTalk, 155, 331 },
// ----------------------------------
{ -1, kVerbLook, 156, 35 },
{ -1, kVerbMove, 156, 48 },
{ -1, kVerbTalk, 156, 50 }
};
RoomTalkAction room14Actions[] = {
// num action object speech
{ -1, kVerbLook, 200, 165 },
// ----------------------------------
{ -1, kVerbLook, 201, 166 },
// ----------------------------------
{ -1, kVerbLook, 202, 167 },
// ----------------------------------
{ -1, kVerbLook, 203, 168 },
{ -1, kVerbPick, 203, 170 },
{ -1, kVerbMove, 203, 170 },
{ -1, kVerbTalk, 203, 169 },
// ----------------------------------
{ -1, kVerbLook, 204, 171 }
};
const char *_text[][501] = {
{
// 0
"",
"ITS THE SECOND BIGGEST DOOR I'VE SEEN IN MY LIFE",
"THAT'S THE SECOND BIGGEST DOOR I'VE SEEN IN MY LIFE",
"NOT REALLY",
"THE CHURCH IS ALL BOARDED UP, IT MUST HAVE BEEN ABANDONED SEVERAL YEARS AGO",
"I HAVEN'T OPENED IT",
@ -302,7 +554,7 @@ const char *_text[][501] = {
"WHAT SHOULD I DO, SHOULD I PULL IT OFF?",
"HI THERE DOOR, I'M GOING TO MAKE YOU A DOOR-FRAME",
"IT'S TOO MUCH FOR ME",
"THERE'S A WINDOW STOPPING THE GAME FROM WORKING PROPERLY",
"THE WINDOW IS BOARDED UP",
"I CAN'T",
// 10
"YES, THAT'S DONE",
@ -332,7 +584,7 @@ const char *_text[][501] = {
"ITS LOCKED",
"I'VE GOT ONE",
"YOO HOO, UNCLE EVARISTO!",
"THERE'S NO REPLY",
"THERE'S NO POWER",
"IT'S NOT WELL PARKED",
// 35
"IT'S A DOOR",
@ -422,7 +674,7 @@ const char *_text[][501] = {
"HOW IS THE FAMILY?",
"THAT IS JUST LIKE YOU!",
"BUT HOW DO I GET THAT?",
"MY RELIGION DOES NOT ALLOW ME",
"MY RELIGION DOES NOT ALLOW ME TO",
"IT'D BE BETTER NOT",
// 110
"YEAH, SURE MAN!",
@ -438,8 +690,8 @@ const char *_text[][501] = {
"NO, IT MUST BE KEPT SOMEWHERE AWAY FROM THE MUTANT ACTION OF THE ATMOSPHERE",
// 120
"HE IS VERY STIFF, JUST LIKE MY BOSS",
"A VERY SHARP STICK",
"YOU FAITHFUL SHARP-PAINTED STICK, NOBLE TRANSILVANIAN OAK TREE",
"A VERY SHARP STAKE",
"YOU FAITHFUL SHARP-PAINTED STAKE, NOBLE TRANSILVANIAN OAK TREE",
"DAMN, I HAVE TO CUT MY NAILS!",
"B.J. IS IN THERE... SHE IS A REALLY HOT CHICK!",
// 125
@ -453,7 +705,7 @@ const char *_text[][501] = {
"FORGET IT. I AM NOT GOING TO TELL HIM ANYTHING IN CASE HE GETS MAD",
"IT SEEMS QUITE RATIONAL",
"IT IS A PICTURE OF PLATO WRITING HIS LOST DIALOGUE",
"I AM NOT ONE OF THOSE WHO TALKS TO POSTERS",
"I AM NOT ONE OF THOSE PEOPLE WHO TALKS TO POSTERS",
// 135
"THAT'S A VERY CUTE DESK",
"IT IS A VAMPIRES HUNTER'S DIPLOMA OFFICIALLY APPROVED BY OXFORD UNIVERSITY",
@ -461,7 +713,7 @@ const char *_text[][501] = {
"IT SEEMS LIKE THESE SCREWS ARE NOT TIGHTENED PROPERLY",
"DON'T LOOK NOW, BUT I THINK THAT A HIDDEN CAMERA IS FOCUSING ON ME",
// 140
"THAT'S A VERY MODERN STICK DETECTOR",
"THAT'S A VERY MODERN STAKE DETECTOR",
"NO. THE LABORATORY IS ON THE SECOND FLOOR",
"A NICE BEDSIDE TABLE",
"IT'S A LOT OF MONEY THAT CAN'T BE MISSING IN ANY VALUABLE ADVENTURE",
@ -469,24 +721,24 @@ const char *_text[][501] = {
// 145
"THOSE ARE STRANGE LEAVES. THEY MUST HAVE BROUGHT THEM FROM SOUTH AMERICA OR AROUND THERE",
"I DON'T THINK THEY WOULD ANSWER ME",
"THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY SHOW THE BEAUTY WITHIN IT",
"THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY SHOW THE FULL EXTENT OF ITS BEAUTY",
"I ONLY PRAY BEFORE I GO TO BED",
"HEY, THIS PIKE SEEMS A LITTLE BIT LOOSE!",
"HEY, THIS SPIKE SEEMS A LITTLE BIT LOOSE!",
// 150
"I HOPE YOU WON'T COMPLAIN ABOUT NOT GETTING ANY CLUES FROM ME",
"IT'S A QUITE CONVENTIONAL PIKE",
"IT'S A QUITE CONVENTIONAL SPIKE",
"THEY ARE CUTE, THOUGH THEY ARE COVERED WITH A LITTLE BIT OF SHIT",
"NO, THEY WON'T HEAR ME. HA,HA,HA THIS IS GREAT!",
"\"SLEEPING BEAUTY\" FROM TCHAIKOVSKY, OR CHOIFRUSKY, OR WHATEVER IT IS",
// 155
"VERY TEMPTING",
"NO, I DO NOT PUT USED BUBBLE GUMS IN MY MOUTH",
"NO, I DO NOT PUT USED BUBBLE GUM IN MY MOUTH",
"THAT'S A VERY NICE SICKLE. I WONDER WHERE THE HAMMER IS",
"TOBACCO MANUFACTURERS WARN ABOUT HEALTH BEING SERIOUSLY DAMAGED BY SANITARY AUTHORITIES",
"AN ABSOLUTELY NORMAL CANDLE, INCLUDING WAX AND EVERYTHING",
// 160
"THESE TWO SHINY COINS REALLY DO GLITTER!",
"THIS SHINY COIN REALLY DOES GLITTER!",
"THESE TWO SHINY COINS REALLY GLITTER!",
"THIS SHINY COIN REALLY GLITTERS!",
"WITH THIS I WILL BE IMMUNE AGAINST VAMPIRE BITES",
"NO, IT'S IS NOT THE RIGHT MOMENT YET",
"THERE IS A ONE THOUSAND BILL AND A COUPLE OF COINS",
@ -511,7 +763,7 @@ const char *_text[][501] = {
// 180
"A VERY NICE DOOR",
"IT'S CLOSED",
"A COMPLETELY LOCKED BARREL",
"A COMPLETELY SEALED BARREL",
"",
"AREN'T THESE BUGS REALLY CUTE?",
// 185
@ -519,19 +771,19 @@ const char *_text[][501] = {
"THERE IS NO ANSWER",
"THE MOON IS A SATELLITE THAT TURNS AROUND THE EARTH WITH A REVOLUTION PERIOD OF 28 DAYS",
"HI, LOONY MOON",
"IT'S TOTALLY BLOCKED UP WITH PLANKS",
"IT'S TOTALLY BOARDED UP WITH PLANKS",
// 190
"IT'S IMPOSSIBLE. NOT EVEN THAT TOUGH GUY FROM TV COULD OPEN THIS",
"HEY! THE SHADOW OF THAT CYPRESS LOOKS PROLONGED TO ME!",
"YOU, BARTENDER...!!",
"I WOULD LIKE TO HAVE A ROOM PLEASE",
"DO YOU KNOW WHERE I CAN FIND THE SO CALLED DRASCULA?",
"DO YOU KNOW WHERE I CAN FIND THE MAN CALLED DRASCULA?",
// 195
"YES, SO WHAT?",
"SO?",
"IS...THAT RIGHT?",
"GOOD QUESTION. NOW, LET ME TELL YOU MY STORY. LOOK...",
"IT'S JUST FIVE MINUTES",
"GOOD QUESTION. GET ME A DRINK AND LET ME TELL YOU MY STORY. LOOK...",
"IT WILL TAKE JUST FIVE MINUTES",
// 200
"I'M JOHN HACKER AND I REPRESENT A BRITISH PROPERTY COMPANY",
"AS FAR AS I KNOW, COUNT DRASCULA WANTS TO BUY SOME PIECES OF LAND IN GIBRALTAR AND MY COMPANY SENT ME HERE TO NEGOTIATE THE SALE",
@ -549,9 +801,9 @@ const char *_text[][501] = {
"AND HOW IS THE FAMILY?",
"THIS IS QUITE GROOVY, HUH?",
"I'D BETTER NOT SAY ANYTHING",
"THERE IS NO PLACE LIKE HOME. THERE IS NO...WHAT?, BUT YOU ARE NOT AUNT EMMA. AS A MATTER OF FACT, I DON'T HAVE ANY AUNT EMMA!",
"THERE IS NO PLACE LIKE HOME. THERE IS NO...WHAT?, BUT YOU ARE NOT AUNTIE EMMA. AS A MATTER OF FACT, I DON'T HAVE AN AUNTIE EMMA!",
// 215
"YES, SO DOES MINE. YOU CAN CALL ME ANYTHING YOU WANT, BUT IF YOU CALL ME JHONNY, I'LL COME TO YOU LIKE A DOG",
"YES, SO DOES MINE. YOU CAN CALL ME ANYTHING YOU WANT, BUT IF YOU CALL ME JOHNNY, I'LL COME TO YOU LIKE A DOG",
"AREN'T I JUST A FUNNY GUY, HUH?. BY THE WAY, WHERE AM I?",
"YES",
"SHOOT...!",
@ -569,13 +821,13 @@ const char *_text[][501] = {
"AHHH A WEREWOLF!! DIE YOU DAMNED EVIL!",
"YES, WELL...",
// 230
"YES, WELL...I THINK I'LL JUST GO ON MY WAY. EXCUSE ME",
"YES, WELL... I THINK I'LL JUST GO ON MY WAY. EXCUSE ME",
"WHAT?",
"TO TELL YOU THE TRUTH...ON SECOND THOUGHTS...I DON'T REALLY THINK SO",
"AND SO TELL ME YOU ERUDITE PHILOSOPHER, IS THERE ANY RELATIONSHIP CAUSE-AND-EFFECT BETWEEN SILLY AND BILLY?",
"OK, OK, FORGET IT. I DON'T EVEN KNOW WHY I SAID ANYTHING ABOUT IT",
// 235
"WHAT ARE YOU DOING PHILOSOPHIZING INSTEAD OF EATING SOME PEOPLE",
"WHY ARE YOU PHILOSOPHIZING INSTEAD OF EATING PEOPLE?",
"HOW COME?",
"HEY, COULD YOU SAY ALL THAT STUFF ABOUT PRE-EVOLUTIONARY RELATIONSHIPS AGAIN?",
"YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT BEFORE. I DIDN'T UNDERSTAND IT, YOU KNOW",
@ -585,13 +837,13 @@ const char *_text[][501] = {
"YES, WHAT'S UP?",
"WELL, NOW THAT YOU MENTION IT, I'LL TELL YOU THAT...",
"",
"WELL, THANKS FOR CALLING. BY THE WAY, THIS IS NOT THE CASE, OF COURSE, BUT WHAT COULD HAPPEN IF A VAMPIRE GOT THE RECIPE BY ANY CHANCE?",
"BY THE WAY, THIS IS NOT THE CASE, OF COURSE, BUT WHAT COULD HAPPEN IF A VAMPIRE GOT THE RECIPE BY ANY CHANCE?",
// 245
"WELL ANYWAY. LISTEN, DOESN'T THIS LOOK TO YOU LIKE A LOT OF CRAP TO END UP SOON WITH THE GAME?. WELL, MAYBE NOT",
"WELL ANYWAY. LISTEN, DOESN'T THIS LOOK TO YOU LIKE A LOT OF CRAP TO END THE GAME WITH?. WELL, MAYBE NOT",
"IT'S EMPTY!",
"WHY DID YOU TAKE MY ONLY LOVE, B.J., AWAY FROM ME?. LIFE HAS NO MEANING FOR WITHOUT HER",
"WHY DID YOU TAKE MY ONLY LOVE, B.J., AWAY FROM ME?. LIFE HAS NO MEANING FOR ME WITHOUT HER",
"HER BRAIN?\?!!",
"TO TELL YOU THE TRUTH, I THINK I HAD JUST ENOUGH WITH YOUR OF YOUR LITTLE MONSTER",
"TO TELL YOU THE TRUTH, I THINK I HAVE HAD JUST ABOUT ENOUGH OF YOUR LITTLE MONSTER",
// 250
"OH PLEASE, HOLY VIRGIN, DON'T LET ANYTHING WORSE HAPPEN TO ME!!",
"YOU ARE NOT GOING TO GET YOUR WAY. I'M SURE SUPERMAN WILL COME AND RESCUE ME!",
@ -600,7 +852,7 @@ const char *_text[][501] = {
"HA. HA, I'M NOW IMMUNIZED AGAINST YOU DAMNED EVIL!. THIS CIGARETTE IS AN ANTI-VAMPIRE BREW THAT VON BRAUN GAVE TO ME",
// 255
"YES SURE, BUT YOU'LL NEVER GET ME TO GIVE YOU THE RECIPE",
"APART FROM CREATING TORTURE, I CAN ALSO STAND IT.",
"APART FROM CREATING TORTURE, I CAN ALSO WITHSTAND IT.",
"OH, NO PLEASE! I'LL TALK, BUT PLEASE, DON'T DO THAT TO ME!",
"ALL RIGHT THEN. I TOLD YOU WHAT YOU WANTED TO KNOW. NOW SET B.J. AND ME FREE THEN LEAVE US ALONE!",
"WHAT ARE YOU DOING HERE B.J.?. WHERE IS DRASCULA?",
@ -800,10 +1052,10 @@ const char *_text[][501] = {
"THE MAGPIE WOULD PECK OUT MY EYES IF I TRIED!",
"OH MY GOD. IT'S LOCKED...THAT'S SCARY, HUH?",
"THE HINGES ARE RUSTY",
"THERE IS ONLY ONE CAN OF FLOUR IN THERE",
"THERE IS ONLY ONE BAG OF FLOUR IN THERE",
"THAT TOOK AWAY THE RUST",
// 425
"I FOUND A PINE STICK",
"I FOUND A PINE STAKE",
"I'LL TAKE THIS THICKER ONE",
"WELL, I THINK I CAN GET RID OF THIS STUPID DISGUISE",
"\"PASSAGE TO TOWERS CLOSED FOR REPAIRS. PLEASE USE THE MAIN ENTRANCE. SORRY FOR THE INCONVENIENCE\"",
@ -3355,7 +3607,7 @@ const char *_textd[][84] = {
"OK, LET'S SEE IT. IGOR, BRING ME THE CD \"SCRATCHING YOUR NAILS ALL OVER THE BLACKBOARD\"",
"NO WAY. THE GIRL STAYS WITH ME. YOU'RE STAYING THERE UNTIL THE PENDULUM CUTS YOU INTO THIN SLICES. HA, HA, HA",
"MAN I'M I JUST BAD... COME ON IGOR, LET'S MAKE THE BREW AND CONQUER THE WORLD",
"WHAT HAPPENS NOW?",
"WHAT HAPPENED NOW?",
"YES, WHAT?...OH, DAMNED, THE GAME!",
// 35
"I FORGOT ABOUT THAT. GET THE GIRL AND LET'S GO AND WATCH IT. WE CAN CONQUER THE WORLD LATER",
@ -3941,7 +4193,7 @@ const char *_textbj[][29] = {
"ARE YOU ALL RIGHT? HEY, COME ON, WAKE UP! CAN YOU HEAR ME? ARE YOU DEAD?",
"NO, MY NAME IS BILLIE JEAN, BUT YOU CAN CALL ME B.J. IT'S SHORTER",
"HA, HA...! THAT WAS A GOOD ONE!",
"WELL, JHONNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS LOUD NOISE DOWN THE CORRIDOR",
"WELL, JOHNNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS LOUD NOISE DOWN THE CORRIDOR",
// 5
"I DIDN'T PAY ATTENTION AT FIRST, BUT AFTER ABOUT TWO HOURS OR SO I COULDN'T SLEEP AND WENT OUT FOR A WALK",
"AS I OPENED THE DOOR I WAS SHOCKED TO FIND YOU THERE, LYING ON THE FLOOR. I THOUGHT YOU WERE DEAD, I SWEAR... HA, HA, SILLY BILLY",
@ -3952,7 +4204,7 @@ const char *_textbj[][29] = {
"OH, NO...! IT WASN'T THE HIT, HA, HA. I JUST STEPPED ON YOUR GLASSES BY ACCIDENT",
"YOU REALLY LOOK GOOD WITH THOSE GLASSES. I KNOW HE'S NOT FERNANDO LANCHA, BUT I FIND HIM ATTRACTIVE...",
"YES, YES, I DO... COME ON, HOLD ME AND KISS ME TIGHT",
"OH JHONNY, HONEY, THANK GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND THEN HE'S GONE DOWNSTAIRS TO WATCH THE FOOTBALL GAME",
"OH JOHNNY, HONEY, THANK GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND THEN HE'S GONE DOWNSTAIRS TO WATCH THE FOOTBALL GAME",
"YES, IT'S TRUE. PLEASE, SET ME FREE",
// 15
"NO, I'M SORRY. I USED THEM ALL IN THE TOWER WHEN I WAS TRYING TO ESCAPE WHILE YOU LET ME DOWN",
@ -3961,7 +4213,7 @@ const char *_textbj[][29] = {
"FIRSTLY HE BROUGHT ME FLYING OVER HERE AND THEN PUT ME IN THIS DISGUSTING ROOM WITHOUT A MIRROR OR ANYTHING",
"I'M TELLING YOU! AND THE WORST PART IS THAT HE DIDN'T EVEN APOLOGIZE, NOT EVEN ONCE",
// 20
"JHONNY HONEY, WHERE ARE YOU?",
"JOHNNY HONEY, WHERE ARE YOU?",
"I'M READY TO LEAVE DEAR",
"WAIT, I'M GOING TO TAKE A LOOK... NO DARLING, I'M SORRY",
"THERE YOU GO...",
@ -3969,7 +4221,7 @@ const char *_textbj[][29] = {
// 25
"I'LL NEVER FORGET YOU BUT I'VE REALIZED THAT THIS JUST COULDN'T WORK OUT RIGHT. TO BE HONEST, I'LL TELL YOU THAT THERE IS ANOTHER MAN. HE'S TALLER, STRONGER",
"AND HE HAS ALSO RESCUED ME FROM DRASCULA. HE HAS ASKED ME TO MARRY HIM, AND I HAVE ACCEPTED",
"BYE JHONNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS ITS OWN WAYS",
"BYE JOHNNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS ITS OWN WAYS",
"I HOPE THERE WON'T BE HARD FEELINGS BETWEEN US. REMEMBER THAT I STILL LOVE YOU, BUT ONLY AS A FRIEND",
},
{
@ -4511,8 +4763,8 @@ const char *_textl[][32] = {
"WELL THEN",
"WELL, THAT DEPENDS ON WHAT WE TAKE A RELATIONSHIP FOR. SOME AUTHORS DEFEND...",
// 10
"PUKE! HUNTING AS A WAY TO SURVIVE IS AN INCOMPATIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN",
"IT JUST HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO THINK AND GET TO THE ABOVE MENTIONED THOUGHT",
"YUCK! HUNTING AS A WAY TO SURVIVE IS AN INCOMPREHENSIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN",
"IT JUST SO HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO THINK AND GET TO THE ABOVE MENTIONED THOUGHT",
"IT TOOK ME A LONG TIME TO QUIT OLD HABITS BUT AT LEAST MY IRASCIBLE SOUL BIT UP THE CONCUPISCIBLE ONE, AND EVER SINCE, I'VE NEVER EATEN MEAT AGAIN",
"NOT EVEN THE PLEASURE OF SUCKING UP THE BONE, FEELING THE TASTE OF THE SKIN AND THAT SWEET TASTE OF MARROW...THAT JUST TAKES YOU TO HEAVENLY PLACES",
"IT DOESN'T REALLY GET TO ME AT ALL",
@ -4842,14 +5094,14 @@ const char *_textt[][25] = {
// 0
"",
"WHAT HAPPENED? WHAT'S THE MATTER?",
"OK. ROOM 512. UPSTAIRS. THE KEY IS ON THE DOOR",
"OK. ROOM 512. UPSTAIRS. THE KEY IS UNDER THE DOOR",
"COUNT DRASCULA!!?",
"NO, NOTHING. THAT GUY JUST HAS A BAD REPUTATION OVER HERE",
"NO, NOTHING. THAT GUY JUST HAS A BAD REPUTATION AROUND HERE",
// 5
"WELL, THERE ARE ALL KINDS OF STORIES GOING AROUND ABOUT HIM, SOME SAY HE IS A VAMPIRE WHO KIDNAPS PEOPLE TO SUCK THEIR BLOOD",
"HOWEVER, SOME OTHERS SAY THAT HE IS JUST AN ORGAN-DEALER AND THAT IS THE REASON WHY THERE ARE BODY PARTS ALL OVER THE PLACE",
"BUT OF COURSE, THOSE ARE JUST RUMORS. HE'S PROBABLY BOTH THINGS. BY THE WAY, WHY DO YOU WANT TO MEET HIM?",
"NO, FORGET IT. I'M REALLY BUSY...",
"HERE IS YOUR DRINK, FORGET IT. I'M REALLY BUSY...",
"WELL, OK. BUT JUST BECAUSE I WANT TO DO IT, NOT BECAUSE YOU TOLD ME TO",
// 10
"THEY'RE WINNING",
@ -5036,9 +5288,9 @@ const char *_textvb[][63] = {
// 25
"LEAVE ME ALONE NOW, I WANT TO GET SOME SLEEP",
"WHENEVER YOU ARE READY TO FIGHT AGAINST THE VAMPIRES, JUST COME BACK AND I'LL HELP YOU OUT",
"OH, THAT'S EASY. JUST USING THE LIGHT OF ONE CRUCIFIX IS ENOUGH TO DESTROY HIM",
"OH, THAT'S EASY. TAKE THIS CRUCIFIX JUST USING THE LIGHT OF THIS CRUCIFIX IS ENOUGH TO DESTROY HIM",
"YOU HAVE TO BE EXTRA CAREFUL WITH DRASCULA, HIS FRISISNOTIC POWERS HAVE MADE OF HIM THE MOST POWERFUL VAMPIRE",
"YOU'D BE LOST IF IT WASN'T FOR THEM...",
"YOU'D BE LOST IF IT WASN'T FOR THIS...",
// 30
"...BREW!",
"YEAH, YOU'RE RIGHT! I MIGHT HAVE SOME PROBLEMS WITH MY BACK IN THE FUTURE IF I KEEP ON SLEEPING THIS WAY",
@ -5482,8 +5734,8 @@ const char *_textd1[][11] = {
// 75
"44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555",
"5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444",
"56665004444447222550002222755554444466555033022755555000444444444444444444444444444444"
"004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777",
"56665004444447222550002222755554444466555033022755555000444444444444444444444444444444",
"004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777"
},
{
// 68
@ -5498,8 +5750,8 @@ const char *_textd1[][11] = {
// 75
"4444777444455550022220555044444446666622526644475533223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555",
"5555000444555033022755644446666005204402266222003332222774440446665555005550335544444",
"5666500444555033022755555000444444444444444444444444444444"
"00222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777",
"5666500444555033022755555000444444444444444444444444444444",
"00222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777"
},
{
// 68
@ -5514,8 +5766,8 @@ const char *_textd1[][11] = {
// 75
"44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555",
"5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444",
"56665004444447222550002222755554444466555033022755555000444444444444444444444444444444"
"004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777",
"56665004444447222550002222755554444466555033022755555000444444444444444444444444444444",
"004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777"
},
{
// 68
@ -5530,8 +5782,8 @@ const char *_textd1[][11] = {
// 75
"44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555",
"5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444",
"56665004444447222550002222755554444466555033022755555000444444444444444444444444444444"
"004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777",
"56665004444447222550002222755554444466555033022755555000444444444444444444444444444444",
"004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777"
},
{
// 68
@ -5546,8 +5798,8 @@ const char *_textd1[][11] = {
// 75
"44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555",
"5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444",
"56665004444447222550002222755554444466555033022755555000444444444444444444444444444444"
"004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777",
"56665004444447222550002222755554444466555033022755555000444444444444444444444444444444",
"004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777"
},
};

View File

@ -27,25 +27,21 @@
namespace Drascula {
int x_talk_dch[6] = {1, 25, 49, 73, 97, 121};
int x_talk_izq[6] = {145, 169, 193, 217, 241, 265};
void DrasculaEngine::talkInit(const char *filename) {
_rnd->setSeed((unsigned int)_system->getMillis() / 2);
if (hay_sb == 1)
playFile(filename);
playFile(filename);
}
bool DrasculaEngine::isTalkFinished(int* length) {
byte key = getScan();
if (key != 0)
stopSound();
if (hay_sb == 1) {
if (soundIsActive())
return false;
} else {
length -= 2;
if (length > 0)
return false;
}
if (soundIsActive())
return false;
return true;
}
@ -112,7 +108,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) {
updateScreen();
} else if (talkerType == 3) {
copyBackground(x_talk3[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface);
pon_hare();
moveCharacters();
updateRefresh();
if (withVoices == 0)
centerText(said, 221, 102);
@ -121,7 +117,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) {
pause(3);
} else if (talkerType == 4) {
copyBackground(x_talk4[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface);
pon_hare();
moveCharacters();
updateRefresh();
if (withVoices == 0)
centerText(said, 221, 102);
@ -169,7 +165,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) {
placeIgor();
placeDrascula();
if (currentChapter == 6)
pon_hare();
moveCharacters();
copyBackground(x_dr, y_dr, x_dr, y_dr, 38 + offset, 31, drawSurface1, screenSurface);
if (currentChapter == 6)
@ -198,7 +194,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) {
placeDrascula();
if (talkerType == 1 && currentChapter == 6)
pon_hare();
moveCharacters();
updateScreen();
}
@ -278,7 +274,7 @@ void DrasculaEngine::talk_bartender(int index, int talkerType) {
copyBackground(x_talk[face], 2, 121, 44, 21, 24, extraSurface, screenSurface);
else
copyBackground(x_talk[face], 130, 151, 43, 21, 24, drawSurface3, screenSurface);
pon_hare();
moveCharacters();
updateRefresh();
if (withVoices == 0)
@ -318,7 +314,7 @@ void DrasculaEngine::talk_bj(int index) {
copyRect(x_talk[face], 99, x_bj + 2, y_bj - 1, 27, 40,
drawSurface3, screenSurface);
pon_hare();
moveCharacters();
updateRefresh();
if (withVoices == 0)
@ -348,13 +344,11 @@ void DrasculaEngine::talk(int index) {
}
void DrasculaEngine::talk(const char *said, const char *filename) {
int suma_1_pixel = 0;
int talkOffset = 0;
if (currentChapter != 2)
suma_1_pixel = 1;
talkOffset = 1;
int y_mask_talk = 170;
int x_talk_dch[6] = { 1, 25, 49, 73, 97, 121 };
int x_talk_izq[6] = { 145, 169, 193, 217, 241, 265 };
int face;
int length = strlen(said);
@ -370,8 +364,8 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
}
if (currentChapter != 2) {
if (factor_red[hare_y + alto_hare] == 100)
suma_1_pixel = 0;
if (factor_red[curY + curHeight] == 100)
talkOffset = 0;
}
if (currentChapter == 4) {
@ -391,65 +385,65 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
updateRefresh_pre();
if (currentChapter == 2)
copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, talkHeight - 1, screenSurface, drawSurface3);
copyBackground(curX, curY, OBJWIDTH + 1, 0, curWidth, talkHeight - 1, screenSurface, drawSurface3);
else
copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]),
(int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]),
copyBackground(curX, curY, OBJWIDTH + 1, 0, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]),
(int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]),
screenSurface, drawSurface3);
pon_hare();
moveCharacters();
if (currentChapter == 2) {
if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg"))
copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, talkHeight - 1, drawSurface3, screenSurface);
copyBackground(OBJWIDTH + 1, 0, curX, curY, curWidth, talkHeight - 1, drawSurface3, screenSurface);
} else {
copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]),
(int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]),
copyBackground(OBJWIDTH + 1, 0, curX, curY, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]),
(int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]),
drawSurface3, screenSurface);
}
if (sentido_hare == 0) {
if (trackProtagonist == 0) {
if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, talkWidth, talkHeight,
copyRect(x_talk_izq[face], y_mask_talk, curX + 8, curY - 1, talkWidth, talkHeight,
extraSurface, screenSurface);
else
reduce_hare_chico(x_talk_izq[face], y_mask_talk, hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]),
hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare],
reduce_hare_chico(x_talk_izq[face], y_mask_talk, curX + (int)((8.0f / 100) * factor_red[curY + curHeight]),
curY, talkWidth, talkHeight, factor_red[curY + curHeight],
extraSurface, screenSurface);
updateRefresh();
} else if (sentido_hare == 1) {
} else if (trackProtagonist == 1) {
if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight,
copyRect(x_talk_dch[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight,
extraSurface, screenSurface);
else
reduce_hare_chico(x_talk_dch[face], y_mask_talk, hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]),
hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface);
reduce_hare_chico(x_talk_dch[face], y_mask_talk, curX + (int)((12.0f / 100) * factor_red[curY + curHeight]),
curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface);
updateRefresh();
} else if (sentido_hare == 2) {
} else if (trackProtagonist == 2) {
if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight,
copyRect(x_talk_izq[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight,
frontSurface, screenSurface);
else
reduce_hare_chico(x_talk_izq[face], y_mask_talk,
suma_1_pixel + hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]),
hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare],
talkOffset + curX + (int)((12.0f / 100) * factor_red[curY + curHeight]),
curY, talkWidth, talkHeight, factor_red[curY + curHeight],
frontSurface, screenSurface);
updateRefresh();
} else if (sentido_hare == 3) {
} else if (trackProtagonist == 3) {
if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, talkWidth, talkHeight,
copyRect(x_talk_dch[face], y_mask_talk, curX + 8, curY, talkWidth, talkHeight,
frontSurface, screenSurface);
else
reduce_hare_chico(x_talk_dch[face], y_mask_talk,
suma_1_pixel + hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]),
hare_y, talkWidth,talkHeight, factor_red[hare_y + alto_hare],
talkOffset + curX + (int)((8.0f / 100) * factor_red[curY + curHeight]),
curY, talkWidth,talkHeight, factor_red[curY + curHeight],
frontSurface, screenSurface);
updateRefresh();
}
if (withVoices == 0)
centerText(said, hare_x, hare_y);
centerText(said, curX, curY);
updateScreen();
@ -486,7 +480,7 @@ void DrasculaEngine::talk_pianist(int index) {
copyBackground(x_talk[face], 139, 228, 112, 47, 60,
extraSurface, screenSurface);
pon_hare();
moveCharacters();
updateRefresh();
if (withVoices == 0)
@ -509,9 +503,8 @@ void DrasculaEngine::talk_drunk(int index) {
int face;
int length = strlen(said);
if (currentChapter == 1) {
loadPic("an11y13.alg", frontSurface, 1);
}
if (currentChapter == 1)
loadPic("an11y13.alg", frontSurface);
flags[13] = 1;
@ -532,7 +525,7 @@ void DrasculaEngine::talk_drunk(int index) {
updateRefresh_pre();
copyBackground(x_talk[face], 29, 177, 50, 19, 19, frontSurface, screenSurface);
pon_hare();
moveCharacters();
updateRefresh();
if (withVoices == 0)
@ -547,9 +540,8 @@ void DrasculaEngine::talk_drunk(int index) {
updateScreen();
flags[13] = 0;
if (currentChapter == 1) {
loadPic("96.alg", frontSurface, 1);
}
if (currentChapter == 1)
loadPic("96.alg", frontSurface);
if (currentChapter == 1) {
if (musicStatus() == 0 && flags[11] == 0)
@ -572,23 +564,23 @@ void DrasculaEngine::talk_vb(int index) {
talkInit(filename);
copyBackground(vb_x + 5, 64, OBJWIDTH + 1, 0, 25, 27, drawSurface1, drawSurface3);
copyBackground(vbX + 5, 64, OBJWIDTH + 1, 0, 25, 27, drawSurface1, drawSurface3);
do {
if (sentido_vb == 1) {
if (trackVB == 1) {
face = _rnd->getRandomNumber(5);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
pon_hare();
pon_vb();
moveCharacters();
moveVB();
copyBackground(OBJWIDTH + 1, 0, vb_x + 5, 64, 25, 27, drawSurface3, screenSurface);
copyRect(x_talk[face], 34, vb_x + 5, 64, 25, 27, frontSurface, screenSurface);
copyBackground(OBJWIDTH + 1, 0, vbX + 5, 64, 25, 27, drawSurface3, screenSurface);
copyRect(x_talk[face], 34, vbX + 5, 64, 25, 27, frontSurface, screenSurface);
updateRefresh();
}
if (withVoices == 0)
centerText(said, vb_x, 66);
centerText(said, vbX, 66);
updateScreen();
@ -633,7 +625,7 @@ void DrasculaEngine::talk_blind(int index) {
char filename[20];
sprintf(filename, "d%i.als", index + TEXTD_START - 1);
const char *said = _textd[_lang][index + TEXTD_START - 1];
const char *sincronia = _textd1[_lang][index - 1];
const char *syncChar = _textd1[_lang][index - 1];
byte *faceBuffer;
int p = 0;
@ -656,7 +648,7 @@ void DrasculaEngine::talk_blind(int index) {
do {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
pos_blind[5] = 149;
char c = toupper(sincronia[p]);
char c = toupper(syncChar[p]);
if (c == '0' || c == '2' || c == '4' || c == '6')
pos_blind[0] = 1;
@ -722,7 +714,7 @@ void DrasculaEngine::talk_wolf(int index) {
updateRefresh_pre();
copyBackground(x_talk[face], 136, 198, 81, 26, 24, drawSurface3, screenSurface);
pon_hare();
moveCharacters();
updateRefresh();
if (withVoices == 0)
@ -757,7 +749,7 @@ void DrasculaEngine::talk_mus(int index) {
updateRefresh_pre();
copyBackground(x_talk[face], 156, 190, 64, 18, 24, drawSurface3, screenSurface);
pon_hare();
moveCharacters();
updateRefresh();
if (withVoices == 0)
@ -846,7 +838,7 @@ void DrasculaEngine::talk_bj_bed(int index) {
copyBackground(65, 103, 65, 103, 49, 38, drawSurface1, screenSurface);
copyRect(x_talk[face], 105, 65, 103, 49, 38, drawSurface3, screenSurface);
pon_hare();
moveCharacters();
updateRefresh();
if (withVoices == 0)
@ -900,19 +892,18 @@ void DrasculaEngine::talk_htel(int index) {
updateScreen();
}
void DrasculaEngine::talk_sinc(const char *said, const char *filename, const char *sincronia) {
int suma_1_pixel = 1;
void DrasculaEngine::talk_sync(const char *said, const char *filename, const char *syncChar) {
int talkOffset = 1;
int y_mask_talk = 170;
int x_talk_dch[6] = {1, 25, 49, 73, 97, 121};
int x_talk_izq[6] = {145, 169, 193, 217, 241, 265};
int p, face = 0;
int length = strlen(said);
char buf[2];
color_abc(kColorYellow);
if (currentChapter == 1) {
if (factor_red[hare_y + alto_hare] == 100)
suma_1_pixel = 0;
if (factor_red[curY + curHeight] == 100)
talkOffset = 0;
}
p = 0;
@ -920,58 +911,59 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha
talkInit(filename);
do {
face = atoi(&sincronia[p]);
strncpy(buf, &syncChar[p], 1);
face = atoi(buf);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
updateRefresh_pre();
if (currentChapter == 2)
copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, talkHeight - 1, screenSurface, drawSurface3);
copyBackground(curX, curY, OBJWIDTH + 1, 0, curWidth, talkHeight - 1, screenSurface, drawSurface3);
else
copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]),
(int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), screenSurface, drawSurface3);
pon_hare();
copyBackground(curX, curY, OBJWIDTH + 1, 0, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]),
(int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), screenSurface, drawSurface3);
moveCharacters();
if (currentChapter == 2) {
if (alto_hare != 56)
copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, talkHeight - 1, drawSurface3, screenSurface);
if (curHeight != 56)
copyBackground(OBJWIDTH + 1, 0, curX, curY, curWidth, talkHeight - 1, drawSurface3, screenSurface);
} else
copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]),
(int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), drawSurface3, screenSurface);
copyBackground(OBJWIDTH + 1, 0, curX, curY, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]),
(int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), drawSurface3, screenSurface);
if (sentido_hare == 0) {
if (trackProtagonist == 0) {
if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, talkWidth, talkHeight, extraSurface, screenSurface);
copyRect(x_talk_izq[face], y_mask_talk, curX + 8, curY - 1, talkWidth, talkHeight, extraSurface, screenSurface);
else
reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]),
hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface);
reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(curX + (8.0f / 100) * factor_red[curY + curHeight]),
curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface);
updateRefresh();
} else if (sentido_hare == 1) {
} else if (trackProtagonist == 1) {
if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, extraSurface, screenSurface);
copyRect(x_talk_dch[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, extraSurface, screenSurface);
else
reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]),
hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface);
reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(curX + (12.0f / 100) * factor_red[curY + curHeight]),
curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface);
updateRefresh();
} else if (sentido_hare == 2) {
} else if (trackProtagonist == 2) {
if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, frontSurface, screenSurface);
copyRect(x_talk_izq[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, frontSurface, screenSurface);
else
reduce_hare_chico(x_talk_izq[face], y_mask_talk,
(int)(suma_1_pixel + hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y,
talkWidth, talkHeight, factor_red[hare_y + alto_hare], frontSurface, screenSurface);
(int)(talkOffset + curX + (12.0f / 100) * factor_red[curY + curHeight]), curY,
talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface);
updateRefresh();
} else if (sentido_hare == 3) {
} else if (trackProtagonist == 3) {
if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, talkWidth, talkHeight, frontSurface, screenSurface);
copyRect(x_talk_dch[face], y_mask_talk, curX + 8, curY, talkWidth, talkHeight, frontSurface, screenSurface);
else
reduce_hare_chico(x_talk_dch[face], y_mask_talk,
(int)(suma_1_pixel + hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y,
talkWidth, talkHeight, factor_red[hare_y + alto_hare], frontSurface, screenSurface);
(int)(talkOffset + curX + (8.0f / 100) * factor_red[curY + curHeight]), curY,
talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface);
updateRefresh();
}
if (withVoices == 0)
centerText(said, hare_x, hare_y);
centerText(said, curX, curY);
updateScreen();

View File

@ -59,7 +59,7 @@ const KyraEngine_v2::EngineDesc KyraEngine_MR::_mrEngineDesc = {
KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngine_v2(system, flags, _mrEngineDesc) {
_soundDigital = 0;
_musicSoundChannel = -1;
_menuAudioFile = "TITLE1.AUD";
_menuAudioFile = "TITLE1";
_lastMusicCommand = -1;
_itemBuffer1 = _itemBuffer2 = 0;
_scoreFile = 0;
@ -425,7 +425,7 @@ void KyraEngine_MR::snd_playWanderScoreViaMap(int track, int force) {
assert(track < _soundListSize && track >= 0);
char file[13];
sprintf(file, "%s.AUD", _soundList[track]);
sprintf(file, "%s", _soundList[track]);
_musicSoundChannel = _soundDigital->playSound(file, 0xFF, Audio::Mixer::kMusicSoundType);
}
@ -483,7 +483,7 @@ void KyraEngine_MR::snd_playSoundEffect(int item, int volume) {
if (_sfxFileMap[item*2+0] != 0xFF) {
char filename[16];
assert(_sfxFileMap[item*2+0] < _sfxFileListSize);
snprintf(filename, 16, "%s.AUD", _sfxFileList[_sfxFileMap[item*2+0]]);
snprintf(filename, 16, "%s", _sfxFileList[_sfxFileMap[item*2+0]]);
uint8 priority = _sfxFileMap[item*2+1];
_soundDigital->playSound(filename, priority, Audio::Mixer::kSFXSoundType, volume);
@ -498,7 +498,7 @@ void KyraEngine_MR::playVoice(int high, int low) {
void KyraEngine_MR::snd_playVoiceFile(int file) {
debugC(9, kDebugLevelMain, "KyraEngine_MR::snd_playVoiceFile(%d)", file);
char filename[16];
snprintf(filename, 16, "%u.AUD", (uint)file);
snprintf(filename, 16, "%.08u", (uint)file);
_voiceSoundChannel = _soundDigital->playSound(filename, 0xFE, Audio::Mixer::kSpeechSoundType, 255);
}

View File

@ -543,6 +543,20 @@ bool ResLoaderPak::isLoadable(const Common::String &filename, Common::SeekableRe
return true;
}
namespace {
Common::String readString(Common::SeekableReadStream &stream) {
Common::String result;
char c = 0;
while ((c = stream.readByte()) != 0)
result += c;
return result;
}
} // end of anonymous namespace
bool ResLoaderPak::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const {
uint32 filesize = stream.size();
@ -610,6 +624,33 @@ bool ResLoaderPak::loadFile(const Common::String &filename, Common::SeekableRead
startoffset = endoffset;
}
FileList::const_iterator iter = Common::find(files.begin(), files.end(), Common::String("LINKLIST"));
if (iter != files.end()) {
stream.seek(iter->entry.offset, SEEK_SET);
uint32 magic = stream.readUint32BE();
if (magic != MKID_BE('SCVM'))
error("LINKLIST file does not contain 'SCVM' header");
uint32 links = stream.readUint32BE();
for (uint i = 0; i < links; ++i) {
Common::String linksTo = readString(stream);
uint32 sources = stream.readUint32BE();
iter = Common::find(files.begin(), files.end(), linksTo);
if (iter == files.end())
error("PAK file link destination '%s' not found", linksTo.c_str());
for (uint j = 0; j < sources; ++j) {
Common::String dest = readString(stream);
files.push_back(File(dest, iter->entry));
// Better safe than sorry, we update the 'iter' value, in case push_back invalidated it
iter = Common::find(files.begin(), files.end(), linksTo);
}
}
}
return true;
}
@ -767,7 +808,7 @@ bool ResLoaderTlk::loadFile(const Common::String &filename, Common::SeekableRead
entry.offset = resOffset+4;
char realFilename[20];
snprintf(realFilename, 20, "%u.AUD", resFilename);
snprintf(realFilename, 20, "%.08u.AUD", resFilename);
uint32 curOffset = stream.pos();
stream.seek(resOffset, SEEK_SET);

View File

@ -75,6 +75,10 @@ public:
File() : filename(), entry() {}
File(const Common::String &f, const ResFileEntry &e) : filename(f), entry(e) {}
bool operator ==(const Common::String &r) const {
return filename.equalsIgnoreCase(r);
}
Common::String filename;
ResFileEntry entry;
};

View File

@ -50,9 +50,9 @@ Sound::~Sound() {
bool Sound::voiceFileIsPresent(const char *file) {
char filenamebuffer[25];
for (int i = 0; _supportedCodes[i].fileext; ++i) {
for (int i = 0; _supportedCodecs[i].fileext; ++i) {
strcpy(filenamebuffer, file);
strcat(filenamebuffer, _supportedCodes[i].fileext);
strcat(filenamebuffer, _supportedCodecs[i].fileext);
if (_vm->resource()->getFileSize(filenamebuffer) > 0)
return true;
}
@ -77,14 +77,14 @@ int32 Sound::voicePlay(const char *file, bool isSfx) {
Audio::AudioStream *audioStream = 0;
for (int i = 0; _supportedCodes[i].fileext; ++i) {
for (int i = 0; _supportedCodecs[i].fileext; ++i) {
strcpy(filenamebuffer, file);
strcat(filenamebuffer, _supportedCodes[i].fileext);
strcat(filenamebuffer, _supportedCodecs[i].fileext);
Common::SeekableReadStream *stream = _vm->resource()->getFileStream(filenamebuffer);
if (!stream)
continue;
audioStream = _supportedCodes[i].streamFunc(stream, true, 0, 0, 1);
audioStream = _supportedCodecs[i].streamFunc(stream, true, 0, 0, 1);
break;
}
@ -551,7 +551,7 @@ bool KyraEngine_v1::snd_voiceIsPlaying() {
// static res
const Sound::SpeechCodecs Sound::_supportedCodes[] = {
const Sound::SpeechCodecs Sound::_supportedCodecs[] = {
#ifdef USE_FLAC
{ ".VOF", Audio::makeFlacStream },
#endif // USE_FLAC

View File

@ -232,7 +232,7 @@ private:
uint numLoops);
};
static const SpeechCodecs _supportedCodes[];
static const SpeechCodecs _supportedCodecs[];
};
class AdlibDriver;
@ -498,6 +498,7 @@ private:
// Digital Audio
class AUDStream;
class KyraAudioStream;
class KyraEngine_MR;
/**
@ -564,8 +565,20 @@ private:
char filename[16];
uint8 priority;
AUDStream *stream;
KyraAudioStream *stream;
} _sounds[4];
struct AudioCodecs {
const char *fileext;
Audio::AudioStream *(*streamFunc)(
Common::SeekableReadStream *stream,
bool disposeAfterUse,
uint32 startTime,
uint32 duration,
uint numLoops);
};
static const AudioCodecs _supportedCodecs[];
};
} // end of namespace Kyra

View File

@ -29,8 +29,79 @@
#include "sound/audiostream.h"
#include "sound/mp3.h"
#include "sound/vorbis.h"
#include "sound/flac.h"
namespace Kyra {
class KyraAudioStream : public Audio::AudioStream {
public:
KyraAudioStream(Audio::AudioStream *impl) : _impl(impl), _rate(impl->getRate()), _fadeSamples(0), _fadeCount(0), _fading(0), _endOfData(false) {}
~KyraAudioStream() { delete _impl; _impl = 0; }
int readBuffer(int16 *buffer, const int numSamples);
bool isStereo() const { return _impl->isStereo(); }
bool endOfData() const { return _impl->endOfData() | _endOfData; }
int getRate() const { return _rate; }
int32 getTotalPlayTime() const { return _impl->getTotalPlayTime(); }
void setRate(int newRate) { _rate = newRate; }
void beginFadeOut(uint32 millis);
private:
Audio::AudioStream *_impl;
int _rate;
int32 _fadeSamples;
int32 _fadeCount;
int _fading;
bool _endOfData;
};
void KyraAudioStream::beginFadeOut(uint32 millis) {
_fadeSamples = (millis * getRate()) / 1000;
if (_fading == 0)
_fadeCount = _fadeSamples;
_fading = -1;
}
int KyraAudioStream::readBuffer(int16 *buffer, const int numSamples) {
int samplesRead = _impl->readBuffer(buffer, numSamples);
if (_fading) {
int samplesProcessed = 0;
for (; samplesProcessed < samplesRead; ++samplesProcessed) {
// To help avoid overflows for long fade times, we divide both
// _fadeSamples and _fadeCount when calculating the new sample.
int32 div = _fadeSamples / 256;
if (_fading) {
*buffer = (*buffer * (_fadeCount / 256)) / div;
++buffer;
_fadeCount += _fading;
if (_fadeCount < 0) {
_fadeCount = 0;
_endOfData = true;
} else if (_fadeCount > _fadeSamples) {
_fadeCount = _fadeSamples;
_fading = 0;
}
}
}
if (_endOfData) {
memset(buffer, 0, (samplesRead - samplesProcessed) * sizeof(int16));
samplesRead = samplesProcessed;
}
}
return samplesRead;
}
// Thanks to Torbjorn Andersson (eriktorbjorn) for his aud player on which
// this code is based on
@ -46,11 +117,7 @@ public:
bool isStereo() const { return false; }
bool endOfData() const { return _endOfData; }
void setRate(int newRate) { _rate = newRate; }
int getRate() const { return _rate; }
void beginFadeIn(uint32 millis);
void beginFadeOut(uint32 millis);
private:
Common::SeekableReadStream *_stream;
bool _loop;
@ -69,10 +136,6 @@ private:
byte *_inBuffer;
uint _inBufferSize;
int32 _fadeSamples;
int32 _fadeCount;
int _fading;
int readChunk(int16 *buffer, const int maxSamples);
static const int8 WSTable2Bit[];
@ -93,9 +156,6 @@ AUDStream::AUDStream(Common::SeekableReadStream *stream, bool loop) : _stream(st
_totalSize = _stream->readUint32LE();
_loop = loop;
_fadeSamples = 0;
_fading = 0;
// TODO?: add checks
int flags = _stream->readByte(); // flags
int type = _stream->readByte(); // type
@ -114,20 +174,6 @@ AUDStream::~AUDStream() {
delete _stream;
}
void AUDStream::beginFadeIn(uint32 millis) {
_fadeSamples = (millis * getRate()) / 1000;
if (_fading == 0)
_fadeCount = 0;
_fading = 1;
}
void AUDStream::beginFadeOut(uint32 millis) {
_fadeSamples = (millis * getRate()) / 1000;
if (_fading == 0)
_fadeCount = _fadeSamples;
_fading = -1;
}
int AUDStream::readBuffer(int16 *buffer, const int numSamples) {
int samplesRead = 0, samplesLeft = numSamples;
@ -288,34 +334,13 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) {
samplesProcessed += samples;
_bytesLeft -= samples;
// To help avoid overflows for long fade times, we divide both
// _fadeSamples and _fadeCount when calculating the new sample.
int32 div = _fadeSamples / 256;
while (samples--) {
int16 sample = (_outBuffer[_outBufferOffset++] << 8) ^ 0x8000;
if (_fading) {
sample = (sample * (_fadeCount / 256)) / div;
_fadeCount += _fading;
if (_fadeCount < 0) {
_fadeCount = 0;
_endOfData = true;
} else if (_fadeCount > _fadeSamples) {
_fadeCount = _fadeSamples;
_fading = 0;
}
}
*buffer++ = sample;
}
}
if (_fading < 0 && _fadeCount == 0)
_fading = 0;
return samplesProcessed;
}
@ -367,7 +392,19 @@ int SoundDigital::playSound(const char *filename, uint8 priority, Audio::Mixer::
}
}
Common::SeekableReadStream *stream = _vm->resource()->getFileStream(filename);
Common::SeekableReadStream *stream = 0;
int usedCodec = -1;
for (int i = 0; _supportedCodecs[i].fileext; ++i) {
Common::String file = filename;
file += _supportedCodecs[i].fileext;
if (!_vm->resource()->exists(file.c_str()))
continue;
stream = _vm->resource()->getFileStream(file);
usedCodec = i;
}
if (!stream) {
warning("Couldn't find soundfile '%s'", filename);
return -1;
@ -375,7 +412,13 @@ int SoundDigital::playSound(const char *filename, uint8 priority, Audio::Mixer::
strncpy(use->filename, filename, sizeof(use->filename));
use->priority = priority;
use->stream = new AUDStream(stream, loop);
Audio::AudioStream *audioStream = _supportedCodecs[usedCodec].streamFunc(stream, true, 0, 0, loop ? 0 : 1);
if (!audioStream) {
warning("Couldn't create audio stream for file '%s'", filename);
return -1;
}
use->stream = new KyraAudioStream(audioStream);
assert(use->stream);
if (use->stream->endOfData()) {
delete use->stream;
use->stream = 0;
@ -428,5 +471,30 @@ void SoundDigital::beginFadeOut(int channel, int ticks) {
_sounds[channel].stream->beginFadeOut(ticks * _vm->tickLength());
}
// static res
namespace {
Audio::AudioStream *makeAUDStream(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 startTime, uint32 duration, uint numLoops) {
return new AUDStream(stream, numLoops == 0 ? true : false);
}
} // end of anonymous namespace
const SoundDigital::AudioCodecs SoundDigital::_supportedCodecs[] = {
#ifdef USE_FLAC
{ ".FLA", Audio::makeFlacStream },
#endif // USE_FLAC
#ifdef USE_VORBIS
{ ".OGG", Audio::makeVorbisStream },
#endif // USE_VORBIS
#ifdef USE_MAD
{ ".MP3", Audio::makeMP3Stream },
#endif // USE_MAD
{ ".AUD", makeAUDStream },
{ 0, 0 }
};
} // end of namespace Kyra

View File

@ -209,7 +209,7 @@ protected:
protected:
void errorFileNotFound(const char *s);
Font *createFont(const char *name, Common::ReadStream &stream);
Sprites* createSprites(const char *name);
Sprites* createSprites(Common::ReadStream &stream);
void loadBitmap(Common::SeekableReadStream &stream, Graphics::Surface &surf, byte *palette);
public:

View File

@ -139,12 +139,19 @@ DosDisk_br::~DosDisk_br() {
}
Frames* DosDisk_br::loadTalk(const char *name) {
debugC(5, kDebugDisk, "DosDisk_br::loadTalk");
debugC(5, kDebugDisk, "DosDisk_br::loadTalk(%s)", name);
Common::File stream;
char path[PATH_LEN];
sprintf(path, "%s/tal/%s.tal", _partPath, name);
sprintf(path, "%s/tal/%s", _partPath, name);
if (!stream.open(path)) {
sprintf(path, "%s/tal/%s.tal", _partPath, name);
if (!stream.open(path))
errorFileNotFound(path);
}
return createSprites(path);
return createSprites(stream);
}
Script* DosDisk_br::loadLocation(const char *name) {
@ -252,12 +259,7 @@ Frames* DosDisk_br::loadStatic(const char* name) {
return new SurfaceToFrames(surf);
}
Sprites* DosDisk_br::createSprites(const char *path) {
Common::File stream;
if (!stream.open(path)) {
errorFileNotFound(path);
}
Sprites* DosDisk_br::createSprites(Common::ReadStream &stream) {
uint16 num = stream.readUint16LE();
@ -284,7 +286,12 @@ Frames* DosDisk_br::loadFrames(const char* name) {
char path[PATH_LEN];
sprintf(path, "%s/ani/%s", _partPath, name);
return createSprites(path);
Common::File stream;
if (!stream.open(path))
errorFileNotFound(path);
return createSprites(stream);
}
// Slides in Nippon Safes are basically screen-sized pictures with valid

View File

@ -176,7 +176,8 @@ DECLARE_COMMAND_OPCODE(stop) {
DECLARE_COMMAND_OPCODE(character) {
warning("Parallaction_br::cmdOp_character not yet implemented");
debugC(9, kDebugExec, "Parallaction_br::cmdOp_character(%s)", _cmdRunCtxt.cmd->u._string);
changeCharacter(_cmdRunCtxt.cmd->u._string);
}

View File

@ -33,10 +33,6 @@
namespace Parallaction {
typedef Common::HashMap<Common::String, int32, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> VarMap;
VarMap _vars;
void Gfx::registerVar(const Common::String &name, int32 initialValue) {
if (_vars.contains(name)) {
warning("Variable '%s' already registered, ignoring initial value.\n", name.c_str());

View File

@ -453,10 +453,13 @@ enum {
kBackgroundSlide = 2
};
typedef Common::HashMap<Common::String, int32, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> VarMap;
class Gfx {
public:
Disk *_disk;
VarMap _vars;
GfxObjList _gfxobjList[3];
GfxObj* loadAnim(const char *name);

View File

@ -658,6 +658,7 @@ public:
public:
typedef void (Parallaction_br::*Callable)(void*);
virtual void callFunction(uint index, void* parm);
void changeCharacter(const char *name);
public:
Table *_countersNames;
@ -692,7 +693,6 @@ private:
void setInventoryCursor(int pos);
void changeLocation(char *location);
void changeCharacter(const char *name);
void runPendingZones();
void initPart();
@ -727,6 +727,7 @@ private:
const Callable *_callables;
void parseLocation(const char* name);
void loadProgram(AnimationPtr a, const char *filename);
DECLARE_UNQUALIFIED_COMMAND_OPCODE(location);
DECLARE_UNQUALIFIED_COMMAND_OPCODE(open);

View File

@ -74,7 +74,9 @@ int Parallaction_br::init() {
initCursors();
initOpcodes();
_locationParser = new LocationParser_br(this);
_locationParser->init();
_programParser = new ProgramParser_br(this);
_programParser->init();
_part = -1;
@ -203,7 +205,7 @@ void Parallaction_br::runPendingZones() {
if (_activeZone) {
z = _activeZone; // speak Zone or sound
_activeZone = nullZonePtr;
// runZone(z); // FIXME: BRA doesn't handle sound yet
runZone(z); // FIXME: BRA doesn't handle sound yet
}
if (_activeZone2) {
@ -261,9 +263,34 @@ void Parallaction_br::parseLocation(const char *filename) {
return;
}
void Parallaction_br::loadProgram(AnimationPtr a, const char *filename) {
debugC(1, kDebugParser, "loadProgram(Animation: %s, script: %s)", a->_name, filename);
Script *script = _disk->loadScript(filename);
ProgramPtr program(new Program);
program->_anim = a;
_programParser->parse(script, program);
delete script;
_vm->_location._programs.push_back(program);
debugC(1, kDebugParser, "loadProgram() done");
return;
}
void Parallaction_br::changeCharacter(const char *name) {
const char *charName = _char.getName();
if (!scumm_stricmp(charName, name)) {
return;
}
_char.setName(name);
_char._talk = _disk->loadTalk(name);
}

View File

@ -137,7 +137,9 @@ int Parallaction_ns::init() {
initCursors();
initOpcodes();
_locationParser = new LocationParser_ns(this);
_locationParser->init();
_programParser = new ProgramParser_ns(this);
_programParser->init();
_introSarcData1 = 0;
_introSarcData2 = 1;

View File

@ -131,6 +131,7 @@ protected:
char *bgName;
char *maskName;
char *pathName;
char *characterName;
} ctxt;
void warning_unexpected();
@ -207,7 +208,6 @@ protected:
} _forwardedCommands[MAX_FORWARDS];
uint _numForwardedCommands;
void init();
void clearSet(OpcodeSet &opcodes) {
for (Common::Array<const Opcode*>::iterator i = opcodes.begin(); i != opcodes.end(); ++i)
delete *i;
@ -216,9 +216,10 @@ protected:
public:
LocationParser_ns(Parallaction_ns *vm) : _vm(vm) {
init();
}
virtual void init();
virtual ~LocationParser_ns() {
delete _parser;
delete _commandsNames;
@ -283,13 +284,12 @@ protected:
DECLARE_UNQUALIFIED_ANIM_PARSER(moveto);
DECLARE_UNQUALIFIED_ANIM_PARSER(endanimation);
void init();
public:
LocationParser_br(Parallaction_br *vm) : LocationParser_ns((Parallaction_ns*)vm), _vm(vm) {
init();
}
virtual void init();
virtual ~LocationParser_br() {
delete _commandsNames;
delete _locationStmt;
@ -344,7 +344,6 @@ protected:
void parseLValue(ScriptVar &var, const char *str);
virtual void parseRValue(ScriptVar &var, const char *str);
void init();
void clearSet(OpcodeSet &opcodes) {
for (Common::Array<const Opcode*>::iterator i = opcodes.begin(); i != opcodes.end(); ++i)
delete *i;
@ -353,9 +352,10 @@ protected:
public:
ProgramParser_ns(Parallaction_ns *vm) : _vm(vm) {
init();
}
virtual void init();
virtual ~ProgramParser_ns() {
delete _parser;
delete _instructionNames;
@ -383,13 +383,12 @@ protected:
virtual void parseRValue(ScriptVar &var, const char *str);
void init();
public:
ProgramParser_br(Parallaction_br *vm) : ProgramParser_ns((Parallaction_ns*)vm), _vm(vm) {
init();
}
virtual void init();
virtual ~ProgramParser_br() {
delete _instructionNames;
delete _parser;

View File

@ -442,7 +442,7 @@ DECLARE_LOCATION_PARSER(redundant) {
DECLARE_LOCATION_PARSER(character) {
debugC(7, kDebugParser, "LOCATION_PARSER(character) ");
// changeCharacter(character);
ctxt.characterName = strdup(_tokens[0]);
}
@ -1113,15 +1113,21 @@ void LocationParser_br::parse(Script *script) {
ctxt.bgName = 0;
ctxt.maskName = 0;
ctxt.pathName = 0;
ctxt.characterName = 0;
LocationParser_ns::parse(script);
_vm->_gfx->setBackground(kBackgroundLocation, ctxt.bgName, ctxt.maskName, ctxt.pathName);
_vm->_pathBuffer = &_vm->_gfx->_backgroundInfo.path;
if (ctxt.characterName) {
_vm->changeCharacter(ctxt.characterName);
}
free(ctxt.bgName);
free(ctxt.maskName);
free(ctxt.pathName);
free(ctxt.characterName);
}

View File

@ -308,8 +308,6 @@ void LocationParser_ns::parseAnimation(AnimationList &list, char *name) {
void ProgramParser_ns::parseInstruction() {
InstructionPtr inst(new Instruction);
_script->readLineToken(true);
if (_tokens[0][1] == '.') {
@ -322,10 +320,13 @@ void ProgramParser_ns::parseInstruction() {
} else
ctxt.a = _program->_anim;
if (!ctxt.a) {
return;
}
InstructionPtr inst(new Instruction);
ctxt.inst = inst;
_parser->parseStatement();
_program->_instructions.push_back(inst);
return;

View File

@ -54,8 +54,8 @@ struct SAGAGameDescription {
const GamePatchDescription *patchDescriptions;
};
const bool SagaEngine::isBigEndian() const { return (_gameDescription->features & GF_BIG_ENDIAN_DATA) != 0; }
const bool SagaEngine::isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); }
bool SagaEngine::isBigEndian() const { return (_gameDescription->features & GF_BIG_ENDIAN_DATA) != 0; }
bool SagaEngine::isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); }
const GameResourceDescription *SagaEngine::getResourceDescription() { return _gameDescription->resourceDescription; }
const GameSoundInfo *SagaEngine::getVoiceInfo() const { return _gameDescription->voiceInfo; }
const GameSoundInfo *SagaEngine::getSfxInfo() const { return _gameDescription->sfxInfo; }

View File

@ -326,6 +326,9 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
_statusTextInputState = kStatusTextInputFirstRun;
_disableAbortSpeeches = false;
// set save game reminder alarm
_vm->_timer->installTimerProc(&saveReminderCallback, TIMETOSAVE, this);
}
Interface::~Interface(void) {
@ -336,6 +339,22 @@ Interface::~Interface(void) {
_scenePortraits.freeMem();
}
void Interface::saveReminderCallback(void *refCon) {
((Interface *)refCon)->updateSaveReminder();
}
void Interface::updateSaveReminder() {
// TODO: finish this
/*
if (_active && _panelMode == kPanelMain) {
_vm->_timer->removeTimerProc(&saveReminderCallback);
_saveReminderState = (_saveReminderState == 0) ? 1 : 0;
drawStatusBar();
_vm->_timer->installTimerProc(&saveReminderCallback, TIMETOSAVE, this);
}
*/
}
int Interface::activate() {
if (!_active) {
_active = true;

View File

@ -59,6 +59,8 @@ enum InterfaceUpdateFlags {
#define RID_IHNM_BOSS_SCREEN 19 // not in demo
#define RID_ITE_TYCHO_MAP 1686
#define RID_ITE_SPR_CROSSHAIR (73 + 9)
#define TIMETOSAVE (kScriptTimeTicksPerSecond * 1000 * 60 * 30)
#define TIMETOBLINK (kScriptTimeTicksPerSecond * 1000 * 1)
// Converse-specific stuff
@ -237,6 +239,9 @@ public:
void disableAbortSpeeches(bool d) { _disableAbortSpeeches = d; }
static void saveReminderCallback(void *refCon);
void updateSaveReminder();
bool _textInput;
bool _statusTextInput;

View File

@ -580,15 +580,15 @@ public:
_mouseClickCount = 0;
}
const bool leftMouseButtonPressed() const {
bool leftMouseButtonPressed() const {
return _leftMouseButtonPressed;
}
const bool rightMouseButtonPressed() const {
bool rightMouseButtonPressed() const {
return _rightMouseButtonPressed;
}
const bool mouseButtonPressed() const {
bool mouseButtonPressed() const {
return _leftMouseButtonPressed || _rightMouseButtonPressed;
}
@ -622,8 +622,8 @@ public:
public:
bool initGame(void);
const bool isBigEndian() const;
const bool isMacResources() const;
bool isBigEndian() const;
bool isMacResources() const;
const GameResourceDescription *getResourceDescription();
const GameSoundInfo *getVoiceInfo() const;
const GameSoundInfo *getSfxInfo() const;

View File

@ -56,7 +56,7 @@ struct ResHeader {
// compressed)
byte name[NAME_LEN]; // Name of object
static const int size() {
static int size() {
return 44;
}
@ -152,7 +152,7 @@ struct AnimHeader {
uint8 feetEndDir; // Direction to start in after running anim
uint16 blend;
static const int size() {
static int size() {
return 15;
}
@ -209,7 +209,7 @@ struct CdtEntry {
uint8 frameType; // 0 = print sprite normally with top-left
// corner at (x,y), otherwise see below...
static const int size() {
static int size() {
return 9;
}
@ -250,7 +250,7 @@ struct FrameHeader {
uint16 width; // Dimensions of frame
uint16 height;
static const int size() {
static int size() {
return 8;
}
@ -299,7 +299,7 @@ struct MultiScreenHeader {
uint32 paletteTable;
uint32 maskOffset;
static const int size() {
static int size() {
return 36;
}
@ -339,7 +339,7 @@ struct ScreenHeader {
uint16 height;
uint16 noLayers; // number of layer areas
static const int size() {
static int size() {
return 6;
}
@ -374,7 +374,7 @@ struct LayerHeader {
uint32 offset; // where to find mask data (from start of
// standard file header)
static const int size() {
static int size() {
return 16;
}
@ -436,7 +436,7 @@ public:
_addr = NULL;
}
static const int size() {
static int size() {
return 44;
}
@ -479,7 +479,7 @@ struct TextHeader {
uint32 noOfLines; // how many lines of text are there in this
// module
static const int size() {
static int size() {
return 4;
}

View File

@ -48,7 +48,7 @@ struct ObjectMouse {
int32 priority;
int32 pointer; // type (or resource id?) of pointer used over this area
static const int size() {
static int size() {
return 24;
}
@ -91,7 +91,7 @@ public:
_addr = addr;
}
static const int size() {
static int size() {
return 8;
}
@ -139,7 +139,7 @@ public:
_addr = addr;
}
static const int size() {
static int size() {
return 12;
}
@ -178,7 +178,7 @@ public:
_addr = addr;
}
static const int size() {
static int size() {
return 36;
}
@ -240,7 +240,7 @@ public:
_addr = addr;
}
static const int size() {
static int size() {
return 56;
}
@ -291,7 +291,7 @@ struct ObjectWalkdata {
int32 dx[8 * (12 + 1)]; // walk step distances in x direction
int32 dy[8 * (12 + 1)]; // walk step distances in y direction
static const int size() {
static int size() {
return 916;
}

View File

@ -187,7 +187,7 @@ struct Parallax {
// The dimensions are followed by an offset table, but we don't know in
// advance how big it is. See initializeBackgroundLayer().
static const int size() {
static int size() {
return 4;
}

View File

@ -144,6 +144,9 @@ static const char *credits[] = {
"\\C\\c0""Jurgen Braam",
"\\C\\c0""Lars Persson",
"\\C\\c0""",
"\\C\\c1""Wii",
"\\C\\c0""Andre Heider",
"\\C\\c0""",
"\\C\\c0""",
"\\C\\c1""Other subsystems",
"\\C\\c1""Infrastructure",

View File

@ -102,7 +102,7 @@ void Eval::level4(int *result) {
char op;
op = 0;
if ((_tokenType == tDelimiter) && *_token == '+' || *_token == '-') {
if ((_tokenType == tDelimiter) && (*_token == '+' || *_token == '-')) {
op = *_token;
getToken();
}

View File

@ -626,6 +626,10 @@ begin_credits("Credits");
add_person("Lars Persson", "AnotherGuest", "");
end_section();
begin_section("Wii");
add_person("Andre Heider", "dhewg", "");
end_section();
end_section();
begin_section("Other subsystems");