Merged fsnode with trunk: r27971:28460
svn-id: r28462
This commit is contained in:
commit
6856535010
274 changed files with 28966 additions and 10549 deletions
1
NEWS
1
NEWS
|
@ -18,6 +18,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
|
|||
SCUMM:
|
||||
- Added subtitle skipping (via '.' key) in older games which didn't have
|
||||
this feature so far (e.g. Zak, MM, Indy3, Loom).
|
||||
- Added support for Chinese COMI
|
||||
|
||||
SAGA:
|
||||
- Added support for compressed sound effects, voices and music
|
||||
|
|
5
README
5
README
|
@ -1068,7 +1068,6 @@ other games.
|
|||
Ctrl-d - Starts the debugger
|
||||
|
||||
Touche: The Adventures of the Fifth Musketeer:
|
||||
Ctrl-d - Starts the debugger
|
||||
Ctrl-f - Toggle fast mode
|
||||
F5 - Displays options
|
||||
F9 - Turn fast walk mode on
|
||||
|
@ -1364,7 +1363,7 @@ than MP3, so have a good book handy.
|
|||
------ ----------------------------------------
|
||||
As above, but ScummVM must be compiled with Flac support. Run:
|
||||
|
||||
compress_scumm_sou --flac --best -b 1152 monster.sou
|
||||
compress_scumm_sou --flac monster.sou
|
||||
|
||||
This should produce a smaller monster.sof file, which you should copy to your
|
||||
game directory. Remember that the quality is always the same, varying encoder
|
||||
|
@ -1403,7 +1402,7 @@ For Ogg Vorbis add --vorbis to the options, i.e.
|
|||
|
||||
For Flac add --flac and optional parameters, i.e.
|
||||
|
||||
compress_agos --flac --best -b 1152
|
||||
compress_agos --flac
|
||||
|
||||
Eventually you will have a much smaller *.mp3, *.ogg or *.fla file, copy this
|
||||
file to your game directory. You can safely remove the old file.
|
||||
|
|
|
@ -41,7 +41,7 @@ VPATH = $(srcdir)
|
|||
ARM = 1
|
||||
|
||||
ifdef DS_BUILD_A
|
||||
DEFINES = -DDS_SCUMM_BUILD -DDS_BUILD_A
|
||||
DEFINES = -DDS_SCUMM_BUILD -DDS_BUILD_A -DUSE_ARM_GFX_ASM
|
||||
LOGO = logoa.bmp
|
||||
DISABLE_HE = 1
|
||||
#DISABLE_SCUMM = 1
|
||||
|
@ -60,6 +60,7 @@ ifdef DS_BUILD_A
|
|||
DISABLE_TOUCHE = 1
|
||||
DISABLE_PARALLACTION = 1
|
||||
DISABLE_CRUISE = 1
|
||||
USE_ARM_GFX_ASM = 1
|
||||
BUILD=scummvm-A
|
||||
endif
|
||||
|
||||
|
|
|
@ -5,8 +5,85 @@
|
|||
#ifndef DISABLE_AGI
|
||||
|
||||
namespace DS {
|
||||
// Default dictionary is about 64Kb, so 128Kb should be enough for future expansion
|
||||
#define WORD_BUFFER_SIZE (128 * 1024)
|
||||
|
||||
// Default dictionary has ~8000 words
|
||||
#define MAX_WORD_COUNT 16000
|
||||
|
||||
char wordBuffer[WORD_BUFFER_SIZE];
|
||||
int wordBufferPos = 0;
|
||||
|
||||
char* wordBufferPtr[MAX_WORD_COUNT];
|
||||
int wordBufferPtrPos = 0;
|
||||
|
||||
void addAutoCompleteLine(char* line) {
|
||||
|
||||
while (*line != 0)
|
||||
{
|
||||
char word[32];
|
||||
int length;
|
||||
|
||||
// Skip the T9-style numbers
|
||||
while (*line != ' ')
|
||||
{
|
||||
line++;
|
||||
}
|
||||
line++;
|
||||
|
||||
do {
|
||||
length = 0;
|
||||
|
||||
if (*line == ' ') line++;
|
||||
|
||||
|
||||
// Copy the new word
|
||||
do {
|
||||
word[length++] = *line++;
|
||||
} while ((*line != '\0') && (*line != ' ') && (*line != '\n'));
|
||||
|
||||
word[length] = '\0';
|
||||
|
||||
|
||||
// Store a pointer to the start of the word
|
||||
wordBufferPtr[wordBufferPtrPos++] = &wordBuffer[wordBufferPos];
|
||||
|
||||
// copy the new word into the buffer
|
||||
strcpy(&wordBuffer[wordBufferPos], word);
|
||||
wordBufferPos += strlen(word) + 1;
|
||||
} while (*line == ' ');
|
||||
}
|
||||
}
|
||||
|
||||
int stringCompare(const void* a, const void* b) {
|
||||
const char** as = (const char **) a;
|
||||
const char** bs = (const char **) b;
|
||||
|
||||
return scumm_stricmp(*as, *bs);
|
||||
}
|
||||
|
||||
void sortAutoCompleteWordList() {
|
||||
// Sort the whole word list into alphabetical order
|
||||
qsort((void *) wordBufferPtr, wordBufferPtrPos, 4, stringCompare);
|
||||
}
|
||||
|
||||
// Sends the current available words to the virtual keyboard code for display
|
||||
bool findWordCompletions(char* input)
|
||||
{
|
||||
char testWord[32];
|
||||
int min = 0;
|
||||
int max = wordBufferPtrPos - 1;
|
||||
char* word;
|
||||
int position;
|
||||
char partialWord[32];
|
||||
|
||||
// Early out if dictionary not loaded
|
||||
if (wordBufferPtrPos == 0)
|
||||
return false;
|
||||
|
||||
OSystem_DS* system = (OSystem_DS *) g_system;
|
||||
system->clearAutoComplete();
|
||||
|
||||
void findWordCompletions(char* input) {
|
||||
int start = 0;
|
||||
for (int r = strlen(input) - 1; r>0; r--) {
|
||||
if (input[r] == ' ') {
|
||||
|
@ -14,52 +91,89 @@ void findWordCompletions(char* input) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
strcpy(partialWord, &input[start]);
|
||||
|
||||
char word[32];
|
||||
strcpy(word, &input[start]);
|
||||
|
||||
int fchr = word[0] - 'a';
|
||||
int len = strlen(word);
|
||||
|
||||
OSystem_DS* system = (OSystem_DS *) g_system;
|
||||
system->clearAutoComplete();
|
||||
system->setCharactersEntered(strlen(word));
|
||||
|
||||
if (strlen(word) == 0) {
|
||||
return;
|
||||
if (strlen(partialWord) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8 *wordList = Agi::AgiEngine::getWordsData();
|
||||
uint8 *wordListEnd = Agi::AgiEngine::getWordsData() + Agi::AgiEngine::getWordsDataSize();
|
||||
|
||||
/* Get the offset to the first word beginning with the
|
||||
* right character
|
||||
*/
|
||||
wordList += READ_BE_UINT16(wordList + 2 * fchr);
|
||||
|
||||
char currentWord[32];
|
||||
|
||||
|
||||
while (wordList < wordListEnd) {
|
||||
int pos = *wordList++; // Number of chars to keep from previous word
|
||||
|
||||
if (wordList == wordListEnd)
|
||||
break;
|
||||
|
||||
char c;
|
||||
do {
|
||||
c = *wordList++;
|
||||
currentWord[pos++] = (~c) & 0x7F;
|
||||
} while ((c & 0x80) == 0); // Top bit indicates end of word
|
||||
currentWord[pos++] = '\0';
|
||||
position = min + ((max - min) / 2);
|
||||
|
||||
if (!strncmp(currentWord, word, strlen(word))) {
|
||||
system->addAutoComplete(currentWord);
|
||||
// Get the word from the dictonary line
|
||||
word = wordBufferPtr[position];
|
||||
|
||||
|
||||
|
||||
// Now check to see if the word is before or after the stub we're after
|
||||
int result = scumm_stricmp((const char *) partialWord, (const char *) word);
|
||||
|
||||
if (result == 0) {
|
||||
// We've found the whole word. Aren't we good.
|
||||
break;
|
||||
} else if (result > 0) {
|
||||
// We're too early, so change the minimum position
|
||||
min = position + 1;
|
||||
} else if (result < 0) {
|
||||
// We're too early, so change the maximum position
|
||||
max = position - 1;
|
||||
}
|
||||
|
||||
wordList += 2; // Skip the two byte word id.
|
||||
// consolePrintf("Word: %s, (%d, %d) result: %d\n", word, min, max, result);
|
||||
|
||||
} while (max - min > 0);
|
||||
|
||||
position = min;
|
||||
word = wordBufferPtr[position];
|
||||
//consolePrintf("Final word: %s\n", word);
|
||||
|
||||
|
||||
|
||||
system->setCharactersEntered(strlen(partialWord));
|
||||
|
||||
|
||||
bool match = true;
|
||||
|
||||
|
||||
for (int r = 0; r < strlen(partialWord); r++) {
|
||||
if (word[r] != partialWord[r]) {
|
||||
match = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!match) {
|
||||
position++;
|
||||
if (position == wordBufferPtrPos) return false;
|
||||
word = wordBufferPtr[position];
|
||||
// consolePrintf("Final word: %s\n", word);
|
||||
}
|
||||
|
||||
|
||||
match = true;
|
||||
|
||||
do {
|
||||
|
||||
for (int r = 0; r < strlen(partialWord); r++) {
|
||||
if (word[r] != partialWord[r]) {
|
||||
match = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (match) {
|
||||
system->addAutoComplete(word);
|
||||
}
|
||||
|
||||
position++;
|
||||
if (position < wordBufferPtrPos) {
|
||||
word = wordBufferPtr[position];
|
||||
}
|
||||
|
||||
} while ((match) && (position < wordBufferPtrPos));
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
namespace DS {
|
||||
|
||||
extern void findWordCompletions(char* input);
|
||||
extern bool findWordCompletions(char* input);
|
||||
extern void addAutoCompleteLine(char* line);
|
||||
extern void sortAutoCompleteWordList();
|
||||
|
||||
}
|
|
@ -52,6 +52,7 @@ USE_ZLIB = 1
|
|||
#DISABLE_HQ_SCALERS = 1
|
||||
USE_ARM_SOUND_ASM = 1
|
||||
USE_ARM_SMUSH_ASM = 1
|
||||
USE_ARM_GFX_ASM = 1
|
||||
|
||||
|
||||
########################################################################
|
||||
|
@ -85,10 +86,6 @@ DEFINES += -DNONSTANDARD_PORT
|
|||
DEFINES += -DWIN32
|
||||
DEFINES += -D__stdcall= -Dcdecl= -D__cdecl__= -D__cdecl= -Wno-multichar
|
||||
|
||||
ifdef WINCE_DEBUG_BUILD
|
||||
DEFINES += -DDEBUG -DUSE_WINDBG -g
|
||||
endif
|
||||
|
||||
INCLUDES := -I$(srcdir) -I. -I$(srcdir)/engines -Imissing/gcc -Ilibs/include -Ilibs/include/sdl -ICEgui -ICEkeys -I$(wince_gcc_root)/include
|
||||
|
||||
CFLAGS := -O3 -march=armv4 -mtune=xscale
|
||||
|
@ -98,6 +95,11 @@ CXXFLAGS := $(CFLAGS)
|
|||
LDFLAGS := -Llibs/lib -L$(wince_gcc_root)/lib
|
||||
LIBS := -lSDL
|
||||
|
||||
ifdef WINCE_DEBUG_BUILD
|
||||
DEFINES += -DDEBUG -DUSE_WINDBG -g
|
||||
LDFLAGS += -debug
|
||||
endif
|
||||
|
||||
ifdef USE_ZLIB
|
||||
DEFINES += -DUSE_ZLIB
|
||||
LIBS += -lzlib
|
||||
|
@ -129,8 +131,12 @@ DEFINES += -DUSE_FLAC
|
|||
LIBS += -lFLAC
|
||||
endif
|
||||
|
||||
ifdef USE_ARM_SMUSH
|
||||
DEFINES += -DUSE_ARM_SMUSH
|
||||
ifdef USE_ARM_SMUSH_ASM
|
||||
DEFINES += -DUSE_ARM_SMUSH_ASM
|
||||
endif
|
||||
|
||||
ifdef USE_ARM_GFX_ASM
|
||||
DEFINES += -DUSE_ARM_GFX_ASM
|
||||
endif
|
||||
|
||||
LIBS += --entry WinMainCRTStartup
|
||||
|
|
|
@ -131,6 +131,9 @@ public:
|
|||
#ifndef DISABLE_CRUISE
|
||||
LINK_PLUGIN(CRUISE)
|
||||
#endif
|
||||
#ifndef DISABLE_DRASCULA
|
||||
LINK_PLUGIN(DRASCULA)
|
||||
#endif
|
||||
|
||||
return pl;
|
||||
}
|
||||
|
|
|
@ -30,8 +30,6 @@
|
|||
#include "common/scummsys.h"
|
||||
#include "common/str.h"
|
||||
#include "common/stream.h"
|
||||
#include "backends/file/base-file.h"
|
||||
//#include "backends/factories/fs-factory-maker.cpp"
|
||||
|
||||
class FilesystemNode;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace Common {
|
|||
* Simple double linked list, modeled after the list template of the standard
|
||||
* C++ library.
|
||||
*/
|
||||
template <class T>
|
||||
template <class t_T>
|
||||
class List {
|
||||
protected:
|
||||
#if defined (_WIN32_WCE) || defined (_MSC_VER)
|
||||
|
@ -45,16 +45,16 @@ public:
|
|||
NodeBase *_next;
|
||||
};
|
||||
|
||||
template <class T2>
|
||||
template <class t_T2>
|
||||
struct Node : public NodeBase {
|
||||
T2 _data;
|
||||
t_T2 _data;
|
||||
|
||||
Node(const T2 &x) : _data(x) {}
|
||||
Node(const t_T2 &x) : _data(x) {}
|
||||
};
|
||||
|
||||
template <class T2>
|
||||
template <class t_T2>
|
||||
class Iterator {
|
||||
friend class List<T>;
|
||||
friend class List<t_T>;
|
||||
NodeBase *_node;
|
||||
|
||||
#if !defined (__WINSCW__)
|
||||
|
@ -67,46 +67,46 @@ public:
|
|||
Iterator() : _node(0) {}
|
||||
|
||||
// Prefix inc
|
||||
Iterator<T2> &operator++() {
|
||||
Iterator<t_T2> &operator++() {
|
||||
if (_node)
|
||||
_node = _node->_next;
|
||||
return *this;
|
||||
}
|
||||
// Postfix inc
|
||||
Iterator<T2> operator++(int) {
|
||||
Iterator<t_T2> operator++(int) {
|
||||
Iterator tmp(_node);
|
||||
++(*this);
|
||||
return tmp;
|
||||
}
|
||||
// Prefix dec
|
||||
Iterator<T2> &operator--() {
|
||||
Iterator<t_T2> &operator--() {
|
||||
if (_node)
|
||||
_node = _node->_prev;
|
||||
return *this;
|
||||
}
|
||||
// Postfix dec
|
||||
Iterator<T2> operator--(int) {
|
||||
Iterator<t_T2> operator--(int) {
|
||||
Iterator tmp(_node);
|
||||
--(*this);
|
||||
return tmp;
|
||||
}
|
||||
T2& operator*() const {
|
||||
t_T2& operator*() const {
|
||||
assert(_node);
|
||||
#if (__GNUC__ == 2) && (__GNUC_MINOR__ >= 95)
|
||||
return static_cast<List<T>::Node<T2> *>(_node)->_data;
|
||||
return static_cast<List<t_T>::Node<t_T2> *>(_node)->_data;
|
||||
#else
|
||||
return static_cast<Node<T2>*>(_node)->_data;
|
||||
return static_cast<Node<t_T2>*>(_node)->_data;
|
||||
#endif
|
||||
}
|
||||
T2* operator->() const {
|
||||
t_T2* operator->() const {
|
||||
return &(operator*());
|
||||
}
|
||||
|
||||
bool operator==(const Iterator<T2>& x) const {
|
||||
bool operator==(const Iterator<t_T2>& x) const {
|
||||
return _node == x._node;
|
||||
}
|
||||
|
||||
bool operator!=(const Iterator<T2>& x) const {
|
||||
bool operator!=(const Iterator<t_T2>& x) const {
|
||||
return _node != x._node;
|
||||
}
|
||||
};
|
||||
|
@ -114,10 +114,10 @@ public:
|
|||
NodeBase *_anchor;
|
||||
|
||||
public:
|
||||
typedef Iterator<T> iterator;
|
||||
typedef Iterator<const T> const_iterator;
|
||||
typedef Iterator<t_T> iterator;
|
||||
typedef Iterator<const t_T> const_iterator;
|
||||
|
||||
typedef T value_type;
|
||||
typedef t_T value_type;
|
||||
|
||||
public:
|
||||
List() {
|
||||
|
@ -125,7 +125,7 @@ public:
|
|||
_anchor->_prev = _anchor;
|
||||
_anchor->_next = _anchor;
|
||||
}
|
||||
List(const List<T>& list) {
|
||||
List(const List<t_T>& list) {
|
||||
_anchor = new NodeBase;
|
||||
_anchor->_prev = _anchor;
|
||||
_anchor->_next = _anchor;
|
||||
|
@ -138,16 +138,16 @@ public:
|
|||
delete _anchor;
|
||||
}
|
||||
|
||||
void push_front(const T& element) {
|
||||
void push_front(const t_T& element) {
|
||||
insert(begin(), element);
|
||||
}
|
||||
|
||||
void push_back(const T& element) {
|
||||
void push_back(const t_T& element) {
|
||||
insert(end(), element);
|
||||
}
|
||||
|
||||
void insert(iterator pos, const T& element) {
|
||||
NodeBase *newNode = new Node<T>(element);
|
||||
void insert(iterator pos, const t_T& element) {
|
||||
NodeBase *newNode = new Node<t_T>(element);
|
||||
|
||||
newNode->_next = pos._node;
|
||||
newNode->_prev = pos._node->_prev;
|
||||
|
@ -166,7 +166,7 @@ public:
|
|||
|
||||
NodeBase *next = pos._node->_next;
|
||||
NodeBase *prev = pos._node->_prev;
|
||||
Node<T> *node = static_cast<Node<T> *>(pos._node);
|
||||
Node<t_T> *node = static_cast<Node<t_T> *>(pos._node);
|
||||
prev->_next = next;
|
||||
next->_prev = prev;
|
||||
delete node;
|
||||
|
@ -178,7 +178,7 @@ public:
|
|||
|
||||
NodeBase *next = pos._node->_next;
|
||||
NodeBase *prev = pos._node->_prev;
|
||||
Node<T> *node = static_cast<Node<T> *>(pos._node);
|
||||
Node<t_T> *node = static_cast<Node<t_T> *>(pos._node);
|
||||
prev->_next = next;
|
||||
next->_prev = prev;
|
||||
delete node;
|
||||
|
@ -192,7 +192,7 @@ public:
|
|||
return last;
|
||||
}
|
||||
|
||||
void remove(const T &val) {
|
||||
void remove(const t_T &val) {
|
||||
iterator i = begin();
|
||||
while (i != end())
|
||||
if (val == i.operator*())
|
||||
|
@ -202,13 +202,13 @@ public:
|
|||
}
|
||||
|
||||
|
||||
List<T>& operator =(const List<T>& list) {
|
||||
List<t_T>& operator =(const List<t_T>& list) {
|
||||
if (this != &list) {
|
||||
iterator i;
|
||||
const_iterator j;
|
||||
|
||||
for (i = begin(), j = list.begin(); (i != end()) && (j != list.end()) ; ++i, ++j) {
|
||||
static_cast<Node<T> *>(i._node)->_data = static_cast<Node<T> *>(j._node)->_data;
|
||||
static_cast<Node<t_T> *>(i._node)->_data = static_cast<Node<t_T> *>(j._node)->_data;
|
||||
}
|
||||
|
||||
if (i == end())
|
||||
|
|
|
@ -592,3 +592,16 @@ void CDECL warning(const char *s, ...) {
|
|||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
char *scumm_strrev(char *str) {
|
||||
if (!str)
|
||||
return str;
|
||||
int len = strlen(str);
|
||||
if (len < 2)
|
||||
return str;
|
||||
char *p1, *p2;
|
||||
for (p1 = str, p2 = str + len - 1; p1 < p2; p1++, p2--) {
|
||||
SWAP(*p1, *p2);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
|
@ -289,5 +289,6 @@ void CDECL debugC(int level, uint32 engine_level, const char *s, ...) GCC_PRINTF
|
|||
|
||||
extern int gDebugLevel;
|
||||
|
||||
char *scumm_strrev(char *str);
|
||||
|
||||
#endif
|
||||
|
|
7
configure
vendored
7
configure
vendored
|
@ -63,6 +63,7 @@ _build_agi=yes
|
|||
_build_touche=yes
|
||||
_build_parallaction=yes
|
||||
_build_cruise=no
|
||||
_build_drascula=no
|
||||
_build_hq_scalers=yes
|
||||
_build_scalers=yes
|
||||
|
||||
|
@ -353,6 +354,7 @@ Optional Features:
|
|||
--disable-agos don't build the AGOS engine
|
||||
--disable-cine don't build the Cinematique engine evo 1
|
||||
--enable-cruise build the Cruise for a Corpse engine
|
||||
--enable-drascula build the Drascula: The Vampire Strikes Back engine
|
||||
--disable-gob don't build the Gobli*ns engine
|
||||
--disable-kyra don't build the Legend of Kyrandia engine
|
||||
--enable-lure build the Lure of the Temptress engine
|
||||
|
@ -438,6 +440,7 @@ for ac_option in $@; do
|
|||
--disable-touche) _build_touche=no ;;
|
||||
--disable-parallaction) _build_parallaction=no ;;
|
||||
--enable-cruise) _build_cruise=yes ;;
|
||||
--enable-drascula) _build_drascula=yes ;;
|
||||
--disable-hq-scalers) _build_hq_scalers=no ;;
|
||||
--disable-scalers) _build_scalers=no ;;
|
||||
--enable-alsa) _alsa=yes ;;
|
||||
|
@ -730,6 +733,7 @@ add_to_config_mk_if_no $_build_agi 'DISABLE_AGI = 1'
|
|||
add_to_config_mk_if_no $_build_touche 'DISABLE_TOUCHE = 1'
|
||||
add_to_config_mk_if_no $_build_parallaction 'DISABLE_PARALLACTION = 1'
|
||||
add_to_config_mk_if_no $_build_cruise 'DISABLE_CRUISE = 1'
|
||||
add_to_config_mk_if_no $_build_drascula 'DISABLE_DRASCULA = 1'
|
||||
add_to_config_mk_if_no $_build_hq_scalers 'DISABLE_HQ_SCALERS = 1'
|
||||
add_to_config_mk_if_no $_build_scalers 'DISABLE_SCALERS = 1'
|
||||
|
||||
|
@ -1388,6 +1392,9 @@ fi
|
|||
if test "$_build_cruise" = yes ; then
|
||||
echo " Cinematique evo 2"
|
||||
fi
|
||||
if test "$_build_drascula" = yes ; then
|
||||
echo " Drascula"
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
|
|
125
dists/msvc71/drascula.vcproj
Normal file
125
dists/msvc71/drascula.vcproj
Normal file
|
@ -0,0 +1,125 @@
|
|||
<?xml version="1.0" encoding="windows-1250"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="drascula"
|
||||
ProjectGUID="{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="drascula_Debug"
|
||||
IntermediateDirectory="drascula_Debug"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../..;../../engines"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS"
|
||||
MinimalRebuild="TRUE"
|
||||
ExceptionHandling="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="TRUE"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/drascula.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="drascula_Release"
|
||||
IntermediateDirectory="drascula_Release"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories="../..;../../engines"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="FALSE"
|
||||
EnableFunctionLevelLinking="FALSE"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
DebugInformationFormat="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/drascula.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\..\engines\drascula\detection.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\drascula\drascula.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\drascula\drascula.h">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -115,18 +115,6 @@
|
|||
<File
|
||||
RelativePath="..\..\engines\lure\animseq.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\lure\debug-input.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\lure\debug-input.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\lure\debug-methods.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\lure\debug-methods.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\lure\debugger.cpp">
|
||||
</File>
|
||||
|
@ -154,6 +142,12 @@
|
|||
<File
|
||||
RelativePath="..\..\engines\lure\events.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\lure\fights.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\lure\fights.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\lure\game.cpp">
|
||||
</File>
|
||||
|
@ -229,6 +223,12 @@
|
|||
<File
|
||||
RelativePath="..\..\engines\lure\scripts.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\lure\sound.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\lure\sound.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\lure\strings.cpp">
|
||||
</File>
|
||||
|
|
|
@ -15,6 +15,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scummvm", "scummvm.vcproj",
|
|||
{0068957B-E2E1-4988-8C87-D541D84DAF20} = {0068957B-E2E1-4988-8C87-D541D84DAF20}
|
||||
{9D9A98A0-F88F-4CA2-B8FF-462470EBE3EC} = {9D9A98A0-F88F-4CA2-B8FF-462470EBE3EC}
|
||||
{676DB4C5-9A3E-4EE1-8483-EBB79DC0700E} = {676DB4C5-9A3E-4EE1-8483-EBB79DC0700E}
|
||||
{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3} = {CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}
|
||||
{15DF71E6-ECA9-45ED-8049-1CD7C987CCFE} = {15DF71E6-ECA9-45ED-8049-1CD7C987CCFE}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -78,6 +79,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cruise", "cruise.vcproj", "
|
|||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "drascula", "drascula.vcproj", "{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
|
@ -150,6 +155,10 @@ Global
|
|||
{CD9AEE36-CEBD-40CE-A6B3-B71523AB8DEC}.Debug.Build.0 = Debug|Win32
|
||||
{CD9AEE36-CEBD-40CE-A6B3-B71523AB8DEC}.Release.ActiveCfg = Release|Win32
|
||||
{CD9AEE36-CEBD-40CE-A6B3-B71523AB8DEC}.Release.Build.0 = Release|Win32
|
||||
{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Debug.ActiveCfg = Debug|Win32
|
||||
{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Debug.Build.0 = Debug|Win32
|
||||
{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Release.ActiveCfg = Release|Win32
|
||||
{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/scummvm.pdb"
|
||||
SubSystem="1"
|
||||
EntryPointSymbol="WinMainCRTStartup"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
|
@ -106,6 +107,7 @@
|
|||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
EntryPointSymbol="WinMainCRTStartup"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
|
@ -208,6 +210,9 @@
|
|||
<File
|
||||
RelativePath="..\..\common\file.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\common\frac.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\common\fs.cpp">
|
||||
</File>
|
||||
|
@ -229,6 +234,9 @@
|
|||
<File
|
||||
RelativePath="..\..\common\iff_container.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\common\keyboard.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\common\list.h">
|
||||
</File>
|
||||
|
|
182
dists/msvc8/drascula.vcproj
Normal file
182
dists/msvc8/drascula.vcproj
Normal file
|
@ -0,0 +1,182 @@
|
|||
<?xml version="1.0" encoding="windows-1250"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Name="drascula"
|
||||
ProjectGUID="{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}"
|
||||
RootNamespace="drascula"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="drascula_Debug"
|
||||
IntermediateDirectory="drascula_Debug"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702 /wd4996"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../..;../../engines"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS"
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="1"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
EnableFunctionLevelLinking="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
WarnAsError="false"
|
||||
SuppressStartupBanner="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/drascula.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="drascula_Release"
|
||||
IntermediateDirectory="drascula_Release"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702 /wd4996"
|
||||
Optimization="3"
|
||||
InlineFunctionExpansion="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="../../;../../engines"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="false"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
WarnAsError="true"
|
||||
DebugInformationFormat="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/drascula.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\..\engines\drascula\detection.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\drascula\drascula.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\drascula\drascula.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\drascula\texts.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -168,6 +168,14 @@
|
|||
RelativePath="..\..\engines\gob\cdrom.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\gob\coktelvideo.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\gob\coktelvideo.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\gob\dataio.cpp"
|
||||
>
|
||||
|
@ -260,14 +268,6 @@
|
|||
RelativePath="..\..\engines\gob\goblin_v3.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\gob\imd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\gob\imd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\gob\init.cpp"
|
||||
>
|
||||
|
@ -312,6 +312,10 @@
|
|||
RelativePath="..\..\engines\gob\inter_v3.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\gob\inter_v4.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\gob\map.cpp"
|
||||
>
|
||||
|
@ -440,6 +444,14 @@
|
|||
RelativePath="..\..\engines\gob\video_v2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\gob\videoplayer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\gob\videoplayer.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
|
|
@ -161,11 +161,15 @@
|
|||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\animator.cpp"
|
||||
RelativePath="..\..\engines\kyra\animator_v1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\animator.h"
|
||||
RelativePath="..\..\engines\kyra\animator_v1.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\animator_v2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -181,11 +185,19 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\gui.cpp"
|
||||
RelativePath="..\..\engines\kyra\gui_v1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\items.cpp"
|
||||
RelativePath="..\..\engines\kyra\gui_v2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\items_v1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\items_v2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -229,13 +241,21 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\saveload.cpp"
|
||||
RelativePath="..\..\engines\kyra\saveload_v1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\scene.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\scene_v1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\scene_v2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\screen.cpp"
|
||||
>
|
||||
|
@ -244,6 +264,22 @@
|
|||
RelativePath="..\..\engines\kyra\screen.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\screen_v1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\screen_v1.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\screen_v2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\screen_v2.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\script.cpp"
|
||||
>
|
||||
|
@ -256,6 +292,10 @@
|
|||
RelativePath="..\..\engines\kyra\script_v1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\script_v2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\seqplayer.cpp"
|
||||
>
|
||||
|
@ -292,6 +332,10 @@
|
|||
RelativePath="..\..\engines\kyra\sound_towns.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\sound_v1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\sprites.cpp"
|
||||
>
|
||||
|
@ -312,10 +356,30 @@
|
|||
RelativePath="..\..\engines\kyra\text.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\text_v1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\timer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\timer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\timer_v1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\timer_v2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\util.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\kyra\vqa.cpp"
|
||||
>
|
||||
|
|
|
@ -165,11 +165,11 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\parallaction\archive.cpp"
|
||||
RelativePath="..\..\engines\parallaction\callables_br.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\parallaction\callables.cpp"
|
||||
RelativePath="..\..\engines\parallaction\callables_ns.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -201,11 +201,15 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\parallaction\disk.cpp"
|
||||
RelativePath="..\..\engines\parallaction\disk.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\parallaction\disk.h"
|
||||
RelativePath="..\..\engines\parallaction\disk_br.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\parallaction\disk_ns.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -220,10 +224,6 @@
|
|||
RelativePath="..\..\engines\parallaction\graphics.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\parallaction\intro.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\parallaction\inventory.cpp"
|
||||
>
|
||||
|
@ -252,6 +252,14 @@
|
|||
RelativePath="..\..\engines\parallaction\parallaction.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\parallaction\parallaction_br.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\parallaction\parallaction_ns.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engines\parallaction\parser.cpp"
|
||||
>
|
||||
|
|
|
@ -3,20 +3,21 @@ Microsoft Visual Studio Solution File, Format Version 9.00
|
|||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scummvm", "scummvm.vcproj", "{8434CB15-D08F-427D-9E6D-581AE5B28440}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6CC3E421-779D-4E80-8100-520886A0F9FF} = {6CC3E421-779D-4E80-8100-520886A0F9FF}
|
||||
{1A1CA028-61B5-4A6C-A918-F5D8721AB1AC} = {1A1CA028-61B5-4A6C-A918-F5D8721AB1AC}
|
||||
{0068957B-E2E1-4988-8C87-D541D84DAF20} = {0068957B-E2E1-4988-8C87-D541D84DAF20}
|
||||
{8863B00B-059A-471E-876D-A955ECEFD0D2} = {8863B00B-059A-471E-876D-A955ECEFD0D2}
|
||||
{676DB4C5-9A3E-4EE1-8483-EBB79DC0700E} = {676DB4C5-9A3E-4EE1-8483-EBB79DC0700E}
|
||||
{9D9A98A0-F88F-4CA2-B8FF-462470EBE3EC} = {9D9A98A0-F88F-4CA2-B8FF-462470EBE3EC}
|
||||
{976D947A-A45F-4437-991E-412F695C64C7} = {976D947A-A45F-4437-991E-412F695C64C7}
|
||||
{E0EC9C72-A33E-49DA-B1DC-BB44B9799BFA} = {E0EC9C72-A33E-49DA-B1DC-BB44B9799BFA}
|
||||
{F5F57066-CDF4-4F80-B9E7-7F4D21850D6E} = {F5F57066-CDF4-4F80-B9E7-7F4D21850D6E}
|
||||
{6A55AF61-7CA1-49E0-9385-59C1FE9D4DB7} = {6A55AF61-7CA1-49E0-9385-59C1FE9D4DB7}
|
||||
{B5527758-2F51-4CCD-AAE1-B0E28654BD6A} = {B5527758-2F51-4CCD-AAE1-B0E28654BD6A}
|
||||
{D4986356-D0BB-4981-924A-854157BDF11F} = {D4986356-D0BB-4981-924A-854157BDF11F}
|
||||
{1CA4AC50-5426-433A-8B5E-FFE39568098E} = {1CA4AC50-5426-433A-8B5E-FFE39568098E}
|
||||
{B6AFD548-63D2-40CD-A652-E87095AFCBAF} = {B6AFD548-63D2-40CD-A652-E87095AFCBAF}
|
||||
{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3} = {CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}
|
||||
{C8AAE83E-198B-4ECA-A877-166827953979} = {C8AAE83E-198B-4ECA-A877-166827953979}
|
||||
{B6AFD548-63D2-40CD-A652-E87095AFCBAF} = {B6AFD548-63D2-40CD-A652-E87095AFCBAF}
|
||||
{1CA4AC50-5426-433A-8B5E-FFE39568098E} = {1CA4AC50-5426-433A-8B5E-FFE39568098E}
|
||||
{D4986356-D0BB-4981-924A-854157BDF11F} = {D4986356-D0BB-4981-924A-854157BDF11F}
|
||||
{B5527758-2F51-4CCD-AAE1-B0E28654BD6A} = {B5527758-2F51-4CCD-AAE1-B0E28654BD6A}
|
||||
{6A55AF61-7CA1-49E0-9385-59C1FE9D4DB7} = {6A55AF61-7CA1-49E0-9385-59C1FE9D4DB7}
|
||||
{F5F57066-CDF4-4F80-B9E7-7F4D21850D6E} = {F5F57066-CDF4-4F80-B9E7-7F4D21850D6E}
|
||||
{E0EC9C72-A33E-49DA-B1DC-BB44B9799BFA} = {E0EC9C72-A33E-49DA-B1DC-BB44B9799BFA}
|
||||
{976D947A-A45F-4437-991E-412F695C64C7} = {976D947A-A45F-4437-991E-412F695C64C7}
|
||||
{9D9A98A0-F88F-4CA2-B8FF-462470EBE3EC} = {9D9A98A0-F88F-4CA2-B8FF-462470EBE3EC}
|
||||
{676DB4C5-9A3E-4EE1-8483-EBB79DC0700E} = {676DB4C5-9A3E-4EE1-8483-EBB79DC0700E}
|
||||
{8863B00B-059A-471E-876D-A955ECEFD0D2} = {8863B00B-059A-471E-876D-A955ECEFD0D2}
|
||||
{0068957B-E2E1-4988-8C87-D541D84DAF20} = {0068957B-E2E1-4988-8C87-D541D84DAF20}
|
||||
{1A1CA028-61B5-4A6C-A918-F5D8721AB1AC} = {1A1CA028-61B5-4A6C-A918-F5D8721AB1AC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sword2", "sword2.vcproj", "{6CC3E421-779D-4E80-8100-520886A0F9FF}"
|
||||
|
@ -49,6 +50,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parallaction", "parallactio
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cruise", "cruise.vcproj", "{8863B00B-059A-471E-876D-A955ECEFD0D2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "drascula", "drascula.vcproj", "{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
|
@ -119,6 +122,10 @@ Global
|
|||
{8863B00B-059A-471E-876D-A955ECEFD0D2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8863B00B-059A-471E-876D-A955ECEFD0D2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8863B00B-059A-471E-876D-A955ECEFD0D2}.Release|Win32.Build.0 = Release|Win32
|
||||
{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib sdl.lib zlib.lib libmad.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib libmpeg2.lib sword1_debug/sword1.lib sword2_debug/sword2.lib lure_debug/lure.lib cine_debug/cine.lib cruise_debug/cruise.lib kyra_debug/kyra.lib gob_debug/gob.lib queen_debug/queen.lib saga_debug/saga.lib agi_debug/agi.lib scumm_debug/scumm.lib agos_debug/agos.lib sky_debug/sky.lib parallaction_debug/parallaction.lib"
|
||||
AdditionalDependencies="winmm.lib sdl.lib zlib.lib libmad.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib libmpeg2.lib sword1_debug/sword1.lib sword2_debug/sword2.lib lure_debug/lure.lib cine_debug/cine.lib cruise_debug/cruise.lib kyra_debug/kyra.lib gob_debug/gob.lib queen_debug/queen.lib saga_debug/saga.lib agi_debug/agi.lib scumm_debug/scumm.lib agos_debug/agos.lib drascula_debug/drascula.lib sky_debug/sky.lib parallaction_debug/parallaction.lib"
|
||||
OutputFile="$(OutDir)/scummvm.exe"
|
||||
LinkIncremental="2"
|
||||
IgnoreDefaultLibraryNames="libc.lib;libcmt.lib"
|
||||
|
@ -158,7 +158,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib sdl.lib zlib.lib libmad.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib libmpeg2.lib saga_release/saga.lib agi_release/agi.lib sword1_release/sword1.lib sword2_release/sword2.lib lure_release/lure.lib cine_release/cine.lib cruise_release/cruise.lib kyra_release/kyra.lib gob_release/gob.lib queen_release/queen.lib scumm_release/scumm.lib agos_release/agos.lib sky_release/sky.lib parallaction_release/parallaction.lib"
|
||||
AdditionalDependencies="winmm.lib sdl.lib zlib.lib libmad.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib libmpeg2.lib saga_release/saga.lib agi_release/agi.lib sword1_release/sword1.lib sword2_release/sword2.lib lure_release/lure.lib cine_release/cine.lib cruise_release/cruise.lib kyra_release/kyra.lib gob_release/gob.lib queen_release/queen.lib scumm_release/scumm.lib agos_release/agos.lib sky_release/sky.lib drascula_release/drascula.lib parallaction_release/parallaction.lib"
|
||||
OutputFile="$(OutDir)/scummvm.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
|
|
|
@ -178,7 +178,7 @@ void AgiEngine::processEvents() {
|
|||
case Common::KEYCODE_MINUS:
|
||||
key = '-';
|
||||
break;
|
||||
case Common::KEYCODE_9:
|
||||
case Common::KEYCODE_TAB:
|
||||
key = 0x0009;
|
||||
break;
|
||||
case Common::KEYCODE_F1:
|
||||
|
@ -448,6 +448,12 @@ int AgiEngine::agiInit() {
|
|||
loadGame(saveNameBuffer, false); // Do not check game id
|
||||
}
|
||||
|
||||
#ifdef __DS__
|
||||
// Normally, the engine loads the predictive text dictionary when the predictive dialog
|
||||
// is shown. On the DS version, the word completion feature needs the dictionary too.
|
||||
loadDict();
|
||||
#endif
|
||||
|
||||
return ec;
|
||||
}
|
||||
|
||||
|
@ -535,6 +541,67 @@ static const GameSettings agiSettings[] = {
|
|||
{NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
AgiTextColor AgiButtonStyle::getColor(bool hasFocus, bool pressed, bool positive) const {
|
||||
if (_amigaStyle) {
|
||||
if (positive) {
|
||||
if (pressed) { // Positive pressed Amiga-style button
|
||||
if (_olderAgi) {
|
||||
return AgiTextColor(amigaBlack, amigaOrange);
|
||||
} else {
|
||||
return AgiTextColor(amigaBlack, amigaPurple);
|
||||
}
|
||||
} else { // Positive unpressed Amiga-style button
|
||||
return AgiTextColor(amigaWhite, amigaGreen);
|
||||
}
|
||||
} else { // _amigaStyle && !positive
|
||||
if (pressed) { // Negative pressed Amiga-style button
|
||||
return AgiTextColor(amigaBlack, amigaCyan);
|
||||
} else { // Negative unpressed Amiga-style button
|
||||
return AgiTextColor(amigaWhite, amigaRed);
|
||||
}
|
||||
}
|
||||
} else { // PC-style button
|
||||
if (hasFocus || pressed) { // A pressed or in focus PC-style button
|
||||
return AgiTextColor(pcWhite, pcBlack);
|
||||
} else { // An unpressed PC-style button without focus
|
||||
return AgiTextColor(pcBlack, pcWhite);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AgiTextColor AgiButtonStyle::getColor(bool hasFocus, bool pressed, int baseFgColor, int baseBgColor) const {
|
||||
return getColor(hasFocus, pressed, AgiTextColor(baseFgColor, baseBgColor));
|
||||
}
|
||||
|
||||
AgiTextColor AgiButtonStyle::getColor(bool hasFocus, bool pressed, const AgiTextColor &baseColor) const {
|
||||
if (hasFocus || pressed)
|
||||
return baseColor.swap();
|
||||
else
|
||||
return baseColor;
|
||||
}
|
||||
|
||||
int AgiButtonStyle::getTextOffset(bool hasFocus, bool pressed) const {
|
||||
return (pressed && !_amigaStyle) ? 1 : 0;
|
||||
}
|
||||
|
||||
bool AgiButtonStyle::getBorder(bool hasFocus, bool pressed) const {
|
||||
return _amigaStyle && !_authenticAmiga && (hasFocus || pressed);
|
||||
}
|
||||
|
||||
void AgiButtonStyle::setAmigaStyle(bool amigaStyle, bool olderAgi, bool authenticAmiga) {
|
||||
_amigaStyle = amigaStyle;
|
||||
_olderAgi = olderAgi;
|
||||
_authenticAmiga = authenticAmiga;
|
||||
}
|
||||
|
||||
void AgiButtonStyle::setPcStyle(bool pcStyle) {
|
||||
setAmigaStyle(!pcStyle);
|
||||
}
|
||||
|
||||
AgiButtonStyle::AgiButtonStyle(Common::RenderMode renderMode) {
|
||||
setAmigaStyle(renderMode == Common::kRenderAmiga);
|
||||
}
|
||||
|
||||
AgiEngine::AgiEngine(OSystem *syst) : Engine(syst) {
|
||||
|
||||
// Setup mixer
|
||||
|
@ -635,6 +702,8 @@ void AgiEngine::initialize() {
|
|||
}
|
||||
}
|
||||
|
||||
_buttonStyle = AgiButtonStyle(_renderMode);
|
||||
_defaultButtonStyle = AgiButtonStyle();
|
||||
_console = new Console(this);
|
||||
_gfx = new GfxMgr(this);
|
||||
_sound = new SoundMgr(this, _mixer);
|
||||
|
@ -676,6 +745,13 @@ void AgiEngine::initialize() {
|
|||
}
|
||||
|
||||
AgiEngine::~AgiEngine() {
|
||||
// If the engine hasn't been initialized yet via AgiEngine::initialize(), don't attempt to free any resources,
|
||||
// as they haven't been allocated. Fixes bug #1742432 - AGI: Engine crashes if no game is detected
|
||||
if (_game.state == STATE_INIT) {
|
||||
delete _rnd; // delete _rnd, as it is allocated in the constructor, not in initialize()
|
||||
return;
|
||||
}
|
||||
|
||||
agiDeinit();
|
||||
_sound->deinitSound();
|
||||
delete _sound;
|
||||
|
|
|
@ -81,6 +81,7 @@ typedef signed int Err;
|
|||
#define MSG_BOX_COLOUR 0x0f /* White */
|
||||
#define MSG_BOX_TEXT 0x00 /* Black */
|
||||
#define MSG_BOX_LINE 0x04 /* Red */
|
||||
#define BUTTON_BORDER 0x00 /* Black */
|
||||
#define STATUS_FG 0x00 /* Black */
|
||||
#define STATUS_BG 0x0f /* White */
|
||||
|
||||
|
@ -110,7 +111,9 @@ enum AgiGameFeatures {
|
|||
GF_AGI256_2 = (1 << 3),
|
||||
GF_AGIPAL = (1 << 4),
|
||||
GF_MACGOLDRUSH = (1 << 5),
|
||||
GF_FANMADE = (1 << 6)
|
||||
GF_FANMADE = (1 << 6),
|
||||
GF_MENUS = (1 << 7),
|
||||
GF_ESCPAUSE = (1 << 8)
|
||||
};
|
||||
|
||||
enum AgiGameID {
|
||||
|
@ -153,6 +156,7 @@ enum AGIErrors {
|
|||
errNoLoopsInView,
|
||||
errViewDataError,
|
||||
errNoGameList,
|
||||
errIOError,
|
||||
|
||||
errUnk = 127
|
||||
};
|
||||
|
@ -317,6 +321,118 @@ struct AgiBlock {
|
|||
uint8 *buffer; /* used for window background */
|
||||
};
|
||||
|
||||
/** AGI text color (Background and foreground color). */
|
||||
struct AgiTextColor {
|
||||
/** Creates an AGI text color. Uses black text on white background by default. */
|
||||
AgiTextColor(int fgColor = 0x00, int bgColor = 0x0F) : fg(fgColor), bg(bgColor) {}
|
||||
|
||||
/** Get an AGI text color with swapped foreground and background color. */
|
||||
AgiTextColor swap() const { return AgiTextColor(bg, fg); }
|
||||
|
||||
int fg; ///< Foreground color (Used for text).
|
||||
int bg; ///< Background color (Used for text's background).
|
||||
};
|
||||
|
||||
/**
|
||||
* AGI button style (Amiga or PC).
|
||||
*
|
||||
* Supports positive and negative button types (Used with Amiga-style only):
|
||||
* Positive buttons do what the dialog was opened for.
|
||||
* Negative buttons cancel what the dialog was opened for.
|
||||
* Restart-dialog example: Restart-button is positive, Cancel-button negative.
|
||||
* Paused-dialog example: Continue-button is positive.
|
||||
*/
|
||||
struct AgiButtonStyle {
|
||||
// Public constants etc
|
||||
public:
|
||||
static const int
|
||||
// Amiga colors (Indexes into the Amiga-ish palette)
|
||||
amigaBlack = 0x00, ///< Accurate, is #000000 (24-bit RGB)
|
||||
amigaWhite = 0x0F, ///< Practically accurate, is close to #FFFFFF (24-bit RGB)
|
||||
amigaGreen = 0x02, ///< Quite accurate, should be #008A00 (24-bit RGB)
|
||||
amigaOrange = 0x0C, ///< Inaccurate, too much blue, should be #FF7500 (24-bit RGB)
|
||||
amigaPurple = 0x0D, ///< Inaccurate, too much green, should be #FF00FF (24-bit RGB)
|
||||
amigaRed = 0x04, ///< Quite accurate, should be #BD0000 (24-bit RGB)
|
||||
amigaCyan = 0x0B, ///< Inaccurate, too much red, should be #00FFDE (24-bit RGB)
|
||||
// PC colors (Indexes into the EGA-palette)
|
||||
pcBlack = 0x00,
|
||||
pcWhite = 0x0F;
|
||||
|
||||
// Public methods
|
||||
public:
|
||||
/**
|
||||
* Get the color of the button with the given state and type using current style.
|
||||
*
|
||||
* @param hasFocus True if button has focus, false otherwise.
|
||||
* @param pressed True if button is being pressed, false otherwise.
|
||||
* @param positive True if button is positive, false if button is negative. Only matters for Amiga-style buttons.
|
||||
*/
|
||||
AgiTextColor getColor(bool hasFocus, bool pressed, bool positive = true) const;
|
||||
|
||||
/**
|
||||
* Get the color of a button with the given base color and state ignoring current style.
|
||||
* Swaps foreground and background color when the button has focus or is being pressed.
|
||||
*
|
||||
* @param hasFocus True if button has focus, false otherwise.
|
||||
* @param pressed True if button is being pressed, false otherwise.
|
||||
* @param baseFgColor Foreground color of the button when it has no focus and is not being pressed.
|
||||
* @param baseBgColor Background color of the button when it has no focus and is not being pressed.
|
||||
*/
|
||||
AgiTextColor getColor(bool hasFocus, bool pressed, int baseFgColor, int baseBgColor) const;
|
||||
|
||||
/**
|
||||
* Get the color of a button with the given base color and state ignoring current style.
|
||||
* Swaps foreground and background color when the button has focus or is being pressed.
|
||||
*
|
||||
* @param hasFocus True if button has focus, false otherwise.
|
||||
* @param pressed True if button is being pressed, false otherwise.
|
||||
* @param baseColor Color of the button when it has no focus and is not being pressed.
|
||||
*/
|
||||
AgiTextColor getColor(bool hasFocus, bool pressed, const AgiTextColor &baseColor) const;
|
||||
|
||||
/**
|
||||
* How many pixels to offset the shown text diagonally down and to the right.
|
||||
* Currently only used for pressed PC-style buttons.
|
||||
*/
|
||||
int getTextOffset(bool hasFocus, bool pressed) const;
|
||||
|
||||
/**
|
||||
* Show border around the button?
|
||||
* Currently border is only used for in focus or pressed Amiga-style buttons
|
||||
* when in inauthentic Amiga-style mode.
|
||||
*/
|
||||
bool getBorder(bool hasFocus, bool pressed) const;
|
||||
|
||||
/**
|
||||
* Set Amiga-button style.
|
||||
*
|
||||
* @param amigaStyle Set Amiga-button style if true, otherwise set PC-button style.
|
||||
* @param olderAgi If true then use older AGI style in Amiga-mode, otherwise use newer.
|
||||
* @param authenticAmiga If true then don't use a border around buttons in Amiga-mode, otherwise use.
|
||||
*/
|
||||
void setAmigaStyle(bool amigaStyle = true, bool olderAgi = false, bool authenticAmiga = false);
|
||||
|
||||
/**
|
||||
* Set PC-button style.
|
||||
* @param pcStyle Set PC-button style if true, otherwise set default Amiga-button style.
|
||||
*/
|
||||
void setPcStyle(bool pcStyle = true);
|
||||
|
||||
// Public constructors
|
||||
public:
|
||||
/**
|
||||
* Create a button style based on the given rendering mode.
|
||||
* @param renderMode If Common::kRenderAmiga then creates default Amiga-button style, otherwise PC-style.
|
||||
*/
|
||||
AgiButtonStyle(Common::RenderMode renderMode = Common::kRenderDefault);
|
||||
|
||||
// Private member variables
|
||||
private:
|
||||
bool _amigaStyle; ///< Use Amiga-style buttons if true, otherwise use PC-style buttons.
|
||||
bool _olderAgi; ///< Use older AGI style in Amiga-style mode.
|
||||
bool _authenticAmiga; ///< Don't use border around buttons in Amiga-style mode.
|
||||
};
|
||||
|
||||
#define EGO_VIEW_TABLE 0
|
||||
#define HORIZON 36
|
||||
#define _WIDTH 160
|
||||
|
@ -594,6 +710,8 @@ public:
|
|||
int _oldMode;
|
||||
|
||||
Menu* _menu;
|
||||
AgiButtonStyle _buttonStyle;
|
||||
AgiButtonStyle _defaultButtonStyle;
|
||||
|
||||
char _lastSentence[40];
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == AGI Demo 1 (PC) 05/87 [AGI 2.425]
|
||||
// AGI Demo 1 (PC) 05/87 [AGI 2.425]
|
||||
{
|
||||
"agidemo",
|
||||
"Demo 1 1987-05-20",
|
||||
|
@ -142,7 +142,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == AGI Demo 2 (IIgs) 1.0C (Censored)
|
||||
// AGI Demo 2 (IIgs) 1.0C (Censored)
|
||||
{
|
||||
"agidemo",
|
||||
"Demo 2 1987-11-24 1.0C",
|
||||
|
@ -159,7 +159,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == AGI Demo 2 (PC 3.5") 11/87 [AGI 2.915]
|
||||
// AGI Demo 2 (PC 3.5") 11/87 [AGI 2.915]
|
||||
{
|
||||
"agidemo",
|
||||
"Demo 2 1987-11-24 3.5\"",
|
||||
|
@ -176,7 +176,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == AGI Demo 2 (PC 5.25") 11/87 [v1] [AGI 2.915]
|
||||
// AGI Demo 2 (PC 5.25") 11/87 [v1] [AGI 2.915]
|
||||
{
|
||||
"agidemo",
|
||||
"Demo 2 1987-11-24 [version 1] 5.25\"",
|
||||
|
@ -193,7 +193,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == AGI Demo 2 (PC 5.25") 01/88 [v2] [AGI 2.917]
|
||||
// AGI Demo 2 (PC 5.25") 01/88 [v2] [AGI 2.917]
|
||||
{
|
||||
"agidemo",
|
||||
"Demo 2 1988-01-25 [version 2] 5.25\"",
|
||||
|
@ -210,7 +210,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == AGI Demo 3 (PC) 09/88 [AGI 3.002.102]
|
||||
// AGI Demo 3 (PC) 09/88 [AGI 3.002.102]
|
||||
{
|
||||
"agidemo",
|
||||
"Demo 3 1988-09-13",
|
||||
|
@ -227,7 +227,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Black Cauldron (Amiga) 2.00 6/14/87
|
||||
// Black Cauldron (Amiga) 2.00 6/14/87
|
||||
{
|
||||
"bc",
|
||||
"2.00 1987-06-14",
|
||||
|
@ -244,7 +244,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Black Cauldron (Apple IIgs) 1.0O 2/24/89 (CE)
|
||||
// Black Cauldron (Apple IIgs) 1.0O 2/24/89 (CE)
|
||||
// Menus not tested
|
||||
{
|
||||
"bc",
|
||||
"1.0O 1989-02-24 (CE)",
|
||||
|
@ -261,7 +262,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Black Cauldron (PC) 2.00 6/14/87 [AGI 2.439]
|
||||
// Black Cauldron (PC) 2.00 6/14/87 [AGI 2.439]
|
||||
{
|
||||
"bc",
|
||||
"2.00 1987-06-14",
|
||||
|
@ -278,7 +279,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Black Cauldron (PC 5.25") 2.10 11/10/88 [AGI 3.002.098]
|
||||
// Black Cauldron (PC 5.25") 2.10 11/10/88 [AGI 3.002.098]
|
||||
{
|
||||
"bc",
|
||||
"2.10 1988-11-10 5.25\"",
|
||||
|
@ -297,7 +298,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
// These aren't supposed to work now as they require unsupported agi engine 2.01
|
||||
#if 0
|
||||
{
|
||||
// Sarien Name == Donald Duck's Playground (Amiga) 1.0C
|
||||
// Donald Duck's Playground (Amiga) 1.0C
|
||||
// Menus not tested
|
||||
{
|
||||
"ddp",
|
||||
"1.0C 1987-04-27",
|
||||
|
@ -314,7 +316,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Donald Duck's Playground (ST) 1.0A 8/8/86
|
||||
// Donald Duck's Playground (ST) 1.0A 8/8/86
|
||||
// Menus not tested
|
||||
{
|
||||
"ddp",
|
||||
"1.0A 1986-08-08",
|
||||
|
@ -332,6 +335,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
{
|
||||
// reported by Filippos (thebluegr) in bugreport #1654500
|
||||
// Menus not tested
|
||||
{
|
||||
"ddp",
|
||||
"1.0C 1986-06-09", // verify date
|
||||
|
@ -348,7 +352,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
#endif
|
||||
|
||||
{
|
||||
// Sarien Name == Gold Rush! (Amiga) 1.01 1/13/89 aka 2.05 3/9/89 # 2.316
|
||||
// Gold Rush! (Amiga) 1.01 1/13/89 aka 2.05 3/9/89 # 2.316
|
||||
{
|
||||
"goldrush",
|
||||
"1.01 1989-01-13 aka 2.05 1989-03-09",
|
||||
|
@ -365,7 +369,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Gold Rush! (Apple IIgs) 1.0M 2/28/89 (CE) aka 2.01 12/22/88
|
||||
// Gold Rush! (Apple IIgs) 1.0M 2/28/89 (CE) aka 2.01 12/22/88
|
||||
// Menus not tested
|
||||
{
|
||||
"goldrush",
|
||||
"1.0M 1989-02-28 (CE) aka 2.01 1988-12-22",
|
||||
|
@ -382,7 +387,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Gold Rush! (ST) 1.01 1/13/89 aka 2.01 12/22/88
|
||||
// Gold Rush! (ST) 1.01 1/13/89 aka 2.01 12/22/88
|
||||
{
|
||||
"goldrush",
|
||||
"1.01 1989-01-13 aka 2.01 1988-12-22",
|
||||
|
@ -399,7 +404,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Gold Rush! (PC 5.25") 2.01 12/22/88 [AGI 3.002.149]
|
||||
// Gold Rush! (PC 5.25") 2.01 12/22/88 [AGI 3.002.149]
|
||||
{
|
||||
"goldrush",
|
||||
"2.01 1988-12-22 5.25\"",
|
||||
|
@ -416,7 +421,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Gold Rush! (PC 3.5") 2.01 12/22/88 [AGI 3.002.149]
|
||||
// Gold Rush! (PC 3.5") 2.01 12/22/88 [AGI 3.002.149]
|
||||
{
|
||||
"goldrush",
|
||||
"2.01 1988-12-22 3.5\"",
|
||||
|
@ -433,7 +438,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Gold Rush! (PC 5.25") 2.01 12/22/88 [AGI 3.002.149]
|
||||
// Gold Rush! (PC 5.25") 2.01 12/22/88 [AGI 3.002.149]
|
||||
{
|
||||
"goldrush",
|
||||
"2.01 1988-12-22",
|
||||
|
@ -454,7 +459,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 1 (Amiga) 1.0U # 2.082
|
||||
// King's Quest 1 (Amiga) 1.0U # 2.082
|
||||
// The original game did not have menus, they are enabled under ScummVM
|
||||
{
|
||||
"kq1",
|
||||
"1.0U 1986",
|
||||
|
@ -465,13 +471,14 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
},
|
||||
GID_KQ1,
|
||||
GType_V2,
|
||||
0,
|
||||
GF_MENUS,
|
||||
0x2440,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 1 (ST) 1.0V
|
||||
// King's Quest 1 (ST) 1.0V
|
||||
// The original game did not have menus, they are enabled under ScummVM
|
||||
{
|
||||
"kq1",
|
||||
"1.0V 1986",
|
||||
|
@ -482,13 +489,14 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
},
|
||||
GID_KQ1,
|
||||
GType_V2,
|
||||
0,
|
||||
GF_MENUS,
|
||||
0x2272,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 1 (IIgs) 1.0S-88223
|
||||
// King's Quest 1 (IIgs) 1.0S-88223
|
||||
// Menus not tested
|
||||
{
|
||||
"kq1",
|
||||
"1.0S 1988-02-23",
|
||||
|
@ -505,7 +513,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 1 (Mac) 2.0C
|
||||
// King's Quest 1 (Mac) 2.0C
|
||||
{
|
||||
"kq1",
|
||||
"2.0C 1987-03-26",
|
||||
|
@ -522,7 +530,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 1 (PC 5.25"/3.5") 2.0F [AGI 2.917]
|
||||
// King's Quest 1 (PC 5.25"/3.5") 2.0F [AGI 2.917]
|
||||
{
|
||||
"kq1",
|
||||
"2.0F 1987-05-05 5.25\"/3.5\"",
|
||||
|
@ -539,7 +547,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 2 (IIgs) 2.0A 6/16/88 (CE)
|
||||
// King's Quest 2 (IIgs) 2.0A 6/16/88 (CE)
|
||||
{
|
||||
"kq2",
|
||||
"2.0A 1988-06-16 (CE)",
|
||||
|
@ -556,7 +564,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 2 (Amiga) 2.0J (Broken)
|
||||
// King's Quest 2 (Amiga) 2.0J (Broken)
|
||||
{
|
||||
"kq2",
|
||||
"2.0J 1987-01-29 [OBJECT decrypted]",
|
||||
|
@ -573,7 +581,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 2 (Mac) 2.0R
|
||||
// King's Quest 2 (Mac) 2.0R
|
||||
{
|
||||
"kq2",
|
||||
"2.0R 1988-03-23",
|
||||
|
@ -607,7 +615,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 2 (PC 5.25"/3.5") 2.2 [AGI 2.426]
|
||||
// King's Quest 2 (PC 5.25"/3.5") 2.2 [AGI 2.426]
|
||||
{
|
||||
"kq2",
|
||||
"2.2 1987-05-07 5.25\"/3.5\"",
|
||||
|
@ -624,7 +632,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 3 (Amiga) 1.01 11/8/86
|
||||
// King's Quest 3 (Amiga) 1.01 11/8/86
|
||||
// The original game did not have menus, they are enabled under ScummVM
|
||||
{
|
||||
"kq3",
|
||||
"1.01 1986-11-08",
|
||||
|
@ -635,13 +644,14 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
},
|
||||
GID_KQ3,
|
||||
GType_V2,
|
||||
0,
|
||||
GF_MENUS,
|
||||
0x2440,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 3 (ST) 1.02 11/18/86
|
||||
// King's Quest 3 (ST) 1.02 11/18/86
|
||||
// Does not have menus, crashes if menus are enforced. Therefore, ESC pauses the game
|
||||
{
|
||||
"kq3",
|
||||
"1.02 1986-11-18",
|
||||
|
@ -652,13 +662,13 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
},
|
||||
GID_KQ3,
|
||||
GType_V2,
|
||||
0,
|
||||
GF_ESCPAUSE,
|
||||
0x2272,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 3 (Mac) 2.14 3/15/88
|
||||
// King's Quest 3 (Mac) 2.14 3/15/88
|
||||
{
|
||||
"kq3",
|
||||
"2.14 1988-03-15",
|
||||
|
@ -675,7 +685,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 3 (IIgs) 2.0A 8/28/88 (CE)
|
||||
// King's Quest 3 (IIgs) 2.0A 8/28/88 (CE)
|
||||
{
|
||||
"kq3",
|
||||
"2.0A 1988-08-28 (CE)",
|
||||
|
@ -692,7 +702,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 3 (Amiga) 2.15 11/15/89 # 2.333
|
||||
// King's Quest 3 (Amiga) 2.15 11/15/89 # 2.333
|
||||
{
|
||||
"kq3",
|
||||
"2.15 1989-11-15",
|
||||
|
@ -709,7 +719,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 3 (PC) 1.01 11/08/86 [AGI 2.272]
|
||||
// King's Quest 3 (PC) 1.01 11/08/86 [AGI 2.272]
|
||||
// Does not have menus, crashes if menus are enforced. Therefore, ESC pauses the game
|
||||
{
|
||||
"kq3",
|
||||
"1.01 1986-11-08",
|
||||
|
@ -720,13 +731,13 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
},
|
||||
GID_KQ3,
|
||||
GType_V2,
|
||||
0,
|
||||
GF_ESCPAUSE,
|
||||
0x2272,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 3 (PC 5.25") 2.00 5/25/87 [AGI 2.435]
|
||||
// King's Quest 3 (PC 5.25") 2.00 5/25/87 [AGI 2.435]
|
||||
{
|
||||
"kq3",
|
||||
"2.00 1987-05-25 5.25\"",
|
||||
|
@ -743,7 +754,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 3 (Mac) 2.14 3/15/88
|
||||
// King's Quest 3 (Mac) 2.14 3/15/88
|
||||
// Menus not tested
|
||||
{
|
||||
"kq3",
|
||||
"2.14 1988-03-15 5.25\"",
|
||||
|
@ -760,7 +772,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 3 (PC 3.5") 2.14 3/15/88 [AGI 2.936]
|
||||
// King's Quest 3 (PC 3.5") 2.14 3/15/88 [AGI 2.936]
|
||||
{
|
||||
"kq3",
|
||||
"2.14 1988-03-15 3.5\"",
|
||||
|
@ -777,7 +789,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 4 (PC 5.25") 2.3 9/27/88 [AGI 3.002.086]
|
||||
// King's Quest 4 (PC 5.25") 2.3 9/27/88 [AGI 3.002.086]
|
||||
{
|
||||
"kq4",
|
||||
"2.3 1988-09-27",
|
||||
|
@ -794,7 +806,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 4 (IIgs) 1.0K 11/22/88 (CE)
|
||||
// King's Quest 4 (IIgs) 1.0K 11/22/88 (CE)
|
||||
// Menus not tested
|
||||
{
|
||||
"kq4",
|
||||
"1.0K 1988-11-22",
|
||||
|
@ -811,7 +824,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 4 (PC 3.5") 2.0 7/27/88 [AGI 3.002.086]
|
||||
// King's Quest 4 (PC 3.5") 2.0 7/27/88 [AGI 3.002.086]
|
||||
{
|
||||
"kq4",
|
||||
"2.0 1988-07-27 3.5\"",
|
||||
|
@ -828,7 +841,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 4 (PC 3.5") 2.2 9/27/88 [AGI 3.002.086]
|
||||
// King's Quest 4 (PC 3.5") 2.2 9/27/88 [AGI 3.002.086]
|
||||
// Menus not tested
|
||||
{
|
||||
"kq4",
|
||||
"2.2 1988-09-27 3.5\"",
|
||||
|
@ -845,7 +859,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == King's Quest 4 demo (PC) [AGI 3.002.102]
|
||||
// King's Quest 4 demo (PC) [AGI 3.002.102]
|
||||
// Menus not tested
|
||||
{
|
||||
"kq4",
|
||||
"Demo 1988-12-20",
|
||||
|
@ -862,7 +877,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Leisure Suit Larry 1 (PC 5.25"/3.5") 1.00 6/1/87 [AGI 2.440]
|
||||
// Leisure Suit Larry 1 (PC 5.25"/3.5") 1.00 6/1/87 [AGI 2.440]
|
||||
{
|
||||
"lsl1",
|
||||
"1.00 1987-06-01 5.25\"/3.5\"",
|
||||
|
@ -879,7 +894,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Leisure Suit Larry 1 (ST) 1.04 6/18/87
|
||||
// Leisure Suit Larry 1 (ST) 1.04 6/18/87
|
||||
{
|
||||
"lsl1",
|
||||
"1.04 1987-06-18",
|
||||
|
@ -896,7 +911,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Leisure Suit Larry 1 (Amiga) 1.05 6/26/87 # x.yyy
|
||||
// Leisure Suit Larry 1 (Amiga) 1.05 6/26/87 # x.yyy
|
||||
{
|
||||
"lsl1",
|
||||
"1.05 1987-06-26",
|
||||
|
@ -913,7 +928,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Leisure Suit Larry 1 (IIgs) 1.0E
|
||||
// Leisure Suit Larry 1 (IIgs) 1.0E
|
||||
{
|
||||
"lsl1",
|
||||
"1.0E 1987",
|
||||
|
@ -930,7 +945,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Leisure Suit Larry 1 (Mac) 1.05 6/26/87
|
||||
// Leisure Suit Larry 1 (Mac) 1.05 6/26/87
|
||||
{
|
||||
"lsl1",
|
||||
"1.05 1987-06-26",
|
||||
|
@ -947,7 +962,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Manhunter NY (ST) 1.03 10/20/88
|
||||
// Manhunter NY (ST) 1.03 10/20/88
|
||||
{
|
||||
"mh1",
|
||||
"1.03 1988-10-20",
|
||||
|
@ -964,7 +979,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Manhunter NY (IIgs) 2.0E 10/05/88 (CE)
|
||||
// Manhunter NY (IIgs) 2.0E 10/05/88 (CE)
|
||||
{
|
||||
"mh1",
|
||||
"2.0E 1988-10-05 (CE)",
|
||||
|
@ -981,7 +996,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Manhunter NY (Amiga) 1.06 3/18/89
|
||||
// Manhunter NY (Amiga) 1.06 3/18/89
|
||||
{
|
||||
"mh1",
|
||||
"1.06 1989-03-18",
|
||||
|
@ -999,7 +1014,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
{
|
||||
// reported by Filippos (thebluegr) in bugreport #1654500
|
||||
// Sarien Name == Manhunter NY (PC 5.25") 1.22 8/31/88 [AGI 3.002.107]
|
||||
// Manhunter NY (PC 5.25") 1.22 8/31/88 [AGI 3.002.107]
|
||||
{
|
||||
"mh1",
|
||||
"1.22 1988-08-31",
|
||||
|
@ -1016,7 +1031,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Manhunter NY (PC 3.5") 1.22 8/31/88 [AGI 3.002.102]
|
||||
// Manhunter NY (PC 3.5") 1.22 8/31/88 [AGI 3.002.102]
|
||||
{
|
||||
"mh1",
|
||||
"1.22 1988-08-31",
|
||||
|
@ -1033,7 +1048,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Manhunter SF (ST) 1.0 7/29/89
|
||||
// Manhunter SF (ST) 1.0 7/29/89
|
||||
{
|
||||
"mh2",
|
||||
"1.0 1989-07-29",
|
||||
|
@ -1050,7 +1065,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Manhunter SF (Amiga) 3.06 8/17/89 # 2.333
|
||||
// Manhunter SF (Amiga) 3.06 8/17/89 # 2.333
|
||||
{
|
||||
"mh2",
|
||||
"3.06 1989-08-17",
|
||||
|
@ -1067,7 +1082,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Manhunter SF (PC 5.25") 3.03 8/17/89 [AGI 3.002.149]
|
||||
// Manhunter SF (PC 5.25") 3.03 8/17/89 [AGI 3.002.149]
|
||||
{
|
||||
"mh2",
|
||||
"3.03 1989-08-17 5.25\"",
|
||||
|
@ -1084,7 +1099,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Manhunter SF (PC 3.5") 3.02 7/26/89 [AGI 3.002.149]
|
||||
// Manhunter SF (PC 3.5") 3.02 7/26/89 [AGI 3.002.149]
|
||||
{
|
||||
"mh2",
|
||||
"3.02 1989-07-26 3.5\"",
|
||||
|
@ -1099,9 +1114,11 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
0x3149,
|
||||
},
|
||||
|
||||
|
||||
#if 0
|
||||
{
|
||||
// Sarien Name == Mixed-Up Mother Goose (Amiga) 1.1
|
||||
// Mixed-Up Mother Goose (Amiga) 1.1
|
||||
// Problematic: crashes
|
||||
// Menus not tested
|
||||
{
|
||||
"mixedup",
|
||||
"1.1 1986-12-10",
|
||||
|
@ -1115,10 +1132,10 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
0,
|
||||
0x3086,
|
||||
},
|
||||
|
||||
#endif
|
||||
|
||||
{
|
||||
// Sarien Name == Mixed Up Mother Goose (IIgs)
|
||||
// Mixed Up Mother Goose (IIgs)
|
||||
{
|
||||
"mixedup",
|
||||
"1987",
|
||||
|
@ -1135,7 +1152,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Mixed-Up Mother Goose (PC) [AGI 2.915]
|
||||
// Mixed-Up Mother Goose (PC) [AGI 2.915]
|
||||
{
|
||||
"mixedup",
|
||||
"1987-11-10",
|
||||
|
@ -1153,7 +1170,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
#if 0
|
||||
{
|
||||
// Sarien Name == Mixed Up Mother Goose (PC) [AGI 2.915] (Broken)
|
||||
// Mixed Up Mother Goose (PC) [AGI 2.915] (Broken)
|
||||
// Menus not tested
|
||||
{
|
||||
"mixedup",
|
||||
"[corrupt/OBJECT from disk 1]",
|
||||
|
@ -1171,7 +1189,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Police Quest 1 (PC) 2.0E 11/17/87 [AGI 2.915]
|
||||
// Police Quest 1 (PC) 2.0E 11/17/87 [AGI 2.915]
|
||||
{
|
||||
"pq1",
|
||||
"2.0E 1987-11-17",
|
||||
|
@ -1188,7 +1206,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Police Quest 1 (Mac) 2.0G 12/3/87
|
||||
// Police Quest 1 (Mac) 2.0G 12/3/87
|
||||
{
|
||||
"pq1",
|
||||
"2.0G 1987-12-03",
|
||||
|
@ -1205,7 +1223,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Police Quest 1 (IIgs) 2.0B-88421
|
||||
// Police Quest 1 (IIgs) 2.0B-88421
|
||||
{
|
||||
"pq1",
|
||||
"2.0B 1988-04-21",
|
||||
|
@ -1222,7 +1240,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Police Quest 1 (Amiga) 2.0B 2/22/89 # 2.310
|
||||
// Police Quest 1 (Amiga) 2.0B 2/22/89 # 2.310
|
||||
{
|
||||
"pq1",
|
||||
"2.0B 1989-02-22",
|
||||
|
@ -1239,7 +1257,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Police Quest 1 (IIgs) 2.0A-88318
|
||||
// Police Quest 1 (IIgs) 2.0A-88318
|
||||
{
|
||||
"pq1",
|
||||
"2.0A 1988-03-18",
|
||||
|
@ -1256,7 +1274,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Police Quest 1 (PC) 2.0A 10/23/87 [AGI 2.903/2.911]
|
||||
// Police Quest 1 (PC) 2.0A 10/23/87 [AGI 2.903/2.911]
|
||||
{
|
||||
"pq1",
|
||||
"2.0A 1987-10-23",
|
||||
|
@ -1273,7 +1291,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Police Quest 1 (Mac) 2.0G 12/3/87
|
||||
// Police Quest 1 (Mac) 2.0G 12/3/87
|
||||
{
|
||||
"pq1",
|
||||
"2.0G 1987-12-03 5.25\"/ST",
|
||||
|
@ -1307,7 +1325,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 1 (ST) 1.1A
|
||||
// Space Quest 1 (ST) 1.1A
|
||||
// The original game did not have menus, they are enabled under ScummVM
|
||||
{
|
||||
"sq1",
|
||||
"1.1A 1986-02-06",
|
||||
|
@ -1318,13 +1337,14 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
},
|
||||
GID_SQ1,
|
||||
GType_V2,
|
||||
0,
|
||||
GF_MENUS,
|
||||
0x2440,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 1 (PC) 1.1A [AGI 2.272]
|
||||
// Space Quest 1 (PC) 1.1A [AGI 2.272]
|
||||
// The original game did not have menus, they are enabled under ScummVM
|
||||
{
|
||||
"sq1",
|
||||
"1.1A 1986-11-13",
|
||||
|
@ -1335,13 +1355,14 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
},
|
||||
GID_SQ1,
|
||||
GType_V2,
|
||||
0,
|
||||
GF_MENUS,
|
||||
0x2272,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 1 (Amiga) 1.2 # 2.082
|
||||
// Space Quest 1 (Amiga) 1.2 # 2.082
|
||||
// The original game did not have menus, they are enabled under ScummVM
|
||||
{
|
||||
"sq1",
|
||||
"1.2 1986",
|
||||
|
@ -1352,13 +1373,13 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
},
|
||||
GID_SQ1,
|
||||
GType_V2,
|
||||
0,
|
||||
GF_MENUS,
|
||||
0x2440,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 1 (Mac) 1.5D
|
||||
// Space Quest 1 (Mac) 1.5D
|
||||
{
|
||||
"sq1",
|
||||
"1.5D 1987-04-02",
|
||||
|
@ -1375,7 +1396,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 1 (IIgs) 2.2
|
||||
// Space Quest 1 (IIgs) 2.2
|
||||
{
|
||||
"sq1",
|
||||
"2.2 1987",
|
||||
|
@ -1392,7 +1413,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 1 (PC) 1.0X [AGI 2.089]
|
||||
// Space Quest 1 (PC) 1.0X [AGI 2.089]
|
||||
// Does not have menus, crashes if menus are enforced. Therefore, ESC pauses the game
|
||||
{
|
||||
"sq1",
|
||||
"1.0X 1986-09-24",
|
||||
|
@ -1403,30 +1425,14 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
},
|
||||
GID_SQ1,
|
||||
GType_V2,
|
||||
0,
|
||||
GF_ESCPAUSE,
|
||||
0x2089,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 1 (PC) 1.1A [AGI 2.272]
|
||||
{
|
||||
"sq1",
|
||||
"1.1A 1986-11-13",
|
||||
AD_ENTRY1("logdir", "8d8c20ab9f4b6e4817698637174a1cb6"),
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformPC,
|
||||
Common::ADGF_NO_FLAGS
|
||||
},
|
||||
GID_SQ1,
|
||||
GType_V2,
|
||||
0,
|
||||
0x2272,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 1 (PC 5.25"/3.5") 2.2 [AGI 2.426/2.917]
|
||||
// Space Quest 1 (PC 5.25"/3.5") 2.2 [AGI 2.426/2.917]
|
||||
{
|
||||
"sq1",
|
||||
"2.2 1987-05-07 5.25\"/3.5\"",
|
||||
|
@ -1444,7 +1450,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 2 (PC 3.5") 2.0D [AGI 2.936]
|
||||
// Space Quest 2 (PC 3.5") 2.0D [AGI 2.936]
|
||||
{
|
||||
"sq2",
|
||||
"2.0D 1988-03-14 3.5\"",
|
||||
|
@ -1461,7 +1467,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 2 (IIgs) 2.0A 7/25/88 (CE)
|
||||
// Space Quest 2 (IIgs) 2.0A 7/25/88 (CE)
|
||||
{
|
||||
"sq2",
|
||||
"2.0A 1988-07-25 (CE)",
|
||||
|
@ -1478,7 +1484,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 2 (Amiga) 2.0F
|
||||
// Space Quest 2 (Amiga) 2.0F
|
||||
{
|
||||
"sq2",
|
||||
"2.0F 1986-12-09 [VOL.2->PICTURE.16 broken]",
|
||||
|
@ -1499,7 +1505,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 2 (Mac) 2.0D
|
||||
// Space Quest 2 (Mac) 2.0D
|
||||
{
|
||||
"sq2",
|
||||
"2.0D 1988-04-04",
|
||||
|
@ -1517,7 +1523,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
{
|
||||
// reported by Filippos (thebluegr) in bugreport #1654500
|
||||
// Sarien Name == Space Quest 2 (PC 5.25") 2.0A [AGI 2.912]
|
||||
// Space Quest 2 (PC 5.25") 2.0A [AGI 2.912]
|
||||
{
|
||||
"sq2",
|
||||
"2.0A 1987-11-06 5.25\"",
|
||||
|
@ -1534,7 +1540,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 2 (PC 3.5") 2.0A [AGI 2.912]
|
||||
// Space Quest 2 (PC 3.5") 2.0A [AGI 2.912]
|
||||
{
|
||||
"sq2",
|
||||
"2.0A 1987-11-06 3.5\"",
|
||||
|
@ -1551,7 +1557,8 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 2 (PC 5.25"/ST) 2.0C/A [AGI 2.915]
|
||||
// Space Quest 2 (PC 5.25"/ST) 2.0C/A [AGI 2.915]
|
||||
// Menus not tested
|
||||
{
|
||||
"sq2",
|
||||
"2.0C/A 5.25\"/ST",
|
||||
|
@ -1568,7 +1575,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Space Quest 2 (PC 3.5") 2.0F [AGI 2.936]
|
||||
// Space Quest 2 (PC 3.5") 2.0F [AGI 2.936]
|
||||
{
|
||||
"sq2",
|
||||
"2.0F 1989-01-05 3.5\"",
|
||||
|
@ -1585,7 +1592,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
|
||||
|
||||
{
|
||||
// Sarien Name == Xmas Card 1986 (PC) [AGI 2.272]
|
||||
// Xmas Card 1986 (PC) [AGI 2.272]
|
||||
{
|
||||
"xmascard",
|
||||
"1986-11-13 [version 1]",
|
||||
|
@ -1675,7 +1682,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||
FANMADE("Good Man (demo v3.41)", "3facd8a8f856b7b6e0f6c3200274d88c"),
|
||||
|
||||
{
|
||||
// Sarien Name == Groza
|
||||
// Groza
|
||||
{
|
||||
"agi-fanmade",
|
||||
"Groza (russian) [AGDS sample]",
|
||||
|
|
|
@ -67,6 +67,158 @@ uint8 egaPalette[16 * 3] = {
|
|||
0x3f, 0x3f, 0x3f
|
||||
};
|
||||
|
||||
/**
|
||||
* Atari ST AGI palette.
|
||||
* Used by all of the tested Atari ST AGI games
|
||||
* from Donald Duck's Playground (1986) to Manhunter II (1989).
|
||||
* 16 RGB colors. 3 bits per color component.
|
||||
*/
|
||||
uint8 atariStAgiPalette[16 * 3] = {
|
||||
0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x7,
|
||||
0x0, 0x4, 0x0,
|
||||
0x0, 0x5, 0x4,
|
||||
0x5, 0x0, 0x0,
|
||||
0x5, 0x3, 0x6,
|
||||
0x4, 0x3, 0x0,
|
||||
0x5, 0x5, 0x5,
|
||||
0x3, 0x3, 0x2,
|
||||
0x0, 0x5, 0x7,
|
||||
0x0, 0x6, 0x0,
|
||||
0x0, 0x7, 0x6,
|
||||
0x7, 0x2, 0x3,
|
||||
0x7, 0x4, 0x7,
|
||||
0x7, 0x7, 0x4,
|
||||
0x7, 0x7, 0x7
|
||||
};
|
||||
|
||||
/**
|
||||
* Second generation Apple IIGS AGI palette.
|
||||
* A 16-color, 12-bit RGB palette.
|
||||
*
|
||||
* Used by at least the following Apple IIGS AGI versions:
|
||||
* 1.003 (Leisure Suit Larry I v1.0E, intro says 1987)
|
||||
* 1.005 (AGI Demo 2 1987-06-30?)
|
||||
* 1.006 (King's Quest I v1.0S 1988-02-23)
|
||||
* 1.007 (Police Quest I v2.0B 1988-04-21 8:00am)
|
||||
* 1.013 (King's Quest II v2.0A 1988-06-16 (CE))
|
||||
* 1.013 (Mixed-Up Mother Goose v2.0A 1988-05-31 10:00am)
|
||||
* 1.014 (King's Quest III v2.0A 1988-08-28 (CE))
|
||||
* 1.014 (Space Quest II v2.0A, LOGIC.141 says 1988)
|
||||
* 2.004 (Manhunter I v2.0E 1988-10-05 (CE))
|
||||
* 2.006 (King's Quest IV v1.0K 1988-11-22 (CE))
|
||||
* 3.001 (Black Cauldron v1.0O 1989-02-24 (CE))
|
||||
* 3.003 (Gold Rush! v1.0M 1989-02-28 (CE))
|
||||
*/
|
||||
uint8 appleIIgsAgiPaletteV2[16 * 3] = {
|
||||
0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0xF,
|
||||
0x0, 0x8, 0x0,
|
||||
0x0, 0xD, 0xB,
|
||||
0xC, 0x0, 0x0,
|
||||
0xB, 0x7, 0xD,
|
||||
0x8, 0x5, 0x0,
|
||||
0xB, 0xB, 0xB,
|
||||
0x7, 0x7, 0x7,
|
||||
0x0, 0xB, 0xF,
|
||||
0x0, 0xE, 0x0,
|
||||
0x0, 0xF, 0xD,
|
||||
0xF, 0x9, 0x8,
|
||||
0xD, 0x9, 0xF, // Only this differs from the 1st generation palette
|
||||
0xE, 0xE, 0x0,
|
||||
0xF, 0xF, 0xF
|
||||
};
|
||||
|
||||
/**
|
||||
* First generation Amiga & Apple IIGS AGI palette.
|
||||
* A 16-color, 12-bit RGB palette.
|
||||
*
|
||||
* Used by at least the following Amiga AGI versions:
|
||||
* 2.082 (King's Quest I v1.0U 1986)
|
||||
* 2.082 (Space Quest I v1.2 1986)
|
||||
* 2.090 (King's Quest III v1.01 1986-11-08)
|
||||
* 2.107 (King's Quest II v2.0J 1987-01-29)
|
||||
* x.yyy (Black Cauldron v2.00 1987-06-14)
|
||||
* x.yyy (Larry I v1.05 1987-06-26)
|
||||
*
|
||||
* Also used by at least the following Apple IIGS AGI versions:
|
||||
* 1.002 (Space Quest I, intro says v2.2 1987)
|
||||
*/
|
||||
uint8 amigaAgiPaletteV1[16 * 3] = {
|
||||
0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0xF,
|
||||
0x0, 0x8, 0x0,
|
||||
0x0, 0xD, 0xB,
|
||||
0xC, 0x0, 0x0,
|
||||
0xB, 0x7, 0xD,
|
||||
0x8, 0x5, 0x0,
|
||||
0xB, 0xB, 0xB,
|
||||
0x7, 0x7, 0x7,
|
||||
0x0, 0xB, 0xF,
|
||||
0x0, 0xE, 0x0,
|
||||
0x0, 0xF, 0xD,
|
||||
0xF, 0x9, 0x8,
|
||||
0xF, 0x7, 0x0,
|
||||
0xE, 0xE, 0x0,
|
||||
0xF, 0xF, 0xF
|
||||
};
|
||||
|
||||
/**
|
||||
* Second generation Amiga AGI palette.
|
||||
* A 16-color, 12-bit RGB palette.
|
||||
*
|
||||
* Used by at least the following Amiga AGI versions:
|
||||
* 2.202 (Space Quest II v2.0F. Intro says 1988. ScummVM 0.10.0 detects as 1986-12-09)
|
||||
*/
|
||||
uint8 amigaAgiPaletteV2[16 * 3] = {
|
||||
0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0xF,
|
||||
0x0, 0x8, 0x0,
|
||||
0x0, 0xD, 0xB,
|
||||
0xC, 0x0, 0x0,
|
||||
0xB, 0x7, 0xD,
|
||||
0x8, 0x5, 0x0,
|
||||
0xB, 0xB, 0xB,
|
||||
0x7, 0x7, 0x7,
|
||||
0x0, 0xB, 0xF,
|
||||
0x0, 0xE, 0x0,
|
||||
0x0, 0xF, 0xD,
|
||||
0xF, 0x9, 0x8,
|
||||
0xD, 0x0, 0xF,
|
||||
0xE, 0xE, 0x0,
|
||||
0xF, 0xF, 0xF
|
||||
};
|
||||
|
||||
/**
|
||||
* Third generation Amiga AGI palette.
|
||||
* A 16-color, 12-bit RGB palette.
|
||||
*
|
||||
* Used by at least the following Amiga AGI versions:
|
||||
* 2.310 (Police Quest I v2.0B 1989-02-22)
|
||||
* 2.316 (Gold Rush! v2.05 1989-03-09)
|
||||
* x.yyy (Manhunter I v1.06 1989-03-18)
|
||||
* 2.333 (Manhunter II v3.06 1989-08-17)
|
||||
* 2.333 (King's Quest III v2.15 1989-11-15)
|
||||
*/
|
||||
uint8 amigaAgiPaletteV3[16 * 3] = {
|
||||
0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0xB,
|
||||
0x0, 0xB, 0x0,
|
||||
0x0, 0xB, 0xB,
|
||||
0xB, 0x0, 0x0,
|
||||
0xB, 0x0, 0xB,
|
||||
0xC, 0x7, 0x0,
|
||||
0xB, 0xB, 0xB,
|
||||
0x7, 0x7, 0x7,
|
||||
0x0, 0x0, 0xF,
|
||||
0x0, 0xF, 0x0,
|
||||
0x0, 0xF, 0xF,
|
||||
0xF, 0x0, 0x0,
|
||||
0xF, 0x0, 0xF,
|
||||
0xF, 0xF, 0x0,
|
||||
0xF, 0xF, 0xF
|
||||
};
|
||||
|
||||
/**
|
||||
* 16 color amiga-ish palette.
|
||||
*/
|
||||
|
@ -554,13 +706,42 @@ void GfxMgr::printCharacter(int x, int y, char c, int fg, int bg) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Draw button
|
||||
* Draw a default style button.
|
||||
* Swaps background and foreground color if button is in focus or being pressed.
|
||||
* @param x x coordinate of the button
|
||||
* @param y y coordinate of the button
|
||||
* @param a set if the button has focus
|
||||
* @param p set if the button is pressed
|
||||
* @param fgcolor foreground color of the button when it is neither in focus nor being pressed
|
||||
* @param bgcolor background color of the button when it is neither in focus nor being pressed
|
||||
*/
|
||||
void GfxMgr::drawButton(int x, int y, const char *s, int a, int p, int fgcolor, int bgcolor) {
|
||||
void GfxMgr::drawDefaultStyleButton(int x, int y, const char *s, int a, int p, int fgcolor, int bgcolor) {
|
||||
int textOffset = _vm->_defaultButtonStyle.getTextOffset(a > 0, p > 0);
|
||||
AgiTextColor color = _vm->_defaultButtonStyle.getColor (a > 0, p > 0, fgcolor, bgcolor);
|
||||
bool border = _vm->_defaultButtonStyle.getBorder (a > 0, p > 0);
|
||||
|
||||
rawDrawButton(x, y, s, color.fg, color.bg, border, textOffset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a button using the currently chosen style.
|
||||
* Amiga-style is used for the Amiga-rendering mode, PC-style is used otherwise.
|
||||
* @param x x coordinate of the button
|
||||
* @param y y coordinate of the button
|
||||
* @param hasFocus set if the button has focus
|
||||
* @param pressed set if the button is pressed
|
||||
* @param positive set if button is positive, otherwise button is negative (Only matters with Amiga-style buttons)
|
||||
* TODO: Make Amiga-style buttons a bit wider as they were in Amiga AGI games.
|
||||
*/
|
||||
void GfxMgr::drawCurrentStyleButton(int x, int y, const char *label, bool hasFocus, bool pressed, bool positive) {
|
||||
int textOffset = _vm->_buttonStyle.getTextOffset(hasFocus, pressed);
|
||||
AgiTextColor color = _vm->_buttonStyle.getColor(hasFocus, pressed, positive);
|
||||
bool border = _vm->_buttonStyle.getBorder(hasFocus, pressed);
|
||||
|
||||
rawDrawButton(x, y, label, color.fg, color.bg, border, textOffset);
|
||||
}
|
||||
|
||||
void GfxMgr::rawDrawButton(int x, int y, const char *s, int fgcolor, int bgcolor, bool border, int textOffset) {
|
||||
int len = strlen(s);
|
||||
int x1, y1, x2, y2;
|
||||
|
||||
|
@ -569,8 +750,12 @@ void GfxMgr::drawButton(int x, int y, const char *s, int a, int p, int fgcolor,
|
|||
x2 = x + CHAR_COLS * len + 2;
|
||||
y2 = y + CHAR_LINES + 2;
|
||||
|
||||
// Draw a filled rectangle that's larger than the button. Used for drawing
|
||||
// a border around the button as the button itself is drawn after this.
|
||||
drawRectangle(x1, y1, x2, y2, border ? BUTTON_BORDER : MSG_BOX_COLOUR);
|
||||
|
||||
while (*s) {
|
||||
putTextCharacter(0, x + (!!p), y + (!!p), *s++, a ? bgcolor : fgcolor, a ? fgcolor : bgcolor);
|
||||
putTextCharacter(0, x + textOffset, y + textOffset, *s++, fgcolor, bgcolor);
|
||||
x += CHAR_COLS;
|
||||
}
|
||||
|
||||
|
@ -623,39 +808,26 @@ int GfxMgr::keypress() {
|
|||
|
||||
/**
|
||||
* Initialize the color palette
|
||||
* This function initializes the color palette using the specified 16-color
|
||||
* This function initializes the color palette using the specified
|
||||
* RGB palette.
|
||||
* @param p A pointer to the 16-color RGB palette.
|
||||
* @param p A pointer to the source RGB palette.
|
||||
* @param colorCount Count of colors in the source palette.
|
||||
* @param fromBits Bits per source color component.
|
||||
* @param toBits Bits per destination color component.
|
||||
*/
|
||||
void GfxMgr::initPalette(uint8 *p) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 48; i++) {
|
||||
_palette[i] = p[i];
|
||||
void GfxMgr::initPalette(uint8 *p, uint colorCount, uint fromBits, uint toBits) {
|
||||
const uint srcMax = (1 << fromBits) - 1;
|
||||
const uint destMax = (1 << toBits) - 1;
|
||||
for (uint col = 0; col < colorCount; col++) {
|
||||
for (uint comp = 0; comp < 3; comp++) { // Convert RGB components
|
||||
_palette[col * 4 + comp] = (p[col * 3 + comp] * destMax) / srcMax;
|
||||
}
|
||||
_palette[col * 4 + 3] = 0; // Set alpha to zero
|
||||
}
|
||||
}
|
||||
|
||||
void GfxMgr::gfxSetPalette() {
|
||||
int i;
|
||||
byte pal[256 * 4];
|
||||
|
||||
if (!(_vm->getFeatures() & (GF_AGI256 | GF_AGI256_2))) {
|
||||
for (i = 0; i < 16; i++) {
|
||||
pal[i * 4 + 0] = _palette[i * 3 + 0] << 2;
|
||||
pal[i * 4 + 1] = _palette[i * 3 + 1] << 2;
|
||||
pal[i * 4 + 2] = _palette[i * 3 + 2] << 2;
|
||||
pal[i * 4 + 3] = 0;
|
||||
}
|
||||
g_system->setPalette(pal, 0, 16);
|
||||
} else {
|
||||
for (i = 0; i < 256; i++) {
|
||||
pal[i * 4 + 0] = vgaPalette[i * 3 + 0];
|
||||
pal[i * 4 + 1] = vgaPalette[i * 3 + 1];
|
||||
pal[i * 4 + 2] = vgaPalette[i * 3 + 2];
|
||||
pal[i * 4 + 3] = 0;
|
||||
}
|
||||
g_system->setPalette(pal, 0, 256);
|
||||
}
|
||||
g_system->setPalette(_palette, 0, 256);
|
||||
}
|
||||
|
||||
//Gets AGIPAL Data
|
||||
|
@ -739,7 +911,27 @@ static const byte sciMouseCursor[] = {
|
|||
};
|
||||
|
||||
/**
|
||||
* RGBA-palette for the black and white SCI-style arrow cursor.
|
||||
* A black and white Apple IIGS style arrow cursor (9x11).
|
||||
* 0 = Transparent.
|
||||
* 1 = Black (#000000 in 24-bit RGB).
|
||||
* 2 = White (#FFFFFF in 24-bit RGB).
|
||||
*/
|
||||
static const byte appleIIgsMouseCursor[] = {
|
||||
2,2,0,0,0,0,0,0,0,
|
||||
2,1,2,0,0,0,0,0,0,
|
||||
2,1,1,2,0,0,0,0,0,
|
||||
2,1,1,1,2,0,0,0,0,
|
||||
2,1,1,1,1,2,0,0,0,
|
||||
2,1,1,1,1,1,2,0,0,
|
||||
2,1,1,1,1,1,1,2,0,
|
||||
2,1,1,1,1,1,1,1,2,
|
||||
2,1,1,2,1,1,2,2,0,
|
||||
2,2,2,0,2,1,1,2,0,
|
||||
0,0,0,0,0,2,2,2,0
|
||||
};
|
||||
|
||||
/**
|
||||
* RGBA-palette for the black and white SCI and Apple IIGS arrow cursors.
|
||||
*/
|
||||
static const byte sciMouseCursorPalette[] = {
|
||||
0x00, 0x00, 0x00, 0x00, // Black
|
||||
|
@ -819,7 +1011,9 @@ void GfxMgr::setCursor(bool amigaStyleCursor) {
|
|||
* @see deinit_video()
|
||||
*/
|
||||
int GfxMgr::initVideo() {
|
||||
if (_vm->_renderMode == Common::kRenderEGA)
|
||||
if (_vm->getFeatures() & (GF_AGI256 | GF_AGI256_2))
|
||||
initPalette(vgaPalette, 256, 8);
|
||||
else if (_vm->_renderMode == Common::kRenderEGA)
|
||||
initPalette(egaPalette);
|
||||
else
|
||||
initPalette(newPalette);
|
||||
|
|
|
@ -41,7 +41,7 @@ class GfxMgr {
|
|||
private:
|
||||
AgiEngine *_vm;
|
||||
|
||||
uint8 _palette[16 * 3];
|
||||
uint8 _palette[256 * 4];
|
||||
uint8 *_agiScreen;
|
||||
unsigned char *_screen;
|
||||
|
||||
|
@ -50,6 +50,9 @@ private:
|
|||
uint8 _agipalPalette[16 * 3];
|
||||
int _agipalFileNum;
|
||||
|
||||
private:
|
||||
void rawDrawButton(int x, int y, const char *s, int fgcolor, int bgcolor, bool border, int textOffset);
|
||||
|
||||
public:
|
||||
GfxMgr(AgiEngine *vm);
|
||||
|
||||
|
@ -74,12 +77,13 @@ public:
|
|||
void clearScreen(int);
|
||||
void clearConsoleScreen(int);
|
||||
void drawBox(int, int, int, int, int, int, int);
|
||||
void drawButton(int, int, const char *, int, int, int fgcolor = 0, int bgcolor = 0);
|
||||
void drawDefaultStyleButton(int, int, const char *, int, int, int fgcolor = 0, int bgcolor = 0);
|
||||
void drawCurrentStyleButton(int x, int y, const char *label, bool hasFocus, bool pressed = false, bool positive = true);
|
||||
int testButton(int, int, const char *);
|
||||
void drawRectangle(int, int, int, int, int);
|
||||
void saveBlock(int, int, int, int, uint8 *);
|
||||
void restoreBlock(int, int, int, int, uint8 *);
|
||||
void initPalette(uint8 *);
|
||||
void initPalette(uint8 *p, uint colorCount = 16, uint fromBits = 6, uint toBits = 8);
|
||||
void setAGIPal(int);
|
||||
int getAGIPalFileNum();
|
||||
void drawFrame(int x1, int y1, int x2, int y2, int c1, int c2);
|
||||
|
|
|
@ -107,8 +107,10 @@ int AgiEngine::handleController(int key) {
|
|||
VtEntry *v = &_game.viewTable[0];
|
||||
int i;
|
||||
|
||||
/* AGI 3.149 games and The Black Cauldron need KEY_ESCAPE to use menus */
|
||||
if (key == 0 || (key == KEY_ESCAPE && agiGetRelease() != 0x3149 && getGameID() != GID_BC) )
|
||||
// AGI 3.149 games and The Black Cauldron need KEY_ESCAPE to use menus
|
||||
// Games with the GF_ESCPAUSE flag need KEY_ESCAPE to pause the game
|
||||
if (key == 0 ||
|
||||
(key == KEY_ESCAPE && agiGetRelease() != 0x3149 && getGameID() != GID_BC && !(getFeatures() & GF_ESCPAUSE)) )
|
||||
return false;
|
||||
|
||||
if ((getGameID() == GID_MH1 || getGameID() == GID_MH2) && (key == KEY_ENTER) &&
|
||||
|
@ -127,7 +129,7 @@ int AgiEngine::handleController(int key) {
|
|||
}
|
||||
|
||||
if (key == BUTTON_LEFT) {
|
||||
if (getflag(fMenusWork) && g_mouse.y <= CHAR_LINES) {
|
||||
if ((getflag(fMenusWork) || (getFeatures() & GF_MENUS)) && g_mouse.y <= CHAR_LINES) {
|
||||
newInputMode(INPUT_MENU);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ bool Menu::keyhandler(int key) {
|
|||
static int menuActive = false;
|
||||
static int buttonUsed = 0;
|
||||
|
||||
if (!_vm->getflag(fMenusWork))
|
||||
if (!_vm->getflag(fMenusWork) && !(_vm->getFeatures() & GF_MENUS))
|
||||
return false;
|
||||
|
||||
if (!menuActive) {
|
||||
|
@ -351,6 +351,12 @@ bool Menu::keyhandler(int key) {
|
|||
debugC(6, kDebugLevelMenu | kDebugLevelInput, "event %d registered", d->event);
|
||||
_vm->_game.evKeyp[d->event].occured = true;
|
||||
_vm->_game.evKeyp[d->event].data = d->event;
|
||||
// In LSL1, event 0x20 is set when changing the game speed to normal via the menu
|
||||
// Do not set the event data to 0x20, as this event is then incorrectly triggered
|
||||
// when the spacebar is pressed, which has a keycode equal to 0x20 as well
|
||||
// Fixes bug #1751390 - "LSL: after changing game speed, space key turn unfunctional"
|
||||
if (d->event == 0x20)
|
||||
_vm->_game.evKeyp[d->event].data = d->event + 1;
|
||||
goto exit_menu;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
#include "common/func.h"
|
||||
#include "common/config-manager.h"
|
||||
|
||||
#ifdef __DS__
|
||||
#include "wordcompletion.h"
|
||||
#endif
|
||||
|
||||
namespace Agi {
|
||||
|
||||
#define kModePre 0
|
||||
|
@ -200,9 +204,9 @@ bool AgiEngine::predictiveDialog(void) {
|
|||
color2 = 7;
|
||||
}
|
||||
if (i == 14) {
|
||||
_gfx->drawButton(bx[i], by[i], modes[mode], i == active, 0, color1, color2);
|
||||
_gfx->drawDefaultStyleButton(bx[i], by[i], modes[mode], i == active, 0, color1, color2);
|
||||
} else {
|
||||
_gfx->drawButton(bx[i], by[i], buttons[i], i == active, 0, color1, color2);
|
||||
_gfx->drawDefaultStyleButton(bx[i], by[i], buttons[i], i == active, 0, color1, color2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -521,6 +525,10 @@ void AgiEngine::loadDict(void) {
|
|||
while ((ptr = strchr(ptr, '\n'))) {
|
||||
*ptr = 0;
|
||||
ptr++;
|
||||
#ifdef __DS__
|
||||
// Pass the line on to the DS word list
|
||||
DS::addAutoCompleteLine(_predictiveDictLine[i - 1]);
|
||||
#endif
|
||||
_predictiveDictLine[i++] = ptr;
|
||||
}
|
||||
if (_predictiveDictLine[lines - 1][0] == 0)
|
||||
|
@ -529,6 +537,11 @@ void AgiEngine::loadDict(void) {
|
|||
_predictiveDictLineCount = lines;
|
||||
debug("Loaded %d lines", _predictiveDictLineCount);
|
||||
|
||||
#ifdef __DS__
|
||||
// Sort the DS word completion list, to allow for a binary chop later (in the ds backend)
|
||||
DS::sortAutoCompleteWordList();
|
||||
#endif
|
||||
|
||||
uint32 time3 = _system->getMillis();
|
||||
printf("Time to parse pred.dic: %d, total: %d\n", time3-time2, time3-time1);
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ int AgiEngine::saveGame(const char *fileName, const char *description) {
|
|||
int i;
|
||||
struct ImageStackElement *ptr = _imageStack;
|
||||
Common::OutSaveFile *out;
|
||||
int result = errOK;
|
||||
|
||||
debugC(3, kDebugLevelMain | kDebugLevelSavegame, "AgiEngine::saveGame(%s, %s)", fileName, description);
|
||||
if (!(out = _saveFileMan->openForSaving(fileName))) {
|
||||
|
@ -206,14 +207,15 @@ int AgiEngine::saveGame(const char *fileName, const char *description) {
|
|||
out->writeSint16BE(_gfx->getAGIPalFileNum());
|
||||
|
||||
out->finalize();
|
||||
if (out->ioFailed())
|
||||
if (out->ioFailed()) {
|
||||
warning("Can't write file '%s'. (Disk full?)", fileName);
|
||||
else
|
||||
result = errIOError;
|
||||
} else
|
||||
debugC(1, kDebugLevelMain | kDebugLevelSavegame, "Saved game %s in file %s", description, fileName);
|
||||
|
||||
delete out;
|
||||
debugC(3, kDebugLevelMain | kDebugLevelSavegame, "Closed %s", fileName);
|
||||
return errOK;
|
||||
return result;
|
||||
}
|
||||
|
||||
int AgiEngine::loadGame(const char *fileName, bool checkId) {
|
||||
|
@ -516,7 +518,7 @@ int AgiEngine::selectSlot() {
|
|||
buttonY = (vm + 17) * CHAR_LINES;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
_gfx->drawButton(buttonX[i], buttonY, buttonText[i], 0, 0, MSG_BOX_TEXT, MSG_BOX_COLOUR);
|
||||
_gfx->drawCurrentStyleButton(buttonX[i], buttonY, buttonText[i], false, false, i == 0);
|
||||
|
||||
AllowSyntheticEvents on(this);
|
||||
int oldFirstSlot = _firstSlot + 1;
|
||||
|
@ -751,20 +753,24 @@ int AgiEngine::saveGameDialog() {
|
|||
sprintf(fileName, "%s", getSavegameFilename(slot));
|
||||
debugC(8, kDebugLevelMain | kDebugLevelResources, "file is [%s]", fileName);
|
||||
|
||||
saveGame(fileName, desc);
|
||||
int result = saveGame(fileName, desc);
|
||||
|
||||
if (result == errOK)
|
||||
messageBox("Game saved.");
|
||||
else
|
||||
messageBox("Error saving game.");
|
||||
|
||||
return errOK;
|
||||
return result;
|
||||
}
|
||||
|
||||
int AgiEngine::saveGameSimple() {
|
||||
char fileName[MAX_PATH];
|
||||
|
||||
sprintf(fileName, "%s", getSavegameFilename(0));
|
||||
saveGame(fileName, "Default savegame");
|
||||
|
||||
return errOK;
|
||||
int result = saveGame(fileName, "Default savegame");
|
||||
if (result != errOK)
|
||||
messageBox("Error saving game.");
|
||||
return result;
|
||||
}
|
||||
|
||||
int AgiEngine::loadGameDialog() {
|
||||
|
|
|
@ -40,26 +40,43 @@ namespace Agi {
|
|||
|
||||
#ifdef USE_IIGS_SOUND
|
||||
|
||||
/**
|
||||
* AGI engine sound envelope structure.
|
||||
*/
|
||||
struct SoundEnvelope {
|
||||
struct IIgsEnvelopeSegment {
|
||||
uint8 bp;
|
||||
uint8 incHi;
|
||||
uint8 inc_lo;
|
||||
uint16 inc; ///< 8b.8b fixed point, big endian?
|
||||
};
|
||||
|
||||
struct SoundWavelist {
|
||||
#define ENVELOPE_SEGMENT_COUNT 8
|
||||
struct IIgsEnvelope {
|
||||
IIgsEnvelopeSegment seg[ENVELOPE_SEGMENT_COUNT];
|
||||
};
|
||||
|
||||
// 2**(1/12) i.e. the 12th root of 2
|
||||
#define SEMITONE 1.059463094359295
|
||||
|
||||
struct IIgsWaveInfo {
|
||||
uint8 top;
|
||||
uint8 addr;
|
||||
uint8 size;
|
||||
// Oscillator channel (Bits 4-7 of mode-byte). Simplified to use only stereo here.
|
||||
#define MASK_OSC_CHANNEL (1 << 4)
|
||||
#define OSC_CHANNEL_LEFT (1 << 4)
|
||||
#define OSC_CHANNEL_RIGHT (0 << 4)
|
||||
// Oscillator halt bit (Bit 0 of mode-byte)
|
||||
#define MASK_OSC_HALT (1 << 0)
|
||||
#define OSC_HALT (1 << 0)
|
||||
// Oscillator mode (Bits 1 and 2 of mode-byte)
|
||||
#define MASK_OSC_MODE (3 << 1)
|
||||
#define OSC_MODE_LOOP (0 << 1)
|
||||
#define OSC_MODE_ONESHOT (1 << 1)
|
||||
#define OSC_MODE_SYNC_AM (2 << 1)
|
||||
#define OSC_MODE_SWAP (3 << 1)
|
||||
uint8 mode;
|
||||
uint8 relHi;
|
||||
uint8 relLo;
|
||||
uint16 relPitch; ///< 8b.8b fixed point, big endian?
|
||||
};
|
||||
|
||||
struct SoundInstrument {
|
||||
struct SoundEnvelope env[8];
|
||||
#define MAX_WAVE_COUNT 8
|
||||
struct IIgsInstrumentHeader {
|
||||
IIgsEnvelope env;
|
||||
uint8 relseg;
|
||||
uint8 priority;
|
||||
uint8 bendrange;
|
||||
|
@ -68,19 +85,19 @@ struct SoundInstrument {
|
|||
uint8 spare;
|
||||
uint8 wac;
|
||||
uint8 wbc;
|
||||
struct SoundWavelist wal[8];
|
||||
struct SoundWavelist wbl[8];
|
||||
IIgsWaveInfo wal[MAX_WAVE_COUNT];
|
||||
IIgsWaveInfo wbl[MAX_WAVE_COUNT];
|
||||
};
|
||||
|
||||
struct SoundIIgsSample {
|
||||
uint8 typeLo;
|
||||
uint8 typeHi;
|
||||
uint8 srateLo;
|
||||
uint8 srateHi;
|
||||
uint16 unknown[2];
|
||||
uint8 sizeLo;
|
||||
uint8 sizeHi;
|
||||
uint16 unknown2[13];
|
||||
struct IIgsSampleHeader {
|
||||
uint16 type;
|
||||
uint8 pitch; ///< Logarithmic, base is 2**(1/12), unknown multiplier (Possibly in range 1040-1080)
|
||||
uint8 unknownByte_Ofs3; // 0x7F in Gold Rush's sound resource 60, 0 in all others.
|
||||
uint8 volume; ///< Current guess: Logarithmic in 6 dB steps
|
||||
uint8 unknownByte_Ofs5; ///< 0 in all tested samples.
|
||||
uint16 instrumentSize; ///< Little endian. 44 in all tested samples. A guess.
|
||||
uint16 sampleSize; ///< Little endian. Accurate in all tested samples excluding Manhunter I's sound resource 16.
|
||||
IIgsInstrumentHeader instrument;
|
||||
};
|
||||
|
||||
#if 0
|
||||
|
@ -89,6 +106,117 @@ static int numInstruments;
|
|||
static uint8 *wave;
|
||||
#endif
|
||||
|
||||
bool readIIgsEnvelope(IIgsEnvelope &envelope, Common::SeekableReadStream &stream) {
|
||||
for (int segNum = 0; segNum < ENVELOPE_SEGMENT_COUNT; segNum++) {
|
||||
envelope.seg[segNum].bp = stream.readByte();
|
||||
envelope.seg[segNum].inc = stream.readUint16BE();
|
||||
}
|
||||
return !stream.ioFailed();
|
||||
}
|
||||
|
||||
bool readIIgsWaveInfo(IIgsWaveInfo &waveInfo, Common::SeekableReadStream &stream) {
|
||||
waveInfo.top = stream.readByte();
|
||||
waveInfo.addr = stream.readByte();
|
||||
waveInfo.size = stream.readByte();
|
||||
waveInfo.mode = stream.readByte();
|
||||
waveInfo.relPitch = stream.readUint16BE();
|
||||
return !stream.ioFailed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Read an Apple IIGS instrument header from the given stream.
|
||||
* @param header The header to which to write the data.
|
||||
* @param stream The source stream from which to read the data.
|
||||
* @return True if successful, false otherwise.
|
||||
*/
|
||||
bool readIIgsInstrumentHeader(IIgsInstrumentHeader &header, Common::SeekableReadStream &stream) {
|
||||
readIIgsEnvelope(header.env, stream);
|
||||
header.relseg = stream.readByte();
|
||||
header.priority = stream.readByte();
|
||||
header.bendrange = stream.readByte();
|
||||
header.vibdepth = stream.readByte();
|
||||
header.vibspeed = stream.readByte();
|
||||
header.spare = stream.readByte();
|
||||
header.wac = stream.readByte();
|
||||
header.wbc = stream.readByte();
|
||||
for (int waveA = 0; waveA < header.wac; waveA++) // Read A wave lists
|
||||
readIIgsWaveInfo(header.wal[waveA], stream);
|
||||
for (int waveB = 0; waveB < header.wbc; waveB++) // Read B wave lists
|
||||
readIIgsWaveInfo(header.wbl[waveB], stream);
|
||||
return !stream.ioFailed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Read an Apple IIGS AGI sample header from the given stream.
|
||||
* @param header The header to which to write the data.
|
||||
* @param stream The source stream from which to read the data.
|
||||
* @return True if successful, false otherwise.
|
||||
*/
|
||||
bool readIIgsSampleHeader(IIgsSampleHeader &header, Common::SeekableReadStream &stream) {
|
||||
header.type = stream.readUint16LE();
|
||||
header.pitch = stream.readByte();
|
||||
header.unknownByte_Ofs3 = stream.readByte();
|
||||
header.volume = stream.readByte();
|
||||
header.unknownByte_Ofs5 = stream.readByte();
|
||||
header.instrumentSize = stream.readUint16LE();
|
||||
header.sampleSize = stream.readUint16LE();
|
||||
return readIIgsInstrumentHeader(header.instrument, stream);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load an Apple IIGS AGI sample resource from the given stream and
|
||||
* create an AudioStream out of it.
|
||||
*
|
||||
* @param stream The source stream.
|
||||
* @param resnum Sound resource number. Optional. Used for error messages.
|
||||
* @return A non-null AudioStream pointer if successful, NULL otherwise.
|
||||
* @note In case of failure (i.e. NULL is returned), stream is reset back
|
||||
* to its original position and its I/O failed -status is cleared.
|
||||
* TODO: Add better handling of invalid resource number when printing error messages.
|
||||
* TODO: Add support for looping sounds.
|
||||
* FIXME: Fix sample rate calculation, it's probably not accurate at the moment.
|
||||
*/
|
||||
Audio::AudioStream *makeIIgsSampleStream(Common::SeekableReadStream &stream, int resnum = -1) {
|
||||
const uint32 startPos = stream.pos();
|
||||
IIgsSampleHeader header;
|
||||
Audio::AudioStream *result = NULL;
|
||||
bool readHeaderOk = readIIgsSampleHeader(header, stream);
|
||||
|
||||
// Check that the header was read ok and that it's of the correct type
|
||||
// and that there's room for the sample data in the stream.
|
||||
if (readHeaderOk && header.type == AGI_SOUND_SAMPLE) { // An Apple IIGS AGI sample resource
|
||||
uint32 tailLen = stream.size() - stream.pos();
|
||||
if (tailLen < header.sampleSize) { // Check if there's no room for the sample data in the stream
|
||||
// Apple IIGS Manhunter I: Sound resource 16 has only 16074 bytes
|
||||
// of sample data although header says it should have 16384 bytes.
|
||||
warning("Apple IIGS sample (%d) too short (%d bytes. Should be %d bytes). Using the part that's left", resnum, tailLen, header.sampleSize);
|
||||
header.sampleSize = (uint16) tailLen; // Use the part that's left
|
||||
}
|
||||
if (header.pitch > 0x7F) { // Check if the pitch is invalid
|
||||
warning("Apple IIGS sample (%d) has too high pitch (0x%02x)", resnum, header.pitch);
|
||||
header.pitch &= 0x7F; // Apple IIGS AGI probably did it this way too
|
||||
}
|
||||
// Allocate memory for the sample data and read it in
|
||||
byte *sampleData = (byte *) malloc(header.sampleSize);
|
||||
uint32 readBytes = stream.read(sampleData, header.sampleSize);
|
||||
if (readBytes == header.sampleSize) { // Check that we got all the data we requested
|
||||
// Make an audio stream from the mono, 8 bit, unsigned input data
|
||||
byte flags = Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED;
|
||||
int rate = (int) (1076 * pow(SEMITONE, header.pitch));
|
||||
result = Audio::makeLinearInputStream(sampleData, header.sampleSize, rate, flags, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// If couldn't make a sample out of the input stream for any reason then
|
||||
// rewind back to stream's starting position and clear I/O failed -status.
|
||||
if (result == NULL) {
|
||||
stream.seek(startPos);
|
||||
stream.clearIOFailed();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int playing;
|
||||
|
@ -169,7 +297,7 @@ void SoundMgr::unloadSound(int resnum) {
|
|||
}
|
||||
|
||||
void SoundMgr::decodeSound(int resnum) {
|
||||
#ifdef USE_IIGS_SOUND
|
||||
#if 0
|
||||
int type, size;
|
||||
int16 *buf;
|
||||
uint8 *src;
|
||||
|
@ -190,12 +318,12 @@ void SoundMgr::decodeSound(int resnum) {
|
|||
_vm->_game.sounds[resnum].rdata = (uint8 *) buf;
|
||||
free(src);
|
||||
}
|
||||
#endif /* USE_IIGS_SOUND */
|
||||
#endif
|
||||
}
|
||||
|
||||
void SoundMgr::startSound(int resnum, int flag) {
|
||||
int i, type;
|
||||
#ifdef USE_IIGS_SOUND
|
||||
#if 0
|
||||
struct SoundIIgsSample *smp;
|
||||
#endif
|
||||
|
||||
|
@ -218,7 +346,7 @@ void SoundMgr::startSound(int resnum, int flag) {
|
|||
song = (uint8 *)_vm->_game.sounds[resnum].rdata;
|
||||
|
||||
switch (type) {
|
||||
#ifdef USE_IIGS_SOUND
|
||||
#if 0
|
||||
case AGI_SOUND_SAMPLE:
|
||||
debugC(3, kDebugLevelSound, "IIGS sample");
|
||||
smp = (struct SoundIIgsSample *)_vm->_game.sounds[resnum].rdata;
|
||||
|
|
|
@ -364,7 +364,7 @@ int AgiEngine::selectionBox(const char *m, const char **b) {
|
|||
debugC(4, kDebugLevelText, "waiting...");
|
||||
for (;;) {
|
||||
for (i = 0; b[i]; i++)
|
||||
_gfx->drawButton(bx[i], by[i], b[i], i == active, 0, MSG_BOX_TEXT, MSG_BOX_COLOUR);
|
||||
_gfx->drawCurrentStyleButton(bx[i], by[i], b[i], i == active, false, i == 0);
|
||||
|
||||
_gfx->pollTimer(); /* msdos driver -> does nothing */
|
||||
key = doPollKeyboard();
|
||||
|
@ -555,7 +555,7 @@ char *AgiEngine::agiSprintf(const char *s) {
|
|||
break;
|
||||
case 's':
|
||||
i = strtoul(s, NULL, 10);
|
||||
safeStrcat(p, _game.strings[i]);
|
||||
safeStrcat(p, agiSprintf(_game.strings[i]));
|
||||
break;
|
||||
case 'm':
|
||||
i = strtoul(s, NULL, 10) - 1;
|
||||
|
|
|
@ -148,10 +148,6 @@ AGOSEngine::AGOSEngine(OSystem *syst)
|
|||
_itemArraySize = 0;
|
||||
_itemArrayInited = 0;
|
||||
|
||||
_itemHeapPtr = 0;
|
||||
_itemHeapCurPos = 0;
|
||||
_itemHeapSize = 0;
|
||||
|
||||
_iconFilePtr = 0;
|
||||
|
||||
_codePtr = 0;
|
||||
|
@ -824,7 +820,7 @@ void AGOSEngine_Waxworks::setupGame() {
|
|||
_numTextBoxes = 10;
|
||||
_numVars = 255;
|
||||
|
||||
_numMusic = 9;
|
||||
_numMusic = 26;
|
||||
|
||||
AGOSEngine::setupGame();
|
||||
}
|
||||
|
@ -920,7 +916,11 @@ AGOSEngine::~AGOSEngine() {
|
|||
|
||||
_midi.close();
|
||||
|
||||
free(_itemHeapPtr - _itemHeapCurPos);
|
||||
for (uint i = 0; i < _itemHeap.size(); i++) {
|
||||
delete [] _itemHeap[i];
|
||||
}
|
||||
_itemHeap.clear();
|
||||
|
||||
free(_tablesHeapPtr - _tablesHeapCurPos);
|
||||
|
||||
free(_gameOffsetsPtr);
|
||||
|
@ -1054,7 +1054,11 @@ void AGOSEngine::shutdown() {
|
|||
|
||||
_midi.close();
|
||||
|
||||
free(_itemHeapPtr - _itemHeapCurPos);
|
||||
for (uint i = 0; i < _itemHeap.size(); i++) {
|
||||
delete [] _itemHeap[i];
|
||||
}
|
||||
_itemHeap.clear();
|
||||
|
||||
free(_tablesHeapPtr - _tablesHeapCurPos);
|
||||
|
||||
free(_gameOffsetsPtr);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "engines/engine.h"
|
||||
|
||||
#include "common/array.h"
|
||||
#include "common/keyboard.h"
|
||||
#include "common/rect.h"
|
||||
#include "common/util.h"
|
||||
|
@ -231,9 +232,7 @@ protected:
|
|||
uint _itemArraySize;
|
||||
uint _itemArrayInited;
|
||||
|
||||
byte *_itemHeapPtr;
|
||||
uint _itemHeapCurPos;
|
||||
uint _itemHeapSize;
|
||||
Common::Array<byte *> _itemHeap;
|
||||
|
||||
byte *_iconFilePtr;
|
||||
|
||||
|
|
|
@ -542,6 +542,32 @@ static const AGOSGameDescription gameDescriptions[] = {
|
|||
GF_OLD_BUNDLE | GF_CRUNCHED | GF_CRUNCHED_GAMEPC | GF_PLANAR
|
||||
},
|
||||
|
||||
// Waxworks - German Amiga Floppy
|
||||
{
|
||||
{
|
||||
"waxworks",
|
||||
"Floppy",
|
||||
|
||||
{
|
||||
{ "gameamiga", GAME_BASEFILE, "2938a17103de603c4c6f05e6a433b365", -1},
|
||||
{ "icon.pkd", GAME_ICONFILE, "4822a91c18b1b2005ac17fc617f7dcbe", -1},
|
||||
{ "menus.dat", GAME_MENUFILE, "3409eeb8ca8b46fc04da99de67573f5e", -1},
|
||||
{ "start", GAME_RESTFILE, "b575b336e741dde1725edd4079d5ab67", -1},
|
||||
{ "stripped.txt", GAME_STRFILE, "6faaebff2786216900061eeb978f10af", -1},
|
||||
{ "tbllist", GAME_TBLFILE, "95c44bfc380770a6b6dd0dfcc69e80a0", -1},
|
||||
{ "xtbllist", GAME_XTBLFILE, "6c7b3db345d46349a5226f695c03e20f", -1},
|
||||
{ NULL, 0, NULL, 0}
|
||||
},
|
||||
Common::DE_DEU,
|
||||
Common::kPlatformAmiga,
|
||||
Common::ADGF_NO_FLAGS
|
||||
},
|
||||
|
||||
GType_WW,
|
||||
GID_WAXWORKS,
|
||||
GF_OLD_BUNDLE | GF_CRUNCHED | GF_CRUNCHED_GAMEPC | GF_PLANAR
|
||||
},
|
||||
|
||||
// Waxworks - English DOS Floppy Demo
|
||||
{
|
||||
{
|
||||
|
|
|
@ -196,7 +196,7 @@ void AGOSEngine::waitForInput() {
|
|||
|
||||
for (;;) {
|
||||
if ((getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) &&
|
||||
_keyPressed.keycode == Common::KEYCODE_HASH)
|
||||
_keyPressed.keycode == Common::KEYCODE_F10)
|
||||
displayBoxStars();
|
||||
if (processSpecialKeys()) {
|
||||
if ((getGameType() == GType_PP && getGameId() != GID_DIMP) ||
|
||||
|
|
|
@ -42,24 +42,15 @@ Child *AGOSEngine::allocateChildBlock(Item *i, uint type, uint size) {
|
|||
}
|
||||
|
||||
byte *AGOSEngine::allocateItem(uint size) {
|
||||
byte *org = _itemHeapPtr;
|
||||
size = (size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
|
||||
byte *item = new byte[size];
|
||||
|
||||
_itemHeapPtr += size;
|
||||
_itemHeapCurPos += size;
|
||||
|
||||
if (_itemHeapCurPos > _itemHeapSize)
|
||||
error("allocateItem: Itemheap overflow");
|
||||
|
||||
return org;
|
||||
memset(item, 0, size);
|
||||
_itemHeap.push_back(item);
|
||||
return item;
|
||||
}
|
||||
|
||||
void AGOSEngine::allocItemHeap() {
|
||||
_itemHeapSize = _itemMemSize;
|
||||
_itemHeapCurPos = 0;
|
||||
_itemHeapPtr = (byte *)calloc(_itemMemSize, 1);
|
||||
if (!_itemHeapPtr)
|
||||
error("Out Of Memory - Items");
|
||||
_itemHeap.clear();
|
||||
}
|
||||
|
||||
bool AGOSEngine::hasIcon(Item *item) {
|
||||
|
@ -391,8 +382,13 @@ int AGOSEngine::wordMatch(Item *item, int16 a, int16 n) {
|
|||
}
|
||||
|
||||
Item *AGOSEngine::derefItem(uint item) {
|
||||
if (item >= _itemArraySize)
|
||||
error("derefItem: invalid item %d", item);
|
||||
// Occurs when loading item store from restart state in
|
||||
// Elvira 2 (Amiga/AtariST) and Waxworks (Amiga).
|
||||
if (item >= _itemArraySize) {
|
||||
debug(0, "derefItem: invalid item %d", item);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return _itemArrayPtr[item];
|
||||
}
|
||||
|
||||
|
|
|
@ -139,9 +139,56 @@ void AGOSEngine::loadMusic(uint16 music) {
|
|||
_nextMusicToPlay = -1;
|
||||
}
|
||||
|
||||
struct ModuleOffs {
|
||||
uint8 tune;
|
||||
uint8 fileNum;
|
||||
uint32 offs;
|
||||
};
|
||||
|
||||
static const ModuleOffs amigaWaxworksOffs[20] = {
|
||||
// Pyramid
|
||||
{2, 2, 0, },
|
||||
{3, 2, 50980},
|
||||
{4, 2, 56160},
|
||||
{5, 2, 62364},
|
||||
{6, 2, 73688},
|
||||
|
||||
// Zombie
|
||||
{8, 8, 0},
|
||||
{11, 8, 51156},
|
||||
{12, 8, 56336},
|
||||
{13, 8, 65612},
|
||||
{14, 8, 68744},
|
||||
|
||||
// Mine
|
||||
{9, 9, 0},
|
||||
{15, 9, 47244},
|
||||
{16, 9, 52424},
|
||||
{17, 9, 59652},
|
||||
{18, 9, 62784},
|
||||
|
||||
// Jack
|
||||
{10, 10, 0},
|
||||
{19, 10, 42054},
|
||||
{20, 10, 47234},
|
||||
{21, 10, 49342},
|
||||
{22, 10, 51450},
|
||||
};
|
||||
|
||||
void AGOSEngine::playModule(uint16 music) {
|
||||
char filename[15];
|
||||
File f;
|
||||
uint32 offs = 0;
|
||||
|
||||
if (getPlatform() == Common::kPlatformAmiga && getGameType() == GType_WW) {
|
||||
// Multiple tunes are stored in music files for main locations
|
||||
for (uint i = 0; i < 20; i++) {
|
||||
if (amigaWaxworksOffs[i].tune == music) {
|
||||
music = amigaWaxworksOffs[i].fileNum;
|
||||
offs = amigaWaxworksOffs[i].offs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (getGameType() == GType_ELVIRA1 && getFeatures() & GF_DEMO)
|
||||
sprintf(filename, "elvira2");
|
||||
|
@ -159,21 +206,21 @@ void AGOSEngine::playModule(uint16 music) {
|
|||
if (!(getGameType() == GType_ELVIRA1 && getFeatures() & GF_DEMO) &&
|
||||
getFeatures() & GF_CRUNCHED) {
|
||||
|
||||
uint srcSize = f.size();
|
||||
uint32 srcSize = f.size();
|
||||
byte *srcBuf = (byte *)malloc(srcSize);
|
||||
if (f.read(srcBuf, srcSize) != srcSize)
|
||||
error("playModule: Read failed");
|
||||
|
||||
uint dstSize = READ_BE_UINT32(srcBuf + srcSize - 4);
|
||||
uint32 dstSize = READ_BE_UINT32(srcBuf + srcSize - 4);
|
||||
byte *dstBuf = (byte *)malloc(dstSize);
|
||||
decrunchFile(srcBuf, dstBuf, srcSize);
|
||||
free(srcBuf);
|
||||
|
||||
Common::MemoryReadStream stream(dstBuf, dstSize);
|
||||
audioStream = Audio::makeProtrackerStream(&stream, _mixer->getOutputRate());
|
||||
audioStream = Audio::makeProtrackerStream(&stream, offs);
|
||||
free(dstBuf);
|
||||
} else {
|
||||
audioStream = Audio::makeProtrackerStream(&f, _mixer->getOutputRate());
|
||||
audioStream = Audio::makeProtrackerStream(&f);
|
||||
}
|
||||
|
||||
_mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_modHandle, audioStream);
|
||||
|
|
|
@ -1190,7 +1190,7 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) {
|
|||
addTimeEvent(timeout, subroutine_id);
|
||||
}
|
||||
|
||||
if (getGameType() == GType_WW) {
|
||||
if (getGameType() == GType_WW && getPlatform() == Common::kPlatformPC) {
|
||||
// TODO Load room state data
|
||||
for (uint s = 0; s <= _numRoomStates; s++) {
|
||||
f->readUint16BE();
|
||||
|
@ -1202,7 +1202,8 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) {
|
|||
for (num = _itemArrayInited - 1; num; num--) {
|
||||
Item *item = _itemArrayPtr[item_index++], *parent_item;
|
||||
|
||||
if (getGameType() == GType_ELVIRA2) {
|
||||
if ((getGameType() == GType_WW && getPlatform() == Common::kPlatformAmiga) ||
|
||||
getGameType() == GType_ELVIRA2) {
|
||||
parent_item = derefItem(readItemID(f));
|
||||
setItemParent(item, parent_item);
|
||||
} else {
|
||||
|
@ -1342,7 +1343,7 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) {
|
|||
f->writeUint16BE(te->subroutine_id);
|
||||
}
|
||||
|
||||
if (getGameType() == GType_WW) {
|
||||
if (getGameType() == GType_WW && getPlatform() == Common::kPlatformPC) {
|
||||
// TODO Save room state data
|
||||
for (uint s = 0; s <= _numRoomStates; s++) {
|
||||
f->writeUint16BE(0);
|
||||
|
@ -1354,7 +1355,8 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) {
|
|||
for (num_item = _itemArrayInited - 1; num_item; num_item--) {
|
||||
Item *item = _itemArrayPtr[item_index++];
|
||||
|
||||
if (getGameType() == GType_ELVIRA2) {
|
||||
if ((getGameType() == GType_WW && getPlatform() == Common::kPlatformAmiga) ||
|
||||
getGameType() == GType_ELVIRA2) {
|
||||
writeItemID(f, item->parent);
|
||||
} else {
|
||||
f->writeUint16BE(item->parent);
|
||||
|
|
|
@ -292,7 +292,9 @@ Audio::AudioStream *MP3Sound::makeAudioStream(uint sound) {
|
|||
|
||||
uint32 size = _offsets[sound + i] - _offsets[sound];
|
||||
|
||||
return Audio::makeMP3Stream(_file, size);
|
||||
Common::MemoryReadStream *tmp = _file->readStream(size);
|
||||
assert(tmp);
|
||||
return Audio::makeMP3Stream(tmp, true);
|
||||
}
|
||||
|
||||
void MP3Sound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, byte flags, int vol) {
|
||||
|
@ -321,7 +323,9 @@ Audio::AudioStream *VorbisSound::makeAudioStream(uint sound) {
|
|||
|
||||
uint32 size = _offsets[sound + i] - _offsets[sound];
|
||||
|
||||
return Audio::makeVorbisStream(_file, size);
|
||||
Common::MemoryReadStream *tmp = _file->readStream(size);
|
||||
assert(tmp);
|
||||
return Audio::makeVorbisStream(tmp, true);
|
||||
}
|
||||
|
||||
void VorbisSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, byte flags, int vol) {
|
||||
|
@ -350,7 +354,9 @@ Audio::AudioStream *FlacSound::makeAudioStream(uint sound) {
|
|||
|
||||
uint32 size = _offsets[sound + i] - _offsets[sound];
|
||||
|
||||
return Audio::makeFlacStream(_file, size);
|
||||
Common::MemoryReadStream *tmp = _file->readStream(size);
|
||||
assert(tmp);
|
||||
return Audio::makeFlacStream(tmp, true);
|
||||
}
|
||||
|
||||
void FlacSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, byte flags, int vol) {
|
||||
|
|
|
@ -44,6 +44,25 @@ void AGOSEngine::unfreezeBottom() {
|
|||
_vgaFrozenBase = _vgaRealBase;
|
||||
}
|
||||
|
||||
static const uint8 zoneTable[160] = {
|
||||
0, 0, 2, 2, 2, 2, 0, 2, 2, 2,
|
||||
3, 0, 0, 0, 0, 0, 0, 0, 1, 0,
|
||||
3, 3, 3, 1, 3, 0, 0, 0, 1, 0,
|
||||
2, 0, 3, 0, 3, 3, 0, 1, 1, 0,
|
||||
1, 2, 2, 2, 0, 2, 2, 2, 0, 2,
|
||||
1, 2, 2, 2, 0, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 1, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 0, 2, 0, 3, 2, 2, 2, 3,
|
||||
2, 3, 3, 3, 1, 3, 3, 1, 1, 0,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 0, 0, 2, 2, 0,
|
||||
0, 2, 0, 2, 2, 2, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 2, 2, 2, 2, 2,
|
||||
2, 0, 2, 0, 0, 2, 2, 0, 2, 2,
|
||||
2, 2, 2, 2, 2, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
void AGOSEngine::loadZone(uint16 zoneNum) {
|
||||
VgaPointersEntry *vpe;
|
||||
|
||||
|
@ -56,7 +75,13 @@ void AGOSEngine::loadZone(uint16 zoneNum) {
|
|||
// Loading order is important
|
||||
// due to resource managment
|
||||
|
||||
if (getPlatform() == Common::kPlatformAmiga && getGameType() == GType_WW &&
|
||||
zoneTable[zoneNum] == 3) {
|
||||
uint8 num = (zoneNum >= 85) ? 94 : 18;
|
||||
loadVGAVideoFile(num, 2);
|
||||
} else {
|
||||
loadVGAVideoFile(zoneNum, 2);
|
||||
}
|
||||
vpe->vgaFile2 = _block;
|
||||
vpe->vgaFile2End = _blockEnd;
|
||||
|
||||
|
|
183
engines/drascula/detection.cpp
Normal file
183
engines/drascula/detection.cpp
Normal file
|
@ -0,0 +1,183 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/stdafx.h"
|
||||
|
||||
#include "base/plugins.h"
|
||||
|
||||
#include "common/advancedDetector.h"
|
||||
#include "common/file.h"
|
||||
|
||||
#include "drascula/drascula.h"
|
||||
|
||||
|
||||
namespace Drascula {
|
||||
|
||||
struct DrasculaGameDescription {
|
||||
Common::ADGameDescription desc;
|
||||
|
||||
int gameID;
|
||||
int gameType;
|
||||
uint32 features;
|
||||
uint16 version;
|
||||
};
|
||||
|
||||
uint32 DrasculaEngine::getGameID() const {
|
||||
return _gameDescription->gameID;
|
||||
}
|
||||
|
||||
uint32 DrasculaEngine::getFeatures() const {
|
||||
return _gameDescription->features;
|
||||
}
|
||||
|
||||
Common::Platform DrasculaEngine::getPlatform() const {
|
||||
return _gameDescription->desc.platform;
|
||||
}
|
||||
|
||||
uint16 DrasculaEngine::getVersion() const {
|
||||
return _gameDescription->version;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static const PlainGameDescriptor drasculaGames[] = {
|
||||
{"drascula", "Drascula game"},
|
||||
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
|
||||
namespace Drascula {
|
||||
|
||||
static const DrasculaGameDescription gameDescriptions[] = {
|
||||
|
||||
{
|
||||
// Drascula English version
|
||||
{
|
||||
"drascula",
|
||||
"English",
|
||||
AD_ENTRY1("14.ald", "09b2735953edcd43af115c65ae00b10e"),
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformPC,
|
||||
Common::ADGF_NO_FLAGS
|
||||
},
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
|
||||
{
|
||||
// Drascula Spanish version
|
||||
{
|
||||
"drascula",
|
||||
"Spanish",
|
||||
AD_ENTRY1("14.ald", "0746ed1a5cc8d9728f790c29813f4b43"),
|
||||
Common::ES_ESP,
|
||||
Common::kPlatformPC,
|
||||
Common::ADGF_NO_FLAGS
|
||||
},
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
|
||||
{ AD_TABLE_END_MARKER, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
/**
|
||||
* The fallback game descriptor used by the Drascula engine's fallbackDetector.
|
||||
* Contents of this struct are to be overwritten by the fallbackDetector.
|
||||
*/
|
||||
static DrasculaGameDescription g_fallbackDesc = {
|
||||
{
|
||||
"", // Not used by the fallback descriptor, it uses the EncapsulatedADGameDesc's gameid
|
||||
"", // Not used by the fallback descriptor, it uses the EncapsulatedADGameDesc's extra
|
||||
AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
|
||||
Common::UNK_LANG,
|
||||
Common::kPlatformPC,
|
||||
Common::ADGF_NO_FLAGS
|
||||
},
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
||||
Common::EncapsulatedADGameDesc fallbackDetector(const FSList *fslist) {
|
||||
// Set the default values for the fallback descriptor's ADGameDescription part.
|
||||
g_fallbackDesc.desc.language = Common::UNK_LANG;
|
||||
g_fallbackDesc.desc.platform = Common::kPlatformPC;
|
||||
g_fallbackDesc.desc.flags = Common::ADGF_NO_FLAGS;
|
||||
|
||||
// Set default values for the fallback descriptor's DrasculaGameDescription part.
|
||||
g_fallbackDesc.gameID = 0;
|
||||
g_fallbackDesc.features = 0;
|
||||
g_fallbackDesc.version = 0;
|
||||
|
||||
Common::EncapsulatedADGameDesc result;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
} // End of namespace Drascula
|
||||
|
||||
static const Common::ADParams detectionParams = {
|
||||
// Pointer to ADGameDescription or its superset structure
|
||||
(const byte *)Drascula::gameDescriptions,
|
||||
// Size of that superset structure
|
||||
sizeof(Drascula::DrasculaGameDescription),
|
||||
// Number of bytes to compute MD5 sum for
|
||||
5000,
|
||||
// List of all engine targets
|
||||
drasculaGames,
|
||||
// Structure for autoupgrading obsolete targets
|
||||
0,
|
||||
// Name of single gameid (optional)
|
||||
"drascula",
|
||||
// List of files for file-based fallback detection (optional)
|
||||
0,
|
||||
// Fallback callback
|
||||
Drascula::fallbackDetector,
|
||||
// Flags
|
||||
Common::kADFlagAugmentPreferredTarget
|
||||
};
|
||||
|
||||
ADVANCED_DETECTOR_DEFINE_PLUGIN(DRASCULA, Drascula::DrasculaEngine, detectionParams);
|
||||
|
||||
REGISTER_PLUGIN(DRASCULA, "Drascula Engine", "Drascula Engine (C) 2000 Alcachofa Soft, 1996 (C) Digital Dreams Multimedia, 1994 (C) Emilio de Paz");
|
||||
|
||||
namespace Drascula {
|
||||
|
||||
bool DrasculaEngine::initGame() {
|
||||
Common::EncapsulatedADGameDesc encapsulatedDesc = Common::AdvancedDetector::detectBestMatchingGame(detectionParams);
|
||||
_gameDescription = (const DrasculaGameDescription *)(encapsulatedDesc.realDesc);
|
||||
|
||||
return (_gameDescription != 0);
|
||||
}
|
||||
|
||||
} // End of namespace Drascula
|
||||
|
6859
engines/drascula/drascula.cpp
Normal file
6859
engines/drascula/drascula.cpp
Normal file
File diff suppressed because it is too large
Load diff
702
engines/drascula/drascula.h
Normal file
702
engines/drascula/drascula.h
Normal file
|
@ -0,0 +1,702 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DRASCULA_H
|
||||
#define DRASCULA_H
|
||||
|
||||
#include "common/stdafx.h"
|
||||
#include "common/scummsys.h"
|
||||
#include "common/endian.h"
|
||||
#include "common/util.h"
|
||||
#include "common/file.h"
|
||||
#include "common/savefile.h"
|
||||
#include "common/system.h"
|
||||
#include "common/hash-str.h"
|
||||
#include "common/events.h"
|
||||
#include "common/keyboard.h"
|
||||
|
||||
#include "sound/audiostream.h"
|
||||
#include "sound/mixer.h"
|
||||
#include "sound/voc.h"
|
||||
#include "sound/audiocd.h"
|
||||
|
||||
#include "engines/engine.h"
|
||||
|
||||
namespace Drascula {
|
||||
|
||||
enum DrasculaGameFeatures {
|
||||
};
|
||||
|
||||
struct DrasculaGameDescription;
|
||||
|
||||
#define NUM_SAVES 10
|
||||
#define NUM_BANDERAS 50
|
||||
#define ESC 0x01
|
||||
#define F1 0x3B
|
||||
#define F2 0x3C
|
||||
#define F3 0x3D
|
||||
#define F4 0x3E
|
||||
#define F5 0x3F
|
||||
#define F6 0x40
|
||||
#define F8 0x42
|
||||
#define F9 0x43
|
||||
#define F10 0x44
|
||||
#define MIRAR 1
|
||||
#define COGER 2
|
||||
#define ABRIR 3
|
||||
#define CERRAR 4
|
||||
#define HABLAR 5
|
||||
#define MOVER 6
|
||||
#define INICISOUND 6
|
||||
#define FINALSOUND 8
|
||||
#define FINDRV 9
|
||||
#define DIF_MASK 55
|
||||
#define ANCHOBJ 40
|
||||
#define ALTOBJ 25
|
||||
|
||||
#define X_OBJ1 5
|
||||
#define Y_OBJ1 10
|
||||
#define X_OBJ2 50
|
||||
#define Y_OBJ2 10
|
||||
#define X_OBJ3 95
|
||||
#define Y_OBJ3 10
|
||||
#define X_OBJ4 140
|
||||
#define Y_OBJ4 10
|
||||
#define X_OBJ5 185
|
||||
#define Y_OBJ5 10
|
||||
#define X_OBJ6 230
|
||||
#define Y_OBJ6 10
|
||||
#define X_OBJ7 275
|
||||
#define Y_OBJ7 10
|
||||
#define X_OBJ8 5
|
||||
#define Y_OBJ8 40
|
||||
#define X_OBJ9 50
|
||||
#define Y_OBJ9 40
|
||||
#define X_OBJ10 95
|
||||
#define Y_OBJ10 40
|
||||
#define X_OBJ11 140
|
||||
#define Y_OBJ11 40
|
||||
#define X_OBJ12 185
|
||||
#define Y_OBJ12 40
|
||||
#define X_OBJ13 230
|
||||
#define Y_OBJ13 40
|
||||
#define X_OBJ14 275
|
||||
#define Y_OBJ14 40
|
||||
#define X_OBJ15 5
|
||||
#define Y_OBJ15 70
|
||||
#define X_OBJ16 50
|
||||
#define Y_OBJ16 70
|
||||
#define X_OBJ17 95
|
||||
#define Y_OBJ17 70
|
||||
#define X_OBJ18 140
|
||||
#define Y_OBJ18 70
|
||||
#define X_OBJ19 185
|
||||
#define Y_OBJ19 70
|
||||
#define X_OBJ20 230
|
||||
#define Y_OBJ20 70
|
||||
#define X_OBJ21 275
|
||||
#define Y_OBJ21 70
|
||||
#define X_OBJ22 5
|
||||
#define Y_OBJ22 100
|
||||
#define X_OBJ23 50
|
||||
#define Y_OBJ23 100
|
||||
#define X_OBJ24 95
|
||||
#define Y_OBJ24 100
|
||||
#define X_OBJ25 140
|
||||
#define Y_OBJ25 100
|
||||
#define X_OBJ26 185
|
||||
#define Y_OBJ26 100
|
||||
#define X_OBJ27 230
|
||||
#define Y_OBJ27 100
|
||||
#define X_OBJ28 275
|
||||
#define Y_OBJ28 100
|
||||
#define X_OBJ29 5
|
||||
#define Y_OBJ29 130
|
||||
#define X_OBJ30 50
|
||||
#define Y_OBJ30 130
|
||||
#define X_OBJ31 95
|
||||
#define Y_OBJ31 130
|
||||
#define X_OBJ32 140
|
||||
#define Y_OBJ32 130
|
||||
#define X_OBJ33 185
|
||||
#define Y_OBJ33 130
|
||||
#define X_OBJ34 230
|
||||
#define Y_OBJ34 130
|
||||
#define X_OBJ35 275
|
||||
#define Y_OBJ35 130
|
||||
#define X_OBJ36 5
|
||||
#define Y_OBJ36 160
|
||||
#define X_OBJ37 50
|
||||
#define Y_OBJ37 160
|
||||
#define X_OBJ38 95
|
||||
#define Y_OBJ38 160
|
||||
#define X_OBJ39 140
|
||||
#define Y_OBJ39 160
|
||||
#define X_OBJ40 185
|
||||
#define Y_OBJ40 160
|
||||
#define X_OBJ41 230
|
||||
#define Y_OBJ41 160
|
||||
#define X_OBJ42 275
|
||||
#define Y_OBJ42 160
|
||||
#define X_OBJ43 275
|
||||
#define Y_OBJ43 160
|
||||
|
||||
#define DIF_MASK_HARE 72
|
||||
#define DIF_MASK_ABC 22
|
||||
#define ANCHO_LETRAS 8
|
||||
#define ALTO_LETRAS 6
|
||||
|
||||
#define Y_ABC 158
|
||||
#define Y_SIGNOS 169
|
||||
#define Y_ACENTOS 180
|
||||
|
||||
#define X_A 6
|
||||
#define X_B 15
|
||||
#define X_C 24
|
||||
#define X_D 33
|
||||
#define X_E 42
|
||||
#define X_F 51
|
||||
#define X_G 60
|
||||
#define X_H 69
|
||||
#define X_I 78
|
||||
#define X_J 87
|
||||
#define X_K 96
|
||||
#define X_L 105
|
||||
#define X_M 114
|
||||
#define X_N 123
|
||||
#define X_GN 132
|
||||
#define X_O 141
|
||||
#define X_P 150
|
||||
#define X_Q 159
|
||||
#define X_R 168
|
||||
#define X_S 177
|
||||
#define X_T 186
|
||||
#define X_U 195
|
||||
#define X_V 204
|
||||
#define X_W 213
|
||||
#define X_X 222
|
||||
#define X_Y 231
|
||||
#define X_Z 240
|
||||
#define X_PUNTO 6
|
||||
#define X_COMA 15
|
||||
#define X_GUION 24
|
||||
#define X_CIERRA_INTERROGACION 33
|
||||
#define X_ABRE_INTERROGACION 42
|
||||
#define X_COMILLAS 51
|
||||
#define X_CIERRA_EXCLAMACION 60
|
||||
#define X_ABRE_EXCLAMACION 69
|
||||
#define X_PUNTO_Y_COMA 78
|
||||
#define X_MAYOR_QUE 87
|
||||
#define X_MENOR_QUE 96
|
||||
#define X_DOLAR 105
|
||||
#define X_POR_CIENTO 114
|
||||
#define X_DOS_PUNTOS 123
|
||||
#define X_AND 132
|
||||
#define X_BARRA 141
|
||||
#define X_ABRE_PARENTESIS 150
|
||||
#define X_CIERRA_PARENTESIS 159
|
||||
#define X_ASTERISCO 168
|
||||
#define X_MAS 177
|
||||
#define X_N1 186
|
||||
#define X_N2 195
|
||||
#define X_N3 204
|
||||
#define X_N4 213
|
||||
#define X_N5 222
|
||||
#define X_N6 231
|
||||
#define X_N7 240
|
||||
#define X_N8 249
|
||||
#define X_N9 258
|
||||
#define X_N0 267
|
||||
#define ESPACIO 250
|
||||
#define ALTO_HABLA_HARE 25
|
||||
#define ANCHO_HABLA_HARE 23
|
||||
#define VON_BRAUN 1
|
||||
#define AZUL_OSCURO 2
|
||||
#define VERDE_CLARO 3
|
||||
#define VERDE_OSCURO 4
|
||||
#define AMARILLO 5
|
||||
#define NARANJA 6
|
||||
#define ROJO 7
|
||||
#define MARRON 8
|
||||
#define MORADO 9
|
||||
#define BLANCO 10
|
||||
#define ROSA 11
|
||||
#define PASO_HARE_X 8
|
||||
#define PASO_HARE_Y 3
|
||||
#define ALTO_PERSONAJE 70
|
||||
#define ANCHO_PERSONAJE 43
|
||||
#define PIES_HARE 12
|
||||
|
||||
#define ANCHO_LETRAS_OPC 6
|
||||
#define ALTO_LETRAS_OPC 5
|
||||
#define Y_ABC_OPC_1 6
|
||||
#define Y_SIGNOS_OPC_1 15
|
||||
#define Y_ABC_OPC_2 31
|
||||
#define Y_SIGNOS_OPC_2 40
|
||||
#define Y_ABC_OPC_3 56
|
||||
#define Y_SIGNOS_OPC_3 65
|
||||
#define X_A_OPC 10
|
||||
#define X_B_OPC 17
|
||||
#define X_C_OPC 24
|
||||
#define X_D_OPC 31
|
||||
#define X_E_OPC 38
|
||||
#define X_F_OPC 45
|
||||
#define X_G_OPC 52
|
||||
#define X_H_OPC 59
|
||||
#define X_I_OPC 66
|
||||
#define X_J_OPC 73
|
||||
#define X_K_OPC 80
|
||||
#define X_L_OPC 87
|
||||
#define X_M_OPC 94
|
||||
#define X_N_OPC 101
|
||||
#define X_GN_OPC 108
|
||||
#define X_O_OPC 115
|
||||
#define X_P_OPC 122
|
||||
#define X_Q_OPC 129
|
||||
#define X_R_OPC 136
|
||||
#define X_S_OPC 143
|
||||
#define X_T_OPC 150
|
||||
#define X_U_OPC 157
|
||||
#define X_V_OPC 164
|
||||
#define X_W_OPC 171
|
||||
#define X_X_OPC 178
|
||||
#define X_Y_OPC 185
|
||||
#define X_Z_OPC 192
|
||||
#define ESPACIO_OPC 199
|
||||
#define X_PUNTO_OPC 10
|
||||
#define X_COMA_OPC 17
|
||||
#define X_GUION_OPC 24
|
||||
#define X_CIERRA_INTERROGACION_OPC 31
|
||||
#define X_ABRE_INTERROGACION_OPC 38
|
||||
#define X_COMILLAS_OPC 45
|
||||
#define X_CIERRA_EXCLAMACION_OPC 52
|
||||
#define X_ABRE_EXCLAMACION_OPC 59
|
||||
#define X_PUNTO_Y_COMA_OPC 66
|
||||
#define X_MAYOR_QUE_OPC 73
|
||||
#define X_MENOR_QUE_OPC 80
|
||||
#define X_DOLAR_OPC 87
|
||||
#define X_POR_CIENTO_OPC 94
|
||||
#define X_DOS_PUNTOS_OPC 101
|
||||
#define X_AND_OPC 108
|
||||
#define X_BARRA_OPC 115
|
||||
#define X_ABRE_PARENTESIS_OPC 122
|
||||
#define X_CIERRA_PARENTESIS_OPC 129
|
||||
#define X_ASTERISCO_OPC 136
|
||||
#define X_MAS_OPC 143
|
||||
#define X_N1_OPC 150
|
||||
#define X_N2_OPC 157
|
||||
#define X_N3_OPC 164
|
||||
#define X_N4_OPC 171
|
||||
#define X_N5_OPC 178
|
||||
#define X_N6_OPC 185
|
||||
#define X_N7_OPC 192
|
||||
#define X_N8_OPC 199
|
||||
#define X_N9_OPC 206
|
||||
#define X_N0_OPC 213
|
||||
#define NO_PUERTA 99
|
||||
|
||||
#define INIT_FRAME 0
|
||||
#define CMP_RLE 1
|
||||
#define CMP_OFF 2
|
||||
#define END_ANIM 3
|
||||
#define SET_PALET 4
|
||||
#define MOUSE_KEY 5
|
||||
#define EMPTY_FRAME 6
|
||||
|
||||
#define COMPLETA 256
|
||||
#define MEDIA 128
|
||||
|
||||
class DrasculaEngine : public ::Engine {
|
||||
int _gameId;
|
||||
Common::KeyState _keyPressed;
|
||||
|
||||
protected:
|
||||
|
||||
int init();
|
||||
int go();
|
||||
// void shutdown();
|
||||
|
||||
bool initGame();
|
||||
|
||||
public:
|
||||
DrasculaEngine(OSystem *syst);
|
||||
virtual ~DrasculaEngine();
|
||||
int getGameId() {
|
||||
return _gameId;
|
||||
}
|
||||
|
||||
Common::RandomSource *_rnd;
|
||||
const DrasculaGameDescription *_gameDescription;
|
||||
uint32 getGameID() const;
|
||||
uint32 getFeatures() const;
|
||||
uint16 getVersion() const;
|
||||
Common::Platform getPlatform() const;
|
||||
void update_events();
|
||||
|
||||
Audio::SoundHandle _soundHandle;
|
||||
|
||||
void asigna_memoria();
|
||||
void libera_memoria();
|
||||
void carga_info();
|
||||
void salir_al_dos(int r);
|
||||
|
||||
void lee_dibujos(const char *);
|
||||
void descomprime_dibujo(byte *dir_escritura, int plt);
|
||||
|
||||
typedef char DacPalette256[256][3];
|
||||
|
||||
void asigna_rgb(byte *dir_lectura, int plt);
|
||||
void funde_rgb(int plt);
|
||||
void paleta_hare();
|
||||
void ActualizaPaleta();
|
||||
void setvgapalette256(byte *PalBuf);
|
||||
void DIBUJA_FONDO(int xorg, int yorg, int xdes, int ydes, int Ancho,
|
||||
int Alto, byte *Origen, byte *Destino);
|
||||
void DIBUJA_BLOQUE(int xorg, int yorg, int xdes, int ydes, int Ancho,
|
||||
int Alto, byte *Origen, byte *Destino);
|
||||
void DIBUJA_BLOQUE_CUT(int *Array, byte *Origen, byte *Destino);
|
||||
void VUELCA_PANTALLA(int xorg, int yorg, int xdes, int ydes, int Ancho, int Alto, byte *Buffer);
|
||||
|
||||
DacPalette256 palJuego;
|
||||
DacPalette256 palHare;
|
||||
DacPalette256 palHareClaro;
|
||||
DacPalette256 palHareOscuro;
|
||||
|
||||
byte *VGA;
|
||||
|
||||
byte *dir_dibujo1;
|
||||
byte *dir_hare_fondo;
|
||||
byte *dir_dibujo3;
|
||||
byte *dir_dibujo2;
|
||||
byte *dir_mesa;
|
||||
byte *dir_hare_dch;
|
||||
byte *dir_zona_pantalla;
|
||||
byte *dir_hare_frente;
|
||||
byte *dir_texto;
|
||||
byte *dir_pendulo;
|
||||
|
||||
byte cPal[768];
|
||||
byte *Buffer_pcx;
|
||||
long LenFile;
|
||||
|
||||
Common::File *ald, *sku;
|
||||
|
||||
int hay_sb;
|
||||
int nivel_osc, musica_antes, musica_room;
|
||||
char num_room[20], pantalla_disco[20];
|
||||
char datos_actuales[20];
|
||||
int objs_room;
|
||||
char fondo_y_menu[20];
|
||||
|
||||
char nombre_obj[30][20];
|
||||
char nombre_icono[14][20];
|
||||
|
||||
int num_obj[40], visible[40], espuerta[40];
|
||||
int sitiobj_x[40], sitiobj_y[40], sentidobj[40];
|
||||
int objetos_que_tengo[50];
|
||||
char alapantallakeva[40][20];
|
||||
int x_alakeva[40], y_alakeva[40], sentido_alkeva[40], alapuertakeva[40];
|
||||
int x1[40], y1[40], x2[40], y2[40];
|
||||
int lleva_objeto , objeto_que_lleva;
|
||||
int con_voces;
|
||||
int menu_bar, menu_scr, hay_nombre;
|
||||
char texto_nombre[20];
|
||||
int frame_ciego;
|
||||
int frame_ronquido;
|
||||
int frame_murcielago;
|
||||
int c_mirar;
|
||||
int c_poder;
|
||||
|
||||
int flags[NUM_BANDERAS];
|
||||
|
||||
int frame_y;
|
||||
int hare_x, hare_y, hare_se_mueve, direccion_hare, sentido_hare, num_frame, hare_se_ve;
|
||||
int sitio_x, sitio_y, comprueba_flags;
|
||||
int rompo, rompo2;
|
||||
int paso_x, paso_y;
|
||||
int alto_hare, ancho_hare, alto_pies;
|
||||
int alto_habla, ancho_habla;
|
||||
int suelo_x1, suelo_y1, suelo_x2, suelo_y2;
|
||||
int cerca, lejos;
|
||||
int sentido_final, anda_a_objeto;
|
||||
int obj_saliendo;
|
||||
float diff_vez, conta_vez;
|
||||
int hay_respuesta;
|
||||
int conta_ciego_vez;
|
||||
int cambio_de_color;
|
||||
int rompo_y_salgo;
|
||||
int vb_x, sentido_vb, vb_se_mueve, frame_vb;
|
||||
float nuevo_alto, nuevo_ancho;
|
||||
int diferencia_x, diferencia_y;
|
||||
int factor_red[202];
|
||||
int frame_piano;
|
||||
int frame_borracho;
|
||||
int frame_velas;
|
||||
int color_solo;
|
||||
int parpadeo;
|
||||
int x_igor, y_igor, sentido_igor;
|
||||
int x_dr, y_dr, sentido_dr;
|
||||
int x_bj, y_bj, sentido_bj;
|
||||
int cont_sv;
|
||||
int term_int;
|
||||
int num_ejec;
|
||||
int cual_ejec, hay_que_load;
|
||||
char nom_partida[13];
|
||||
int _color;
|
||||
int corta_musica;
|
||||
char select[23];
|
||||
int hay_seleccion;
|
||||
int x_raton;
|
||||
int y_raton;
|
||||
int y_raton_ant;
|
||||
int boton_izq;
|
||||
int boton_dch;
|
||||
|
||||
bool escoba();
|
||||
void Negro();
|
||||
void habla_vb(const char *, const char *);
|
||||
void habla_vbpuerta(const char *dicho, const char *filename);
|
||||
void habla_ciego(const char *, const char *, const char *);
|
||||
void habla_hacker(const char *, const char *);
|
||||
void agarra_objeto(int);
|
||||
void anda_parriba();
|
||||
void anda_pabajo();
|
||||
void pon_vb();
|
||||
void lleva_vb(int punto_x);
|
||||
void hipo_sin_nadie(int contador);
|
||||
void abre_puerta(int nflag, int n_puerta);
|
||||
void mapa();
|
||||
void buffer_teclado() { }
|
||||
void animacion_1_1();
|
||||
bool animacion_2_1();
|
||||
void animacion_1_2();
|
||||
void animacion_2_2();
|
||||
void animacion_3_1();
|
||||
void animacion_4_1();
|
||||
void animacion_3_2();
|
||||
void animacion_4_2();
|
||||
void animacion_7();
|
||||
void animacion_8();
|
||||
void animacion_9();
|
||||
void animacion_10();
|
||||
void animacion_11();
|
||||
void animacion_12();
|
||||
void animacion_13();
|
||||
void animacion_14();
|
||||
void animacion_15();
|
||||
void animacion_16();
|
||||
void animacion_17();
|
||||
void animacion_18();
|
||||
void animacion_19();
|
||||
void animacion_20();
|
||||
void animacion_21();
|
||||
void animacion_22();
|
||||
void animacion_23();
|
||||
void animacion_23_anexo();
|
||||
void animacion_23_anexo2();
|
||||
void animacion_24();
|
||||
void animacion_25();
|
||||
void animacion_26();
|
||||
void animacion_27();
|
||||
void animacion_28();
|
||||
void animacion_29();
|
||||
void animacion_30();
|
||||
void animacion_31();
|
||||
void animacion_32();
|
||||
void animacion_33();
|
||||
void animacion_34();
|
||||
void animacion_35();
|
||||
void animacion_36();
|
||||
|
||||
void refresca_1_antes();
|
||||
void refresca_2();
|
||||
void refresca_3();
|
||||
void refresca_3_antes();
|
||||
void refresca_4();
|
||||
void refresca_5();
|
||||
void refresca_5_antes();
|
||||
void refresca_6_antes();
|
||||
void refresca_7_antes();
|
||||
void refresca_9_antes();
|
||||
void refresca_12_antes();
|
||||
void refresca_14_antes();
|
||||
void refresca_15();
|
||||
void refresca_16_antes();
|
||||
void refresca_17_antes();
|
||||
void refresca_17();
|
||||
void refresca_18_antes();
|
||||
void refresca_18();
|
||||
void hare_oscuro();
|
||||
|
||||
|
||||
void sin_verbo();
|
||||
void para_cargar(char[]);
|
||||
void carga_escoba_1(const char *);
|
||||
void carga_escoba_2(const char *);
|
||||
void borra_pantalla();
|
||||
void lleva_al_hare(int, int);
|
||||
void mueve_cursor();
|
||||
void comprueba_objetos();
|
||||
void espera_soltar();
|
||||
void MirarRaton();
|
||||
void elige_en_barra();
|
||||
bool comprueba1();
|
||||
void comprueba2();
|
||||
Common::KeyCode getscan();
|
||||
void elige_verbo(int);
|
||||
void mesa();
|
||||
void saves();
|
||||
void print_abc(const char *, int, int);
|
||||
void delay(int ms);
|
||||
void confirma_go();
|
||||
void confirma_salir();
|
||||
void salva_pantallas();
|
||||
void elige_objeto(int objeto);
|
||||
void suma_objeto(int);
|
||||
int resta_objeto(int osj);
|
||||
void fliplay(const char *filefli, int vel);
|
||||
void FundeDelNegro(int VelocidadDeFundido);
|
||||
char LimitaVGA(char valor);
|
||||
void color_abc(int cl);
|
||||
void centra_texto(const char *,int,int);
|
||||
void comienza_sound(const char *);
|
||||
void anima(const char *animacion, int FPS);
|
||||
void fin_sound_corte();
|
||||
void FundeAlNegro(int VelocidadDeFundido);
|
||||
void pausa(int);
|
||||
void habla_dr_grande(const char *dicho, const char *filename);
|
||||
void pon_igor();
|
||||
void pon_bj();
|
||||
void pon_dr();
|
||||
void habla_igor_dch(const char *dicho, const char *filename);
|
||||
void habla_dr_dch(const char *dicho, const char *filename);
|
||||
void habla_dr_izq(const char *dicho, const char *filename);
|
||||
void habla_solo(const char *, const char *);
|
||||
void habla_igor_frente(const char *, const char *);
|
||||
void habla_tabernero(const char *dicho, const char *filename);
|
||||
void hipo(int);
|
||||
void fin_sound();
|
||||
void habla_bj(const char *, const char *);
|
||||
void hablar(const char *, const char *);
|
||||
void playmusic(int p);
|
||||
void stopmusic();
|
||||
int music_status();
|
||||
void refresca_pantalla();
|
||||
void carga_partida(const char *);
|
||||
void canal_p(const char *);
|
||||
void puertas_cerradas(int);
|
||||
void animafin_sound_corte();
|
||||
void color_hare();
|
||||
void funde_hare(int oscuridad);
|
||||
void paleta_hare_claro();
|
||||
void paleta_hare_oscuro();
|
||||
void hare_claro();
|
||||
void actualiza_datos();
|
||||
void empieza_andar();
|
||||
void actualiza_refresco();
|
||||
void actualiza_refresco_antes();
|
||||
void pon_hare();
|
||||
void menu_sin_volcar();
|
||||
void barra_menu();
|
||||
void saca_objeto();
|
||||
bool sal_de_la_habitacion(int);
|
||||
void coge_objeto();
|
||||
void banderas(int);
|
||||
void cursor_mesa();
|
||||
void introduce_nombre();
|
||||
void para_grabar(char[]);
|
||||
int LookForFree();
|
||||
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(Common::File *Sesion);
|
||||
void EndSSN();
|
||||
int PlayFrameSSN();
|
||||
|
||||
byte *AuxBuffOrg;
|
||||
byte *AuxBuffLast;
|
||||
byte *AuxBuffDes;
|
||||
int Leng;
|
||||
|
||||
byte *pointer;
|
||||
int UsingMem;
|
||||
Common::File *_Sesion;
|
||||
byte CHUNK;
|
||||
byte CMP, dacSSN[768];
|
||||
byte *MiVideoSSN;
|
||||
byte *mSesion;
|
||||
int FrameSSN;
|
||||
int GlobalSpeed;
|
||||
int LastFrame;
|
||||
|
||||
byte *carga_pcx(byte *NamePcc);
|
||||
void set_dac(byte *dac);
|
||||
void WaitForNext(int FPS);
|
||||
float vez();
|
||||
void reduce_hare_chico(int, int, int, int, int, int, int, byte *, byte *);
|
||||
char codifica(char);
|
||||
void cuadrante_1();
|
||||
void cuadrante_2();
|
||||
void cuadrante_3();
|
||||
void cuadrante_4();
|
||||
void refresca_62();
|
||||
void refresca_62_antes();
|
||||
void refresca_63();
|
||||
void graba_partida(char[]);
|
||||
void aumenta_num_frame();
|
||||
int sobre_que_objeto();
|
||||
void comprueba_banderas_menu();
|
||||
void pantalla_0();
|
||||
void pantalla_62(int);
|
||||
void pantalla_63(int);
|
||||
void conversa(const char *);
|
||||
void print_abc_opc(const char *, int, int, int);
|
||||
void responde(int);
|
||||
void habla_borracho(const char *dicho, const char *filename);
|
||||
void habla_pianista(const char *dicho, const char *filename);
|
||||
|
||||
void MusicFadeout();
|
||||
void ctvd_end();
|
||||
void ctvd_stop();
|
||||
void ctvd_terminate();
|
||||
void ctvd_speaker(int flag);
|
||||
void ctvd_output(Common::File *file_handle);
|
||||
void ctvd_init(int b);
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
} // End of namespace Drascula
|
||||
|
||||
#endif /* DRASCULA_H */
|
14
engines/drascula/module.mk
Normal file
14
engines/drascula/module.mk
Normal file
|
@ -0,0 +1,14 @@
|
|||
MODULE := engines/drascula
|
||||
|
||||
MODULE_OBJS = \
|
||||
detection.o \
|
||||
drascula.o
|
||||
|
||||
|
||||
# This module can be built as a plugin
|
||||
ifdef BUILD_PLUGINS
|
||||
PLUGIN := 1
|
||||
endif
|
||||
|
||||
# Include common rules
|
||||
include $(srcdir)/rules.mk
|
753
engines/drascula/texts.h
Normal file
753
engines/drascula/texts.h
Normal file
|
@ -0,0 +1,753 @@
|
|||
#define TEXT1 "Its the second biggest door I've seen in my life."
|
||||
#define TEXT2 "Not really."
|
||||
#define TEXT3 "The church is all boarded up, it must have been abandoned several years ago."
|
||||
#define TEXT4 "I haven't opened it."
|
||||
#define TEXT5 "What should I do, should I pull it off?"
|
||||
#define TEXT6 "Hi there door, I'm going to make you a door-frame."
|
||||
#define TEXT7 "It's too much for me."
|
||||
#define TEXT8 "There's a window stopping the game from working properly."
|
||||
#define TEXT9 "I can't."
|
||||
#define TEXT10 "Yes, that's done."
|
||||
#define TEXT11 "Why?"
|
||||
#define TEXT12 "Hi window, are you doing anything tonight?"
|
||||
#define TEXT13 "Not without permission from the Town Hall."
|
||||
#define TEXT14 "If only this window wasn't boarded up..."
|
||||
#define TEXT15 "Yoo-Hoo window!"
|
||||
#define TEXT16 "Hi there."
|
||||
#define TEXT17 "Like Microchof's."
|
||||
#define TEXT18 "I can't reach."
|
||||
#define TEXT19 "It's alright where it is."
|
||||
#define TEXT21 "Its a coffin in the shape of a cross."
|
||||
#define TEXT22 "No thanks."
|
||||
#define TEXT23 "Hi dead man. No, don't get up for my sake."
|
||||
#define TEXT24 "Yes, just like in poltergeist"
|
||||
#define TEXT27 "I'll be back in fifteen minutes"
|
||||
#define TEXT28 "Forbidden to put up posters."
|
||||
#define TEXT29 "It's uncle Evaristo's tomb."
|
||||
#define TEXT30 "Its locked."
|
||||
#define TEXT31 "I've got one."
|
||||
#define TEXT32 "Yoo Hoo, uncle Everisto!"
|
||||
#define TEXT33 "There's no reply."
|
||||
#define TEXT34 "It's not well parked."
|
||||
#define TEXT35 "It's a door."
|
||||
#define TEXT36 "A drawer in the table."
|
||||
#define TEXT37 "A suspicious wardrobe."
|
||||
#define TEXT38 "Hi wardrobe, how are you?"
|
||||
#define TEXT41 "It's an ancient candelabrum."
|
||||
#define TEXT42 "It must have been here ever since Yule Brinner had hair on his head."
|
||||
#define TEXT43 "No, its a relic."
|
||||
#define TEXT44 "Its a nice altarpiece."
|
||||
#define TEXT46 "ha, ha, ha."
|
||||
#define TEXT48 "No."
|
||||
#define TEXT50 "Ha, He, Hi, Ho, Hu, great!"
|
||||
#define TEXT54 "I can't see anything in particular."
|
||||
#define TEXT55 "It's Fern n, the plant."
|
||||
#define TEXT56 "It's one of the fences spikes"
|
||||
#define TEXT57 "Hey! There's a packet of matches under here."
|
||||
#define TEXT58 "Look! a packet of Kleenex, and one's still unused."
|
||||
#define TEXT59 "There isn't anything else in the bucket."
|
||||
#define TEXT60 "It's a blind man who can't see."
|
||||
#define TEXT65 "That's a great deal of money."
|
||||
#define TEXTD56 "Hi blind man. How it's going?"
|
||||
#define TEXTD57 "How do you know I'm a foreigner?"
|
||||
#define TEXTD58 "You look blind. You're wearing dark glasses like Stevie Wonder."
|
||||
#define TEXTD59 "Look, I'm sorry, I didn't know you could see."
|
||||
#define TEXTD60 "But haven't you just told me you weren't blind."
|
||||
#define TEXTD61 "But if you can't see."
|
||||
#define TEXTD62 "Ooookay. Sorry. In that case, Hi there sightless person."
|
||||
#define TEXTD63 "I'm John Hacker. You must be one of those characters who will help me out in exchange for an object. Aren't you? Eh? Aren't you?"
|
||||
#define TEXTD64 "Uuuum, excuse me for asking blin... Sightless person! But what sort of job is that, to give sickles in exchange for money while you play the accordion?"
|
||||
#define TEXTD65 "Ah yes, I suppose that's true. Goodbye sightless person ...blind man (under his breath)."
|
||||
#define TEXTD66 "Here is the large amount of money you asked me for."
|
||||
#define TEXTD67 "You better have had."
|
||||
#define TEXTD68 "Hi there foreigner."
|
||||
#define TEXTD69 "And how do you know I'm blind?"
|
||||
#define TEXTD70 "And I'm not kidding you but your's are like Woody Allen's."
|
||||
#define TEXTD71 "No, I can't see."
|
||||
#define TEXTD72 "And I'm not."
|
||||
#define TEXTD73 "Oh of course. Just cos I can't see, you accuse me of being blind."
|
||||
#define TEXTD74 "Hi there foreigner! What are you doing in Transylvania?"
|
||||
#define TEXTD75 "That's right, foreigner. In exchange for a large sum of money I'll give you a sickle for when you might need it."
|
||||
#define TEXTD76 " !!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
#define TEXTD77 "Because you told me before, didn't you?"
|
||||
#define TEXTD78 "Thanks foreigner. Here's the sickle in exchange. You'll find it really useful later on, honestly."
|
||||
#define TEXT100 "THERE IS NOTHING SPECIAL ABOUT IT"
|
||||
#define TEXT101 "IT'S NOT UNUSUAL"
|
||||
#define TEXT102 "HEY, WHAT'S UP MAN?"
|
||||
#define TEXT103 "HI"
|
||||
#define TEXT104 "NOTHING NEW?"
|
||||
#define TEXT105 "HOW IS THE FAMILY?"
|
||||
#define TEXT106 "THAT IS JUST LIKE YOU!"
|
||||
#define TEXT107 "BUT HOW DO I GET THAT?"
|
||||
#define TEXT108 "MY RELIGION DOES NOT ALLOW ME"
|
||||
#define TEXT109 "IT'D BE BETTER NOT"
|
||||
#define TEXT110 "YEAH, SURE MAN!"
|
||||
#define TEXT111 "NO WAY"
|
||||
#define TEXT112 "IMPOSSIBLE "
|
||||
#define TEXT113 "THIS WILL NOT OPEN "
|
||||
#define TEXT114 "I CAN'T DO IT BY MYSELF"
|
||||
#define TEXT115 "I COULD DO IT IF I WANTED TO, BUT I JUST FEEL A LITTLE LAZY "
|
||||
#define TEXT116 "I DO NOT SEE THE REASON "
|
||||
#define TEXT117 "IT'S A QUITE NICE BRAIN "
|
||||
#define TEXT118 "AND SO BRAIN, WHAT ARE YOU UP TONIGHT? "
|
||||
#define TEXT119 "NO, IT MUST BE KEPT SOMEWHERE AWAY FROM THE MUTANT ACTION OF THE ATMOSPHERE"
|
||||
#define TEXT120 "HE IS VERY STIFF, JUST LIKE MY BOSS "
|
||||
#define TEXT121 "A VERY SHARP STICK"
|
||||
#define TEXT122 "YOU FAITHFUL SHARP-PAINTED STICK, NOBLE TRANSILVAAANIAN OAK TREE"
|
||||
#define TEXT123 "DAMN, I HAVE TO CUT MY NAILS! "
|
||||
#define TEXT124 "B.J. IS IN THERE... SHE IS A REALLY HOT CHICK! "
|
||||
#define TEXT125 "IT IS FIRMLY LOCKED "
|
||||
#define TEXT126 "\"SAVE AWAY LOCKS LTD.\""
|
||||
#define TEXT127 "IT IS THE TYPICAL SKELETON YOU FIND IN THE DUNGEONS OF ALL THE GAMES"
|
||||
#define TEXT128 "IT IS COMMONLY USED TO COMMUNICATE ELECTRICITY TO THE MACHINES CONNECTED TO IT "
|
||||
#define TEXT129 "IT IS ABSOLUTELY HAND MADE BECAUSE THE JAPANESE MAKE THEM POCKET SIZE "
|
||||
#define TEXT130 "I HAVE ONLY SEEN IN MY LIFE ANOTHER THING AS UGLY AS THIS ONE "
|
||||
#define TEXT131 "FORGET IT. I AM NOT GOING TO TELL HIM ANYTHING IN CASE HE GETS MAD "
|
||||
#define TEXT132 "IT SEEMS QUITE RATIONAL "
|
||||
#define TEXT133 "IT IS A PICTURE OF PLATO WRITING HIS LOST DIALOGUE "
|
||||
#define TEXT134 "I AM NOT ONE OF THOSE WHO TALKS TO POSTERS "
|
||||
#define TEXT135 "THAT'S A VERY CUTE DESK "
|
||||
#define TEXT136 "IT IS A VAMPIRES HUNTER'S DIPLOMA OFFICIALLY APPROVED BY OXFORD UNIVERSITY "
|
||||
#define TEXT137 "IT'S A DARK NIGHT WITH FULL MOON "
|
||||
#define TEXT138 "IT SEEMS LIKE THESE SCREWS ARE NOT MUCH TWISTED "
|
||||
#define TEXT139 "DON'T LOOK NOW, BUT I THINK THAT A HIDDEN CAMERA IS FOCUSING ON ME "
|
||||
#define TEXT140 "THAT'S A VERY MODERN STICK DETECTOR "
|
||||
#define TEXT141 "NO. THE LABORATORY IS ON THE SECOND FLOOR "
|
||||
#define TEXT142 "A NICE BEDSIDE TABLE "
|
||||
#define TEXT143 "IT'S A LOT OF MONEY THAT CAN'T BE MISSING IN ANY VALUABLE ADVENTURE "
|
||||
#define TEXT144 "IF I WERE A RICH MAN, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU "
|
||||
#define TEXT145 "THOSE ARE STRANGE LEAVES. THEY MUST HAVE BROUGHT THEM FROM SOUTH AMERICA OR AROUND THERE "
|
||||
#define TEXT146 "I DON'T THINK THEY WOULD ANSWER ME "
|
||||
#define TEXT147 "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY GET ALL THE BEAUTY WITHIN IT"
|
||||
#define TEXT148 "I ONLY PRAY BEFORE I GO TO BED "
|
||||
#define TEXT149 "HEY, THIS PIKE SEEMS A LITTLE BIT LOOSE! "
|
||||
#define TEXT150 "I HOPE YOU WON'T COMPLAIN ABOUT GETTING NO CLUES FROM ME "
|
||||
#define TEXT151 "IT'S A QUITE CONVENTIONAL PIKE "
|
||||
#define TEXT152 "THEY ARE CUTE, THOUGH THEY ARE COVERED WITH A LITTLE BIT OF SHIT "
|
||||
#define TEXT153 "NO, THEY WON'T HEAR ME. HA,HA,HA THIS IS GREAT! "
|
||||
#define TEXT154 "\"SLEEPING BEAUTY\" FROM CHAIKOSKY, OR CHOIFRUSKY, OR WHATEVER IT IS"
|
||||
#define TEXT155 "VERY TEMPTING "
|
||||
#define TEXT156 "NO, I'M NOT ONE OF THOSE WHO PUT USED BUBBLE GUMS IN THEIR MOUTH "
|
||||
#define TEXT157 "THAT'S A VERY NICE SICKLE. I WONDER WHERE THE HAMMER MAY BE "
|
||||
#define TEXT158 "TOBACCO MANUFACTURERS WARN ABOUT HEALTH BEING SERIOUSLY DAMAGED BY SANITARY AUTHORITIES"
|
||||
#define TEXT159 "AN ABSOLUTELY NORMAL CANDLE, INCLUDING WAX AND EVERYTHING "
|
||||
#define TEXT160 "THESE TWO SHINY COINS DO REALLY GLITTER! "
|
||||
#define TEXT161 "THIS SHINY COIN DOES REALLY GLITTER! "
|
||||
#define TEXT162 "WITH THIS I WILL BE IMMUNE AGAINST VAMPIRE'S BITES"
|
||||
#define TEXT163 "NO, IT'S IS NOT THE RIGHT MOMENT YET "
|
||||
#define TEXT164 "THERE IS A ONE THOUSAND BILL AND A COUPLE COINS "
|
||||
#define TEXT165 "IT SAYS \"PLEASE, DO NOT THROW FOOD TO THE PIANIST\""
|
||||
#define TEXT166 "OMELET, 200. FRIED FISH, 150, MAYONNAISE POTATOES, 225"
|
||||
#define TEXT167 "BEST BURGERS ON THIS SIDE OF THE DANUBE, ONLY FOR 325!"
|
||||
#define TEXT168 "THAT'S A NICE SKULL WITH A VERY PENETRATING LOOK, HA, HA, HA, HA, THAT WAS GOOD!"
|
||||
#define TEXT169 "HI SKULL, YOU REMIND ME OF UNCLE HAMLET "
|
||||
#define TEXT170 "I HAVE THE HABIT OF NOT TOUCHING THINGS THAT HAVE BEEN ALIVE "
|
||||
#define TEXT171 "IT'S A BIN "
|
||||
#define TEXT172 "IT'S A BET FOR TONIGHT'S GAME "
|
||||
#define TEXT173 "I WONDER WHAT THERE IS BEHIND THAT "
|
||||
#define TEXT174 "HEY, THAT CURTAIN IS NOT MOVING!"
|
||||
#define TEXT175 "MAN, THIS CASTLE IS REALLY GLOOMY "
|
||||
#define TEXT176 "I CAN'T, HE IS TOO FAR AWAY TO HEAR ME "
|
||||
#define TEXT177 "IT'S THE TYPICAL TRANSILVANIAN FOREST, WITH TREES "
|
||||
#define TEXT178 "MAN YOU REALLY SAY STUPID THINGS, AND THIS IS TOO DARK! "
|
||||
#define TEXT179 "GARCIA, CANDY STORE. SWEETS AND BUBBLE GUM"
|
||||
#define TEXT180 "A VERY NICE DOOR "
|
||||
#define TEXT181 "IT'S CLOSED "
|
||||
#define TEXT182 "A COMPLETELY LOCKED BARREL "
|
||||
#define TEXT184 "AREN'T THESE BUGS REALLY CUTE? "
|
||||
#define TEXT185 "BSSST, PUSSYCAT... LITTLE CAT"
|
||||
#define TEXT186 "THERE IS NO ANSWER "
|
||||
#define TEXT187 "THE MOON IS A SATELLITE THAT TURNS AROUND THE EARTH WITH A REVOLUTION PERIOD OF 28 DAYS"
|
||||
#define TEXT188 "HI, LOONY MOON "
|
||||
#define TEXT189 "IT'S TOTALLY BLOCKED UP WITH PLANKS"
|
||||
#define TEXT190 "IT'S IMPOSSIBLE. NOT EVEN THAT TOUGH GUY FROM TV COULD OPEN THIS "
|
||||
#define TEXT191 "HEY! THE SHADOW OF THAT CYPRESS LOOKS PROLONGED TO ME! "
|
||||
#define TEXT192 "YOU, BARTENDER...!! "
|
||||
#define TEXT193 "I WOULD LIKE TO HAVE A ROOM PLEASE "
|
||||
#define TEXT194 "DO YOU KNOW WHERE I CAN FIND THE SO CALLED DRASCULA? "
|
||||
#define TEXT195 "YES, SO WHAT? "
|
||||
#define TEXT196 "SO? "
|
||||
#define TEXT197 "IS...THAT RIGHT? "
|
||||
#define TEXT198 "GOOD QUESTION. NOW, LET ME TELL YOU MY STORY. LOOK... "
|
||||
#define TEXT199 "IT'S JUST FIVE MINUTES "
|
||||
#define TEXT200 "I'M JOHN HACKER AND I REPRESENT A BRITISH PROPERTY COMPANY "
|
||||
#define TEXT201 "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 SELLING "
|
||||
#define TEXT202 "I THINK I'M GOING BACK TO MY MUM'S TOMORROW FIRST THING IN THE MORNING "
|
||||
#define TEXT203 "BEAUTIFUL NIGHT, HUH? "
|
||||
#define TEXT204 "NO, NOTHING "
|
||||
#define TEXT205 "YOU...PIANIST...!!!! "
|
||||
#define TEXT206 "BEAUTIFUL NIGHT "
|
||||
#define TEXT207 "AND IT'S NOT EVEN COLD OR ANYTHING "
|
||||
#define TEXT208 "ALL RIGHT, I'LL JUST LET YOU GO ON PLAYING "
|
||||
#define TEXT209 "WELL THEN "
|
||||
#define TEXT210 "HI BOSS, HOW ARE YOU? "
|
||||
#define TEXT211 "AND HOW IS THE FAMILY? "
|
||||
#define TEXT212 "THIS IS QUITE GROOVY, HUH? "
|
||||
#define TEXT213 "I'D BETTER NOT SAY ANYTHING "
|
||||
#define TEXT214 "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! "
|
||||
#define TEXT215 "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 "
|
||||
#define TEXT216 "AREN'T I JUST A FUNNY GUY, HUH?. BY THE WAY, WHERE AM I? "
|
||||
#define TEXT217 "YES "
|
||||
#define TEXT218 "SHOOT...! "
|
||||
#define TEXT219 "OH, SURE...OF COURSE! "
|
||||
#define TEXT220 "WELL, THANKS VERY MUCH FOR YOUR HELP. I WON'T BOTHER YOU ANYMORE IF YOU PLEASE TELL ME WHERE THE DOOR IS... "
|
||||
#define TEXT221 "IT'S BECAUSE THE KNOCK MUST HAVE AFFECTED MY BRAIN...I CAN'T SEE A THING... "
|
||||
#define TEXT222 "WELL...THAT DOESN'T MATTER. I ALWAYS CARRY AN SPARE ONE. "
|
||||
#define TEXT223 "WOW, WHAT A HOT CHICK!! I DIDN'T NOTICE!, BUT OF COURSE, I WASN'T WEARING MY GLASSES "
|
||||
#define TEXT224 "HEY... "
|
||||
#define TEXT225 "AND ALL THIIIISSS??? "
|
||||
#define TEXT226 "DON'T WORRY B.J. HONEY, I'LL SAVE YOU FROM FALLING INTO HIS CLUTCHES... "
|
||||
#define TEXT227 "YOU REALLY GOT ME MAD MAN... "
|
||||
#define TEXT228 "AHHH A WEREWOLF!! DIE YOU DAMNED EVIL! "
|
||||
#define TEXT229 "YES, WELL... "
|
||||
#define TEXT230 "YES, WELL...I THINK I'LL JUST GO ON MY WAY. EXCUSE ME "
|
||||
#define TEXT231 "WHAT? "
|
||||
#define TEXT232 "TO TELL YOU THE TRUTH...ON SECOND THOUGHTS...I DON'T REALLY THINK SO. "
|
||||
#define TEXT233 "AND SO TELL ME YOU ERUDITE PHILOSOPHER, IS THERE ANY RELATIONSHIP CAUSE-AND-EFFECT BETWEEN SILLY AND BILLY?"
|
||||
#define TEXT234 "OK, OK, FORGET IT. I DON'T EVEN KNOW WHU I SAID ANYTHING ABOUT IT "
|
||||
#define TEXT235 "WHAT ARE YOU DONIG HERE PHILOSPOZING INSTEAD OF BEING EATING SOME PEOPLE "
|
||||
#define TEXT236 "HOW come? "
|
||||
#define TEXT237 "HEY, COULD YOU SAY AGAIN ALL THAT ABOUT PRE-EVOLUTIONARY RELATIONSHIPS? "
|
||||
#define TEXT238 "YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT NEFORE. I DIDN'D GET IT VERY WELL, YOU KNOW. "
|
||||
#define TEXT239 "NO, I'D RATHER NOT SAY ANYTHING, IN CASE HE GETS ANGRY OR SOMETHING... "
|
||||
#define TEXT240 "HELLO? "
|
||||
#define TEXT241 "YES, WHAT'S UP? "
|
||||
#define TEXT242 "WELL, NOW THAT YOU MENTION IT, I'LL TELL YOU THAT... "
|
||||
#define TEXT244 "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? "
|
||||
#define TEXT245 "WELL ANYWAY. LISTEN, DOESN'T THIS LOOK TO YOU LIKE A LOT OF CRAP TO END UP SOON WITH THE GAME?. WELL, MAYBE NOT. "
|
||||
#define TEXT246 "IT'S EMPTY! "
|
||||
#define TEXT247 "WHY DID YOU TAKE MY ONLY LOVE, B.J. , AWAY FROM ME?. LIFE HAS NO MEANING FOR WITHOUT HER "
|
||||
#define TEXT248 "HER BRAIN!!? "
|
||||
#define TEXT249 "TO TELL YOU THE TRUTH, I THINK I HAD JUST ENOUGH WITH YOUR OF YOUR LITTLE MONSTER. "
|
||||
#define TEXT250 "OH PLEASE, HOLLY VIRGIN, DON'T LET ANYTHING WORSE HAPPEN TO ME!! "
|
||||
#define TEXT251 "YOU ARE NOT GOING TO GET YOUR WAY. I'M SURE SUPERMAN WILL CAME AND RESCUE ME!"
|
||||
#define TEXT252 "WHAT A SHIT OF GAME IS THIS IN WHICH THE PROTAGONIST DIES! "
|
||||
#define TEXT253 "HEY, WAIT A SECOND!, WHAT ABOUT MY LAST WISH? "
|
||||
#define TEXT254 "HA. HA, I'M NOW IMMUNIZED AGAINST YOU DAMNED EVIL!. THIS CIGARETTE IS AN ANTI-VAMPIRE BREW THAT VON BRAUN GAVE TO ME "
|
||||
#define TEXT255 "YES SURE, BUT YOU'LL NEVER GET ME TO GIVE YOU THE RECIPE "
|
||||
#define TEXT256 "APART FROM CREATING TORTURE, I CAN ALSO STAND IT.. "
|
||||
#define TEXT257 "OH, NO PLEASE! I'LL TALK, BUT PLEASE, DON'T DO THAT TO ME! "
|
||||
#define TEXT258 "ALL RIGHT THEN. I TOLD YOU WHAT YOU WANTED TO KNOW. NOW SET B.J. AND ME FREE AND LEAVE US ALONE! "
|
||||
#define TEXT259 "WHAT ARE YOU DOING HERE B.J.?. WHERE IS DRASCULA? "
|
||||
#define TEXT260 "WHAT A MEAN GUY!. JUST BECAUSE HE BELONGS TO THE NOBILITY HE THINKS HE IS ENTITLED TO SLEEP WITH ANYBODY HE FEELS LIKE. "
|
||||
#define TEXT261 "DOWN WITH ARISTOCRATIC DESPOTISM!! "
|
||||
#define TEXT262 "POOR PEOPLE OF THE WORLD FOR EVER..!! "
|
||||
#define TEXT263 "AND AS I CAN SEE HE HAS CHAINED YOU UP WITH LOCKS AND ALL THAT STUFF, HUH? "
|
||||
#define TEXT264 "WELL, ALL RIGHT. DO YOU HAVE A HAIRPIN OVER THERE? "
|
||||
#define TEXT265 "ALL RIGHT, OK, DON'T GET MAD. I'LL THINK ABOUT SOMETHING "
|
||||
#define TEXT266 "YOU...BARTENDER!! "
|
||||
#define TEXT267 "HOW IS THE GAME GOING? "
|
||||
#define TEXT268 "WHO? "
|
||||
#define TEXT269 "CAN'T YOU SEE DRASCULA IS HERE? "
|
||||
#define TEXT270 "THEN, LET'S END UP WITH HIM, RIGHT? "
|
||||
#define TEXT271 "GIVE ME A SCOTCH ON THE ROCKS "
|
||||
#define TEXT272 "NOTHING, I JUST FORGOT WHAT I WAS GOING TO SAY... "
|
||||
#define TEXT273 "EITHER YOU GET ME A SCOTCH ON THE ROCKS OR I'LL PLAY THE PIANO UNTIL THE GAME IS OVER "
|
||||
#define TEXT274 "WHEN IS THE MATCH GOING TO BE OVER? "
|
||||
#define TEXT275 "GOOD EVENING"
|
||||
#define TEXT276 "AND SO IGOR, HOW ARE YOU FEELING...A LITTLE HUMPED...?. HA, HA, HA, THAT WAS FUNNY! "
|
||||
#define TEXT277 "WHAT ARE YOU SUPPOSED TO BE DOING? "
|
||||
#define TEXT278 "WELL, NO. "
|
||||
#define TEXT279 "THEN WEAR GLASSES. "
|
||||
#define TEXT280 "WHAT IS ALL THAT ABOUT THE SUPERNATURAL ORGY? "
|
||||
#define TEXT281 "OK, OK, STOP IT. I THINK I CAN GET THE PICTURE. "
|
||||
#define TEXT282 "COULDN'T YOU TELL ME WHERE DRASCULA IS? "
|
||||
#define TEXT283 "OH...PLEASE...COME ON...! "
|
||||
#define TEXT284 "WHY NOT? "
|
||||
#define TEXT285 "OH...BUT DIES HE SLEEP AT NIGHT? "
|
||||
#define TEXT286 "WELL, I HOPE YOU GET LUCKY "
|
||||
#define TEXT287 "I HAVE TO TALK TO HIM... "
|
||||
#define TEXT288 "YOOUUU...SKELETOOOONN..!!! "
|
||||
#define TEXT289 "GOOD HEAVENS!, IT'S A DEAD MAN TALKING! "
|
||||
#define TEXT290 "TELL HOW DID YOU GET TO END UP HERE "
|
||||
#define TEXT291 "AND WHY WOULD DRASCULA WANT TO CREATE A MONSTER? "
|
||||
#define TEXT292 "WHAT'S YOUR NAME, MY SKELETON FRIEND? "
|
||||
#define TEXT293 "HEY, DON'T YOU WANT ANYTHING TO EAT? "
|
||||
#define TEXT294 "I BET YOUR STOMACH IS PRETTY EMPTY...HA, HA,HA! "
|
||||
#define TEXT295 "THE THING IS THAT I DON'T FEEL LIKE TALKING RIGHT NOW "
|
||||
#define TEXT296 "I HOPE SOMEONE F...(WHISTLE) YOU...,AND YOUR F...(WHISTLE) SON OF (WHISTLE TWICE) "
|
||||
#define TEXT297 "I REALLY LOVED HER. I KNOW SHE WASN'T MUCH OF A WONDER, BUT NOBODY'S PERFECT, RIGHT? "
|
||||
#define TEXT298 "BESIDES. SHE REALLY HAD ONE OF THOSE GREAT BODIES THAT YOU NEVER FORGET... "
|
||||
#define TEXT299 "I'LL NEVER BE THE SAME AGAIN. I WILL SHUT MYSELF AWAY IN A MONASTERY, AND WILL LET MY LIFE JUST FLOW... "
|
||||
#define TEXT300 "NOTHING WILL GET ME OUT OF THIS MYSTERY BECAUSE..."
|
||||
#define TEXT301 "WHOSE?. WHOSE? "
|
||||
#define TEXT302 "I WANT TO BECOME A PIRATE "
|
||||
#define TEXT303 "I WANT TO BECOME A PROGRAMMER "
|
||||
#define TEXT304 "TELL ME SOMETHING ABOUT PELAYO "
|
||||
#define TEXT305 "I'LL JUST GO ON PLAYING, AND I'LL FORGET I SAW YOU. "
|
||||
#define TEXT306 "WHOSE STUPID IDEA COULD THIS BE? "
|
||||
#define TEXT307 "IT'S LIKE MY GRANDMOTHER'S HANDBAG "
|
||||
#define TEXT308 "JESUS, AREN'T I JUST REALLY COOL MAN...! "
|
||||
#define TEXT309 "THE MORE I SEE MYSELF, THE MORE I LOVE ME "
|
||||
#define TEXT310 "HOW DO I LOCK MYSELF THEN? "
|
||||
#define TEXT311 "I'LL HAVE TO OPEN ME FIRST, RIGHT? "
|
||||
#define TEXT312 "I'M ALL RIGHT WHERE I AM "
|
||||
#define TEXT313 "I GOT ME "
|
||||
#define TEXT314 "HI, MYSELF! "
|
||||
#define TEXT315 "I'LL WEAR THEM WHEN THE RIGHT TIME COMES "
|
||||
#define TEXT316 "I CAN'T SEE ANYTHING SPECIAL ABOUT IT "
|
||||
#define TEXT317 "IT'S ALL RIGHT WHERE IT IS "
|
||||
#define TEXT318 "AND WHAT FOR? "
|
||||
#define TEXT319 "I CAN'T "
|
||||
#define TEXT320 "HI, YOU! "
|
||||
#define TEXT321 "IT'S UNCLE DESIDERIO'S PANTHEON! "
|
||||
#define TEXT322 "YOOUU...UNCLE DESIDERIOOOO!! "
|
||||
#define TEXT323 "NO, I DON'T WANT TO CUT MYSELF AGAIN "
|
||||
#define TEXT324 "AHHH,,,EXCUS.... "
|
||||
#define TEXT325 "JAMM. AHH... "
|
||||
#define TEXT326 "YES...WOF, WOF "
|
||||
#define TEXT327 "LOOK, THERE'S A PIECE OF BUBBLE GUM STUCK HERE. "
|
||||
#define TEXT328 "THIS IS THE PORTABLILINE I GOT LAST CHRISTMAS "
|
||||
#define TEXT329 "IT'S VERY HIGH! "
|
||||
#define TEXT330 "COME OUT TO THE BALCONY MY JULIET!! "
|
||||
#define TEXT331 "YOU ARE THE LIGHT THAT ILLUMINATES MY WAY! "
|
||||
#define TEXT332 "HEY, DOOR!, WHAT'S THE MATTER? "
|
||||
#define TEXT333 "YOOOUU, CIGARETTE SPENDING MACHINEEE! "
|
||||
#define TEXT334 "IT'S A CIGARETTE SPENDING MACHINE "
|
||||
#define TEXT335 "I HAVE ANOTHER COIN INSIDE "
|
||||
#define TEXT336 "NO, I JUST DECIDED TO QUIT SMOKING AND DRINKING ALCOHOL "
|
||||
#define TEXT337 "I WILL DEVOTE MYSELF TO WOMEN FROM NO ON "
|
||||
#define TEXT338 "THIS IS A TRICK! NOTHING CAME OUT! "
|
||||
#define TEXT339 "AT LAST! "
|
||||
#define TEXT340 "JUST A TRUNK "
|
||||
#define TEXT341 "HELLO TRUNK, YOUR NAME IS JUST LIKE MY COUSIN FRANK... "
|
||||
#define TEXT342 "I'VE FOUND B.J.'S HANDBAG! "
|
||||
#define TEXT343 "OH MY GOD! DON'T GET MY IMAGE REFLECTED! I'M A VAMPIRE! "
|
||||
#define TEXT344 "OH...JESUS, IT'S JUST A DRAWING! "
|
||||
#define TEXT345 "LITTLE MIRROR, TELL ME, WHO IS THE MOST BEAUTIFUL IN THE WHOLE KINGDOM? "
|
||||
#define TEXT346 "HE WON'T OPEN "
|
||||
#define TEXT347 "ALL RIGHT. I GOT THE EAR-PLUGS ON "
|
||||
#define TEXT348 "IT'S A VAMPIRE'S HUNTER DIPLOMA, officially approved by oxford university "
|
||||
#define TEXT349 "NOT YET. THERE ARE STILL SOME INGREDIENTS MISSING. IT'S NOT WORTH WAKING HIM UP "
|
||||
#define TEXT350 "BUT I DON'T HAVE MONEY "
|
||||
#define TEXT351 "IT'S A BRITISH LAMP "
|
||||
#define TEXT352 "HELP ME OUT HERE BARTENDER!! "
|
||||
#define TEXT353 "A VAMPIRE CAME IN AND TOOK MY GIRLFRIEND AWAY!! "
|
||||
#define TEXT354 "BUT, AREN'T YOU GOING TO HELP ME!!?? "
|
||||
#define TEXT355 "DEAD?, WHAT DO YOU MEAN DEAD? "
|
||||
#define TEXT356 "AAHH.... "
|
||||
#define TEXT357 "A VAMPIRE HAS KIDNAPPED THE GIRL IN ROOM 501 "
|
||||
#define TEXT358 "BUT YOU HAVE TO HELP ME OUT! "
|
||||
#define TEXT359 "CAN'T YOU PLAY ONE FROM BLUR? "
|
||||
#define TEXT360 "HOW CAN YOU STAY HERE ALL DAY PLAYING THE SAME SONG ALL THE TIME? "
|
||||
#define TEXT361 "AND THEN, HOW CAN YOU HEAR ME? "
|
||||
#define TEXT362 "PLEASE, LEND ME THE ERA-PLUGS. "
|
||||
#define TEXT363 "COME ON, I'LL GIVE THEM BACK TO YOU RIGHT AWAY "
|
||||
#define TEXT364 "COOOMEE OONNN... "
|
||||
#define TEXT365 "WELL GOODBYE, I HAVE TO KILL A VAMPIRE. "
|
||||
#define TEXT367 "WHAT'S YOUR LANGUAGE, TRASILVANIAN? "
|
||||
#define TEXT368 "WHO IS UNCLE DESIDERIO? "
|
||||
#define TEXT369 "BUT, WHAT'S THE MATTER WITH THAT DRASCULA? "
|
||||
#define TEXT370 "WHO IS THAT GUY NAMED VON BRAUN? "
|
||||
#define TEXT371 "AND WHY DOESN'T HE DO IT? "
|
||||
#define TEXT372 "AND WHERE CAN I FIND VON BRAUN? "
|
||||
#define TEXT373 "WELL, THANKS AND GOODBYE. HOPE YOU SLEEP IT OFF JUST FINE. "
|
||||
#define TEXT374 "WE'D BETTER CALL FIRST "
|
||||
#define TEXT375 "ARE YOU PROFESSOR BRAUN? "
|
||||
#define TEXT376 "AND COULD YOU TELL ME WHERE I CA...? "
|
||||
#define TEXT377 "I DON'T BELIEVE HE IS GANIMEDES THE DWARF "
|
||||
#define TEXT378 "PROFESSOR!! "
|
||||
#define TEXT379 "PLEASE HELP ME!. THE LIFE OF MY GIRLFRIEND DEPENDS ON YOU!! "
|
||||
#define TEXT380 "WELL, ALL RIGHT. I DON'T NEED YOUR HELP "
|
||||
#define TEXT381 "ALL RIGHT. I'M LEAVING "
|
||||
#define TEXT382 "DON'T DE AFRAID. WE WILL BEAT DRASCULA TOGETHER. "
|
||||
#define TEXT383 "THEN WHY DON'T YOU HELP ME? "
|
||||
#define TEXT384 "I GOT THEM "
|
||||
#define TEXT385 "YES, I GOT THEM!! "
|
||||
#define TEXT386 "ALL RIGHT "
|
||||
#define TEXT387 "AHH....YES "
|
||||
#define TEXT388 "I HAVE COME TO GET INTO THAT CABIN AGAIN "
|
||||
#define TEXT389 "I AM READY TO FACE YOUR TEST"
|
||||
#define TEXT390 "ALL RIGHT OLD MAN. I CAME FOR MY MONEY "
|
||||
#define TEXT391 "NO, NOTHING. I WAS JUST LEAVING "
|
||||
#define TEXT392 "SORRY..."
|
||||
#define TEXT393 "DO YOU LIKE THIS BOOK?. IT HAS SOME SCORES FROM TCHAIKOWSKY "
|
||||
#define TEXT394 "HOW CAN I KILL A VAMPIRE?"
|
||||
#define TEXT395 "HAS ANYBODY TOLD YOU THAT SLEEPING IN A BAD POSITION IS NOT GOOD FOR YOU? "
|
||||
#define TEXT396 "THAT'S WHAT MY MUM ALWAYS TELL ME "
|
||||
#define TEXT397 "WHY WOULDN'T DRASCULA KILL YOU? "
|
||||
#define TEXT398 "AND WHAT WAS IT? "
|
||||
#define TEXT399 "GREAT! YOU HAVE AN IMMUNIZING BREW"
|
||||
#define TEXT400 "SO? "
|
||||
#define TEXT401 "ALL RIGHT "
|
||||
#define TEXT402 "CAN YOU REPEAT WHAT I NEED FOR THAT BREW "
|
||||
#define TEXT403 "WELL, I'LL RUSH OUT TO GET IT "
|
||||
#define TEXT404 "HEY, WHAT HAPPENED WITH THE PIANIST? "
|
||||
#define TEXT405 "I HAVE ALL THE INGREDIENTS OF THAT BREW "
|
||||
#define TEXT406 "JUST A QUESTION. WHAT IS ALL THAT ABOUT THE ALUCSARD ETEREUM? "
|
||||
#define TEXT407 "HELLO, HELLO... "
|
||||
#define TEXT408 "AND WHERE IS THAT CAVERN? "
|
||||
#define TEXT409 "WHAT HAPPENS? DIDN'T YOU HAVE TO GO TO THE COURT? "
|
||||
#define TEXT410 "...BUT... IF I MEET MORE VAMPIRES? "
|
||||
#define TEXT411 "IT'S A VAMPIRE THAT DOESN'T LET ME COME THROUGH "
|
||||
#define TEXT412 "HE LOOKS LIKE YODA, BUT A LITTLE TALLER "
|
||||
#define TEXT413 "HEY YODA, IF YOU JUST LET ME GO ON MY WAY, I'LL GIVE YOU A PENNY "
|
||||
#define TEXT414 "OK, OK, YOU GET MAD ABOUT NOTHING MAN "
|
||||
#define TEXT415 "HAS ANYBODY TOLD YOU THAT YOU LOOK LIKE YODA?"
|
||||
#define TEXT416 "HI VAMPIRE, IT'S A BEAUTIFUL NIGHT, HUH? "
|
||||
#define TEXT417 "ARE YOU A VAMPIRE OR AN OIL PAINTING? "
|
||||
#define TEXT418 "I'D BETTER NOT SAY ANYTHING, IN CASE YOU GET MAD "
|
||||
#define TEXT419 "IT'S LOCKED "
|
||||
#define TEXT420 "THE MAGPIE WOULD STICK OUT MY EYES IF I TRIED! "
|
||||
#define TEXT421 "OH MY GOD. IT'S LOCKED...THAT'S SCARY, HUH?"
|
||||
#define TEXT422 "THE HINGES ARE RUSTY "
|
||||
#define TEXT423 "THERE IS ONLY ONE CAN OF FLOUR IN THERE "
|
||||
#define TEXT424 "THAT TOOK AWAY THE RUST "
|
||||
#define TEXT425 "I HAVE FOUND A PINE STICK "
|
||||
#define TEXT426 "I'LL TAKE THIS THICKER ONE "
|
||||
#define TEXT427 "WELL, I THINK I CAN GET RID OF THIS STUPID DISGUISE "
|
||||
#define TEXT428 "\"PASSAGE TO TOWERS CLOSED FOR REPAIRS. PLEASE USE MAIN ENTRANCE. SORRY FOR THE INCONVENIENCE\""
|
||||
#define TEXT429 "...HE IS PALE, HE HAS FANGS AND WEARS A TOUPE<50> AND HE SURE IS DRASCULA! "
|
||||
#define TEXT430 "IT'S B.J.! ARE YOU ALL RIGHT B.J.? "
|
||||
#define TEXT431 "YES, I KNOW SHE IS STUPID, BUT I'M SO LONELY "
|
||||
#define TEXT432 "YOU DON'T HAVE A KEY AROUND THERE, DO YOU?"
|
||||
#define TEXT433 "I BET YOU DON'T HAVE A PICKLOCK AROUND! "
|
||||
#define TEXT434 "GIVE ME A HAIRPIN, I'M GOING TO PLAY MCGYVER HERE! "
|
||||
#define TEXT435 "DON'T GO ANYWHERE. I'LL BE RIGHT BACK "
|
||||
#define TEXT436 "SHOOT! IT'S BROKEN! "
|
||||
#define TEXT437 "OLEEEE! I EVEN SHAVED DUDE! "
|
||||
#define TEXT438 "YES, DARLING? "
|
||||
#define TEXT439 "HE'S NOT ARRIVED YET "
|
||||
#define TEXT440 "THE PIANIST IS NOT HERE "
|
||||
#define TEXT441 "A TRANSYLVANIAN SCOTCH ON THE ROCKS "
|
||||
#define TEXT442 "I DON'T HAVE A ROOM YET "
|
||||
#define TEXT443 "IT LOOKS LIKE HE GOT STUCK IN THE BATH AND DECIDED TO RUN A BAR "
|
||||
#define TEXT444 "HE WAS DRUNK AS A SAILOR "
|
||||
#define TEXT445 "THAT HAIR...REMINDS ME OF SOMEBODY "
|
||||
#define TEXT446 "IT'S A RAW-BONED SKELETON "
|
||||
#define TEXT447 "LOOK! THERE'S MIGUEL BOSE! "
|
||||
#define TEXT448 "HE'S ASLEEP. IT'D BE A SHAME WAKING HIM UP."
|
||||
#define TEXT449 "HE'S UGLIER THAN EMILIO DE PAZ "
|
||||
#define TEXT450 "A PINE-WOODEN COFFIN "
|
||||
#define TEXT451 "HE IS GOING TO CUT ME IN LITTLE SLICES. JUST LIKE A SAUSAGE "
|
||||
#define TEXT452 "I DON'T LIKE PENDULAE. I'D RATHER PREFER ARTICHOKES. "
|
||||
#define TEXT453 "I CAN'T MAKE IT. I'M HANDCUFFED "
|
||||
#define TEXT454 "IT'S OBVIOUSLY A SECRET DOOR. "
|
||||
#define TEXT455 "THEY IGNORE ME "
|
||||
#define TEXT456 "COME ON..! "
|
||||
#define TEXT457 "WHEN I READ THE SCRIPT IT WAS SUPPOSED TO MOVE, BUT THE BUDGET GOT CRAZY AND THEY COULDN'T AFFORD TO PAY THE GYM, SO THAT I NEVER GOT TOUGH. END OF STORY. "
|
||||
#define TEXT458 "IT SEEMS A LITTLE LOOSE FROM THE WALL "
|
||||
#define TEXT459 "I DON'T THINK IS GOING TO HELP ME ANYWAY. IT'S TOO WET TO LIGHT IT "
|
||||
#define TEXT460 "TO WEST WING? NO WAY! NOBODY KNOWS WHAT YOU CAN FIND THERE!! "
|
||||
#define TEXT461 "SHE'S GOT NICE TRANSILVANIAN REASONS "
|
||||
#define TEXT463 "IT'S A SHAME THERE ISN'T A ROASTED LAMB IN THERE "
|
||||
#define TEXT464 "LAST TIME I OPENED AN OVEN I BLEW UP THE HOUSE "
|
||||
#define TEXT465 "THAT'S THE TRANSILVANIAN FOOTBALL BADGE. "
|
||||
#define TEXT466 "WHAT FOR? TO PUT IT ON MY HEAD "
|
||||
#define TEXT467 "I DON'T THINK THESE TOWERS ARE THE OPENING KIND "
|
||||
#define TEXT468 "I DON'T WANT TO KNOW WHAT KIND OF FOOD IS IN THERE! "
|
||||
#define TEXT469 "IT LOOKS IMPRESSIONIST TO ME... "
|
||||
#define TEXT470 "THE NIGHT IS FALLING OVER ALL OF US...THAT'S SCARY, ISN'T IT? "
|
||||
#define TEXT471 "IT'S STUCK! "
|
||||
#define TEXT472 "IT'S THE KING. YOU DIDN'T IMAGINE THAT, DID YOU! "
|
||||
#define TEXT473 "NO, I ALREADY HAVE ONE AT HOME TO FEED."
|
||||
#define TEXT474 "A SHELF WITH BOOKS AND SOME OTHER THINGS. "
|
||||
#define TEXT475 "BUT WHO CAN I CALL AT THIS TIME? "
|
||||
#define TEXT476 "\"HOW TO MAKE THE TAX RETURN FORMS\". HOW INTERESTING!"
|
||||
#define TEXT477 "I ALREADY HAVE ONE AT HOME. I THINK IT'S A WORLDWIDE BEST SELLER "
|
||||
#define TEXT478 "A COMPLETELY NORMAL KEY "
|
||||
#define TEXT479 "I THINK SHE IS NOT FROM AROUND HERE "
|
||||
#define TEXT480 "HEY, THEY'RE FANG-LIKE FRENCH FRIES! I LOVE IT! "
|
||||
#define TEXT481 "I DON'T THINK THIS IS THE RIGHT TIME TO EAT THAT CRAP KNOWING THAT MY GIRLFRIEND HAS BEEN KIDNAPPED BY THE MOST EVIL PERSON EVER ON EARTH "
|
||||
#define TEXT482 "I'M HAVING A GREAT TIME KILLING VAMPIRES WITH THIS THING! "
|
||||
#define TEXT483 "LET'S SEE IF ANOTHER ONE COMES SOON! "
|
||||
#define TEXT484 "NO, IT HAS TO BE WITH A DIRTY AND STINKY VAMPIRE, JUST LIKE THE ONE I KILLED BEFORE "
|
||||
#define TEXT485 "THIS IS THE ONE AND ONLY WIG ELVIS USED WHEN HE GOT BALD"
|
||||
#define TEXT486 "IT'S FLOUR, BUT DON'T ASK ME ANY COMMERCIAL NAMES. "
|
||||
#define TEXT487 "MAYBE ANOTHER TIME, OK? "
|
||||
#define TEXT488 "THAT'S A GREAT AXE, IT'S A SHAME THERE IS NO VAMPIRE'S HEAD AROUND HERE, HUH? "
|
||||
#define TEXT489 "NO. I'M REALLY A GOOD PERSON. "
|
||||
#define TEXT490 "IT'S MARGARET'S THATCHER DEODORANT...HA, HA, HA...!! "
|
||||
#define TEXT491 "THAT'S A PRETTY CUTE CLOAK "
|
||||
#define TEXT493 "JUST LIKE ALL BRANCHES FROM ANY TREE IN THE WORLD, THERE IS NOTHING SPECIAL. "
|
||||
#define TEXT494 "HEY, THAT'S AMAZING! A ROPE WITHIN THIS TYPE OF ADVENTURE!"
|
||||
#define TEXT495 "I WONDER WHAT WE COULD USE IT FOR... "
|
||||
#define TEXT496 "A ROPE TIED TO A BRANCH OR THE OTHER WAY AROUND, HOWEVER YOU WANT TO PUT IT..."
|
||||
#define TEXT497 " IT LOOKS LIKE THIS MAGPIE IS EVIL-MINDED"
|
||||
#define TEXT498 "FORGET IT, I'M NOT SAYING ANYTHING IN CASE HE GETS MAD "
|
||||
#define TEXT499 "SHE LOOKS DEAD, BUT SHE REALLY ISN'T, HUH? "
|
||||
#define TEXT500 "NO ANIMAL WAS HARMED DURING THE PRODUCTION OF THIS GAME "
|
||||
#define TEXTB1 "I'M HERE, DRINKING "
|
||||
#define TEXTB10 "FROM TIME TO TIME HE COMES DOWN TO THE VILLAGE AND TAKES SOMEONE WITH HIM.. "
|
||||
#define TEXTB11 "A LITTLE WHILE AFTER WE JUST A FEW FOUND BODY PARTS. I THINK HE IS DEALING WITH ORGANS OR SOMETHING LIKE THAT"
|
||||
#define TEXTB12 "THE ONLY PERSON IN THE VILLAGE WHO KNOWS HOW TO END UP WITH DRASCULA IS A CULTIVATED PERSON "
|
||||
#define TEXTB13 "HE LIVES IN A LOG-CABIN OUT OF TOWN, EVER SINCE DRASCULA BEAT HIM UP. "
|
||||
#define TEXTB14 "HE IS THE ONLY ONE WHO COULD HELP US WITH DRASCULA, AND HE DOESN'T WANT TO HEAR ABOUT US. HOW DO YOU LIKE THAT? "
|
||||
#define TEXTB2 "THEY ARE ALL DEAD, THANKS. BURPP... "
|
||||
#define TEXTB3 "YES, SURE... "
|
||||
#define TEXTB4 "SHE FEELS ATTRACTED TO UNCLE DESIDERIO. "
|
||||
#define TEXTB5 "EVEN BETTER, UNCLE DESIDERIO'S DEAD BODY. "
|
||||
#define TEXTB6 "MY UNCLE. HE WENT TO CASTLE AND NEVER CAME BACK "
|
||||
#define TEXTB7 "WELL, HE CAME BACK JUST A LITTLE. IF ONLY VON BRAUN HADN'T SCREWED THINGS UP MY UNCLE WOULD BE DRINKING WITH US NOW. "
|
||||
#define TEXTB8 "NOTHING... "
|
||||
#define TEXTB9 "WELL, YES !. THAT MEAN MAN HAS TERRIFIED US ALL. "
|
||||
#define TEXTBJ1 "ARE YOU ALL RIGHT?. HEY, COME ON, WAKE UP! CAN YOU HEAR ME ? ARE YOU DEAD? "
|
||||
#define TEXTBJ10 "OH, NO...! IT WASN'T THE HIT, HA, HA. I JUST STEEPED ON YOUR GLASSES BY ACCIDENT "
|
||||
#define TEXTBJ11 "YOU REALLY LOOK GOOD WITH THOSE GLASSES. I KNOW HE'S NOT FERNANDO LANCHA, BUT I FIND HIM ATTRACTIVE... "
|
||||
#define TEXTBJ12 "YES, YES, I DO...COME ON, HOLD ME AND KISS ME TIGHT "
|
||||
#define TEXTBJ13 "OH JHONNY, HONEY, THANKS GOD YOU'RE HERE...THAT DAMNED DRASCULA TIED ME UP TO THE BED AND THEN HE'S GONE DOWNSTAIRS TO SEE THE FOOTBALL GAME. "
|
||||
#define TEXTBJ14 "YES, IT'S TRUE. PLEASE, SET ME FREE "
|
||||
#define TEXTBJ15 "NO, I'M SORRY. I USED THEM ALL IN THE TOWER WHEN I WAS TRYING TO LIBERATE WHILE YOU LET ME DOWN. "
|
||||
#define TEXTBJ16 "JOHNNY, IS THAT YOU?. OH, GOD, GREAT! I KNEW YOU'D COME! "
|
||||
#define TEXTBJ17 "YOU DON'T EVEN KNOW HOW MUCH THAT EVIL DRASCULA HAS MADE ME SUFFER "
|
||||
#define TEXTBJ18 "FIRSTLY HE BROUGHT ME FLYING OVER HER AND THEN PUT ME IN THIS DISGUSTING ROOM WITHOUT EVEN A MIRROR OR ANYTHING "
|
||||
#define TEXTBJ19 "I'M TELLING YOU!, AND THE WORSE PART IS THAT HE DIDN'T EVEN APOLOGIZE, NOT EVEN ONCE "
|
||||
#define TEXTBJ2 "NO, MY NAME IS BIlLIE JEAN, BUT YOU CAN CALL ME B. J., IT'S SHORTER "
|
||||
#define TEXTBJ20 "JHONNY HONEY, WHERE ARE YOU? "
|
||||
#define TEXTBJ21 "I'M READY TO LEAVE DEAR. "
|
||||
#define TEXTBJ22 "WAIT, I'M GOING TO TAKE A LOOK...NO DARLING, I'M SORRY "
|
||||
#define TEXTBJ23 "THERE YOU GO... "
|
||||
#define TEXTBJ24 "\"DEAR JOHNNY\""
|
||||
#define TEXTBJ25 "I'LL NEVER FORGET YOU BUT I HAVE REALIZED THAT THIS JUST COULDN'T WORK OUT RIGHT. TO BE HONEST WITH YOU I'LL TELL YOU THAT THERE IS ANOTHER MAN. HE IS TALLER, STRONGER... "
|
||||
#define TEXTBJ26 "AND HE HAS ALSO RESCUED ME FROM DRASCULA. HE HAS ASKED ME TO MARRY HIM, AND I HAVE ACCEPTED. "
|
||||
#define TEXTBJ27 "BYE JHONNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS ITS OWN WAYS "
|
||||
#define TEXTBJ28 "I HOPE THERE WON'T BE HARD FEELINGS BETWEEN US. REMEMBER THAT I STILL LOVE YOU, BUT ONLY AS A FRIEND "
|
||||
#define TEXTBJ3 "HA, HA...! THAT WAS A GOOD ONE! "
|
||||
#define TEXTBJ4 "WELL, JHONNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS STRONG NOISE DOWN THE CORRIDOR. "
|
||||
#define TEXTBJ5 "I DIDN'T PAY ATTENTION AT FIRST, BUT AFTER ABOUT TWO HOURS OR SO I COULDN'T SLEEP AND WENT OUT FOR A WALK. "
|
||||
#define TEXTBJ6 "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. "
|
||||
#define TEXTBJ7 "I WAS GOING TO GIVE YOU THE KISS OF LIFE BUT IT WASN'T NECESSARY BECAUSE YOU STARTED TO TALK "
|
||||
#define TEXTBJ8 "YOU SAID SOMETHING ABOUT A SCARECROW. I WAS VERY SCARED, YOU KNOW. IT'S A REAL SHOCK WHEN A DEAD PERSON STARTS TALKING RIGHT? "
|
||||
#define TEXTBJ9 "ISN'T THAT RIGHT?, WELL, THEN I MANAGED TO BRING YOU TO MY ROOM THE BEST WAY I COULD. I PUT YOU IN BED...AND THAT'S ALL...HA, HA, HA... "
|
||||
#define TEXTD1 "HEY IGOR, HOW ARE THINGS? "
|
||||
#define TEXTD10 "THE TIME HAS COME ! TURN ON THE ALKALINE BATTERIES' SWITCH. "
|
||||
#define TEXTD11 "DAMNED IT! WHAT WENT WRONG? "
|
||||
#define TEXTD12 "ARE YOU SURE YOU CHECKED IT ALL AND THERE WAS NOTHING MISSING?. YOU'VE BEEN LATELY MESSING AROUND WITH THAT STUFF ABOUT TAXES AND I DON'T KNOW MAN... "
|
||||
#define TEXTD13 "YOU STUPID THING! YOU FORGOT TO CONNECT THE INDIFIBULATOR. THE SCREWS HAVE PROBABLY MAGNETIZED AND HIS BRAIN BURNT "
|
||||
#define TEXTD14 "YOU ARE DEAD, YOU ARE DEAD...WAIT TILL I GET YOU! "
|
||||
#define TEXTD15 "SHUT UP! I'LL GET ANOTHER BRAIN TOMORROW AND THEN WE WILL REPEAT THE EXPERIMENT "
|
||||
#define TEXTD16 "THIS TIME I'LL GET A WOMAN'S BRAIN. SHINY AND NOT USED YET...HA, HA, HA, GOODIE ONE! "
|
||||
#define TEXTD17 "SO WHAT? I'M THE BAD GUY, RIGHT? SO I CAN BE AS FULL OF MACHISMO AS I WANT, ALL RIGHT?. AND IF YOU SAY SOMETHING AGAIN I'LL TURN YOUR HUMP BACK TO FRONT!"
|
||||
#define TEXTD18 "HA, HA, HA. YOU FELL TOOO!! WHAT IS IT, ARE YOU ALL STUPID IN THIS COUNTRY?. DIDN'T YOU READ THE SIGN SAYING \"DRASCULA DOES NOT SLEEP HERE\"? IGOR, YOU ARE GOING TO PAY FOR DARING TO FIGHT AGAINST ME!"
|
||||
#define TEXTD19 "AND SO, TELL ME , YOU STUPID HUMAN. HOW COME YOU WANT TO DESTROY ME? "
|
||||
#define TEXTD2 "IT'S ALWAYS THE SAME STORY. EVERYTIME THERE'S A GOOD GAME ON THE SATELLITE! ANYWAY, WE'LL GO SEE IT IN THE BAR, AS USUAL "
|
||||
#define TEXTD20 "THAT'S BEAUTIFUL!. IF IT WASN'T BECAUSE IT MAKES ME LAUGH, I WOULD CRY. "
|
||||
#define TEXTD21 "OUR GIRLFRIEND'S BRAIN TO HELP ME CONQUERING THE WORLD "
|
||||
#define TEXTD22 "YES, SURE! I'LL TAKE IT FROM HER AND GIVE IT TO MY FRUSKYNSTEIN. THE WORLD WILL BE MINE WITH IT, HA, HA. "
|
||||
#define TEXTD23 "NO WHAT!?. YOU'RE DEAD, MAN! I'M GOING TO...YOU REALLY GOT ME ANGRY MAN...COME ON, PREPARE TO DIE! "
|
||||
#define TEXTD24 "HA, HA, HA. NOT EVEN IN YOUR WILDEST DREAMS! "
|
||||
#define TEXTD25 "YES, ISN'T IT? HA, HA, "
|
||||
#define TEXTD26 "ALL RIGHT, ALL RIGHT. BUT DO IT QUICKLY, OK? "
|
||||
#define TEXTD27 "PUT THAT CIGARETTE OUT NOW! I CAN'T STAND YOU ANYMORE! "
|
||||
#define TEXTD28 "AND SO, DOES THAT BREW HAVE THE OPPOSITE EFFECT? "
|
||||
#define TEXTD29 "WELL, WE'LL SEE THAT "
|
||||
#define TEXTD3 "IGOR LISTEN CAREFULLY MAN, WE ARE GOING TO START WITH PHASE NUMBER ONE OF MY PLAN TO CONQUER THE WORLD. "
|
||||
#define TEXTD30 "OK, LET'S SEE IT. IGOR, BRING ME THE CD \"SCRATCHING YOUR NAILS ALL OVER THE BLACKBOARD\""
|
||||
#define TEXTD31 "NO WAY. THE GIRL STAYS WITH ME. YOU RE STAYING THERE UNTIL THE PENDULUM CUTS YOU INTO THIN SLICES. HA, HA, HA. "
|
||||
#define TEXTD32 "MAN I'M I JUST BAD... COME ON IGOR, LET'S MAKE THE BREW AND CONQUER THE WORLD."
|
||||
#define TEXTD33 "WHAT HAPPENS NOW? "
|
||||
#define TEXTD34 "YES, WHAT?...OH, DAMNED, THE GAME! "
|
||||
#define TEXTD35 "I FORGOT ABOUT THAT. GET THE GIRL AND LET'S GO AND SEE HIM. WE CAN CONQUER THE WORLD LATER. "
|
||||
#define TEXTD36 "THANKS MAN, I WAS THIRSTY "
|
||||
#define TEXTD37 "OH, THE CRUCIFIX!!...THE CRUCIFIX...! "
|
||||
#define TEXTD38 "I DIDN'T NOTICE ABOUT THAT BEAUTIFUL CRUCIFIX! "
|
||||
#define TEXTD39 "LEAVE ME ALONE!, I'M WATCHING THE GAME "
|
||||
#define TEXTD4 "FIRST WE'LL CAPTURE ONE OF THE STORM'S LIGHTNINGS AND WE'LL DEMAGNETIZE IT WITH OUR INDIFIBULATOR. THE ELECTRICITY WILL COME THROUGH TO MY MONSTER AND HE'LL GET ALIVE! "
|
||||
#define TEXTD5 "IF EVERYTHING WORKS OUT ALL RIGHT, THIS WILL BE THE BEGINNING OF A GREAT ARMY THAT WILL CONQUER THE WORLD FOR ME. HA, HA,. "
|
||||
#define TEXTD6 "THE MONSTERS WILL DESTROY ALL THE ARMY'S WEAPONS IN THE WORLD, MEANWHILE, WE'LL BE SAFE IN THE PIECES OF LAND I BOUGHT IN GIBRALTAR."
|
||||
#define TEXTD7 "WE'LL SET UP A COUP. GOVERNMENTS ALL OVER THE WORLD WILL BE UNCOVERED AND THEIR COUNTRIES WILL SURRENDER TO ME! "
|
||||
#define TEXTD8 "I'LL BECOME THE FIRST BAD GUY IN HISTORY TO MAKE IT ! HA, HA ! "
|
||||
#define TEXTD9 "I'M NOT TALKING TO YOU, IDIOT! I'M JUST GIVING YOU THE PLOT. ALL RIGHT, EVERYTHING READY?"
|
||||
#define TEXTE1 "YOU...HEY YOU! "
|
||||
#define TEXTE10 "YEAH, IT'S YOU "
|
||||
#define TEXTE11 "WHY DO ALL ADVENTURE GAMES END UP WITH A SUNRISE OR A SUNSET? "
|
||||
#define TEXTE12 "DO ALL THESE NAMES BELONG TO THE CREATORS OF THE GAME?"
|
||||
#define TEXTE13 "AREN'T THEY ASHAMED TO BE SEEN BY EVERYBODY? "
|
||||
#define TEXTE14 "JESUS, THAT EMILIO DE PAZ IS EVERYWHERE!! "
|
||||
#define TEXTE15 "REALLY? "
|
||||
#define TEXTE16 "YES "
|
||||
#define TEXTE17 "WELL, DON'T MAKE A FUSS ABOUT IT. "
|
||||
#define TEXTE18 "HEY WEREWOLF, BY THE WAY... "
|
||||
#define TEXTE19 "DIDN'T YOU FALL OFF A WINDOW AND GOT BADLY HURT "
|
||||
#define TEXTE2 "DON'T GIVE ME THAT CRAP ABOUT A DEAD BODY OK? "
|
||||
#define TEXTE20 "IF AT LEAST IT WASN'T ALWAYS THE SAME ONES... "
|
||||
#define TEXTE21 "HE'S BEEN OUT FOUR TIMES ALREADY. "
|
||||
#define TEXTE22 "I'D LIKE TO BE A MODEL "
|
||||
#define TEXTE23 "ALL RIGHT, AND WHAT ARE YOU GOING TO DO? "
|
||||
#define TEXTE3 "I'M ALIVE. IT'S JUST THAT I'M STARVING. "
|
||||
#define TEXTE4 "WELL, YOU SEE. I WAS THE DRUNKARD OF THE VILLAGE, JUST KEEPING UP WITH THE FAMILY TRADITION, YOU KNOW?, ONE NIGHT DRASCULA KIDNAPPED ME TO TAKE MY ORGANS AWAY. "
|
||||
#define TEXTE5 "SINCE ALCOHOL STILL KEEPS ME QUITE YOUNG, I'M HERE LIKE A SCRAP YARD. EVERYTIMR HE NEEDS SOMETHING FOR THE MONSTER HE IS CREATING, HE JUST COMES AND TAKES IT FROM ME."
|
||||
#define TEXTE6 "IT HURT AT FIRST, BUT I DON'T CARE ANYMORE "
|
||||
#define TEXTE7 "I DON'T KNOW. I GUESS IT'S HIS GRADUATE PROJECT. "
|
||||
#define TEXTE8 "I'M DESIDERIO, AND I CAN HELP YOU IN ANYTHING YOU NEED. "
|
||||
#define TEXTE9 "THE TRUTH IS THAT I DON'T REALLY FEEL LIKE IT, BUT THANKS VERY MUCH ANYWAY SIR. "
|
||||
#define TEXTI1 "MASTER, I THINK THIS IS NOT WORKING "
|
||||
#define TEXTI10 "YES, MY MASTER "
|
||||
#define TEXTI11 "MASTER "
|
||||
#define TEXTI12 "DO YOU KNOW WHAT TIME IS IT ? "
|
||||
#define TEXTI13 "WHAT?, OH, THAT SCARED ME !. YOU ARE THE \"NIGHT-CLEANING GUY\", RIGHT?"
|
||||
#define TEXTI14 "I'M IGOR, THE VALET. YOU CAN START WITH THE BALL ROOM. THERE'S BEEN A SUPER NATURAL ORGY YESTERDAY AND IT LOOKS LIKE SHIT. "
|
||||
#define TEXTI15 "IF YOU NEED ANYTHING, JUST BUY IT. "
|
||||
#define TEXTI16 "IT'S THE TAX RETURN APPLICATION FORM, CAN'T YOU SEE IT? "
|
||||
#define TEXTI17 "NEITHER DO I. FIRST OF ALL THE NUMBERS ARE VERY SMALL AND ALSO I CAN'T SEE MUCH AT THIS DISTANCE.. "
|
||||
#define TEXTI18 "NO WAY!. THEY MAKE ME LOOK UGLY. "
|
||||
#define TEXTI19 "OH, WELL. IT'S JUST LIKE A CRAZY PARTY THAT THE MASTER ORGANIZES WITH HIS FRIENDS EACH TIME SOME IDIOT COMES ALONG TRYING TO KILL HIM."
|
||||
#define TEXTI2 "I AM POSITIVE, MASTER "
|
||||
#define TEXTI20 "THEY TAKE HIS EYES OUT. THEN, POUR SOME LEMON JUICE SO THAT IT ITCHES TO DEATH, AND THEN... "
|
||||
#define TEXTI21 "NO"
|
||||
#define TEXTI22 "WHAT DO YOU MEAN WHY NOT? DO YOU KNOW WHAT TIME IT IS? "
|
||||
#define TEXTI23 "YES, IT'S WINTER "
|
||||
#define TEXTI24 "SEE YOU LATER "
|
||||
#define TEXTI25 "DON'T EVEN THINK ABOUT IT! "
|
||||
#define TEXTI26 "WELL, THAT'S ENOUGH FOR TODAY. I'M GOING TO HAVE SUPPER "
|
||||
#define TEXTI27 "MAN, I ALWAYS FORGET TO LOCK IT, RIGHT? "
|
||||
#define TEXTI28 "THE HELL WITH IT! "
|
||||
#define TEXTI29 "WHAT?. OH, YOU SCARED ME MASTER, I THOUGHT YOU WERE ASLEEP. "
|
||||
#define TEXTI3 "I'M SORRY MASTER "
|
||||
#define TEXTI30 "OH, BY THE WAY, I TOOK THE LIVING-ROOM KEYS SO THAT YOU CAN WATCH THE EARLY MORNING CARTOONS WITHOUT WAKING ME UP. "
|
||||
#define TEXTI31 "YOU'VE GOT ANOTHER COLD MASTER? DAMN IT!. I TOLD YOU TO GET SOME HEATING IN HERE... "
|
||||
#define TEXTI32 "ALL RIGHT, JUST TAKE YOUR ASPIRIN AND GO TO BED TO SWEAT FOR A WHILE. GOOD NIGHT "
|
||||
#define TEXTI4 "ARE YOU GOING TO BRING HERE ANOTHER CRAZY SCIENTIST? I'LL TELL YOU THAT THE LABORATORY IS ALREADY PACKED UP, AND BESIDES, THEY'RE ALL OUT OF DATE. "
|
||||
#define TEXTI5 "HUSH MASTER, THE FEMINIST COULD HEAR YOU"
|
||||
#define TEXTI6 "DAMNED IT! "
|
||||
#define TEXTI7 "I DIDN'T EXPECT YOU SO SOON, MASTER."
|
||||
#define TEXTI8 "QUITE BAD MASTER. THERE MUST BE SOME PROBLEMS WITH THE SATELLITE AND I JUST CAN'T RECEIVE ANYTHING. BESIDES THERE ARE SOME INTERFERENCES BECAUSE OF THE STORM."
|
||||
#define TEXTI9 "WHAT DO I KNOW, MASTER? "
|
||||
#define TEXTL1 "WAIT A MINUTE. ARE YOU GOING TO LET OURSELVES BE GUIDED BY OUR MOST PRIMITIVE INSTINCTS JUST BECAUSE WE BELONG TO DIFFERENT RACES AND THE SOCIAL SITUATION IS TELLING US TO DO SO? "
|
||||
#define TEXTL10 "PUKE! HUNTING AS A WAY TO SURVIVE IS AN INCOMPATIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN"
|
||||
#define TEXTL11 "IT JUST HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO BETHINK AND GET TO THE ABOVE MENTIONED THOUGHT. "
|
||||
#define TEXTL12 "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 "
|
||||
#define TEXTL13 "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. "
|
||||
#define TEXTL14 "IT DOESN'T REALLY GET TO ME AT ALL. "
|
||||
#define TEXTL15 "WHAT? "
|
||||
#define TEXTL16 "I DON'T KNOW WHAT YOU'RE TALKING ABOUT, YOU EPHEMERAL CREATURE "
|
||||
#define TEXTL17 "I'M NOT INTERESTED "
|
||||
#define TEXTL18 "I DON'T KNOW ABOUT THE OTHER GAMES, BUT WE COULD USE THIS BEAUTIFUL SCREEN."
|
||||
#define TEXTL2 "AREN'T WE TIED BY SENSE WHICH IS THE MOST POWERFUL WEAPON AS WELL AS THE MOST PRECIOUS GIFT? "
|
||||
#define TEXTL20 "I'D CARE... "
|
||||
#define TEXTL21 "NO. IT'S JUST THE SON, THE FATHER, THE GRANDFATHER AND A FRIEND, WHO ARE CALLED LIKE THAT."
|
||||
#define TEXTL22 "BUT, IT IS GOING TO LOOK LIKE THE GAME WAS MADE BY FIVE PEOPLE. "
|
||||
#define TEXTL23 "THESE ARE PROMISING GUYS "
|
||||
#define TEXTL24 "THAT'S A GOOD ONE! A GOOD ONE!"
|
||||
#define TEXTL25 "PLEASE, CALL ME CONSTANTINO "
|
||||
#define TEXTL26 "IT WASN'T ME MAN. IT WAS \"EL COYOTE\", MY TWIN"
|
||||
#define TEXTL27 "JESUS, THESE ARE REALLY LONG CREDIT TITLES "
|
||||
#define TEXTL28 "I STOPPED COUNTING A LONG TIME AGO "
|
||||
#define TEXTL29 "WHAT WILL BECOME OF YOU NOW, DESIDERIO? "
|
||||
#define TEXTL3 "OH, IF WE ALL LET OUR THOUGHTS GUIDE OUR WAY IN LIFE WITHOUT LEAVING SOME ROOM FOR FEELINGS WHICH ARE PRECISELY WHAT LET'S OUR PRE-EVOLUTIVE INSTINCTS COME OUT! "
|
||||
#define TEXTL30 "BUT, YOU SHOULD LOSE SOME WEIGHT "
|
||||
#define TEXTL31 "I'LL JUST RETIRE TO THE TIBET AND THINK ABOUT THE MEANING OF LIFE "
|
||||
#define TEXTL4 "ANSWER ME, EPHEMERAL CREATURE. WOULDN'T WE ALL BE HAPPIER WITH THOSE EMOTIONAL BOUNDINGS? "
|
||||
#define TEXTL5 "YOU ARE NOT GETTING THROUGH "
|
||||
#define TEXTL6 "THIS IS A VERY CLEAR EXAMPLE, YOU SEE?: YOU WANT TO GET THROUGH AND GO AHEAD WITH YOUR ADVENTURE, AND I WON'T LET YOU DO THAT"
|
||||
#define TEXTL7 "WILL THAT BE A CONTROVERSIAL POINT BETWEEN US THAT HAVE JUST MET? "
|
||||
#define TEXTL8 "WELL THEN "
|
||||
#define TEXTL9 "WELL, THAT DEPENDS ON WHAT WE TAKE A RELATIONSHIP FOR. SOME AUTHORS DEFEND... "
|
||||
#define TEXTP1 "HI "
|
||||
#define TEXTP10 "I'M A CONSERVATOIRE PIANIST AND THE BARTENDER WON'T BUY MORE SCORES FOR ME "
|
||||
#define TEXTP11 "OH GOD, I REALLY LOVE CLASSIC MUSIC! "
|
||||
#define TEXTP12 "IT'S BECAUSE I'M WEARING EAR-PLUGS"
|
||||
#define TEXTP13 "IT'S BECAUSE I CAN LIP-READ "
|
||||
#define TEXTP14 "NOOO "
|
||||
#define TEXTP15 "NO! I'M NOT TAKING THIS ANY LONGER! "
|
||||
#define TEXTP16 "NO WAYYYYY! "
|
||||
#define TEXTP17 "WHAT?, OF COURSE I'M INTERESTED "
|
||||
#define TEXTP18 "THANKS GOD! I CAN PLAY A DIFFERENT SONG NOW! "
|
||||
#define TEXTP19 "I GUESS YOU CAN KEEP MY EAR-PLUGS "
|
||||
#define TEXTP2 "YES SIR. IT'S BEAUTIFUL "
|
||||
#define TEXTP3 "NO, NO. HE WON'T DO IT "
|
||||
#define TEXTP4 "ALL RIGHT THEN "
|
||||
#define TEXTP5 "REALLY? "
|
||||
#define TEXTP6 "AND? "
|
||||
#define TEXTP7 "I'M SORRY. THE PIANIST UNION TRADE DOESN'T ALLOW ME TO SAVE GIRLS FROM VAMPIRES' CLUTCHES "
|
||||
#define TEXTP8 "IF YOU HAD BEEN KIDNAPPED BY THE WEREWOLF..."
|
||||
#define TEXTP9 "I CAN ONLY PLAY THIS SONG "
|
||||
#define TEXTT1 "WHAT HAPPENS, WHAT'S THE MATTER? "
|
||||
#define TEXTT10 "THEY'RE WINNING "
|
||||
#define TEXTT11 "LEAVE ALONE, ALL RIGHT? "
|
||||
#define TEXTT12 "OF COURSE. I'M NOT BLIND "
|
||||
#define TEXTT13 "THE TRADITION IN THIS VILLAGE IS TO FORGET ALL HARD FEELINGS WHENEVER THERE IS A GAME, SO AS TO CHEER UP THE LOCAL TEAM "
|
||||
#define TEXTT14 "AND PLEASE, SHUT UP FOR GOD'S SAKE. I CAN'T HEAR ANYTHING! "
|
||||
#define TEXTT15 "COME ON, LEAVE ME ALONE AND DON'T BOTHER ME ANYMORE "
|
||||
#define TEXTT16 "IT HAS JUST STARTED! AND SHUT UP! "
|
||||
#define TEXTT17 "OK, OK, I THOUGHT SOMETHING WAS GOING ON. "
|
||||
#define TEXTT18 "IT DOESN'T MATTER, ANYWAY. SHE'LL PROBABLY BE DEAD BY NOW. "
|
||||
#define TEXTT19 "HE JUST STARTED PLAYING CLASSIC MUSIC, AND I COULDN'T STAND IT "
|
||||
#define TEXTT2 "OK. ROOM 512. UPSTAIRS. THE KEY IS ON THE DOOR "
|
||||
#define TEXTT20 "SINCE I'M PAYING HIM FOR PLAYING WHATEVER I WISH, I JUST FIRED HIM. "
|
||||
#define TEXTT21 "AND THEN, HE GOT FRESH WITH ME. JESUS!, HE LOOKED SO NICE AND INNOCENT...WHAT A HYPOCRITE! "
|
||||
#define TEXTT22 "BY THE WAY, BE CAREFUL BECAUSE I JUST WAXED THE FLOOR. "
|
||||
#define TEXTT23 "SHUT UP! WE'RE WATCHING THE GAME! "
|
||||
#define TEXTT24 "OH, COME ON! TAKE IT! "
|
||||
#define TEXTT3 "COUNT DRASCULA!!? "
|
||||
#define TEXTT4 "NO, NOTHING. THAT GUY HAS A BAD REPUTATION OVER HERE. "
|
||||
#define TEXTT5 "WELL, THERE ARE ALL KINDS OF STORIES GOING AROUND ABOUT HIM, SOME SAY HE IS A VAMPIRE WHO KIDNAPS PEOPLE TO SUCK UP THEIR BLOOD. "
|
||||
#define TEXTT6 "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."
|
||||
#define TEXTT7 "BUT OF COURSE, THOSE ARE JUST RUMORS. HE'S PROBABLY BOTH THINGS. BY THE WAY, WHY DO YOU WANT TO MEET HIM? "
|
||||
#define TEXTT8 "NO, FORGET IT. I'M REALLY BUSY... "
|
||||
#define TEXTT9 "WELL, OK. BUT JUST BECAUSE I WANT TO DO IT, NOT BECAUSE YOU TELL ME TO. "
|
||||
#define TEXTVB1 "WHO THE HELL IS CALLING AT THIS TIME ? "
|
||||
#define TEXTVB10 "YOU DON'T HAVE THEM "
|
||||
#define TEXTVB11 "I'M SURE YOU WOULDN'T BET ALL YOUR MONEY ON IT, HUH? "
|
||||
#define TEXTVB12 "WELL, ALL RIGHT, COME ON IN "
|
||||
#define TEXTVB13 "IF YOU REALLY MEAN TO FACE DRASCULA, YOU'VE GOT TO BE ABLE TO TAKE ALL TYPES OF CREAKING AND VAMPIRE-LIKE NOISES "
|
||||
#define TEXTVB14 "IS THAT CLEAR? "
|
||||
#define TEXTVB15 "OK, WAIT A MINUTE "
|
||||
#define TEXTVB16 "STAND IN THE CENTER OF THE ROOM, PLEASE "
|
||||
#define TEXTVB17 "WHERE DID I PUT THAT RECORD CALLED \"NAILS SCRATCHING THE BLACKBOARD\"?"
|
||||
#define TEXTVB18 "ALL RIGHT. LET'S GET TO IT. "
|
||||
#define TEXTVB19 "YOU ARE USELESS. YOU SEE...?, JUST LIKE THE REST!! "
|
||||
#define TEXTVB2 "OH, ..OH, NO, NO....I'M...GANIMEDES THE DWARF. PROFESSOR VON BRAUN DOESN'T LIVE HERE ANYMORE. "
|
||||
#define TEXTVB20 "JUST GIVE ME NOW THE MONEY YOU LOST AND GET OUT OF HERE "
|
||||
#define TEXTVB21 "AND DON'T COME BACK UNTIL YOU ARE ABSOLUTELY READY "
|
||||
#define TEXTVB22 "WHAT DO YOU WANT NOW? "
|
||||
#define TEXTVB23 "I HAVE TO ADMIT IT. YOU REALLY GOT WHAT IT TAKES TO FIGHT AGAINST THE VAMPIRES. "
|
||||
#define TEXTVB24 "HEY, TAKE YOUR MONEY. I ADMIT IT WHEN I MAKE A MISTAKE... "
|
||||
#define TEXTVB25 "LEAVE ME ALONE NOW, I WANT TO GET SOME SLEEP. "
|
||||
#define TEXTVB26 "WHENEVER YOU ARE READY TO FIGHT AGAINST THE VAMPIRES, JUST COME BACK AND I'LL HELP YOU OUT. "
|
||||
#define TEXTVB27 "OH, THAT'S EASY. JUST USING THE LIGHT OF ONE CRUCIFIX IS ENOUGH TO DESTROY HIM. "
|
||||
#define TEXTVB28 "YOU HAVE TO BE EXTRA CAREFUL WITH DRASCULA, HIS FRISISNOTICS POWERS HAVE MADE OF HIM THE MOST POWERFUL VAMPIRE "
|
||||
#define TEXTVB29 "YOU'D BE LOST IF IT WASN'T FOR THE... "
|
||||
#define TEXTVB3 "NO, I DON'T KNOW WHERE IT IS !! "
|
||||
#define TEXTVB30 "...BREW! "
|
||||
#define TEXTVB31 "YEAH, YOU'RE RIGHT! I MIGHT HAVE SOME PROBLEMS WITH MY BACK IN THE FUTURE IF I KEEP ON SLEEPING THIS WAY "
|
||||
#define TEXTVB32 "WELL, OK, I UNDERSTAND HE WAS A BETTER OPPONENT THAN ME, BUT YOU HAVE TO ADMIT THAT THE DISCOVERY I MADE ABOUT ANTI-VAMPIRE TECHNIQUES WAS WHAT ACTUALLY PROTECTED ME. "
|
||||
#define TEXTVB33 "I'VE FOUND THIS IMMUNIZING BREW THAT KEEPS YOU SAFE FROM ANY VAMPIRES' BITE OR AGAINST HIS FRISISNOTICS POWERS."
|
||||
#define TEXTVB34 "NO, NO, EXCUSE ME. I HAD IT ONCE BUT IT'S VERY DANGEROUS TO HAVE A BREW OF THAT TYPE. CAN YOU IMAGINE WHAT COULD HAPPEN IF A VAMPIRE GOT IT? "
|
||||
#define TEXTVB35 "HE'D BE IMMUNIZED AGAINST GARLIC, THE CRUCIFIX, THE SUNSHINE LIGHT...I JUST HAD TO GET RID OF WHAT WAS LEFT FROM IT. TO DO IT I USED THIS SCIENTIFIC METHOD OF THROWING IT IN THE LAVATORY"
|
||||
#define TEXTVB36 "DON'T WORRY, I REMEMBER EXACTLY HOW TO MAKE THAT BREW. "
|
||||
#define TEXTVB37 "I NEED GARLIC, BUT I ALREADY HAVE THEM. HOWEVER YOU'LL HAVE TO GET ME SOME WAX, BUBBLE GUM AND CIGARETTE PAPER OR PERHAPS A NAPKING OR SOMETHING ALIKE "
|
||||
#define TEXTVB38 "OH...AND OF COURSE THE MOST IMPORTANT INGREDIENT. LEAVES FROM A VERY STRANGE PLANT CALLED FERNAN. "
|
||||
#define TEXTVB39 "IT'S A CLIMBING PLANT WHICH LEAVES HAVE MAGIC POWERS IF THEY'RE CUT WITH A GOLDEN SICKLE. "
|
||||
#define TEXTVB4 "GET OUT!! "
|
||||
#define TEXTVB40 "SO THAT AS SOON AS YOU HAVE THESE FIVE THINGS, JUST COME HERE AND I'LL MAKE THE BREW. "
|
||||
#define TEXTVB41 "YOU'LL BE READY THEN TO FIGHT AGAINST DRASCULA "
|
||||
#define TEXTVB42 "REMEMBER: WAX, NICOTINE, A PIECE OF BUBBLE GUM, A PAPER AND SOME FERNAN'S LEAVES CUT WITH A GOLDEN SICKLE."
|
||||
#define TEXTVB43 "I TOLD YOU! IT WAS JUST BECAUSE OF THE BREW! "
|
||||
#define TEXTVB44 "OH, ALL RIGHT. I'M GOING TO MAKE MYSELF A...THE BREW. JUST A MOMENT, OK? "
|
||||
#define TEXTVB45 "IT'S A PROTECTING SPELL AGAINST VAMPIRES. "
|
||||
#define TEXTVB46 "I PUT IT THERE IN ORDER TO PRETEND THAT THE SKETCHER DIDN'T FORGET TO DRAW THE WINDOW YOU CAN SEE FROM OUTSIDE. "
|
||||
#define TEXTVB47 "ALL RIGHT, THE FIRST THING YOU MUST KNOW IS THE WAY TO DRASCULA'S CASTLE. "
|
||||
#define TEXTVB48 "THERE IS A CAVERN THAT GETS YOU STRAIGHT FROM THE CASTLE. IGOR, THE CRAZY ELVIS' FUN, TAKES IT TO GET TO THE VILLAGE EACH MORNING. "
|
||||
#define TEXTVB49 "BE CAREFUL THOUGH, THERE IS A VAMPIRE ALWAYS WATCHING OVER IT. YOU'LL HAVE TO GET RID OF HIM. "
|
||||
#define TEXTVB5 "IT'S TOO LATE NOW, YOU IDIOT!! IT ALWAYS IS "
|
||||
#define TEXTVB50 "THERE IS AN OLD WELL RIGHT BY THE CEMETERY CHURCH "
|
||||
#define TEXTVB51 "IT WAS USED A LONG TIME AGO FOR WITCHCRAFT TRIALS "
|
||||
#define TEXTVB52 "THEY THREW THE WITCHES IN THE WELL. IF THEY DROWNED THEY WERE REAL WITCHES. IF THEY DIDN'T, THEY WEREN'T. "
|
||||
#define TEXTVB53 "WE THREW ONE ONCE AND SHE DIDN'T DROWN, I GUESS SHE WASN'T A WITCH "
|
||||
#define TEXTVB54 "ANYWAY. THERE IS YOUR BREW. HOWEVER, I ONLY GOT TO MAKE ENOUGH JUST FOR ONE PERSON "
|
||||
#define TEXTVB55 "YOU'D BETTER SMOKE IT RIGHT BEFORE YOU FIGHT AGAINST DRASCULA "
|
||||
#define TEXTVB56 "COME ON, RUN! "
|
||||
#define TEXTVB57 "OH, JUST EXCUSES...! "
|
||||
#define TEXTVB58 "ARE YOU JOHN HACKER? I'M DOCTOR VON BRAUN "
|
||||
#define TEXTVB59 "LISTEN TO ME, THIS IS VERY IMPORTANT. IT'S ABOUT THE BREW"
|
||||
#define TEXTVB6 "I COULDN'T AGREE MORE. "
|
||||
#define TEXTVB60 "SHUT UP AND LET ME TALK. I JUST FOUND THIS BOOK ABOUT ANTI-VAMPIRE BREWS WARNING AGAINST MIXING THE JOINT WITH ANY ALCOHOLIC DRINK BEFORE YOU"
|
||||
#define TEXTVB61 "ALCOHOL REACTS WHEN MIXED WITH BREW, SO THAT IT CANCELS OUT ITS EFFECTS JUST IN A FEW SECONDS. "
|
||||
#define TEXTVB62 "I'M SORRY, BUT I HAVE TO HANG UP RIGHT NOW. THE POLICE IS LOOKING FOR ME, THEY THINK I'M A PUSHER. STUPID, ISN'T IT?. ANYWAY, BYE AND GOOD LUCK SAVING THE WORLD! "
|
||||
#define TEXTVB7 "ME, SCARED? "
|
||||
#define TEXTVB8 "LISTEN HERE, DUDE. YOU'RE RIGHT NOW TALKING TO THE ONLY PERSON WHO KNOWS THE SECRET TO FIGHT AGAINST THE VAMPIRE."
|
||||
#define TEXTVB9 "YOU NEED TO HAVE SPECIAL SKILLS TO FIGHT AGAINST A VAMPIRE. NOT EVERYBODY CAN DO IT "
|
||||
#define SYS0 "PRESS SUPR AGAIN TO restart"
|
||||
#define SYS1 "press ESC again to exit"
|
||||
#define SYS2 "VOiCES only"
|
||||
#define SYS3 "VOices and TEXT"
|
||||
|
||||
#define HIS1 "A long time ago, it seems that Drascula killed Von Braun's wife, and then, as he intended to face the count, Von Braun started to investigate all he found vampires."
|
||||
#define HIS2 "When he thought he was ready, he came up to the castle and had a very violent encounter with Drascula."
|
||||
#define HIS3 "Nobody knows exactly what happened there. Although Von Braun lost, Drascula could not kill him."
|
||||
#define HIS4 "Von Braun felt humiliated by his defect, run away from the castle and has never dared to face Drascula ever again."
|
||||
|
||||
|
||||
|
||||
|
|
@ -96,3 +96,9 @@ DEFINES += -DDISABLE_CRUISE
|
|||
else
|
||||
MODULES += engines/cruise
|
||||
endif
|
||||
|
||||
ifdef DISABLE_DRASCULA
|
||||
DEFINES += -DDISABLE_DRASCULA
|
||||
else
|
||||
MODULES += engines/drascula
|
||||
endif
|
||||
|
|
|
@ -68,29 +68,30 @@ void CDROM::readLIC(const char *fname) {
|
|||
_vm->_dataIO->getUnpackedData(tmp);
|
||||
|
||||
handle = _vm->_dataIO->openData(tmp);
|
||||
DataStream *stream = _vm->_dataIO->openAsStream(handle, true);
|
||||
|
||||
version = _vm->_dataIO->readUint16(handle);
|
||||
startChunk = _vm->_dataIO->readUint16(handle);
|
||||
_numTracks = _vm->_dataIO->readUint16(handle);
|
||||
version = stream->readUint16LE();
|
||||
startChunk = stream->readUint16LE();
|
||||
_numTracks = stream->readUint16LE();
|
||||
|
||||
if (version != 3)
|
||||
error("%s: Unknown version %d", fname, version);
|
||||
|
||||
_vm->_dataIO->seekData(handle, 50, SEEK_SET);
|
||||
stream->seek(50);
|
||||
|
||||
for (int i = 0; i < startChunk; i++) {
|
||||
pos = _vm->_dataIO->readUint16(handle);
|
||||
pos = stream->readUint16LE();
|
||||
|
||||
if (!pos)
|
||||
break;
|
||||
|
||||
_vm->_dataIO->seekData(handle, pos, SEEK_CUR);
|
||||
stream->skip(pos);
|
||||
}
|
||||
|
||||
_LICbuffer = new byte[_numTracks * 22];
|
||||
_vm->_dataIO->readData(handle, _LICbuffer, _numTracks * 22);
|
||||
stream->read(_LICbuffer, _numTracks * 22);
|
||||
|
||||
_vm->_dataIO->closeData(handle);
|
||||
delete stream;
|
||||
}
|
||||
|
||||
void CDROM::freeLICbuffer() {
|
||||
|
|
1289
engines/gob/coktelvideo.cpp
Normal file
1289
engines/gob/coktelvideo.cpp
Normal file
File diff suppressed because it is too large
Load diff
313
engines/gob/coktelvideo.h
Normal file
313
engines/gob/coktelvideo.h
Normal file
|
@ -0,0 +1,313 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GOB_COKTELVIDEO_H
|
||||
#define GOB_COKTELVIDEO_H
|
||||
|
||||
#include "common/stream.h"
|
||||
#include "sound/mixer.h"
|
||||
#include "sound/audiostream.h"
|
||||
|
||||
namespace Gob {
|
||||
|
||||
/** Common interface for handling Coktel Vision videos and derivated formats. */
|
||||
class CoktelVideo {
|
||||
public:
|
||||
enum Features {
|
||||
kFeaturesNone = 0,
|
||||
/** Has an own palette. */
|
||||
kFeaturesPalette = 8,
|
||||
/** Suggests a data size. */
|
||||
kFeaturesDataSize = 0x20,
|
||||
/** Has sound. */
|
||||
kFeaturesSound = 0x40,
|
||||
/** Has specific frame coordinates. */
|
||||
kFeaturesFrameCoords = 0x80,
|
||||
/** Has general standard coordinates. */
|
||||
kFeaturesStdCoords = 0x100,
|
||||
/** Has a frame positions table. */
|
||||
kFeaturesFramesPos = 0x200,
|
||||
/** Has video. */
|
||||
kFeaturesVideo = 0x400
|
||||
};
|
||||
|
||||
enum StateFlags {
|
||||
kStateNone = 0,
|
||||
/** Changed the palette. */
|
||||
kStatePalette = 0x10,
|
||||
/** Performed a jump to another frame. */
|
||||
kStateJump = 0x200,
|
||||
/** Updated according to the specific frame coordinates. */
|
||||
kStateFrameCoords = 0x400,
|
||||
/** Got no frame data. */
|
||||
kStateNoVideoData = 0x800,
|
||||
/** Updated according to the general standard coordinates. */
|
||||
kStateStdCoords = 0x1000,
|
||||
/** Had to explicitely seek to the frame. */
|
||||
kStateSeeked = 0x2000,
|
||||
/** Reached a break-point. */
|
||||
kStateBreak = 0x8000
|
||||
};
|
||||
|
||||
struct State {
|
||||
/** Left-most value of the updated rectangle. */
|
||||
int16 left;
|
||||
/** Top-most value of the updated rectangle. */
|
||||
int16 top;
|
||||
/** Right-most value of the updated rectangle. */
|
||||
int16 right;
|
||||
/** Bottom-most value of the updated rectangle. */
|
||||
int16 bottom;
|
||||
/** Set accordingly to what was done. */
|
||||
uint32 flags;
|
||||
|
||||
State() : left(0), top(0), right(0), bottom(0), flags(0) { }
|
||||
};
|
||||
|
||||
virtual ~CoktelVideo() { }
|
||||
|
||||
/** Returns the features the loaded video possesses. */
|
||||
virtual uint16 getFeatures() const = 0;
|
||||
/** Returns the x coordinate of the video. */
|
||||
virtual int16 getX() const = 0;
|
||||
/** Returns the y coordinate of the video. */
|
||||
virtual int16 getY() const = 0;
|
||||
/** Returns the width of the video. */
|
||||
virtual int16 getWidth() const = 0;
|
||||
/** Returns the height of the video. */
|
||||
virtual int16 getHeight() const = 0;
|
||||
/** Returns the number of frames the loaded video has. */
|
||||
virtual uint16 getFramesCount() const = 0;
|
||||
/** Returns the current frame number.
|
||||
*
|
||||
* This is the current frame after the last nextFrame()-call,
|
||||
* i.e. it's 0 after loading, 1 after the first nextFrame()-call, etc..
|
||||
*/
|
||||
virtual uint16 getCurrentFrame() const = 0;
|
||||
/** Returns the frame rate. */
|
||||
virtual int16 getFrameRate() const = 0;
|
||||
/** Returns the number of frames the video lags behind the audio. */
|
||||
virtual uint32 getSyncLag() const = 0;
|
||||
/** Returns the current frame's palette. */
|
||||
virtual const byte *getPalette() const = 0;
|
||||
|
||||
/** Load a video out of a stream. */
|
||||
virtual bool load(Common::SeekableReadStream &stream) = 0;
|
||||
/** Unload the currently loaded video. */
|
||||
virtual void unload() = 0;
|
||||
|
||||
/** Set the coordinations where to draw the video. */
|
||||
virtual void setXY(int16 x, int16 y) = 0;
|
||||
/** Use a specific memory block as video memory. */
|
||||
virtual void setVideoMemory(byte *vidMem, uint16 width, uint16 height) = 0;
|
||||
/** Use an own memory block as video memory. */
|
||||
virtual void setVideoMemory() = 0;
|
||||
|
||||
/** Play sound (if the IMD has sound). */
|
||||
virtual void enableSound(Audio::Mixer &mixer) = 0;
|
||||
/** Don't play sound or stop currently playing sound. */
|
||||
virtual void disableSound() = 0;
|
||||
|
||||
/** Seek to a specific frame.
|
||||
*
|
||||
* @param frame The frame to which to seek.
|
||||
* @param whence The offset from whence the frame is given.
|
||||
* @param restart Restart the video to reach an otherwise inaccessible frame?
|
||||
*/
|
||||
virtual void seekFrame(int32 frame, int16 whence = SEEK_SET, bool restart = false) = 0;
|
||||
|
||||
/** Render the next frame. */
|
||||
virtual State nextFrame() = 0;
|
||||
/** Wait for the frame to end. */
|
||||
virtual void waitEndFrame() = 0;
|
||||
|
||||
/** Copy the current frame.
|
||||
*
|
||||
* @param dest The memory to which to copy the current frame
|
||||
* @param x The x position to where to copy.
|
||||
* @param y The y position to where to copy.
|
||||
* @param pitch The buffer's width.
|
||||
* @param transp Which color should be seen as transparent?
|
||||
*/
|
||||
virtual void copyCurrentFrame(byte *dest, uint16 x, uint16 y, uint16 width, int16 transp = -1) = 0;
|
||||
};
|
||||
|
||||
/** Coktel Vision's IMD files.
|
||||
*/
|
||||
class Imd : public CoktelVideo {
|
||||
public:
|
||||
Imd();
|
||||
~Imd();
|
||||
|
||||
uint16 getFeatures() const { return _features; }
|
||||
int16 getX() const { return _x; }
|
||||
int16 getY() const { return _y; }
|
||||
int16 getWidth() const { return _width; }
|
||||
int16 getHeight() const { return _height; }
|
||||
uint16 getFramesCount() const { return _framesCount; }
|
||||
uint16 getCurrentFrame() const { return _curFrame; }
|
||||
int16 getFrameRate() const { if (_hasSound) return 1000 / _soundSliceLength; return 12; }
|
||||
uint32 getSyncLag() const { return _skipFrames; }
|
||||
const byte *getPalette() const { return _palette; }
|
||||
|
||||
bool load(Common::SeekableReadStream &stream);
|
||||
void unload();
|
||||
|
||||
void setXY(int16 x, int16 y);
|
||||
void setVideoMemory(byte *vidMem, uint16 width, uint16 height);
|
||||
void setVideoMemory();
|
||||
|
||||
void enableSound(Audio::Mixer &mixer);
|
||||
void disableSound();
|
||||
|
||||
void seekFrame(int32 frame, int16 whence = SEEK_SET, bool restart = false);
|
||||
|
||||
State nextFrame();
|
||||
void waitEndFrame();
|
||||
|
||||
void copyCurrentFrame(byte *dest, uint16 x, uint16 y, uint16 width, int16 transp = -1);
|
||||
|
||||
protected:
|
||||
struct Coord {
|
||||
int16 left;
|
||||
int16 top;
|
||||
int16 right;
|
||||
int16 bottom;
|
||||
} PACKED_STRUCT;
|
||||
|
||||
Common::SeekableReadStream *_stream;
|
||||
uint16 _version;
|
||||
uint16 _features;
|
||||
uint16 _flags;
|
||||
int16 _x, _y, _width, _height;
|
||||
int16 _stdX, _stdY, _stdWidth, _stdHeight;
|
||||
uint16 _framesCount, _curFrame;
|
||||
uint32 *_framesPos;
|
||||
uint32 _firstFramePos;
|
||||
Coord *_frameCoords;
|
||||
|
||||
uint32 _frameDataSize, _vidBufferSize;
|
||||
byte *_frameData, *_vidBuffer;
|
||||
|
||||
byte _palette[768];
|
||||
|
||||
bool _hasOwnVidMem;
|
||||
byte *_vidMem;
|
||||
uint16 _vidMemWidth, _vidMemHeight;
|
||||
|
||||
bool _hasSound;
|
||||
bool _soundEnabled;
|
||||
uint8 _soundStage; // (0: no sound, 1: loaded, 2: playing)
|
||||
uint32 _soundStartTime;
|
||||
uint32 _skipFrames;
|
||||
|
||||
uint16 _soundFlags;
|
||||
int16 _soundFreq;
|
||||
int16 _soundSliceSize;
|
||||
int16 _soundSlicesCount;
|
||||
uint16 _soundSliceLength;
|
||||
|
||||
Audio::AppendableAudioStream *_audioStream;
|
||||
Audio::SoundHandle _audioHandle;
|
||||
|
||||
uint32 _frameLength;
|
||||
uint32 _lastFrameTime;
|
||||
|
||||
Audio::Mixer *_mixer;
|
||||
|
||||
void unsignedToSigned(byte *buffer, int length) {
|
||||
while (length-- > 0) *buffer++ ^= 0x80;
|
||||
}
|
||||
|
||||
void deleteVidMem(bool del = true);
|
||||
void clear(bool del = true);
|
||||
|
||||
State processFrame(uint16 frame);
|
||||
uint32 renderFrame(int16 left, int16 top, int16 right, int16 bottom);
|
||||
void deLZ77(byte *dest, byte *src);
|
||||
};
|
||||
|
||||
class Vmd : public Imd {
|
||||
public:
|
||||
Vmd();
|
||||
~Vmd();
|
||||
|
||||
bool load(Common::SeekableReadStream &stream);
|
||||
void unload();
|
||||
|
||||
void setXY(int16 x, int16 y);
|
||||
|
||||
void seekFrame(int32 frame, int16 whence = SEEK_SET, bool restart = false);
|
||||
|
||||
State nextFrame();
|
||||
|
||||
protected:
|
||||
enum PartType {
|
||||
kPartTypeAudio = 1,
|
||||
kPartTypeVideo = 2
|
||||
};
|
||||
struct Part {
|
||||
PartType type;
|
||||
uint32 size;
|
||||
int16 left;
|
||||
int16 top;
|
||||
int16 right;
|
||||
int16 bottom;
|
||||
byte flags;
|
||||
} PACKED_STRUCT;
|
||||
struct Frame {
|
||||
uint32 offset;
|
||||
Part *parts;
|
||||
|
||||
Frame() : parts(0) { }
|
||||
~Frame() { delete[] parts; }
|
||||
} PACKED_STRUCT;
|
||||
|
||||
static const uint16 _tableDPCM[128];
|
||||
|
||||
bool _hasVideo;
|
||||
|
||||
uint16 _partsPerFrame;
|
||||
Frame *_frames;
|
||||
|
||||
byte _soundBytesPerSample;
|
||||
byte _soundStereo; // (0: mono, 1: old-style stereo, 2: new-style stereo)
|
||||
|
||||
void clear(bool del = true);
|
||||
|
||||
State processFrame(uint16 frame);
|
||||
uint32 renderFrame(int16 left, int16 top, int16 right, int16 bottom);
|
||||
|
||||
void emptySoundSlice(uint32 size);
|
||||
void soundSlice8bit(uint32 size);
|
||||
void soundSlice16bit(uint32 size, int16 &init);
|
||||
void filledSoundSlice(uint32 size);
|
||||
void filledSoundSlices(uint32 size, uint32 mask);
|
||||
void deDPCM(byte *soundBuf, byte *dataBuf, int16 &init, uint32 n);
|
||||
};
|
||||
|
||||
} // End of namespace Gob
|
||||
|
||||
#endif // GOB_COKTELVIDEO_H
|
|
@ -33,6 +33,92 @@
|
|||
|
||||
namespace Gob {
|
||||
|
||||
DataStream::DataStream(DataIO &io, int16 handle, uint32 dSize, bool dispose) {
|
||||
_io = &io;
|
||||
_handle = handle;
|
||||
_size = dSize;
|
||||
_dispose = dispose;
|
||||
|
||||
_data = 0;
|
||||
_stream = 0;
|
||||
}
|
||||
|
||||
DataStream::DataStream(byte *buf, uint32 dSize, bool dispose) {
|
||||
_data = buf;
|
||||
_size = dSize;
|
||||
_stream = new Common::MemoryReadStream(_data, _size);
|
||||
_dispose = dispose;
|
||||
|
||||
_io = 0;
|
||||
_handle = -1;
|
||||
}
|
||||
|
||||
DataStream::~DataStream() {
|
||||
delete _stream;
|
||||
|
||||
if (_dispose) {
|
||||
delete[] _data;
|
||||
if ((_handle >= 0) && _io)
|
||||
_io->closeData(_handle);
|
||||
}
|
||||
}
|
||||
|
||||
uint32 DataStream::pos() const {
|
||||
if (_stream)
|
||||
return _stream->pos();
|
||||
|
||||
uint32 resPos = _io->getChunkPos(_handle);
|
||||
if (resPos != 0xFFFFFFFF)
|
||||
return resPos;
|
||||
|
||||
return _io->file_getHandle(_handle)->pos();
|
||||
}
|
||||
|
||||
uint32 DataStream::size() const {
|
||||
if (_stream)
|
||||
return _stream->size();
|
||||
|
||||
return _size;
|
||||
}
|
||||
|
||||
void DataStream::seek(int32 offset, int whence) {
|
||||
if (_stream)
|
||||
_stream->seek(offset, whence);
|
||||
|
||||
int32 resPos = _io->seekChunk(_handle, offset, whence);
|
||||
if (resPos != -1)
|
||||
return;
|
||||
|
||||
_io->file_getHandle(_handle)->seek(offset, whence);
|
||||
}
|
||||
|
||||
bool DataStream::eos() const {
|
||||
if (_stream)
|
||||
return _stream->eos();
|
||||
|
||||
return pos() >= size();
|
||||
}
|
||||
|
||||
uint32 DataStream::read(void *dataPtr, uint32 dataSize) {
|
||||
if (_stream)
|
||||
return _stream->read(dataPtr, dataSize);
|
||||
|
||||
if ((_handle < 50) || (_handle >= 128))
|
||||
return _io->file_getHandle(_handle)->read((byte *) dataPtr, dataSize);
|
||||
|
||||
byte *data = (byte *) dataPtr;
|
||||
uint32 haveRead = 0;
|
||||
while (dataSize > 0x3FFF) {
|
||||
_io->readChunk(_handle, (byte *) data, 0x3FFF);
|
||||
dataSize -= 0x3FFF;
|
||||
data += 0x3FFF;
|
||||
haveRead += 0x3FFF;
|
||||
}
|
||||
_io->readChunk(_handle, (byte *) data, dataSize);
|
||||
|
||||
return haveRead + dataSize;
|
||||
}
|
||||
|
||||
DataIO::DataIO(GobEngine *vm) : _vm(vm) {
|
||||
for (int i = 0; i < MAX_DATA_FILES; i++) {
|
||||
_dataFiles[i] = 0;
|
||||
|
@ -115,6 +201,10 @@ Common::File *DataIO::file_getHandle(int16 handle) {
|
|||
return &_filesHandles[handle];
|
||||
}
|
||||
|
||||
const Common::File *DataIO::file_getHandle(int16 handle) const {
|
||||
return &_filesHandles[handle];
|
||||
}
|
||||
|
||||
int16 DataIO::file_open(const char *path, Common::File::AccessMode mode) {
|
||||
int16 i;
|
||||
|
||||
|
@ -226,7 +316,7 @@ int16 DataIO::seekChunk(int16 handle, int32 pos, int16 from) {
|
|||
return _chunkPos[file * MAX_SLOT_COUNT + slot];
|
||||
}
|
||||
|
||||
uint32 DataIO::getChunkPos(int16 handle) {
|
||||
uint32 DataIO::getChunkPos(int16 handle) const {
|
||||
int16 file;
|
||||
int16 slot;
|
||||
|
||||
|
@ -390,39 +480,23 @@ int16 DataIO::openData(const char *path, Common::File::AccessMode mode) {
|
|||
return file_open(path, mode);
|
||||
}
|
||||
|
||||
int32 DataIO::readData(int16 handle, byte *buf, uint16 size) {
|
||||
int32 res;
|
||||
DataStream *DataIO::openAsStream(int16 handle, bool dispose) {
|
||||
uint32 curPos = getPos(handle);
|
||||
seekData(handle, 0, SEEK_END);
|
||||
uint32 size = getPos(handle);
|
||||
seekData(handle, curPos, SEEK_SET);
|
||||
|
||||
res = readChunk(handle, buf, size);
|
||||
if (res >= 0)
|
||||
return res;
|
||||
|
||||
return file_getHandle(handle)->read(buf, size);
|
||||
return new DataStream(*this, handle, size, dispose);
|
||||
}
|
||||
|
||||
byte DataIO::readByte(int16 handle) {
|
||||
byte buf;
|
||||
uint32 DataIO::getPos(int16 handle) {
|
||||
uint32 resPos;
|
||||
|
||||
readData(handle, &buf, 1);
|
||||
return ((byte) buf);
|
||||
}
|
||||
resPos = getChunkPos(handle);
|
||||
if (resPos != 0xFFFFFFFF)
|
||||
return resPos;
|
||||
|
||||
uint16 DataIO::readUint16(int16 handle) {
|
||||
byte buf[2];
|
||||
|
||||
readData(handle, buf, 2);
|
||||
return READ_LE_UINT16(buf);
|
||||
}
|
||||
|
||||
uint32 DataIO::readUint32(int16 handle) {
|
||||
byte buf[4];
|
||||
|
||||
readData(handle, buf, 4);
|
||||
return READ_LE_UINT32(buf);
|
||||
}
|
||||
|
||||
int32 DataIO::writeData(int16 handle, byte *buf, uint16 size) {
|
||||
return file_getHandle(handle)->write(buf, size);
|
||||
return file_getHandle(handle)->pos();
|
||||
}
|
||||
|
||||
void DataIO::seekData(int16 handle, int32 pos, int16 from) {
|
||||
|
@ -435,14 +509,14 @@ void DataIO::seekData(int16 handle, int32 pos, int16 from) {
|
|||
file_getHandle(handle)->seek(pos, from);
|
||||
}
|
||||
|
||||
uint32 DataIO::getPos(int16 handle) {
|
||||
uint32 resPos;
|
||||
int32 DataIO::readData(int16 handle, byte *buf, uint16 size) {
|
||||
int32 res;
|
||||
|
||||
resPos = getChunkPos(handle);
|
||||
if (resPos != 0xFFFFFFFF)
|
||||
return resPos;
|
||||
res = readChunk(handle, buf, size);
|
||||
if (res >= 0)
|
||||
return res;
|
||||
|
||||
return file_getHandle(handle)->pos();
|
||||
return file_getHandle(handle)->read(buf, size);
|
||||
}
|
||||
|
||||
int32 DataIO::getDataSize(const char *name) {
|
||||
|
@ -492,4 +566,11 @@ byte *DataIO::getData(const char *path) {
|
|||
return data;
|
||||
}
|
||||
|
||||
DataStream *DataIO::getDataStream(const char *path) {
|
||||
uint32 size = getDataSize(path);
|
||||
byte *data = getData(path);
|
||||
|
||||
return new DataStream(data, size);
|
||||
}
|
||||
|
||||
} // End of namespace Gob
|
||||
|
|
|
@ -35,7 +35,33 @@ namespace Gob {
|
|||
|
||||
#define MAX_FILES 30
|
||||
#define MAX_DATA_FILES 8
|
||||
#define MAX_SLOT_COUNT 4
|
||||
#define MAX_SLOT_COUNT 8
|
||||
|
||||
class DataIO;
|
||||
|
||||
class DataStream : public Common::SeekableReadStream {
|
||||
public:
|
||||
DataStream(DataIO &io, int16 handle, uint32 dSize, bool dispose = false);
|
||||
DataStream(byte *buf, uint32 dSize, bool dispose = true);
|
||||
virtual ~DataStream();
|
||||
|
||||
virtual uint32 pos() const;
|
||||
virtual uint32 size() const;
|
||||
|
||||
virtual void seek(int32 offset, int whence = SEEK_SET);
|
||||
|
||||
virtual bool eos() const;
|
||||
|
||||
virtual uint32 read(void *dataPtr, uint32 dataSize);
|
||||
|
||||
private:
|
||||
DataIO *_io;
|
||||
int16 _handle;
|
||||
uint32 _size;
|
||||
byte *_data;
|
||||
Common::MemoryReadStream *_stream;
|
||||
bool _dispose;
|
||||
};
|
||||
|
||||
class DataIO {
|
||||
public:
|
||||
|
@ -55,15 +81,11 @@ public:
|
|||
void closeData(int16 handle);
|
||||
int16 openData(const char *path,
|
||||
Common::File::AccessMode mode = Common::File::kFileReadMode);
|
||||
int32 readData(int16 handle, byte *buf, uint16 size);
|
||||
byte readByte(int16 handle);
|
||||
uint16 readUint16(int16 handle);
|
||||
uint32 readUint32(int16 handle);
|
||||
int32 writeData(int16 handle, byte *buf, uint16 size);
|
||||
void seekData(int16 handle, int32 pos, int16 from);
|
||||
uint32 getPos(int16 handle);
|
||||
DataStream *openAsStream(int16 handle, bool dispose = false);
|
||||
|
||||
int32 getDataSize(const char *name);
|
||||
byte *getData(const char *path);
|
||||
DataStream *getDataStream(const char *path);
|
||||
|
||||
DataIO(class GobEngine *vm);
|
||||
~DataIO();
|
||||
|
@ -85,13 +107,20 @@ protected:
|
|||
int16 file_open(const char *path,
|
||||
Common::File::AccessMode mode = Common::File::kFileReadMode);
|
||||
Common::File *file_getHandle(int16 handle);
|
||||
const Common::File *file_getHandle(int16 handle) const;
|
||||
|
||||
int16 getChunk(const char *chunkName);
|
||||
char freeChunk(int16 handle);
|
||||
int32 readChunk(int16 handle, byte *buf, uint16 size);
|
||||
int16 seekChunk(int16 handle, int32 pos, int16 from);
|
||||
uint32 getChunkPos(int16 handle);
|
||||
uint32 getChunkPos(int16 handle) const;
|
||||
int32 getChunkSize(const char *chunkName);
|
||||
|
||||
uint32 getPos(int16 handle);
|
||||
void seekData(int16 handle, int32 pos, int16 from);
|
||||
int32 readData(int16 handle, byte *buf, uint16 size);
|
||||
|
||||
friend class DataStream;
|
||||
};
|
||||
|
||||
} // End of namespace Gob
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -33,6 +33,7 @@
|
|||
#include "gob/game.h"
|
||||
#include "gob/inter.h"
|
||||
#include "gob/video.h"
|
||||
#include "gob/palanim.h"
|
||||
|
||||
namespace Gob {
|
||||
|
||||
|
@ -411,4 +412,88 @@ void Draw::forceBlit(bool backwards) {
|
|||
0, 0, 0);
|
||||
}
|
||||
|
||||
const int16 Draw::_wobbleTable[360] = {
|
||||
0x0000, 0x011D, 0x023B, 0x0359, 0x0476, 0x0593, 0x06B0, 0x07CC, 0x08E8,
|
||||
0x0A03, 0x0B1D, 0x0C36, 0x0D4E, 0x0E65, 0x0F7B, 0x1090, 0x11A4, 0x12B6,
|
||||
0x13C6, 0x14D6, 0x15E3, 0x16EF, 0x17F9, 0x1901, 0x1A07, 0x1B0C, 0x1C0E,
|
||||
0x1D0E, 0x1E0B, 0x1F07, 0x2000, 0x20F6, 0x21EA, 0x22DB, 0x23C9, 0x24B5,
|
||||
0x259E, 0x2684, 0x2766, 0x2846, 0x2923, 0x29FC, 0x2AD3, 0x2BA5, 0x2C75,
|
||||
0x2D41, 0x2E09, 0x2ECE, 0x2F8F, 0x304D, 0x3106, 0x31BC, 0x326E, 0x331C,
|
||||
0x33C6, 0x346C, 0x350E, 0x35AC, 0x3646, 0x36DB, 0x376C, 0x37F9, 0x3882,
|
||||
0x3906, 0x3985, 0x3A00, 0x3A77, 0x3AE9, 0x3B56, 0x3BBF, 0x3C23, 0x3C83,
|
||||
0x3CDE, 0x3D34, 0x3D85, 0x3DD1, 0x3E19, 0x3E5C, 0x3E99, 0x3ED2, 0x3F07,
|
||||
0x3F36, 0x3F60, 0x3F85, 0x3FA6, 0x3FC1, 0x3FD8, 0x3FE9, 0x3FF6, 0x3FFD,
|
||||
0x4000, 0x3FFD, 0x3FF6, 0x3FE9, 0x3FD8, 0x3FC1, 0x3FA6, 0x3F85, 0x3F60,
|
||||
0x3F36, 0x3F07, 0x3ED2, 0x3E99, 0x3E5C, 0x3E19, 0x3DD1, 0x3D85, 0x3D34,
|
||||
0x3CDE, 0x3C83, 0x3C23, 0x3BBF, 0x3B56, 0x3AE9, 0x3A77, 0x3A00, 0x3985,
|
||||
0x3906, 0x3882, 0x37F9, 0x376C, 0x36DB, 0x3646, 0x35AC, 0x350E, 0x346C,
|
||||
0x33C6, 0x331C, 0x326E, 0x31BC, 0x3106, 0x304D, 0x2F8F, 0x2ECE, 0x2E09,
|
||||
0x2D41, 0x2C75, 0x2BA5, 0x2AD3, 0x29FC, 0x2923, 0x2846, 0x2766, 0x2684,
|
||||
0x259E, 0x24B5, 0x23C9, 0x22DB, 0x21EA, 0x20F6, 0x1FFF, 0x1F07, 0x1E0B,
|
||||
0x1D0E, 0x1C0E, 0x1B0C, 0x1A07, 0x1901, 0x17F9, 0x16EF, 0x15E3, 0x14D6,
|
||||
0x13C6, 0x12B6, 0x11A4, 0x1090, 0x0F7B, 0x0E65, 0x0D4E, 0x0C36, 0x0B1D,
|
||||
0x0A03, 0x08E8, 0x07CC, 0x06B0, 0x0593, 0x0476, 0x0359, 0x023B, 0x011D
|
||||
-0x0000, -0x011D, -0x023B, -0x0359, -0x0476, -0x0593, -0x06B0, -0x07CC, -0x08E8,
|
||||
-0x0A03, -0x0B1D, -0x0C36, -0x0D4E, -0x0E65, -0x0F7B, -0x1090, -0x11A4, -0x12B6,
|
||||
-0x13C6, -0x14D6, -0x15E3, -0x16EF, -0x17F9, -0x1901, -0x1A07, -0x1B0C, -0x1C0E,
|
||||
-0x1D0E, -0x1E0B, -0x1F07, -0x2000, -0x20F6, -0x21EA, -0x22DB, -0x23C9, -0x24B5,
|
||||
-0x259E, -0x2684, -0x2766, -0x2846, -0x2923, -0x29FC, -0x2AD3, -0x2BA5, -0x2C75,
|
||||
-0x2D41, -0x2E09, -0x2ECE, -0x2F8F, -0x304D, -0x3106, -0x31BC, -0x326E, -0x331C,
|
||||
-0x33C6, -0x346C, -0x350E, -0x35AC, -0x3646, -0x36DB, -0x376C, -0x37F9, -0x3882,
|
||||
-0x3906, -0x3985, -0x3A00, -0x3A77, -0x3AE9, -0x3B56, -0x3BBF, -0x3C23, -0x3C83,
|
||||
-0x3CDE, -0x3D34, -0x3D85, -0x3DD1, -0x3E19, -0x3E5C, -0x3E99, -0x3ED2, -0x3F07,
|
||||
-0x3F36, -0x3F60, -0x3F85, -0x3FA6, -0x3FC1, -0x3FD8, -0x3FE9, -0x3FF6, -0x3FFD,
|
||||
-0x4000, -0x3FFD, -0x3FF6, -0x3FE9, -0x3FD8, -0x3FC1, -0x3FA6, -0x3F85, -0x3F60,
|
||||
-0x3F36, -0x3F07, -0x3ED2, -0x3E99, -0x3E5C, -0x3E19, -0x3DD1, -0x3D85, -0x3D34,
|
||||
-0x3CDE, -0x3C83, -0x3C23, -0x3BBF, -0x3B56, -0x3AE9, -0x3A77, -0x3A00, -0x3985,
|
||||
-0x3906, -0x3882, -0x37F9, -0x376C, -0x36DB, -0x3646, -0x35AC, -0x350E, -0x346C,
|
||||
-0x33C6, -0x331C, -0x326E, -0x31BC, -0x3106, -0x304D, -0x2F8F, -0x2ECE, -0x2E09,
|
||||
-0x2D41, -0x2C75, -0x2BA5, -0x2AD3, -0x29FC, -0x2923, -0x2846, -0x2766, -0x2684,
|
||||
-0x259E, -0x24B5, -0x23C9, -0x22DB, -0x21EA, -0x20F6, -0x1FFF, -0x1F07, -0x1E0B,
|
||||
-0x1D0E, -0x1C0E, -0x1B0C, -0x1A07, -0x1901, -0x17F9, -0x16EF, -0x15E3, -0x14D6,
|
||||
-0x13C6, -0x12B6, -0x11A4, -0x1090, -0x0F7B, -0x0E65, -0x0D4E, -0x0C36, -0x0B1D,
|
||||
-0x0A03, -0x08E8, -0x07CC, -0x06B0, -0x0593, -0x0476, -0x0359, -0x023B, -0x011D
|
||||
};
|
||||
|
||||
void Draw::wobble(SurfaceDesc *surfDesc) {
|
||||
int16 amplitude = 32;
|
||||
uint16 curFrame = 0;
|
||||
uint16 frameWobble = 0;
|
||||
uint16 rowWobble = 0;
|
||||
int8 *offsets = new int8[_vm->_height];
|
||||
|
||||
_vm->_palAnim->fade(_vm->_global->_pPaletteDesc, 0, -1);
|
||||
|
||||
while (amplitude > 0) {
|
||||
rowWobble = frameWobble;
|
||||
frameWobble = (frameWobble + 20) % 360;
|
||||
|
||||
for (uint16 y = 0; y < _vm->_height; y++) {
|
||||
offsets[y] = amplitude +
|
||||
((_wobbleTable[rowWobble] * amplitude) / 0x4000);
|
||||
|
||||
rowWobble = (rowWobble + 20) % 360;
|
||||
}
|
||||
|
||||
if (curFrame++ & 16)
|
||||
amplitude--;
|
||||
|
||||
for (uint16 y = 0; y < _vm->_height; y++)
|
||||
_vm->_video->drawSprite(surfDesc, _frontSurface,
|
||||
0, y, _vm->_width - 1, y, offsets[y], y, 0);
|
||||
|
||||
_vm->_palAnim->fadeStep(0);
|
||||
_vm->_video->waitRetrace();
|
||||
}
|
||||
|
||||
_vm->_video->drawSprite(surfDesc, _frontSurface,
|
||||
0, 0, _vm->_width - 1, _vm->_height - 1, 0, 0, 0);
|
||||
|
||||
_applyPal = false;
|
||||
_invalidatedCount = 0;
|
||||
_noInvalidated = true;
|
||||
|
||||
delete[] offsets;
|
||||
}
|
||||
|
||||
} // End of namespace Gob
|
||||
|
|
|
@ -32,13 +32,15 @@ namespace Gob {
|
|||
|
||||
#define SPRITES_COUNT 50
|
||||
|
||||
#define RENDERFLAG_NOINVALIDATE 0x001
|
||||
#define RENDERFLAG_CAPTUREPUSH 0x002
|
||||
#define RENDERFLAG_COLLISIONS 0x004
|
||||
#define RENDERFLAG_CAPTUREPOP 0x008
|
||||
#define RENDERFLAG_USEDELTAS 0x010
|
||||
#define RENDERFLAG_NOBLITINVALIDATED 0x200
|
||||
#define RENDERFLAG_SKIPOPTIONALTEXT 0x400
|
||||
#define RENDERFLAG_NOINVALIDATE 0x0001
|
||||
#define RENDERFLAG_CAPTUREPUSH 0x0002
|
||||
#define RENDERFLAG_COLLISIONS 0x0004
|
||||
#define RENDERFLAG_CAPTUREPOP 0x0008
|
||||
#define RENDERFLAG_USEDELTAS 0x0010
|
||||
#define RENDERFLAG_NOBLITINVALIDATED 0x0200
|
||||
#define RENDERFLAG_SKIPOPTIONALTEXT 0x0400
|
||||
#define RENDERFLAG_FROMSPLIT 0x0800
|
||||
#define RENDERFLAG_DOUBLECOORDS 0x1000
|
||||
|
||||
class Draw {
|
||||
public:
|
||||
|
@ -151,6 +153,9 @@ public:
|
|||
int32 getSpriteRectSize(int16 index);
|
||||
void forceBlit(bool backwards = false);
|
||||
|
||||
static const int16 _wobbleTable[360];
|
||||
void wobble(SurfaceDesc *surfDesc);
|
||||
|
||||
virtual void initScreen() = 0;
|
||||
virtual void closeScreen() = 0;
|
||||
virtual void blitCursor() = 0;
|
||||
|
|
|
@ -197,7 +197,12 @@ void Draw_v2::printTotText(int16 id) {
|
|||
int16 rectLeft, rectTop, rectRight, rectBottom;
|
||||
int16 size;
|
||||
|
||||
if (!_vm->_game->_totTextData || !_vm->_game->_totTextData->dataPtr)
|
||||
id &= 0xFFF;
|
||||
|
||||
if (!_vm->_game->_totTextData || !_vm->_game->_totTextData->dataPtr ||
|
||||
(id >= _vm->_game->_totTextData->itemsCount) ||
|
||||
(_vm->_game->_totTextData->items[id].offset == -1) ||
|
||||
(_vm->_game->_totTextData->items[id].size == 0))
|
||||
return;
|
||||
|
||||
_vm->validateLanguage();
|
||||
|
@ -210,10 +215,34 @@ void Draw_v2::printTotText(int16 id) {
|
|||
if ((_renderFlags & RENDERFLAG_SKIPOPTIONALTEXT) && (ptr[1] & 0x80))
|
||||
return;
|
||||
|
||||
if (_renderFlags & RENDERFLAG_DOUBLECOORDS) {
|
||||
destX = (READ_LE_UINT16(ptr) & 0x7FFF) * 2;
|
||||
spriteRight = READ_LE_UINT16(ptr + 4) * 2 + 1;
|
||||
} else {
|
||||
destX = READ_LE_UINT16(ptr) & 0x7FFF;
|
||||
destY = READ_LE_UINT16(ptr + 2);
|
||||
spriteRight = READ_LE_UINT16(ptr + 4);
|
||||
}
|
||||
|
||||
if (_renderFlags & RENDERFLAG_FROMSPLIT) {
|
||||
destY = _vm->_video->_splitHeight1;
|
||||
spriteBottom = READ_LE_UINT16(ptr + 6) - READ_LE_UINT16(ptr + 2);
|
||||
if (_renderFlags & RENDERFLAG_DOUBLECOORDS)
|
||||
spriteBottom *= 3;
|
||||
spriteBottom += _vm->_video->_splitHeight1;
|
||||
if (_renderFlags & RENDERFLAG_DOUBLECOORDS) {
|
||||
spriteBottom += _backDeltaX;
|
||||
destY += _backDeltaX;
|
||||
}
|
||||
} else {
|
||||
if (_renderFlags & RENDERFLAG_DOUBLECOORDS) {
|
||||
destY = READ_LE_UINT16(ptr + 2) * 2;
|
||||
spriteBottom = READ_LE_UINT16(ptr + 6) * 2;
|
||||
} else {
|
||||
destY = READ_LE_UINT16(ptr + 2);
|
||||
spriteBottom = READ_LE_UINT16(ptr + 6);
|
||||
}
|
||||
}
|
||||
|
||||
ptr += 8;
|
||||
|
||||
if (_renderFlags & RENDERFLAG_CAPTUREPUSH) {
|
||||
|
|
|
@ -140,8 +140,18 @@ byte *Game::loadExtData(int16 itemId, int16 *pResWidth,
|
|||
size = item->size;
|
||||
isPacked = (item->width & 0x8000) != 0;
|
||||
|
||||
if (pResWidth != 0) {
|
||||
if ((pResWidth != 0) && (pResHeight != 0)) {
|
||||
*pResWidth = item->width & 0x7FFF;
|
||||
|
||||
if (*pResWidth & 0x4000)
|
||||
size += 1 << 16;
|
||||
if (*pResWidth & 0x2000)
|
||||
size += 2 << 16;
|
||||
if (*pResWidth & 0x1000)
|
||||
size += 4 << 16;
|
||||
|
||||
*pResWidth &= 0xFFF;
|
||||
|
||||
*pResHeight = item->height;
|
||||
debugC(7, kDebugFileIO, "loadExtData(%d, %d, %d)",
|
||||
itemId, *pResWidth, *pResHeight);
|
||||
|
@ -164,8 +174,10 @@ byte *Game::loadExtData(int16 itemId, int16 *pResWidth,
|
|||
} else
|
||||
handle = _extHandle;
|
||||
|
||||
DataStream *stream = _vm->_dataIO->openAsStream(handle);
|
||||
|
||||
debugC(7, kDebugFileIO, "off: %d size: %d", offset, tableSize);
|
||||
_vm->_dataIO->seekData(handle, offset + tableSize, SEEK_SET);
|
||||
stream->seek(offset + tableSize);
|
||||
realSize = size;
|
||||
if (isPacked)
|
||||
dataBuf = new byte[size + 2];
|
||||
|
@ -175,11 +187,13 @@ byte *Game::loadExtData(int16 itemId, int16 *pResWidth,
|
|||
dataPtr = dataBuf;
|
||||
while (size > 32000) {
|
||||
// BUG: huge->far conversion. Need normalization?
|
||||
_vm->_dataIO->readData(handle, dataPtr, 32000);
|
||||
stream->read(dataPtr, 32000);
|
||||
size -= 32000;
|
||||
dataPtr += 32000;
|
||||
}
|
||||
_vm->_dataIO->readData(handle, dataPtr, size);
|
||||
stream->read(dataPtr, size);
|
||||
|
||||
delete stream;
|
||||
if (commonHandle != -1) {
|
||||
_vm->_dataIO->closeData(commonHandle);
|
||||
_extHandle = _vm->_dataIO->openData(_curExtFile);
|
||||
|
@ -315,11 +329,12 @@ void Game::evaluateScroll(int16 x, int16 y) {
|
|||
}
|
||||
|
||||
int16 cursorRight = x + _vm->_draw->_cursorWidth;
|
||||
int16 screenRight = _vm->_draw->_scrollOffsetX + 320;
|
||||
int16 screenRight = _vm->_draw->_scrollOffsetX + _vm->_width;
|
||||
int16 cursorBottom = y + _vm->_draw->_cursorHeight;
|
||||
int16 screenBottom = _vm->_draw->_scrollOffsetY + 200;
|
||||
int16 screenBottom = _vm->_draw->_scrollOffsetY + _vm->_height;
|
||||
|
||||
if ((cursorRight >= 320) && (screenRight < _vm->_video->_surfWidth)) {
|
||||
if ((cursorRight >= _vm->_width) &&
|
||||
(screenRight < _vm->_video->_surfWidth)) {
|
||||
uint16 off;
|
||||
|
||||
off = MIN(_vm->_draw->_cursorWidth,
|
||||
|
@ -328,8 +343,8 @@ void Game::evaluateScroll(int16 x, int16 y) {
|
|||
|
||||
_vm->_draw->_scrollOffsetX += off;
|
||||
|
||||
_vm->_util->setMousePos(320 - _vm->_draw->_cursorWidth, y);
|
||||
} else if ((cursorBottom >= (200 - _vm->_video->_splitHeight2)) &&
|
||||
_vm->_util->setMousePos(_vm->_width - _vm->_draw->_cursorWidth, y);
|
||||
} else if ((cursorBottom >= (_vm->_height - _vm->_video->_splitHeight2)) &&
|
||||
(screenBottom < _vm->_video->_surfHeight)) {
|
||||
uint16 off;
|
||||
|
||||
|
@ -339,7 +354,7 @@ void Game::evaluateScroll(int16 x, int16 y) {
|
|||
|
||||
_vm->_draw->_scrollOffsetY += off;
|
||||
|
||||
_vm->_util->setMousePos(x, 200 - _vm->_video->_splitHeight2 -
|
||||
_vm->_util->setMousePos(x, _vm->_height - _vm->_video->_splitHeight2 -
|
||||
_vm->_draw->_cursorHeight);
|
||||
}
|
||||
|
||||
|
@ -368,10 +383,12 @@ int16 Game::checkKeys(int16 *pMouseX, int16 *pMouseY,
|
|||
_vm->_inter->_soundEndTimeKey = 0;
|
||||
}
|
||||
|
||||
if (pMouseX && pMouseY && pButtons) {
|
||||
_vm->_util->getMouseState(pMouseX, pMouseY, pButtons);
|
||||
|
||||
if (*pButtons == 3)
|
||||
*pButtons = 0;
|
||||
}
|
||||
|
||||
return _vm->_util->checkKey();
|
||||
}
|
||||
|
@ -408,23 +425,26 @@ void Game::loadExtTable(void) {
|
|||
if (_extHandle < 0)
|
||||
return;
|
||||
|
||||
count = _vm->_dataIO->readUint16(_extHandle);
|
||||
DataStream *stream = _vm->_dataIO->openAsStream(_extHandle);
|
||||
count = stream->readUint16LE();
|
||||
|
||||
_vm->_dataIO->seekData(_extHandle, 0, SEEK_SET);
|
||||
stream->seek(0);
|
||||
_extTable = new ExtTable;
|
||||
_extTable->items = 0;
|
||||
if (count)
|
||||
_extTable->items = new ExtItem[count];
|
||||
|
||||
_extTable->itemsCount = _vm->_dataIO->readUint16(_extHandle);
|
||||
_extTable->unknown = _vm->_dataIO->readByte(_extHandle);
|
||||
_extTable->itemsCount = stream->readUint16LE();
|
||||
_extTable->unknown = stream->readByte();
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
_extTable->items[i].offset = _vm->_dataIO->readUint32(_extHandle);
|
||||
_extTable->items[i].size = _vm->_dataIO->readUint16(_extHandle);
|
||||
_extTable->items[i].width = _vm->_dataIO->readUint16(_extHandle);
|
||||
_extTable->items[i].height = _vm->_dataIO->readUint16(_extHandle);
|
||||
_extTable->items[i].offset = stream->readUint32LE();
|
||||
_extTable->items[i].size = stream->readUint16LE();
|
||||
_extTable->items[i].width = stream->readUint16LE();
|
||||
_extTable->items[i].height = stream->readUint16LE();
|
||||
}
|
||||
|
||||
delete stream;
|
||||
}
|
||||
|
||||
void Game::loadImFile(void) {
|
||||
|
@ -544,7 +564,7 @@ void Game::switchTotSub(int16 index, int16 skipPlay) {
|
|||
int16 newPos = _curBackupPos - index - ((index >= 0) ? 1 : 0);
|
||||
// WORKAROUND: Some versions don't make the MOVEMENT menu item unselectable
|
||||
// in the dreamland screen, resulting in a crash when it's clicked.
|
||||
if ((_vm->_features & GF_GOB2) && (index == -1) && (skipPlay == 7) &&
|
||||
if ((_vm->getGameType() == kGameTypeGob2) && (index == -1) && (skipPlay == 7) &&
|
||||
!scumm_stricmp(_curTotFileArray[newPos], "gob06.tot"))
|
||||
return;
|
||||
|
||||
|
@ -652,7 +672,7 @@ int16 Game::openLocTextFile(char *locTextFile, int language) {
|
|||
return _vm->_dataIO->openData(locTextFile);
|
||||
}
|
||||
|
||||
byte *Game::loadLocTexts(void) {
|
||||
byte *Game::loadLocTexts(int32 *dataSize) {
|
||||
char locTextFile[20];
|
||||
int16 handle;
|
||||
int i;
|
||||
|
@ -661,10 +681,28 @@ byte *Game::loadLocTexts(void) {
|
|||
|
||||
handle = openLocTextFile(locTextFile, _vm->_global->_languageWanted);
|
||||
if (handle >= 0) {
|
||||
|
||||
_foundTotLoc = true;
|
||||
_vm->_global->_language = _vm->_global->_languageWanted;
|
||||
|
||||
} else if (!_foundTotLoc) {
|
||||
bool found = false;
|
||||
|
||||
if (_vm->_global->_languageWanted == 2) {
|
||||
handle = openLocTextFile(locTextFile, 5);
|
||||
if (handle >= 0) {
|
||||
_vm->_global->_language = 5;
|
||||
found = true;
|
||||
}
|
||||
else if (!_foundTotLoc) {
|
||||
} else if (_vm->_global->_languageWanted == 5) {
|
||||
handle = openLocTextFile(locTextFile, 2);
|
||||
if (handle >= 0) {
|
||||
_vm->_global->_language = 2;
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
handle = openLocTextFile(locTextFile, i);
|
||||
if (handle >= 0) {
|
||||
|
@ -673,11 +711,18 @@ byte *Game::loadLocTexts(void) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
debugC(1, kDebugFileIO, "Using language %d for %s",
|
||||
_vm->_global->_language, _curTotFile);
|
||||
|
||||
if (handle >= 0) {
|
||||
_vm->_dataIO->closeData(handle);
|
||||
|
||||
if (dataSize)
|
||||
*dataSize = _vm->_dataIO->getDataSize(locTextFile);
|
||||
|
||||
return _vm->_dataIO->getData(locTextFile);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -147,11 +147,14 @@ public:
|
|||
|
||||
void evaluateScroll(int16 x, int16 y);
|
||||
|
||||
int16 checkKeys(int16 *pMousex, int16 *pMouseY, int16 *pButtons, char handleMouse);
|
||||
int16 checkKeys(int16 *pMousex = 0, int16 *pMouseY = 0,
|
||||
int16 *pButtons = 0, char handleMouse = 0);
|
||||
void start(void);
|
||||
void totSub(int8 flags, const char *newTotFile);
|
||||
void switchTotSub(int16 index, int16 skipPlay);
|
||||
|
||||
void freeCollision(int16 id);
|
||||
|
||||
virtual void playTot(int16 skipPlay) = 0;
|
||||
|
||||
virtual void clearCollisions(void) = 0;
|
||||
|
@ -215,13 +218,12 @@ protected:
|
|||
|
||||
int16 adjustKey(int16 key);
|
||||
|
||||
byte *loadLocTexts(void);
|
||||
byte *loadLocTexts(int32 *dataSize = 0);
|
||||
int32 loadTotFile(const char *path);
|
||||
void loadExtTable(void);
|
||||
void loadImFile(void);
|
||||
|
||||
void setCollisions(void);
|
||||
void freeCollision(int16 id);
|
||||
void collSub(uint16 offset);
|
||||
void collAreaSub(int16 index, int8 enter);
|
||||
int16 openLocTextFile(char *locTextFile, int language);
|
||||
|
|
|
@ -911,7 +911,8 @@ void Game_v1::collisionsBlock(void) {
|
|||
_shouldPushColls = 0;
|
||||
_vm->_global->_inter_execPtr = savedIP;
|
||||
deltaTime = timeVal -
|
||||
(_vm->_util->getTimeKey() - timeKey);
|
||||
((_vm->_util->getTimeKey() - timeKey)
|
||||
- _vm->_video->_lastRetraceLength);
|
||||
|
||||
if (deltaTime < 2)
|
||||
deltaTime = 2;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
/* 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
|
||||
|
@ -34,13 +34,13 @@
|
|||
#include "gob/dataio.h"
|
||||
#include "gob/draw.h"
|
||||
#include "gob/goblin.h"
|
||||
#include "gob/imd.h"
|
||||
#include "gob/inter.h"
|
||||
#include "gob/mult.h"
|
||||
#include "gob/parse.h"
|
||||
#include "gob/scenery.h"
|
||||
#include "gob/sound.h"
|
||||
#include "gob/video.h"
|
||||
#include "gob/videoplayer.h"
|
||||
|
||||
namespace Gob {
|
||||
|
||||
|
@ -101,6 +101,7 @@ void Game_v2::playTot(int16 skipPlay) {
|
|||
_extTable = 0;
|
||||
_extHandle = -1;
|
||||
|
||||
_vm->_draw->_cursorHotspotXVar = -1;
|
||||
_totToLoad[0] = 0;
|
||||
|
||||
if ((_curTotFile[0] == 0) && (_totFileData == 0))
|
||||
|
@ -134,12 +135,16 @@ void Game_v2::playTot(int16 skipPlay) {
|
|||
totTextLoc = false;
|
||||
if (READ_LE_UINT32(filePtr) != (uint32) -1) {
|
||||
_totTextData = new TotTextTable;
|
||||
|
||||
int32 size;
|
||||
|
||||
if (READ_LE_UINT32(filePtr) == 0) {
|
||||
_totTextData->dataPtr = loadLocTexts();
|
||||
_totTextData->dataPtr = loadLocTexts(&size);
|
||||
totTextLoc = true;
|
||||
} else {
|
||||
_totTextData->dataPtr =
|
||||
(_totFileData + READ_LE_UINT32(_totFileData + 0x30));
|
||||
size = totSize;
|
||||
_vm->_global->_language = _vm->_global->_languageWanted;
|
||||
}
|
||||
|
||||
|
@ -147,7 +152,7 @@ void Game_v2::playTot(int16 skipPlay) {
|
|||
if (_totTextData->dataPtr != 0) {
|
||||
Common::MemoryReadStream totTextData(_totTextData->dataPtr,
|
||||
4294967295U);
|
||||
_totTextData->itemsCount = totTextData.readSint16LE();
|
||||
_totTextData->itemsCount = totTextData.readSint16LE() & 0x3FFF;
|
||||
|
||||
_totTextData->items = new TotTextItem[_totTextData->itemsCount];
|
||||
for (int i = 0; i < _totTextData->itemsCount; ++i) {
|
||||
|
@ -267,7 +272,7 @@ void Game_v2::playTot(int16 skipPlay) {
|
|||
_vm->_snd->freeSample(_soundSamples[i]);
|
||||
}
|
||||
|
||||
_vm->_imdPlayer->closeImd();
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
if (_totToLoad[0] == 0)
|
||||
break;
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ Global::Global(GobEngine *vm) : _vm(vm) {
|
|||
_setAllPalette = false;
|
||||
_dontSetPalette = false;
|
||||
|
||||
_primarySurfDesc = new SurfaceDesc(0x13, 320, 200);
|
||||
_primarySurfDesc = 0;
|
||||
|
||||
_debugFlag = 0;
|
||||
_inVM = 0;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include "gob/parse.h"
|
||||
#include "gob/scenery.h"
|
||||
#include "gob/music.h"
|
||||
#include "gob/imd.h"
|
||||
#include "gob/videoplayer.h"
|
||||
#include "gob/saveload.h"
|
||||
|
||||
namespace Gob {
|
||||
|
@ -68,6 +68,16 @@ const Common::Language GobEngine::_gobToScummVMLang[] = {
|
|||
};
|
||||
|
||||
GobEngine::GobEngine(OSystem *syst) : Engine(syst) {
|
||||
_vm = this;
|
||||
|
||||
_snd = 0; _adlib = 0; _mult = 0;
|
||||
_game = 0; _global = 0; _cdrom = 0;
|
||||
_dataIO = 0; _goblin = 0; _vidPlayer = 0;
|
||||
_init = 0; _inter = 0; _map = 0;
|
||||
_palAnim = 0; _parse = 0; _scenery = 0;
|
||||
_draw = 0; _util = 0; _video = 0;
|
||||
_saveLoad = 0;
|
||||
|
||||
// Setup mixer
|
||||
if (!_mixer->isReady()) {
|
||||
warning("Sound initialization failed.");
|
||||
|
@ -94,25 +104,7 @@ GobEngine::~GobEngine() {
|
|||
// Stop all mixer streams (except for the permanent ones).
|
||||
_vm->_mixer->stopAll();
|
||||
|
||||
delete _snd;
|
||||
delete _adlib;
|
||||
delete _mult;
|
||||
delete _game;
|
||||
delete _global;
|
||||
delete _cdrom;
|
||||
delete _dataIO;
|
||||
delete _goblin;
|
||||
delete _imdPlayer;
|
||||
delete _init;
|
||||
delete _inter;
|
||||
delete _map;
|
||||
delete _palAnim;
|
||||
delete _parse;
|
||||
delete _scenery;
|
||||
delete _draw;
|
||||
delete _util;
|
||||
delete _video;
|
||||
delete _saveLoad;
|
||||
deinitGameParts();
|
||||
delete[] _startTot;
|
||||
delete[] _startTot0;
|
||||
}
|
||||
|
@ -129,15 +121,23 @@ void GobEngine::shutdown() {
|
|||
|
||||
void GobEngine::validateLanguage() {
|
||||
if (_vm->_global->_languageWanted != _vm->_global->_language) {
|
||||
warning("Your game version doesn't support the requested language");
|
||||
warning("Your game version doesn't support the requested language %s",
|
||||
getLangDesc(_vm->_global->_languageWanted));
|
||||
|
||||
if (((_vm->_global->_languageWanted == 2) && (_vm->_global->_language == 5)) ||
|
||||
((_vm->_global->_languageWanted == 5) && (_vm->_global->_language == 2)))
|
||||
warning("Using %s instead", getLangDesc(_vm->_global->_language));
|
||||
else
|
||||
warning("Using the first language available: %s",
|
||||
getLangDesc(_vm->_global->_language));
|
||||
|
||||
_vm->_global->_languageWanted = _vm->_global->_language;
|
||||
}
|
||||
}
|
||||
|
||||
void GobEngine::validateVideoMode(int16 videoMode) {
|
||||
if ((videoMode != 0x13) && (videoMode != 0x14))
|
||||
if ((videoMode != 0x10) && (videoMode != 0x13) &&
|
||||
(videoMode != 0x14) && (videoMode != 0x18))
|
||||
error("Video mode 0x%X is not supported!", videoMode);
|
||||
}
|
||||
|
||||
|
@ -148,82 +148,18 @@ int GobEngine::init() {
|
|||
return -1;
|
||||
}
|
||||
|
||||
_adlib = 0;
|
||||
_saveLoad = 0;
|
||||
_global = new Global(this);
|
||||
_util = new Util(this);
|
||||
_dataIO = new DataIO(this);
|
||||
_palAnim = new PalAnim(this);
|
||||
_imdPlayer = new ImdPlayer(this);
|
||||
_cdrom = new CDROM(this);
|
||||
_snd = new Snd(this);
|
||||
if (_features & Gob::GF_GOB1) {
|
||||
_init = new Init_v1(this);
|
||||
_video = new Video_v1(this);
|
||||
_inter = new Inter_v1(this);
|
||||
_parse = new Parse_v1(this);
|
||||
_mult = new Mult_v1(this);
|
||||
_draw = new Draw_v1(this);
|
||||
_game = new Game_v1(this);
|
||||
_map = new Map_v1(this);
|
||||
_goblin = new Goblin_v1(this);
|
||||
_scenery = new Scenery_v1(this);
|
||||
} else if (_features & Gob::GF_GOB2) {
|
||||
_init = new Init_v2(this);
|
||||
_video = new Video_v2(this);
|
||||
_inter = new Inter_v2(this);
|
||||
_parse = new Parse_v2(this);
|
||||
_mult = new Mult_v2(this);
|
||||
_draw = new Draw_v2(this);
|
||||
_game = new Game_v2(this);
|
||||
_map = new Map_v2(this);
|
||||
_goblin = new Goblin_v2(this);
|
||||
_scenery = new Scenery_v2(this);
|
||||
_saveLoad = new SaveLoad_v2(this, _targetName.c_str());
|
||||
} else if (_features & Gob::GF_BARGON) {
|
||||
_init = new Init_v2(this);
|
||||
_video = new Video_v2(this);
|
||||
_inter = new Inter_Bargon(this);
|
||||
_parse = new Parse_v2(this);
|
||||
_mult = new Mult_v2(this);
|
||||
_draw = new Draw_Bargon(this);
|
||||
_game = new Game_v2(this);
|
||||
_map = new Map_v2(this);
|
||||
_goblin = new Goblin_v2(this);
|
||||
_scenery = new Scenery_v2(this);
|
||||
_saveLoad = new SaveLoad_v2(this, _targetName.c_str());
|
||||
} else if (_features & Gob::GF_GOB3) {
|
||||
_init = new Init_v3(this);
|
||||
_video = new Video_v2(this);
|
||||
_inter = new Inter_v3(this);
|
||||
_parse = new Parse_v2(this);
|
||||
_mult = new Mult_v2(this);
|
||||
_draw = new Draw_v2(this);
|
||||
_game = new Game_v2(this);
|
||||
_map = new Map_v2(this);
|
||||
_goblin = new Goblin_v3(this);
|
||||
_scenery = new Scenery_v2(this);
|
||||
_saveLoad = new SaveLoad_v3(this, _targetName.c_str());
|
||||
} else
|
||||
error("GobEngine::init(): Unknown version of game engine");
|
||||
|
||||
_noMusic = MidiDriver::parseMusicDriver(ConfMan.get("music_driver")) == MD_NULL;
|
||||
if (!_noMusic && !(_platform == Common::kPlatformAmiga) &&
|
||||
!(_platform == Common::kPlatformAtariST) &&
|
||||
(((_platform == Common::kPlatformMacintosh) && (_features & Gob::GF_GOB1)) ||
|
||||
(_features & Gob::GF_GOB2) || (_features & Gob::GF_GOB3)))
|
||||
_adlib = new Adlib(this);
|
||||
_vm = this;
|
||||
|
||||
_map->init();
|
||||
if (!initGameParts()) {
|
||||
GUIErrorMessage("GobEngine::init(): Unknown version of game engine");
|
||||
return -1;
|
||||
}
|
||||
|
||||
_system->beginGFXTransaction();
|
||||
initCommonGFX(false);
|
||||
_system->initSize(320, 200);
|
||||
_system->initSize(_width, _height);
|
||||
initCommonGFX(is640());
|
||||
_system->endGFXTransaction();
|
||||
|
||||
// On some systems it's not safe to run CD audio games from the CD.
|
||||
if (_features & GF_CD)
|
||||
if (isCD())
|
||||
checkCD();
|
||||
|
||||
int cd_num = ConfMan.getInt("cdrom");
|
||||
|
@ -293,4 +229,167 @@ int GobEngine::init() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool GobEngine::initGameParts() {
|
||||
_adlib = 0;
|
||||
_saveLoad = 0;
|
||||
|
||||
_global = new Global(this);
|
||||
_util = new Util(this);
|
||||
_dataIO = new DataIO(this);
|
||||
_palAnim = new PalAnim(this);
|
||||
_vidPlayer = new VideoPlayer(this);
|
||||
_cdrom = new CDROM(this);
|
||||
_snd = new Snd(this);
|
||||
|
||||
switch (_gameType) {
|
||||
case kGameTypeGob1:
|
||||
_init = new Init_v1(this);
|
||||
_video = new Video_v1(this);
|
||||
_inter = new Inter_v1(this);
|
||||
_parse = new Parse_v1(this);
|
||||
_mult = new Mult_v1(this);
|
||||
_draw = new Draw_v1(this);
|
||||
_game = new Game_v1(this);
|
||||
_map = new Map_v1(this);
|
||||
_goblin = new Goblin_v1(this);
|
||||
_scenery = new Scenery_v1(this);
|
||||
break;
|
||||
|
||||
case kGameTypeGob2:
|
||||
_init = new Init_v2(this);
|
||||
_video = new Video_v2(this);
|
||||
_inter = new Inter_v2(this);
|
||||
_parse = new Parse_v2(this);
|
||||
_mult = new Mult_v2(this);
|
||||
_draw = new Draw_v2(this);
|
||||
_game = new Game_v2(this);
|
||||
_map = new Map_v2(this);
|
||||
_goblin = new Goblin_v2(this);
|
||||
_scenery = new Scenery_v2(this);
|
||||
_saveLoad = new SaveLoad_v2(this, _targetName.c_str());
|
||||
break;
|
||||
|
||||
case kGameTypeBargon:
|
||||
_init = new Init_v2(this);
|
||||
_video = new Video_v2(this);
|
||||
_inter = new Inter_Bargon(this);
|
||||
_parse = new Parse_v2(this);
|
||||
_mult = new Mult_v2(this);
|
||||
_draw = new Draw_Bargon(this);
|
||||
_game = new Game_v2(this);
|
||||
_map = new Map_v2(this);
|
||||
_goblin = new Goblin_v2(this);
|
||||
_scenery = new Scenery_v2(this);
|
||||
_saveLoad = new SaveLoad_v2(this, _targetName.c_str());
|
||||
break;
|
||||
|
||||
case kGameTypeWeen:
|
||||
_init = new Init_v2(this);
|
||||
_video = new Video_v2(this);
|
||||
_inter = new Inter_v2(this);
|
||||
_parse = new Parse_v2(this);
|
||||
_mult = new Mult_v2(this);
|
||||
_draw = new Draw_v2(this);
|
||||
_game = new Game_v2(this);
|
||||
_map = new Map_v2(this);
|
||||
_goblin = new Goblin_v2(this);
|
||||
_scenery = new Scenery_v2(this);
|
||||
_saveLoad = new SaveLoad_v2(this, _targetName.c_str());
|
||||
break;
|
||||
|
||||
case kGameTypeGob3:
|
||||
_init = new Init_v3(this);
|
||||
_video = new Video_v2(this);
|
||||
_inter = new Inter_v3(this);
|
||||
_parse = new Parse_v2(this);
|
||||
_mult = new Mult_v2(this);
|
||||
_draw = new Draw_v2(this);
|
||||
_game = new Game_v2(this);
|
||||
_map = new Map_v2(this);
|
||||
_goblin = new Goblin_v3(this);
|
||||
_scenery = new Scenery_v2(this);
|
||||
_saveLoad = new SaveLoad_v3(this, _targetName.c_str());
|
||||
break;
|
||||
|
||||
case kGameTypeLostInTime:
|
||||
_init = new Init_v3(this);
|
||||
_video = new Video_v2(this);
|
||||
_inter = new Inter_v3(this);
|
||||
_parse = new Parse_v2(this);
|
||||
_mult = new Mult_v2(this);
|
||||
_draw = new Draw_v2(this);
|
||||
_game = new Game_v2(this);
|
||||
_map = new Map_v2(this);
|
||||
_goblin = new Goblin_v3(this);
|
||||
_scenery = new Scenery_v2(this);
|
||||
_saveLoad = new SaveLoad_v3(this, _targetName.c_str(), 4768, 0, 50);
|
||||
break;
|
||||
|
||||
case kGameTypeWoodruff:
|
||||
_init = new Init_v3(this);
|
||||
_video = new Video_v2(this);
|
||||
_inter = new Inter_v4(this);
|
||||
_parse = new Parse_v2(this);
|
||||
_mult = new Mult_v2(this);
|
||||
_draw = new Draw_v2(this);
|
||||
_game = new Game_v2(this);
|
||||
_map = new Map_v2(this);
|
||||
_goblin = new Goblin_v3(this);
|
||||
_scenery = new Scenery_v2(this);
|
||||
_saveLoad = new SaveLoad_v3(this, _targetName.c_str());
|
||||
break;
|
||||
|
||||
default:
|
||||
deinitGameParts();
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
_noMusic = MidiDriver::parseMusicDriver(ConfMan.get("music_driver")) == MD_NULL;
|
||||
if (!_noMusic && hasAdlib())
|
||||
_adlib = new Adlib(this);
|
||||
|
||||
_map->init();
|
||||
|
||||
if (is640()) {
|
||||
_video->_surfWidth = _width = 640;
|
||||
_video->_surfHeight = _video->_splitHeight1 = _height = 480;
|
||||
_global->_mouseMaxCol = 640;
|
||||
_global->_mouseMaxRow = 480;
|
||||
_mode = 0x18;
|
||||
_global->_primarySurfDesc = new SurfaceDesc(0x18, 640, 480);
|
||||
} else {
|
||||
_video->_surfWidth = _width = 320;
|
||||
_video->_surfHeight = _video->_splitHeight1 = _height = 200;
|
||||
_global->_mouseMaxCol = 320;
|
||||
_global->_mouseMaxRow = 200;
|
||||
_mode = 0x14;
|
||||
_global->_primarySurfDesc = new SurfaceDesc(0x14, 320, 200);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void GobEngine::deinitGameParts() {
|
||||
delete _snd; _snd = 0;
|
||||
delete _adlib; _adlib = 0;
|
||||
delete _mult; _mult = 0;
|
||||
delete _game; _game = 0;
|
||||
delete _global; _global = 0;
|
||||
delete _cdrom; _cdrom = 0;
|
||||
delete _dataIO; _dataIO = 0;
|
||||
delete _goblin; _goblin = 0;
|
||||
delete _vidPlayer; _vidPlayer = 0;
|
||||
delete _init; _init = 0;
|
||||
delete _inter; _inter = 0;
|
||||
delete _map; _map = 0;
|
||||
delete _palAnim; _palAnim = 0;
|
||||
delete _parse; _parse = 0;
|
||||
delete _scenery; _scenery = 0;
|
||||
delete _draw; _draw = 0;
|
||||
delete _util; _util = 0;
|
||||
delete _video; _video = 0;
|
||||
delete _saveLoad; _saveLoad = 0;
|
||||
}
|
||||
|
||||
} // End of namespace Gob
|
||||
|
|
|
@ -42,7 +42,7 @@ class Draw;
|
|||
class CDROM;
|
||||
class DataIO;
|
||||
class Goblin;
|
||||
class ImdPlayer;
|
||||
class VideoPlayer;
|
||||
class Init;
|
||||
class Inter;
|
||||
class Map;
|
||||
|
@ -78,14 +78,23 @@ class Adlib;
|
|||
#define VAR(var) READ_VAR_UINT32(var)
|
||||
#define VAR_ADDRESS(var) ((uint32 *) VARP((var) << 2))
|
||||
|
||||
enum {
|
||||
GF_GOB1 = 1 << 0,
|
||||
GF_GOB2 = 1 << 1,
|
||||
GF_GOB3 = 1 << 2,
|
||||
GF_WOODRUFF = 1 << 3,
|
||||
GF_BARGON = 1 << 4,
|
||||
GF_CD = 1 << 5,
|
||||
GF_EGA = 1 << 6
|
||||
enum GameType {
|
||||
kGameTypeNone = 0,
|
||||
kGameTypeGob1,
|
||||
kGameTypeGob2,
|
||||
kGameTypeGob3,
|
||||
kGameTypeWoodruff,
|
||||
kGameTypeBargon,
|
||||
kGameTypeWeen,
|
||||
kGameTypeLostInTime
|
||||
};
|
||||
|
||||
enum Features {
|
||||
kFeaturesNone = 0,
|
||||
kFeaturesCD = 1 << 0,
|
||||
kFeaturesEGA = 1 << 1,
|
||||
kFeaturesAdlib = 1 << 2,
|
||||
kFeatures640 = 1 << 3
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -165,6 +174,9 @@ protected:
|
|||
int go();
|
||||
int init();
|
||||
|
||||
bool initGameParts();
|
||||
void deinitGameParts();
|
||||
|
||||
bool detectGame();
|
||||
|
||||
public:
|
||||
|
@ -172,9 +184,15 @@ public:
|
|||
|
||||
Common::RandomSource _rnd;
|
||||
|
||||
GameType _gameType;
|
||||
int32 _features;
|
||||
Common::Language _language;
|
||||
Common::Platform _platform;
|
||||
|
||||
uint16 _width;
|
||||
uint16 _height;
|
||||
uint8 _mode;
|
||||
|
||||
char *_startTot;
|
||||
char *_startTot0;
|
||||
bool _copyProtection;
|
||||
|
@ -199,7 +217,7 @@ public:
|
|||
Inter *_inter;
|
||||
SaveLoad *_saveLoad;
|
||||
Adlib *_adlib;
|
||||
ImdPlayer *_imdPlayer;
|
||||
VideoPlayer *_vidPlayer;
|
||||
|
||||
void shutdown();
|
||||
|
||||
|
@ -211,6 +229,12 @@ public:
|
|||
void validateLanguage();
|
||||
void validateVideoMode(int16 videoMode);
|
||||
|
||||
GameType getGameType() { return _gameType; }
|
||||
bool isCD() { return (_features & kFeaturesCD) != 0; }
|
||||
bool isEGA() { return (_features & kFeaturesEGA) != 0; }
|
||||
bool is640() { return (_features & kFeatures640) != 0; }
|
||||
bool hasAdlib() { return (_features & kFeaturesAdlib) != 0; }
|
||||
|
||||
GobEngine(OSystem *syst);
|
||||
virtual ~GobEngine();
|
||||
};
|
||||
|
|
|
@ -1698,6 +1698,9 @@ void Goblin::playSounds(Mult::Mult_Object *obj) {
|
|||
int16 sndSlot;
|
||||
int16 frame;
|
||||
|
||||
if (!obj->goblinStates)
|
||||
return;
|
||||
|
||||
animData = obj->pAnimData;
|
||||
|
||||
for (int i = 1; i <= obj->goblinStates[animData->state][0].dataCount; i++) {
|
||||
|
|
|
@ -314,6 +314,9 @@ void Goblin_v2::moveAdvance(Mult::Mult_Object *obj, Gob_Object *gobDesc,
|
|||
int16 state;
|
||||
int16 layer;
|
||||
|
||||
if (!obj->goblinStates)
|
||||
return;
|
||||
|
||||
movePathFind(obj, 0, 0);
|
||||
playSounds(obj);
|
||||
|
||||
|
|
|
@ -115,6 +115,9 @@ void Goblin_v3::placeObject(Gob_Object *objDesc, char animated,
|
|||
Mult::Mult_Object &obj = _vm->_mult->_objects[index];
|
||||
Mult::Mult_AnimData &objAnim = *(obj.pAnimData);
|
||||
|
||||
if (!obj.goblinStates)
|
||||
return;
|
||||
|
||||
if ((state != -1) && (obj.goblinStates[state] != 0)) {
|
||||
if (state == 8)
|
||||
objAnim.curLookDir = 0;
|
||||
|
|
1249
engines/gob/imd.cpp
1249
engines/gob/imd.cpp
File diff suppressed because it is too large
Load diff
|
@ -1,143 +0,0 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GOB_IMD_H
|
||||
#define GOB_IMD_H
|
||||
|
||||
#include "gob/video.h"
|
||||
#include "gob/sound.h"
|
||||
|
||||
namespace Gob {
|
||||
|
||||
class ImdPlayer {
|
||||
public:
|
||||
|
||||
#include "common/pack-start.h" // START STRUCT PACKING
|
||||
|
||||
struct ImdCoord {
|
||||
int16 left;
|
||||
int16 top;
|
||||
int16 right;
|
||||
int16 bottom;
|
||||
} PACKED_STRUCT;
|
||||
|
||||
struct Imd {
|
||||
int16 handle;
|
||||
int16 verMin;
|
||||
int16 framesCount;
|
||||
int16 x;
|
||||
int16 y;
|
||||
int16 width;
|
||||
int16 height;
|
||||
int16 field_E;
|
||||
int16 curFrame;
|
||||
Video::Color *palette;
|
||||
SurfaceDesc *surfDesc;
|
||||
int32 *framesPos;
|
||||
int32 firstFramePos;
|
||||
int16 stdX;
|
||||
int16 stdY;
|
||||
int16 stdWidth;
|
||||
int16 stdHeight;
|
||||
ImdCoord *frameCoords;
|
||||
int32 frameDataSize;
|
||||
int32 vidBufferSize;
|
||||
Video::Color *extraPalette;
|
||||
} PACKED_STRUCT;
|
||||
|
||||
#include "common/pack-end.h" // END STRUCT PACKING
|
||||
|
||||
Imd *_curImd;
|
||||
byte _frontSurf;
|
||||
int8 _backSurf;
|
||||
byte *_frontMem;
|
||||
int32 _frameDelay;
|
||||
|
||||
uint8 _soundStage; // (0: no sound, 1: loaded, 2: playing)
|
||||
|
||||
ImdPlayer(GobEngine *vm);
|
||||
virtual ~ImdPlayer();
|
||||
|
||||
Imd *loadImdFile(const char *path, SurfaceDesc *surfDesc, int8 flags);
|
||||
void finishImd(Imd *&imdPtr);
|
||||
|
||||
int8 openImd(const char *path, int16 x, int16 y,
|
||||
int16 startFrame, int16 flags);
|
||||
void closeImd(void);
|
||||
|
||||
void play(int16 frame, uint16 palCmd, int16 palStart, int16 palEnd,
|
||||
int16 palFrame, int16 lastFrame);
|
||||
void play(const char *path, int16 x, int16 y, bool interruptible);
|
||||
void play(const char *path, int16 x, int16 y, int16 startFrame,
|
||||
int16 frames, bool fade, bool interruptible);
|
||||
|
||||
protected:
|
||||
char _curFile[18];
|
||||
|
||||
int16 _curX;
|
||||
int16 _curY;
|
||||
int16 _left;
|
||||
int16 _top;
|
||||
int16 _right;
|
||||
int16 _bottom;
|
||||
|
||||
byte *_frameData;
|
||||
byte *_vidBuffer;
|
||||
|
||||
bool _noSound;
|
||||
|
||||
uint32 _soundStartTime;
|
||||
uint32 _skipFrames;
|
||||
|
||||
int16 _soundFreq;
|
||||
uint16 _soundSliceSize;
|
||||
int16 _soundSlicesCount;
|
||||
uint16 _soundSliceLength;
|
||||
|
||||
Audio::AppendableAudioStream *_audioStream;
|
||||
Audio::SoundHandle _audioHandle;
|
||||
|
||||
GobEngine *_vm;
|
||||
|
||||
void copyPalette(int16 palStart, int16 palEnd);
|
||||
void flipFrontMem();
|
||||
void drawFrame(int16 frame);
|
||||
void setXY(Imd *imdPtr, int16 x, int16 y);
|
||||
|
||||
void seekFrame(Imd *imdPtr, int16 frame, int16 from, bool restart = false);
|
||||
uint16 checkFrameType(Imd *imdPtr, int16 frame);
|
||||
void drawFrame(Imd *imdPtr, int16 frame, int16 x, int16 y,
|
||||
SurfaceDesc *dest = 0);
|
||||
|
||||
uint32 view(ImdPlayer::Imd *imdPtr, int16 arg_4);
|
||||
void renderFrame(Imd *imdPtr);
|
||||
void frameUncompressor(byte *dest, byte *src);
|
||||
|
||||
void waitEndSoundSlice();
|
||||
};
|
||||
|
||||
} // End of namespace Gob
|
||||
|
||||
#endif // GOB_IMD_H
|
|
@ -37,7 +37,7 @@
|
|||
#include "gob/palanim.h"
|
||||
#include "gob/sound.h"
|
||||
#include "gob/video.h"
|
||||
#include "gob/imd.h"
|
||||
#include "gob/videoplayer.h"
|
||||
|
||||
namespace Gob {
|
||||
|
||||
|
@ -147,10 +147,12 @@ void Init::initGame(const char *totName) {
|
|||
handle = _vm->_dataIO->openData(buffer);
|
||||
|
||||
if (handle >= 0) {
|
||||
// Get variables count
|
||||
_vm->_dataIO->seekData(handle, 0x2C, SEEK_SET);
|
||||
varsCount = _vm->_dataIO->readUint16(handle);
|
||||
_vm->_dataIO->closeData(handle);
|
||||
DataStream *stream = _vm->_dataIO->openAsStream(handle, true);
|
||||
|
||||
stream->seek(0x2C);
|
||||
varsCount = stream->readUint16LE();
|
||||
|
||||
delete stream;
|
||||
|
||||
_vm->_global->_inter_variables = new byte[varsCount * 4];
|
||||
_vm->_global->_inter_variablesSizes = new byte[varsCount * 4];
|
||||
|
@ -167,14 +169,23 @@ void Init::initGame(const char *totName) {
|
|||
_vm->_dataIO->closeData(imdHandle);
|
||||
_vm->_draw->initScreen();
|
||||
_vm->_draw->_cursorIndex = -1;
|
||||
|
||||
_vm->_util->longDelay(200); // Letting everything settle
|
||||
_vm->_imdPlayer->play("coktel", -1, -1, true);
|
||||
|
||||
if (_vm->_vidPlayer->openVideo("coktel.imd")) {
|
||||
_vm->_vidPlayer->play();
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
}
|
||||
|
||||
_vm->_draw->closeScreen();
|
||||
} else if ((imdHandle = _vm->_dataIO->openData("coktel.clt")) >= 0) {
|
||||
_vm->_draw->initScreen();
|
||||
|
||||
stream = _vm->_dataIO->openAsStream(imdHandle, true);
|
||||
_vm->_util->clearPalette();
|
||||
_vm->_dataIO->readData(imdHandle, (byte *) _vm->_draw->_vgaPalette, 768);
|
||||
_vm->_dataIO->closeData(imdHandle);
|
||||
stream->read((byte *) _vm->_draw->_vgaPalette, 768);
|
||||
delete stream;
|
||||
|
||||
imdHandle = _vm->_dataIO->openData("coktel.ims");
|
||||
if (imdHandle >= 0) {
|
||||
byte *sprBuf;
|
||||
|
|
|
@ -209,7 +209,7 @@ void Inter::funcBlock(int16 retFlag) {
|
|||
// WORKAROUND:
|
||||
// The EGA version of gob1 doesn't add a delay after showing
|
||||
// images between levels. We manually add it here.
|
||||
if ((_vm->_features & GF_GOB1) && (_vm->_features & GF_EGA)) {
|
||||
if ((_vm->getGameType() == kGameTypeGob1) && _vm->isEGA()) {
|
||||
int addr = _vm->_global->_inter_execPtr-_vm->_game->_totFileData;
|
||||
if ((startaddr == 0x18B4 && addr == 0x1A7F && // Zombie
|
||||
!strncmp(_vm->_game->_curTotFile, "avt005.tot", 10)) ||
|
||||
|
|
|
@ -342,6 +342,7 @@ protected:
|
|||
virtual void checkSwitchTable(byte **ppExec);
|
||||
|
||||
void o2_playMult();
|
||||
void o2_freeMultKeys();
|
||||
void o2_setRenderFlags();
|
||||
void o2_multSub();
|
||||
void o2_initMult();
|
||||
|
@ -378,6 +379,8 @@ protected:
|
|||
bool o2_evaluateStore(OpFuncParams ¶ms);
|
||||
bool o2_printText(OpFuncParams ¶ms);
|
||||
bool o2_animPalInit(OpFuncParams ¶ms);
|
||||
bool o2_addCollision(OpFuncParams ¶ms);
|
||||
bool o2_freeCollision(OpFuncParams ¶ms);
|
||||
bool o2_goblinFunc(OpFuncParams ¶ms);
|
||||
bool o2_createSprite(OpFuncParams ¶ms);
|
||||
bool o2_stopSound(OpFuncParams ¶ms);
|
||||
|
@ -478,6 +481,45 @@ protected:
|
|||
bool o3_checkData(OpFuncParams ¶ms);
|
||||
bool o3_readData(OpFuncParams ¶ms);
|
||||
bool o3_writeData(OpFuncParams ¶ms);
|
||||
|
||||
void o3_wobble(OpGobParams ¶ms);
|
||||
};
|
||||
|
||||
class Inter_v4 : public Inter_v3 {
|
||||
public:
|
||||
Inter_v4(GobEngine *vm);
|
||||
virtual ~Inter_v4() {}
|
||||
|
||||
protected:
|
||||
typedef void (Inter_v4::*OpcodeDrawProcV4)();
|
||||
typedef bool (Inter_v4::*OpcodeFuncProcV4)(OpFuncParams &);
|
||||
typedef void (Inter_v4::*OpcodeGoblinProcV4)(OpGobParams &);
|
||||
struct OpcodeDrawEntryV4 {
|
||||
OpcodeDrawProcV4 proc;
|
||||
const char *desc;
|
||||
};
|
||||
struct OpcodeFuncEntryV4 {
|
||||
OpcodeFuncProcV4 proc;
|
||||
const char *desc;
|
||||
};
|
||||
struct OpcodeGoblinEntryV4 {
|
||||
OpcodeGoblinProcV4 proc;
|
||||
const char *desc;
|
||||
};
|
||||
const OpcodeDrawEntryV4 *_opcodesDrawV4;
|
||||
const OpcodeFuncEntryV4 *_opcodesFuncV4;
|
||||
const OpcodeGoblinEntryV4 *_opcodesGoblinV4;
|
||||
static const int _goblinFuncLookUp[][2];
|
||||
|
||||
virtual void setupOpcodes();
|
||||
virtual void executeDrawOpcode(byte i);
|
||||
virtual bool executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms);
|
||||
virtual void executeGoblinOpcode(int i, OpGobParams ¶ms);
|
||||
virtual const char *getOpcodeDrawDesc(byte i);
|
||||
virtual const char *getOpcodeFuncDesc(byte i, byte j);
|
||||
virtual const char *getOpcodeGoblinDesc(int i);
|
||||
|
||||
void o4_playVmdOrMusic();
|
||||
};
|
||||
|
||||
} // End of namespace Gob
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
#include "gob/dataio.h"
|
||||
#include "gob/draw.h"
|
||||
#include "gob/game.h"
|
||||
#include "gob/imd.h"
|
||||
#include "gob/palanim.h"
|
||||
#include "gob/sound.h"
|
||||
#include "gob/video.h"
|
||||
#include "gob/videoplayer.h"
|
||||
|
||||
namespace Gob {
|
||||
|
||||
|
@ -717,11 +717,17 @@ const char *Inter_Bargon::getOpcodeGoblinDesc(int i) {
|
|||
}
|
||||
|
||||
void Inter_Bargon::oBargon_intro0(OpGobParams ¶ms) {
|
||||
_vm->_imdPlayer->play("scaa", 0, 160, 0, 92, 0, 1);
|
||||
if (_vm->_vidPlayer->openVideo("scaa", 0, 160)) {
|
||||
_vm->_vidPlayer->play(0, 92, 27, 0, 0, 0);
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
}
|
||||
}
|
||||
|
||||
void Inter_Bargon::oBargon_intro1(OpGobParams ¶ms) {
|
||||
_vm->_imdPlayer->play("scaa", 0, 160, 0, -23, 1, 1);
|
||||
if (_vm->_vidPlayer->openVideo("scaa", 0, 160)) {
|
||||
_vm->_vidPlayer->play(0, -1, 27, 0, 0, 0, 0, 0, true, 23);
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
}
|
||||
}
|
||||
|
||||
void Inter_Bargon::oBargon_intro2(OpGobParams ¶ms) {
|
||||
|
@ -813,27 +819,45 @@ void Inter_Bargon::oBargon_intro3(OpGobParams ¶ms) {
|
|||
}
|
||||
|
||||
void Inter_Bargon::oBargon_intro4(OpGobParams ¶ms) {
|
||||
_vm->_imdPlayer->play("scba", 191, 54, 0, 0, 1, 1);
|
||||
if (_vm->_vidPlayer->openVideo("scba", 191, 54)) {
|
||||
_vm->_vidPlayer->play(0, -1, 27, 0, 0, 0, 0, 0, true);
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
}
|
||||
}
|
||||
|
||||
void Inter_Bargon::oBargon_intro5(OpGobParams ¶ms) {
|
||||
_vm->_imdPlayer->play("scbb", 191, 54, 0, 0, 0, 1);
|
||||
if (_vm->_vidPlayer->openVideo("scbb", 191, 54)) {
|
||||
_vm->_vidPlayer->play(0, -1, 27, 0, 0, 0);
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
}
|
||||
}
|
||||
|
||||
void Inter_Bargon::oBargon_intro6(OpGobParams ¶ms) {
|
||||
_vm->_imdPlayer->play("scbc", 191, 54, 0, 0, 0, 1);
|
||||
if (_vm->_vidPlayer->openVideo("scbc", 191, 54)) {
|
||||
_vm->_vidPlayer->play(0, -1, 27, 0, 0, 0);
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
}
|
||||
}
|
||||
|
||||
void Inter_Bargon::oBargon_intro7(OpGobParams ¶ms) {
|
||||
_vm->_imdPlayer->play("scbf", 191, 54, 0, 0, 0, 1);
|
||||
if (_vm->_vidPlayer->openVideo("scbf", 191, 54)) {
|
||||
_vm->_vidPlayer->play(0, -1, 27, 0, 0, 0);
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
}
|
||||
}
|
||||
|
||||
void Inter_Bargon::oBargon_intro8(OpGobParams ¶ms) {
|
||||
_vm->_imdPlayer->play("scbc", 191, 54, 0, 0, 0, 1);
|
||||
if (_vm->_vidPlayer->openVideo("scbc", 191, 54)) {
|
||||
_vm->_vidPlayer->play(0, -1, 27, 0, 0, 0);
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
}
|
||||
}
|
||||
|
||||
void Inter_Bargon::oBargon_intro9(OpGobParams ¶ms) {
|
||||
_vm->_imdPlayer->play("scbd", 191, 54, 0, 0, 0, 1);
|
||||
if (_vm->_vidPlayer->openVideo("scbd", 191, 54)) {
|
||||
_vm->_vidPlayer->play(0, -1, 27, 0, 0, 0);
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Gob
|
||||
|
|
|
@ -1136,13 +1136,13 @@ bool Inter_v1::o1_callSub(OpFuncParams ¶ms) {
|
|||
}
|
||||
|
||||
// Skipping the copy protection screen in Gobliiins
|
||||
if (!_vm->_copyProtection && (_vm->_features & GF_GOB1) && (offset == 3905)
|
||||
if (!_vm->_copyProtection && (_vm->getGameType() == kGameTypeGob1) && (offset == 3905)
|
||||
&& !scumm_stricmp(_vm->_game->_curTotFile, _vm->_startTot)) {
|
||||
debugC(2, kDebugGameFlow, "Skipping copy protection screen");
|
||||
return false;
|
||||
}
|
||||
// Skipping the copy protection screen in Gobliins 2
|
||||
if (!_vm->_copyProtection && (_vm->_features & GF_GOB2) && (offset == 1746)
|
||||
if (!_vm->_copyProtection && (_vm->getGameType() == kGameTypeGob2) && (offset == 1746)
|
||||
&& !scumm_stricmp(_vm->_game->_curTotFile, _vm->_startTot0)) {
|
||||
debugC(2, kDebugGameFlow, "Skipping copy protection screen");
|
||||
return false;
|
||||
|
@ -1174,6 +1174,10 @@ bool Inter_v1::o1_loadCursor(OpFuncParams ¶ms) {
|
|||
|
||||
id = load16();
|
||||
index = (int8) *_vm->_global->_inter_execPtr++;
|
||||
|
||||
if ((index * _vm->_draw->_cursorWidth) >= _vm->_draw->_cursorSprites->getWidth())
|
||||
return false;
|
||||
|
||||
itemPtr = &_vm->_game->_totResourceTable->items[id];
|
||||
offset = itemPtr->offset;
|
||||
|
||||
|
@ -1613,7 +1617,7 @@ bool Inter_v1::o1_palLoad(OpFuncParams ¶ms) {
|
|||
_vm->_global->_pPaletteDesc->unused1 = _vm->_draw->_unusedPalette1;
|
||||
|
||||
if (_vm->_global->_videoMode < 0x13) {
|
||||
_vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaSmallPalette;
|
||||
_vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaPalette;
|
||||
_vm->_palAnim->fade(_vm->_global->_pPaletteDesc, 0, 0);
|
||||
return false;
|
||||
}
|
||||
|
@ -1650,8 +1654,9 @@ bool Inter_v1::o1_keyFunc(OpFuncParams ¶ms) {
|
|||
// WORKAROUND for bug #1726130: Ween busy-waits in the intro for a counter
|
||||
// to become 5000. We deliberately slow down busy-waiting, so we shorten
|
||||
// the counting, too.
|
||||
if (((_vm->_global->_inter_execPtr - _vm->_game->_totFileData) == 729) &&
|
||||
(VAR(59) < 4000) && !scumm_stricmp(_vm->_game->_curTotFile, "intro5.tot"))
|
||||
if ((_vm->getGameType() == kGameTypeWeen) && (VAR(59) < 4000) &&
|
||||
((_vm->_global->_inter_execPtr - _vm->_game->_totFileData) == 729) &&
|
||||
!scumm_stricmp(_vm->_game->_curTotFile, "intro5.tot"))
|
||||
WRITE_VAR(59, 4000);
|
||||
|
||||
switch (cmd) {
|
||||
|
@ -1700,6 +1705,10 @@ bool Inter_v1::o1_capturePush(OpFuncParams ¶ms) {
|
|||
top = _vm->_parse->parseValExpr();
|
||||
width = _vm->_parse->parseValExpr();
|
||||
height = _vm->_parse->parseValExpr();
|
||||
|
||||
if ((width < 0) || (height < 0))
|
||||
return false;
|
||||
|
||||
_vm->_game->capturePush(left, top, width, height);
|
||||
(*_vm->_scenery->_pCaptureCounter)++;
|
||||
return false;
|
||||
|
@ -1887,7 +1896,9 @@ bool Inter_v1::o1_copySprite(OpFuncParams ¶ms) {
|
|||
}
|
||||
|
||||
bool Inter_v1::o1_fillRect(OpFuncParams ¶ms) {
|
||||
_vm->_draw->_destSurface = load16();
|
||||
int16 destSurf;
|
||||
|
||||
_vm->_draw->_destSurface = destSurf = load16();
|
||||
|
||||
_vm->_draw->_destSpriteX = _vm->_parse->parseValExpr();
|
||||
_vm->_draw->_destSpriteY = _vm->_parse->parseValExpr();
|
||||
|
@ -1895,6 +1906,19 @@ bool Inter_v1::o1_fillRect(OpFuncParams ¶ms) {
|
|||
_vm->_draw->_spriteBottom = _vm->_parse->parseValExpr();
|
||||
|
||||
_vm->_draw->_backColor = _vm->_parse->parseValExpr();
|
||||
|
||||
if (!_vm->_draw->_spritesArray[(destSurf > 100) ? (destSurf - 80) : destSurf])
|
||||
return false;
|
||||
|
||||
if (_vm->_draw->_spriteRight < 0) {
|
||||
_vm->_draw->_destSpriteX += _vm->_draw->_spriteRight - 1;
|
||||
_vm->_draw->_spriteRight = -_vm->_draw->_spriteRight + 2;
|
||||
}
|
||||
if (_vm->_draw->_spriteBottom < 0) {
|
||||
_vm->_draw->_destSpriteY += _vm->_draw->_spriteBottom - 1;
|
||||
_vm->_draw->_spriteBottom = -_vm->_draw->_spriteBottom + 2;
|
||||
}
|
||||
|
||||
_vm->_draw->spriteOperation(DRAW_FILLRECT);
|
||||
return false;
|
||||
}
|
||||
|
@ -2201,22 +2225,23 @@ bool Inter_v1::o1_readData(OpFuncParams ¶ms) {
|
|||
WRITE_VAR(1, 1);
|
||||
handle = _vm->_dataIO->openData(_vm->_global->_inter_resStr);
|
||||
if (handle >= 0) {
|
||||
DataStream *stream = _vm->_dataIO->openAsStream(handle, true);
|
||||
|
||||
_vm->_draw->animateCursor(4);
|
||||
if (offset < 0)
|
||||
_vm->_dataIO->seekData(handle, -offset - 1, SEEK_END);
|
||||
stream->seek(-offset - 1, SEEK_END);
|
||||
else
|
||||
_vm->_dataIO->seekData(handle, offset, SEEK_SET);
|
||||
stream->seek(offset);
|
||||
|
||||
if (((dataVar >> 2) == 59) && (size == 4))
|
||||
WRITE_VAR(59, _vm->_dataIO->readUint32(handle));
|
||||
WRITE_VAR(59, stream->readUint32LE());
|
||||
else
|
||||
retSize = _vm->_dataIO->readData(handle,
|
||||
_vm->_global->_inter_variables + dataVar, size);
|
||||
|
||||
_vm->_dataIO->closeData(handle);
|
||||
retSize = stream->read(_vm->_global->_inter_variables + dataVar, size);
|
||||
|
||||
if (retSize == size)
|
||||
WRITE_VAR(1, 0);
|
||||
|
||||
delete stream;
|
||||
}
|
||||
|
||||
if (_vm->_game->_extHandle >= 0)
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "gob/draw.h"
|
||||
#include "gob/game.h"
|
||||
#include "gob/goblin.h"
|
||||
#include "gob/imd.h"
|
||||
#include "gob/map.h"
|
||||
#include "gob/mult.h"
|
||||
#include "gob/parse.h"
|
||||
|
@ -46,6 +45,7 @@
|
|||
#include "gob/sound.h"
|
||||
#include "gob/video.h"
|
||||
#include "gob/saveload.h"
|
||||
#include "gob/videoplayer.h"
|
||||
|
||||
namespace Gob {
|
||||
|
||||
|
@ -134,7 +134,7 @@ void Inter_v2::setupOpcodes() {
|
|||
/* 00 */
|
||||
OPCODE(o1_loadMult),
|
||||
OPCODE(o2_playMult),
|
||||
OPCODE(o1_freeMultKeys),
|
||||
OPCODE(o2_freeMultKeys),
|
||||
{NULL, ""},
|
||||
/* 04 */
|
||||
{NULL, ""},
|
||||
|
@ -485,8 +485,8 @@ void Inter_v2::setupOpcodes() {
|
|||
OPCODE(o1_capturePop),
|
||||
OPCODE(o2_animPalInit),
|
||||
/* 18 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
OPCODE(o2_addCollision),
|
||||
OPCODE(o2_freeCollision),
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 1C */
|
||||
|
@ -826,6 +826,17 @@ void Inter_v2::o2_playMult() {
|
|||
_vm->_mult->playMult(VAR(57), -1, checkEscape & 0x1, 0);
|
||||
}
|
||||
|
||||
void Inter_v2::o2_freeMultKeys() {
|
||||
uint16 index = load16();
|
||||
|
||||
if (!_vm->_mult->hasMultData(index))
|
||||
return;
|
||||
|
||||
_vm->_mult->setMultData(index);
|
||||
_vm->_mult->freeMultKeys();
|
||||
_vm->_mult->zeroMultData(index);
|
||||
}
|
||||
|
||||
void Inter_v2::o2_setRenderFlags() {
|
||||
int16 expr;
|
||||
|
||||
|
@ -1364,11 +1375,37 @@ void Inter_v2::o2_initScreen() {
|
|||
width = _vm->_parse->parseValExpr();
|
||||
height = _vm->_parse->parseValExpr();
|
||||
|
||||
// Lost in Time switches to 640x400x16 when showing the title screen
|
||||
if (_vm->getGameType() == kGameTypeLostInTime) {
|
||||
if (videoMode == 0x10) {
|
||||
width = _vm->_width = 640;
|
||||
height = _vm->_height = 400;
|
||||
_vm->_global->_colorCount = 16;
|
||||
_vm->_system->beginGFXTransaction();
|
||||
_vm->_system->initSize(_vm->_width, _vm->_height);
|
||||
_vm->initCommonGFX(true);
|
||||
_vm->_system->endGFXTransaction();
|
||||
} else if (_vm->_global->_videoMode == 0x10) {
|
||||
if (width == -1)
|
||||
width = 320;
|
||||
if (height == -1)
|
||||
height = 200;
|
||||
|
||||
_vm->_width = 320;
|
||||
_vm->_height = 200;
|
||||
_vm->_global->_colorCount = 256;
|
||||
_vm->_system->beginGFXTransaction();
|
||||
_vm->_system->initSize(_vm->_width, _vm->_height);
|
||||
_vm->initCommonGFX(false);
|
||||
_vm->_system->endGFXTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
_vm->_global->_fakeVideoMode = videoMode;
|
||||
|
||||
// Some versions require this
|
||||
if (videoMode == 0xD)
|
||||
videoMode = 0x14;
|
||||
videoMode = _vm->_mode;
|
||||
|
||||
if ((videoMode == _vm->_global->_videoMode) && (width == -1))
|
||||
return;
|
||||
|
@ -1378,7 +1415,8 @@ void Inter_v2::o2_initScreen() {
|
|||
if (height > 0)
|
||||
_vm->_video->_surfHeight = height;
|
||||
|
||||
_vm->_video->_splitHeight1 = MIN(200, _vm->_video->_surfHeight - offY);
|
||||
_vm->_video->_splitHeight1 =
|
||||
MIN<int16>(_vm->_height, _vm->_video->_surfHeight - offY);
|
||||
_vm->_video->_splitHeight2 = offY;
|
||||
_vm->_video->_splitStart = _vm->_video->_surfHeight - offY;
|
||||
|
||||
|
@ -1414,13 +1452,13 @@ void Inter_v2::o2_scroll() {
|
|||
int16 curY;
|
||||
|
||||
startX = CLIP((int) _vm->_parse->parseValExpr(), 0,
|
||||
_vm->_video->_surfWidth - 320);
|
||||
_vm->_video->_surfWidth - _vm->_width);
|
||||
startY = CLIP((int) _vm->_parse->parseValExpr(), 0,
|
||||
_vm->_video->_surfHeight - 200);
|
||||
_vm->_video->_surfHeight - _vm->_height);
|
||||
endX = CLIP((int) _vm->_parse->parseValExpr(), 0,
|
||||
_vm->_video->_surfWidth - 320);
|
||||
_vm->_video->_surfWidth - _vm->_width);
|
||||
endY = CLIP((int) _vm->_parse->parseValExpr(), 0,
|
||||
_vm->_video->_surfHeight - 200);
|
||||
_vm->_video->_surfHeight - _vm->_height);
|
||||
stepX = _vm->_parse->parseValExpr();
|
||||
stepY = _vm->_parse->parseValExpr();
|
||||
|
||||
|
@ -1481,48 +1519,28 @@ void Inter_v2::o2_playImd() {
|
|||
palEnd = _vm->_parse->parseValExpr();
|
||||
palCmd = 1 << (flags & 0x3F);
|
||||
|
||||
if (!_vm->_imdPlayer->openImd(imd, x, y, startFrame, flags)) {
|
||||
if ((imd[0] != 0) && !_vm->_vidPlayer->openVideo(imd, x, y, flags)) {
|
||||
WRITE_VAR(11, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
close = (lastFrame == -1);
|
||||
if (lastFrame < 0)
|
||||
lastFrame = _vm->_imdPlayer->_curImd->framesCount - 1;
|
||||
if (startFrame == -2) {
|
||||
startFrame = lastFrame = 0;
|
||||
close = false;
|
||||
}
|
||||
|
||||
if (startFrame >= 0) {
|
||||
_vm->_game->_preventScroll = true;
|
||||
for (int i = startFrame; i <= lastFrame; i++) {
|
||||
_vm->_imdPlayer->play(i, palCmd, palStart, palEnd, 0, lastFrame);
|
||||
WRITE_VAR(11, i);
|
||||
|
||||
if (_vm->_quitRequested)
|
||||
break;
|
||||
|
||||
if (breakKey != 0) {
|
||||
_vm->_util->getMouseState(&_vm->_global->_inter_mouseX,
|
||||
&_vm->_global->_inter_mouseY, &_vm->_game->_mouseButtons);
|
||||
|
||||
storeKey(_vm->_util->checkKey());
|
||||
if (VAR(0) == (unsigned) breakKey) {
|
||||
if (_vm->_imdPlayer->_soundStage == 2)
|
||||
_vm->_snd->stopSound(0);
|
||||
_vm->_vidPlayer->play(startFrame, lastFrame, breakKey, palCmd, palStart, palEnd, 0);
|
||||
_vm->_game->_preventScroll = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
_vm->_game->_preventScroll = false;
|
||||
|
||||
if (close)
|
||||
_vm->_imdPlayer->closeImd();
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
}
|
||||
|
||||
void Inter_v2::o2_getImdInfo() {
|
||||
ImdPlayer::Imd *imd;
|
||||
int16 varX, varY;
|
||||
int16 varFrames;
|
||||
int16 varWidth, varHeight;
|
||||
|
@ -1533,21 +1551,9 @@ void Inter_v2::o2_getImdInfo() {
|
|||
varFrames = _vm->_parse->parseVarIndex();
|
||||
varWidth = _vm->_parse->parseVarIndex();
|
||||
varHeight = _vm->_parse->parseVarIndex();
|
||||
imd = _vm->_imdPlayer->loadImdFile(_vm->_global->_inter_resStr, 0, 2);
|
||||
if (!imd) {
|
||||
WRITE_VAR_OFFSET(varX, -1);
|
||||
WRITE_VAR_OFFSET(varY, -1);
|
||||
WRITE_VAR_OFFSET(varFrames, -1);
|
||||
WRITE_VAR_OFFSET(varWidth, -1);
|
||||
WRITE_VAR_OFFSET(varHeight, -1);
|
||||
} else {
|
||||
WRITE_VAR_OFFSET(varX, imd->x);
|
||||
WRITE_VAR_OFFSET(varY, imd->y);
|
||||
WRITE_VAR_OFFSET(varFrames, imd->framesCount);
|
||||
WRITE_VAR_OFFSET(varWidth, imd->width);
|
||||
WRITE_VAR_OFFSET(varHeight, imd->height);
|
||||
}
|
||||
_vm->_imdPlayer->finishImd(imd);
|
||||
|
||||
_vm->_vidPlayer->writeVideoInfo(_vm->_global->_inter_resStr, varX, varY,
|
||||
varFrames, varWidth, varHeight);
|
||||
}
|
||||
|
||||
void Inter_v2::o2_openItk() {
|
||||
|
@ -1565,21 +1571,9 @@ void Inter_v2::o2_closeItk() {
|
|||
}
|
||||
|
||||
void Inter_v2::o2_setImdFrontSurf() {
|
||||
_vm->_imdPlayer->_frontSurf = 21;
|
||||
if (_vm->_global->_videoMode == 0x14) {
|
||||
_vm->_imdPlayer->_frontMem = _vm->_draw->_frontSurface->getVidMem();
|
||||
_vm->_draw->blitInvalidated();
|
||||
_vm->_imdPlayer->_frontSurf = 20;
|
||||
}
|
||||
}
|
||||
|
||||
void Inter_v2::o2_resetImdFrontSurf() {
|
||||
_vm->_imdPlayer->_frontSurf = 21;
|
||||
if (_vm->_imdPlayer->_frontMem) {
|
||||
_vm->_imdPlayer->_frontMem = _vm->_draw->_frontSurface->getVidMem();
|
||||
_vm->_draw->forceBlit();
|
||||
} else
|
||||
_vm->_draw->forceBlit(true);
|
||||
}
|
||||
|
||||
bool Inter_v2::o2_evaluateStore(OpFuncParams ¶ms) {
|
||||
|
@ -1721,6 +1715,71 @@ bool Inter_v2::o2_animPalInit(OpFuncParams ¶ms) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool Inter_v2::o2_addCollision(OpFuncParams ¶ms) {
|
||||
int16 id;
|
||||
int16 left, top, width, height;
|
||||
int16 flags;
|
||||
int16 key;
|
||||
int16 funcSub;
|
||||
|
||||
id = _vm->_parse->parseValExpr();
|
||||
funcSub = _vm->_global->_inter_execPtr - _vm->_game->_totFileData;
|
||||
left = _vm->_parse->parseValExpr();
|
||||
top = _vm->_parse->parseValExpr();
|
||||
width = _vm->_parse->parseValExpr();
|
||||
height = _vm->_parse->parseValExpr();
|
||||
flags = _vm->_parse->parseValExpr();
|
||||
key = load16();
|
||||
|
||||
if (key == 0)
|
||||
key = ABS(id) + 41960;
|
||||
|
||||
_vm->_draw->adjustCoords(0, &left, &top);
|
||||
_vm->_draw->adjustCoords(2, &width, &height);
|
||||
|
||||
if (left < 0) {
|
||||
width += left;
|
||||
left = 0;
|
||||
}
|
||||
|
||||
if (top < 0) {
|
||||
height += top;
|
||||
top = 0;
|
||||
}
|
||||
|
||||
int16 index;
|
||||
if (id < 0)
|
||||
index = _vm->_game->addNewCollision(0xD000 - id, left & 0xFFFC, top & 0xFFFC,
|
||||
left + width + 3, top + height + 3, flags, key, 0, 0);
|
||||
else
|
||||
index = _vm->_game->addNewCollision(0xE000 + id, left, top,
|
||||
left + width - 1, top + height - 1, flags, key, 0, 0);
|
||||
|
||||
_vm->_game->_collisionAreas[index].funcSub = funcSub;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Inter_v2::o2_freeCollision(OpFuncParams ¶ms) {
|
||||
int16 id;
|
||||
|
||||
id = _vm->_parse->parseValExpr();
|
||||
if (id == -2) {
|
||||
for (int i = 0; i < 150; i++) {
|
||||
if ((_vm->_game->_collisionAreas[i].id & 0xF000) == 0xD000)
|
||||
_vm->_game->_collisionAreas[i].left = 0xFFFF;
|
||||
}
|
||||
} else if (id == -1) {
|
||||
for (int i = 0; i < 150; i++) {
|
||||
if ((_vm->_game->_collisionAreas[i].id & 0xF000) == 0xE000)
|
||||
_vm->_game->_collisionAreas[i].left = 0xFFFF;
|
||||
}
|
||||
} else
|
||||
_vm->_game->freeCollision(0xE000 + id);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Inter_v2::o2_goblinFunc(OpFuncParams ¶ms) {
|
||||
OpGobParams gobParams;
|
||||
int16 cmd;
|
||||
|
@ -1870,25 +1929,27 @@ bool Inter_v2::o2_readData(OpFuncParams ¶ms) {
|
|||
if (handle < 0)
|
||||
return false;
|
||||
|
||||
DataStream *stream = _vm->_dataIO->openAsStream(handle, true);
|
||||
|
||||
_vm->_draw->animateCursor(4);
|
||||
if (offset < 0)
|
||||
_vm->_dataIO->seekData(handle, -offset - 1, SEEK_END);
|
||||
stream->seek(-offset - 1, SEEK_END);
|
||||
else
|
||||
_vm->_dataIO->seekData(handle, offset, SEEK_SET);
|
||||
stream->seek(offset);
|
||||
|
||||
if (((dataVar >> 2) == 59) && (size == 4)) {
|
||||
WRITE_VAR(59, _vm->_dataIO->readUint32(handle));
|
||||
WRITE_VAR(59, stream->readUint32LE());
|
||||
// The scripts in some versions divide through 256^3 then,
|
||||
// effectively doing a LE->BE conversion
|
||||
if ((_vm->_platform != Common::kPlatformPC) && (VAR(59) < 256))
|
||||
WRITE_VAR(59, SWAP_BYTES_32(VAR(59)));
|
||||
} else
|
||||
retSize = _vm->_dataIO->readData(handle, buf, size);
|
||||
retSize = stream->read(buf, size);
|
||||
|
||||
if (retSize == size)
|
||||
WRITE_VAR(1, 0);
|
||||
|
||||
_vm->_dataIO->closeData(handle);
|
||||
delete stream;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ void Inter_v3::setupOpcodes() {
|
|||
/* 00 */
|
||||
OPCODE(o1_loadMult),
|
||||
OPCODE(o2_playMult),
|
||||
OPCODE(o1_freeMultKeys),
|
||||
OPCODE(o2_freeMultKeys),
|
||||
{NULL, ""},
|
||||
/* 04 */
|
||||
{NULL, ""},
|
||||
|
@ -473,8 +473,8 @@ void Inter_v3::setupOpcodes() {
|
|||
OPCODE(o1_capturePop),
|
||||
OPCODE(o2_animPalInit),
|
||||
/* 18 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
OPCODE(o2_addCollision),
|
||||
OPCODE(o2_freeCollision),
|
||||
OPCODE(o3_getTotTextItemPart),
|
||||
{NULL, ""},
|
||||
/* 1C */
|
||||
|
@ -594,7 +594,7 @@ void Inter_v3::setupOpcodes() {
|
|||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
OPCODE(o2_handleGoblins),
|
||||
OPCODE(o3_wobble),
|
||||
/* 28 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
|
@ -894,4 +894,8 @@ bool Inter_v3::o3_copySprite(OpFuncParams ¶ms) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void Inter_v3::o3_wobble(OpGobParams ¶ms) {
|
||||
_vm->_draw->wobble(_vm->_draw->_backSurface);
|
||||
}
|
||||
|
||||
} // End of namespace Gob
|
||||
|
|
786
engines/gob/inter_v4.cpp
Normal file
786
engines/gob/inter_v4.cpp
Normal file
|
@ -0,0 +1,786 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/stdafx.h"
|
||||
#include "common/endian.h"
|
||||
#include "common/file.h"
|
||||
|
||||
#include "gob/gob.h"
|
||||
#include "gob/inter.h"
|
||||
#include "gob/global.h"
|
||||
#include "gob/game.h"
|
||||
#include "gob/parse.h"
|
||||
#include "gob/videoplayer.h"
|
||||
|
||||
namespace Gob {
|
||||
|
||||
#define OPCODE(x) _OPCODE(Inter_v4, x)
|
||||
|
||||
const int Inter_v4::_goblinFuncLookUp[][2] = {
|
||||
{0, 0},
|
||||
{1, 1},
|
||||
{2, 2},
|
||||
{4, 3},
|
||||
{5, 4},
|
||||
{6, 5},
|
||||
{7, 6},
|
||||
{8, 7},
|
||||
{9, 8},
|
||||
{10, 9},
|
||||
{12, 10},
|
||||
{13, 11},
|
||||
{14, 12},
|
||||
{15, 13},
|
||||
{16, 14},
|
||||
{21, 15},
|
||||
{22, 16},
|
||||
{23, 17},
|
||||
{24, 18},
|
||||
{25, 19},
|
||||
{26, 20},
|
||||
{27, 21},
|
||||
{28, 22},
|
||||
{29, 23},
|
||||
{30, 24},
|
||||
{32, 25},
|
||||
{33, 26},
|
||||
{34, 27},
|
||||
{35, 28},
|
||||
{36, 29},
|
||||
{37, 30},
|
||||
{40, 31},
|
||||
{41, 32},
|
||||
{42, 33},
|
||||
{43, 34},
|
||||
{44, 35},
|
||||
{50, 36},
|
||||
{52, 37},
|
||||
{53, 38},
|
||||
{100, 39},
|
||||
{152, 40},
|
||||
{200, 41},
|
||||
{201, 42},
|
||||
{202, 43},
|
||||
{203, 44},
|
||||
{204, 45},
|
||||
{250, 46},
|
||||
{251, 47},
|
||||
{252, 48},
|
||||
{500, 49},
|
||||
{502, 50},
|
||||
{503, 51},
|
||||
{600, 52},
|
||||
{601, 53},
|
||||
{602, 54},
|
||||
{603, 55},
|
||||
{604, 56},
|
||||
{605, 57},
|
||||
{1000, 58},
|
||||
{1001, 59},
|
||||
{1002, 60},
|
||||
{1003, 61},
|
||||
{1004, 62},
|
||||
{1005, 63},
|
||||
{1006, 64},
|
||||
{1008, 65},
|
||||
{1009, 66},
|
||||
{1010, 67},
|
||||
{1011, 68},
|
||||
{1015, 69},
|
||||
{2005, 70}
|
||||
};
|
||||
|
||||
Inter_v4::Inter_v4(GobEngine *vm) : Inter_v3(vm) {
|
||||
setupOpcodes();
|
||||
}
|
||||
|
||||
void Inter_v4::setupOpcodes() {
|
||||
static const OpcodeDrawEntryV4 opcodesDraw[256] = {
|
||||
/* 00 */
|
||||
OPCODE(o1_loadMult),
|
||||
OPCODE(o2_playMult),
|
||||
OPCODE(o2_freeMultKeys),
|
||||
{NULL, ""},
|
||||
/* 04 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
OPCODE(o1_initCursor),
|
||||
/* 08 */
|
||||
OPCODE(o1_initCursorAnim),
|
||||
OPCODE(o1_clearCursorAnim),
|
||||
OPCODE(o2_setRenderFlags),
|
||||
{NULL, ""},
|
||||
/* 0C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 10 */
|
||||
OPCODE(o1_loadAnim),
|
||||
OPCODE(o1_freeAnim),
|
||||
OPCODE(o1_updateAnim),
|
||||
OPCODE(o2_multSub),
|
||||
/* 14 */
|
||||
OPCODE(o2_initMult),
|
||||
OPCODE(o1_freeMult),
|
||||
OPCODE(o1_animate),
|
||||
OPCODE(o2_loadMultObject),
|
||||
/* 18 */
|
||||
OPCODE(o1_getAnimLayerInfo),
|
||||
OPCODE(o1_getObjAnimSize),
|
||||
OPCODE(o1_loadStatic),
|
||||
OPCODE(o1_freeStatic),
|
||||
/* 1C */
|
||||
OPCODE(o2_renderStatic),
|
||||
OPCODE(o2_loadCurLayer),
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 20 */
|
||||
OPCODE(o2_playCDTrack),
|
||||
OPCODE(o2_waitCDTrackEnd),
|
||||
OPCODE(o2_stopCD),
|
||||
OPCODE(o2_readLIC),
|
||||
/* 24 */
|
||||
OPCODE(o2_freeLIC),
|
||||
OPCODE(o2_getCDTrackPos),
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 28 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 2C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 30 */
|
||||
OPCODE(o2_loadFontToSprite),
|
||||
OPCODE(o1_freeFontToSprite),
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 34 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 38 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 3C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 40 */
|
||||
OPCODE(o2_totSub),
|
||||
OPCODE(o2_switchTotSub),
|
||||
OPCODE(o2_copyVars),
|
||||
OPCODE(o2_pasteVars),
|
||||
/* 44 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 48 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 4C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 50 */
|
||||
OPCODE(o2_loadMapObjects),
|
||||
OPCODE(o2_freeGoblins),
|
||||
OPCODE(o2_moveGoblin),
|
||||
OPCODE(o2_writeGoblinPos),
|
||||
/* 54 */
|
||||
OPCODE(o2_stopGoblin),
|
||||
OPCODE(o2_setGoblinState),
|
||||
OPCODE(o2_placeGoblin),
|
||||
{NULL, ""},
|
||||
/* 58 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 5C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 60 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 64 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 68 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 6C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 70 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 74 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 78 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 7C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 80 */
|
||||
OPCODE(o2_initScreen),
|
||||
OPCODE(o2_scroll),
|
||||
OPCODE(o2_setScrollOffset),
|
||||
OPCODE(o4_playVmdOrMusic),
|
||||
/* 84 */
|
||||
OPCODE(o2_getImdInfo),
|
||||
OPCODE(o2_openItk),
|
||||
OPCODE(o2_closeItk),
|
||||
OPCODE(o2_setImdFrontSurf),
|
||||
/* 88 */
|
||||
OPCODE(o2_resetImdFrontSurf),
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 8C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 90 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 94 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 98 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 9C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* A0 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* A4 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* A8 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* AC */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* B0 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* B4 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* B8 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* BC */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* C0 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* C4 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* C8 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* CC */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* D0 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* D4 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* D8 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* DC */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* E0 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* E4 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* E8 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* EC */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* F0 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* F4 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* F8 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* FC */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""}
|
||||
};
|
||||
|
||||
static const OpcodeFuncEntryV4 opcodesFunc[80] = {
|
||||
/* 00 */
|
||||
OPCODE(o1_callSub),
|
||||
OPCODE(o1_callSub),
|
||||
OPCODE(o1_printTotText),
|
||||
OPCODE(o1_loadCursor),
|
||||
/* 04 */
|
||||
{NULL, ""},
|
||||
OPCODE(o1_switch),
|
||||
OPCODE(o1_repeatUntil),
|
||||
OPCODE(o1_whileDo),
|
||||
/* 08 */
|
||||
OPCODE(o1_if),
|
||||
OPCODE(o2_evaluateStore),
|
||||
OPCODE(o1_loadSpriteToPos),
|
||||
{NULL, ""},
|
||||
/* 0C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 10 */
|
||||
{NULL, ""},
|
||||
OPCODE(o2_printText),
|
||||
OPCODE(o1_loadTot),
|
||||
OPCODE(o1_palLoad),
|
||||
/* 14 */
|
||||
OPCODE(o1_keyFunc),
|
||||
OPCODE(o1_capturePush),
|
||||
OPCODE(o1_capturePop),
|
||||
OPCODE(o2_animPalInit),
|
||||
/* 18 */
|
||||
OPCODE(o2_addCollision),
|
||||
OPCODE(o2_freeCollision),
|
||||
OPCODE(o3_getTotTextItemPart),
|
||||
{NULL, ""},
|
||||
/* 1C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
OPCODE(o1_drawOperations),
|
||||
OPCODE(o1_setcmdCount),
|
||||
/* 20 */
|
||||
OPCODE(o1_return),
|
||||
OPCODE(o1_renewTimeInVars),
|
||||
OPCODE(o1_speakerOn),
|
||||
OPCODE(o1_speakerOff),
|
||||
/* 24 */
|
||||
OPCODE(o1_putPixel),
|
||||
OPCODE(o2_goblinFunc),
|
||||
OPCODE(o2_createSprite),
|
||||
OPCODE(o1_freeSprite),
|
||||
/* 28 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 2C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 30 */
|
||||
OPCODE(o1_returnTo),
|
||||
OPCODE(o1_loadSpriteContent),
|
||||
OPCODE(o3_copySprite),
|
||||
OPCODE(o1_fillRect),
|
||||
/* 34 */
|
||||
OPCODE(o1_drawLine),
|
||||
OPCODE(o1_strToLong),
|
||||
OPCODE(o1_invalidate),
|
||||
OPCODE(o1_setBackDelta),
|
||||
/* 38 */
|
||||
OPCODE(o1_playSound),
|
||||
OPCODE(o2_stopSound),
|
||||
OPCODE(o2_loadSound),
|
||||
OPCODE(o1_freeSoundSlot),
|
||||
/* 3C */
|
||||
OPCODE(o1_waitEndPlay),
|
||||
OPCODE(o1_playComposition),
|
||||
OPCODE(o2_getFreeMem),
|
||||
OPCODE(o2_checkData),
|
||||
/* 40 */
|
||||
{NULL, ""},
|
||||
OPCODE(o1_prepareStr),
|
||||
OPCODE(o1_insertStr),
|
||||
OPCODE(o1_cutStr),
|
||||
/* 44 */
|
||||
OPCODE(o1_strstr),
|
||||
OPCODE(o1_istrlen),
|
||||
OPCODE(o1_setMousePos),
|
||||
OPCODE(o1_setFrameRate),
|
||||
/* 48 */
|
||||
OPCODE(o1_animatePalette),
|
||||
OPCODE(o1_animateCursor),
|
||||
OPCODE(o1_blitCursor),
|
||||
OPCODE(o1_loadFont),
|
||||
/* 4C */
|
||||
OPCODE(o1_freeFont),
|
||||
OPCODE(o2_readData),
|
||||
OPCODE(o2_writeData),
|
||||
OPCODE(o1_manageDataFile),
|
||||
};
|
||||
|
||||
static const OpcodeGoblinEntryV4 opcodesGoblin[71] = {
|
||||
/* 00 */
|
||||
OPCODE(o2_loadInfogramesIns),
|
||||
OPCODE(o2_startInfogrames),
|
||||
OPCODE(o2_stopInfogrames),
|
||||
{NULL, ""},
|
||||
/* 04 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 08 */
|
||||
{NULL, ""},
|
||||
OPCODE(o2_playInfogrames),
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 0C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 10 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 14 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 18 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 1C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 20 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 24 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
OPCODE(o2_handleGoblins),
|
||||
/* 28 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 2C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 30 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 34 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 38 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 3C */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 40 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
/* 44 */
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
};
|
||||
|
||||
_opcodesDrawV4 = opcodesDraw;
|
||||
_opcodesFuncV4 = opcodesFunc;
|
||||
_opcodesGoblinV4 = opcodesGoblin;
|
||||
}
|
||||
|
||||
void Inter_v4::executeDrawOpcode(byte i) {
|
||||
debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%X] (%s)",
|
||||
i, i, getOpcodeDrawDesc(i));
|
||||
|
||||
OpcodeDrawProcV4 op = _opcodesDrawV4[i].proc;
|
||||
|
||||
if (op == NULL)
|
||||
warning("unimplemented opcodeDraw: %d", i);
|
||||
else
|
||||
(this->*op) ();
|
||||
}
|
||||
|
||||
bool Inter_v4::executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms) {
|
||||
debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s)",
|
||||
i, j, i, j, getOpcodeFuncDesc(i, j));
|
||||
|
||||
if ((i > 4) || (j > 15)) {
|
||||
warning("unimplemented opcodeFunc: %d.%d", i, j);
|
||||
return false;
|
||||
}
|
||||
|
||||
OpcodeFuncProcV4 op = _opcodesFuncV4[i*16 + j].proc;
|
||||
|
||||
if (op == NULL)
|
||||
warning("unimplemented opcodeFunc: %d.%d", i, j);
|
||||
else
|
||||
return (this->*op) (params);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Inter_v4::executeGoblinOpcode(int i, OpGobParams ¶ms) {
|
||||
debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%X] (%s)",
|
||||
i, i, getOpcodeGoblinDesc(i));
|
||||
|
||||
OpcodeGoblinProcV4 op = NULL;
|
||||
|
||||
for (int j = 0; j < ARRAYSIZE(_goblinFuncLookUp); j++)
|
||||
if (_goblinFuncLookUp[j][0] == i) {
|
||||
op = _opcodesGoblinV4[_goblinFuncLookUp[j][1]].proc;
|
||||
break;
|
||||
}
|
||||
|
||||
if (op == NULL) {
|
||||
int16 val;
|
||||
|
||||
_vm->_global->_inter_execPtr -= 2;
|
||||
val = load16();
|
||||
_vm->_global->_inter_execPtr += val << 1;
|
||||
} else
|
||||
(this->*op) (params);
|
||||
}
|
||||
|
||||
const char *Inter_v4::getOpcodeDrawDesc(byte i) {
|
||||
return _opcodesDrawV4[i].desc;
|
||||
}
|
||||
|
||||
const char *Inter_v4::getOpcodeFuncDesc(byte i, byte j) {
|
||||
if ((i > 4) || (j > 15))
|
||||
return "";
|
||||
|
||||
return _opcodesFuncV4[i*16 + j].desc;
|
||||
}
|
||||
|
||||
const char *Inter_v4::getOpcodeGoblinDesc(int i) {
|
||||
for (int j = 0; j < ARRAYSIZE(_goblinFuncLookUp); j++)
|
||||
if (_goblinFuncLookUp[j][0] == i)
|
||||
return _opcodesGoblinV4[_goblinFuncLookUp[j][1]].desc;
|
||||
return "";
|
||||
}
|
||||
|
||||
void Inter_v4::o4_playVmdOrMusic() {
|
||||
char fileName[128];
|
||||
int16 x, y;
|
||||
int16 startFrame;
|
||||
int16 lastFrame;
|
||||
int16 breakKey;
|
||||
int16 flags;
|
||||
int16 palStart;
|
||||
int16 palEnd;
|
||||
uint16 palCmd;
|
||||
bool close;
|
||||
|
||||
evalExpr(0);
|
||||
_vm->_global->_inter_resStr[8] = 0;
|
||||
strncpy0(fileName, _vm->_global->_inter_resStr, 127);
|
||||
|
||||
x = _vm->_parse->parseValExpr();
|
||||
y = _vm->_parse->parseValExpr();
|
||||
startFrame = _vm->_parse->parseValExpr();
|
||||
lastFrame = _vm->_parse->parseValExpr();
|
||||
breakKey = _vm->_parse->parseValExpr();
|
||||
flags = _vm->_parse->parseValExpr();
|
||||
palStart = _vm->_parse->parseValExpr();
|
||||
palEnd = _vm->_parse->parseValExpr();
|
||||
palCmd = 1 << (flags & 0x3F);
|
||||
|
||||
close = false;
|
||||
if (lastFrame == -1) {
|
||||
close = true;
|
||||
} else if (lastFrame == -3) {
|
||||
warning("Woodruff Stub: Video/Music command -3: Play background video %s", fileName);
|
||||
// return;
|
||||
} else if (lastFrame == -4) {
|
||||
warning("Woodruff Stub: Video/Music command -4: Play background video %s", fileName);
|
||||
return;
|
||||
} else if (lastFrame == -5) {
|
||||
warning("Woodruff Stub: Video/Music command -5: Stop background music");
|
||||
return;
|
||||
} else if (lastFrame == -6) {
|
||||
warning("Woodruff Stub: Video/Music command -6: Load background video %s", fileName);
|
||||
return;
|
||||
} else if (lastFrame == -8) {
|
||||
warning("Woodruff Stub: Video/Music command -8: Play background video %s", fileName);
|
||||
return;
|
||||
} else if (lastFrame == -9) {
|
||||
warning("Woodruff Stub: Video/Music command -9: Play background music %s (%d-%d)", fileName, palEnd, palStart);
|
||||
return;
|
||||
} else if (lastFrame < 0) {
|
||||
warning("Unknown Video/Music command: %d, %s", lastFrame, fileName);
|
||||
return;
|
||||
}
|
||||
|
||||
if (startFrame == -2) {
|
||||
startFrame = lastFrame = 0;
|
||||
close = false;
|
||||
}
|
||||
|
||||
if ((fileName[0] != 0) && !_vm->_vidPlayer->openVideo(fileName, x, y, flags)) {
|
||||
WRITE_VAR(11, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (startFrame >= 0) {
|
||||
_vm->_game->_preventScroll = true;
|
||||
_vm->_vidPlayer->play(startFrame, lastFrame, breakKey, palCmd, palStart, palEnd, 0);
|
||||
_vm->_game->_preventScroll = false;
|
||||
}
|
||||
|
||||
if (close)
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
}
|
||||
|
||||
} // End of namespace Gob
|
|
@ -261,7 +261,7 @@ void Map::findNearestWalkable(int16 &gobDestX, int16 &gobDestY,
|
|||
int i;
|
||||
|
||||
mapWidth = _screenWidth / _tilesWidth;
|
||||
mapHeight = 200 / _tilesHeight;
|
||||
mapHeight = _vm->_width / _tilesHeight;
|
||||
direction = 0;
|
||||
|
||||
for (i = 1; i <= gobDestX; i++)
|
||||
|
|
|
@ -18,7 +18,8 @@ MODULE_OBJS := \
|
|||
goblin_v1.o \
|
||||
goblin_v2.o \
|
||||
goblin_v3.o \
|
||||
imd.o \
|
||||
coktelvideo.o \
|
||||
videoplayer.o \
|
||||
init.o \
|
||||
init_v1.o \
|
||||
init_v2.o \
|
||||
|
@ -26,8 +27,9 @@ MODULE_OBJS := \
|
|||
inter.o \
|
||||
inter_v1.o \
|
||||
inter_v2.o \
|
||||
inter_v3.o \
|
||||
inter_bargon.o \
|
||||
inter_v3.o \
|
||||
inter_v4.o \
|
||||
map.o \
|
||||
map_v1.o \
|
||||
map_v2.o \
|
||||
|
|
|
@ -112,7 +112,7 @@ public:
|
|||
} PACKED_STRUCT;
|
||||
|
||||
struct Mult_AnimKey {
|
||||
int16 frame;
|
||||
uint16 frame;
|
||||
int16 layer;
|
||||
int16 posX;
|
||||
int16 posY;
|
||||
|
@ -246,8 +246,10 @@ public:
|
|||
|
||||
virtual void loadMult(int16 resId) = 0;
|
||||
virtual void freeMultKeys() = 0;
|
||||
virtual void setMultData(uint16 multindex) = 0;
|
||||
virtual void multSub(uint16 multindex) = 0;
|
||||
virtual bool hasMultData(uint16 multIndex) = 0;
|
||||
virtual void setMultData(uint16 multIndex) = 0;
|
||||
virtual void zeroMultData(uint16 multIndex) = 0;
|
||||
virtual void multSub(uint16 multIndex) = 0;
|
||||
virtual void animate() = 0;
|
||||
|
||||
Mult(GobEngine *vm);
|
||||
|
@ -299,8 +301,10 @@ public:
|
|||
|
||||
virtual void loadMult(int16 resId);
|
||||
virtual void freeMultKeys();
|
||||
virtual void setMultData(uint16 multindex);
|
||||
virtual void multSub(uint16 multindex);
|
||||
virtual bool hasMultData(uint16 multIndex);
|
||||
virtual void setMultData(uint16 multIndex);
|
||||
virtual void zeroMultData(uint16 multIndex);
|
||||
virtual void multSub(uint16 multIndex);
|
||||
virtual void animate();
|
||||
|
||||
protected:
|
||||
|
@ -317,8 +321,10 @@ public:
|
|||
|
||||
virtual void loadMult(int16 resId);
|
||||
virtual void freeMultKeys();
|
||||
virtual void setMultData(uint16 multindex);
|
||||
virtual void multSub(uint16 multindex);
|
||||
virtual bool hasMultData(uint16 multIndex);
|
||||
virtual void setMultData(uint16 multIndex);
|
||||
virtual void zeroMultData(uint16 multIndex);
|
||||
virtual void multSub(uint16 multIndex);
|
||||
virtual void animate();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -237,11 +237,19 @@ void Mult_v1::freeMultKeys() {
|
|||
_multData = 0;
|
||||
}
|
||||
|
||||
void Mult_v1::setMultData(uint16 multindex) {
|
||||
bool Mult_v1::hasMultData(uint16 multIndex) {
|
||||
error("Switching mults not supported for Gob1");
|
||||
}
|
||||
|
||||
void Mult_v1::multSub(uint16 multindex) {
|
||||
void Mult_v1::setMultData(uint16 multIndex) {
|
||||
error("Switching mults not supported for Gob1");
|
||||
}
|
||||
|
||||
void Mult_v1::zeroMultData(uint16 multIndex) {
|
||||
error("Switching mults not supported for Gob1");
|
||||
}
|
||||
|
||||
void Mult_v1::multSub(uint16 multIndex) {
|
||||
error("Switching mults not supported for Gob1");
|
||||
}
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
#include "gob/draw.h"
|
||||
#include "gob/game.h"
|
||||
#include "gob/goblin.h"
|
||||
#include "gob/imd.h"
|
||||
#include "gob/inter.h"
|
||||
#include "gob/parse.h"
|
||||
#include "gob/scenery.h"
|
||||
#include "gob/video.h"
|
||||
#include "gob/videoplayer.h"
|
||||
|
||||
namespace Gob {
|
||||
|
||||
|
@ -346,28 +346,42 @@ void Mult_v2::freeMultKeys() {
|
|||
_multData = 0;
|
||||
}
|
||||
|
||||
void Mult_v2::setMultData(uint16 multindex) {
|
||||
if (multindex > 7)
|
||||
bool Mult_v2::hasMultData(uint16 multIndex) {
|
||||
if (multIndex > 7)
|
||||
error("Multindex out of range");
|
||||
|
||||
debugC(4, kDebugGameFlow, "Switching to mult %d", multindex);
|
||||
_multData = _multDatas[multindex];
|
||||
return _multDatas[multIndex] != 0;
|
||||
}
|
||||
|
||||
void Mult_v2::multSub(uint16 multindex) {
|
||||
void Mult_v2::setMultData(uint16 multIndex) {
|
||||
if (multIndex > 7)
|
||||
error("Multindex out of range");
|
||||
|
||||
debugC(4, kDebugGameFlow, "Switching to mult %d", multIndex);
|
||||
_multData = _multDatas[multIndex];
|
||||
}
|
||||
|
||||
void Mult_v2::zeroMultData(uint16 multIndex) {
|
||||
if (multIndex > 7)
|
||||
error("Multindex out of range");
|
||||
|
||||
_multDatas[multIndex] = 0;
|
||||
}
|
||||
|
||||
void Mult_v2::multSub(uint16 multIndex) {
|
||||
uint16 flags;
|
||||
int16 expr;
|
||||
int16 index;
|
||||
int16 startFrame, stopFrame, firstFrame;
|
||||
|
||||
flags = multindex;
|
||||
multindex = (multindex >> 12) & 0xF;
|
||||
flags = multIndex;
|
||||
multIndex = (multIndex >> 12) & 0xF;
|
||||
|
||||
if (multindex > 7)
|
||||
if (multIndex > 7)
|
||||
error("Multindex out of range");
|
||||
|
||||
debugC(4, kDebugGameFlow, "Sub mult %d", multindex);
|
||||
_multData = _multDatas[multindex];
|
||||
debugC(4, kDebugGameFlow, "Sub mult %d", multIndex);
|
||||
_multData = _multDatas[multIndex];
|
||||
|
||||
if (!_multData) {
|
||||
_vm->_parse->parseValExpr();
|
||||
|
@ -1027,7 +1041,7 @@ void Mult_v2::playImd(const char *imdFile, Mult::Mult_ImdKey &key, int16 dir,
|
|||
x = y = -1;
|
||||
|
||||
if (key.imdFile == -1) {
|
||||
_vm->_imdPlayer->closeImd();
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
_vm->_game->_preventScroll = false;
|
||||
return;
|
||||
}
|
||||
|
@ -1045,23 +1059,24 @@ void Mult_v2::playImd(const char *imdFile, Mult::Mult_ImdKey &key, int16 dir,
|
|||
if ((lastFrame - palFrame) < startFrame)
|
||||
if (!(key.flags & 0x4000)) {
|
||||
_vm->_game->_preventScroll = false;
|
||||
_vm->_imdPlayer->closeImd();
|
||||
_vm->_vidPlayer->closeVideo();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_vm->_imdPlayer->openImd(imdFile, x, y, 0, flags)) {
|
||||
if (!_vm->_vidPlayer->openVideo(imdFile, x, y, flags)) {
|
||||
_vm->_game->_preventScroll = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (palFrame == -1)
|
||||
palFrame = 0;
|
||||
|
||||
if (lastFrame == -1)
|
||||
lastFrame = _vm->_imdPlayer->_curImd->framesCount - 1;
|
||||
lastFrame = _vm->_vidPlayer->getFramesCount() - 1;
|
||||
|
||||
baseFrame = startFrame % (lastFrame - palFrame + 1);
|
||||
_vm->_imdPlayer->play(baseFrame + palFrame, flags & 0x7F,
|
||||
palStart, palEnd, palFrame, lastFrame);
|
||||
_vm->_vidPlayer->play(baseFrame + palFrame, baseFrame + palFrame, 0,
|
||||
flags & 0x7F, palStart, palEnd, palFrame, lastFrame);
|
||||
}
|
||||
|
||||
void Mult_v2::advanceObjects(int16 index) {
|
||||
|
@ -1074,13 +1089,19 @@ void Mult_v2::advanceObjects(int16 index) {
|
|||
return;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
int obj = _multData->animObjs[index][i];
|
||||
|
||||
if (_multData->animObjs[index][i] != -1) {
|
||||
int keyIndex = _multData->animKeysIndices[index][i];
|
||||
int count = _multData->animKeysCount[i];
|
||||
|
||||
for (int j = keyIndex; j < count; j++) {
|
||||
|
||||
if ((obj == -1) || (obj == 1024))
|
||||
continue;
|
||||
|
||||
Mult_AnimKey &key = _multData->animKeys[i][j];
|
||||
Mult_Object &animObj = _objects[_multData->animObjs[index][i]];
|
||||
Mult_Object &animObj = _objects[obj];
|
||||
Mult_AnimData &animData = *(animObj.pAnimData);
|
||||
|
||||
if (key.frame > frame)
|
||||
|
@ -1122,7 +1143,7 @@ void Mult_v2::advanceObjects(int16 index) {
|
|||
}
|
||||
}
|
||||
|
||||
if (_multData->animObjs[index][i] != -1) {
|
||||
if (obj != -1) {
|
||||
int keyIndex = _multData->imdKeysIndices[index][i];
|
||||
int count = _multData->imdKeysCount[i];
|
||||
|
||||
|
|
|
@ -136,7 +136,8 @@ class SaveLoad_v3 : public SaveLoad_v2 {
|
|||
public:
|
||||
virtual SaveType getSaveType(const char *fileName);
|
||||
|
||||
SaveLoad_v3(GobEngine *vm, const char *targetName);
|
||||
SaveLoad_v3(GobEngine *vm, const char *targetName, uint32 screenshotSize = 19968,
|
||||
int32 indexOffset = 40, int32 screenshotOffset = 80);
|
||||
virtual ~SaveLoad_v3() {}
|
||||
|
||||
protected:
|
||||
|
@ -144,13 +145,15 @@ protected:
|
|||
bool _firstSizeGame;
|
||||
int8 _saveSlot;
|
||||
|
||||
uint32 _screenshotSize;
|
||||
int32 _indexOffset;
|
||||
int32 _screenshotOffset;
|
||||
|
||||
virtual uint32 getSaveGameSize();
|
||||
|
||||
virtual int32 getSizeGame();
|
||||
virtual int32 getSizeNotes();
|
||||
virtual int32 getSizeScreenshot();
|
||||
virtual bool loadGame(int16 dataVar, int32 size, int32 offset);
|
||||
virtual bool loadNotes(int16 dataVar, int32 size, int32 offset);
|
||||
virtual bool loadScreenshot(int16 dataVar, int32 size, int32 offset);
|
||||
virtual bool saveGame(int16 dataVar, int32 size, int32 offset);
|
||||
virtual bool saveNotes(int16 dataVar, int32 size, int32 offset);
|
||||
|
|
|
@ -47,6 +47,10 @@ SaveLoad_v2::SaveLoad_v2(GobEngine *vm, const char *targetName) :
|
|||
}
|
||||
|
||||
SaveType SaveLoad_v2::getSaveType(const char *fileName) {
|
||||
const char *backSlash;
|
||||
if ((backSlash = strrchr(fileName, '\\')))
|
||||
fileName = backSlash + 1;
|
||||
|
||||
if (!scumm_stricmp(fileName, "cat.inf"))
|
||||
return kSaveGame;
|
||||
if (!scumm_stricmp(fileName, "cat.cat"))
|
||||
|
|
|
@ -34,9 +34,14 @@
|
|||
|
||||
namespace Gob {
|
||||
|
||||
SaveLoad_v3::SaveLoad_v3(GobEngine *vm, const char *targetName) :
|
||||
SaveLoad_v3::SaveLoad_v3(GobEngine *vm, const char *targetName,
|
||||
uint32 screenshotSize, int32 indexOffset, int32 screenshotOffset) :
|
||||
SaveLoad_v2(vm, targetName) {
|
||||
|
||||
_screenshotSize = screenshotSize;
|
||||
_indexOffset = indexOffset;
|
||||
_screenshotOffset = screenshotOffset;
|
||||
|
||||
_saveSlot = -1;
|
||||
_stagesCount = 3;
|
||||
|
||||
|
@ -58,12 +63,18 @@ SaveLoad_v3::SaveLoad_v3(GobEngine *vm, const char *targetName) :
|
|||
}
|
||||
|
||||
SaveType SaveLoad_v3::getSaveType(const char *fileName) {
|
||||
const char *backSlash;
|
||||
if ((backSlash = strrchr(fileName, '\\')))
|
||||
fileName = backSlash + 1;
|
||||
|
||||
if (!scumm_stricmp(fileName, "cat.inf"))
|
||||
return kSaveGame;
|
||||
if (!scumm_stricmp(fileName, "ima.inf"))
|
||||
return kSaveScreenshot;
|
||||
if (!scumm_stricmp(fileName, "intro.$$$"))
|
||||
return kSaveTempSprite;
|
||||
if (!scumm_stricmp(fileName, "bloc.inf"))
|
||||
return kSaveNotes;
|
||||
if (!scumm_stricmp(fileName, "prot"))
|
||||
return kSaveIgnore;
|
||||
if (!scumm_stricmp(fileName, "config"))
|
||||
|
@ -77,15 +88,11 @@ uint32 SaveLoad_v3::getSaveGameSize() {
|
|||
|
||||
size = 1040 + (READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4) * 2;
|
||||
if (_useScreenshots)
|
||||
size += 19968;
|
||||
size += _screenshotSize;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
int32 SaveLoad_v3::getSizeNotes() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int32 SaveLoad_v3::getSizeGame() {
|
||||
if (_firstSizeGame) {
|
||||
_firstSizeGame = false;
|
||||
|
@ -122,7 +129,7 @@ int32 SaveLoad_v3::getSizeScreenshot() {
|
|||
in = saveMan->openForLoading(setCurSlot(i));
|
||||
if (in) {
|
||||
delete in;
|
||||
size = (i + 1) * 19968 + 80;
|
||||
size = (i + 1) * _screenshotSize + _screenshotOffset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -206,19 +213,15 @@ bool SaveLoad_v3::loadGame(int16 dataVar, int32 size, int32 offset) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool SaveLoad_v3::loadNotes(int16 dataVar, int32 size, int32 offset) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SaveLoad_v3::loadScreenshot(int16 dataVar, int32 size, int32 offset) {
|
||||
Common::SaveFileManager *saveMan = g_system->getSavefileManager();
|
||||
Common::InSaveFile *in;
|
||||
|
||||
int slot = (offset - 80) / 19968;
|
||||
int slotR = (offset - 80) % 19968;
|
||||
int slot = (offset - _screenshotOffset) / _screenshotSize;
|
||||
int slotR = (offset - _screenshotOffset) % _screenshotSize;
|
||||
|
||||
_useScreenshots = true;
|
||||
if ((size == 40) && (offset == 40)) {
|
||||
if ((size == 40) && (offset == _indexOffset)) {
|
||||
char buf[40];
|
||||
|
||||
memset(buf, 0, 40);
|
||||
|
@ -327,16 +330,16 @@ bool SaveLoad_v3::saveGame(int16 dataVar, int32 size, int32 offset) {
|
|||
}
|
||||
|
||||
bool SaveLoad_v3::saveNotes(int16 dataVar, int32 size, int32 offset) {
|
||||
return false;
|
||||
return SaveLoad_v2::saveNotes(dataVar, size - 160, offset);
|
||||
}
|
||||
|
||||
bool SaveLoad_v3::saveScreenshot(int16 dataVar, int32 size, int32 offset) {
|
||||
int slot = (offset - 80) / 19968;
|
||||
int slotR = (offset - 80) % 19968;
|
||||
int slot = (offset - _screenshotOffset) / _screenshotSize;
|
||||
int slotR = (offset - _screenshotOffset) % _screenshotSize;
|
||||
|
||||
_useScreenshots = true;
|
||||
|
||||
if ((offset < 80) && (size > 0)) {
|
||||
if ((offset < _screenshotOffset) && (size > 0)) {
|
||||
|
||||
return true;
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ void Scenery::updateStatic(int16 orderFrom, byte index, byte layer) {
|
|||
int16 top;
|
||||
int16 bottom;
|
||||
|
||||
if (layer >= _statics[index].layersCount)
|
||||
if ((index >= 10) || layer >= _statics[index].layersCount)
|
||||
return;
|
||||
|
||||
layerPtr = &_statics[index].layers[layer];
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "gob/dataio.h"
|
||||
#include "gob/draw.h"
|
||||
#include "gob/game.h"
|
||||
#include "gob/imd.h"
|
||||
#include "gob/sound.h"
|
||||
#include "gob/video.h"
|
||||
|
||||
|
@ -50,6 +49,9 @@ uint32 Util::getTimeKey(void) {
|
|||
}
|
||||
|
||||
int16 Util::getRandom(int16 max) {
|
||||
if (max == 0)
|
||||
return 0;
|
||||
|
||||
return _vm->_rnd.getRandomNumber(max - 1);
|
||||
}
|
||||
|
||||
|
@ -126,8 +128,8 @@ void Util::processInput(bool scroll) {
|
|||
|
||||
_vm->_global->_speedFactor = MIN(_fastMode + 1, 3);
|
||||
if (scroll && hasMove) {
|
||||
if (y >= (200 - _vm->_video->_splitHeight2)) {
|
||||
y = 200 - _vm->_video->_splitHeight2 - 1;
|
||||
if (y >= (_vm->_height - _vm->_video->_splitHeight2)) {
|
||||
y = _vm->_height - _vm->_video->_splitHeight2 - 1;
|
||||
_vm->_util->setMousePos(x, y);
|
||||
}
|
||||
_vm->_game->evaluateScroll(x, y);
|
||||
|
@ -301,7 +303,6 @@ void Util::setFrameRate(int16 rate) {
|
|||
|
||||
_vm->_global->_frameWaitTime = 1000 / rate;
|
||||
_vm->_global->_startFrameTime = getTimeKey();
|
||||
_vm->_imdPlayer->_frameDelay = 0;
|
||||
}
|
||||
|
||||
void Util::waitEndFrame() {
|
||||
|
@ -312,17 +313,13 @@ void Util::waitEndFrame() {
|
|||
time = getTimeKey() - _vm->_global->_startFrameTime;
|
||||
if ((time > 1000) || (time < 0)) {
|
||||
_vm->_global->_startFrameTime = getTimeKey();
|
||||
_vm->_imdPlayer->_frameDelay = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_vm->_global->_frameWaitTime - time > 0) {
|
||||
_vm->_imdPlayer->_frameDelay = 0;
|
||||
delay(_vm->_global->_frameWaitTime - _vm->_imdPlayer->_frameDelay - time);
|
||||
}
|
||||
if ((_vm->_global->_frameWaitTime - time) > 0)
|
||||
delay(_vm->_global->_frameWaitTime - time);
|
||||
|
||||
_vm->_global->_startFrameTime = getTimeKey();
|
||||
_vm->_imdPlayer->_frameDelay = time - _vm->_global->_frameWaitTime;
|
||||
}
|
||||
|
||||
void Util::setScrollOffset(int16 x, int16 y) {
|
||||
|
|
|
@ -94,6 +94,7 @@ Video::Video(GobEngine *vm) : _vm(vm) {
|
|||
_splitHeight1 = 200;
|
||||
_splitHeight2 = 0;
|
||||
_splitStart = 0;
|
||||
_lastRetraceLength = 0;
|
||||
|
||||
_curSparse = 0;
|
||||
_lastSparse = 0xFFFFFFFF;
|
||||
|
@ -161,26 +162,27 @@ SurfaceDesc *Video::initSurfDesc(int16 vidMode, int16 width, int16 height,
|
|||
}
|
||||
|
||||
void Video::retrace(bool mouse) {
|
||||
uint32 time = _vm->_util->getTimeKey();
|
||||
|
||||
if (mouse)
|
||||
CursorMan.showMouse((_vm->_draw->_showCursor & 2) != 0);
|
||||
if (_vm->_global->_primarySurfDesc) {
|
||||
g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() +
|
||||
_scrollOffsetY * _surfWidth + _scrollOffsetX, _surfWidth,
|
||||
0, 0, 320, _splitHeight1);
|
||||
0, 0, _vm->_width, _splitHeight1);
|
||||
if (_splitHeight2 > 0)
|
||||
g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() +
|
||||
_splitStart * _surfWidth, _surfWidth, 0,
|
||||
200 - _splitHeight2, 320, _splitHeight2);
|
||||
_vm->_height - _splitHeight2, _vm->_width, _splitHeight2);
|
||||
g_system->updateScreen();
|
||||
}
|
||||
|
||||
_lastRetraceLength = _vm->_util->getTimeKey() - time;
|
||||
}
|
||||
|
||||
void Video::waitRetrace(bool mouse) {
|
||||
uint32 time;
|
||||
|
||||
time = _vm->_util->getTimeKey();
|
||||
retrace(mouse);
|
||||
_vm->_util->delay(MAX(1, 10 - (int)(_vm->_util->getTimeKey() - time)));
|
||||
_vm->_util->delay(MAX(1, 10 - (int) _lastRetraceLength));
|
||||
}
|
||||
|
||||
void Video::sparseRetrace(int max) {
|
||||
|
|
|
@ -104,6 +104,7 @@ public:
|
|||
int16 _splitHeight1;
|
||||
int16 _splitHeight2;
|
||||
int16 _splitStart;
|
||||
uint32 _lastRetraceLength;
|
||||
|
||||
void freeDriver();
|
||||
void initPrimary(int16 mode);
|
||||
|
|
333
engines/gob/videoplayer.cpp
Normal file
333
engines/gob/videoplayer.cpp
Normal file
|
@ -0,0 +1,333 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "gob/videoplayer.h"
|
||||
#include "gob/global.h"
|
||||
#include "gob/util.h"
|
||||
#include "gob/dataio.h"
|
||||
#include "gob/video.h"
|
||||
#include "gob/draw.h"
|
||||
#include "gob/game.h"
|
||||
#include "gob/palanim.h"
|
||||
#include "gob/inter.h"
|
||||
|
||||
namespace Gob {
|
||||
|
||||
const char *VideoPlayer::_extensions[] = { "IMD", "VMD" };
|
||||
|
||||
VideoPlayer::VideoPlayer(GobEngine *vm) : _vm(vm) {
|
||||
_curFile[0] = 0;
|
||||
_stream = 0;
|
||||
_video = 0;
|
||||
_backSurf = false;
|
||||
}
|
||||
|
||||
VideoPlayer::~VideoPlayer() {
|
||||
closeVideo();
|
||||
}
|
||||
|
||||
bool VideoPlayer::openVideo(const char *video, int16 x, int16 y, int16 flags, Type which) {
|
||||
char fileName[256];
|
||||
|
||||
strncpy0(fileName, video, 250);
|
||||
|
||||
char *extStart = strchr(fileName, '.');
|
||||
if (extStart) {
|
||||
// The requested file already has an extension. Verifying.
|
||||
|
||||
int i;
|
||||
for (i = 0; i < ARRAYSIZE(_extensions); i++) {
|
||||
if (!scumm_stricmp(extStart + 1, _extensions[i])) {
|
||||
if ((which != kVideoTypeTry) && (which == ((Type) i))) {
|
||||
warning("Attempted to open video \"%s\", "
|
||||
"but requested a different type", fileName);
|
||||
return false;
|
||||
}
|
||||
which = (Type) i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i >= ARRAYSIZE(_extensions))
|
||||
extStart = 0;
|
||||
|
||||
}
|
||||
|
||||
if (!extStart) {
|
||||
// No or unrecognized extension. Probing.
|
||||
|
||||
int len = strlen(fileName);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < ARRAYSIZE(_extensions); i++) {
|
||||
if ((which == kVideoTypeTry) || (which == ((Type) i))) {
|
||||
int16 handle;
|
||||
|
||||
fileName[len] = '.';
|
||||
fileName[len + 1] = 0;
|
||||
strcat(fileName, _extensions[i]);
|
||||
|
||||
handle = _vm->_dataIO->openData(fileName);
|
||||
if (handle >= 0) {
|
||||
_vm->_dataIO->closeData(handle);
|
||||
which = (Type) i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((i >= ARRAYSIZE(_extensions)) || (which == kVideoTypeTry)) {
|
||||
fileName[len] = 0;
|
||||
warning("Couldn't open video \"%s\"", fileName);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (scumm_strnicmp(_curFile, fileName, strlen(fileName))) {
|
||||
closeVideo();
|
||||
|
||||
int16 handle = _vm->_dataIO->openData(fileName);
|
||||
|
||||
if (handle < 0) {
|
||||
warning("Couldn't open video \"%s\": No such file", fileName);
|
||||
return false;
|
||||
}
|
||||
|
||||
_stream = _vm->_dataIO->openAsStream(handle, true);
|
||||
|
||||
if (which == kVideoTypeIMD) {
|
||||
_video = new Imd();
|
||||
} else if (which == kVideoTypeVMD) {
|
||||
_video = new Vmd();
|
||||
} else {
|
||||
warning("Couldn't open video \"%s\": Invalid video Type", fileName);
|
||||
closeVideo();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_video->load(*_stream)) {
|
||||
warning("While loading video \"%s\"", fileName);
|
||||
closeVideo();
|
||||
return false;
|
||||
}
|
||||
|
||||
_video->setXY(x, y);
|
||||
|
||||
if (!(flags & kFlagNoVideo)) {
|
||||
_backSurf = ((flags & kFlagFrontSurface) == 0);
|
||||
SurfaceDesc::Ptr surf = _vm->_draw->_spritesArray[_backSurf ? 21 : 20];
|
||||
_video->setVideoMemory(surf->getVidMem(), surf->getWidth(), surf->getHeight());
|
||||
} else
|
||||
_video->setVideoMemory();
|
||||
|
||||
_video->enableSound(*_vm->_mixer);
|
||||
}
|
||||
|
||||
if (!_video)
|
||||
return false;
|
||||
|
||||
WRITE_VAR(7, _video->getFramesCount());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void VideoPlayer::play(int16 startFrame, int16 lastFrame, int16 breakKey,
|
||||
uint16 palCmd, int16 palStart, int16 palEnd,
|
||||
int16 palFrame, int16 endFrame, bool fade, int16 reverseTo) {
|
||||
|
||||
if (!_video)
|
||||
return;
|
||||
|
||||
breakKey = 27;
|
||||
if (startFrame < 0)
|
||||
startFrame = _video->getCurrentFrame();
|
||||
if (lastFrame < 0)
|
||||
lastFrame = _video->getFramesCount() - 1;
|
||||
if (palFrame < 0)
|
||||
palFrame = startFrame;
|
||||
if (endFrame < 0)
|
||||
endFrame = lastFrame;
|
||||
palCmd &= 0x3F;
|
||||
|
||||
if (_video->getCurrentFrame() != startFrame)
|
||||
_video->seekFrame(startFrame);
|
||||
|
||||
_vm->_draw->_showCursor = 0;
|
||||
_vm->_util->setFrameRate(12);
|
||||
|
||||
if (fade)
|
||||
_vm->_palAnim->fade(0, -2, 0);
|
||||
|
||||
while (startFrame <= lastFrame) {
|
||||
if (doPlay(startFrame, breakKey, palCmd, palStart, palEnd, palFrame, endFrame))
|
||||
break;
|
||||
|
||||
if (fade) {
|
||||
_vm->_palAnim->fade(_vm->_global->_pPaletteDesc, -2, 0);
|
||||
fade = false;
|
||||
}
|
||||
|
||||
_video->waitEndFrame();
|
||||
startFrame++;
|
||||
}
|
||||
|
||||
if (reverseTo >= 0) {
|
||||
int16 toFrame = _video->getFramesCount() - reverseTo;
|
||||
for (int i = _video->getCurrentFrame(); i >= toFrame; i--) {
|
||||
_video->seekFrame(i, SEEK_SET, true);
|
||||
if (doPlay(i, breakKey, 0, 0, 0, 0, 0)) {
|
||||
_vm->_palAnim->fade(0, -2, 0);
|
||||
memset((char *) _vm->_draw->_vgaPalette, 0, 768);
|
||||
}
|
||||
_video->waitEndFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int16 VideoPlayer::getFramesCount() const {
|
||||
if (!_video)
|
||||
return 0;
|
||||
|
||||
return _video->getFramesCount();
|
||||
}
|
||||
|
||||
int16 VideoPlayer::getCurrentFrame() const {
|
||||
if (!_video)
|
||||
return 0;
|
||||
|
||||
return _video->getCurrentFrame();
|
||||
}
|
||||
|
||||
bool VideoPlayer::doPlay(int16 frame, int16 breakKey,
|
||||
uint16 palCmd, int16 palStart, int16 palEnd,
|
||||
int16 palFrame, int16 endFrame) {
|
||||
|
||||
bool modifiedPal = false;
|
||||
|
||||
if ((frame == palFrame) || ((frame == endFrame) && (palCmd == 8))) {
|
||||
modifiedPal = true;
|
||||
_vm->_draw->_applyPal = true;
|
||||
|
||||
if (palCmd >= 4)
|
||||
copyPalette(palStart, palEnd);
|
||||
}
|
||||
|
||||
if (modifiedPal && (palCmd == 8) && !_backSurf)
|
||||
_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
|
||||
|
||||
|
||||
CoktelVideo::State state = _video->nextFrame();
|
||||
WRITE_VAR(11, frame);
|
||||
|
||||
|
||||
if (modifiedPal && (palCmd == 16)) {
|
||||
if (_backSurf)
|
||||
_vm->_draw->forceBlit();
|
||||
_vm->_palAnim->fade(_vm->_global->_pPaletteDesc, -2, 0);
|
||||
_vm->_draw->_noInvalidated = true;
|
||||
}
|
||||
|
||||
if (state.flags & CoktelVideo::kStatePalette) {
|
||||
copyPalette(palStart, palEnd);
|
||||
|
||||
if (!_backSurf)
|
||||
_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
|
||||
else
|
||||
_vm->_draw->_applyPal = true;
|
||||
}
|
||||
|
||||
if (modifiedPal && (palCmd == 8) && _backSurf)
|
||||
_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
|
||||
|
||||
|
||||
if (_backSurf) {
|
||||
_vm->_draw->invalidateRect(state.left, state.top, state.right, state.bottom);
|
||||
_vm->_draw->blitInvalidated();
|
||||
}
|
||||
_vm->_video->retrace();
|
||||
|
||||
|
||||
if (modifiedPal && ((palCmd == 2) || (palCmd == 4)))
|
||||
_vm->_palAnim->fade(_vm->_global->_pPaletteDesc, -2, 0);
|
||||
|
||||
|
||||
_vm->_util->processInput();
|
||||
|
||||
if (_vm->_quitRequested) {
|
||||
_video->disableSound();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (breakKey != 0) {
|
||||
_vm->_util->getMouseState(&_vm->_global->_inter_mouseX,
|
||||
&_vm->_global->_inter_mouseY, &_vm->_game->_mouseButtons);
|
||||
|
||||
_vm->_inter->storeKey(_vm->_util->checkKey());
|
||||
if (VAR(0) == (unsigned) breakKey) {
|
||||
_video->disableSound();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void VideoPlayer::copyPalette(int16 palStart, int16 palEnd) {
|
||||
if ((palStart == -1) || (palEnd == -1))
|
||||
memcpy((char *) _vm->_global->_pPaletteDesc->vgaPal,
|
||||
_video->getPalette(), 768);
|
||||
else
|
||||
memcpy(((char *) (_vm->_global->_pPaletteDesc->vgaPal)) +
|
||||
palStart * 3, _video->getPalette() + palStart * 3,
|
||||
(palEnd - palStart + 1) * 3);
|
||||
}
|
||||
|
||||
void VideoPlayer::writeVideoInfo(const char *video, int16 varX, int16 varY,
|
||||
int16 varFrames, int16 varWidth, int16 varHeight) {
|
||||
|
||||
if (openVideo(video)) {
|
||||
WRITE_VAR_OFFSET(varX, _video->getX());
|
||||
WRITE_VAR_OFFSET(varY, _video->getY());
|
||||
WRITE_VAR_OFFSET(varFrames, _video->getFramesCount());
|
||||
WRITE_VAR_OFFSET(varWidth, _video->getWidth());
|
||||
WRITE_VAR_OFFSET(varHeight, _video->getHeight());
|
||||
closeVideo();
|
||||
} else {
|
||||
WRITE_VAR_OFFSET(varX, -1);
|
||||
WRITE_VAR_OFFSET(varY, -1);
|
||||
WRITE_VAR_OFFSET(varFrames, -1);
|
||||
WRITE_VAR_OFFSET(varWidth, -1);
|
||||
WRITE_VAR_OFFSET(varHeight, -1);
|
||||
}
|
||||
}
|
||||
|
||||
void VideoPlayer::closeVideo() {
|
||||
delete _video;
|
||||
delete _stream;
|
||||
|
||||
_video = 0;
|
||||
_stream = 0;
|
||||
}
|
||||
|
||||
} // End of namespace Gob
|
86
engines/gob/videoplayer.h
Normal file
86
engines/gob/videoplayer.h
Normal file
|
@ -0,0 +1,86 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GOB_VIDEOPLAYER_H
|
||||
#define GOB_VIDEOPLAYER_H
|
||||
|
||||
#include "gob/coktelvideo.h"
|
||||
#include "gob/dataio.h"
|
||||
|
||||
namespace Gob {
|
||||
|
||||
class GobEngine;
|
||||
|
||||
class VideoPlayer {
|
||||
public:
|
||||
enum Flags {
|
||||
kFlagNone = 0,
|
||||
kFlagFrontSurface = 0x80,
|
||||
kFlagNoVideo = 0x100
|
||||
};
|
||||
|
||||
enum Type {
|
||||
kVideoTypeTry = -1,
|
||||
kVideoTypeIMD = 0,
|
||||
kVideoTypeVMD = 1
|
||||
};
|
||||
|
||||
VideoPlayer(GobEngine *vm);
|
||||
~VideoPlayer();
|
||||
|
||||
bool openVideo(const char *video, int16 x = -1, int16 y = -1,
|
||||
int16 flags = kFlagFrontSurface, Type which = kVideoTypeTry);
|
||||
|
||||
void play(int16 startFrame = -1, int16 lastFrame = -1, int16 breakKey = 27,
|
||||
uint16 palCmd = 8, int16 palStart = 0, int16 palEnd = 255,
|
||||
int16 palFrame = -1, int16 endFrame = -1, bool fade = false,
|
||||
int16 reverseTo = -1);
|
||||
|
||||
int16 getFramesCount() const;
|
||||
int16 getCurrentFrame() const;
|
||||
void writeVideoInfo(const char *video, int16 varX, int16 varY,
|
||||
int16 varFrames, int16 varWidth, int16 varHeight);
|
||||
|
||||
void closeVideo();
|
||||
|
||||
private:
|
||||
static const char *_extensions[];
|
||||
|
||||
GobEngine *_vm;
|
||||
|
||||
char _curFile[256];
|
||||
DataStream *_stream;
|
||||
CoktelVideo *_video;
|
||||
bool _backSurf;
|
||||
|
||||
void copyPalette(int16 palStart = -1, int16 palEnd = -1);
|
||||
bool doPlay(int16 frame, int16 breakKey,
|
||||
uint16 palCmd, int16 palStart, int16 palEnd,
|
||||
int16 palFrame, int16 endFrame);
|
||||
};
|
||||
|
||||
} // End of namespace Gob
|
||||
|
||||
#endif // GOB_VIDEOPLAYER_H
|
|
@ -26,15 +26,15 @@
|
|||
#include "common/stdafx.h"
|
||||
#include "common/endian.h"
|
||||
|
||||
#include "kyra/kyra.h"
|
||||
#include "kyra/kyra_v1.h"
|
||||
#include "kyra/screen.h"
|
||||
#include "kyra/animator.h"
|
||||
#include "kyra/animator_v1.h"
|
||||
#include "kyra/sprites.h"
|
||||
|
||||
#include "common/system.h"
|
||||
|
||||
namespace Kyra {
|
||||
ScreenAnimator::ScreenAnimator(KyraEngine *vm, OSystem *system) {
|
||||
ScreenAnimator::ScreenAnimator(KyraEngine_v1 *vm, OSystem *system) {
|
||||
_vm = vm;
|
||||
_screen = vm->screen();
|
||||
_initOk = false;
|
|
@ -27,7 +27,7 @@
|
|||
#define KYRA_ANIMATOR_H
|
||||
|
||||
namespace Kyra {
|
||||
class KyraEngine;
|
||||
class KyraEngine_v1;
|
||||
class Screen;
|
||||
|
||||
struct AnimObject {
|
||||
|
@ -53,7 +53,7 @@ struct AnimObject {
|
|||
|
||||
class ScreenAnimator {
|
||||
public:
|
||||
ScreenAnimator(KyraEngine *vm, OSystem *system);
|
||||
ScreenAnimator(KyraEngine_v1 *vm, OSystem *system);
|
||||
virtual ~ScreenAnimator();
|
||||
|
||||
operator bool() const { return _initOk; }
|
||||
|
@ -101,7 +101,7 @@ public:
|
|||
int _brandonScaleY;
|
||||
|
||||
protected:
|
||||
KyraEngine *_vm;
|
||||
KyraEngine_v1 *_vm;
|
||||
Screen *_screen;
|
||||
OSystem *_system;
|
||||
bool _initOk;
|
313
engines/kyra/animator_v2.cpp
Normal file
313
engines/kyra/animator_v2.cpp
Normal file
|
@ -0,0 +1,313 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "kyra/kyra_v2.h"
|
||||
#include "kyra/wsamovie.h"
|
||||
|
||||
namespace Kyra {
|
||||
|
||||
void KyraEngine_v2::clearAnimObjects() {
|
||||
memset(_animObjects, 0, sizeof(_animObjects));
|
||||
|
||||
_animObjects[0].index = 0;
|
||||
_animObjects[0].type = 0;
|
||||
_animObjects[0].enabled = 1;
|
||||
_animObjects[0].flags = 0x800;
|
||||
_animObjects[0].width = 32;
|
||||
_animObjects[0].height = 49;
|
||||
_animObjects[0].width2 = 4;
|
||||
_animObjects[0].height2 = 10;
|
||||
|
||||
for (int i = 1; i < 11; ++i) {
|
||||
_animObjects[i].index = i;
|
||||
_animObjects[i].type = 2;
|
||||
}
|
||||
|
||||
for (int i = 11; i <= 40; ++i) {
|
||||
_animObjects[i].index = i;
|
||||
_animObjects[i].type = 1;
|
||||
_animObjects[i].flags = 0x800;
|
||||
_animObjects[i].width = 16;
|
||||
_animObjects[i].height = 16;
|
||||
}
|
||||
}
|
||||
|
||||
KyraEngine_v2::AnimObj *KyraEngine_v2::initAnimList(AnimObj *list, AnimObj *entry) {
|
||||
entry->nextObject = list;
|
||||
return entry;
|
||||
}
|
||||
|
||||
KyraEngine_v2::AnimObj *KyraEngine_v2::addToAnimListSorted(AnimObj *list, AnimObj *add) {
|
||||
if (add->yPos1 <= list->yPos1) {
|
||||
add->nextObject = list;
|
||||
return add;
|
||||
}
|
||||
|
||||
AnimObj *cur = list;
|
||||
AnimObj *prev = list;
|
||||
while (add->yPos1 > cur->yPos1) {
|
||||
AnimObj *temp = cur->nextObject;
|
||||
if (!temp)
|
||||
break;
|
||||
prev = cur;
|
||||
cur = temp;
|
||||
}
|
||||
|
||||
if (add->yPos1 <= cur->yPos1) {
|
||||
prev->nextObject = add;
|
||||
add->nextObject = cur;
|
||||
} else {
|
||||
cur->nextObject = add;
|
||||
add->nextObject = 0;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
KyraEngine_v2::AnimObj *KyraEngine_v2::deleteAnimListEntry(AnimObj *list, AnimObj *entry) {
|
||||
if (!list)
|
||||
return 0;
|
||||
|
||||
AnimObj *old = 0;
|
||||
AnimObj *cur = list;
|
||||
|
||||
while (true) {
|
||||
if (cur == entry)
|
||||
break;
|
||||
if (!cur->nextObject)
|
||||
break;
|
||||
old = cur;
|
||||
cur = cur->nextObject;
|
||||
}
|
||||
|
||||
if (cur == list) {
|
||||
if (!cur->nextObject)
|
||||
return 0;
|
||||
cur = cur->nextObject;
|
||||
return cur;
|
||||
}
|
||||
|
||||
if (!cur->nextObject) {
|
||||
if (!old)
|
||||
return 0;
|
||||
old->nextObject = 0;
|
||||
return list;
|
||||
}
|
||||
|
||||
if (cur != entry)
|
||||
return list;
|
||||
|
||||
old->nextObject = entry->nextObject;
|
||||
return list;
|
||||
}
|
||||
|
||||
void KyraEngine_v2::drawAnimObjects() {
|
||||
for (AnimObj *curObject = _animList; curObject; curObject = curObject->nextObject) {
|
||||
if (!curObject->enabled)
|
||||
continue;
|
||||
|
||||
int x = curObject->xPos2 - (_screen->getScreenDim(2)->sx << 3);
|
||||
int y = curObject->yPos2 - _screen->getScreenDim(2)->sy;
|
||||
int layer = 7;
|
||||
|
||||
if (curObject->flags & 0x800) {
|
||||
if (curObject->animFlags)
|
||||
layer = 0;
|
||||
else
|
||||
layer = getDrawLayer(curObject->xPos1, curObject->yPos1);
|
||||
}
|
||||
curObject->flags |= 0x800;
|
||||
|
||||
if (curObject->index)
|
||||
drawSceneAnimObject(curObject, x, y, layer);
|
||||
else
|
||||
drawCharacterAnimObject(curObject, x, y, layer);
|
||||
}
|
||||
}
|
||||
|
||||
void KyraEngine_v2::refreshAnimObjects(int force) {
|
||||
for (AnimObj *curObject = _animList; curObject; curObject = curObject->nextObject) {
|
||||
if (!curObject->enabled)
|
||||
continue;
|
||||
if (!curObject->needRefresh && !force)
|
||||
continue;
|
||||
|
||||
int x = curObject->xPos2 - curObject->width2;
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
if (x >= 320)
|
||||
x = 319;
|
||||
int y = curObject->yPos2 - curObject->height2;
|
||||
if (y < 0)
|
||||
y = 0;
|
||||
if (y >= 143)
|
||||
y = 142;
|
||||
|
||||
int width = curObject->width + curObject->width2 + 8;
|
||||
int height = curObject->height + curObject->height2*2;
|
||||
if (width + x > 320)
|
||||
width -= width + x - 322;
|
||||
if (height + y > 143)
|
||||
height -= height + y - 144;
|
||||
|
||||
_screen->hideMouse();
|
||||
_screen->copyRegion(x, y, x, y, width, height, 2, 0, Screen::CR_CLIPPED);
|
||||
_screen->showMouse();
|
||||
|
||||
curObject->needRefresh = false;
|
||||
}
|
||||
}
|
||||
|
||||
void KyraEngine_v2::refreshAnimObjectsIfNeed() {
|
||||
for (AnimObj *curEntry = _animList; curEntry; curEntry = curEntry->nextObject) {
|
||||
if (curEntry->enabled && curEntry->needRefresh) {
|
||||
restorePage3();
|
||||
drawAnimObjects();
|
||||
refreshAnimObjects(0);
|
||||
_screen->updateScreen();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KyraEngine_v2::updateCharacterAnim(int) {
|
||||
Character *c = &_mainCharacter;
|
||||
AnimObj *animState = _animObjects;
|
||||
|
||||
animState->needRefresh = 1;
|
||||
animState->unk8 = 1;
|
||||
|
||||
if (c->facing >= 1 && c->facing <= 3)
|
||||
animState->flags |= 1;
|
||||
else if (c->facing >= 5 && c->facing <= 7)
|
||||
animState->flags &= ~1;
|
||||
|
||||
animState->xPos2 = animState->xPos1 = c->x1;
|
||||
animState->yPos2 = animState->yPos1 = c->y1;
|
||||
animState->shapePtr = _defaultShapeTable[c->animFrame];
|
||||
animState->shapeIndex1 = animState->shapeIndex2 = c->animFrame;
|
||||
|
||||
int xAdd = _shapeDescTable[c->animFrame-9].xAdd;
|
||||
int yAdd = _shapeDescTable[c->animFrame-9].yAdd;
|
||||
|
||||
_charScaleX = _charScaleY = getScale(c->x1, c->y1);
|
||||
|
||||
animState->xPos2 += (xAdd * _charScaleX) >> 8;
|
||||
animState->yPos2 += (yAdd * _charScaleY) >> 8;
|
||||
animState->width2 = 8;
|
||||
animState->height2 = 10;
|
||||
|
||||
_animList = deleteAnimListEntry(_animList, animState);
|
||||
if (_animList)
|
||||
_animList = addToAnimListSorted(_animList, animState);
|
||||
else
|
||||
_animList = initAnimList(_animList, animState);
|
||||
|
||||
updateCharPal(1);
|
||||
}
|
||||
|
||||
void KyraEngine_v2::updateSceneAnim(int anim, int newFrame) {
|
||||
AnimObj *animObject = &_animObjects[1+anim];
|
||||
if (!animObject->enabled)
|
||||
return;
|
||||
|
||||
animObject->needRefresh = 1;
|
||||
animObject->unk8 = 1;
|
||||
animObject->flags = 0;
|
||||
|
||||
if (_sceneAnims[anim].flags & 2)
|
||||
animObject->flags |= 0x800;
|
||||
else
|
||||
animObject->flags &= ~0x800;
|
||||
|
||||
if (_sceneAnims[anim].flags & 4)
|
||||
animObject->flags |= 1;
|
||||
else
|
||||
animObject->flags &= ~1;
|
||||
|
||||
if (_sceneAnims[anim].flags & 0x20) {
|
||||
animObject->shapePtr = _sceneShapeTable[newFrame];
|
||||
animObject->shapeIndex2 = 0xFFFF;
|
||||
animObject->shapeIndex3 = 0xFFFF;
|
||||
animObject->animNum = 0xFFFF;
|
||||
} else {
|
||||
animObject->shapePtr = 0;
|
||||
animObject->shapeIndex3 = newFrame;
|
||||
animObject->animNum = anim;
|
||||
}
|
||||
|
||||
animObject->xPos1 = _sceneAnims[anim].x;
|
||||
animObject->yPos1 = _sceneAnims[anim].y;
|
||||
animObject->xPos2 = _sceneAnims[anim].x2;
|
||||
animObject->yPos2 = _sceneAnims[anim].y2;
|
||||
|
||||
if (_sceneAnims[anim].flags & 2) {
|
||||
_animList = deleteAnimListEntry(_animList, animObject);
|
||||
if (!_animList)
|
||||
_animList = initAnimList(_animList, animObject);
|
||||
else
|
||||
_animList = addToAnimListSorted(_animList, animObject);
|
||||
}
|
||||
}
|
||||
|
||||
void KyraEngine_v2::drawSceneAnimObject(AnimObj *obj, int x, int y, int layer) {
|
||||
if (obj->type == 1) {
|
||||
if (obj->shapeIndex1 == 0xFFFF)
|
||||
return;
|
||||
int scale = getScale(obj->xPos1, obj->yPos1);
|
||||
_screen->drawShape(2, getShapePtr(obj->shapeIndex1), x, y, 2, obj->flags | 4, layer, scale, scale);
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj->shapePtr) {
|
||||
_screen->drawShape(2, obj->shapePtr, x, y, 2, obj->flags, layer);
|
||||
} else {
|
||||
if (obj->shapeIndex3 == 0xFFFF || obj->animNum == 0xFFFF)
|
||||
return;
|
||||
|
||||
int flags = 0x4000;
|
||||
if (obj->flags & 0x800)
|
||||
flags |= 0x8000;
|
||||
|
||||
if (_sceneAnims[obj->animNum].wsaFlag) {
|
||||
x = y = 0;
|
||||
} else {
|
||||
x = obj->xPos2;
|
||||
y = obj->yPos2;
|
||||
}
|
||||
|
||||
_sceneAnimMovie[obj->animNum]->setX(x);
|
||||
_sceneAnimMovie[obj->animNum]->setY(y);
|
||||
_sceneAnimMovie[obj->animNum]->setDrawPage(2);
|
||||
_sceneAnimMovie[obj->animNum]->displayFrame(obj->shapeIndex3, int(flags | layer), 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void KyraEngine_v2::drawCharacterAnimObject(AnimObj *obj, int x, int y, int layer) {
|
||||
if (_drawNoShapeFlag || obj->shapeIndex1 == 0xFFFF)
|
||||
return;
|
||||
_screen->drawShape(2, getShapePtr(obj->shapeIndex1), x, y, 2, obj->flags | 4, layer, _charScaleX, _charScaleY);
|
||||
}
|
||||
|
||||
} // end of namespace Kyra
|
|
@ -27,35 +27,36 @@
|
|||
#include "common/config-manager.h"
|
||||
#include "common/system.h"
|
||||
#include "kyra/debugger.h"
|
||||
#include "kyra/kyra.h"
|
||||
#include "kyra/kyra_v1.h"
|
||||
#include "kyra/screen.h"
|
||||
#include "kyra/timer.h"
|
||||
|
||||
namespace Kyra {
|
||||
|
||||
Debugger::Debugger(KyraEngine *vm)
|
||||
: GUI::Debugger() {
|
||||
Debugger_v1::Debugger_v1(KyraEngine_v1 *vm)
|
||||
: Debugger(vm) {
|
||||
_vm = vm;
|
||||
|
||||
DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
|
||||
DCmd_Register("enter", WRAP_METHOD(Debugger, cmd_enterRoom));
|
||||
DCmd_Register("rooms", WRAP_METHOD(Debugger, cmd_listRooms));
|
||||
DCmd_Register("flags", WRAP_METHOD(Debugger, cmd_listFlags));
|
||||
DCmd_Register("toggleflag", WRAP_METHOD(Debugger, cmd_toggleFlag));
|
||||
DCmd_Register("queryflag", WRAP_METHOD(Debugger, cmd_queryFlag));
|
||||
DCmd_Register("timers", WRAP_METHOD(Debugger, cmd_listTimers));
|
||||
DCmd_Register("settimercountdown", WRAP_METHOD(Debugger, cmd_setTimerCountdown));
|
||||
DCmd_Register("give", WRAP_METHOD(Debugger, cmd_giveItem));
|
||||
DCmd_Register("continue", WRAP_METHOD(Debugger_v1, Cmd_Exit));
|
||||
DCmd_Register("enter", WRAP_METHOD(Debugger_v1, cmd_enterRoom));
|
||||
DCmd_Register("rooms", WRAP_METHOD(Debugger_v1, cmd_listRooms));
|
||||
DCmd_Register("flags", WRAP_METHOD(Debugger_v1, cmd_listFlags));
|
||||
DCmd_Register("toggleflag", WRAP_METHOD(Debugger_v1, cmd_toggleFlag));
|
||||
DCmd_Register("queryflag", WRAP_METHOD(Debugger_v1, cmd_queryFlag));
|
||||
DCmd_Register("timers", WRAP_METHOD(Debugger_v1, cmd_listTimers));
|
||||
DCmd_Register("settimercountdown", WRAP_METHOD(Debugger_v1, cmd_setTimerCountdown));
|
||||
DCmd_Register("give", WRAP_METHOD(Debugger_v1, cmd_giveItem));
|
||||
}
|
||||
|
||||
void Debugger::preEnter() {
|
||||
void Debugger_v1::preEnter() {
|
||||
//_vm->midi.pause(1);
|
||||
}
|
||||
|
||||
void Debugger::postEnter() {
|
||||
void Debugger_v1::postEnter() {
|
||||
//_vm->midi.pause(0);
|
||||
}
|
||||
|
||||
bool Debugger::cmd_enterRoom(int argc, const char **argv) {
|
||||
bool Debugger_v1::cmd_enterRoom(int argc, const char **argv) {
|
||||
uint direction = 0;
|
||||
if (argc > 1) {
|
||||
int room = atoi(argv[1]);
|
||||
|
@ -93,7 +94,7 @@ bool Debugger::cmd_enterRoom(int argc, const char **argv) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Debugger::cmd_listRooms(int argc, const char **argv) {
|
||||
bool Debugger_v1::cmd_listRooms(int argc, const char **argv) {
|
||||
for (int i = 0; i < _vm->_roomTableSize; i++) {
|
||||
DebugPrintf("%-3i: %-10s", i, _vm->_roomFilenameTable[_vm->_roomTable[i].nameIndex]);
|
||||
if (!(i % 8))
|
||||
|
@ -104,7 +105,7 @@ bool Debugger::cmd_listRooms(int argc, const char **argv) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Debugger::cmd_listFlags(int argc, const char **argv) {
|
||||
bool Debugger_v1::cmd_listFlags(int argc, const char **argv) {
|
||||
for (int i = 0; i < (int)sizeof(_vm->_flagsTable)*8; i++) {
|
||||
DebugPrintf("(%-3i): %-5i", i, _vm->queryGameFlag(i));
|
||||
if (!(i % 10))
|
||||
|
@ -114,7 +115,7 @@ bool Debugger::cmd_listFlags(int argc, const char **argv) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Debugger::cmd_toggleFlag(int argc, const char **argv) {
|
||||
bool Debugger_v1::cmd_toggleFlag(int argc, const char **argv) {
|
||||
if (argc > 1) {
|
||||
uint flag = atoi(argv[1]);
|
||||
if (_vm->queryGameFlag(flag))
|
||||
|
@ -129,7 +130,7 @@ bool Debugger::cmd_toggleFlag(int argc, const char **argv) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Debugger::cmd_queryFlag(int argc, const char **argv) {
|
||||
bool Debugger_v1::cmd_queryFlag(int argc, const char **argv) {
|
||||
if (argc > 1) {
|
||||
uint flag = atoi(argv[1]);
|
||||
DebugPrintf("Flag %i is %i\n", flag, _vm->queryGameFlag(flag));
|
||||
|
@ -140,19 +141,19 @@ bool Debugger::cmd_queryFlag(int argc, const char **argv) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Debugger::cmd_listTimers(int argc, const char **argv) {
|
||||
for (int i = 0; i < ARRAYSIZE(_vm->_timers); i++)
|
||||
DebugPrintf("Timer %-2i: Active: %-3s Countdown: %-6i\n", i, _vm->_timers[i].active ? "Yes" : "No", _vm->_timers[i].countdown);
|
||||
bool Debugger_v1::cmd_listTimers(int argc, const char **argv) {
|
||||
for (int i = 0; i < _vm->timer()->count(); i++)
|
||||
DebugPrintf("Timer %-2i: Active: %-3s Countdown: %-6i\n", i, _vm->timer()->isEnabled(i) ? "Yes" : "No", _vm->timer()->getDelay(i));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Debugger::cmd_setTimerCountdown(int argc, const char **argv) {
|
||||
bool Debugger_v1::cmd_setTimerCountdown(int argc, const char **argv) {
|
||||
if (argc > 2) {
|
||||
uint timer = atoi(argv[1]);
|
||||
uint countdown = atoi(argv[2]);
|
||||
_vm->setTimerCountdown(timer, countdown);
|
||||
DebugPrintf("Timer %i now has countdown %i\n", timer, _vm->_timers[timer].countdown);
|
||||
_vm->timer()->setCountdown(timer, countdown);
|
||||
DebugPrintf("Timer %i now has countdown %i\n", timer, _vm->timer()->getDelay(timer));
|
||||
} else {
|
||||
DebugPrintf("Syntax: settimercountdown <timer> <countdown>\n");
|
||||
}
|
||||
|
@ -160,7 +161,7 @@ bool Debugger::cmd_setTimerCountdown(int argc, const char **argv) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Debugger::cmd_giveItem(int argc, const char **argv) {
|
||||
bool Debugger_v1::cmd_giveItem(int argc, const char **argv) {
|
||||
if (argc == 2) {
|
||||
int item = atoi(argv[1]);
|
||||
|
||||
|
|
|
@ -31,14 +31,21 @@
|
|||
namespace Kyra {
|
||||
|
||||
class KyraEngine;
|
||||
class KyraEngine_v1;
|
||||
|
||||
class Debugger : public GUI::Debugger {
|
||||
public:
|
||||
Debugger(KyraEngine *vm);
|
||||
Debugger(KyraEngine *vm) {}
|
||||
virtual ~Debugger() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ
|
||||
};
|
||||
|
||||
class Debugger_v1 : public Debugger {
|
||||
public:
|
||||
Debugger_v1(KyraEngine_v1 *vm);
|
||||
virtual ~Debugger_v1() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ
|
||||
|
||||
protected:
|
||||
KyraEngine *_vm;
|
||||
KyraEngine_v1 *_vm;
|
||||
|
||||
virtual void preEnter();
|
||||
virtual void postEnter();
|
||||
|
|
|
@ -73,6 +73,8 @@ const KYRAGameDescription adGameDescs[] = {
|
|||
{ { "kyra1", "CD", AD_ENTRY1("GEMCUT.PAK", "230f54e6afc007ab4117159181a1c722"), Common::DE_DEU, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, KYRA1_CD_FLAGS },
|
||||
{ { "kyra1", "CD", AD_ENTRY1("GEMCUT.PAK", "b037c41768b652a040360ffa3556fd2a"), Common::FR_FRA, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, KYRA1_CD_FLAGS },
|
||||
|
||||
{ { "kyra1", "CD", AD_ENTRY1("GEMCUT.PAK", "d8327fc4b7a72b23c900fa13aef4093a"), Common::IT_ITA, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, KYRA1_CD_FLAGS }, // italian fan translation see fr#1727941 "KYRA: add Italian CD Version to kyra.dat"
|
||||
|
||||
{ { "kyra1", "Demo", AD_ENTRY1("DEMO1.WSA", "fb722947d94897512b13b50cc84fd648"), Common::EN_ANY, Common::kPlatformPC, Common::ADGF_DEMO }, KYRA1_DEMO_FLAGS },
|
||||
|
||||
{ { "kyra2", 0, AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"), Common::EN_ANY, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, KYRA2_CD_FLAGS }, // CD version
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "kyra/kyra.h"
|
||||
#include "kyra/kyra_v1.h"
|
||||
#include "kyra/screen.h"
|
||||
#include "kyra/script.h"
|
||||
#include "kyra/text.h"
|
||||
#include "kyra/animator.h"
|
||||
#include "kyra/animator_v1.h"
|
||||
#include "kyra/sound.h"
|
||||
|
||||
#include "common/config-manager.h"
|
||||
|
@ -37,14 +37,14 @@
|
|||
|
||||
namespace Kyra {
|
||||
|
||||
void KyraEngine::registerDefaultSettings() {
|
||||
void KyraEngine_v1::registerDefaultSettings() {
|
||||
// Most settings already have sensible defaults. This one, however, is
|
||||
// specific to the Kyra engine.
|
||||
ConfMan.registerDefault("walkspeed", 2);
|
||||
ConfMan.registerDefault("cdaudio", _flags.platform == Common::kPlatformFMTowns);
|
||||
}
|
||||
|
||||
void KyraEngine::readSettings() {
|
||||
void KyraEngine_v1::readSettings() {
|
||||
int talkspeed = ConfMan.getInt("talkspeed");
|
||||
|
||||
// The default talk speed is 60. This should be mapped to "Normal".
|
||||
|
@ -78,7 +78,7 @@ void KyraEngine::readSettings() {
|
|||
setWalkspeed(_configWalkspeed);
|
||||
}
|
||||
|
||||
void KyraEngine::writeSettings() {
|
||||
void KyraEngine_v1::writeSettings() {
|
||||
bool speechMute, subtitles;
|
||||
int talkspeed;
|
||||
|
||||
|
@ -130,14 +130,14 @@ void KyraEngine::writeSettings() {
|
|||
ConfMan.flushToDisk();
|
||||
}
|
||||
|
||||
void KyraEngine::initMainButtonList() {
|
||||
void KyraEngine_v1::initMainButtonList() {
|
||||
_haveScrollButtons = false;
|
||||
_buttonList = &_buttonData[0];
|
||||
for (int i = 0; _buttonDataListPtr[i]; ++i)
|
||||
_buttonList = initButton(_buttonList, _buttonDataListPtr[i]);
|
||||
}
|
||||
|
||||
Button *KyraEngine::initButton(Button *list, Button *newButton) {
|
||||
Button *KyraEngine_v1::initButton(Button *list, Button *newButton) {
|
||||
if (!newButton)
|
||||
return list;
|
||||
if (!list)
|
||||
|
@ -154,7 +154,7 @@ Button *KyraEngine::initButton(Button *list, Button *newButton) {
|
|||
return list;
|
||||
}
|
||||
|
||||
int KyraEngine::buttonInventoryCallback(Button *caller) {
|
||||
int KyraEngine_v1::buttonInventoryCallback(Button *caller) {
|
||||
int itemOffset = caller->specialValue - 2;
|
||||
uint8 inventoryItem = _currentCharacter->inventoryItems[itemOffset];
|
||||
if (_itemInHand == -1) {
|
||||
|
@ -198,7 +198,7 @@ int KyraEngine::buttonInventoryCallback(Button *caller) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::buttonAmuletCallback(Button *caller) {
|
||||
int KyraEngine_v1::buttonAmuletCallback(Button *caller) {
|
||||
if (!(_deathHandler & 8))
|
||||
return 1;
|
||||
int jewel = caller->specialValue - 0x14;
|
||||
|
@ -294,7 +294,7 @@ int KyraEngine::buttonAmuletCallback(Button *caller) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
void KyraEngine::processButtonList(Button *list) {
|
||||
void KyraEngine_v1::processButtonList(Button *list) {
|
||||
if (_haveScrollButtons) {
|
||||
if (_mouseWheel < 0)
|
||||
gui_scrollUp(&_scrollUpButton);
|
||||
|
@ -367,7 +367,7 @@ void KyraEngine::processButtonList(Button *list) {
|
|||
}
|
||||
}
|
||||
|
||||
void KyraEngine::processButton(Button *button) {
|
||||
void KyraEngine_v1::processButton(Button *button) {
|
||||
if (!button)
|
||||
return;
|
||||
|
||||
|
@ -411,7 +411,7 @@ void KyraEngine::processButton(Button *button) {
|
|||
(this->*callback)(button);
|
||||
}
|
||||
|
||||
void KyraEngine::processAllMenuButtons() {
|
||||
void KyraEngine_v1::processAllMenuButtons() {
|
||||
if (!_menuButtonList)
|
||||
return;
|
||||
|
||||
|
@ -425,7 +425,7 @@ void KyraEngine::processAllMenuButtons() {
|
|||
return;
|
||||
}
|
||||
|
||||
void KyraEngine::processMenuButton(Button *button) {
|
||||
void KyraEngine_v1::processMenuButton(Button *button) {
|
||||
if (!_displayMenu)
|
||||
return;
|
||||
|
||||
|
@ -449,7 +449,7 @@ void KyraEngine::processMenuButton(Button *button) {
|
|||
processButton(button);
|
||||
}
|
||||
|
||||
int KyraEngine::drawBoxCallback(Button *button) {
|
||||
int KyraEngine_v1::drawBoxCallback(Button *button) {
|
||||
if (!_displayMenu)
|
||||
return 0;
|
||||
|
||||
|
@ -460,7 +460,7 @@ int KyraEngine::drawBoxCallback(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::drawShadedBoxCallback(Button *button) {
|
||||
int KyraEngine_v1::drawShadedBoxCallback(Button *button) {
|
||||
if (!_displayMenu)
|
||||
return 0;
|
||||
|
||||
|
@ -471,7 +471,7 @@ int KyraEngine::drawShadedBoxCallback(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void KyraEngine::setGUILabels() {
|
||||
void KyraEngine_v1::setGUILabels() {
|
||||
int offset = 0;
|
||||
int offsetOptions = 0;
|
||||
int offsetMainMenu = 0;
|
||||
|
@ -485,7 +485,7 @@ void KyraEngine::setGUILabels() {
|
|||
offset = 52;
|
||||
else if (_flags.lang == Common::DE_DEU)
|
||||
offset = 30;
|
||||
else if (_flags.lang == Common::FR_FRA)
|
||||
else if (_flags.lang == Common::FR_FRA || _flags.lang == Common::IT_ITA)
|
||||
offset = 6;
|
||||
offsetOn = offsetMainMenu = offsetOptions = offset;
|
||||
walkspeedGarbageOffset = 48;
|
||||
|
@ -561,7 +561,7 @@ void KyraEngine::setGUILabels() {
|
|||
_onCDString = _guiStrings[21];
|
||||
}
|
||||
|
||||
int KyraEngine::buttonMenuCallback(Button *caller) {
|
||||
int KyraEngine_v1::buttonMenuCallback(Button *caller) {
|
||||
_displayMenu = true;
|
||||
|
||||
assert(_guiStrings);
|
||||
|
@ -584,9 +584,9 @@ int KyraEngine::buttonMenuCallback(Button *caller) {
|
|||
_screen->setPaletteIndex(0xFE, 60, 60, 0);
|
||||
for (int i = 0; i < 6; i++) {
|
||||
_menuButtonData[i].process0 = _menuButtonData[i].process1 = _menuButtonData[i].process2 = 4;
|
||||
_menuButtonData[i].process0PtrCallback = &KyraEngine::drawShadedBoxCallback;
|
||||
_menuButtonData[i].process1PtrCallback = &KyraEngine::drawBoxCallback;
|
||||
_menuButtonData[i].process2PtrCallback = &KyraEngine::drawShadedBoxCallback;
|
||||
_menuButtonData[i].process0PtrCallback = &KyraEngine_v1::drawShadedBoxCallback;
|
||||
_menuButtonData[i].process1PtrCallback = &KyraEngine_v1::drawBoxCallback;
|
||||
_menuButtonData[i].process2PtrCallback = &KyraEngine_v1::drawShadedBoxCallback;
|
||||
}
|
||||
|
||||
_screen->savePageToDisk("SEENPAGE.TMP", 0);
|
||||
|
@ -627,7 +627,7 @@ int KyraEngine::buttonMenuCallback(Button *caller) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void KyraEngine::initMenu(Menu &menu) {
|
||||
void KyraEngine_v1::initMenu(Menu &menu) {
|
||||
_menuButtonList = 0;
|
||||
|
||||
_screen->hideMouse();
|
||||
|
@ -707,14 +707,14 @@ void KyraEngine::initMenu(Menu &menu) {
|
|||
|
||||
_scrollUpButton.x = menu.scrollUpBtnX + menu.x;
|
||||
_scrollUpButton.y = menu.scrollUpBtnY + menu.y;
|
||||
_scrollUpButton.buttonCallback = &KyraEngine::gui_scrollUp;
|
||||
_scrollUpButton.buttonCallback = &KyraEngine_v1::gui_scrollUp;
|
||||
_scrollUpButton.nextButton = 0;
|
||||
_menuButtonList = initButton(_menuButtonList, &_scrollUpButton);
|
||||
processMenuButton(&_scrollUpButton);
|
||||
|
||||
_scrollDownButton.x = menu.scrollDownBtnX + menu.x;
|
||||
_scrollDownButton.y = menu.scrollDownBtnY + menu.y;
|
||||
_scrollDownButton.buttonCallback = &KyraEngine::gui_scrollDown;
|
||||
_scrollDownButton.buttonCallback = &KyraEngine_v1::gui_scrollDown;
|
||||
_scrollDownButton.nextButton = 0;
|
||||
_menuButtonList = initButton(_menuButtonList, &_scrollDownButton);
|
||||
processMenuButton(&_scrollDownButton);
|
||||
|
@ -726,7 +726,7 @@ void KyraEngine::initMenu(Menu &menu) {
|
|||
_screen->updateScreen();
|
||||
}
|
||||
|
||||
void KyraEngine::calcCoords(Menu &menu) {
|
||||
void KyraEngine_v1::calcCoords(Menu &menu) {
|
||||
assert(menu.nrOfItems < 7);
|
||||
|
||||
int widthBackup = _screen->_charWidth;
|
||||
|
@ -798,7 +798,7 @@ void KyraEngine::calcCoords(Menu &menu) {
|
|||
_screen->_charWidth = widthBackup;
|
||||
}
|
||||
|
||||
void KyraEngine::gui_getInput() {
|
||||
void KyraEngine_v1::gui_getInput() {
|
||||
Common::Event event;
|
||||
static uint32 lastScreenUpdate = 0;
|
||||
uint32 now = _system->getMillis();
|
||||
|
@ -841,22 +841,22 @@ void KyraEngine::gui_getInput() {
|
|||
_system->delayMillis(3);
|
||||
}
|
||||
|
||||
int KyraEngine::gui_resumeGame(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_resumeGame()");
|
||||
int KyraEngine_v1::gui_resumeGame(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_resumeGame()");
|
||||
processMenuButton(button);
|
||||
_displayMenu = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *KyraEngine::getSavegameFilename(int num) {
|
||||
const char *KyraEngine_v1::getSavegameFilename(int num) {
|
||||
static char saveLoadSlot[12];
|
||||
|
||||
sprintf(saveLoadSlot, "%s.%.3d", _targetName.c_str(), num);
|
||||
return saveLoadSlot;
|
||||
}
|
||||
|
||||
int KyraEngine::getNextSavegameSlot() {
|
||||
int KyraEngine_v1::getNextSavegameSlot() {
|
||||
Common::InSaveFile *in;
|
||||
|
||||
for (int i = 1; i < 1000; i++) {
|
||||
|
@ -869,7 +869,7 @@ int KyraEngine::getNextSavegameSlot() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void KyraEngine::setupSavegames(Menu &menu, int num) {
|
||||
void KyraEngine_v1::setupSavegames(Menu &menu, int num) {
|
||||
Common::InSaveFile *in;
|
||||
static char savenames[5][31];
|
||||
uint8 startSlot;
|
||||
|
@ -900,8 +900,8 @@ void KyraEngine::setupSavegames(Menu &menu, int num) {
|
|||
}
|
||||
}
|
||||
|
||||
int KyraEngine::gui_saveGameMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_saveGameMenu()");
|
||||
int KyraEngine_v1::gui_saveGameMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_saveGameMenu()");
|
||||
processMenuButton(button);
|
||||
_menu[2].item[5].enabled = true;
|
||||
|
||||
|
@ -911,7 +911,7 @@ int KyraEngine::gui_saveGameMenu(Button *button) {
|
|||
_menu[2].menuName = _guiStrings[8]; // Select a position to save to:
|
||||
_specialSavegameString = _guiStrings[9]; // [ EMPTY SLOT ]
|
||||
for (int i = 0; i < 5; i++)
|
||||
_menu[2].item[i].callback = &KyraEngine::gui_saveGame;
|
||||
_menu[2].item[i].callback = &KyraEngine_v1::gui_saveGame;
|
||||
|
||||
_savegameOffset = 0;
|
||||
setupSavegames(_menu[2], 5);
|
||||
|
@ -940,8 +940,8 @@ int KyraEngine::gui_saveGameMenu(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_loadGameMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_loadGameMenu()");
|
||||
int KyraEngine_v1::gui_loadGameMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_loadGameMenu()");
|
||||
if (_menuDirectlyToLoad) {
|
||||
_menu[2].item[5].enabled = false;
|
||||
} else {
|
||||
|
@ -955,7 +955,7 @@ int KyraEngine::gui_loadGameMenu(Button *button) {
|
|||
_specialSavegameString = _newGameString[0]; //[ START A NEW GAME ]
|
||||
_menu[2].menuName = _guiStrings[7]; // Which game would you like to reload?
|
||||
for (int i = 0; i < 5; i++)
|
||||
_menu[2].item[i].callback = &KyraEngine::gui_loadGame;
|
||||
_menu[2].item[i].callback = &KyraEngine_v1::gui_loadGame;
|
||||
|
||||
_savegameOffset = 0;
|
||||
setupSavegames(_menu[2], 5);
|
||||
|
@ -987,7 +987,7 @@ int KyraEngine::gui_loadGameMenu(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void KyraEngine::gui_redrawTextfield() {
|
||||
void KyraEngine_v1::gui_redrawTextfield() {
|
||||
_screen->fillRect(38, 91, 287, 102, 250);
|
||||
_text->printText(_savegameName, 38, 92, 253, 0, 0);
|
||||
|
||||
|
@ -999,7 +999,7 @@ void KyraEngine::gui_redrawTextfield() {
|
|||
_screen->updateScreen();
|
||||
}
|
||||
|
||||
void KyraEngine::gui_updateSavegameString() {
|
||||
void KyraEngine_v1::gui_updateSavegameString() {
|
||||
int length;
|
||||
|
||||
if (_keyPressed.keycode) {
|
||||
|
@ -1026,8 +1026,8 @@ void KyraEngine::gui_updateSavegameString() {
|
|||
_keyPressed.reset();
|
||||
}
|
||||
|
||||
int KyraEngine::gui_saveGame(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_saveGame()");
|
||||
int KyraEngine_v1::gui_saveGame(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_saveGame()");
|
||||
processMenuButton(button);
|
||||
_gameToLoad = button->specialValue;
|
||||
|
||||
|
@ -1074,16 +1074,16 @@ int KyraEngine::gui_saveGame(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_savegameConfirm(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_savegameConfirm()");
|
||||
int KyraEngine_v1::gui_savegameConfirm(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_savegameConfirm()");
|
||||
processMenuButton(button);
|
||||
_displaySubMenu = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_loadGame(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_loadGame()");
|
||||
int KyraEngine_v1::gui_loadGame(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_loadGame()");
|
||||
processMenuButton(button);
|
||||
_displaySubMenu = false;
|
||||
_gameToLoad = button->specialValue;
|
||||
|
@ -1091,8 +1091,8 @@ int KyraEngine::gui_loadGame(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_cancelSubMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_cancelLoadGameMenu()");
|
||||
int KyraEngine_v1::gui_cancelSubMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_cancelLoadGameMenu()");
|
||||
processMenuButton(button);
|
||||
_displaySubMenu = false;
|
||||
_cancelSubMenu = true;
|
||||
|
@ -1100,8 +1100,8 @@ int KyraEngine::gui_cancelSubMenu(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_quitPlaying(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_quitPlaying()");
|
||||
int KyraEngine_v1::gui_quitPlaying(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_quitPlaying()");
|
||||
processMenuButton(button);
|
||||
|
||||
if (gui_quitConfirm(_guiStrings[14])) { // Are you sure you want to quit playing?
|
||||
|
@ -1114,8 +1114,8 @@ int KyraEngine::gui_quitPlaying(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool KyraEngine::gui_quitConfirm(const char *str) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_quitConfirm()");
|
||||
bool KyraEngine_v1::gui_quitConfirm(const char *str) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_quitConfirm()");
|
||||
|
||||
_screen->loadPageFromDisk("SEENPAGE.TMP", 0);
|
||||
_screen->savePageToDisk("SEENPAGE.TMP", 0);
|
||||
|
@ -1139,8 +1139,8 @@ bool KyraEngine::gui_quitConfirm(const char *str) {
|
|||
return !_cancelSubMenu;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_quitConfirmYes(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_quitConfirmYes()");
|
||||
int KyraEngine_v1::gui_quitConfirmYes(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_quitConfirmYes()");
|
||||
processMenuButton(button);
|
||||
_displaySubMenu = false;
|
||||
_cancelSubMenu = false;
|
||||
|
@ -1148,8 +1148,8 @@ int KyraEngine::gui_quitConfirmYes(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_quitConfirmNo(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_quitConfirmNo()");
|
||||
int KyraEngine_v1::gui_quitConfirmNo(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_quitConfirmNo()");
|
||||
processMenuButton(button);
|
||||
_displaySubMenu = false;
|
||||
_cancelSubMenu = true;
|
||||
|
@ -1157,8 +1157,8 @@ int KyraEngine::gui_quitConfirmNo(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_gameControlsMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_gameControlsMenu()");
|
||||
int KyraEngine_v1::gui_gameControlsMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_gameControlsMenu()");
|
||||
|
||||
readSettings();
|
||||
|
||||
|
@ -1175,14 +1175,14 @@ int KyraEngine::gui_gameControlsMenu(Button *button) {
|
|||
}
|
||||
|
||||
_menu[5].item[3].labelString = _voiceTextString; //"Voice / Text "
|
||||
_menu[5].item[3].callback = &KyraEngine::gui_controlsChangeVoice;
|
||||
_menu[5].item[3].callback = &KyraEngine_v1::gui_controlsChangeVoice;
|
||||
|
||||
} else {
|
||||
//_menu[5].height = 136;
|
||||
//_menu[5].item[5].y = 110;
|
||||
_menu[5].item[4].enabled = 0;
|
||||
_menu[5].item[3].labelString = _textSpeedString; // "Text speed "
|
||||
_menu[5].item[3].callback = &KyraEngine::gui_controlsChangeText;
|
||||
_menu[5].item[3].callback = &KyraEngine_v1::gui_controlsChangeText;
|
||||
}
|
||||
|
||||
gui_setupControls(_menu[5]);
|
||||
|
@ -1208,8 +1208,8 @@ int KyraEngine::gui_gameControlsMenu(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void KyraEngine::gui_setupControls(Menu &menu) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_setupControls()");
|
||||
void KyraEngine_v1::gui_setupControls(Menu &menu) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_setupControls()");
|
||||
|
||||
switch (_configMusic) {
|
||||
case 0:
|
||||
|
@ -1299,8 +1299,8 @@ void KyraEngine::gui_setupControls(Menu &menu) {
|
|||
initMenu(menu);
|
||||
}
|
||||
|
||||
int KyraEngine::gui_controlsChangeMusic(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_controlsChangeMusic()");
|
||||
int KyraEngine_v1::gui_controlsChangeMusic(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_controlsChangeMusic()");
|
||||
processMenuButton(button);
|
||||
|
||||
_configMusic = ++_configMusic % (_flags.platform == Common::kPlatformFMTowns ? 3 : 2);
|
||||
|
@ -1308,8 +1308,8 @@ int KyraEngine::gui_controlsChangeMusic(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_controlsChangeSounds(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_controlsChangeSounds()");
|
||||
int KyraEngine_v1::gui_controlsChangeSounds(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_controlsChangeSounds()");
|
||||
processMenuButton(button);
|
||||
|
||||
_configSounds = !_configSounds;
|
||||
|
@ -1317,8 +1317,8 @@ int KyraEngine::gui_controlsChangeSounds(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_controlsChangeWalk(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_controlsChangeWalk()");
|
||||
int KyraEngine_v1::gui_controlsChangeWalk(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_controlsChangeWalk()");
|
||||
processMenuButton(button);
|
||||
|
||||
_configWalkspeed = ++_configWalkspeed % 5;
|
||||
|
@ -1327,8 +1327,8 @@ int KyraEngine::gui_controlsChangeWalk(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_controlsChangeText(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_controlsChangeText()");
|
||||
int KyraEngine_v1::gui_controlsChangeText(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_controlsChangeText()");
|
||||
processMenuButton(button);
|
||||
|
||||
_configTextspeed = ++_configTextspeed % 4;
|
||||
|
@ -1336,8 +1336,8 @@ int KyraEngine::gui_controlsChangeText(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_controlsChangeVoice(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_controlsChangeVoice()");
|
||||
int KyraEngine_v1::gui_controlsChangeVoice(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_controlsChangeVoice()");
|
||||
processMenuButton(button);
|
||||
|
||||
_configVoice = ++_configVoice % 3;
|
||||
|
@ -1345,14 +1345,14 @@ int KyraEngine::gui_controlsChangeVoice(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_controlsApply(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_controlsApply()");
|
||||
int KyraEngine_v1::gui_controlsApply(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_controlsApply()");
|
||||
writeSettings();
|
||||
return gui_cancelSubMenu(button);
|
||||
}
|
||||
|
||||
int KyraEngine::gui_scrollUp(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_scrollUp()");
|
||||
int KyraEngine_v1::gui_scrollUp(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_scrollUp()");
|
||||
processMenuButton(button);
|
||||
|
||||
if (_savegameOffset > 0) {
|
||||
|
@ -1363,8 +1363,8 @@ int KyraEngine::gui_scrollUp(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_scrollDown(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine::gui_scrollDown()");
|
||||
int KyraEngine_v1::gui_scrollDown(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_scrollDown()");
|
||||
processMenuButton(button);
|
||||
|
||||
_savegameOffset++;
|
||||
|
@ -1374,7 +1374,7 @@ int KyraEngine::gui_scrollDown(Button *button) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void KyraEngine::gui_processHighlights(Menu &menu) {
|
||||
void KyraEngine_v1::gui_processHighlights(Menu &menu) {
|
||||
int x1, y1, x2, y2;
|
||||
|
||||
Common::Point mouse = getMousePos();
|
||||
|
@ -1403,7 +1403,7 @@ void KyraEngine::gui_processHighlights(Menu &menu) {
|
|||
}
|
||||
}
|
||||
|
||||
void KyraEngine::gui_redrawText(Menu menu) {
|
||||
void KyraEngine_v1::gui_redrawText(Menu menu) {
|
||||
int textX;
|
||||
int i = menu.highlightedItem;
|
||||
|
||||
|
@ -1422,7 +1422,7 @@ void KyraEngine::gui_redrawText(Menu menu) {
|
|||
_text->printText(menu.item[i].itemString, textX, textY, menu.item[i].textColor, 0, 0);
|
||||
}
|
||||
|
||||
void KyraEngine::gui_redrawHighlight(Menu menu) {
|
||||
void KyraEngine_v1::gui_redrawHighlight(Menu menu) {
|
||||
int textX;
|
||||
int i = menu.highlightedItem;
|
||||
|
||||
|
@ -1441,7 +1441,7 @@ void KyraEngine::gui_redrawHighlight(Menu menu) {
|
|||
_text->printText(menu.item[i].itemString, textX, textY, menu.item[i].highlightColor, 0, 0);
|
||||
}
|
||||
|
||||
void KyraEngine::gui_fadePalette() {
|
||||
void KyraEngine_v1::gui_fadePalette() {
|
||||
if (_flags.platform == Common::kPlatformAmiga)
|
||||
return;
|
||||
|
||||
|
@ -1461,7 +1461,7 @@ void KyraEngine::gui_fadePalette() {
|
|||
_screen->fadePalette(_screen->_currentPalette, 2);
|
||||
}
|
||||
|
||||
void KyraEngine::gui_restorePalette() {
|
||||
void KyraEngine_v1::gui_restorePalette() {
|
||||
if (_flags.platform == Common::kPlatformAmiga)
|
||||
return;
|
||||
|
||||
|
@ -1471,169 +1471,35 @@ void KyraEngine::gui_restorePalette() {
|
|||
|
||||
#pragma mark -
|
||||
|
||||
// Kyra 2 and 3 main menu
|
||||
void KyraEngine_v1::drawAmulet() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::drawAmulet()");
|
||||
static const int16 amuletTable1[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x150, 0x155, 0x15A, 0x15F, 0x164, 0x145, -1};
|
||||
static const int16 amuletTable3[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x14F, 0x154, 0x159, 0x15E, 0x163, 0x144, -1};
|
||||
static const int16 amuletTable2[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x152, 0x157, 0x15C, 0x161, 0x166, 0x147, -1};
|
||||
static const int16 amuletTable4[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x151, 0x156, 0x15B, 0x160, 0x165, 0x146, -1};
|
||||
|
||||
resetGameFlag(0xF1);
|
||||
_screen->hideMouse();
|
||||
|
||||
int i = 0;
|
||||
while (amuletTable1[i] != -1) {
|
||||
if (queryGameFlag(87))
|
||||
_screen->drawShape(0, _shapes[amuletTable1[i]], _amuletX[0], _amuletY[0], 0, 0);
|
||||
|
||||
if (queryGameFlag(89))
|
||||
_screen->drawShape(0, _shapes[amuletTable2[i]], _amuletX[1], _amuletY[1], 0, 0);
|
||||
|
||||
if (queryGameFlag(86))
|
||||
_screen->drawShape(0, _shapes[amuletTable3[i]], _amuletX[2], _amuletY[2], 0, 0);
|
||||
|
||||
if (queryGameFlag(88))
|
||||
_screen->drawShape(0, _shapes[amuletTable4[i]], _amuletX[3], _amuletY[3], 0, 0);
|
||||
|
||||
void KyraEngine::gui_updateMainMenuAnimation() {
|
||||
_screen->updateScreen();
|
||||
}
|
||||
|
||||
bool KyraEngine::gui_mainMenuGetInput() {
|
||||
Common::Event event;
|
||||
|
||||
while (_eventMan->pollEvent(event)) {
|
||||
switch (event.type) {
|
||||
case Common::EVENT_QUIT:
|
||||
quitGame();
|
||||
break;
|
||||
case Common::EVENT_LBUTTONUP:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
delayWithTicks(3);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int KyraEngine::gui_handleMainMenu() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::gui_handleMainMenu()");
|
||||
int command = -1;
|
||||
|
||||
uint8 colorMap[16];
|
||||
memset(colorMap, 0, sizeof(colorMap));
|
||||
_screen->setTextColorMap(colorMap);
|
||||
|
||||
const char * const *strings = &_mainMenuStrings[_lang << 2];
|
||||
Screen::FontId oldFont = _screen->setFont(Screen::FID_8_FNT);
|
||||
int charWidthBackUp = _screen->_charWidth;
|
||||
|
||||
_screen->_charWidth = -2;
|
||||
_screen->setScreenDim(3);
|
||||
int backUpX = _screen->_curDim->sx;
|
||||
int backUpY = _screen->_curDim->sy;
|
||||
int backUpWidth = _screen->_curDim->w;
|
||||
int backUpHeight = _screen->_curDim->h;
|
||||
_screen->copyRegion(backUpX, backUpY, backUpX, backUpY, backUpWidth, backUpHeight, 0, 3);
|
||||
|
||||
int x = _screen->_curDim->sx << 3;
|
||||
int y = _screen->_curDim->sy;
|
||||
int width = _screen->_curDim->w << 3;
|
||||
int height = _screen->_curDim->h;
|
||||
|
||||
gui_drawMainBox(x, y, width, height, 1);
|
||||
gui_drawMainBox(x + 1, y + 1, width - 2, height - 2, 0);
|
||||
|
||||
int selected = 0;
|
||||
|
||||
gui_drawMainMenu(strings, selected);
|
||||
|
||||
_screen->showMouse();
|
||||
|
||||
int fh = _screen->getFontHeight();
|
||||
int textPos = ((_screen->_curDim->w >> 1) + _screen->_curDim->sx) << 3;
|
||||
|
||||
Common::Rect menuRect(x + 16, y + 4, x + width - 16, y + 4 + fh * 4);
|
||||
|
||||
while (!_quitFlag) {
|
||||
gui_updateMainMenuAnimation();
|
||||
bool mousePressed = gui_mainMenuGetInput();
|
||||
|
||||
Common::Point mouse = getMousePos();
|
||||
if (menuRect.contains(mouse)) {
|
||||
int item = (mouse.y - menuRect.top) / fh;
|
||||
|
||||
if (item != selected) {
|
||||
gui_printString(strings[selected], textPos, menuRect.top + selected * fh, 0x80, 0, 5);
|
||||
gui_printString(strings[item], textPos, menuRect.top + item * fh, 0xFF, 0, 5);
|
||||
|
||||
selected = item;
|
||||
}
|
||||
|
||||
if (mousePressed) {
|
||||
// TODO: Flash the text
|
||||
command = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
_system->delayMillis(10);
|
||||
}
|
||||
|
||||
if (_quitFlag)
|
||||
command = -1;
|
||||
|
||||
_screen->copyRegion(backUpX, backUpY, backUpX, backUpY, backUpWidth, backUpHeight, 3, 0);
|
||||
_screen->_charWidth = charWidthBackUp;
|
||||
_screen->setFont(oldFont);
|
||||
|
||||
return command;
|
||||
}
|
||||
|
||||
void KyraEngine::gui_drawMainMenu(const char * const *strings, int select) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::gui_drawMainMenu(%p)", (const void*)strings);
|
||||
static const uint16 menuTable[] = { 0x01, 0x04, 0x0C, 0x04, 0x00, 0x80, 0xFF, 0x00, 0x01, 0x02, 0x03 };
|
||||
|
||||
int top = _screen->_curDim->sy;
|
||||
top += menuTable[1];
|
||||
|
||||
for (int i = 0; i < menuTable[3]; ++i) {
|
||||
int curY = top + i * _screen->getFontHeight();
|
||||
int color = (i == select) ? menuTable[6] : menuTable[5];
|
||||
gui_printString(strings[i], ((_screen->_curDim->w >> 1) + _screen->_curDim->sx) << 3, curY, color, 0, 5);
|
||||
}
|
||||
}
|
||||
|
||||
void KyraEngine::gui_drawMainBox(int x, int y, int w, int h, int fill) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::gui_drawMainBox(%d, %d, %d, %d, %d)", x, y, w, h, fill);
|
||||
static const uint8 kyra3ColorTable[] = { 0x16, 0x19, 0x1A, 0x16 };
|
||||
static const uint8 kyra2ColorTable[] = { 0x0, 0x19, 0x28, 0xc8 };
|
||||
|
||||
const uint8 *colorTable;
|
||||
if (_flags.gameID == GI_KYRA3)
|
||||
colorTable = kyra3ColorTable;
|
||||
else
|
||||
colorTable = kyra2ColorTable;
|
||||
|
||||
--w; --h;
|
||||
|
||||
if (fill)
|
||||
_screen->fillRect(x, y, x+w, y+h, colorTable[0]);
|
||||
|
||||
_screen->drawClippedLine(x, y+h, x+w, y+h, colorTable[1]);
|
||||
_screen->drawClippedLine(x+w, y, x+w, y+h, colorTable[1]);
|
||||
_screen->drawClippedLine(x, y, x+w, y, colorTable[2]);
|
||||
_screen->drawClippedLine(x, y, x, y+h, colorTable[2]);
|
||||
|
||||
_screen->setPagePixel(_screen->_curPage, x, y+h, colorTable[3]);
|
||||
_screen->setPagePixel(_screen->_curPage, x+w, y, colorTable[3]);
|
||||
}
|
||||
|
||||
void KyraEngine::gui_printString(const char *format, int x, int y, int col1, int col2, int flags, ...) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::gui_printString('%s', %d, %d, %d, %d, %d, ...)", format, x, y, col1, col2, flags);
|
||||
if (!format)
|
||||
return;
|
||||
|
||||
char string[512];
|
||||
va_list vaList;
|
||||
va_start(vaList, flags);
|
||||
vsprintf(string, format, vaList);
|
||||
va_end(vaList);
|
||||
|
||||
if (flags & 1)
|
||||
x -= _screen->getTextWidth(string) >> 1;
|
||||
|
||||
if (flags & 2)
|
||||
x -= _screen->getTextWidth(string);
|
||||
|
||||
if (flags & 4) {
|
||||
_screen->printText(string, x - 1, y, 240, col2);
|
||||
_screen->printText(string, x, y + 1, 240, col2);
|
||||
}
|
||||
|
||||
if (flags & 8) {
|
||||
_screen->printText(string, x - 1, y, 227, col2);
|
||||
_screen->printText(string, x, y + 1, 227, col2);
|
||||
}
|
||||
|
||||
_screen->printText(string, x, y, col1, col2);
|
||||
}
|
||||
|
||||
} // end of namespace Kyra
|
198
engines/kyra/gui_v2.cpp
Normal file
198
engines/kyra/gui_v2.cpp
Normal file
|
@ -0,0 +1,198 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "kyra/kyra.h"
|
||||
#include "kyra/kyra_v2.h"
|
||||
#include "kyra/screen.h"
|
||||
|
||||
namespace Kyra {
|
||||
|
||||
void KyraEngine_v2::gui_updateMainMenuAnimation() {
|
||||
_screen->updateScreen();
|
||||
}
|
||||
|
||||
bool KyraEngine_v2::gui_mainMenuGetInput() {
|
||||
Common::Event event;
|
||||
|
||||
while (_eventMan->pollEvent(event)) {
|
||||
switch (event.type) {
|
||||
case Common::EVENT_QUIT:
|
||||
quitGame();
|
||||
break;
|
||||
case Common::EVENT_LBUTTONUP:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int KyraEngine_v2::gui_handleMainMenu() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::gui_handleMainMenu()");
|
||||
int command = -1;
|
||||
|
||||
uint8 colorMap[16];
|
||||
memset(colorMap, 0, sizeof(colorMap));
|
||||
_screen->setTextColorMap(colorMap);
|
||||
|
||||
const char * const *strings = &_mainMenuStrings[_lang << 2];
|
||||
Screen::FontId oldFont = _screen->setFont(Screen::FID_8_FNT);
|
||||
int charWidthBackUp = _screen->_charWidth;
|
||||
|
||||
_screen->_charWidth = -2;
|
||||
if (_flags.gameID == GI_KYRA2)
|
||||
_screen->setScreenDim(11);
|
||||
else
|
||||
_screen->setScreenDim(3);
|
||||
int backUpX = _screen->_curDim->sx;
|
||||
int backUpY = _screen->_curDim->sy;
|
||||
int backUpWidth = _screen->_curDim->w;
|
||||
int backUpHeight = _screen->_curDim->h;
|
||||
_screen->copyRegion(backUpX, backUpY, backUpX, backUpY, backUpWidth, backUpHeight, 0, 3);
|
||||
|
||||
int x = _screen->_curDim->sx << 3;
|
||||
int y = _screen->_curDim->sy;
|
||||
int width = _screen->_curDim->w << 3;
|
||||
int height = _screen->_curDim->h;
|
||||
|
||||
gui_drawMainBox(x, y, width, height, 1);
|
||||
gui_drawMainBox(x + 1, y + 1, width - 2, height - 2, 0);
|
||||
|
||||
int selected = 0;
|
||||
|
||||
gui_drawMainMenu(strings, selected);
|
||||
|
||||
_screen->showMouse();
|
||||
|
||||
int fh = _screen->getFontHeight();
|
||||
int textPos = ((_screen->_curDim->w >> 1) + _screen->_curDim->sx) << 3;
|
||||
|
||||
Common::Rect menuRect(x + 16, y + 4, x + width - 16, y + 4 + fh * 4);
|
||||
|
||||
while (!_quitFlag) {
|
||||
gui_updateMainMenuAnimation();
|
||||
bool mousePressed = gui_mainMenuGetInput();
|
||||
|
||||
Common::Point mouse = getMousePos();
|
||||
if (menuRect.contains(mouse)) {
|
||||
int item = (mouse.y - menuRect.top) / fh;
|
||||
|
||||
if (item != selected) {
|
||||
gui_printString(strings[selected], textPos, menuRect.top + selected * fh, 0x80, 0, 5);
|
||||
gui_printString(strings[item], textPos, menuRect.top + item * fh, 0xFF, 0, 5);
|
||||
|
||||
selected = item;
|
||||
}
|
||||
|
||||
if (mousePressed) {
|
||||
// TODO: Flash the text
|
||||
command = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
_system->delayMillis(10);
|
||||
}
|
||||
|
||||
if (_quitFlag)
|
||||
command = -1;
|
||||
|
||||
_screen->copyRegion(backUpX, backUpY, backUpX, backUpY, backUpWidth, backUpHeight, 3, 0);
|
||||
_screen->_charWidth = charWidthBackUp;
|
||||
_screen->setFont(oldFont);
|
||||
|
||||
return command;
|
||||
}
|
||||
|
||||
void KyraEngine_v2::gui_drawMainMenu(const char * const *strings, int select) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::gui_drawMainMenu(%p)", (const void*)strings);
|
||||
static const uint16 menuTable[] = { 0x01, 0x04, 0x0C, 0x04, 0x00, 0x80, 0xFF, 0x00, 0x01, 0x02, 0x03 };
|
||||
|
||||
int top = _screen->_curDim->sy;
|
||||
top += menuTable[1];
|
||||
|
||||
for (int i = 0; i < menuTable[3]; ++i) {
|
||||
int curY = top + i * _screen->getFontHeight();
|
||||
int color = (i == select) ? menuTable[6] : menuTable[5];
|
||||
gui_printString(strings[i], ((_screen->_curDim->w >> 1) + _screen->_curDim->sx) << 3, curY, color, 0, 5);
|
||||
}
|
||||
}
|
||||
|
||||
void KyraEngine_v2::gui_drawMainBox(int x, int y, int w, int h, int fill) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::gui_drawMainBox(%d, %d, %d, %d, %d)", x, y, w, h, fill);
|
||||
static const uint8 kyra3ColorTable[] = { 0x16, 0x19, 0x1A, 0x16 };
|
||||
static const uint8 kyra2ColorTable[] = { 0x0, 0x19, 0x28, 0xc8 };
|
||||
|
||||
const uint8 *colorTable;
|
||||
if (_flags.gameID == GI_KYRA3)
|
||||
colorTable = kyra3ColorTable;
|
||||
else
|
||||
colorTable = kyra2ColorTable;
|
||||
|
||||
--w; --h;
|
||||
|
||||
if (fill)
|
||||
_screen->fillRect(x, y, x+w, y+h, colorTable[0]);
|
||||
|
||||
_screen->drawClippedLine(x, y+h, x+w, y+h, colorTable[1]);
|
||||
_screen->drawClippedLine(x+w, y, x+w, y+h, colorTable[1]);
|
||||
_screen->drawClippedLine(x, y, x+w, y, colorTable[2]);
|
||||
_screen->drawClippedLine(x, y, x, y+h, colorTable[2]);
|
||||
|
||||
_screen->setPagePixel(_screen->_curPage, x, y+h, colorTable[3]);
|
||||
_screen->setPagePixel(_screen->_curPage, x+w, y, colorTable[3]);
|
||||
}
|
||||
|
||||
void KyraEngine_v2::gui_printString(const char *format, int x, int y, int col1, int col2, int flags, ...) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::gui_printString('%s', %d, %d, %d, %d, %d, ...)", format, x, y, col1, col2, flags);
|
||||
if (!format)
|
||||
return;
|
||||
|
||||
char string[512];
|
||||
va_list vaList;
|
||||
va_start(vaList, flags);
|
||||
vsprintf(string, format, vaList);
|
||||
va_end(vaList);
|
||||
|
||||
if (flags & 1)
|
||||
x -= _screen->getTextWidth(string) >> 1;
|
||||
|
||||
if (flags & 2)
|
||||
x -= _screen->getTextWidth(string);
|
||||
|
||||
if (flags & 4) {
|
||||
_screen->printText(string, x - 1, y, 240, col2);
|
||||
_screen->printText(string, x, y + 1, 240, col2);
|
||||
}
|
||||
|
||||
if (flags & 8) {
|
||||
_screen->printText(string, x - 1, y, 227, col2);
|
||||
_screen->printText(string, x, y + 1, 227, col2);
|
||||
}
|
||||
|
||||
_screen->printText(string, x, y, col1, col2);
|
||||
}
|
||||
|
||||
} // end of namespace Kyra
|
|
@ -23,14 +23,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "kyra/kyra.h"
|
||||
#include "kyra/kyra_v1.h"
|
||||
#include "kyra/seqplayer.h"
|
||||
#include "kyra/screen.h"
|
||||
#include "kyra/resource.h"
|
||||
#include "kyra/sound.h"
|
||||
#include "kyra/sprites.h"
|
||||
#include "kyra/wsamovie.h"
|
||||
#include "kyra/animator.h"
|
||||
#include "kyra/animator_v1.h"
|
||||
#include "kyra/text.h"
|
||||
|
||||
#include "common/system.h"
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
namespace Kyra {
|
||||
|
||||
int KyraEngine::findDuplicateItemShape(int shape) {
|
||||
int KyraEngine_v1::findDuplicateItemShape(int shape) {
|
||||
static uint8 dupTable[] = {
|
||||
0x48, 0x46, 0x49, 0x47, 0x4a, 0x46, 0x4b, 0x47,
|
||||
0x4c, 0x46, 0x4d, 0x47, 0x5b, 0x5a, 0x5c, 0x5a,
|
||||
|
@ -55,8 +55,8 @@ int KyraEngine::findDuplicateItemShape(int shape) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
void KyraEngine::addToNoDropRects(int x, int y, int w, int h) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::addToNoDropRects(%d, %d, %d, %d)", x, y, w, h);
|
||||
void KyraEngine_v1::addToNoDropRects(int x, int y, int w, int h) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::addToNoDropRects(%d, %d, %d, %d)", x, y, w, h);
|
||||
for (int rect = 0; rect < 11; ++rect) {
|
||||
if (_noDropRects[rect].x == -1) {
|
||||
_noDropRects[rect].x = x;
|
||||
|
@ -68,13 +68,13 @@ void KyraEngine::addToNoDropRects(int x, int y, int w, int h) {
|
|||
}
|
||||
}
|
||||
|
||||
void KyraEngine::clearNoDropRects() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::clearNoDropRects()");
|
||||
void KyraEngine_v1::clearNoDropRects() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::clearNoDropRects()");
|
||||
memset(_noDropRects, -1, sizeof(_noDropRects));
|
||||
}
|
||||
|
||||
byte KyraEngine::findFreeItemInScene(int scene) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::findFreeItemInScene(%d)", scene);
|
||||
byte KyraEngine_v1::findFreeItemInScene(int scene) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::findFreeItemInScene(%d)", scene);
|
||||
assert(scene < _roomTableSize);
|
||||
Room *room = &_roomTable[scene];
|
||||
for (int i = 0; i < 12; ++i) {
|
||||
|
@ -84,8 +84,8 @@ byte KyraEngine::findFreeItemInScene(int scene) {
|
|||
return 0xFF;
|
||||
}
|
||||
|
||||
byte KyraEngine::findItemAtPos(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::findItemAtPos(%d, %d)", x, y);
|
||||
byte KyraEngine_v1::findItemAtPos(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::findItemAtPos(%d, %d)", x, y);
|
||||
assert(_currentCharacter->sceneId < _roomTableSize);
|
||||
const uint8 *itemsTable = _roomTable[_currentCharacter->sceneId].itemsTable;
|
||||
const uint16 *xposOffset = _roomTable[_currentCharacter->sceneId].itemsXPos;
|
||||
|
@ -120,8 +120,8 @@ byte KyraEngine::findItemAtPos(int x, int y) {
|
|||
return returnValue;
|
||||
}
|
||||
|
||||
void KyraEngine::placeItemInGenericMapScene(int item, int index) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::placeItemInGenericMapScene(%d, %d)", item, index);
|
||||
void KyraEngine_v1::placeItemInGenericMapScene(int item, int index) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::placeItemInGenericMapScene(%d, %d)", item, index);
|
||||
static const uint16 itemMapSceneMinTable[] = {
|
||||
0x0000, 0x0011, 0x006D, 0x0025, 0x00C7, 0x0000
|
||||
};
|
||||
|
@ -175,32 +175,32 @@ void KyraEngine::placeItemInGenericMapScene(int item, int index) {
|
|||
}
|
||||
}
|
||||
|
||||
void KyraEngine::createMouseItem(int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::createMouseItem(%d)", item);
|
||||
void KyraEngine_v1::createMouseItem(int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::createMouseItem(%d)", item);
|
||||
_screen->hideMouse();
|
||||
setMouseItem(item);
|
||||
_itemInHand = item;
|
||||
_screen->showMouse();
|
||||
}
|
||||
|
||||
void KyraEngine::destroyMouseItem() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::destroyMouseItem()");
|
||||
void KyraEngine_v1::destroyMouseItem() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::destroyMouseItem()");
|
||||
_screen->hideMouse();
|
||||
_screen->setMouseCursor(1, 1, _shapes[0]);
|
||||
_itemInHand = -1;
|
||||
_screen->showMouse();
|
||||
}
|
||||
|
||||
void KyraEngine::setMouseItem(int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::setMouseItem(%d)", item);
|
||||
void KyraEngine_v1::setMouseItem(int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::setMouseItem(%d)", item);
|
||||
if (item == -1)
|
||||
_screen->setMouseCursor(1, 1, _shapes[6]);
|
||||
else
|
||||
_screen->setMouseCursor(8, 15, _shapes[216+item]);
|
||||
}
|
||||
|
||||
void KyraEngine::wipeDownMouseItem(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::wipeDownMouseItem(%d, %d)", xpos, ypos);
|
||||
void KyraEngine_v1::wipeDownMouseItem(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::wipeDownMouseItem(%d, %d)", xpos, ypos);
|
||||
if (_itemInHand == -1)
|
||||
return;
|
||||
xpos -= 8;
|
||||
|
@ -226,8 +226,8 @@ void KyraEngine::wipeDownMouseItem(int xpos, int ypos) {
|
|||
_screen->showMouse();
|
||||
}
|
||||
|
||||
void KyraEngine::setupSceneItems() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::setupSceneItems()");
|
||||
void KyraEngine_v1::setupSceneItems() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::setupSceneItems()");
|
||||
uint16 sceneId = _currentCharacter->sceneId;
|
||||
assert(sceneId < _roomTableSize);
|
||||
Room *currentRoom = &_roomTable[sceneId];
|
||||
|
@ -264,8 +264,8 @@ void KyraEngine::setupSceneItems() {
|
|||
}
|
||||
}
|
||||
|
||||
int KyraEngine::countItemsInScene(uint16 sceneId) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::countItemsInScene(%d)", sceneId);
|
||||
int KyraEngine_v1::countItemsInScene(uint16 sceneId) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::countItemsInScene(%d)", sceneId);
|
||||
assert(sceneId < _roomTableSize);
|
||||
Room *currentRoom = &_roomTable[sceneId];
|
||||
|
||||
|
@ -279,8 +279,8 @@ int KyraEngine::countItemsInScene(uint16 sceneId) {
|
|||
return items;
|
||||
}
|
||||
|
||||
int KyraEngine::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int unk1, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::processItemDrop(%d, %d, %d, %d, %d, %d)", sceneId, item, x, y, unk1, unk2);
|
||||
int KyraEngine_v1::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int unk1, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::processItemDrop(%d, %d, %d, %d, %d, %d)", sceneId, item, x, y, unk1, unk2);
|
||||
int freeItem = -1;
|
||||
uint8 itemIndex = findItemAtPos(x, y);
|
||||
if (unk1)
|
||||
|
@ -432,8 +432,8 @@ int KyraEngine::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int un
|
|||
return 1;
|
||||
}
|
||||
|
||||
void KyraEngine::exchangeItemWithMouseItem(uint16 sceneId, int itemIndex) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::exchangeItemWithMouseItem(%d, %d)", sceneId, itemIndex);
|
||||
void KyraEngine_v1::exchangeItemWithMouseItem(uint16 sceneId, int itemIndex) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::exchangeItemWithMouseItem(%d, %d)", sceneId, itemIndex);
|
||||
_screen->hideMouse();
|
||||
_animator->animRemoveGameItem(itemIndex);
|
||||
assert(sceneId < _roomTableSize);
|
||||
|
@ -452,8 +452,8 @@ void KyraEngine::exchangeItemWithMouseItem(uint16 sceneId, int itemIndex) {
|
|||
clickEventHandler2();
|
||||
}
|
||||
|
||||
void KyraEngine::addItemToRoom(uint16 sceneId, uint8 item, int itemIndex, int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::addItemToRoom(%d, %d, %d, %d, %d)", sceneId, item, itemIndex, x, y);
|
||||
void KyraEngine_v1::addItemToRoom(uint16 sceneId, uint8 item, int itemIndex, int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::addItemToRoom(%d, %d, %d, %d, %d)", sceneId, item, itemIndex, x, y);
|
||||
assert(sceneId < _roomTableSize);
|
||||
Room *currentRoom = &_roomTable[sceneId];
|
||||
currentRoom->itemsTable[itemIndex] = item;
|
||||
|
@ -462,8 +462,8 @@ void KyraEngine::addItemToRoom(uint16 sceneId, uint8 item, int itemIndex, int x,
|
|||
currentRoom->needInit[itemIndex] = 1;
|
||||
}
|
||||
|
||||
int KyraEngine::checkNoDropRects(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::checkNoDropRects(%d, %d)", x, y);
|
||||
int KyraEngine_v1::checkNoDropRects(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::checkNoDropRects(%d, %d)", x, y);
|
||||
if (_lastProcessedItemHeight < 1 || _lastProcessedItemHeight > 16)
|
||||
_lastProcessedItemHeight = 16;
|
||||
if (_noDropRects[0].x == -1)
|
||||
|
@ -492,8 +492,8 @@ int KyraEngine::checkNoDropRects(int x, int y) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int KyraEngine::isDropable(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::isDropable(%d, %d)", x, y);
|
||||
int KyraEngine_v1::isDropable(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::isDropable(%d, %d)", x, y);
|
||||
x -= 8;
|
||||
y -= 1;
|
||||
|
||||
|
@ -507,8 +507,8 @@ int KyraEngine::isDropable(int x, int y) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
void KyraEngine::itemDropDown(int x, int y, int destX, int destY, byte freeItem, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::itemDropDown(%d, %d, %d, %d, %d, %d)", x, y, destX, destY, freeItem, item);
|
||||
void KyraEngine_v1::itemDropDown(int x, int y, int destX, int destY, byte freeItem, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::itemDropDown(%d, %d, %d, %d, %d, %d)", x, y, destX, destY, freeItem, item);
|
||||
assert(_currentCharacter->sceneId < _roomTableSize);
|
||||
Room *currentRoom = &_roomTable[_currentCharacter->sceneId];
|
||||
if (x == destX && y == destY) {
|
||||
|
@ -591,8 +591,8 @@ void KyraEngine::itemDropDown(int x, int y, int destX, int destY, byte freeItem,
|
|||
_screen->showMouse();
|
||||
}
|
||||
|
||||
void KyraEngine::dropItem(int unk1, int item, int x, int y, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::dropItem(%d, %d, %d, %d, %d)", unk1, item, x, y, unk2);
|
||||
void KyraEngine_v1::dropItem(int unk1, int item, int x, int y, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::dropItem(%d, %d, %d, %d, %d)", unk1, item, x, y, unk2);
|
||||
if (processItemDrop(_currentCharacter->sceneId, item, x, y, unk1, unk2))
|
||||
return;
|
||||
snd_playSoundEffect(54);
|
||||
|
@ -603,16 +603,16 @@ void KyraEngine::dropItem(int unk1, int item, int x, int y, int unk2) {
|
|||
drawSentenceCommand(_noDropList[1], 6);
|
||||
}
|
||||
|
||||
void KyraEngine::itemSpecialFX(int x, int y, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::itemSpecialFX(%d, %d, %d)", x, y, item);
|
||||
void KyraEngine_v1::itemSpecialFX(int x, int y, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::itemSpecialFX(%d, %d, %d)", x, y, item);
|
||||
if (item == 41)
|
||||
itemSpecialFX1(x, y, item);
|
||||
else
|
||||
itemSpecialFX2(x, y, item);
|
||||
}
|
||||
|
||||
void KyraEngine::itemSpecialFX1(int x, int y, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::itemSpecialFX1(%d, %d, %d)", x, y, item);
|
||||
void KyraEngine_v1::itemSpecialFX1(int x, int y, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::itemSpecialFX1(%d, %d, %d)", x, y, item);
|
||||
uint8 *shape = _shapes[216+item];
|
||||
x -= 8;
|
||||
int startY = y;
|
||||
|
@ -632,8 +632,8 @@ void KyraEngine::itemSpecialFX1(int x, int y, int item) {
|
|||
_screen->showMouse();
|
||||
}
|
||||
|
||||
void KyraEngine::itemSpecialFX2(int x, int y, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::itemSpecialFX2(%d, %d, %d)", x, y, item);
|
||||
void KyraEngine_v1::itemSpecialFX2(int x, int y, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::itemSpecialFX2(%d, %d, %d)", x, y, item);
|
||||
x -= 8;
|
||||
y -= 15;
|
||||
int yAdd = (int8)(((16 - _itemTable[item].height) >> 1) & 0xFF);
|
||||
|
@ -660,8 +660,8 @@ void KyraEngine::itemSpecialFX2(int x, int y, int item) {
|
|||
restoreItemRect0(x, y);
|
||||
}
|
||||
|
||||
void KyraEngine::magicOutMouseItem(int animIndex, int itemPos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::magicOutMouseItem(%d, %d)", animIndex, itemPos);
|
||||
void KyraEngine_v1::magicOutMouseItem(int animIndex, int itemPos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::magicOutMouseItem(%d, %d)", animIndex, itemPos);
|
||||
int videoPageBackUp = _screen->_curPage;
|
||||
_screen->_curPage = 0;
|
||||
int x = 0, y = 0;
|
||||
|
@ -744,8 +744,8 @@ void KyraEngine::magicOutMouseItem(int animIndex, int itemPos) {
|
|||
_screen->_curPage = videoPageBackUp;
|
||||
}
|
||||
|
||||
void KyraEngine::magicInMouseItem(int animIndex, int item, int itemPos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::magicInMouseItem(%d, %d, %d)", animIndex, item, itemPos);
|
||||
void KyraEngine_v1::magicInMouseItem(int animIndex, int item, int itemPos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::magicInMouseItem(%d, %d, %d)", animIndex, item, itemPos);
|
||||
int videoPageBackUp = _screen->_curPage;
|
||||
_screen->_curPage = 0;
|
||||
int x = 0, y = 0;
|
||||
|
@ -817,8 +817,8 @@ void KyraEngine::magicInMouseItem(int animIndex, int item, int itemPos) {
|
|||
_screen->_curPage = videoPageBackUp;
|
||||
}
|
||||
|
||||
void KyraEngine::specialMouseItemFX(int shape, int x, int y, int animIndex, int tableIndex, int loopStart, int maxLoops) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::specialMouseItemFX(%d, %d, %d, %d, %d, %d, %d)", shape, x, y, animIndex, tableIndex, loopStart, maxLoops);
|
||||
void KyraEngine_v1::specialMouseItemFX(int shape, int x, int y, int animIndex, int tableIndex, int loopStart, int maxLoops) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::specialMouseItemFX(%d, %d, %d, %d, %d, %d, %d)", shape, x, y, animIndex, tableIndex, loopStart, maxLoops);
|
||||
static const uint8 table1[] = {
|
||||
0x23, 0x45, 0x55, 0x72, 0x84, 0xCF, 0x00, 0x00
|
||||
};
|
||||
|
@ -840,8 +840,8 @@ void KyraEngine::specialMouseItemFX(int shape, int x, int y, int animIndex, int
|
|||
processSpecialMouseItemFX(shape, x, y, tableValue, loopStart, maxLoops);
|
||||
}
|
||||
|
||||
void KyraEngine::processSpecialMouseItemFX(int shape, int x, int y, int tableValue, int loopStart, int maxLoops) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::processSpecialMouseItemFX(%d, %d, %d, %d, %d, %d)", shape, x, y, tableValue, loopStart, maxLoops);
|
||||
void KyraEngine_v1::processSpecialMouseItemFX(int shape, int x, int y, int tableValue, int loopStart, int maxLoops) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::processSpecialMouseItemFX(%d, %d, %d, %d, %d, %d)", shape, x, y, tableValue, loopStart, maxLoops);
|
||||
uint8 shapeColorTable[16];
|
||||
uint8 *shapePtr = _shapes[shape] + 10;
|
||||
if (_flags.useAltShapeHeader)
|
||||
|
@ -859,8 +859,8 @@ void KyraEngine::processSpecialMouseItemFX(int shape, int x, int y, int tableVal
|
|||
_screen->drawShape(0, _shapes[shape], x, y, 0, 0x8000, shapeColorTable);
|
||||
}
|
||||
|
||||
void KyraEngine::updatePlayerItemsForScene() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::updatePlayerItemsForScene()");
|
||||
void KyraEngine_v1::updatePlayerItemsForScene() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::updatePlayerItemsForScene()");
|
||||
if (_itemInHand >= 29 && _itemInHand < 33) {
|
||||
++_itemInHand;
|
||||
if (_itemInHand > 33)
|
||||
|
@ -900,7 +900,7 @@ void KyraEngine::updatePlayerItemsForScene() {
|
|||
_screen->showMouse();
|
||||
}
|
||||
|
||||
void KyraEngine::redrawInventory(int page) {
|
||||
void KyraEngine_v1::redrawInventory(int page) {
|
||||
int videoPageBackUp = _screen->_curPage;
|
||||
_screen->_curPage = page;
|
||||
_screen->hideMouse();
|
||||
|
@ -916,26 +916,26 @@ void KyraEngine::redrawInventory(int page) {
|
|||
_screen->updateScreen();
|
||||
}
|
||||
|
||||
void KyraEngine::backUpItemRect0(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::backUpItemRect0(%d, %d)", xpos, ypos);
|
||||
void KyraEngine_v1::backUpItemRect0(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::backUpItemRect0(%d, %d)", xpos, ypos);
|
||||
_screen->rectClip(xpos, ypos, 3<<3, 24);
|
||||
_screen->copyRegionToBuffer(_screen->_curPage, xpos, ypos, 3<<3, 24, _itemBkgBackUp[0]);
|
||||
}
|
||||
|
||||
void KyraEngine::restoreItemRect0(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::restoreItemRect0(%d, %d)", xpos, ypos);
|
||||
void KyraEngine_v1::restoreItemRect0(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::restoreItemRect0(%d, %d)", xpos, ypos);
|
||||
_screen->rectClip(xpos, ypos, 3<<3, 24);
|
||||
_screen->copyBlockToPage(_screen->_curPage, xpos, ypos, 3<<3, 24, _itemBkgBackUp[0]);
|
||||
}
|
||||
|
||||
void KyraEngine::backUpItemRect1(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::backUpItemRect1(%d, %d)", xpos, ypos);
|
||||
void KyraEngine_v1::backUpItemRect1(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::backUpItemRect1(%d, %d)", xpos, ypos);
|
||||
_screen->rectClip(xpos, ypos, 4<<3, 32);
|
||||
_screen->copyRegionToBuffer(_screen->_curPage, xpos, ypos, 4<<3, 32, _itemBkgBackUp[1]);
|
||||
}
|
||||
|
||||
void KyraEngine::restoreItemRect1(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::restoreItemRect1(%d, %d)", xpos, ypos);
|
||||
void KyraEngine_v1::restoreItemRect1(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::restoreItemRect1(%d, %d)", xpos, ypos);
|
||||
_screen->rectClip(xpos, ypos, 4<<3, 32);
|
||||
_screen->copyBlockToPage(_screen->_curPage, xpos, ypos, 4<<3, 32, _itemBkgBackUp[1]);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue