Added --disable-hq and --disable-scumm-7-8 options. Also improved
DISABLE_HE so more HE-specific code gets excluded. svn-id: r18099
This commit is contained in:
parent
0bb3024467
commit
3588b96d4f
25 changed files with 431 additions and 240 deletions
|
@ -37,12 +37,17 @@ ifdef DISABLE_SCUMM
|
|||
DEFINES += -DDISABLE_SCUMM
|
||||
else
|
||||
MODULES += scumm
|
||||
|
||||
ifdef DISABLE_SCUMM_7_8
|
||||
DEFINES += -DDISABLE_SCUMM_7_8
|
||||
endif
|
||||
|
||||
ifdef DISABLE_HE
|
||||
DEFINES += -DDISABLE_HE
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifdef DISABLE_SIMON
|
||||
DEFINES += -DDISABLE_SIMON
|
||||
else
|
||||
|
@ -103,6 +108,10 @@ ifdef USE_MT32EMU
|
|||
MODULES += sound/softsynth/mt32
|
||||
endif
|
||||
|
||||
ifdef DISABLE_HQ_SCALERS
|
||||
DEFINES += -DDISABLE_HQ_SCALERS
|
||||
endif
|
||||
|
||||
######################################################################
|
||||
# The build rules follow - normally you should have no need to
|
||||
# touch whatever comes after here.
|
||||
|
|
2
NEWS
2
NEWS
|
@ -28,6 +28,8 @@ For a more comprehensive changelog for the latest experimental CVS code, see:
|
|||
- Added support for NES version of Maniac Mansion
|
||||
- Added thumbnail support for savegames.
|
||||
- Broke compatibility with HE savegame (HE v71 and upwards only)
|
||||
- Added possibility to disable building of HE and SCUMM v7 & v8 games
|
||||
support.
|
||||
|
||||
Sword2:
|
||||
- Made the resource manager expire resources more intelligently.
|
||||
|
|
|
@ -36,8 +36,10 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
|
|||
{"supereagle", "SuperEagle", GFX_SUPEREAGLE},
|
||||
{"advmame2x", "AdvMAME2x", GFX_ADVMAME2X},
|
||||
{"advmame3x", "AdvMAME3x", GFX_ADVMAME3X},
|
||||
#ifndef DISABLE_HQ_SCALERS
|
||||
{"hq2x", "HQ2x", GFX_HQ2X},
|
||||
{"hq3x", "HQ3x", GFX_HQ3X},
|
||||
#endif
|
||||
{"tv2x", "TV2x", GFX_TV2X},
|
||||
{"dotmatrix", "DotMatrix", GFX_DOTMATRIX},
|
||||
{0, 0, 0}
|
||||
|
@ -161,6 +163,7 @@ bool OSystem_SDL::setGraphicsMode(int mode) {
|
|||
newScaleFactor = 3;
|
||||
newScalerProc = AdvMame3x;
|
||||
break;
|
||||
#ifndef DISABLE_HQ_SCALERS
|
||||
case GFX_HQ2X:
|
||||
newScaleFactor = 2;
|
||||
newScalerProc = HQ2x;
|
||||
|
@ -169,6 +172,7 @@ bool OSystem_SDL::setGraphicsMode(int mode) {
|
|||
newScaleFactor = 3;
|
||||
newScalerProc = HQ3x;
|
||||
break;
|
||||
#endif
|
||||
case GFX_TV2X:
|
||||
newScaleFactor = 2;
|
||||
newScalerProc = TV2x;
|
||||
|
|
|
@ -18,13 +18,16 @@ MODULE_OBJS += \
|
|||
common/scaler.o \
|
||||
common/scaler/2xsai.o \
|
||||
common/scaler/aspect.o \
|
||||
common/scaler/hq2x.o \
|
||||
common/scaler/hq3x.o \
|
||||
common/scaler/scale2x.o \
|
||||
common/scaler/scale3x.o \
|
||||
common/scaler/scalebit.o \
|
||||
common/scaler/thumbnail.o
|
||||
|
||||
ifndef DISABLE_HQ_SCALERS
|
||||
MODULE_OBJS += \
|
||||
common/scaler/hq2x.o \
|
||||
common/scaler/hq3x.o
|
||||
|
||||
ifdef HAVE_NASM
|
||||
MODULE_OBJS += \
|
||||
common/scaler/hq2x_i386.o \
|
||||
|
@ -33,6 +36,8 @@ endif
|
|||
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
MODULE_DIRS += \
|
||||
common \
|
||||
common/scaler
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
int gBitFormat = 565;
|
||||
|
||||
#ifndef DISABLE_HQ_SCALERS
|
||||
// RGB-to-YUV lookup table
|
||||
extern "C" {
|
||||
|
||||
|
@ -71,6 +72,7 @@ uint RGBtoYUVstorage[65536];
|
|||
uint *RGBtoYUV = RGBtoYUVstorage;
|
||||
uint LUT16to32[65536];
|
||||
}
|
||||
#endif
|
||||
|
||||
static const uint16 dotmatrix_565[16] = {
|
||||
0x01E0, 0x0007, 0x3800, 0x0000,
|
||||
|
@ -101,6 +103,9 @@ void InitScalers(uint32 BitFormat) {
|
|||
InitLUT(BitFormat);
|
||||
}
|
||||
|
||||
#ifdef DISABLE_HQ_SCALERS
|
||||
void InitLUT(uint32 BitFormat) {}
|
||||
#else
|
||||
void InitLUT(uint32 BitFormat) {
|
||||
int r, g, b;
|
||||
int Y, u, v;
|
||||
|
@ -129,6 +134,7 @@ void InitLUT(uint32 BitFormat) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Trivial 'scaler' - in fact it doesn't do any scaling but just copies the
|
||||
|
|
|
@ -45,8 +45,11 @@ DECLARE_SCALER(Normal3x);
|
|||
DECLARE_SCALER(Normal1o5x);
|
||||
DECLARE_SCALER(TV2x);
|
||||
DECLARE_SCALER(DotMatrix);
|
||||
|
||||
#ifndef DISABLE_HQ_SCALERS
|
||||
DECLARE_SCALER(HQ2x);
|
||||
DECLARE_SCALER(HQ3x);
|
||||
#endif
|
||||
|
||||
FORCEINLINE int real2Aspect(int y) {
|
||||
return y + (y + 1) / 5;
|
||||
|
|
49
configure
vendored
49
configure
vendored
|
@ -24,6 +24,7 @@ _fluidsynth=auto
|
|||
_mt32emu=yes
|
||||
# default option behaviour yes/no
|
||||
_build_scumm=yes
|
||||
_build_scumm_7_8=yes
|
||||
_build_he=yes
|
||||
_build_simon=yes
|
||||
_build_sky=yes
|
||||
|
@ -36,6 +37,7 @@ _build_kyra=no
|
|||
_need_memalign=no
|
||||
_build_plugins=no
|
||||
_nasm=auto
|
||||
_build_hq_scalers=yes
|
||||
# more defaults
|
||||
_backend=sdl
|
||||
_ranlib=ranlib
|
||||
|
@ -264,6 +266,7 @@ Special configuration feature:
|
|||
Optional Features:
|
||||
--disable-debug disable building with debugging symbols
|
||||
--disable-scumm don't build the SCUMM engine
|
||||
--disable-scumm-7-8 exclude v7 and v8 game in SCUMM engine (ft, dig, comi and demos)
|
||||
--disable-he exclude HE70+ games in SCUMM engine
|
||||
--disable-simon don't build the simon engine
|
||||
--disable-sky don't build the Beneath a Steel Sky engine
|
||||
|
@ -276,6 +279,7 @@ Optional Features:
|
|||
--enable-plugins build engines as loadable modules instead of
|
||||
static linking them
|
||||
--disable-mt32emu don't enable the integrated MT-32 emulator
|
||||
--disable-hq-scalers exclude HQ2x and HQ3x scalers
|
||||
|
||||
Optional Libraries:
|
||||
--with-alsa-prefix=DIR Prefix where alsa is installed (optional)
|
||||
|
@ -323,6 +327,7 @@ DEBFLAGS="-g"
|
|||
for ac_option in $@; do
|
||||
case "$ac_option" in
|
||||
--disable-scumm) _build_scumm=no ;;
|
||||
--disable-scumm-7-8) _build_scumm_7_8=no ;;
|
||||
--disable-he) _build_he=no ;;
|
||||
--disable-simon) _build_simon=no ;;
|
||||
--disable-sky) _build_sky=no ;;
|
||||
|
@ -332,6 +337,7 @@ for ac_option in $@; do
|
|||
--disable-saga) _build_saga=no ;;
|
||||
--disable-gob) _build_gob=no ;;
|
||||
--enable-kyra) _build_kyra=yes ;;
|
||||
--disable-hq-scalers) _build_hq_scalers=no ;;
|
||||
--enable-alsa) _alsa=yes ;;
|
||||
--disable-alsa) _alsa=no ;;
|
||||
--enable-vorbis) _vorbis=yes ;;
|
||||
|
@ -426,6 +432,13 @@ Try \`$0 --help' for more information." >&2
|
|||
esac;
|
||||
done;
|
||||
|
||||
if test "$_build_he" = yes ; then
|
||||
if test "$_build_scumm_7_8" != yes ; then
|
||||
echo "error: you cannot enable HE games with SCUMM v7 & v8 disabled"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
CXXFLAGS="$CXXFLAGS $DEBFLAGS"
|
||||
|
||||
case $_host in
|
||||
|
@ -559,6 +572,12 @@ else
|
|||
_mak_scumm='# DISABLE_SCUMM = 1'
|
||||
fi
|
||||
|
||||
if test "$_build_scumm_7_8" = no ; then
|
||||
_mak_scumm_7_8='DISABLE_SCUMM_7_8 = 1'
|
||||
else
|
||||
_mak_scumm_7_8='# DISABLE_SCUMM_7_8 = 1'
|
||||
fi
|
||||
|
||||
if test "$_build_he" = no ; then
|
||||
_mak_he='DISABLE_HE = 1'
|
||||
else
|
||||
|
@ -613,6 +632,12 @@ else
|
|||
_mak_gob='# DISABLE_GOB = 1'
|
||||
fi
|
||||
|
||||
if test "$_build_hq_scalers" = no ; then
|
||||
_mak_hq_scalers='DISABLE_HQ_SCALERS = 1'
|
||||
else
|
||||
_mak_hq_scalers='# DISABLE_HQ_SCALERS = 1'
|
||||
fi
|
||||
|
||||
if test -n "$_host"; then
|
||||
# Cross-compiling mode - add your target here if needed
|
||||
case "$_host" in
|
||||
|
@ -1072,10 +1097,14 @@ test -z "$_mandir" && _mandir="$_prefix/man"
|
|||
echo
|
||||
echo "Engines:"
|
||||
if test "$_build_scumm" = yes ; then
|
||||
echo " SCUMM"
|
||||
if test "$_build_he" = yes ; then
|
||||
echo " SCUMM (HE70+ games)"
|
||||
echo_n " SCUMM"
|
||||
if test "$_build_scumm_7_8" = yes ; then
|
||||
echo_n " [v7 & v8 games]"
|
||||
fi
|
||||
if test "$_build_he" = yes ; then
|
||||
echo_n " [HE70+ games]"
|
||||
fi
|
||||
echo
|
||||
fi
|
||||
if test "$_build_simon" = yes ; then
|
||||
echo " Simon the Sorcerer"
|
||||
|
@ -1118,11 +1147,18 @@ echo_n "Backend... "
|
|||
echo_n "$_backend"
|
||||
|
||||
if test "$_nasm" = yes ; then
|
||||
echo ", assembly routines"
|
||||
echo_n ", assembly routines"
|
||||
fi
|
||||
|
||||
if test "$_build_hq_scalers" = yes ; then
|
||||
echo_n ", HQ scalers"
|
||||
fi
|
||||
|
||||
if test "$_mt32emu" = yes ; then
|
||||
echo ", MT-32 emu"
|
||||
else
|
||||
echo
|
||||
fi
|
||||
|
||||
#
|
||||
# Backend related stuff
|
||||
#
|
||||
|
@ -1230,6 +1266,7 @@ $_mak_plugins
|
|||
$_make_def_HAVE_GCC3
|
||||
$_make_def_HAVE_NASM
|
||||
$_mak_scumm
|
||||
$_mak_scumm_7_8
|
||||
$_mak_he
|
||||
$_mak_simon
|
||||
$_mak_sky
|
||||
|
@ -1241,6 +1278,8 @@ $_mak_saga
|
|||
$_mak_gob
|
||||
$_mak_mt32emu
|
||||
|
||||
$_mak_hq_scalers
|
||||
|
||||
INCLUDES += $INCLUDES
|
||||
OBJS += $OBJS
|
||||
DEFINES += $DEFINES
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "scumm/scumm.h"
|
||||
#include "scumm/actor.h"
|
||||
#include "scumm/akos.h"
|
||||
#include "scumm/boxes.h"
|
||||
#include "scumm/charset.h"
|
||||
#include "scumm/costume.h"
|
||||
|
@ -36,6 +35,10 @@
|
|||
#include "scumm/util.h"
|
||||
#include "scumm/wiz_he.h"
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
#include "scumm/akos.h"
|
||||
#endif
|
||||
|
||||
namespace Scumm {
|
||||
|
||||
byte Actor::kInvalidBox = 0;
|
||||
|
@ -1005,8 +1008,10 @@ void ScummEngine::processActors() {
|
|||
a->animateCostume();
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
if (_features & GF_NEW_COSTUMES)
|
||||
akos_processQueue();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
|
@ -1166,6 +1171,7 @@ void Actor::drawActorCostume(bool hitTestMode) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
bool Actor::actorHitTest(int x, int y) {
|
||||
AkosRenderer *ar = (AkosRenderer *)_vm->_costumeRenderer;
|
||||
|
||||
|
@ -1180,6 +1186,7 @@ bool Actor::actorHitTest(int x, int y) {
|
|||
|
||||
return ar->_actorHitResult;
|
||||
}
|
||||
#endif
|
||||
|
||||
void Actor::animateCostume() {
|
||||
if (_costume == 0)
|
||||
|
@ -1196,6 +1203,7 @@ void Actor::animateCostume() {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
void Actor::animateLimb(int limb, int f) {
|
||||
// This methods is very similiar to animateCostume().
|
||||
// However, instead of animating *all* the limbs, it only animates
|
||||
|
@ -1230,6 +1238,7 @@ void Actor::animateLimb(int limb, int f) {
|
|||
// _needBgReset = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void ScummEngine::redrawAllActors() {
|
||||
int j;
|
||||
|
@ -1300,12 +1309,14 @@ int ScummEngine::getActorFromPos(int x, int y) {
|
|||
return result;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
void ScummEngine_v7::actorTalk(const byte *msg) {
|
||||
ScummEngine::actorTalk(msg);
|
||||
|
||||
// Play associated speech, if any
|
||||
playSpeech((byte *)_lastStringTag);
|
||||
}
|
||||
#endif
|
||||
|
||||
void ScummEngine::actorTalk(const byte *msg) {
|
||||
Actor *a;
|
||||
|
@ -1434,6 +1445,7 @@ void Actor::setActorCostume(int c) {
|
|||
_costumeNeedsInit = true;
|
||||
|
||||
if (_vm->_features & GF_NEW_COSTUMES) {
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
memset(_animVariable, 0, sizeof(_animVariable));
|
||||
|
||||
if (_vm->_heversion >= 71)
|
||||
|
@ -1453,6 +1465,7 @@ void Actor::setActorCostume(int c) {
|
|||
}
|
||||
startAnimActor(_initFrame);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
if (_visible) {
|
||||
hideActor();
|
||||
|
|
102
scumm/akos.cpp
102
scumm/akos.cpp
|
@ -591,7 +591,6 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) {
|
|||
}
|
||||
|
||||
#ifdef __PALM_OS__
|
||||
const byte *defaultScaleTable;
|
||||
const byte *oldScaleTable;
|
||||
#else
|
||||
const byte oldScaleTable[256] = {
|
||||
|
@ -628,107 +627,6 @@ const byte oldScaleTable[256] = {
|
|||
0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
|
||||
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE
|
||||
};
|
||||
|
||||
const byte defaultScaleTable[768] = {
|
||||
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
|
||||
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
|
||||
0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
|
||||
0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
|
||||
0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
|
||||
0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
|
||||
0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,
|
||||
0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
|
||||
0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
|
||||
0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
|
||||
0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,
|
||||
0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
|
||||
0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,
|
||||
0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
|
||||
0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
|
||||
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
|
||||
0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,
|
||||
0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
|
||||
0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,
|
||||
0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
|
||||
0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
|
||||
0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
|
||||
0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,
|
||||
0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
|
||||
0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
|
||||
0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
|
||||
0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
|
||||
0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
|
||||
0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,
|
||||
0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
|
||||
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
|
||||
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFE,
|
||||
|
||||
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
|
||||
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
|
||||
0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
|
||||
0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
|
||||
0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
|
||||
0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
|
||||
0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,
|
||||
0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
|
||||
0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
|
||||
0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
|
||||
0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,
|
||||
0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
|
||||
0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,
|
||||
0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
|
||||
0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
|
||||
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
|
||||
0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,
|
||||
0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
|
||||
0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,
|
||||
0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
|
||||
0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
|
||||
0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
|
||||
0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,
|
||||
0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
|
||||
0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
|
||||
0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
|
||||
0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
|
||||
0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
|
||||
0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,
|
||||
0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
|
||||
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
|
||||
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFE,
|
||||
|
||||
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
|
||||
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
|
||||
0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
|
||||
0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
|
||||
0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
|
||||
0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
|
||||
0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,
|
||||
0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
|
||||
0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
|
||||
0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
|
||||
0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,
|
||||
0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
|
||||
0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,
|
||||
0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
|
||||
0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
|
||||
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
|
||||
0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,
|
||||
0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
|
||||
0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,
|
||||
0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
|
||||
0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
|
||||
0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
|
||||
0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,
|
||||
0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
|
||||
0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
|
||||
0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
|
||||
0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
|
||||
0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
|
||||
0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,
|
||||
0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
|
||||
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
|
||||
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF,
|
||||
};
|
||||
#endif
|
||||
|
||||
byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) {
|
||||
|
|
105
scumm/bomp.cpp
105
scumm/bomp.cpp
|
@ -330,6 +330,111 @@ void ScummEngine::drawBomp(const BompDrawData &bd, bool mirror) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef __PALM_OS__
|
||||
const byte *defaultScaleTable;
|
||||
#else
|
||||
const byte defaultScaleTable[768] = {
|
||||
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
|
||||
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
|
||||
0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
|
||||
0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
|
||||
0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
|
||||
0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
|
||||
0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,
|
||||
0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
|
||||
0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
|
||||
0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
|
||||
0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,
|
||||
0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
|
||||
0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,
|
||||
0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
|
||||
0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
|
||||
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
|
||||
0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,
|
||||
0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
|
||||
0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,
|
||||
0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
|
||||
0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
|
||||
0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
|
||||
0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,
|
||||
0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
|
||||
0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
|
||||
0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
|
||||
0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
|
||||
0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
|
||||
0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,
|
||||
0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
|
||||
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
|
||||
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFE,
|
||||
|
||||
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
|
||||
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
|
||||
0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
|
||||
0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
|
||||
0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
|
||||
0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
|
||||
0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,
|
||||
0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
|
||||
0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
|
||||
0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
|
||||
0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,
|
||||
0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
|
||||
0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,
|
||||
0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
|
||||
0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
|
||||
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
|
||||
0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,
|
||||
0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
|
||||
0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,
|
||||
0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
|
||||
0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
|
||||
0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
|
||||
0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,
|
||||
0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
|
||||
0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
|
||||
0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
|
||||
0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
|
||||
0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
|
||||
0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,
|
||||
0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
|
||||
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
|
||||
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFE,
|
||||
|
||||
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
|
||||
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
|
||||
0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
|
||||
0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
|
||||
0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
|
||||
0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
|
||||
0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,
|
||||
0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
|
||||
0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
|
||||
0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
|
||||
0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,
|
||||
0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
|
||||
0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,
|
||||
0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
|
||||
0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
|
||||
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
|
||||
0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,
|
||||
0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
|
||||
0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,
|
||||
0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
|
||||
0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
|
||||
0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
|
||||
0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,
|
||||
0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
|
||||
0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
|
||||
0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
|
||||
0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
|
||||
0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
|
||||
0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,
|
||||
0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
|
||||
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
|
||||
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF,
|
||||
};
|
||||
#endif
|
||||
|
||||
static const byte bitCount[] = {
|
||||
8, 7, 7, 6, 7, 6, 6, 5, 7, 6, 6, 5, 6, 5, 5, 4,
|
||||
7, 6, 6, 5, 6, 5, 5, 4, 6, 5, 5, 4, 5, 4, 4, 3,
|
||||
|
|
200
scumm/camera.cpp
200
scumm/camera.cpp
|
@ -58,37 +58,6 @@ void ScummEngine::setCameraAt(int pos_x, int pos_y) {
|
|||
stopTalk();
|
||||
}
|
||||
|
||||
void ScummEngine_v7::setCameraAt(int pos_x, int pos_y) {
|
||||
Common::Point old;
|
||||
|
||||
old = camera._cur;
|
||||
|
||||
camera._cur.x = pos_x;
|
||||
camera._cur.y = pos_y;
|
||||
|
||||
clampCameraPos(&camera._cur);
|
||||
|
||||
camera._dest = camera._cur;
|
||||
VAR(VAR_CAMERA_DEST_X) = camera._dest.x;
|
||||
VAR(VAR_CAMERA_DEST_Y) = camera._dest.y;
|
||||
|
||||
assert(camera._cur.x >= (_screenWidth / 2) && camera._cur.y >= (_screenHeight / 2));
|
||||
|
||||
if (camera._cur.x != old.x || camera._cur.y != old.y) {
|
||||
if (VAR(VAR_SCROLL_SCRIPT)) {
|
||||
VAR(VAR_CAMERA_POS_X) = camera._cur.x;
|
||||
VAR(VAR_CAMERA_POS_Y) = camera._cur.y;
|
||||
runScript(VAR(VAR_SCROLL_SCRIPT), 0, 0, 0);
|
||||
}
|
||||
|
||||
// Even though cameraMoved() is called automatically, we may
|
||||
// need to know at once that the camera has moved, or text may
|
||||
// be printed at the wrong coordinates. See bugs #795938 and
|
||||
// #929242
|
||||
cameraMoved();
|
||||
}
|
||||
}
|
||||
|
||||
void ScummEngine::setCameraFollows(Actor *a) {
|
||||
|
||||
int t, i;
|
||||
|
@ -115,30 +84,6 @@ void ScummEngine::setCameraFollows(Actor *a) {
|
|||
runInventoryScript(0);
|
||||
}
|
||||
|
||||
void ScummEngine_v7::setCameraFollows(Actor *a) {
|
||||
|
||||
byte oldfollow = camera._follows;
|
||||
int ax, ay;
|
||||
|
||||
camera._follows = a->_number;
|
||||
VAR(VAR_CAMERA_FOLLOWED_ACTOR) = a->_number;
|
||||
|
||||
if (!a->isInCurrentRoom()) {
|
||||
startScene(a->getRoom(), 0, 0);
|
||||
}
|
||||
|
||||
ax = abs(a->_pos.x - camera._cur.x);
|
||||
ay = abs(a->_pos.y - camera._cur.y);
|
||||
|
||||
if (ax > VAR(VAR_CAMERA_THRESHOLD_X) || ay > VAR(VAR_CAMERA_THRESHOLD_Y) || ax > (_screenWidth / 2) || ay > (_screenHeight / 2)) {
|
||||
setCameraAt(a->_pos.x, a->_pos.y);
|
||||
}
|
||||
|
||||
if (a->_number != oldfollow)
|
||||
runInventoryScript(0);
|
||||
}
|
||||
|
||||
|
||||
void ScummEngine::clampCameraPos(Common::Point *pt) {
|
||||
if (pt->x < VAR(VAR_CAMERA_MIN_X))
|
||||
pt->x = (short) VAR(VAR_CAMERA_MIN_X);
|
||||
|
@ -228,6 +173,105 @@ void ScummEngine::moveCamera() {
|
|||
}
|
||||
}
|
||||
|
||||
void ScummEngine::cameraMoved() {
|
||||
int screenLeft;
|
||||
if (_features & GF_NEW_CAMERA) {
|
||||
assert(camera._cur.x >= (_screenWidth / 2) && camera._cur.y >= (_screenHeight / 2));
|
||||
} else {
|
||||
if (camera._cur.x < (_screenWidth / 2)) {
|
||||
camera._cur.x = (_screenWidth / 2);
|
||||
} else if (camera._cur.x > _roomWidth - (_screenWidth / 2)) {
|
||||
camera._cur.x = _roomWidth - (_screenWidth / 2);
|
||||
}
|
||||
}
|
||||
|
||||
_screenStartStrip = camera._cur.x / 8 - gdi._numStrips / 2;
|
||||
_screenEndStrip = _screenStartStrip + gdi._numStrips - 1;
|
||||
|
||||
_screenTop = camera._cur.y - (_screenHeight / 2);
|
||||
if (_features & GF_NEW_CAMERA) {
|
||||
screenLeft = camera._cur.x - (_screenWidth / 2);
|
||||
} else {
|
||||
screenLeft = _screenStartStrip * 8;
|
||||
}
|
||||
|
||||
virtscr[0].xstart = screenLeft;
|
||||
}
|
||||
|
||||
void ScummEngine::panCameraTo(int x, int y) {
|
||||
camera._dest.x = x;
|
||||
camera._mode = kPanningCameraMode;
|
||||
camera._movingToActor = false;
|
||||
}
|
||||
|
||||
void ScummEngine::actorFollowCamera(int act) {
|
||||
if (!(_features & GF_NEW_CAMERA)) {
|
||||
int old;
|
||||
|
||||
old = camera._follows;
|
||||
setCameraFollows(derefActor(act, "actorFollowCamera"));
|
||||
if (camera._follows != old)
|
||||
runInventoryScript(0);
|
||||
|
||||
camera._movingToActor = false;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
void ScummEngine_v7::setCameraAt(int pos_x, int pos_y) {
|
||||
Common::Point old;
|
||||
|
||||
old = camera._cur;
|
||||
|
||||
camera._cur.x = pos_x;
|
||||
camera._cur.y = pos_y;
|
||||
|
||||
clampCameraPos(&camera._cur);
|
||||
|
||||
camera._dest = camera._cur;
|
||||
VAR(VAR_CAMERA_DEST_X) = camera._dest.x;
|
||||
VAR(VAR_CAMERA_DEST_Y) = camera._dest.y;
|
||||
|
||||
assert(camera._cur.x >= (_screenWidth / 2) && camera._cur.y >= (_screenHeight / 2));
|
||||
|
||||
if (camera._cur.x != old.x || camera._cur.y != old.y) {
|
||||
if (VAR(VAR_SCROLL_SCRIPT)) {
|
||||
VAR(VAR_CAMERA_POS_X) = camera._cur.x;
|
||||
VAR(VAR_CAMERA_POS_Y) = camera._cur.y;
|
||||
runScript(VAR(VAR_SCROLL_SCRIPT), 0, 0, 0);
|
||||
}
|
||||
|
||||
// Even though cameraMoved() is called automatically, we may
|
||||
// need to know at once that the camera has moved, or text may
|
||||
// be printed at the wrong coordinates. See bugs #795938 and
|
||||
// #929242
|
||||
cameraMoved();
|
||||
}
|
||||
}
|
||||
|
||||
void ScummEngine_v7::setCameraFollows(Actor *a) {
|
||||
|
||||
byte oldfollow = camera._follows;
|
||||
int ax, ay;
|
||||
|
||||
camera._follows = a->_number;
|
||||
VAR(VAR_CAMERA_FOLLOWED_ACTOR) = a->_number;
|
||||
|
||||
if (!a->isInCurrentRoom()) {
|
||||
startScene(a->getRoom(), 0, 0);
|
||||
}
|
||||
|
||||
ax = abs(a->_pos.x - camera._cur.x);
|
||||
ay = abs(a->_pos.y - camera._cur.y);
|
||||
|
||||
if (ax > VAR(VAR_CAMERA_THRESHOLD_X) || ay > VAR(VAR_CAMERA_THRESHOLD_Y) || ax > (_screenWidth / 2) || ay > (_screenHeight / 2)) {
|
||||
setCameraAt(a->_pos.x, a->_pos.y);
|
||||
}
|
||||
|
||||
if (a->_number != oldfollow)
|
||||
runInventoryScript(0);
|
||||
}
|
||||
|
||||
void ScummEngine_v7::moveCamera() {
|
||||
Common::Point old = camera._cur;
|
||||
Actor *a = NULL;
|
||||
|
@ -312,55 +356,11 @@ void ScummEngine_v7::moveCamera() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void ScummEngine::cameraMoved() {
|
||||
int screenLeft;
|
||||
if (_features & GF_NEW_CAMERA) {
|
||||
assert(camera._cur.x >= (_screenWidth / 2) && camera._cur.y >= (_screenHeight / 2));
|
||||
} else {
|
||||
if (camera._cur.x < (_screenWidth / 2)) {
|
||||
camera._cur.x = (_screenWidth / 2);
|
||||
} else if (camera._cur.x > _roomWidth - (_screenWidth / 2)) {
|
||||
camera._cur.x = _roomWidth - (_screenWidth / 2);
|
||||
}
|
||||
}
|
||||
|
||||
_screenStartStrip = camera._cur.x / 8 - gdi._numStrips / 2;
|
||||
_screenEndStrip = _screenStartStrip + gdi._numStrips - 1;
|
||||
|
||||
_screenTop = camera._cur.y - (_screenHeight / 2);
|
||||
if (_features & GF_NEW_CAMERA) {
|
||||
screenLeft = camera._cur.x - (_screenWidth / 2);
|
||||
} else {
|
||||
screenLeft = _screenStartStrip * 8;
|
||||
}
|
||||
|
||||
virtscr[0].xstart = screenLeft;
|
||||
}
|
||||
|
||||
void ScummEngine::panCameraTo(int x, int y) {
|
||||
camera._dest.x = x;
|
||||
camera._mode = kPanningCameraMode;
|
||||
camera._movingToActor = false;
|
||||
}
|
||||
|
||||
void ScummEngine_v7::panCameraTo(int x, int y) {
|
||||
VAR(VAR_CAMERA_FOLLOWED_ACTOR) = camera._follows = 0;
|
||||
VAR(VAR_CAMERA_DEST_X) = camera._dest.x = x;
|
||||
VAR(VAR_CAMERA_DEST_Y) = camera._dest.y = y;
|
||||
}
|
||||
|
||||
void ScummEngine::actorFollowCamera(int act) {
|
||||
if (!(_features & GF_NEW_CAMERA)) {
|
||||
int old;
|
||||
|
||||
old = camera._follows;
|
||||
setCameraFollows(derefActor(act, "actorFollowCamera"));
|
||||
if (camera._follows != old)
|
||||
runInventoryScript(0);
|
||||
|
||||
camera._movingToActor = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
} // End of namespace Scumm
|
||||
|
|
|
@ -22,14 +22,16 @@
|
|||
#include "stdafx.h"
|
||||
#include "common/system.h"
|
||||
#include "common/util.h"
|
||||
#include "scumm/bomp.h"
|
||||
#include "scumm/charset.h"
|
||||
#include "scumm/intern.h"
|
||||
#include "scumm/object.h"
|
||||
#include "scumm/resource_v7he.h"
|
||||
#include "scumm/saveload.h"
|
||||
#include "scumm/scumm.h"
|
||||
#include "scumm/bomp.h"
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
#include "scumm/resource_v7he.h"
|
||||
#endif
|
||||
|
||||
namespace Scumm {
|
||||
|
||||
|
@ -163,7 +165,6 @@ void ScummEngine_v70he::setCursorFromImg(uint img, uint room, uint imgindex) {
|
|||
else
|
||||
_win32ResExtractor->setCursor(img);
|
||||
}
|
||||
#endif
|
||||
|
||||
void ScummEngine_v90he::setDefaultCursor() {
|
||||
const uint16 *src;
|
||||
|
@ -196,6 +197,7 @@ void ScummEngine_v90he::setDefaultCursor() {
|
|||
|
||||
updateCursor();
|
||||
}
|
||||
#endif
|
||||
|
||||
void ScummEngine_v6::setCursorFromImg(uint img, uint room, uint imgindex) {
|
||||
int w, h;
|
||||
|
|
|
@ -31,11 +31,18 @@
|
|||
#include "scumm/debugger.h"
|
||||
#include "scumm/dialogs.h"
|
||||
#include "scumm/imuse.h"
|
||||
#include "scumm/insane/insane.h"
|
||||
#include "scumm/logic_he.h"
|
||||
#include "scumm/scumm.h"
|
||||
#include "scumm/sound.h"
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
#include "scumm/insane/insane.h"
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
#include "scumm/logic_he.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
#define KEY_ALL_SKIP 3457
|
||||
#endif
|
||||
|
@ -211,9 +218,12 @@ void ScummEngine::parseEvents() {
|
|||
|
||||
void ScummEngine::clearClickedStatus() {
|
||||
_keyPressed = 0;
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
if (_heversion >= 98) {
|
||||
((ScummEngine_v90he *)this)->_logicHE->processKeyStroke(_keyPressed);
|
||||
}
|
||||
#endif
|
||||
_mouseAndKeyboardStat = 0;
|
||||
_leftBtnPressed &= ~msClicked;
|
||||
_rightBtnPressed &= ~msClicked;
|
||||
|
@ -222,9 +232,11 @@ void ScummEngine::clearClickedStatus() {
|
|||
void ScummEngine::processKbd(bool smushMode) {
|
||||
int saveloadkey;
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
if (_heversion >= 98) {
|
||||
((ScummEngine_v90he *)this)->_logicHE->processKeyStroke(_keyPressed);
|
||||
}
|
||||
#endif
|
||||
|
||||
_lastKeyHit = _keyPressed;
|
||||
_keyPressed = 0;
|
||||
|
@ -413,6 +425,7 @@ void ScummEngine::processKbd(bool smushMode) {
|
|||
|
||||
if (_lastKeyHit == VAR(VAR_CUTSCENEEXIT_KEY) ||
|
||||
((VAR(VAR_CUTSCENEEXIT_KEY) == 4 || VAR(VAR_CUTSCENEEXIT_KEY) == 64) && _lastKeyHit == 27)) {
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
// Skip cutscene (or active SMUSH video). For the V2 games, which
|
||||
// normally use F4 for this, we add in a hack that makes escape work,
|
||||
// too (just for convenience).
|
||||
|
@ -422,6 +435,7 @@ void ScummEngine::processKbd(bool smushMode) {
|
|||
else
|
||||
_smushVideoShouldFinish = true;
|
||||
}
|
||||
#endif
|
||||
if (!smushMode || _smushVideoShouldFinish)
|
||||
abortCutscene();
|
||||
if (_version <= 2) {
|
||||
|
|
|
@ -665,6 +665,7 @@ protected:
|
|||
byte VAR_TIMEDATE_SECOND;
|
||||
};
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
class ScummEngine_v60he : public ScummEngine_v6 {
|
||||
protected:
|
||||
typedef void (ScummEngine_v60he::*OpcodeProcv60he)();
|
||||
|
@ -715,7 +716,9 @@ protected:
|
|||
void o60_redimArray();
|
||||
void o60_readFilePos();
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
class ScummEngine_v70he : public ScummEngine_v60he {
|
||||
friend class Win32ResExtractor;
|
||||
friend class MacResExtractor;
|
||||
|
@ -1315,7 +1318,9 @@ protected:
|
|||
void o100_getSpriteInfo();
|
||||
void o100_getWizData();
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
class ScummEngine_v7 : public ScummEngine_v6 {
|
||||
public:
|
||||
ScummEngine_v7(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]);
|
||||
|
@ -1429,6 +1434,8 @@ protected:
|
|||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // End of namespace Scumm
|
||||
|
||||
#endif
|
||||
|
|
|
@ -434,7 +434,6 @@ void LogicHEfunshop::op_1005(int32 *args) {
|
|||
}
|
||||
|
||||
int LogicHEfunshop::checkShape(int arg_0, int arg_4, int arg_8, int arg_C, int arg_10, int arg_14, int arg_18, int arg_1C, int arg_20, int arg_24) {
|
||||
// XXX: Check arg_20/24 types
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ MODULE := scumm
|
|||
|
||||
MODULE_OBJS := \
|
||||
scumm/actor.o \
|
||||
scumm/akos.o \
|
||||
scumm/base-costume.o \
|
||||
scumm/bomp.o \
|
||||
scumm/boxes.o \
|
||||
|
@ -39,8 +38,6 @@ MODULE_OBJS := \
|
|||
scumm/script_v2.o \
|
||||
scumm/script_v5.o \
|
||||
scumm/script_v6.o \
|
||||
scumm/script_v6he.o \
|
||||
scumm/script_v8.o \
|
||||
scumm/scumm.o \
|
||||
scumm/sound.o \
|
||||
scumm/string.o \
|
||||
|
@ -48,6 +45,13 @@ MODULE_OBJS := \
|
|||
scumm/util.o \
|
||||
scumm/vars.o \
|
||||
scumm/verbs.o \
|
||||
scumm/thumbnail.o
|
||||
|
||||
ifndef DISABLE_SCUMM_7_8
|
||||
MODULE_OBJS += \
|
||||
scumm/akos.o \
|
||||
scumm/script_v6he.o \
|
||||
scumm/script_v8.o \
|
||||
scumm/imuse_digi/dimuse.o \
|
||||
scumm/imuse_digi/dimuse_bndmgr.o \
|
||||
scumm/imuse_digi/dimuse_codecs.o \
|
||||
|
@ -69,8 +73,8 @@ MODULE_OBJS := \
|
|||
scumm/smush/smush_player.o \
|
||||
scumm/smush/saud_channel.o \
|
||||
scumm/smush/smush_mixer.o \
|
||||
scumm/smush/smush_font.o \
|
||||
scumm/thumbnail.o
|
||||
scumm/smush/smush_font.o
|
||||
endif
|
||||
|
||||
ifndef DISABLE_HE
|
||||
MODULE_OBJS += \
|
||||
|
|
|
@ -1115,6 +1115,7 @@ int ScummEngine::getObjectImageCount(int object) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
int ScummEngine_v8::getObjectIdFromOBIM(const byte *obim) {
|
||||
// In V8, IMHD has no obj_id, but rather a name string. We map the name
|
||||
// back to an object id using a table derived from the DOBJ resource.
|
||||
|
@ -1129,6 +1130,7 @@ int ScummEngine_v7::getObjectIdFromOBIM(const byte *obim) {
|
|||
const ImageHeader *imhd = (const ImageHeader *)findResourceData(MKID('IMHD'), obim);
|
||||
return READ_LE_UINT16(&imhd->v7.obj_id);
|
||||
}
|
||||
#endif
|
||||
|
||||
int ScummEngine::getObjectIdFromOBIM(const byte *obim) {
|
||||
if (_features & GF_SMALL_HEADER)
|
||||
|
|
|
@ -686,6 +686,7 @@ void ScummEngine::darkenPalette(int redScale, int greenScale, int blueScale, int
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
static int HSL2RGBHelper(int n1, int n2, int hue) {
|
||||
if (hue > 360)
|
||||
hue = hue - 360;
|
||||
|
@ -778,6 +779,7 @@ void ScummEngine_v8::desaturatePalette(int hueScale, int satScale, int lightScal
|
|||
setDirtyColors(startColor, endColor);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int ScummEngine::remapPaletteColor(int r, int g, int b, int threshold) {
|
||||
|
|
|
@ -342,6 +342,7 @@ void ScummEngine::readIndexFile() {
|
|||
closeRoom();
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
void ScummEngine_v7::readIndexBlock(uint32 blocktype, uint32 itemsize) {
|
||||
int num;
|
||||
char *ptr;
|
||||
|
@ -358,6 +359,7 @@ void ScummEngine_v7::readIndexBlock(uint32 blocktype, uint32 itemsize) {
|
|||
ScummEngine::readIndexBlock(blocktype, itemsize);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
void ScummEngine_v70he::readIndexBlock(uint32 blocktype, uint32 itemsize) {
|
||||
|
@ -1034,6 +1036,7 @@ void ScummEngine_v5::readMAXS(int blockSize) {
|
|||
_shadowPalette = (byte *)calloc(_shadowPaletteSize, 1);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
void ScummEngine_v8::readMAXS(int blockSize) {
|
||||
debug(9, "readMAXS: MAXS has blocksize %d", blockSize);
|
||||
|
||||
|
@ -1096,6 +1099,7 @@ void ScummEngine_v7::readMAXS(int blockSize) {
|
|||
_shadowPaletteSize = NUM_SHADOW_PALETTE * 256;
|
||||
_shadowPalette = (byte *)calloc(_shadowPaletteSize, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
void ScummEngine_v6::readMAXS(int blockSize) {
|
||||
debug(0, "readMAXS: MAXS has blocksize %d", blockSize);
|
||||
|
@ -1148,6 +1152,7 @@ void ScummEngine::readGlobalObjects() {
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
void ScummEngine_v8::readGlobalObjects() {
|
||||
int i;
|
||||
int num = _fileHandle->readUint32LE();
|
||||
|
@ -1189,6 +1194,7 @@ void ScummEngine_v7::readGlobalObjects() {
|
|||
_classData[i] = FROM_LE_32(_classData[i]);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void ScummEngine::allocateArrays() {
|
||||
// Note: Buffers are now allocated in scummMain to allow for
|
||||
|
|
|
@ -162,10 +162,12 @@ bool ScummEngine::loadState(int slot, bool compat) {
|
|||
if (!_imuse || _saveSound || !_saveTemporaryState)
|
||||
_sound->stopAllSounds();
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
if (_imuseDigital) {
|
||||
_imuseDigital->stopAllSounds();
|
||||
_imuseDigital->resetState();
|
||||
}
|
||||
#endif
|
||||
|
||||
_sound->stopCD();
|
||||
|
||||
|
@ -997,12 +999,14 @@ void ScummEngine_v5::saveOrLoad(Serializer *s, uint32 savegameVersion) {
|
|||
s->saveLoadEntries(this, cursorEntries);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
void ScummEngine_v7::saveOrLoad(Serializer *s, uint32 savegameVersion) {
|
||||
ScummEngine::saveOrLoad(s, savegameVersion);
|
||||
|
||||
assert(_imuseDigital);
|
||||
_imuseDigital->saveOrLoad(s);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
void ScummEngine_v70he::saveOrLoad(Serializer *s, uint32 savegameVersion) {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2001 Ludvig Strigeus
|
||||
* Copyright (C) 2001-2005 The ScummVM project
|
||||
|
@ -29,19 +28,22 @@
|
|||
#include "scumm/actor.h"
|
||||
#include "scumm/charset.h"
|
||||
#include "scumm/imuse.h"
|
||||
#include "scumm/imuse_digi/dimuse.h"
|
||||
#include "scumm/intern.h"
|
||||
#include "scumm/object.h"
|
||||
#include "scumm/resource.h"
|
||||
#include "scumm/scumm.h"
|
||||
#include "scumm/sound.h"
|
||||
#include "scumm/util.h"
|
||||
#include "scumm/verbs.h"
|
||||
#include "scumm/smush/smush_player.h"
|
||||
|
||||
#include "sound/mididrv.h"
|
||||
#include "sound/mixer.h"
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
#include "scumm/imuse_digi/dimuse.h"
|
||||
#include "scumm/insane/insane.h"
|
||||
#include "scumm/smush/smush_player.h"
|
||||
#endif
|
||||
|
||||
namespace Scumm {
|
||||
|
||||
|
@ -1088,10 +1090,12 @@ void ScummEngine_v6::o6_startSound() {
|
|||
// sound. See also o6_soundOps()
|
||||
if (_heversion >= 61)
|
||||
offset = pop();
|
||||
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
if (_features & GF_DIGI_IMUSE)
|
||||
_imuseDigital->startSfx(pop(), 64);
|
||||
else
|
||||
#endif
|
||||
_sound->addSoundToQueue(pop(), offset);
|
||||
}
|
||||
|
||||
|
@ -2490,6 +2494,7 @@ void ScummEngine_v6::o6_kernelSetFunctions() {
|
|||
case 4:
|
||||
grabCursor(args[1], args[2], args[3], args[4]);
|
||||
break;
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
case 6: {
|
||||
uint32 speed;
|
||||
if (_smushFrameRate == 0)
|
||||
|
@ -2522,6 +2527,7 @@ void ScummEngine_v6::o6_kernelSetFunctions() {
|
|||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case 12:
|
||||
setCursorFromImg(args[1], (uint) - 1, args[2]);
|
||||
break;
|
||||
|
|
|
@ -34,23 +34,32 @@
|
|||
#include "gui/message.h"
|
||||
#include "gui/newgui.h"
|
||||
|
||||
#include "scumm/akos.h"
|
||||
#include "scumm/charset.h"
|
||||
#include "scumm/costume.h"
|
||||
#include "scumm/debugger.h"
|
||||
#include "scumm/dialogs.h"
|
||||
#include "scumm/imuse_digi/dimuse.h"
|
||||
#include "scumm/imuse.h"
|
||||
#include "scumm/insane/insane.h"
|
||||
#include "scumm/intern.h"
|
||||
#include "scumm/logic_he.h"
|
||||
#include "scumm/player_nes.h"
|
||||
#include "scumm/player_v1.h"
|
||||
#include "scumm/player_v2.h"
|
||||
#include "scumm/player_v2a.h"
|
||||
#include "scumm/player_v3a.h"
|
||||
#include "scumm/resource_v7he.h"
|
||||
#include "scumm/sound.h"
|
||||
#include "scumm/scumm.h"
|
||||
#include "scumm/util.h"
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
#include "scumm/logic_he.h"
|
||||
#include "scumm/resource_v7he.h"
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
#include "scumm/akos.h"
|
||||
#include "scumm/imuse_digi/dimuse.h"
|
||||
#include "scumm/insane/insane.h"
|
||||
#endif
|
||||
|
||||
#ifdef __PALM_OS__
|
||||
#include "extras/palm-scumm-md5.h"
|
||||
#else
|
||||
|
@ -187,6 +196,7 @@ static const ScummGameSettings scumm_settings[] = {
|
|||
|
||||
// {"test", "Test demo game", GID_SAMNMAX, 6, 0, /*MDT_PCSPK |*/ MDT_ADLIB | MDT_NATIVE, GF_NEW_OPCODES, Common::kPlatformUnknown, 0, 0},
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
/* Scumm Version 7 */
|
||||
{"ft", "Full Throttle", GID_FT, 7, 0, MDT_NONE,
|
||||
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE, Common::kPlatformPC, 0, 0},
|
||||
|
@ -213,13 +223,16 @@ static const ScummGameSettings scumm_settings[] = {
|
|||
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEFAULT_TO_1X_SCALER, Common::kPlatformWindows, 0, 0},
|
||||
{"comidemo", "The Curse of Monkey Island (Demo)", GID_CMI, 8, 0, MDT_NONE,
|
||||
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEFAULT_TO_1X_SCALER | GF_DEMO, Common::kPlatformWindows, "comi", "COMI.LA0"},
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// Humongous Entertainment Scumm Version 6
|
||||
{"puttputt", "Putt-Putt Joins The Parade", GID_HEGAME, 6, 61, MDT_ADLIB | MDT_NATIVE,
|
||||
GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformPC, 0, 0},
|
||||
{"puttdemo", "Putt-Putt Joins The Parade (Demo)", GID_HEGAME, 6, 60, MDT_ADLIB | MDT_NATIVE,
|
||||
GF_USE_KEY | GF_MULTIPLE_VERSIONS, Common::kPlatformPC, 0, 0},
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
{"puttputt", "Putt-Putt Joins The Parade", GID_HEGAME, 6, 61, MDT_ADLIB | MDT_NATIVE,
|
||||
GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformPC, 0, 0},
|
||||
{"moondemo", "Putt-Putt Goes To The Moon (Demo)", GID_HEGAME, 6, 61, MDT_ADLIB | MDT_NATIVE,
|
||||
GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformPC, 0, 0},
|
||||
{"puttmoon", "Putt-Putt Goes To The Moon", GID_HEGAME, 6, 61, MDT_ADLIB | MDT_NATIVE,
|
||||
|
@ -232,6 +245,7 @@ static const ScummGameSettings scumm_settings[] = {
|
|||
GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformPC, 0, 0},
|
||||
{"fbdemo", "Fatty Bear's Birthday Surprise (DOS Demo)", GID_FBEAR, 6, 61, MDT_ADLIB | MDT_NATIVE,
|
||||
GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformPC, 0, 0},
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
{"activity", "Putt-Putt & Fatty Bear's Activity Pack", GID_HEGAME, 6, 70, MDT_NONE,
|
||||
|
@ -1342,6 +1356,7 @@ ScummEngine_v90he::~ScummEngine_v90he() {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
ScummEngine_v7::ScummEngine_v7(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16])
|
||||
: ScummEngine_v6(detector, syst, gs, md5sum) {
|
||||
_existLanguageFile = false;
|
||||
|
@ -1362,7 +1377,7 @@ ScummEngine_v8::ScummEngine_v8(GameDetector *detector, OSystem *syst, const Scum
|
|||
ScummEngine_v8::~ScummEngine_v8() {
|
||||
delete [] _objectIDMap;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark --- Initialization ---
|
||||
|
@ -1425,8 +1440,10 @@ int ScummEngine::init(GameDetector &detector) {
|
|||
|
||||
// Create the costume renderer
|
||||
if (_features & GF_NEW_COSTUMES) {
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
_costumeRenderer = new AkosRenderer(this);
|
||||
_costumeLoader = new AkosCostumeLoader(this);
|
||||
#endif
|
||||
} else if (_platform == Common::kPlatformNES) {
|
||||
_costumeRenderer = new NESCostumeRenderer(this);
|
||||
_costumeLoader = new NESCostumeLoader(this);
|
||||
|
@ -1435,10 +1452,12 @@ int ScummEngine::init(GameDetector &detector) {
|
|||
_costumeLoader = new ClassicCostumeLoader(this);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
// Create FT INSANE object
|
||||
if (_gameId == GID_FT)
|
||||
_insane = new Insane((ScummEngine_v6 *)this);
|
||||
else
|
||||
#endif
|
||||
_insane = 0;
|
||||
|
||||
// Load game from specified slot, if any
|
||||
|
@ -1755,6 +1774,7 @@ void ScummEngine_v6::scummInit() {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
void ScummEngine_v60he::scummInit() {
|
||||
ScummEngine::scummInit();
|
||||
|
||||
|
@ -1764,6 +1784,7 @@ void ScummEngine_v60he::scummInit() {
|
|||
if (_gameId == GID_FUNPACK)
|
||||
setCursorHotspot(16, 16);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
void ScummEngine_v72he::scummInit() {
|
||||
|
@ -1844,7 +1865,9 @@ void ScummEngine::setupMusic(int midi) {
|
|||
|
||||
// Init iMuse
|
||||
if (_features & GF_DIGI_IMUSE) {
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
_musicEngine = _imuseDigital = new IMuseDigital(this, 10);
|
||||
#endif
|
||||
} else if (_platform == Common::kPlatformNES) {
|
||||
_musicEngine = new Player_NES(this);
|
||||
} else if ((_platform == Common::kPlatformAmiga) && (_version == 2)) {
|
||||
|
@ -2247,11 +2270,13 @@ load_game:
|
|||
|
||||
_sound->processSoundQues();
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
if (_imuseDigital) {
|
||||
_imuseDigital->flushTracks();
|
||||
if ( ((_gameId == GID_DIG) && (!(_features & GF_DEMO))) || (_gameId == GID_CMI) )
|
||||
_imuseDigital->refreshScripts();
|
||||
}
|
||||
#endif
|
||||
|
||||
camera._last = camera._cur;
|
||||
|
||||
|
@ -2891,13 +2916,16 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
|
|||
engine = new ScummEngine_v70he(detector, syst, game, md5sum);
|
||||
break;
|
||||
#endif
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
case 61:
|
||||
engine = new ScummEngine_v60he(detector, syst, game, md5sum);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
engine = new ScummEngine_v6(detector, syst, game, md5sum);
|
||||
}
|
||||
break;
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
case 7:
|
||||
engine = new ScummEngine_v7(detector, syst, game, md5sum);
|
||||
break;
|
||||
|
@ -2905,6 +2933,8 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
|
|||
case 8:
|
||||
engine = new ScummEngine_v8(detector, syst, game, md5sum);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
default:
|
||||
error("Engine_SCUMM_create(): Unknown version of game engine");
|
||||
|
|
|
@ -23,12 +23,15 @@
|
|||
#include "stdafx.h"
|
||||
#include "scumm/actor.h"
|
||||
#include "scumm/imuse.h"
|
||||
#include "scumm/imuse_digi/dimuse.h"
|
||||
#include "scumm/scumm.h"
|
||||
#include "scumm/saveload.h"
|
||||
#include "scumm/sound.h"
|
||||
#include "scumm/util.h"
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
#include "scumm/imuse_digi/dimuse.h"
|
||||
#endif
|
||||
|
||||
#include "common/config-manager.h"
|
||||
#include "common/timer.h"
|
||||
#include "common/util.h"
|
||||
|
@ -806,8 +809,10 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle
|
|||
}
|
||||
|
||||
if (_vm->_imuseDigital) {
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
//_vm->_imuseDigital->stopSound(kTalkSoundID);
|
||||
_vm->_imuseDigital->startVoice(kTalkSoundID, input);
|
||||
#endif
|
||||
} else {
|
||||
_vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, input, id);
|
||||
}
|
||||
|
@ -817,7 +822,9 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle
|
|||
void Sound::stopTalkSound() {
|
||||
if (_sfxMode & 2) {
|
||||
if (_vm->_imuseDigital) {
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
_vm->_imuseDigital->stopSound(kTalkSoundID);
|
||||
#endif
|
||||
} else if (_vm->_heversion >= 60) {
|
||||
_vm->_mixer->stopID(1);
|
||||
} else {
|
||||
|
@ -855,8 +862,10 @@ int Sound::getSoundElapsedTime(int sound) const {
|
|||
}
|
||||
|
||||
int Sound::isSoundRunning(int sound) const {
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
if (_vm->_imuseDigital)
|
||||
return (_vm->_imuseDigital->getSoundStatus(sound) != 0);
|
||||
#endif
|
||||
|
||||
if (sound == _currentCDSound)
|
||||
return pollCD();
|
||||
|
@ -906,8 +915,10 @@ int Sound::isSoundRunning(int sound) const {
|
|||
*/
|
||||
bool Sound::isSoundInUse(int sound) const {
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
if (_vm->_imuseDigital)
|
||||
return (_vm->_imuseDigital->getSoundStatus(sound) != 0);
|
||||
#endif
|
||||
|
||||
if (sound == _currentCDSound)
|
||||
return pollCD() != 0;
|
||||
|
@ -1015,11 +1026,13 @@ void Sound::stopAllSounds() {
|
|||
void Sound::soundKludge(int *list, int num) {
|
||||
int i;
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
if (_vm->_imuseDigital) {
|
||||
_vm->_imuseDigital->parseScriptCmds(list[0], list[1], list[2], list[3], list[4],
|
||||
list[5], list[6], list[7]);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (list[0] == -1) {
|
||||
processSoundQues();
|
||||
|
@ -1081,9 +1094,11 @@ void Sound::pauseSounds(bool pause) {
|
|||
|
||||
_soundsPaused = pause;
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
if (_vm->_imuseDigital) {
|
||||
_vm->_imuseDigital->pause(pause);
|
||||
}
|
||||
#endif
|
||||
|
||||
_vm->_mixer->pauseAll(pause);
|
||||
|
||||
|
|
|
@ -747,10 +747,12 @@ int ScummEngine::addStringToStack(byte *dst, int dstSize, int var) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
void ScummEngine_v80he::initCharset(int charsetno) {
|
||||
ScummEngine::initCharset(charsetno);
|
||||
VAR(VAR_CURRENT_CHARSET) = charsetno;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ScummEngine::initCharset(int charsetno) {
|
||||
int i;
|
||||
|
@ -836,6 +838,7 @@ void ScummEngine_v6::removeBlastTexts() {
|
|||
_blastTextQueuePos = 0;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
int indexCompare(const void *p1, const void *p2) {
|
||||
const LangIndexNode *i1 = (const LangIndexNode *) p1;
|
||||
const LangIndexNode *i2 = (const LangIndexNode *) p2;
|
||||
|
@ -989,11 +992,6 @@ void ScummEngine_v7::playSpeech(const byte *ptr) {
|
|||
}
|
||||
}
|
||||
|
||||
void ScummEngine::translateText(const byte *text, byte *trans_buff) {
|
||||
// Default: just copy the string
|
||||
memcpy(trans_buff, text, resStrLen(text) + 1);
|
||||
}
|
||||
|
||||
void ScummEngine_v7::translateText(const byte *text, byte *trans_buff) {
|
||||
LangIndexNode target;
|
||||
LangIndexNode *found = NULL;
|
||||
|
@ -1083,4 +1081,11 @@ void ScummEngine_v7::translateText(const byte *text, byte *trans_buff) {
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void ScummEngine::translateText(const byte *text, byte *trans_buff) {
|
||||
// Default: just copy the string
|
||||
memcpy(trans_buff, text, resStrLen(text) + 1);
|
||||
}
|
||||
|
||||
} // End of namespace Scumm
|
||||
|
|
|
@ -24,10 +24,13 @@
|
|||
#include "stdafx.h"
|
||||
#include "common/config-manager.h"
|
||||
#include "scumm/scumm.h"
|
||||
#include "scumm/logic_he.h"
|
||||
#include "scumm/intern.h"
|
||||
#include "sound/mididrv.h"
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
#include "scumm/logic_he.h"
|
||||
#endif
|
||||
|
||||
namespace Scumm {
|
||||
|
||||
void ScummEngine::setupScummVars() {
|
||||
|
@ -194,6 +197,7 @@ void ScummEngine_v6::setupScummVars() {
|
|||
VAR_CHARSET_MASK = 123;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
void ScummEngine_v70he::setupScummVars() {
|
||||
ScummEngine_v6::setupScummVars();
|
||||
|
||||
|
@ -303,7 +307,9 @@ void ScummEngine_v72he::setupScummVars() {
|
|||
VAR_NUM_UNK = 131;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
void ScummEngine_v7::setupScummVars() {
|
||||
VAR_MOUSE_X = 1;
|
||||
VAR_MOUSE_Y = 2;
|
||||
|
@ -500,6 +506,7 @@ void ScummEngine_v8::setupScummVars() {
|
|||
VAR_BLAST_ABOVE_TEXT = 133;
|
||||
VAR_SYNC = 134;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ScummEngine_v2::initScummVars() {
|
||||
|
||||
|
@ -525,6 +532,7 @@ void ScummEngine_v5::initScummVars() {
|
|||
_scummVars[74] = 1225;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCUMM_7_8
|
||||
void ScummEngine_v7::initScummVars() {
|
||||
ScummEngine::initScummVars();
|
||||
|
||||
|
@ -539,7 +547,9 @@ void ScummEngine_v7::initScummVars() {
|
|||
VAR(VAR_DEFAULT_TALK_DELAY) = 60;
|
||||
VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_HE
|
||||
void ScummEngine_v70he::initScummVars() {
|
||||
ScummEngine::initScummVars();
|
||||
|
||||
|
@ -591,6 +601,7 @@ void ScummEngine_v99he::initScummVars() {
|
|||
VAR(VAR_NUM_PALETTES) = _numPalettes;
|
||||
VAR(VAR_NUM_UNK) = _numUnk;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ScummEngine::initScummVars() {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue