Initial commit

This commit is contained in:
2026-02-02 04:50:13 +01:00
commit 5b11698731
22592 changed files with 7677434 additions and 0 deletions

6
engines/gob/POTFILES Normal file
View File

@@ -0,0 +1,6 @@
engines/gob/inter_geisha.cpp
engines/gob/inter_playtoons.cpp
engines/gob/inter_v2.cpp
engines/gob/inter_v5.cpp
engines/gob/inter_v7.cpp
engines/gob/metaengine.cpp

302
engines/gob/anifile.cpp Normal file
View File

@@ -0,0 +1,302 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/stream.h"
#include "common/substream.h"
#include "gob/gob.h"
#include "gob/util.h"
#include "gob/dataio.h"
#include "gob/surface.h"
#include "gob/video.h"
#include "gob/cmpfile.h"
#include "gob/anifile.h"
namespace Gob {
ANIFile::ANIFile(GobEngine *vm, const Common::String &fileName,
uint16 width, uint8 bpp) : _vm(vm),
_width(width), _bpp(bpp), _hasPadding(false) {
bool bigEndian = false;
Common::String endianFileName = fileName;
if ((_vm->getEndiannessMethod() == kEndiannessMethodAltFile) &&
!_vm->_dataIO->hasFile(fileName)) {
// If the game has alternate big-endian files, look if one exist
Common::String alternateFileName = fileName;
alternateFileName.setChar('_', 0);
if (_vm->_dataIO->hasFile(alternateFileName)) {
bigEndian = true;
endianFileName = alternateFileName;
}
} else if ((_vm->getEndiannessMethod() == kEndiannessMethodBE) ||
((_vm->getEndiannessMethod() == kEndiannessMethodSystem) &&
(_vm->getEndianness() == kEndiannessBE)))
// Game always little endian or it follows the system and it is big endian
bigEndian = true;
Common::SeekableReadStream *ani = _vm->_dataIO->getFile(endianFileName);
if (ani) {
Common::SeekableReadStreamEndianWrapper sub(ani, bigEndian, DisposeAfterUse::YES);
// The big endian version pads a few fields to even size
_hasPadding = bigEndian;
load(sub, fileName);
return;
}
warning("ANIFile::ANIFile(): No such file \"%s\" (\"%s\")", endianFileName.c_str(), fileName.c_str());
}
ANIFile::~ANIFile() {
for (LayerArray::iterator l = _layers.begin(); l != _layers.end(); ++l)
delete *l;
}
void ANIFile::load(Common::SeekableReadStreamEndian &ani, const Common::String &fileName) {
ani.skip(2); // Unused
uint16 animationCount = ani.readUint16();
uint16 layerCount = ani.readUint16();
if (layerCount < 1)
warning("ANIFile::load(): Less than one layer (%d) in file \"%s\"",
layerCount, fileName.c_str());
// Load the layers
if (layerCount > 0) {
ani.skip(13); // The first layer is ignored?
if (_hasPadding)
ani.skip(1);
_layers.reserve(layerCount - 1);
for (int i = 0; i < layerCount - 1; i++)
_layers.push_back(loadLayer(ani));
}
_maxWidth = 0;
_maxHeight = 0;
// Load the animations
_animations.resize(animationCount);
_frames.resize(animationCount);
for (uint16 animation = 0; animation < animationCount; animation++) {
loadAnimation(_animations[animation], _frames[animation], ani);
_maxWidth = MAX<uint16>(_maxWidth , _animations[animation].width);
_maxHeight = MAX<uint16>(_maxHeight, _animations[animation].height);
}
}
void ANIFile::loadAnimation(Animation &animation, FrameArray &frames,
Common::SeekableReadStreamEndian &ani) {
// Animation properties
animation.name = Util::readString(ani, 13);
if (_hasPadding)
ani.skip(1);
ani.skip(13); // The name a second time?!?
if (_hasPadding)
ani.skip(1);
ani.skip(2); // Unknown
animation.x = (int16) ani.readUint16();
animation.y = (int16) ani.readUint16();
animation.deltaX = (int16) ani.readUint16();
animation.deltaY = (int16) ani.readUint16();
animation.transp = ani.readByte() != 0;
if (_hasPadding)
ani.skip(1);
uint16 frameCount = ani.readUint16();
// Load the frames
frames.resize(MAX<uint16>(1, frameCount));
loadFrames(frames, ani);
animation.frameCount = frames.size();
animation.width = 0;
animation.height = 0;
// Calculate the areas of each frame
animation.frameAreas.resize(animation.frameCount);
for (uint16 i = 0; i < animation.frameCount; i++) {
const ChunkList &frame = frames[i];
FrameArea &area = animation.frameAreas[i];
area.left = area.top = 0x7FFF;
area.right = area.bottom = -0x7FFF;
for (const auto &c : frame) {
uint16 cL, cT, cR, cB;
if (!getCoordinates(c.layer, c.part, cL, cT, cR, cB))
continue;
const uint16 width = cR - cL + 1;
const uint16 height = cB - cT + 1;
const uint16 l = c.x;
const uint16 t = c.y;
const uint16 r = l + width - 1;
const uint16 b = t + height - 1;
area.left = MIN<int16>(area.left , l);
area.top = MIN<int16>(area.top , t);
area.right = MAX<int16>(area.right , r);
area.bottom = MAX<int16>(area.bottom, b);
}
if ((area.left <= area.right) && (area.top <= area.bottom)) {
animation.width = MAX<uint16>(animation.width , area.right - area.left + 1);
animation.height = MAX<uint16>(animation.height, area.bottom - area.top + 1);
}
}
}
void ANIFile::loadFrames(FrameArray &frames, Common::SeekableReadStreamEndian &ani) {
uint32 curFrame = 0;
bool end = false;
while (!end) {
frames[curFrame].push_back(AnimationChunk());
AnimationChunk &chunk = frames[curFrame].back();
uint8 layerFlags = ani.readByte();
// Chunk properties
chunk.layer = (layerFlags & 0x0F) - 1;
chunk.part = ani.readByte();
chunk.x = (int8) ani.readByte();
chunk.y = (int8) ani.readByte();
// X multiplier/offset
int16 xOff = ((layerFlags & 0xC0) >> 6) << 7;
if (chunk.x >= 0)
chunk.x += xOff;
else
chunk.x -= xOff;
// Y multiplier/offset
int16 yOff = ((layerFlags & 0x30) >> 4) << 7;
if (chunk.y >= 0)
chunk.y += yOff;
else
chunk.y -= yOff;
uint8 multiPart = ani.readByte();
if (multiPart == 0xFF) // No more frames in this animation
end = true;
else if (multiPart != 0x01) // No more chunks in this frame
curFrame++;
// Shouldn't happen, but just to be safe
if (curFrame >= frames.size())
frames.resize(curFrame + 1);
if (_hasPadding)
ani.skip(1);
if (ani.eos() || ani.err())
error("ANIFile::loadFrames(): Read error");
}
}
CMPFile *ANIFile::loadLayer(Common::SeekableReadStreamEndian &ani) {
Common::String file = Util::setExtension(Util::readString(ani, 13), "");
if (_hasPadding)
ani.skip(1);
return new CMPFile(_vm, file, _width, 0, _bpp);
}
uint16 ANIFile::getAnimationCount() const {
return _animations.size();
}
void ANIFile::getMaxSize(uint16 &width, uint16 &height) const {
width = _maxWidth;
height = _maxHeight;
}
const ANIFile::Animation &ANIFile::getAnimationInfo(uint16 animation) const {
assert(animation < _animations.size());
return _animations[animation];
}
bool ANIFile::getCoordinates(uint16 layer, uint16 part,
uint16 &left, uint16 &top, uint16 &right, uint16 &bottom) const {
if (layer >= _layers.size())
return false;
return _layers[layer]->getCoordinates(part, left, top, right, bottom);
}
void ANIFile::draw(Surface &dest, uint16 animation, uint16 frame, int16 x, int16 y) const {
if (animation >= _animations.size())
return;
const Animation &anim = _animations[animation];
if (frame >= anim.frameCount)
return;
const ChunkList &chunks = _frames[animation][frame];
for (ChunkList::const_iterator c = chunks.begin(); c != chunks.end(); ++c)
drawLayer(dest, c->layer, c->part, x + c->x, y + c->y, anim.transp ? 0 : -1);
}
void ANIFile::drawLayer(Surface &dest, uint16 layer, uint16 part,
int16 x, int16 y, int32 transp) const {
if (layer >= _layers.size())
return;
_layers[layer]->draw(dest, part, x, y, transp);
}
void ANIFile::recolor(uint8 from, uint8 to) {
for (LayerArray::iterator l = _layers.begin(); l != _layers.end(); ++l)
(*l)->recolor(from, to);
}
} // End of namespace Gob

157
engines/gob/anifile.h Normal file
View File

@@ -0,0 +1,157 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_ANIFILE_H
#define GOB_ANIFILE_H
#include "common/system.h"
#include "common/str.h"
#include "common/array.h"
#include "common/list.h"
namespace Common {
class SeekableReadStreamEndian;
}
namespace Gob {
class GobEngine;
class Surface;
class CMPFile;
/** An ANI file, describing an animation.
*
* Used in hardcoded "actiony" parts of gob games.
* The principle is similar to an Anim in Scenery (see scenery.cpp), but
* instead of referencing indices in the sprites array, ANIs reference sprites
* directly by filename.
*/
class ANIFile {
public:
/** The relative area a frame sprite occupies. */
struct FrameArea {
int16 left;
int16 top;
int16 right;
int16 bottom;
};
/** An animation within an ANI file. */
struct Animation {
Common::String name; ///< The name of the animation.
uint16 frameCount; ///< The number of frames in this animation.
int16 x; ///< The default x position for this animation.
int16 y; ///< The default y position for this animation.
bool transp; ///< Should the animation frames be drawn with transparency?
int16 deltaX; ///< # of pixels to advance in X direction after each cycle.
int16 deltaY; ///< # of pixels to advance in Y direction after each cycle.
/** The relative area each frame sprite occupies. */
Common::Array<FrameArea> frameAreas;
uint16 width; ///< The maximum width of this animation's frames.
uint16 height; ///< The maximum height of this animation's frames.
};
ANIFile(GobEngine *vm, const Common::String &fileName,
uint16 width = 320, uint8 bpp = 1);
~ANIFile();
/** Return the number of animations in this ANI file. */
uint16 getAnimationCount() const;
/** Return the maximum size of all animation frames. */
void getMaxSize(uint16 &width, uint16 &height) const;
/** Get this animation's properties. */
const Animation &getAnimationInfo(uint16 animation) const;
/** Draw an animation frame. */
void draw(Surface &dest, uint16 animation, uint16 frame, int16 x, int16 y) const;
/** Recolor the animation sprites. */
void recolor(uint8 from, uint8 to);
private:
typedef Common::Array<CMPFile *> LayerArray;
typedef Common::Array<Animation> AnimationArray;
/** A "chunk" of an animation frame. */
struct AnimationChunk {
int16 x; ///< The relative x offset of this chunk.
int16 y; ///< The relative y offset of this chunk.
uint16 layer; ///< The layer the chunk's sprite is on.
uint16 part; ///< The layer part the chunk's sprite is.
};
typedef Common::List<AnimationChunk> ChunkList;
typedef Common::Array<ChunkList> FrameArray;
typedef Common::Array<FrameArray> AnimationFrameArray;
GobEngine *_vm;
uint16 _width; ///< The width of a sprite layer.
uint8 _bpp; ///< Number of bytes per pixel in a sprite layer.
byte _hasPadding;
LayerArray _layers; ///< The animation sprite layers.
AnimationArray _animations; ///< The animations.
AnimationFrameArray _frames; ///< The animation frames.
uint16 _maxWidth;
uint16 _maxHeight;
// Loading helpers
void load(Common::SeekableReadStreamEndian &ani, const Common::String &fileName);
CMPFile *loadLayer(Common::SeekableReadStreamEndian &ani);
void loadAnimation(Animation &animation, FrameArray &frames,
Common::SeekableReadStreamEndian &ani);
void loadFrames(FrameArray &frames, Common::SeekableReadStreamEndian &ani);
// Drawing helpers
bool getCoordinates(uint16 layer, uint16 part,
uint16 &left, uint16 &top, uint16 &right, uint16 &bottom) const;
void drawLayer(Surface &dest, uint16 layer, uint16 part,
int16 x, int16 y, int32 transp) const;
};
} // End of namespace Gob
#endif // GOB_ANIFILE_H

317
engines/gob/aniobject.cpp Normal file
View File

@@ -0,0 +1,317 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "gob/surface.h"
#include "gob/anifile.h"
#include "gob/cmpfile.h"
#include "gob/aniobject.h"
namespace Gob {
ANIObject::ANIObject(const ANIFile &ani) : _ani(&ani), _cmp(nullptr),
_visible(false), _paused(false), _mode(kModeContinuous), _x(0), _y(0) {
setAnimation(0);
setPosition();
}
ANIObject::ANIObject(const CMPFile &cmp) : _ani(nullptr), _cmp(&cmp),
_visible(false), _paused(false), _mode(kModeContinuous), _x(0), _y(0) {
setAnimation(0);
setPosition();
}
ANIObject::~ANIObject() {
}
void ANIObject::setVisible(bool visible) {
_visible = visible;
}
bool ANIObject::isVisible() const {
return _visible;
}
void ANIObject::setPause(bool pause) {
_paused = pause;
}
bool ANIObject::isPaused() const {
return _paused;
}
void ANIObject::setMode(Mode mode) {
_mode = mode;
}
void ANIObject::setAnimation(uint16 animation) {
_animation = animation;
_frame = 0;
}
void ANIObject::rewind() {
_frame = 0;
}
void ANIObject::setFrame(uint16 frame) {
_frame = frame % _ani->getAnimationInfo(_animation).frameCount;
}
void ANIObject::setPosition() {
// CMP "animations" have no default position
if (_cmp)
return;
if (_animation >= _ani->getAnimationCount())
return;
const ANIFile::Animation &animation = _ani->getAnimationInfo(_animation);
_x = animation.x;
_y = animation.y;
}
void ANIObject::setPosition(int16 x, int16 y) {
_x = x;
_y = y;
}
void ANIObject::getPosition(int16 &x, int16 &y) const {
x = _x;
y = _y;
}
void ANIObject::getFramePosition(int16 &x, int16 &y, uint16 n) const {
// CMP "animations" have no specific frame positions
if (_cmp) {
getPosition(x, y);
return;
}
if (_animation >= _ani->getAnimationCount())
return;
const ANIFile::Animation &animation = _ani->getAnimationInfo(_animation);
if (_frame >= animation.frameCount)
return;
// If we're paused, we don't advance any frames
if (_paused)
n = 0;
// Number of cycles run through after n frames
uint16 cycles = (_frame + n) / animation.frameCount;
// Frame position after n frames
uint16 frame = (_frame + n) % animation.frameCount;
// Only doing one cycle?
if (_mode == kModeOnce)
cycles = MAX<uint16>(cycles, 1);
x = _x + animation.frameAreas[frame].left + cycles * animation.deltaX;
y = _y + animation.frameAreas[frame].top + cycles * animation.deltaY;
}
void ANIObject::getFrameSize(int16 &width, int16 &height, uint16 n) const {
if (_cmp) {
width = _cmp->getWidth (_animation);
height = _cmp->getHeight(_animation);
return;
}
if (_animation >= _ani->getAnimationCount())
return;
const ANIFile::Animation &animation = _ani->getAnimationInfo(_animation);
if (_frame >= animation.frameCount)
return;
// If we're paused, we don't advance any frames
if (_paused)
n = 0;
// Frame position after n frames
uint16 frame = (_frame + n) % animation.frameCount;
width = animation.frameAreas[frame].right - animation.frameAreas[frame].left + 1;
height = animation.frameAreas[frame].bottom - animation.frameAreas[frame].top + 1;
}
bool ANIObject::isIn(int16 x, int16 y) const {
if (!isVisible())
return false;
int16 frameX = 0, frameY = 0, frameWidth = 0, frameHeight = 0;
getFramePosition(frameX, frameY);
getFrameSize(frameWidth, frameHeight);
if ((x < frameX) || (y < frameY))
return false;
if ((x > (frameX + frameWidth)) || (y > (frameY + frameHeight)))
return false;
return true;
}
bool ANIObject::isIn(const ANIObject &obj) const {
if (!isVisible() || !obj.isVisible())
return false;
int16 frameX = 0, frameY = 0, frameWidth = 0, frameHeight = 0;
getFramePosition(frameX, frameY);
getFrameSize(frameWidth, frameHeight);
return obj.isIn(frameX , frameY ) ||
obj.isIn(frameX + frameWidth - 1, frameY ) ||
obj.isIn(frameX , frameY + frameHeight - 1) ||
obj.isIn(frameX + frameWidth - 1, frameY + frameHeight - 1);
}
bool ANIObject::draw(Surface &dest, int16 &left, int16 &top,
int16 &right, int16 &bottom) {
if (!_visible)
return false;
if (_cmp)
return drawCMP(dest, left, top, right, bottom);
else if (_ani)
return drawANI(dest, left, top, right, bottom);
return false;
}
bool ANIObject::drawCMP(Surface &dest, int16 &left, int16 &top,
int16 &right, int16 &bottom) {
if (!hasBuffer()) {
uint16 width, height;
_cmp->getMaxSize(width, height);
resizeBuffer(width, height);
}
left = _x;
top = _y;
right = _x + _cmp->getWidth (_animation) - 1;
bottom = _y + _cmp->getHeight(_animation) - 1;
if (!saveScreen(dest, left, top, right, bottom))
return false;
_cmp->draw(dest, _animation, _x, _y, 0);
return true;
}
bool ANIObject::drawANI(Surface &dest, int16 &left, int16 &top,
int16 &right, int16 &bottom) {
if (!hasBuffer()) {
uint16 width, height;
_ani->getMaxSize(width, height);
resizeBuffer(width, height);
}
const ANIFile::Animation &animation = _ani->getAnimationInfo(_animation);
if (_frame >= animation.frameCount)
return false;
const ANIFile::FrameArea &area = animation.frameAreas[_frame];
left = _x + area.left;
top = _y + area.top;
right = _x + area.right;
bottom = _y + area.bottom;
if (!saveScreen(dest, left, top, right, bottom))
return false;
_ani->draw(dest, _animation, _frame, _x, _y);
return true;
}
bool ANIObject::clear(Surface &dest, int16 &left, int16 &top,
int16 &right, int16 &bottom) {
return restoreScreen(dest, left, top, right, bottom);
}
void ANIObject::advance() {
if (_paused)
return;
// CMP "animations" have only one frame
if (_cmp)
return;
if (_animation >= _ani->getAnimationCount())
return;
const ANIFile::Animation &animation = _ani->getAnimationInfo(_animation);
_frame = (_frame + 1) % animation.frameCount;
if (_frame == 0) {
_x += animation.deltaX;
_y += animation.deltaY;
if (_mode == kModeOnce) {
_paused = true;
_visible = false;
}
}
}
uint16 ANIObject::getAnimation() const {
return _animation;
}
uint16 ANIObject::getFrame() const {
return _frame;
}
bool ANIObject::lastFrame() const {
// CMP "animations" have only one frame
if (_cmp)
return true;
if (_animation >= _ani->getAnimationCount())
return true;
const ANIFile::Animation &animation = _ani->getAnimationInfo(_animation);
return (_frame + 1) >= animation.frameCount;
}
} // End of namespace Gob

135
engines/gob/aniobject.h Normal file
View File

@@ -0,0 +1,135 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_ANIOBJECT_H
#define GOB_ANIOBJECT_H
#include "common/system.h"
#include "gob/backbuffer.h"
namespace Gob {
class ANIFile;
class CMPFile;
class Surface;
/** An ANI object, controlling an animation within an ANI file. */
class ANIObject : public BackBuffer {
public:
enum Mode {
kModeContinuous, ///< Play the animation continuously.
kModeOnce ///< Play the animation only once.
};
/** Create an animation object from an ANI file. */
ANIObject(const ANIFile &ani);
/** Create an animation object from a CMP sprite. */
ANIObject(const CMPFile &cmp);
virtual ~ANIObject();
/** Make the object visible/invisible. */
void setVisible(bool visible);
/** Is the object currently visible? */
bool isVisible() const;
/** Pause/Unpause the animation. */
void setPause(bool pause);
/** Is the animation currently paused? */
bool isPaused() const;
/** Set the animation mode. */
void setMode(Mode mode);
/** Set the current position to the animation's default. */
virtual void setPosition();
/** Set the current position. */
virtual void setPosition(int16 x, int16 y);
/** Return the current position. */
void getPosition(int16 &x, int16 &y) const;
/** Return the frame position after another n frames. */
void getFramePosition(int16 &x, int16 &y, uint16 n = 0) const;
/** Return the current frame size after another n frames. */
void getFrameSize(int16 &width, int16 &height, uint16 n = 0) const;
/** Are there coordinates within the animation sprite? */
bool isIn(int16 x, int16 y) const;
/** Is this object within the animation sprite? */
bool isIn(const ANIObject &obj) const;
/** Set the animation number. */
void setAnimation(uint16 animation);
/** Rewind the current animation to the first frame. */
void rewind();
/** Set the animation to a specific frame. */
void setFrame(uint16 frame);
/** Return the current animation number. */
uint16 getAnimation() const;
/** Return the current frame number. */
uint16 getFrame() const;
/** Is this the last frame within this animation cycle? */
bool lastFrame() const;
/** Draw the current frame onto the surface and return the affected rectangle. */
virtual bool draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom);
/** Draw the current frame from the surface and return the affected rectangle. */
virtual bool clear(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom);
/** Advance the animation to the next frame. */
virtual void advance();
private:
const ANIFile *_ani; ///< The managed ANI file.
const CMPFile *_cmp; ///< The managed CMP file.
uint16 _animation; ///< The current animation number
uint16 _frame; ///< The current frame.
bool _visible; ///< Is the object currently visible?
bool _paused; ///< Is the animation currently paused?
Mode _mode; ///< The animation mode.
int16 _x; ///< The current X position.
int16 _y; ///< The current Y position.
bool drawCMP(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom);
bool drawANI(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom);
};
} // End of namespace Gob
#endif // GOB_ANIOBJECT_H

105
engines/gob/backbuffer.cpp Normal file
View File

@@ -0,0 +1,105 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/util.h"
#include "gob/backbuffer.h"
#include "gob/surface.h"
namespace Gob {
BackBuffer::BackBuffer() : _background(nullptr), _saved(false) {
}
BackBuffer::~BackBuffer() {
delete _background;
}
bool BackBuffer::hasBuffer() const {
return _background != nullptr;
}
bool BackBuffer::hasSavedBackground() const {
return _saved;
}
void BackBuffer::trashBuffer() {
_saved = false;
}
void BackBuffer::resizeBuffer(uint16 width, uint16 height) {
trashBuffer();
if (_background && (_background->getWidth() == width) && (_background->getHeight() == height))
return;
delete _background;
_background = new Surface(width, height, 1);
}
bool BackBuffer::saveScreen(const Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) {
if (!_background)
return false;
const int16 width = MIN<int16>(right - left + 1, _background->getWidth ());
const int16 height = MIN<int16>(bottom - top + 1, _background->getHeight());
if ((width <= 0) || (height <= 0))
return false;
right = left + width - 1;
bottom = top + height - 1;
_saveLeft = left;
_saveTop = top;
_saveRight = right;
_saveBottom = bottom;
_background->blit(dest, _saveLeft, _saveTop, _saveRight, _saveBottom, 0, 0);
_saved = true;
return true;
}
bool BackBuffer::restoreScreen(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) {
if (!_saved)
return false;
left = _saveLeft;
top = _saveTop;
right = _saveRight;
bottom = _saveBottom;
dest.blit(*_background, 0, 0, right - left, bottom - top, left, top);
_saved = false;
return true;
}
} // End of namespace Gob

64
engines/gob/backbuffer.h Normal file
View File

@@ -0,0 +1,64 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_BACKBUFFER_H
#define GOB_BACKBUFFER_H
#include "common/system.h"
namespace Gob {
class Surface;
class BackBuffer {
public:
BackBuffer();
~BackBuffer();
protected:
void trashBuffer();
void resizeBuffer(uint16 width, uint16 height);
bool saveScreen (const Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom);
bool restoreScreen( Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom);
bool hasBuffer() const;
bool hasSavedBackground() const;
private:
Surface *_background; ///< The saved background.
bool _saved; ///< Was the background saved?
int16 _saveLeft; ///< The left position of the saved background.
int16 _saveTop; ///< The top of the saved background.
int16 _saveRight; ///< The right position of the saved background.
int16 _saveBottom; ///< The bottom position of the saved background.
};
} // End of namespace Gob
#endif // GOB_BACKBUFFER_H

39
engines/gob/cheater.cpp Normal file
View File

@@ -0,0 +1,39 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "gob/gob.h"
#include "gob/cheater.h"
namespace Gob {
Cheater::Cheater(GobEngine *vm) : _vm(vm) {
}
Cheater::~Cheater() {
}
} // End of namespace Gob

69
engines/gob/cheater.h Normal file
View File

@@ -0,0 +1,69 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_CHEATER_H
#define GOB_CHEATER_H
namespace GUI {
class Debugger;
}
namespace Gob {
namespace Geisha {
class Diving;
class Penetration;
}
class GobEngine;
class Cheater {
public:
Cheater(GobEngine *vm);
virtual ~Cheater();
virtual bool cheat(GUI::Debugger &console) = 0;
protected:
GobEngine *_vm;
};
class Cheater_Geisha : public Cheater {
public:
Cheater_Geisha(GobEngine *vm, Geisha::Diving *diving, Geisha::Penetration *penetration);
~Cheater_Geisha() override;
bool cheat(GUI::Debugger &console) override;
private:
Geisha::Diving *_diving;
Geisha::Penetration *_penetration;
};
} // End of namespace Gob
#endif // GOB_CHEATER_H

View File

@@ -0,0 +1,78 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "gui/debugger.h"
#include "gob/gob.h"
#include "gob/cheater.h"
#include "gob/inter.h"
#include "gob/minigames/geisha/diving.h"
#include "gob/minigames/geisha/penetration.h"
namespace Gob {
Cheater_Geisha::Cheater_Geisha(GobEngine *vm, Geisha::Diving *diving, Geisha::Penetration *penetration) :
Cheater(vm), _diving(diving), _penetration(penetration) {
}
Cheater_Geisha::~Cheater_Geisha() {
}
bool Cheater_Geisha::cheat(GUI::Debugger &console) {
// A cheat to get around the Diving minigame
if (_diving->isPlaying()) {
_diving->cheatWin();
return false;
}
// A cheat to get around the Penetration minigame
if (_penetration->isPlaying()) {
_penetration->cheatWin();
return false;
}
// A cheat to get around the mastermind puzzle
if (_vm->isCurrentTot("hard.tot") && _vm->_inter->_variables) {
uint32 digit1 = READ_VARO_UINT32(0x768);
uint32 digit2 = READ_VARO_UINT32(0x76C);
uint32 digit3 = READ_VARO_UINT32(0x770);
uint32 digit4 = READ_VARO_UINT32(0x774);
uint32 digit5 = READ_VARO_UINT32(0x778);
if (digit1 && digit2 && digit3 && digit4 && digit5)
console.debugPrintf("Mastermind solution: %d %d %d %d %d\n",
digit1, digit2, digit3, digit4, digit5);
return true;
}
return true;
}
} // End of namespace Gob

266
engines/gob/cmpfile.cpp Normal file
View File

@@ -0,0 +1,266 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/stream.h"
#include "common/substream.h"
#include "common/str.h"
#include "gob/gob.h"
#include "gob/util.h"
#include "gob/surface.h"
#include "gob/video.h"
#include "gob/dataio.h"
#include "gob/rxyfile.h"
#include "gob/cmpfile.h"
namespace Gob {
CMPFile::CMPFile(GobEngine *vm, const Common::String &baseName,
uint16 width, uint16 height, uint8 bpp) :
_vm(vm), _width(width), _height(height), _bpp(bpp), _maxWidth(0), _maxHeight(0),
_surface(nullptr), _coordinates(nullptr) {
if (baseName.empty())
return;
const Common::String rxyFile = Util::setExtension(baseName, ".RXY");
const Common::String cmpFile = Util::setExtension(baseName, ".CMP");
if (!_vm->_dataIO->hasFile(cmpFile))
return;
loadRXY(rxyFile);
createSurface();
loadCMP(cmpFile);
}
CMPFile::CMPFile(GobEngine *vm, const Common::String &cmpFile, const Common::String &rxyFile,
uint16 width, uint16 height, uint8 bpp) :
_vm(vm), _width(width), _height(height), _bpp(bpp), _maxWidth(0), _maxHeight(0),
_surface(nullptr), _coordinates(nullptr) {
if (cmpFile.empty() || !_vm->_dataIO->hasFile(cmpFile))
return;
loadRXY(rxyFile);
createSurface();
loadCMP(cmpFile);
}
CMPFile::CMPFile(GobEngine *vm, Common::SeekableReadStream &cmp, Common::SeekableReadStream &rxy,
uint16 width, uint16 height, uint8 bpp) :
_vm(vm), _width(width), _height(height), _bpp(bpp), _maxWidth(0), _maxHeight(0),
_surface(nullptr), _coordinates(nullptr) {
loadRXY(rxy);
createSurface();
loadCMP(cmp);
}
CMPFile::CMPFile(GobEngine *vm, Common::SeekableReadStream &cmp,
uint16 width, uint16 height, uint8 bpp) :
_vm(vm), _width(width), _height(height), _bpp(bpp), _maxWidth(0), _maxHeight(0),
_surface(nullptr), _coordinates(nullptr) {
createRXY();
createSurface();
loadCMP(cmp);
}
CMPFile::~CMPFile() {
delete _surface;
delete _coordinates;
}
bool CMPFile::empty() const {
return (_surface == nullptr) || (_coordinates == nullptr);
}
uint16 CMPFile::getSpriteCount() const {
if (empty())
return 0;
return _coordinates->size();
}
void CMPFile::loadCMP(const Common::String &cmp) {
Common::SeekableReadStream *dataCMP = _vm->_dataIO->getFile(cmp);
if (!dataCMP)
return;
loadCMP(*dataCMP);
delete dataCMP;
}
void CMPFile::loadRXY(const Common::String &rxy) {
Common::SeekableReadStream *dataRXY = nullptr;
if (!rxy.empty())
dataRXY = _vm->_dataIO->getFile(rxy);
if (dataRXY)
loadRXY(*dataRXY);
else
createRXY();
_height = _coordinates->getHeight();
delete dataRXY;
}
void CMPFile::loadCMP(Common::SeekableReadStream &cmp) {
uint32 size = cmp.size();
byte *data = new byte[size];
if (cmp.read(data, size) != size) {
delete[] data;
return;
}
_vm->_video->drawPackedSprite(data, _surface->getWidth(), _surface->getHeight(), 0, 0, 0, *_surface);
delete[] data;
}
void CMPFile::loadRXY(Common::SeekableReadStream &rxy) {
bool bigEndian = (_vm->getEndiannessMethod() == kEndiannessMethodBE) ||
((_vm->getEndiannessMethod() == kEndiannessMethodSystem) &&
(_vm->getEndianness() == kEndiannessBE));
Common::SeekableReadStreamEndianWrapper sub(&rxy, bigEndian, DisposeAfterUse::NO);
_coordinates = new RXYFile(sub);
for (uint i = 0; i < _coordinates->size(); i++) {
const RXYFile::Coordinates &c = (*_coordinates)[i];
if (c.left == 0xFFFF)
continue;
const uint16 width = c.right - c.left + 1;
const uint16 height = c.bottom - c.top + 1;
_maxWidth = MAX(_maxWidth , width);
_maxHeight = MAX(_maxHeight, height);
}
}
void CMPFile::createRXY() {
_coordinates = new RXYFile(_width, _height);
_maxWidth = _width;
_maxHeight = _height;
}
void CMPFile::createSurface() {
if (_width == 0)
_width = 320;
if (_height == 0)
_height = 200;
_surface = new Surface(_width, _height, _bpp);
}
bool CMPFile::getCoordinates(uint16 sprite, uint16 &left, uint16 &top, uint16 &right, uint16 &bottom) const {
if (empty() || (sprite >= _coordinates->size()))
return false;
left = (*_coordinates)[sprite].left;
top = (*_coordinates)[sprite].top;
right = (*_coordinates)[sprite].right;
bottom = (*_coordinates)[sprite].bottom;
return left != 0xFFFF;
}
uint16 CMPFile::getWidth(uint16 sprite) const {
if (empty() || (sprite >= _coordinates->size()))
return 0;
return (*_coordinates)[sprite].right - (*_coordinates)[sprite].left + 1;
}
uint16 CMPFile::getHeight(uint16 sprite) const {
if (empty() || (sprite >= _coordinates->size()))
return 0;
return (*_coordinates)[sprite].bottom - (*_coordinates)[sprite].top + 1;
}
void CMPFile::getMaxSize(uint16 &width, uint16 &height) const {
width = _maxWidth;
height = _maxHeight;
}
void CMPFile::draw(Surface &dest, uint16 sprite, uint16 x, uint16 y, int32 transp) const {
if (empty())
return;
if (sprite >= _coordinates->size())
return;
const RXYFile::Coordinates &coords = (*_coordinates)[sprite];
draw(dest, coords.left, coords.top, coords.right, coords.bottom, x, y, transp);
}
void CMPFile::draw(Surface &dest, uint16 left, uint16 top, uint16 right, uint16 bottom,
uint16 x, uint16 y, int32 transp) const {
if (!_surface)
return;
if (left == 0xFFFF)
return;
dest.blit(*_surface, left, top, right, bottom, x, y, transp);
}
uint16 CMPFile::addSprite(uint16 left, uint16 top, uint16 right, uint16 bottom) {
if (empty())
return 0;
const uint16 height = bottom - top + 1;
const uint16 width = right - left + 1;
_maxWidth = MAX(_maxWidth , width);
_maxHeight = MAX(_maxHeight, height);
return _coordinates->add(left, top, right, bottom);
}
void CMPFile::recolor(uint8 from, uint8 to) {
if (_surface)
_surface->recolor(from, to);
}
} // End of namespace Gob

105
engines/gob/cmpfile.h Normal file
View File

@@ -0,0 +1,105 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_CMPFILE_H
#define GOB_CMPFILE_H
#include "common/system.h"
#include "common/array.h"
namespace Common {
class String;
class SeekableReadStream;
}
namespace Gob {
class GobEngine;
class Surface;
class RXYFile;
/** A CMP file, containing a sprite.
*
* Used in hardcoded "actiony" parts of gob games.
*/
class CMPFile {
public:
CMPFile(GobEngine *vm, const Common::String &baseName,
uint16 width, uint16 height, uint8 bpp = 1);
CMPFile(GobEngine *vm, const Common::String &cmpFile, const Common::String &rxyFile,
uint16 width, uint16 height, uint8 bpp = 1);
CMPFile(GobEngine *vm, Common::SeekableReadStream &cmp, Common::SeekableReadStream &rxy,
uint16 width, uint16 height, uint8 bpp = 1);
CMPFile(GobEngine *vm, Common::SeekableReadStream &cmp,
uint16 width, uint16 height, uint8 bpp = 1);
~CMPFile();
bool empty() const;
uint16 getSpriteCount() const;
bool getCoordinates(uint16 sprite, uint16 &left, uint16 &top, uint16 &right, uint16 &bottom) const;
uint16 getWidth (uint16 sprite) const;
uint16 getHeight(uint16 sprite) const;
void getMaxSize(uint16 &width, uint16 &height) const;
void draw(Surface &dest, uint16 sprite, uint16 x, uint16 y, int32 transp = -1) const;
void draw(Surface &dest, uint16 left, uint16 top, uint16 right, uint16 bottom,
uint16 x, uint16 y, int32 transp = -1) const;
uint16 addSprite(uint16 left, uint16 top, uint16 right, uint16 bottom);
void recolor(uint8 from, uint8 to);
private:
GobEngine *_vm;
uint16 _width;
uint16 _height;
uint16 _bpp;
uint16 _maxWidth;
uint16 _maxHeight;
Surface *_surface;
RXYFile *_coordinates;
void loadCMP(const Common::String &cmp);
void loadRXY(const Common::String &rxy);
void loadCMP(Common::SeekableReadStream &cmp);
void loadRXY(Common::SeekableReadStream &rxy);
void createRXY();
void createSurface();
};
} // End of namespace Gob
#endif // GOB_CMPFILE_H

View File

@@ -0,0 +1,3 @@
# This file is included from the main "configure" script
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] [components]
add_engine gob "Gobli*ns" yes "" "" "indeo3" "midi"

224
engines/gob/console.cpp Normal file
View File

@@ -0,0 +1,224 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "gob/console.h"
#include "gob/gob.h"
#include "gob/inter.h"
#include "gob/dataio.h"
#include "gob/cheater.h"
namespace Gob {
GobConsole::GobConsole(GobEngine *vm) : GUI::Debugger(), _vm(vm), _cheater(nullptr) {
registerCmd("continue", WRAP_METHOD(GobConsole, cmdExit));
registerCmd("help", WRAP_METHOD(GobConsole, cmd_Help));
registerCmd("varSize", WRAP_METHOD(GobConsole, cmd_varSize));
registerCmd("dumpVars", WRAP_METHOD(GobConsole, cmd_dumpVars));
registerCmd("var8", WRAP_METHOD(GobConsole, cmd_var8));
registerCmd("var16", WRAP_METHOD(GobConsole, cmd_var16));
registerCmd("var32", WRAP_METHOD(GobConsole, cmd_var32));
registerCmd("varString", WRAP_METHOD(GobConsole, cmd_varString));
registerCmd("cheat", WRAP_METHOD(GobConsole, cmd_cheat));
registerCmd("listArchives", WRAP_METHOD(GobConsole, cmd_listArchives));
}
GobConsole::~GobConsole() {
}
void GobConsole::registerCheater(Cheater *cheater) {
_cheater = cheater;
}
void GobConsole::unregisterCheater() {
_cheater = nullptr;
}
bool GobConsole::cmd_Help(int, const char **) {
debugPrintf("Debug\n");
debugPrintf("-----\n");
debugPrintf(" debugflag_list - Lists the available debug flags and their status\n");
debugPrintf(" debugflag_enable - Enables a debug flag\n");
debugPrintf(" debugflag_disable - Disables a debug flag\n");
debugPrintf(" debuglevel - Sets debug level\n");
debugPrintf("\n");
debugPrintf("Commands\n");
debugPrintf("--------\n");
debugPrintf(" continue - returns back to the game\n");
debugPrintf(" listArchives - shows which Archives are currently being used\n");
debugPrintf(" cheat - enables Cheats for Geisha\n");
debugPrintf("\n");
debugPrintf("Variables\n");
debugPrintf("---------\n");
debugPrintf(" varSize - shows the size of a variable in bytes\n");
debugPrintf(" dumpVars - dumps the variables to variables.dmp\n");
debugPrintf(" var8 - manipulates 8-bit variables; usage: var8 <var offset> (<value>)\n");
debugPrintf(" var16 - manipulates 16-bit variables; usage: var16 <var offset> (<value>)\n");
debugPrintf(" var32 - manipulates 32-bit variables; usage: var32 <var offset> (<value>)\n");
debugPrintf(" varString - manipulates string references; usage: varString <var offset> (<value>)\n");
debugPrintf("\n");
return true;
}
bool GobConsole::cmd_varSize(int argc, const char **argv) {
debugPrintf("Size of the variable space: %d bytes\n", _vm->_inter->_variables->getSize());
return true;
}
bool GobConsole::cmd_dumpVars(int argc, const char **argv) {
if (!_vm->_inter->_variables)
return true;
Common::DumpFile file;
const char *outFile = "variables.dmp";
if (!file.open(outFile))
return true;
file.write(_vm->_inter->_variables->getAddressOff8(0), _vm->_inter->_variables->getSize());
file.flush();
file.close();
debugPrintf("Dumped %s successfully to ScummVM directory\n", outFile);
return true;
}
bool GobConsole::cmd_var8(int argc, const char **argv) {
if (argc == 1) {
debugPrintf("Usage: var8 <var offset> (<value>)\n");
return true;
}
uint32 varNum = atoi(argv[1]);
if (varNum >= _vm->_inter->_variables->getSize()) {
debugPrintf("Variable offset out of range\n");
return true;
}
if (argc > 2) {
uint32 varVal = atoi(argv[2]);
_vm->_inter->_variables->writeOff8(varNum, varVal);
}
debugPrintf("var8_%d = %d\n", varNum, _vm->_inter->_variables->readOff8(varNum));
return true;
}
bool GobConsole::cmd_var16(int argc, const char **argv) {
if (argc == 1) {
debugPrintf("Usage: var16 <var offset> (<value>)\n");
return true;
}
uint32 varNum = atoi(argv[1]);
if ((varNum + 1) >= _vm->_inter->_variables->getSize()) {
debugPrintf("Variable offset out of range\n");
return true;
}
if (argc > 2) {
uint32 varVal = atoi(argv[2]);
_vm->_inter->_variables->writeOff16(varNum, varVal);
}
debugPrintf("var16_%d = %d\n", varNum, _vm->_inter->_variables->readOff16(varNum));
return true;
}
bool GobConsole::cmd_var32(int argc, const char **argv) {
if (argc == 1) {
debugPrintf("Usage: var32 <var offset> (<value>)\n");
return true;
}
uint32 varNum = atoi(argv[1]);
if ((varNum + 3) >= _vm->_inter->_variables->getSize()) {
debugPrintf("Variable offset out of range\n");
return true;
}
if (argc > 2) {
uint32 varVal = atoi(argv[2]);
_vm->_inter->_variables->writeOff32(varNum, varVal);
}
debugPrintf("var32_%d = %d\n", varNum, _vm->_inter->_variables->readOff32(varNum));
return true;
}
bool GobConsole::cmd_varString(int argc, const char **argv) {
if (argc == 1) {
debugPrintf("Usage: varString <var offset> (<value>)\n");
return true;
}
uint32 varNum = atoi(argv[1]);
if (varNum >= _vm->_inter->_variables->getSize()) {
debugPrintf("Variable offset out of range\n");
return true;
}
if (argc > 2) {
uint32 maxLength = _vm->_inter->_variables->getSize() - varNum;
Common::strlcpy(_vm->_inter->_variables->getAddressOffString(varNum), argv[2], maxLength);
}
debugPrintf("varString_%d = \"%s\"\n", varNum, _vm->_inter->_variables->getAddressOffString(varNum));
return true;
}
bool GobConsole::cmd_cheat(int argc, const char **argv) {
if (_cheater)
return _cheater->cheat(*this);
return true;
}
bool GobConsole::cmd_listArchives(int argc, const char **argv) {
Common::Array<ArchiveInfo> info;
_vm->_dataIO->getArchiveInfo(info);
debugPrintf(" Archive | Base | FileCount\n");
debugPrintf("--------------------------------\n");
for (Common::Array<ArchiveInfo>::const_iterator it = info.begin(); it != info.end(); ++it)
if (!it->name.empty())
debugPrintf("%13s | %d | %d\n", it->name.c_str(), it->base, it->fileCount);
return true;
}
} // End of namespace Gob

67
engines/gob/console.h Normal file
View File

@@ -0,0 +1,67 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_CONSOLE_H
#define GOB_CONSOLE_H
#include "gui/debugger.h"
namespace Gob {
class GobEngine;
class Cheater;
class GobConsole : public GUI::Debugger {
public:
GobConsole(GobEngine *vm);
~GobConsole(void) override;
void registerCheater(Cheater *cheater);
void unregisterCheater();
private:
GobEngine *_vm;
Cheater *_cheater;
bool cmd_Help(int argc, const char **argv);
bool cmd_varSize(int argc, const char **argv);
bool cmd_dumpVars(int argc, const char **argv);
bool cmd_var8(int argc, const char **argv);
bool cmd_var16(int argc, const char **argv);
bool cmd_var32(int argc, const char **argv);
bool cmd_varString(int argc, const char **argv);
bool cmd_cheat(int argc, const char **argv);
bool cmd_listArchives(int argc, const char **argv);
};
} // End of namespace Gob
#endif

7
engines/gob/credits.pl Normal file
View File

@@ -0,0 +1,7 @@
begin_section("Gob");
add_person("Torbj&ouml;rn Andersson", "eriktorbjorn", "");
add_person("Arnaud Boutonn&eacute;", "Strangerke", "");
add_person("Simon Delamarre", "sdelamarre", "");
add_person("Sven Hesse", "DrMcCoy", "");
add_person("Eugene Sandulenko", "sev", "");
end_section();

264
engines/gob/databases.cpp Normal file
View File

@@ -0,0 +1,264 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/file.h"
#include "common/ptr.h"
#include "common/textconsole.h"
#include "gob/databases.h"
namespace Gob {
TranslationDatabases::TranslationDatabases() {
}
TranslationDatabases::~TranslationDatabases() {
}
void TranslationDatabases::setLanguage(Common::Language language) {
Common::String lang;
if (language == Common::UNK_LANG)
lang = "";
else if (language == Common::EN_ANY)
lang = "E";
else if (language == Common::EN_GRB)
lang = "E";
else if (language == Common::EN_USA)
lang = "E";
else if (language == Common::DE_DEU)
lang = "G";
else if (language == Common::IT_ITA)
lang = "G";
else if (language == Common::FR_FRA)
lang = "F";
else if (language == Common::FR_CAN)
lang = "F";
else
warning("TranslationDatabases::setLanguage(): Language \"%s\" not supported",
Common::getLanguageDescription(language));
if (!_databases.empty() && (lang != _language))
warning("TranslationDatabases::setLanguage(): \"%s\" != \"%s\" and there's still databases open!",
_language.c_str(), lang.c_str());
_language = lang;
}
bool TranslationDatabases::open(const Common::String &id, const Common::Path &file) {
if (_databases.contains(id)) {
warning("TranslationDatabases::open(): A database with the ID \"%s\" already exists", id.c_str());
return false;
}
Common::File dbFile;
if (!dbFile.open(file)) {
warning("TranslationDatabases::open(): No such file \"%s\"", file.toString().c_str());
return false;
}
dBase db;
if (!db.load(dbFile)) {
warning("TranslationDatabases::open(): Failed loading database file \"%s\"", file.toString().c_str());
return false;
}
_databases.setVal(id, Common::StringMap());
DBMap::iterator map = _databases.find(id);
assert(map != _databases.end());
if (!buildMap(db, map->_value)) {
warning("Databases::open(): Failed building a map for database \"%s\"", file.toString().c_str());
_databases.erase(map);
return false;
}
return true;
}
bool TranslationDatabases::close(const Common::String &id) {
DBMap::iterator db = _databases.find(id);
if (db == _databases.end()) {
warning("TranslationDatabases::close(): A database with the ID \"%s\" does not exist", id.c_str());
return false;
}
_databases.erase(db);
return true;
}
bool TranslationDatabases::getString(const Common::String &id, Common::String group,
Common::String section, Common::String keyword, Common::String &result) const {
DBMap::iterator db = _databases.find(id);
if (db == _databases.end()) {
warning("TranslationDatabases::getString(): A database with the ID \"%s\" does not exist", id.c_str());
return false;
}
if (_language.empty()) {
warning("TranslationDatabases::getString(): No language set");
return false;
}
Common::String key = _language + ":" + group + ":" + section + ":" + keyword;
Common::StringMap::const_iterator entry = db->_value.find(key);
if (entry == db->_value.end())
return false;
result = entry->_value;
return true;
}
int TranslationDatabases::findField(const dBase &db, const Common::String &field,
dBase::Type type) const {
const Common::Array<dBase::Field> &fields = db.getFields();
for (uint i = 0; i < fields.size(); i++) {
if (!fields[i].name.equalsIgnoreCase(field))
continue;
if (fields[i].type != type)
return -1;
return i;
}
return -1;
}
bool TranslationDatabases::buildMap(const dBase &db, Common::StringMap &map) const {
int fLanguage = findField(db, "Langage", dBase::kTypeString);
int fGroup = findField(db, "Nom" , dBase::kTypeString);
int fSection = findField(db, "Section", dBase::kTypeString);
int fKeyword = findField(db, "Motcle" , dBase::kTypeString);
int fText = findField(db, "Texte" , dBase::kTypeString);
if ((fLanguage < 0) || (fGroup < 0) || (fSection < 0) || (fKeyword < 0) || (fText < 0))
return false;
const Common::Array<dBase::Record> &records = db.getRecords();
Common::Array<dBase::Record>::const_iterator record;
for (record = records.begin(); record != records.end(); ++record) {
Common::String key;
key += db.getString(*record, fLanguage) + ":";
key += db.getString(*record, fGroup ) + ":";
key += db.getString(*record, fSection ) + ":";
key += db.getString(*record, fKeyword );
map.setVal(key, db.getString(*record, fText));
}
return true;
}
Database::~Database() {
for (auto &node : _tables)
delete node._value;
}
bool Database::openTable(const Common::String &id, const Common::Path &file) {
if (_tables.contains(id)) {
warning("Database::open(): A table with the ID \"%s\" already exists", id.c_str());
return false;
}
Common::File dbFile;
if (!dbFile.open(file)) {
warning("Database::open(): No such file \"%s\"", file.toString().c_str());
return false;
}
Common::ScopedPtr<dBase> db(new dBase());
if (!db->load(dbFile)) {
warning("Database::open(): Failed loading database file \"%s\"", file.toString().c_str());
return false;
}
if (db->hasMemo()) {
Common::String memoPathString = file.toString();
if (!memoPathString.hasSuffixIgnoreCase(".DBF"))
return false;
memoPathString.replace(memoPathString.size() - 3, 3, "DBT");
Common::Path memoFilename(memoPathString);
Common::File memoFile;
if (!memoFile.open(memoFilename)) {
warning("Database::open(): No such file \"%s\"", memoPathString.c_str());
return false;
}
if (!db->loadMemo(memoFile)) {
warning("Database::open(): Failed loading memo file for database \"%s\"", file.toString().c_str());
return false;
}
}
Common::String mdxPathString = file.toString();
if (!mdxPathString.hasSuffixIgnoreCase(".DBF"))
return false;
mdxPathString.replace(mdxPathString.size() - 3, 3, "MDX");
Common::Path mdxFilename(mdxPathString);
Common::File mdxFile;
if (mdxFile.exists(mdxFilename)) {
mdxFile.open(mdxFilename);
db->loadMultipleIndex(mdxFile);
}
_tables.setVal(id, db.release());
return true;
}
bool Database::closeTable(const Common::String &id) {
if (!_tables.contains(id)) {
warning("Database::close(): A table with the ID \"%s\" does not exist", id.c_str());
return false;
}
dBase *db = _tables[id];
delete db;
_tables.erase(id);
return true;
}
dBase *Database::getTable(const Common::String &id) {
Common::HashMap<Common::String, dBase*>::iterator db = _tables.find(id);
if (db == _tables.end()) {
warning("Database::getTable(): A table with the ID \"%s\" does not exist", id.c_str());
return nullptr;
}
return db->_value;
}
} // End of namespace Gob

83
engines/gob/databases.h Normal file
View File

@@ -0,0 +1,83 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_DATABASES_H
#define GOB_DATABASES_H
#include "common/str.h"
#include "common/hashmap.h"
#include "common/hash-str.h"
#include "common/language.h"
#include "gob/dbase.h"
namespace Gob {
class TranslationDatabases {
public:
TranslationDatabases();
~TranslationDatabases();
void setLanguage(Common::Language language);
void setEncodingIsOEM(bool encodingIsOEM) { _encodingIsOEM = encodingIsOEM; }
bool encodingIsOEM() const { return _encodingIsOEM; }
bool open(const Common::String &id, const Common::Path &file);
bool close(const Common::String &id);
bool getString(const Common::String &id, Common::String group,
Common::String section, Common::String keyword, Common::String &result) const;
private:
typedef Common::HashMap<Common::String, Common::StringMap, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> DBMap;
DBMap _databases;
Common::String _language;
bool _encodingIsOEM = true;
int findField(const dBase &db, const Common::String &field, dBase::Type type) const;
bool buildMap(const dBase &db, Common::StringMap &map) const;
};
class Database {
public:
Database() {}
~Database();
bool openTable(const Common::String &id, const Common::Path &file);
bool closeTable(const Common::String &id);
dBase *getTable(const Common::String &id);
private:
Common::HashMap<Common::String, dBase*> _tables;
};
} // End of namespace Gob
#endif // GOB_DATABASES_H

490
engines/gob/dataio.cpp Normal file
View File

@@ -0,0 +1,490 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "common/types.h"
#include "common/bufferedstream.h"
#include "common/memstream.h"
#include "common/substream.h"
#include "gob/dataio.h"
namespace Gob {
DataIO::File::File() : size(0), offset(0), compression(0), archive(nullptr) {
}
DataIO::File::File(const Common::String &n, uint32 s, uint32 o, uint8 c, Archive &a) :
name(n), size(s), offset(o), compression(c), archive(&a) {
}
DataIO::DataIO() {
// Reserve memory for the standard max amount of archives
_archives.reserve(kMaxArchives);
for (int i = 0; i < kMaxArchives; i++)
_archives.push_back(0);
}
DataIO::~DataIO() {
// Close all archives
for (Common::Array<Archive *>::iterator it = _archives.begin(); it != _archives.end(); ++it) {
if (!*it)
continue;
closeArchive(**it);
delete *it;
}
}
void DataIO::getArchiveInfo(Common::Array<ArchiveInfo> &info) const {
info.resize(_archives.size());
for (uint i = 0; i < _archives.size(); i++) {
if (!_archives[i])
continue;
info[i].name = _archives[i]->name;
info[i].base = _archives[i]->base;
info[i].fileCount = _archives[i]->files.size();
}
}
uint32 DataIO::getSizeChunks(Common::SeekableReadStream &src) {
uint32 size = 0;
uint32 chunkSize = 2, realSize;
while (chunkSize != 0xFFFF) {
src.skip(chunkSize - 2);
chunkSize = src.readUint16LE();
realSize = src.readUint16LE();
assert(chunkSize >= 4);
size += realSize;
}
assert(!src.eos());
src.seek(0);
return size;
}
byte *DataIO::unpack(Common::SeekableReadStream &src, int32 &size, uint8 compression, bool useMalloc) {
assert((compression == 1) || (compression == 2));
if (compression == 1)
size = src.readUint32LE();
else if (compression == 2)
size = getSizeChunks(src);
else
size = 0;
assert(size > 0);
byte *data = nullptr;
if (useMalloc)
data = (byte *) malloc(size);
else
data = new byte[size];
if (compression == 1)
unpackChunk(src, data, size);
else if (compression == 2)
unpackChunks(src, data, size);
return data;
}
byte *DataIO::unpack(const byte *src, uint32 srcSize, int32 &size, uint8 compression) {
Common::MemoryReadStream srcStream(src, srcSize);
return unpack(srcStream, size, compression, false);
}
Common::SeekableReadStream *DataIO::unpack(Common::SeekableReadStream &src, uint8 compression) {
int32 size;
byte *data = unpack(src, size, compression, true);
if (!data)
return nullptr;
return new Common::MemoryReadStream(data, size, DisposeAfterUse::YES);
}
void DataIO::unpackChunks(Common::SeekableReadStream &src, byte *dest, uint32 size) {
uint32 chunkSize = 0, realSize;
while (chunkSize != 0xFFFF) {
uint32 pos = src.pos();
chunkSize = src.readUint16LE();
realSize = src.readUint16LE();
assert(chunkSize >= 4);
assert(size >= realSize);
src.skip(2);
unpackChunk(src, dest, realSize);
if (chunkSize != 0xFFFF)
src.seek(pos + chunkSize + 2);
size -= realSize;
dest += realSize;
}
}
void DataIO::unpackChunk(Common::SeekableReadStream &src, byte *dest, uint32 size) {
byte *tmpBuf = new byte[4370]; // 4096 + (256 + 18) = 4096 + (max string length)
assert(tmpBuf);
uint32 counter = size;
uint16 magic1 = src.readUint16LE();
uint16 magic2 = src.readUint16LE();
int16 tmpIndex, extendedLenCmd;
if ((magic1 == 0x1234) && (magic2 == 0x5678)) {
// Extended format allowing to copy larger strings
// from the window (up to 256 + 18 = 274 bytes).
extendedLenCmd = 18;
tmpIndex = 273;
} else {
// Standard format allowing to copy short strings
// (up to 18 bytes) from the window.
extendedLenCmd = 100; // Cannot be matched
tmpIndex = 4078;
src.seek(-4, SEEK_CUR);
}
memset(tmpBuf, 0x20, tmpIndex); // Fill initial window with spaces
uint16 cmd = 0;
while (1) {
cmd >>= 1;
if ((cmd & 0x0100) == 0)
cmd = src.readByte() | 0xFF00;
if ((cmd & 1) != 0) { /* copy */
byte tmp = src.readByte();
*dest++ = tmp;
tmpBuf[tmpIndex] = tmp;
tmpIndex++;
tmpIndex %= 4096;
counter--;
if (counter == 0)
break;
} else { /* copy string */
byte tmp1 = src.readByte();
byte tmp2 = src.readByte();
int16 off = tmp1 | ((tmp2 & 0xF0) << 4);
int16 len = (tmp2 & 0x0F) + 3;
if (len == extendedLenCmd)
len = src.readByte() + 18;
for (int i = 0; i < len; i++) {
*dest++ = tmpBuf[(off + i) % 4096];
counter--;
if (counter == 0) {
delete[] tmpBuf;
return;
}
tmpBuf[tmpIndex] = tmpBuf[(off + i) % 4096];
tmpIndex++;
tmpIndex %= 4096;
}
}
}
delete[] tmpBuf;
}
bool DataIO::openArchive(Common::String name, bool base) {
// Look for a free archive slot
Archive **archive = nullptr;
int i = 0;
for (Common::Array<Archive *>::iterator it = _archives.begin(); it != _archives.end(); ++it, i++) {
if (!*it) {
archive = &*it;
break;
}
}
if (!archive) {
// No free slot, create a new one
warning("DataIO::openArchive(): Need to increase archive count to %d", _archives.size() + 1);
_archives.push_back(0);
Common::Array<Archive *>::iterator it = _archives.end();
archive = &*(--it);
}
// Add extension if necessary
if (!name.contains('.'))
name += ".stk";
// Try to open
*archive = openArchive(Common::Path(name));
if (!*archive)
return false;
(*archive)->base = base;
return true;
}
// A copy of replaceChar utility function from util.cpp
static void replaceChar(char *str, char c1, char c2) {
while ((str = strchr(str, c1)))
*str = c2;
}
DataIO::Archive *DataIO::openArchive(const Common::Path &name) {
Archive *archive = new Archive;
if (!archive->file.open(name)) {
delete archive;
return nullptr;
}
archive->name = name.toString('/');
uint16 fileCount = archive->file.readUint16LE();
for (uint16 i = 0; i < fileCount; i++) {
File file;
char fileName[14];
archive->file.read(fileName, 13);
fileName[13] = '\0';
file.size = archive->file.readUint32LE();
file.offset = archive->file.readUint32LE();
file.compression = archive->file.readByte() != 0;
// Replacing cyrillic characters
replaceChar(fileName, (char) 0x85, 'E');
replaceChar(fileName, (char) 0x8A, 'K');
replaceChar(fileName, (char) 0x8E, 'O');
replaceChar(fileName, (char) 0x91, 'C');
replaceChar(fileName, (char) 0x92, 'T');
file.name = fileName;
// Geisha use 0ot files, which are compressed TOT files without the packed byte set.
if (file.name.hasSuffix(".0OT")) {
file.name.setChar('T', file.name.size() - 3);
file.compression = 2;
}
file.archive = archive;
archive->files.setVal(file.name, file);
}
return archive;
}
bool DataIO::closeArchive(bool base) {
// Look for a matching archive and close it
for (int archive = _archives.size() - 1; archive >= 0; archive--) {
if (_archives[archive] && (_archives[archive]->base == base)) {
closeArchive(*_archives[archive]);
delete _archives[archive];
_archives[archive] = 0;
return true;
}
}
return false;
}
bool DataIO::closeArchive(Archive &archive) {
archive.file.close();
return true;
}
bool DataIO::hasFile(const Common::String &name){
// Look up the files in the opened archives
if (findFile(name))
return true;
// Else, look if a plain file that matches exists
return Common::File::exists(Common::Path(name));
}
int32 DataIO::fileSize(const Common::String &name) {
// Try to find the file in the archives
File *file = findFile(name);
if (file) {
if (file->compression == 0)
return file->size;
// Sanity checks
assert(file->size >= 4);
assert(file->archive);
assert(file->archive->file.isOpen());
// Read the full, unpacked size
file->archive->file.seek(file->offset);
if (file->compression == 2)
file->archive->file.skip(4);
return file->archive->file.readUint32LE();
}
// Else, try to find a matching plain file
Common::File f;
if (!f.open(Common::Path(name)))
return -1;
return f.size();
}
Common::SeekableReadStream *DataIO::getFile(const Common::String &name) {
// Try to open the file in the archives
File *file = findFile(name);
if (file) {
Common::SeekableReadStream *data = getFile(*file);
if (data)
return data;
}
// Else, try to open a matching plain file
Common::File f;
if (!f.open(Common::Path(name)))
return nullptr;
return f.readStream(f.size());
}
byte *DataIO::getFile(const Common::String &name, int32 &size) {
// Try to open the file in the archives
File *file = findFile(name);
if (file) {
byte *data = getFile(*file, size);
if (data)
return data;
}
// Else, try to open a matching plain file
Common::File f;
if (!f.open(Common::Path(name)))
return nullptr;
size = f.size();
byte *data = new byte[size];
if (f.read(data, size) != ((uint32) size)) {
delete[] data;
return nullptr;
}
return data;
}
DataIO::File *DataIO::findFile(const Common::String &name) {
for (int i = _archives.size() - 1; i >= 0; i--) {
Archive *archive = _archives[i];
if (!archive)
// Empty slot
continue;
// Look up the file in the file map
FileMap::iterator file = archive->files.find(name);
if (file != archive->files.end())
return &file->_value;
}
return nullptr;
}
Common::SeekableReadStream *DataIO::getFile(File &file) {
if (!file.archive)
return nullptr;
if (!file.archive->file.isOpen())
return nullptr;
if (!file.archive->file.seek(file.offset))
return nullptr;
Common::SeekableReadStream *rawData =
new Common::SafeSeekableSubReadStream(&file.archive->file, file.offset, file.offset + file.size);
Common::SeekableReadStream *bufferedRawData =
Common::wrapBufferedSeekableReadStream(rawData, 4096, DisposeAfterUse::YES);
if (file.compression == 0)
return bufferedRawData;
Common::SeekableReadStream *unpackedData = unpack(*bufferedRawData, file.compression);
delete bufferedRawData;
return unpackedData;
}
byte *DataIO::getFile(File &file, int32 &size) {
if (!file.archive)
return nullptr;
if (!file.archive->file.isOpen())
return nullptr;
if (!file.archive->file.seek(file.offset))
return nullptr;
size = file.size;
byte *rawData = new byte[file.size];
if (file.archive->file.read(rawData, file.size) != file.size) {
delete[] rawData;
return nullptr;
}
if (file.compression == 0)
return rawData;
byte *unpackedData = unpack(rawData, file.size, size, file.compression);
delete[] rawData;
return unpackedData;
}
} // End of namespace Gob

117
engines/gob/dataio.h Normal file
View File

@@ -0,0 +1,117 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_DATAIO_H
#define GOB_DATAIO_H
#include "common/endian.h"
#include "common/str.h"
#include "common/hashmap.h"
#include "common/array.h"
#include "common/file.h"
namespace Common {
class SeekableReadStream;
}
namespace Gob {
struct ArchiveInfo {
Common::String name;
bool base;
uint32 fileCount;
};
class DataIO {
public:
DataIO();
~DataIO();
void getArchiveInfo(Common::Array<ArchiveInfo> &info) const;
bool openArchive(Common::String name, bool base);
bool closeArchive(bool base);
bool hasFile(const Common::String &name);
int32 fileSize(const Common::String &name);
Common::SeekableReadStream *getFile(const Common::String &name);
byte *getFile(const Common::String &name, int32 &size);
static byte *unpack(const byte *src, uint32 srcSize, int32 &size, uint8 compression = 1);
static Common::SeekableReadStream *unpack(Common::SeekableReadStream &src, uint8 compression = 1);
private:
static const int kMaxArchives = 8;
struct Archive;
struct File {
Common::String name;
uint32 size;
uint32 offset;
uint8 compression;
Archive *archive;
File();
File(const Common::String &n, uint32 s, uint32 o, uint8 c, Archive &a);
};
typedef Common::HashMap<Common::String, File, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> FileMap;
struct Archive {
Common::String name;
Common::File file;
FileMap files;
bool base;
};
Common::Array<Archive *> _archives;
Archive *openArchive(const Common::Path &name);
bool closeArchive(Archive &archive);
File *findFile(const Common::String &name);
Common::SeekableReadStream *getFile(File &file);
byte *getFile(File &file, int32 &size);
static byte *unpack(Common::SeekableReadStream &src, int32 &size, uint8 compression, bool useMalloc);
static uint32 getSizeChunks(Common::SeekableReadStream &src);
static void unpackChunks(Common::SeekableReadStream &src, byte *dest, uint32 size);
static void unpackChunk (Common::SeekableReadStream &src, byte *dest, uint32 size);
};
} // End of namespace Gob
#endif // GOB_DATAIO_H

487
engines/gob/dbase.cpp Normal file
View File

@@ -0,0 +1,487 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "gob/dbase.h"
#include "common/tokenizer.h"
namespace Gob {
dbaseMultipeIndex::dbaseMultipeIndex() {
clear();
}
void dbaseMultipeIndex::clear() {
memset(&_creationDate, 0, sizeof(_creationDate));
memset(&_lastUpdate, 0, sizeof(_lastUpdate));
_version = 0;
}
// Supported key definition syntax:
// key_definition ::= field_definition { "+" field_definition }
// field_definition ::= field_name | STR(field_name, length, 0)
Common::Array<dbaseMultipeIndex::FieldReference> dbaseMultipeIndex::parseKeyDefinition(const Common::String &keyDefinition) {
Common::Array<FieldReference> fieldReferences;
Common::StringTokenizer tokenizer(keyDefinition, "+");
while (!tokenizer.empty()) {
Common::String token = tokenizer.nextToken();
if (token.hasPrefix("STR(")) {
// STR(field_name, length, 0) expression
size_t firstCommaPos = token.find(',');
size_t secondCommaPos = token.find(',', firstCommaPos + 1);
Common::String fieldName = token.substr(4, firstCommaPos - 4);
size_t length = 0;
if (secondCommaPos != token.npos)
length = atoi(token.substr(firstCommaPos + 1, secondCommaPos - firstCommaPos - 1).c_str());
fieldReferences.push_back({fieldName, length});
} else {
// Field name only
fieldReferences.push_back({token, 0});
}
}
return fieldReferences;
}
const Common::Array<dbaseMultipeIndex::FieldReference>* dbaseMultipeIndex::getTagKeyDefinition(Common::String tagName) const {
if (!_tagKeyDefinitions.contains(tagName))
return nullptr;
else
return &_tagKeyDefinitions[tagName];
}
bool dbaseMultipeIndex::load(Common::SeekableReadStream &stream) {
_version = stream.readByte();
_creationDate.tm_year = stream.readByte();
_creationDate.tm_mon = stream.readByte() - 1;
_creationDate.tm_mday = stream.readByte();
uint32 pos = stream.pos();
_dataFilename = stream.readString('\0', 16);
stream.seek(pos + 16);
stream.skip(2); // Block size
stream.skip(2); // Page size
stream.skip(1); // Production flag
stream.skip(1); // Max number of tags
stream.skip(1); // Tag length
stream.skip(1); // Reserved
_nbrOfTagsInUse = stream.readUint16LE(); // Number of tags in use
stream.skip(2); // Reserved
stream.skip(4); // Number of pages in tag file
stream.skip(4); // Pointer to first free page
stream.skip(4); // Number of available blocks
_lastUpdate.tm_year = stream.readByte();
_lastUpdate.tm_mon = stream.readByte() - 1;
_lastUpdate.tm_mday = stream.readByte();
stream.seek(544); // Go past the header (size 32 + 512)
for (int i = 0; i < _nbrOfTagsInUse; ++i) {
uint32 tagHeaderPage = stream.readUint32LE();
Common::String tagName = stream.readString('\0', 11);
stream.skip(1); // key format
stream.skip(1); // forward tag thread inf
stream.skip(1); // forward tag thread sup
stream.skip(1); // backward tag thread
stream.skip(1); // reserved
stream.skip(1); // key type
stream.skip(11); // reserved
int64 tagEntryEnd = stream.pos();
stream.seek(tagHeaderPage * INDEX_PAGE_SIZE);
stream.skip(4); // tag root page
stream.skip(4); // file size in pages
stream.skip(1); // key format
stream.skip(1); // key type
stream.skip(2); // reserved
stream.skip(2); // index key length
stream.skip(2); // max nbr of keys per page
stream.skip(2); // secondary key type
stream.skip(2); // index key item length
stream.skip(3); // reserved
stream.skip(1); // unique flag
Common::String keyExpression = stream.readString('\0', 488);
_tagKeyDefinitions[tagName] = parseKeyDefinition(keyExpression);
// For now, we do not need to read the B-tree structure itself.
// The key definition is enough for our use cases.
stream.seek(tagEntryEnd);
}
return true;
}
dBase::dBase() : _recordData(nullptr) {
clear();
}
dBase::~dBase() {
clear();
}
bool dBase::load(Common::SeekableReadStream &stream) {
clear();
uint32 startPos = stream.pos();
_version = stream.readByte();
if (_version == 0x03 || _version == 0x83) {
_versionMajor = 3;
} else if (_version == 0x04 || _version == 0x7B || _version == 0x8B) {
_versionMajor = 4;
} else {
warning("dBase::load() called on unsupported dBase version %d", _version);
return false;
}
_hasMemo = (_version & 0x80) != 0;
_lastUpdate.tm_year = stream.readByte();
_lastUpdate.tm_mon = stream.readByte() - 1;
_lastUpdate.tm_mday = stream.readByte();
_lastUpdate.tm_hour = 0;
_lastUpdate.tm_min = 0;
_lastUpdate.tm_sec = 0;
uint32 recordCount = stream.readUint32LE();
uint32 headerSize = stream.readUint16LE();
uint32 recordSize = stream.readUint16LE();
stream.skip(20); // Reserved
// Read all field descriptions, 0x0D is the end marker
uint32 fieldsLength = 0;
while (!stream.eos() && !stream.err() && (stream.readByte() != 0x0D)) {
Field field;
stream.seek(-1, SEEK_CUR);
field.name = readString(stream, 11);
field.type = (Type) stream.readByte();
stream.skip(4); // Field data address
field.size = stream.readByte();
field.decimals = stream.readByte();
fieldsLength += field.size;
stream.skip(14); // Reserved and/or useless for us
_fields.push_back(field);
}
if (stream.eos() || stream.err())
return false;
if ((stream.pos() - startPos) != headerSize)
// Corrupted file / unknown format
return false;
if (recordSize != (fieldsLength + 1))
// Corrupted file / unknown format
return false;
_recordData = new byte[recordSize * recordCount];
if (stream.read(_recordData, recordSize * recordCount) != (recordSize * recordCount))
return false;
if (stream.readByte() != 0x1A)
// Missing end marker
return false;
uint32 fieldCount = _fields.size();
// Create the records array
_records.resize(recordCount);
for (uint32 i = 0; i < recordCount; i++) {
Record &record = _records[i];
const byte *data = _recordData + i * recordSize;
char status = *data++;
if ((status != ' ') && (status != '*'))
// Corrupted file / unknown format
return false;
record.deleted = status == '*';
record.fields.resize(fieldCount);
for (uint32 j = 0; j < fieldCount; j++) {
record.fields[j] = data;
data += _fields[j].size;
}
}
return true;
}
bool dBase::loadMemo(Common::SeekableReadStream &stream) {
uint32 nextBlock = stream.readUint32LE();
if (nextBlock < 2)
return true; // No data blocks
uint32 nbrOfDataBlocks = nextBlock - 2;
_memoData.clear();
_memoData.resize(nbrOfDataBlocks * MEMO_BLOCK_SIZE);
for (uint32 i = 1; i < nextBlock; i++) {
stream.seek(i * MEMO_BLOCK_SIZE, SEEK_SET);
uint32 type = stream.readUint32LE();
if (type != 0x8FFFF) {
warning("dBase::loadMemo() found unexpected memo record type %08X", type);
}
int32 memoSize = stream.readSint32LE();
if (memoSize < 8) // Header size (8) is included in memoSize
continue; // Empty memo
_memoData[i - 1] = readString(stream, memoSize - 8);
}
return true;
}
bool dBase::loadMultipleIndex(Common::SeekableReadStream &stream) {
if (_multipleIndex.load(stream)) {
_hasMultipleIndex = true;
return true;
} else
return false;
}
void dBase::clear() {
memset(&_lastUpdate, 0, sizeof(_lastUpdate));
_version = 0;
_hasMemo = false;
_fields.clear();
_records.clear();
delete[] _recordData;
_recordData = nullptr;
}
byte dBase::getVersion() const {
return _version;
}
bool dBase::hasMemo() const {
return _hasMemo;
}
TimeDate dBase::getLastUpdate() const {
return _lastUpdate;
}
const Common::Array<dBase::Field> &dBase::getFields() const {
return _fields;
}
const Common::Array<dBase::Record> &dBase::getRecords() const {
return _records;
}
Common::String dBase::getString(const Record &record, int field) const {
Type type = _fields[field].type;
switch (type) {
case kTypeString: {
uint32 fieldLength = stringLength(record.fields[field], _fields[field].size);
return Common::String((const char *) record.fields[field], fieldLength);
}
case kTypeNumber: {
Common::String str = Common::String((const char *) record.fields[field], _fields[field].size);
str.trim();
return str;
}
case kTypeMemo: {
Common::String blockNbrStr = Common::String((const char *) record.fields[field], _fields[field].size);
int blockNbr = atoi(blockNbrStr.c_str());
if ((blockNbr < 1) || ((size_t) blockNbr > _memoData.size())) {
warning("dBase::getString() called on invalid memo block %d", blockNbr);
return "";
}
return _memoData[blockNbr - 1];
}
default:
// Unsupported type
warning("dBase::getString() called on unsupported field type %d", type);
}
return "";
}
void dBase::setQuery(const Common::String &query) {
_currentFieldFilter.clear();
if (!_hasMultipleIndex) {
warning("dBase::setQuery() called on a database without multiple index");
return;
}
const Common::Array<dbaseMultipeIndex::FieldReference>* keyDefinition = _multipleIndex.getTagKeyDefinition(_currentIndexTag);
if (!keyDefinition) {
warning("dBase::setQuery(): key definition not found for tag '%s'", _currentIndexTag.c_str());
return;
}
// Parse the query. Field separator is ';', catch-all is '?'
Common::StringTokenizer tokenizer(query, ";");
size_t fieldIndex = 0;
while (!tokenizer.empty()) {
Common::String token = tokenizer.nextToken();
if (token != "?") {
if (fieldIndex >= keyDefinition->size()) {
warning("dBase::setQuery(): too many fields in query");
return;
}
const dbaseMultipeIndex::FieldReference &fieldReference = (*keyDefinition)[fieldIndex];
const Common::String &fieldName = fieldReference.getFieldName();
for (size_t i = 0; i < _fields.size(); ++i) {
if (_fields[i].name == fieldName) {
_currentFieldFilter.push_back({i, fieldReference.getMaxLength(), token});
break;
}
if (i == _fields.size() - 1) {
warning("dBase::setQuery(): field '%s' not found", fieldName.c_str());
return;
}
}
}
++fieldIndex;
}
}
void dBase::setCurrentIndex(const Common::String &tagName) {
_currentIndexTag = tagName;
_currentRecordIndex = -1;
_currentFieldFilter.clear();
}
void dBase::findNextMatchingRecord() {
++_currentRecordIndex;
if (_currentFieldFilter.empty()) {
_currentRecordIndex = _records.size();
return;
}
for (; _currentRecordIndex < (int)_records.size(); ++_currentRecordIndex) {
const Record &record = _records[_currentRecordIndex];
bool match = true;
for (const FieldPattern &pattern : _currentFieldFilter) {
if (pattern.fieldIndex >= _fields.size()) {
match = false;
break;
}
Common::String fieldValue = getString(record, pattern.fieldIndex);
if (pattern.maxLength > 0)
fieldValue = fieldValue.substr(0, pattern.maxLength);
if (fieldValue != pattern.pattern) {
match = false;
break;
}
}
if (match)
return;
}
}
void dBase::findFirstMatchingRecord() {
_currentRecordIndex = -1;
findNextMatchingRecord();
}
bool dBase::hasMatchingRecord() {
return _currentRecordIndex >= 0 && _currentRecordIndex < (int) _records.size();
}
Common::String dBase::getFieldOfMatchingRecord(Common::String fieldName) {
if (!hasMatchingRecord())
return "";
const Record &record = _records[_currentRecordIndex];
size_t fieldIndex = 0;
for (const Field &field : _fields) {
if (field.name == fieldName) {
return getString(record, fieldIndex);
}
++fieldIndex;
}
return "";
}
// String fields are padded with spaces. This finds the real length.
inline uint32 dBase::stringLength(const byte *data, uint32 max) {
while (max-- > 0)
if ((data[max] != 0x20) && (data[max] != 0x00))
return max + 1;
return 0;
}
// Read a constant-length string out of a stream.
inline Common::String dBase::readString(Common::SeekableReadStream &stream, int n) {
Common::String str;
char c;
while (n-- > 0) {
if ((c = stream.readByte()) == '\0')
break;
str += c;
}
if (n > 0)
stream.skip(n);
return str;
}
} // End of namespace Gob

174
engines/gob/dbase.h Normal file
View File

@@ -0,0 +1,174 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_DBASE_H
#define GOB_DBASE_H
#include "common/system.h"
#include "common/util.h"
#include "common/str.h"
#include "common/stream.h"
#include "common/array.h"
namespace Gob {
/**
* A class for reading Multiple Index (.mdx) files for dBase.
* Currently, we only read the key definitions, not the actual index data.
*
*/
class dbaseMultipeIndex {
public:
dbaseMultipeIndex();
~dbaseMultipeIndex() {}
bool load(Common::SeekableReadStream &stream);
void clear();
class FieldReference {
public:
FieldReference() : _fieldName(""), _maxLength(0) {}
FieldReference(const Common::String &fieldName, size_t maxLength) : _fieldName(fieldName), _maxLength(maxLength) {}
const Common::String &getFieldName() const { return _fieldName; }
size_t getMaxLength() const { return _maxLength; }
private:
Common::String _fieldName;
size_t _maxLength;
};
static Common::Array<FieldReference> parseKeyDefinition(const Common::String &keyDefinition);
const Common::Array<FieldReference>* getTagKeyDefinition(Common::String tagName) const;
private:
byte _version;
TimeDate _creationDate;
Common::String _dataFilename;
uint16 _nbrOfTagsInUse;
TimeDate _lastUpdate;
static const uint16 INDEX_PAGE_SIZE = 512;
Common::HashMap<Common::String, Common::Array<FieldReference>> _tagKeyDefinitions;
};
/**
* A class for reading dBase files.
*
* Only dBase III files supported for now, and only field type
* string is actually useful.
*/
class dBase {
public:
enum Type {
kTypeString = 0x43, // 'C'
kTypeDate = 0x44, // 'D'
kTypeBool = 0x4C, // 'L'
kTypeMemo = 0x4D, // 'M'
kTypeNumber = 0x4E // 'N'
};
/** A field description. */
struct Field {
Common::String name; ///< Name of the field.
Type type; ///< Type of the field.
uint8 size; ///< Size of raw field data in bytes.
uint8 decimals; ///< Number of decimals the field holds.
};
/** A record. */
struct Record {
bool deleted; ///< Has this record been deleted?
Common::Array<const byte *> fields; ///< Raw field data.
};
struct FieldPattern {
size_t fieldIndex;
size_t maxLength;
Common::String pattern;
};
dBase();
~dBase();
bool load(Common::SeekableReadStream &stream);
bool loadMemo(Common::SeekableReadStream &stream);
bool loadMultipleIndex(Common::SeekableReadStream &stream);
void clear();
byte getVersion() const;
bool hasMemo() const;
/** Return the date the database was last updated. */
TimeDate getLastUpdate() const;
const Common::Array<Field> &getFields() const;
const Common::Array<Record> &getRecords() const;
/** Extract a string out of raw field data. */
Common::String getString(const Record &record, int field) const;
void setQuery(const Common::String &query);
void setCurrentIndex(const Common::String &tagName);
void findFirstMatchingRecord();
void findNextMatchingRecord();
bool hasMatchingRecord();
Common::String getFieldOfMatchingRecord(Common::String fieldName);
private:
byte _version;
byte _versionMajor;
bool _hasMemo;
TimeDate _lastUpdate;
Common::Array<Field> _fields;
Common::Array<Record> _records;
int _currentRecordIndex;
Common::Array<FieldPattern> _currentFieldFilter;
byte *_recordData;
Common::Array<Common::String> _memoData;
Common::String _currentIndexTag;
bool _hasMultipleIndex;
dbaseMultipeIndex _multipleIndex;
static const uint16 MEMO_BLOCK_SIZE = 512;
static inline uint32 stringLength(const byte *data, uint32 max);
static inline Common::String readString(Common::SeekableReadStream &stream, int n);
};
} // End of namespace Gob
#endif // GOB_DBASE_H

187
engines/gob/decfile.cpp Normal file
View File

@@ -0,0 +1,187 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/str.h"
#include "common/stream.h"
#include "common/substream.h"
#include "gob/gob.h"
#include "gob/util.h"
#include "gob/dataio.h"
#include "gob/surface.h"
#include "gob/video.h"
#include "gob/cmpfile.h"
#include "gob/decfile.h"
namespace Gob {
DECFile::DECFile(GobEngine *vm, const Common::String &fileName,
uint16 width, uint16 height, uint8 bpp) : _vm(vm),
_width(width), _height(height), _bpp(bpp), _hasPadding(false), _backdrop(nullptr) {
bool bigEndian = false;
Common::String endianFileName = fileName;
if ((_vm->getEndiannessMethod() == kEndiannessMethodAltFile) &&
!_vm->_dataIO->hasFile(fileName)) {
// If the game has alternate big-endian files, look if one exist
Common::String alternateFileName = fileName;
alternateFileName.setChar('_', 0);
if (_vm->_dataIO->hasFile(alternateFileName)) {
bigEndian = true;
endianFileName = alternateFileName;
}
} else if ((_vm->getEndiannessMethod() == kEndiannessMethodBE) ||
((_vm->getEndiannessMethod() == kEndiannessMethodSystem) &&
(_vm->getEndianness() == kEndiannessBE)))
// Game always little endian or it follows the system and it is big endian
bigEndian = true;
Common::SeekableReadStream *ani = _vm->_dataIO->getFile(endianFileName);
if (ani) {
Common::SeekableReadStreamEndianWrapper sub(ani, bigEndian, DisposeAfterUse::YES);
// The big endian version pads a few fields to even size
_hasPadding = bigEndian;
load(sub, fileName);
return;
}
warning("DECFile::DECFile(): No such file \"%s\" (\"%s\")", endianFileName.c_str(), fileName.c_str());
}
DECFile::~DECFile() {
delete _backdrop;
for (LayerArray::iterator l = _layers.begin(); l != _layers.end(); ++l)
delete *l;
}
void DECFile::load(Common::SeekableReadStreamEndian &dec, const Common::String &fileName) {
dec.skip(2); // Unused
int16 backdropCount = dec.readUint16();
int16 layerCount = dec.readUint16();
// Sanity checks
if (backdropCount > 1)
warning("DECFile::load(): More than one backdrop (%d) in file \"%s\"",
backdropCount, fileName.c_str());
if (layerCount < 1)
warning("DECFile::load(): Less than one layer (%d) in file \"%s\"",
layerCount, fileName.c_str());
// Load the backdrop
if (backdropCount > 0) {
loadBackdrop(dec);
// We only support one backdrop, skip the rest
dec.skip((backdropCount - 1) * (13 + (_hasPadding ? 1 : 0)));
}
// Load the layers
_layers.reserve(MAX(0, layerCount - 1));
for (int i = 0; i < layerCount - 1; i++)
_layers.push_back(loadLayer(dec));
// Load the backdrop parts
if (backdropCount > 0)
loadParts(dec);
}
void DECFile::loadBackdrop(Common::SeekableReadStreamEndian &dec) {
// Interestingly, DEC files reference "FOO.LBM" instead of "FOO.CMP"
Common::String file = Util::setExtension(Util::readString(dec, 13), "");
if (_hasPadding)
dec.skip(1);
_backdrop = new CMPFile(_vm, file, _width, _height, _bpp);
}
CMPFile *DECFile::loadLayer(Common::SeekableReadStreamEndian &dec) {
Common::String file = Util::setExtension(Util::readString(dec, 13), "");
if (_hasPadding)
dec.skip(1);
return new CMPFile(_vm, file, _width, _height, _bpp);
}
void DECFile::loadParts(Common::SeekableReadStreamEndian &dec) {
dec.skip(13); // Name
if (_hasPadding)
dec.skip(1);
dec.skip(13); // File?
if (_hasPadding)
dec.skip(1);
uint16 partCount = dec.readUint16();
_parts.resize(partCount);
for (PartArray::iterator p = _parts.begin(); p != _parts.end(); ++p)
loadPart(*p, dec);
}
void DECFile::loadPart(Part &part, Common::SeekableReadStreamEndian &dec) {
part.layer = dec.readByte() - 1;
part.part = dec.readByte();
dec.skip(1); // Unknown
part.x = dec.readUint16();
part.y = dec.readUint16();
part.transp = dec.readByte() != 0;
}
void DECFile::draw(Surface &dest) const {
drawBackdrop(dest);
for (PartArray::const_iterator p = _parts.begin(); p != _parts.end(); ++p)
drawLayer(dest, p->layer, p->part, p->x, p->y, p->transp ? 0 : -1);
}
void DECFile::drawBackdrop(Surface &dest) const {
if (!_backdrop)
return;
_backdrop->draw(dest, 0, 0, 0);
}
void DECFile::drawLayer(Surface &dest, uint16 layer, uint16 part,
uint16 x, uint16 y, int32 transp) const {
if (layer >= _layers.size())
return;
_layers[layer]->draw(dest, part, x, y, transp);
}
} // End of namespace Gob

106
engines/gob/decfile.h Normal file
View File

@@ -0,0 +1,106 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_DECFILE_H
#define GOB_DECFILE_H
#include "common/system.h"
namespace Common {
class String;
class SeekableReadStreamEndian;
}
namespace Gob {
class GobEngine;
class Surface;
class CMPFile;
/** A DEC file, describing a "decal" (background).
*
* Used in hardcoded "actiony" parts of gob games.
* The principle is similar to a Static in Scenery (see scenery.cpp), but
* instead of referencing indices in the sprites array, DECs reference sprites
* directly by filename.
*/
class DECFile {
public:
DECFile(GobEngine *vm, const Common::String &fileName,
uint16 width, uint16 height, uint8 bpp = 1);
~DECFile();
/** Draw the background, including all default layer parts. */
void draw(Surface &dest) const;
/** Explicitly draw the backdrop. */
void drawBackdrop(Surface &dest) const;
/** Explicitly draw a layer part. */
void drawLayer(Surface &dest, uint16 layer, uint16 part,
uint16 x, uint16 y, int32 transp = -1) const;
private:
struct Part {
uint8 layer;
uint8 part;
uint16 x;
uint16 y;
bool transp;
};
typedef Common::Array<CMPFile *> LayerArray;
typedef Common::Array<Part> PartArray;
GobEngine *_vm;
uint16 _width;
uint16 _height;
uint8 _bpp;
byte _hasPadding;
CMPFile *_backdrop;
LayerArray _layers;
PartArray _parts;
void load(Common::SeekableReadStreamEndian &dec, const Common::String &fileName);
void loadBackdrop(Common::SeekableReadStreamEndian &dec);
CMPFile *loadLayer(Common::SeekableReadStreamEndian &dec);
void loadParts(Common::SeekableReadStreamEndian &dec);
void loadPart(Part &part, Common::SeekableReadStreamEndian &dec);
};
} // End of namespace Gob
#endif // GOB_DECFILE_H

View File

@@ -0,0 +1,69 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "gob/gob.h"
#include "gob/demos/batplayer.h"
#include "gob/global.h"
#include "gob/util.h"
#include "gob/draw.h"
#include "gob/inter.h"
#include "gob/videoplayer.h"
namespace Gob {
BATPlayer::BATPlayer(GobEngine *vm) : DemoPlayer(vm) {
}
BATPlayer::~BATPlayer() {
}
bool BATPlayer::playStream(Common::SeekableReadStream &bat) {
// Iterate over all lines
while (!bat.err() && !bat.eos()) {
Common::String line = bat.readLine();
// Interpret (SLIDE V1.00)
if (lineStartsWith(line, "slide ")) {
playVideo(line.c_str() + 6);
clearScreen();
}
// Mind user input
_vm->_util->processInput();
if (_vm->shouldQuit())
return true;
}
if (bat.err())
return false;
return true;
}
} // End of namespace Gob

View File

@@ -0,0 +1,46 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_BATPLAYER_H
#define GOB_BATPLAYER_H
#include "gob/demos/demoplayer.h"
namespace Gob {
class BATPlayer : public DemoPlayer {
public:
BATPlayer(GobEngine *vm);
~BATPlayer() override;
protected:
bool playStream(Common::SeekableReadStream &bat) override;
};
} // End of namespace Gob
#endif // GOB_BATPLAYER_H

View File

@@ -0,0 +1,312 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "common/file.h"
#include "common/memstream.h"
#include "gob/gob.h"
#include "gob/demos/demoplayer.h"
#include "gob/global.h"
#include "gob/util.h"
#include "gob/draw.h"
#include "gob/inter.h"
#include "gob/videoplayer.h"
#include "gob/sound/sound.h"
namespace Gob {
DemoPlayer::Script DemoPlayer::_scripts[] = {
{kScriptSourceFile, "demo.scn"}, // DOS demo
{kScriptSourceFile, "wdemo.s24"}, // Windows demo
{kScriptSourceFile, "play123.scn"}, // Playtoons 1,2,3 Demo
{kScriptSourceFile, "e.scn"},
{kScriptSourceFile, "i.scn"},
{kScriptSourceFile, "s.scn"},
{kScriptSourceDirect,
"slide machu.imd 20\nslide conseil.imd 20\nslide cons.imd 20\n" \
"slide tumia.imd 1\nslide tumib.imd 1\nslide tumic.imd 1\n" \
"slide tumid.imd 1\nslide post.imd 1\nslide posta.imd 1\n" \
"slide postb.imd 1\nslide postc.imd 1\nslide xdome.imd 20\n" \
"slide xant.imd 20\nslide tum.imd 20\nslide voile.imd 20\n" \
"slide int.imd 20\nslide voila.imd 1\nslide voilb.imd 1\n"}, // Slide IMD demos (Inca 2)
{kScriptSourceFile, "coktelplayer.scn"},
{kScriptSourceFile, "demogb.scn"}, // English demo scene
{kScriptSourceFile, "demoall.scn"}, // German demo scene
{kScriptSourceFile, "demofra.scn"} // French demo scene
};
DemoPlayer::DemoPlayer(GobEngine *vm) : _vm(vm) {
_autoDouble = false;
_doubleMode = false;
_rebase0 = false;
}
DemoPlayer::~DemoPlayer() {
}
bool DemoPlayer::play(const char *fileName) {
if (!fileName)
return false;
debugC(1, kDebugDemo, "Playing \"%s\"", fileName);
init();
Common::File bat;
if (!bat.open(fileName))
return false;
return playStream(bat);
}
bool DemoPlayer::play(uint32 index) {
if (index >= ARRAYSIZE(_scripts))
return false;
Script &script = _scripts[index];
debugC(1, kDebugDemo, "Playing demoIndex %d: %d", index, script.source);
switch (script.source) {
case kScriptSourceFile:
return play(script.script);
case kScriptSourceDirect:
{
Common::MemoryReadStream stream((const byte *)script.script, strlen(script.script));
init();
return playStream(stream);
}
default:
return false;
}
}
bool DemoPlayer::lineStartsWith(const Common::String &line, const char *start) {
return (strstr(line.c_str(), start) == line.c_str());
}
void DemoPlayer::init() {
// The video player needs some fake variables
_vm->_inter->allocateVars(32);
// Init the screen
_vm->_draw->initScreen();
_vm->_draw->_cursorIndex = -1;
_vm->_util->longDelay(200); // Letting everything settle
}
void DemoPlayer::clearScreen() {
debugC(1, kDebugDemo, "Clearing the screen");
_vm->_draw->_backSurface->clear();
_vm->_draw->forceBlit();
_vm->_video->retrace();
}
void DemoPlayer::playVideo(const char *fileName) {
uint32 waitTime = 0;
Common::String filePtr(fileName);
Common::String::iterator file = filePtr.begin();
// Trimming spaces front
while (*file == ' ')
file++;
Common::String::iterator spaceBack = Common::find(file, filePtr.end(), ' ');
if (spaceBack != filePtr.end()) {
Common::String::iterator nextSpace = Common::find(spaceBack, filePtr.end(), ' ');
if (nextSpace != filePtr.end())
*nextSpace = '\0';
*spaceBack++ = '\0';
waitTime = atoi(spaceBack) * 100;
}
debugC(1, kDebugDemo, "Playing video \"%s\"", file);
VideoPlayer::Properties props;
props.x = _rebase0 ? 0 : -1;
props.y = _rebase0 ? 0 : -1;
props.switchColorMode = true;
int slot;
if ((slot = _vm->_vidPlayer->openVideo(true, file, props)) >= 0) {
if (_autoDouble) {
int16 defX = _rebase0 ? 0 : _vm->_vidPlayer->getDefaultX();
int16 defY = _rebase0 ? 0 : _vm->_vidPlayer->getDefaultY();
int16 right = defX + _vm->_vidPlayer->getWidth() - 1;
int16 bottom = defY + _vm->_vidPlayer->getHeight() - 1;
_doubleMode = ((right < 320) && (bottom < 200));
}
if (_doubleMode)
playVideoDoubled(slot);
else
playVideoNormal(slot);
_vm->_vidPlayer->closeVideo(slot);
if (waitTime > 0)
_vm->_util->longDelay(waitTime);
}
}
void DemoPlayer::playADL(const char *params) {
const char *end;
end = strchr(params, ' ');
if (!end)
end = params + strlen(params);
Common::String fileName(params, end);
bool waitEsc = true;
int32 repeat = -1;
if (*end != '\0') {
const char *start = end + 1;
waitEsc = (*start != '0');
end = strchr(start, ' ');
if (end)
repeat = atoi(end + 1);
}
playADL(fileName, waitEsc, repeat);
}
void DemoPlayer::playVideoNormal(int slot) {
VideoPlayer::Properties props;
_vm->_vidPlayer->play(slot, props);
}
void DemoPlayer::playVideoDoubled(int slot) {
Common::String fileNameOpened = _vm->_vidPlayer->getFileName(slot);
_vm->_vidPlayer->closeVideo(slot);
VideoPlayer::Properties props;
props.x = _rebase0 ? 0 : -1;
props.y = _rebase0 ? 0 : -1;
props.flags = VideoPlayer::kFlagScreenSurface;
props.waitEndFrame = false;
_vm->_vidPlayer->evaluateFlags(props);
slot = _vm->_vidPlayer->openVideo(true, fileNameOpened, props);
if (slot < 0)
return;
for (uint i = 0; i < _vm->_vidPlayer->getFrameCount(slot); i++) {
props.startFrame = _vm->_vidPlayer->getCurrentFrame(slot) + 1;
props.lastFrame = _vm->_vidPlayer->getCurrentFrame(slot) + 1;
_vm->_vidPlayer->play(slot, props);
const Common::List<Common::Rect> *rects = _vm->_vidPlayer->getDirtyRects(slot);
if (rects) {
for (Common::List<Common::Rect>::const_iterator rect = rects->begin(); rect != rects->end(); ++rect) {
int16 w = rect->right - rect->left;
int16 h = rect->bottom - rect->top;
int16 wD = (rect->left * 2) + (w * 2);
int16 hD = (rect->top * 2) + (h * 2);
_vm->_draw->_frontSurface->blitScaled(*_vm->_draw->_spritesArray[0],
rect->left, rect->top, rect->right - 1, rect->bottom - 1, rect->left * 2, rect->top * 2, 2);
_vm->_draw->dirtiedRect(_vm->_draw->_frontSurface,
rect->left * 2, rect->top * 2, wD, hD);
}
}
_vm->_video->retrace();
_vm->_util->processInput();
if (_vm->shouldQuit())
break;
int16 key;
bool end = false;
while (_vm->_util->checkKey(key))
if (key == kKeyEscape)
end = true;
if (end)
break;
_vm->_vidPlayer->waitEndFrame(slot);
}
}
void DemoPlayer::playADL(const Common::String &fileName, bool waitEsc, int32 repeat) {
debugC(1, kDebugDemo, "Playing ADL \"%s\" (%d, %d)", fileName.c_str(), waitEsc, repeat);
_vm->_sound->adlibUnload();
_vm->_sound->adlibLoadADL(fileName.c_str());
_vm->_sound->adlibSetRepeating(repeat);
_vm->_sound->adlibPlay();
if (!waitEsc)
return;
int16 key = 0;
while (!_vm->shouldQuit() && (key != kKeyEscape) && _vm->_sound->adlibIsPlaying()) {
_vm->_util->longDelay(1);
while (_vm->_util->checkKey(key))
if (key == kKeyEscape)
break;
}
}
void DemoPlayer::evaluateVideoMode(const char *mode) {
debugC(2, kDebugDemo, "Video mode \"%s\"", mode);
_autoDouble = false;
_doubleMode = false;
// Only applicable when we actually can double
if (_vm->is640x480() || _vm->is800x600()) {
if (!scumm_strnicmp(mode, "AUTO", 4))
_autoDouble = true;
else if (!scumm_strnicmp(mode, "VGA", 3))
_doubleMode = true;
}
}
} // End of namespace Gob

View File

@@ -0,0 +1,84 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_DEMOPLAYER_H
#define GOB_DEMOPLAYER_H
#include "common/str.h"
#include "common/stream.h"
#include "common/hashmap.h"
namespace Gob {
class GobEngine;
class DemoPlayer {
public:
DemoPlayer(GobEngine *vm);
virtual ~DemoPlayer();
bool play(const char *fileName);
bool play(uint32 index);
protected:
GobEngine *_vm;
bool _doubleMode;
bool _autoDouble;
bool _rebase0;
virtual bool playStream(Common::SeekableReadStream &stream) = 0;
bool lineStartsWith(const Common::String &line, const char *start);
void init();
void evaluateVideoMode(const char *mode);
void clearScreen();
void playVideo(const char *fileName);
void playADL(const char *params);
void playVideoNormal(int slot);
void playVideoDoubled(int slot);
void playADL(const Common::String &fileName, bool waitEsc = true, int32 repeat = -1);
private:
enum ScriptSource {
kScriptSourceFile,
kScriptSourceDirect
};
struct Script {
ScriptSource source;
const char *script;
};
static Script _scripts[];
};
} // End of namespace Gob
#endif // GOB_DEMOPLAYER_H

View File

@@ -0,0 +1,124 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "gob/gob.h"
#include "gob/demos/scnplayer.h"
#include "gob/global.h"
#include "gob/util.h"
#include "gob/draw.h"
#include "gob/inter.h"
#include "gob/videoplayer.h"
namespace Gob {
SCNPlayer::SCNPlayer(GobEngine *vm) : DemoPlayer(vm) {
}
SCNPlayer::~SCNPlayer() {
}
bool SCNPlayer::playStream(Common::SeekableReadStream &scn) {
// Read labels
LabelMap labels;
if (!readLabels(scn, labels))
return false;
// Iterate over all lines
while (!scn.err() && !scn.eos()) {
Common::String line = scn.readLine();
// Interpret
if (line == "CLEAR") {
clearScreen();
} else if (lineStartsWith(line, "VIDEO:")) {
evaluateVideoMode(line.c_str() + 6);
} else if (lineStartsWith(line, "IMD_PRELOAD ")) {
playVideo(line.c_str() + 12);
} else if (lineStartsWith(line, "IMD ")) {
playVideo(line.c_str() + 4);
} else if (lineStartsWith(line, "GOTO ")) {
gotoLabel(scn, labels, line.c_str() + 5);
} else if (lineStartsWith(line, "REBASE0:ON")) {
_rebase0 = true;
} else if (lineStartsWith(line, "REBASE0:OFF")) {
_rebase0 = false;
} else if (lineStartsWith(line, "ADL ")) {
playADL(line.c_str() + 4);
}
// Mind user input
_vm->_util->processInput();
if (_vm->shouldQuit())
return true;
}
if (scn.err())
return false;
return true;
}
bool SCNPlayer::readLabels(Common::SeekableReadStream &scn, LabelMap &labels) {
debugC(1, kDebugDemo, "Reading SCN labels");
int32 startPos = scn.pos();
// Iterate over all lines
while (!scn.err() && !scn.eos()) {
Common::String line = scn.readLine();
if (lineStartsWith(line, "LABEL ")) {
// Label => Add to the hashmap
labels.setVal(line.c_str() + 6, scn.pos());
debugC(2, kDebugDemo, "Found label \"%s\" (%d)", line.c_str() + 6, (int)scn.pos());
}
}
if (scn.err())
return false;
// Seek back
if (!scn.seek(startPos))
return false;
return true;
}
void SCNPlayer::gotoLabel(Common::SeekableReadStream &scn,
const LabelMap &labels, const char *label) {
debugC(2, kDebugDemo, "Jumping to label \"%s\"", label);
if (!labels.contains(label))
return;
scn.seek(labels.getVal(label));
}
} // End of namespace Gob

View File

@@ -0,0 +1,57 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_SCNPLAYER_H
#define GOB_SCNPLAYER_H
#include "common/str.h"
#include "common/hashmap.h"
#include "common/hash-str.h"
#include "gob/demos/demoplayer.h"
namespace Gob {
class SCNPlayer : public DemoPlayer {
public:
SCNPlayer(GobEngine *vm);
~SCNPlayer() override;
protected:
bool playStream(Common::SeekableReadStream &scn) override;
private:
typedef Common::HashMap<Common::String, int32, Common::CaseSensitiveString_Hash, Common::CaseSensitiveString_EqualTo> LabelMap;
bool readLabels(Common::SeekableReadStream &scn, LabelMap &labels);
void gotoLabel(Common::SeekableReadStream &scn, const LabelMap &labels, const char *label);
};
} // End of namespace Gob
#endif // GOB_SCNPLAYER_H

View File

@@ -0,0 +1,196 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "base/plugins.h"
#include "engines/advancedDetector.h"
#include "engines/obsolete.h"
#include "gob/dataio.h"
#include "gob/detection/detection.h"
#include "gob/detection/tables.h"
#include "gob/obsolete.h" // Obsolete ID table.
#include "gob/gob.h"
static const DebugChannelDef debugFlagList[] = {
{Gob::kDebugFuncOp, "FuncOpcodes", "Script FuncOpcodes debug level"},
{Gob::kDebugDrawOp, "DrawOpcodes", "Script DrawOpcodes debug level"},
{Gob::kDebugGobOp, "GoblinOpcodes", "Script GoblinOpcodes debug level"},
{Gob::kDebugSound, "Sound", "Sound output debug level"},
{Gob::kDebugExpression, "Expression", "Expression parser debug level"},
{Gob::kDebugGameFlow, "Gameflow", "Gameflow debug level"},
{Gob::kDebugFileIO, "FileIO", "File Input/Output debug level"},
{Gob::kDebugSaveLoad, "SaveLoad", "Saving/Loading debug level"},
{Gob::kDebugGraphics, "Graphics", "Graphics debug level"},
{Gob::kDebugVideo, "Video", "IMD/VMD video debug level"},
{Gob::kDebugHotspots, "Hotspots", "Hotspots debug level"},
{Gob::kDebugDemo, "Demo", "Demo script debug level"},
DEBUG_CHANNEL_END
};
class GobMetaEngineDetection : public AdvancedMetaEngineDetection<Gob::GOBGameDescription> {
public:
GobMetaEngineDetection();
PlainGameDescriptor findGame(const char *gameId) const override {
return Engines::findGameID(gameId, _gameIds, obsoleteGameIDsTable);
}
Common::Error identifyGame(DetectedGame &game, const void **descriptor) override {
Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable);
return AdvancedMetaEngineDetection::identifyGame(game, descriptor);
}
const char *getName() const override {
return "gob";
}
const char *getEngineName() const override;
const char *getOriginalCopyright() const override;
const DebugChannelDef *getDebugChannels() const override {
return debugFlagList;
}
ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
private:
/**
* Inspect the game archives to detect which Once Upon A Time game this is.
*/
static const Gob::GOBGameDescription *detectOnceUponATime(const Common::FSList &fslist);
};
GobMetaEngineDetection::GobMetaEngineDetection() :
AdvancedMetaEngineDetection(Gob::gameDescriptions, gobGames) {
_guiOptions = GUIO2(GUIO_NOLAUNCHLOAD, GAMEOPTION_TTS);
}
ADDetectedGame GobMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
ADDetectedGame detectedGame = detectGameFilebased(allFiles, Gob::fileBased);
if (!detectedGame.desc) {
return ADDetectedGame();
}
const Gob::GOBGameDescription *game = (const Gob::GOBGameDescription *)detectedGame.desc;
if (!strcmp(game->desc.gameId, "onceupon")) {
game = detectOnceUponATime(fslist);
if (game) {
detectedGame.desc = &game->desc;
}
}
return detectedGame;
}
const Gob::GOBGameDescription *GobMetaEngineDetection::detectOnceUponATime(const Common::FSList &fslist) {
// Add the game path to the search manager
SearchMan.clear();
SearchMan.addDirectory(fslist.begin()->getParent());
// Open the archives
Gob::DataIO dataIO;
if (!dataIO.openArchive("stk1.stk", true) ||
!dataIO.openArchive("stk2.stk", true) ||
!dataIO.openArchive("stk3.stk", true)) {
SearchMan.clear();
return nullptr;
}
Gob::OnceUponATime gameType = Gob::kOnceUponATimeInvalid;
Gob::OnceUponATimePlatform platform = Gob::kOnceUponATimePlatformInvalid;
// If these animal files are present, it's Abracadabra
if (dataIO.hasFile("arai.anm") &&
dataIO.hasFile("crab.anm") &&
dataIO.hasFile("crap.anm") &&
dataIO.hasFile("drag.anm") &&
dataIO.hasFile("guep.anm") &&
dataIO.hasFile("loup.anm") &&
dataIO.hasFile("mous.anm") &&
dataIO.hasFile("rhin.anm") &&
dataIO.hasFile("saut.anm") &&
dataIO.hasFile("scor.anm"))
gameType = Gob::kOnceUponATimeAbracadabra;
// If these animal files are present, it's Baba Yaga
if (dataIO.hasFile("abei.anm") &&
dataIO.hasFile("arai.anm") &&
dataIO.hasFile("drag.anm") &&
dataIO.hasFile("fauc.anm") &&
dataIO.hasFile("gren.anm") &&
dataIO.hasFile("rena.anm") &&
dataIO.hasFile("sang.anm") &&
dataIO.hasFile("serp.anm") &&
dataIO.hasFile("tort.anm") &&
dataIO.hasFile("vaut.anm"))
gameType = Gob::kOnceUponATimeBabaYaga;
// Detect the platform by endianness and existence of a MOD file
Common::SeekableReadStream *villeDEC = dataIO.getFile("ville.dec");
if (villeDEC && (villeDEC->size() > 6)) {
byte data[6];
if (villeDEC->read(data, 6) == 6) {
if (!memcmp(data, "\000\000\000\001\000\007", 6)) {
// Big endian -> Amiga or Atari ST
if (dataIO.hasFile("mod.babayaga"))
platform = Gob::kOnceUponATimePlatformAmiga;
else
platform = Gob::kOnceUponATimePlatformAtariST;
} else if (!memcmp(data, "\000\000\001\000\007\000", 6))
// Little endian -> DOS
platform = Gob::kOnceUponATimePlatformDOS;
}
delete villeDEC;
}
SearchMan.clear();
if ((gameType == Gob::kOnceUponATimeInvalid) || (platform == Gob::kOnceUponATimePlatformInvalid)) {
warning("GobMetaEngineDetection::detectOnceUponATime(): Detection failed (%d, %d)",
(int)gameType, (int)platform);
return nullptr;
}
return &Gob::fallbackOnceUpon[gameType][platform];
}
const char *GobMetaEngineDetection::getEngineName() const {
return "Gob";
}
const char *GobMetaEngineDetection::getOriginalCopyright() const {
return "Goblins Games (C) 1984-2011 Coktel Vision";
}
REGISTER_PLUGIN_STATIC(GOB_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, GobMetaEngineDetection);

View File

@@ -0,0 +1,114 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_DETECTION_H
#define GOB_DETECTION_H
#include "engines/advancedDetector.h"
namespace Gob {
// WARNING: Reordering these will invalidate save games!
// Add new games to the bottom of the list.
enum GameType {
kGameTypeNone = 0,
kGameTypeGob1,
kGameTypeGob2,
kGameTypeGob3,
kGameTypeWoodruff,
kGameTypeBargon,
kGameTypeWeen,
kGameTypeLostInTime,
kGameTypeInca2,
kGameTypeDynasty,
kGameTypeUrban,
kGameTypePlaytoons,
kGameTypeBambou,
kGameTypeFascination,
kGameTypeGeisha,
kGameTypeAdi2,
kGameTypeAdi4,
kGameTypeAdibou2,
kGameTypeAdibou1,
kGameTypeAbracadabra,
kGameTypeBabaYaga,
kGameTypeLittleRed,
kGameTypeOnceUponATime, // Need more inspection to see if Baba Yaga or Abracadabra
//kGameTypeAJWorld -> Deprecated, duplicated with kGameTypeAdibou1
kGameTypeCrousti = 24, // Explicit value needed to not invalidate save games after removing kGameTypeAJWorld
kGameTypeDynastyWood,
kGameTypeAdi1
};
enum Features {
kFeaturesNone = 0,
kFeaturesCD = 1 << 0,
kFeaturesEGA = 1 << 1,
kFeaturesAdLib = 1 << 2,
kFeaturesSCNDemo = 1 << 3,
kFeaturesBATDemo = 1 << 4,
kFeatures640x480 = 1 << 5,
kFeatures800x600 = 1 << 6,
kFeaturesTrueColor = 1 << 7,
kFeatures16Colors = 1 << 8,
kFeatures640x400 = 1 << 9,
};
enum AdditionalGameFlags {
GF_ENABLE_ADIBOU2_FREE_BANANAS_WORKAROUND = 1 << 0,
GF_ENABLE_ADIBOU2_FLOWERS_INFINITE_LOOP_WORKAROUND = 1 << 1,
};
struct GOBGameDescription {
ADGameDescription desc;
int32 features;
const char *startStkBase;
const char *startTotBase;
uint32 demoIndex;
uint32 sizeBuffer() const {
uint32 ret = desc.sizeBuffer();
ret += ADDynamicDescription::strSizeBuffer(startStkBase);
ret += ADDynamicDescription::strSizeBuffer(startTotBase);
return ret;
}
void *toBuffer(void *buffer) {
buffer = desc.toBuffer(buffer);
buffer = ADDynamicDescription::strToBuffer(buffer, startStkBase);
buffer = ADDynamicDescription::strToBuffer(buffer, startTotBase);
return buffer;
}
};
#define GAMEOPTION_COPY_PROTECTION GUIO_GAMEOPTIONS1
#define GAMEOPTION_TTS GUIO_GAMEOPTIONS2
} // End of namespace Gob
#endif // GOB_DETECTION_H

View File

@@ -0,0 +1,162 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_DETECTION_TABLES_H
#define GOB_DETECTION_TABLES_H
// Struct "GOBGameDescription"
#include "gob/detection/detection.h"
using namespace Common;
// Game IDs and proper names
static const PlainGameDescriptor gobGames[] = {
{"gob1", "Gobliiins"},
{"gob2", "Gobliins 2"},
{"gob3", "Goblins Quest 3"},
{"ween", "Ween: The Prophecy"},
{"bargon", "Bargon Attack"},
{"babayaga", "Once Upon A Time: Baba Yaga"},
{"abracadabra", "Once Upon A Time: Abracadabra"},
{"englishfever", "English Fever"},
{"littlered", "Once Upon A Time: Little Red Riding Hood"},
{"onceupon", "Once Upon A Time"},
{"crousti", "Croustibat"},
{"lit", "Lost in Time"},
{"lit1", "Lost in Time Part 1"},
{"lit2", "Lost in Time Part 2"},
{"nathanvacances", "Nathan Vacances"},
{"inca2", "Inca II: Wiracocha"},
{"woodruff", "The Bizarre Adventures of Woodruff and the Schnibble"},
{"dynasty", "The Last Dynasty"},
{"dynastywood", "Woodruff and The Last Dynasty"},
{"urban", "Urban Runner"},
{"playtoons1", "Playtoons 1 - Uncle Archibald"},
{"playtoons2", "Playtoons 2 - The Case of the Counterfeit Collaborator"},
{"playtoons3", "Playtoons 3 - The Secret of the Castle"},
{"playtoons4", "Playtoons 4 - The Mandarine Prince"},
{"playtoons5", "Playtoons 5 - The Stone of Wakan"},
{"playtnck1", "Playtoons Construction Kit 1 - Monsters"},
{"playtnck2", "Playtoons Construction Kit 2 - Knights"},
{"playtnck3", "Playtoons Construction Kit 3 - Far West"},
{"playtoonsdemo", "Playtoons Demo"},
{"magicstones", "The Land of the Magic Stones"},
{"bambou", "Playtoons Limited Edition - Bambou le sauveur de la jungle"},
{"fascination", "Fascination"},
{"geisha", "Geisha"},
{"adi1", "ADI 1"},
{"adi2", "ADI 2"},
{"adi4", "ADI 4"},
// {"adi4mathlanguage78", "ADI 4 Math & Language 7-8 years"},
{"adi4mathlanguage89", "ADI 4 Math & Language 8-9 years"},
// {"adi4mathlanguage910", "ADI 4 Math & Language 9-10 years"},
{"adi4mathlanguage1011", "ADI 4 Math & Language 10-11 years"},
// {"adi4mathlanguage1112", "ADI 4 Math & Language 11-12 years"},
// {"adi4mathlanguage1213", "ADI 4 Math & Language 12-13 years"},
// {"adi4mathlanguage1314", "ADI 4 Math & Language 13-14 years"},
// {"adi4mathlanguage1415", "ADI 4 Math & Language 14-15 years"},
// {"adi4anglais79", "ADI 4 Anglais 7-9 years"},
{"adi4anglais911", "ADI 4 Anglais 9-11 years"},
// {"adi4anglais1112", "ADI 4 Anglais 11-12 years"},
// {"adi4anglais1213", "ADI 4 Anglais 12-13 years"},
// {"adi4anglais1314", "ADI 4 Anglais 13-14 years"},
// {"adi4anglais1415", "ADI 4 Anglais 14-15 years"},
{"adi4geo", "ADI 4 Geography"},
// {"adi4sciences", "ADI 4 Sciences"},
{"adi4euro", "ADI 4 Euro"},
{"adi5", "ADI 5"},
{"adi5language", "ADI 5 Language"},
{"adi5anglais", "ADI 5 Anglais"},
{"adibou1", "Adibou 1"},
{"adibou1read45", "Adibou 1 Read 4-5 years"},
{"adibou1count45", "Adibou 1 Count 4-5 years"},
{"adibou1read67", "Adibou 1 Read 6-7 years"},
{"adibou1count67", "Adibou 1 Count 6-7 years"},
{"adibou2", "Adibou 2"},
{"adibou2readcount45", "Adibou 2 Read/Count 4-5 years"},
{"adibou2readcount67", "Adibou 2 Read/Count 6-7 years"},
{"adibou2sciences", "Adibou 2 Nature & Sciences"},
{"adibou2anglais", "Adibou 2 Anglais"},
{"adibou2music", "Adibou 2 Music"},
{"adibou3", "Adibou 3"},
{"adibou3readcount45", "Adibou 3 Read/Count 4-5 years"},
{"adibou3readcount56", "Adibou 3 Read/Count 5-6 years"},
{"adibou3readcount67", "Adibou 3 Read/Count 6-7 years"},
{"adibou3sciences", "Adibou 3 Nature & Sciences"},
{"adibou3music", "Adibou 3 Music"},
{"adibou3anglais", "Adibou 3 Anglais"},
{"adiboucuisine", "Adibou présente la Cuisine"},
{"adiboudessin", "Adibou présente le Dessin"},
{"adiboumagie", "Adibou présente la Magie"},
{"adiboudchoumer", "Adiboud'chou a la mer"},
{"adiboudchoubanquise", "Adiboud'chou sur la banquise"},
{"adiboudchoucampagne", "Adiboud'chou a la campagne"},
{"adiboudchoujunglesavane", "Adiboud'chou dans la jungle et la savane"},
{0, 0}
};
namespace Gob {
// Detection tables
static const GOBGameDescription gameDescriptions[] = {
#include "gob/detection/tables_gob1.h" // Gobliiins
#include "gob/detection/tables_gob2.h" // Gobliins 2: The Prince Buffoon
#include "gob/detection/tables_gob3.h" // Goblins 3 / Goblins Quest 3
#include "gob/detection/tables_ween.h" // Ween: The Prophecy
#include "gob/detection/tables_bargon.h" // Bargon Attack
#include "gob/detection/tables_littlered.h" // Once Upon A Time: Little Red Riding Hood
#include "gob/detection/tables_onceupon.h" // Once Upon A Time: Baba Yaga and Abracadabra
#include "gob/detection/tables_lit.h" // Lost in Time
#include "gob/detection/tables_nathanvacances.h" // Nathan Vacances series
#include "gob/detection/tables_fascin.h" // Fascination
#include "gob/detection/tables_geisha.h" // Geisha
#include "gob/detection/tables_inca2.h" // Inca II: Wiracocha
#include "gob/detection/tables_woodruff.h" // (The Bizarre Adventures of) Woodruff and the Schnibble (of Azimuth)
#include "gob/detection/tables_dynasty.h" // The Last Dynasty
#include "gob/detection/tables_urban.h" // Urban Runner
#include "gob/detection/tables_playtoons.h" // The Playtoons series
#include "gob/detection/tables_magicstones.h" // Le pays des Pierres Magiques / The Land of the Magic Stones
#include "gob/detection/tables_englishfever.h" // English Fever
#include "gob/detection/tables_adi1.h" // The ADI 1 series
#include "gob/detection/tables_adi2.h" // The ADI 2 series
#include "gob/detection/tables_adi4.h" // The ADI / Addy 4 series
#include "gob/detection/tables_adi5.h" // The ADI / Addy 5 series
#include "gob/detection/tables_adibou1.h" // Adibou 1 / A.J.'s World of Discovery / ADI Jr.
#include "gob/detection/tables_adibou2.h" // The Adibou 2 / Addy Junior series
#include "gob/detection/tables_adibou3.h" // Adibou 3 / Adiboo 3 series
#include "gob/detection/tables_adiboupresente.h" // Adibou présente series
#include "gob/detection/tables_adiboudchou.h" // Adiboud'chou / Addy Buschu series
#include "gob/detection/tables_crousti.h" // Croustibat
{ AD_TABLE_END_MARKER, kFeaturesNone, 0, 0, 0}
};
// File-based fallback tables
#include "gob/detection/tables_fallback.h"
}
#endif // GOB_DETECTION_TABLES_H

View File

@@ -0,0 +1,230 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for the ADI 1 series. */
/* These games are part of the Adi series. For more information, refer to our wiki: https://wiki.scummvm.org/index.php?title=Adi_Games */
#ifndef GOB_DETECTION_TABLES_ADI1_H
#define GOB_DETECTION_TABLES_ADI1_H
// -- French: ADI --
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // CE1
AD_ENTRY1s("adi2.stk", "77f2b5baa30f02eecf0a94f05316c031", 334671),
FR_FRA,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // CE2
AD_ENTRY1s("adi2.stk", "1f22d389a3f0857cacb25bb174107145", 323562),
FR_FRA,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // CM1
AD_ENTRY1s("adi2.stk", "78125e8b87dad64d014648883a553b87", 327022),
FR_FRA,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // CM2
AD_ENTRY1s("adi2.stk", "9084badfe3631ece4598c4016dcee4eb", 335032),
FR_FRA,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // 3ème
AD_ENTRY1s("adi2.stk", "37de6bae596262071ad23131dc85e505", 334432),
FR_FRA,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // 4ème
AD_ENTRY1s("adi2.stk", "d662248b3b27e53fccd5355351075236", 344496),
FR_FRA,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // 5ème
AD_ENTRY1s("adi2.stk", "38ebd0ae0bdd0facee0084e305bf5152", 335780),
FR_FRA,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // 6ème
AD_ENTRY1s("adi2.stk", "2f24f14c58a062ab25dab7de8fb2489b", 335780),
FR_FRA,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // ADIBAC
AD_ENTRY1s("adi2.stk", "93377cd4582554258ed421239760a434", 307512),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
// -- English: ADI --
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // English 12/13
AD_ENTRY1s("adi2.stk", "a3e04e7c575fff9e42d6912d127c2e30", 324550),
EN_GRB,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
// -- Italian: ADÍ --
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED,
AD_ENTRY1s("adi2.stk", "955fd172fb2bae38e25d80e6584fca9e", 319718),
IT_ITA,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Matematica 2a
AD_ENTRY1s("adi2.stk", "ff6bc3bd581c686a2796c4b6aee9e27d", 329888),
IT_ITA,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
// -- Spanish: Adi --
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Lengua Espanola 6
AD_ENTRY1s("adi2.stk", "bbbe5880b2f62145f8f84b63e5105c95", 317067),
ES_ESP,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi1",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Lengua Espanola 8
AD_ENTRY1s("adi2.stk", "d5c1f812093b751a445d110734b69519", 327672),
ES_ESP,
kPlatformDOS,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeaturesEGA,
"adi2.stk", "ediintro.tot", 0
},
#endif // GOB_DETECTION_TABLES_ADI1_H

View File

@@ -0,0 +1,309 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for the ADI 2 series. */
/* These games are part of the Adi series. For more information, refer to our wiki: https://wiki.scummvm.org/index.php?title=Adi_Games */
#ifndef GOB_DETECTION_TABLES_ADI2_H
#define GOB_DETECTION_TABLES_ADI2_H
// -- French: Adi --
{
{
"adi2",
"Adi 2.0 for Teachers",
AD_ENTRY1s("adi2.stk", "da6f1fb68bff32260c5eecdf9286a2f5", 1533168),
FR_FRA,
kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
kFeaturesNone,
"adi2.stk", "ediintro.tot", 0
},
{ // Found in french ADI 2 Francais-Maths CM1. Exact version not specified.
{
"adi2",
"Adi 2",
AD_ENTRY1s("adi2.stk", "23f279615c736dc38320f1348e70c36e", 10817668),
FR_FRA,
kPlatformDOS,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
{ // Found in french ADI 2 Francais-Maths CE2. Exact version not specified.
{
"adi2",
"Adi 2",
AD_ENTRY1s("adi2.stk", "d4162c4298f9423ecc1fb04965557e90", 11531214),
FR_FRA,
kPlatformDOS,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi2",
"Adi 2.5",
AD_ENTRY1s("adi2.stk", "fcac60e6627f37aee219575b60859de9", 16944268),
FR_FRA,
kPlatformDOS,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi2",
"Adi 2.5",
AD_ENTRY1s("adi2.stk", "072d5e2d7826a7c055865568ebf918bb", 16934596),
FR_FRA,
kPlatformDOS,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi2",
"Adi 2.6",
AD_ENTRY1s("adi2.stk", "2fb940eb8105b12871f6b88c8c4d1615", 16780058),
FR_FRA,
kPlatformDOS,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
// -- German: ADI Spielerisch lernen --
{
{
"adi2",
"Adi 2.6",
AD_ENTRY1s("adi2.stk", "fde7d98a67dbf859423b6473796e932a", 18044780),
DE_DEU,
kPlatformDOS,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
{
{ // 1994 CD version - Supplied by BJNFNE
"adi2",
"Adi 2 (CD)",
AD_ENTRY1s("adi2.stk", "157a26943a021d92f5c76f6eb8f18f2a", 12960390),
DE_DEU,
kPlatformWindows,
ADGF_UNSTABLE | ADGF_CD,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi2",
"Adi 2.7.1",
AD_ENTRY1s("adi2.stk", "6fa5dffebf5c7243c6af6b8c188ee00a", 19278008),
FR_FRA,
kPlatformDOS,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
{
{ // Supplied by Indy4-Fan
"adi2",
"Adi 2.5",
AD_ENTRY1s("adi2.stk", "f44526b8ce3a96f966ffce0ba81d6d25", 16918426),
DE_DEU,
kPlatformWindows,
ADGF_UNSTABLE | ADGF_CD,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi2",
"Adi 2.5",
AD_ENTRY1s("adi2.stk", "be80ec9c50d750b3713df6b44b74e345", 16918998),
DE_DEU,
kPlatformWindows,
ADGF_UNSTABLE | ADGF_CD,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi2",
"Adi 2.6",
AD_ENTRY1s("adi2.stk", "4ab5a6d75c6a863706fa156da72d0cf3", 16919534),
DE_DEU,
kPlatformWindows,
ADGF_UNSTABLE | ADGF_CD,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi2",
"Adi 2.6",
AD_ENTRY1s("adi2.stk", "e02f8adaef95a668e31a0bc4ce3ba178", 17914610),
DE_DEU,
kPlatformWindows,
ADGF_UNSTABLE | ADGF_CD,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
// -- Spanish: Adi --
{
{
"adi2",
"Adi 2",
AD_ENTRY1s("adi2.stk", "2a40bb48ccbd4e6fb3f7f0fc2f069d80", 17720132),
ES_ESP,
kPlatformDOS,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
// -- English: ADI (Amiga) --
{
{
"adi2",
"Adi 2",
AD_ENTRY1s("adi2.stk", "29694c5a649298a42f87ae731d6d6f6d", 311132),
EN_ANY,
kPlatformAmiga,
ADGF_UNSTABLE,
GUIO0()
},
kFeaturesNone,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi2", // This version comes from the Sierra's Schoolhouse Math - Supplied by BJNFNE
"Adi 2",
AD_ENTRY1s("adi2.stk", "da5c5b4a6b56ed34d10ae5e0acfb9f8d", 11690760),
EN_USA,
kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
{
{
"adi2", // This version comes from the Sierra's Schoolhouse Math - Supplied by BJNFNE
"Adi 2 Math",
AD_ENTRY1s("adi2.stk", "0f102a6e4fac493162dfb70144c662bf", 12112994),
EN_USA,
kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
kFeatures640x400,
"adi2.stk", "ediintro.tot", 0
},
// -- Demos --
{
{
"adi2",
"Non-Interactive Demo",
AD_ENTRY1s("demo.scn", "8b5ba359fd87d586ad39c1754bf6ea35", 168),
EN_ANY,
kPlatformDOS,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
0, 0, 1
},
{
{ // Supplied by BJNFNE
"adi2",
"Non-Interactive Demo",
AD_ENTRY1s("demo.scn", "16331b4db31b153f241ebcee49b7383d", 170),
DE_DEU,
kPlatformDOS,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
0, 0, 1
},
{
{ // Supplied by BJNFNE
"adi2",
"Non-Interactive Demo",
AD_ENTRY1s("demo.scn", "8b5ba359fd87d586ad39c1754bf6ea35", 168),
FR_FRA,
kPlatformDOS,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
0, 0, 1
},
#endif // GOB_DETECTION_TABLES_ADI2_H

View File

@@ -0,0 +1,362 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for the ADI / Addy 4 series. */
/* This Game uses the DEV6 Engine, more Information can be found here: https://wiki.scummvm.org/index.php?title=DEV6_Information */
/* These games are part of the Adi series. For more information, refer to our wiki: https://wiki.scummvm.org/index.php?title=Adi_Games */
#ifndef GOB_DETECTION_TABLES_ADI4_H
#define GOB_DETECTION_TABLES_ADI4_H
// -- French: Adi --
{
{
"adi4",
"Adi 4.00 Collège",
AD_ENTRY1s("intro.stk", "a3c35d19b2d28ea261d96321d208cb5a", 6021466),
FR_FRA,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"adi4",
"Adi 4.00",
AD_ENTRY1s("intro.stk", "44491d85648810bc6fcf84f9b3aa47d5", 5834944),
FR_FRA,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"adi4",
"Adi 4.00 École",
AD_ENTRY1s("intro.stk", "29374c0e3c10b17dd8463b06a55ad093", 6012072),
FR_FRA,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"adi4",
"Adi 4.00 Limited Edition",
AD_ENTRY1s("intro.stk", "ebbbc5e28a4adb695535ed989c1b8d66", 5929644),
FR_FRA,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"adi4",
"ADI 4.10",
AD_ENTRY1s("intro.stk", "6afc2590856433b9f5295b032f2b205d", 5923112),
FR_FRA,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"adi4",
"ADI 4.11",
AD_ENTRY1s("intro.stk", "6296e4be4e0c270c24d1330881900c7f", 5921234),
FR_FRA,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"adi4",
"ADI 4.21",
AD_ENTRY1s("intro.stk", "c5b9f6222c0b463f51dab47317c5b687", 5950490),
FR_FRA,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
// -- German: Addy --
{
{ // Supplied by Indy4-Fan
"adi4",
"Addy 4.00 Erdkunde",
AD_ENTRY1s("intro.stk", "fda1566d233ee55d65b2ad014c1cb485", 188),
DE_DEU,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, "GA2INTRO.TOT", 0
},
{
{ // Supplied by fischbeck
"adi4",
"Addi Simule", // That is not an typo in the name "Addi" that's how this version is called.
AD_ENTRY1s("simule.stk", "66d97fe54bbf8ea4bbb18534cb28b13f", 2523796),
DE_DEU,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
"simule.stk", "INTRODD.TOT", 0 // INTRODD.TOT brings up a main menu to select various environmental learning tasks.
},
{
{
"adi4",
"Addy 4 Grundschule Basisprogramm",
AD_ENTRY1s("intro.stk", "d2f0fb8909e396328dc85c0e29131ba8", 5847588),
DE_DEU,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"adi4",
"Addy 4.01 Sekundarstufe Basisprogramm",
AD_ENTRY1s("intro.stk", "367340e59c461b4fa36651cd74e32c4e", 5847378),
DE_DEU,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"adi4",
"Addy 4.21 Sekundarstufe Basisprogramm",
AD_ENTRY1s("intro.stk", "534f0b674cd4830df94a9c32c4ea7225", 6878034),
DE_DEU,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
// -- English: ADI --
{
{
"adi4",
"ADI 4.10",
AD_ENTRY1s("intro.stk", "3e3fa9656e37d802027635ace88c4cc5", 5359144),
EN_GRB,
kPlatformWindows,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
// -- Demos --
{
{
"adi4",
"Adi 4.00 Interactive Demo",
AD_ENTRY1s("intro.stk", "89ace204dbaac001425c73f394334f6f", 2413102),
FR_FRA,
kPlatformWindows,
ADGF_DEMO | ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"adi4",
"Adi 4.00 / Adibou 2 Demo",
AD_ENTRY1s("intro.stk", "d41d8cd98f00b204e9800998ecf8427e", 0),
FR_FRA,
kPlatformWindows,
ADGF_DEMO | ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
// -- Add-ons : "Math & Language" --
// 8-9 years
{
{
"adi4mathlanguage89",
"", // Français Maths CE2
AD_ENTRY2s("ADIF91.STK", "f5e4d0e38e96cb9ea3fdb122548a7775", 19707056,
"ADIM91.STK", "2f839dffcded30680456d0e881f16f31", 27322360),
FR_FRA,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSTABLE,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// 9-10 years
// 10-11 years
{
{
"adi4mathlanguage1011",
"", // Français Maths CM2
AD_ENTRY2s("ADIF71.STK", "a0dc766e42025271df54f4e705e530e5", 13668920,
"ADIM71.STK", "d093bf3b38c668d9f89ae1118b2dfc95", 21544420),
FR_FRA,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSTABLE,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// 11-12 years
// 12-13 years
// 13-14 years
// 14-15 years
// -- Add-ons : "Anglais" (English for non-native speakers) --
// 7-9 years
// 9-11 years
{
{
"adi4anglais911",
"",
AD_ENTRY2s("A71RAN.STK", "1c16f54d71ed3d2fa49fe4d8ff4884ae", 100144,
"ADIA71.STK", "9cc17a7ccbf157c1742387ce133205fd", 21661580),
FR_FRA,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSTABLE,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// 11-12 years
// 12-13 years
// 13-14 years
// 14-15 years
// -- Add-ons : Geography --
{
{
"adi4geo",
"", // Géographie
AD_ENTRY2s("INTROGEO.STK", "d86d0f53818dd285bebff25925627b8c", 3170680,
"INTROGEO.ITK", "5daacbf8840f811e48b99e1d92933873", 20084736),
FR_FRA,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSTABLE,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adi4geo",
"", // Erdkunde
AD_ENTRY2s("INTROGEO.STK", "f01ffe9366df86a7ea5ed425b41081ba", 3284478,
"INTROGEO.ITK", "998bb8e759d5b8b4e7aa22d6030f2dad", 22046720),
DE_DEU,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSTABLE,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// -- Add-ons : Sciences --
// -- Add-ons : Euro --
{
{
"adi4euro",
"", // Der Euro
AD_ENTRY2s("EURO.STK", "7dac3823570036c6eda57cc2c872aa59", 681944,
"EURO.ITK", "09629a0aa35a00f68211f6429bd43e9f", 25409536),
DE_DEU,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSTABLE,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_ADI4_H

View File

@@ -0,0 +1,202 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Adi 5 / Addy 5 series. */
/* This Game uses the DEV7 Engine, more Information can be found here: https://wiki.scummvm.org/index.php?title=DEV7_Information */
/* These games are part of the Adi series. For more information, refer to our wiki: https://wiki.scummvm.org/index.php?title=Adi_Games */
#ifndef GOB_DETECTION_TABLES_ADI5_H
#define GOB_DETECTION_TABLES_ADI5_H
// -- French: Adi 5 --
{
{ // Supplied by BJNFNE
"adi5",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adi 5 5.01 (Engine: DEV7 version unknown)
AD_ENTRY1s("adi5.stk", "5de6b43725b47164e8b181de361d0693", 611309),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adi5.stk", "adi5.obc", 0
},
{
{ // Supplied by BJNFNE
"adi5",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adi 5 5.04 (Engine: DEV7 version 1.10a)
AD_ENTRY1s("adi5.stk", "17754a1b942c3af34e86820f19971895", 891549),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adi5.stk", "adi5.obc", 0
},
// -- German: Addy 5 --
{
{ // Supplied by laenion in Bugreport #14956
"adi5",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Addy 5 5.01 (Engine: DEV7 version unknown)
AD_ENTRY1s("adi5.stk", "ec2d6a05d13bec1b4dcfa18d88e317c6", 627942),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adi5.stk", "adi5.obc", 0
},
{
{ // Supplied by Indy4-Fan
"adi5",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Addy 5 5.03 (Engine: DEV7 version 1.10a)
AD_ENTRY1s("adi5.stk", "b45a85ac21fccbb890edcbba36d11f42", 885616),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adi5.stk", "adi5.obc", 0
},
{
{ // Supplied by BJNFNE
"adi5",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Addy 5 5.04 (Engine: DEV7 version 1.10a)
AD_ENTRY1s("adi5.stk", "7af169c901981f1fbf4535c194aa4cc0", 892359),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adi5.stk", "adi5.obc", 0
},
// -- Demos --
{
{ // Supplied by BJNFNE
"adi5",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Addy 5 Mathe Demo (Engine: DEV7 version unknown)
AD_ENTRY1s("adi5.stk", "72fb3c7807845e414d107aa4612f95df", 141858),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED | ADGF_DEMO,
GUIO0()
},
kFeatures800x600,
"adi5.stk", "adi5.obc", 0
},
// -- Add-ons : Language --
{
{
"adi5language",
"", // Deutsch (Klasse 7+8)
AD_ENTRY2s("FR12.ITK", "2f084125fa605a138a77ef7990eb2258", 27226086,
"FR13.ITK", "68a8c910f581f5ece90d1decf45bc09f", 17725973),
DE_DEU,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
{
{
"adi5language",
"", // Français Math CE1
AD_ENTRY2s("fr06.itk", "5ad5150e8e0f5d2d2867669ecc5ed3be", 10449682,
"fr07.itk", "75daf1e48bf06ad28f3446662fb25253", 58580849),
FR_FRA,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
{
{
"adi5language",
"", // Français Math CE1
AD_ENTRY2s("fr06.itk", "edf5b0d00f1cc670b49db5b8c79b4d0d", 10491811,
"fr07.itk", "83b00b904a989a9d1a83e8c6fbcf6478", 59044143),
FR_FRA,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
{
{
"adi5language",
"", // Français Math CM1
AD_ENTRY2s("fr08.itk", "0daba190b67c2404fbdfb3aed3f82b4f", 53645106,
"fr09.itk", "0c4f77aa52e76163f25ce4abbf5d4788", 41428906),
FR_FRA,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
// -- Add-ons : English --
{
{
"adi5anglais",
"", // Englisch (Klasse 5)
AD_ENTRY2s("EN07.ITK", "c7a89adebc67ad587e98e5a237ff679a", 95252930,
"EN11.ITK", "18cd5b3d9e405cccf27202ca28e1a68f", 54165516),
DE_DEU,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_ADI5_H

View File

@@ -0,0 +1,319 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Adibou 1 / A.J.'s World of Discovery / ADI Jnr. */
/* These games are part of the Adibou series. For more information, refer to our wiki: https://wiki.scummvm.org/index.php?title=Adibou_Games */
#ifndef GOB_DETECTION_TABLES_ADIBOU1_H
#define GOB_DETECTION_TABLES_ADIBOU1_H
// -- French: Adibou --
{
{
"adibou1",
"ADIBOU 1 Environnement 4-7 ans",
AD_ENTRY1s("intro.stk", "6db110188fcb7c5208d9721b5282682a", 4805104),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{
{ // Supplied by sdelamarre
"adibou1",
"ADIBOU 1 Environnement 4-7 ans",
AD_ENTRY1s("intro.stk", "904a93f46687617bb34e672020fc17a4", 248724),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib | kFeatures16Colors,
0, "base.tot", 0
},
{
{ // Supplied by sdelamarre
"adibou1",
"ADIBOU 1 Environnement 4-7 ans",
AD_ENTRY1s("intro.stk", "228edf921ebcd9f1c6d566856f264ea4", 2647968),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{
{ // 1994 CD version
"adibou1",
"ADIBOU 1 Environnement 4-5 ans (CD)",
AD_ENTRY2s("intro.stk", "6db110188fcb7c5208d9721b5282682a", 4805104,
"c51.stk", "38daec4f7a7fcedbdf5e47b3c5f28e35", 5680126),
FR_FRA,
kPlatformWindows,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeatures640x400,
0, 0, 0
},
// -- German: ADI Jr. Spielerisch lernen --
{
{ // 1994 CD version - Supplied by BJNFNE
"adibou1",
"ADI Jr. 4-6 Jahre (CD)",
AD_ENTRY2s("intro.stk", "4d4c23da4cd7e080cb1769b49ace1805", 4731020,
"l51.stk", "0397e893892ffe1d6c64d28841437fd7", 7308050),
DE_DEU,
kPlatformWindows,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeatures640x400,
0, 0, 0
},
{
{ // 1994 CD version - Supplied by Indy4-Fan
"adibou1",
"ADI Jr. 6-7 Jahre (CD)",
AD_ENTRY2s("intro.stk", "4d4c23da4cd7e080cb1769b49ace1805", 4731020,
"c61.stk", "1aca103ed84241487c5cf394ae37e8d7", 5966096),
DE_DEU,
kPlatformWindows,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeatures640x400,
0, 0, 0
},
// -- English: A.J.'s World of Discovery / ADI Jnr.
// -- DOS VGA Floppy --
{
{
"adibou1",
"AJ's World of Discovery",
AD_ENTRY1s("intro.stk", "e453bea7b28a67c930764d945f64d898", 3913628),
EN_GRB,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// Supplied by jp438-2 in bug report #13972
{
{
"adibou1",
"Adi Jnr.",
AD_ENTRY1s("intro.stk", "6d234641b74b3bdf746c39a64ff1abcc", 2678326),
EN_GRB,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Amiga Floppy --
{
{ // Supplied by eientei95
"adibou1",
"Adi Jnr",
AD_ENTRY1s("intro.stk", "71e7db034890885ac96dd1be43a21c38", 556834),
EN_ANY,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
},
// Italian: Adibù
// (missing)
// -- Add-ons : Read 4-5 years --
{
{
"adibou1read45",
"", // Je lis 4-5 ans"
AD_ENTRY1s("l51.stk", "8eb81211f8ee163885cc8b31d04d9380", 325445),
FR_FRA,
kPlatformDOS,
ADGF_ADDON,
GUIO0()
},
kFeaturesAdLib | kFeatures16Colors,
0, 0, 0
},
{
{
"adibou1read45",
"", // Je lis 4-5 ans"
AD_ENTRY1s("l51.stk", "50004db83a88750d582113e0669a9604", 1437256),
FR_FRA,
kPlatformDOS,
ADGF_ADDON,
GUIO0()
},
kFeaturesAdLib,
0, 0, 0
},
// -- Add-ons : Count 4-5 years --
{
{
"adibou1count45",
"", // Je calcule 4-5 ans"
AD_ENTRY1s("c51.stk", "c57292304c2657000bd92dbaee33b52b", 330329),
FR_FRA,
kPlatformDOS,
ADGF_ADDON,
GUIO0()
},
kFeaturesAdLib | kFeatures16Colors,
0, 0, 0
},
{
{
"adibou1count45",
"", // Je calcule 4-5 ans"
AD_ENTRY1s("c51.stk", "264e5426bd06d5fedd8edf7c08302984", 359953),
FR_FRA,
kPlatformDOS,
ADGF_ADDON,
GUIO0()
},
kFeaturesAdLib | kFeatures16Colors,
0, 0, 0
},
{
{
"adibou1count45",
"", // Je calcule 4-5 ans"
AD_ENTRY1s("c51.stk", "afefebef6256fe4f72bdbdc30fdc0f2d", 1313166),
FR_FRA,
kPlatformDOS,
ADGF_ADDON,
GUIO0()
},
kFeaturesAdLib,
0, 0, 0
},
// -- Add-ons : Read 6-7 years --
{
{
"adibou1read67",
"", // Je lis 6-7 ans"
AD_ENTRY1s("l61.stk", "d236b4268d8265b958a90a41eae0f15a", 356444),
FR_FRA,
kPlatformDOS,
ADGF_ADDON,
GUIO0()
},
kFeaturesAdLib | kFeatures16Colors,
0, 0, 0
},
{
{
"adibou1read67",
"", // Je lis 6-7 ans"
AD_ENTRY1s("l61.stk", "1c993aa788b4159bbc9591921854d428", 353121),
FR_FRA,
kPlatformDOS,
ADGF_ADDON,
GUIO0()
},
kFeaturesAdLib | kFeatures16Colors,
0, 0, 0
},
{
{
"adibou1read67",
"", // Je lis 6-7 ans"
AD_ENTRY1s("l61.stk", "71ff03db9aa9d3be05ac6050d7d5e681", 1396282),
FR_FRA,
kPlatformDOS,
ADGF_ADDON,
GUIO0()
},
kFeaturesAdLib,
0, 0, 0
},
// -- Add-ons : Count 6-7 years --
{
{
"adibou1count67",
"", // Je calcule 6-7 ans"
AD_ENTRY1s("c61.stk", "f5ef0318f342083f835426718b74c89a", 318641),
FR_FRA,
kPlatformDOS,
ADGF_ADDON,
GUIO0()
},
kFeaturesAdLib | kFeatures16Colors,
0, 0, 0
},
{
{
"adibou1count67",
"", // Je calcule 6-7 ans"
AD_ENTRY1s("c61.stk", "b6849f45151b8dfe48d873fbd468b679", 1242750),
FR_FRA,
kPlatformDOS,
ADGF_ADDON,
GUIO0()
},
kFeaturesAdLib,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_ADIBOU1_H

View File

@@ -0,0 +1,657 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Adibou / Addy Junior series. */
/* This Game uses the DEV6 Engine, more Information can be found here: https://wiki.scummvm.org/index.php?title=DEV6_Information */
/* These games are part of the Adibou series. For more information, refer to our wiki: https://wiki.scummvm.org/index.php?title=Adibou_Games */
#ifndef GOB_DETECTION_TABLES_ADIBOU2_H
#define GOB_DETECTION_TABLES_ADIBOU2_H
// -- French: Adibou --
{
{
"adibou2",
"ADIBOU 2",
AD_ENTRY1s("intro.stk", "94ae7004348dc8bf99c23a9a6ef81827", 956162),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"Le Jardin Magique d'Adibou",
AD_ENTRY1s("intro.stk", "a8ff86f3cc40dfe5898e0a741217ef27", 956328),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"ADIBOU Version Decouverte 2.11",
AD_ENTRY1s("intro.stk", "558c14327b79ed39214b49d567a75e33", 8737856),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"ADIBOU 2.10 Environnement",
AD_ENTRY2s("intro.stk", "f2b797819aeedee557e904b0b5ccd82e", 8736454,
"BECBF210.CD1", "bc828c320908a5eaa349956d396bd8e1", 8),
FR_FRA,
kPlatformWindows,
GF_ENABLE_ADIBOU2_FREE_BANANAS_WORKAROUND | GF_ENABLE_ADIBOU2_FLOWERS_INFINITE_LOOP_WORKAROUND,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"ADIBOU 2.11 Environnement",
AD_ENTRY2s("intro.stk", "7b1f1f6f6477f54401e95d913f75e333", 8736904,
"BECBF211.CD1", "bc828c320908a5eaa349956d396bd8e1", 8),
FR_FRA,
kPlatformWindows,
GF_ENABLE_ADIBOU2_FREE_BANANAS_WORKAROUND | GF_ENABLE_ADIBOU2_FLOWERS_INFINITE_LOOP_WORKAROUND,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"ADIBOU 2.12 Environnement",
AD_ENTRY3s("intro.stk", "1e49c39a4a3ce6032a84b712539c2d63", 8738134,
"BECBF212.CD1", "bc828c320908a5eaa349956d396bd8e1", 8,
"intro.itk", "610b4ade4912442f42f342594c654226", 13592576),
FR_FRA,
kPlatformWindows,
GF_ENABLE_ADIBOU2_FREE_BANANAS_WORKAROUND | GF_ENABLE_ADIBOU2_FLOWERS_INFINITE_LOOP_WORKAROUND,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"ADIBOU 2.12 Environnement",
AD_ENTRY3s("intro.stk", "1e49c39a4a3ce6032a84b712539c2d63", 8738134,
"BECBF212.CD1", "bc828c320908a5eaa349956d396bd8e1", 8,
"intro.itk", "269fc5814db277b5a18d748e7ed55e90", 15079424),
FR_CAN,
kPlatformWindows,
GF_ENABLE_ADIBOU2_FREE_BANANAS_WORKAROUND | GF_ENABLE_ADIBOU2_FLOWERS_INFINITE_LOOP_WORKAROUND,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"ADIBOU 2.13s Environnement",
AD_ENTRY2s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958,
"BECBF213.CD1", "bc828c320908a5eaa349956d396bd8e1", 8),
FR_FRA,
kPlatformWindows,
GF_ENABLE_ADIBOU2_FREE_BANANAS_WORKAROUND | GF_ENABLE_ADIBOU2_FLOWERS_INFINITE_LOOP_WORKAROUND,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"ADIBOO 2.14 Environnement",
AD_ENTRY1s("intro.stk", "ff63637e3cb7f0a457edf79457b1c6b3", 9333874),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"ADIBOU Environnement",
AD_ENTRY1s("intro.stk", "5606ff29ef33ef423519eb24e8096afc", 8737284),
FR_CAN,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// -- German: Addy Junior --
{
{
"adibou2",
"ADDY JR 2.20 Basisprogramm",
AD_ENTRY2s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958,
"BECBD220.CD1", "bc828c320908a5eaa349956d396bd8e1", 8),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{ // Supplied by felsqualle
"adibou2",
"ADI Junior 2",
AD_ENTRY1s("intro.stk", "80588ad3b5510bb44d3f40d6b07b81e7", 956328),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{ // Supplied by BJNFNE
"adibou2",
"ADI Jr.",
AD_ENTRY2s("intro.stk", "718a51862406136c28639489a9ba950a", 956350,
"intro.inf", "d8710732c9bfe3ca52d3ce5aefc06089", 48),
DE_DEU,
kPlatformWindows,
GF_ENABLE_ADIBOU2_FLOWERS_INFINITE_LOOP_WORKAROUND,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{ // Supplied by BJNFNE
"adibou2",
"ADDY JR 2.13 Basisprogramm",
AD_ENTRY2s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958,
"BECBD213.CD1", "bc828c320908a5eaa349956d396bd8e1", 8),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// -- Italian: Adibù --
{
{
"adibou2",
"ADIBÙ 2.13 Ambiente",
AD_ENTRY2s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958,
"BECBI213.CD1", "bc828c320908a5eaa349956d396bd8e1", 8),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// -- Spanish: Adibù --
{
{ // Supplied by eientei95
"adibou2",
"ADIBÙ 2",
AD_ENTRY1s("intro.stk", "0b996fcd8929245fecddc4d9169843d0", 956682),
ES_ESP,
kPlatformWindows,
GF_ENABLE_ADIBOU2_FLOWERS_INFINITE_LOOP_WORKAROUND,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// -- English: Adiboo --
{
{ // Supplied by sdelamarre
"adibou2",
"ADIBOO 2",
AD_ENTRY2s("intro.stk", "718a51862406136c28639489a9ba950a", 956350,
"intro.inf", "9369aa62939f5f7c11b1e02a45038050", 44),
EN_GRB,
kPlatformWindows,
GF_ENABLE_ADIBOU2_FLOWERS_INFINITE_LOOP_WORKAROUND,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"ADIBOO 2.13 Environment",
AD_ENTRY1s("intro.stk", "ff63637e3cb7f0a457edf79457b1c6b3", 9333874),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"ADIBOO 2.13 Environment",
AD_ENTRY2s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958,
"BECBA213.CD1", "bc828c320908a5eaa349956d396bd8e1", 8),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// -- Add-ons : Read/Count 4-5 years --
{
{
"adibou2readcount45",
"", // "Lecture/Calcul 4-5 ans"
AD_ENTRY2s("intro_ap.stk", "7ff46d8c804186d3a11bf6b921fac2c0", 40835594,
"appli_01.vmd", "11635be4aeaac46d199e7e37cf905240", 54402),
FR_FRA,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2readcount45",
"", // "Lecture/Calcul 4-5 ans"
AD_ENTRY2s("intro_ap.stk", "8f9dcb2fe953b1e031563307eae19a77", 40835810,
"appli_01.vmd", "d5f26306952d2ffbbadbb2b7d6cb3299", 41806),
FR_CAN,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2readcount45",
"", // "Lesen/Rechnen 4-5 Jahre"
AD_ENTRY2s("intro_ap.stk", "66a4ac911433c85b13811e874b5ceebd", 40946386,
"appli_01.vmd", "f4ec39fd93d405f7aea84bd31de48f67", 63226),
DE_DEU,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2readcount45",
"", // "Leggere/Contare 4-5 anni"
AD_ENTRY2s("intro_ap.stk", "8540e44b24fef8dac2bbcd1aff6e0d8f", 44815582,
"appli_01.vmd", "2eb5ed83c2b3408d2d7ff54f5bfdaf3a", 49228),
IT_ITA,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2readcount45",
"", // "I can read/I can count 4-5 years"
AD_ENTRY2s("intro_ap.stk", "5ac48f29e989fae9a3c600978e52f5cf", 41662238,
"appli_01.vmd", "3a596569b76c0180a7e1643c1c76d383", 56432),
EN_GRB,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// -- Add-ons : Read/Count 6-7 years --
{
{
"adibou2readcount67",
"", // "Lecture/Calcul 6-7 ans"
AD_ENTRY2s("intro_ap.stk", "0e91d0d693d5731353ad4738f4aa065c", 36540132,
"appli_03.vmd", "6bf95a48f366bdf8af3a198c7b723c77", 58858),
FR_FRA,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2readcount67",
"", // "Lecture/Calcul 6-7 ans"
AD_ENTRY2s("intro_ap.stk", "82ec211d2f0cb3430d8f1eb80c949f41", 36540108,
"appli_03.vmd", "2ec3177c0f1b4ef326cc663834003eb4", 38062),
FR_CAN,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2readcount67",
"", // "Lesen/Rechnen 6-7 Jahre"
AD_ENTRY2s("intro_ap.stk", "5b83051c6d123fe0c506fd1ee17a73da", 36132776,
"appli_03.vmd", "462cd55c0759c1bd097b379995342b24", 65454),
DE_DEU,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{ // Supplied by Indy4-Fan
"adibou2readcount67",
"", // "Lesen/Rechnen 6-7 Jahre"
AD_ENTRY2s("intro_ap.stk", "4f475d2ad1aec64bafd17c971768dbce", 36084716,
"appli_03.vmd", "462cd55c0759c1bd097b379995342b24", 65454),
DE_DEU,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2readcount67",
"", // Yo leo/Yo calculo 2° primaria
AD_ENTRY2s("intro_ap.stk", "8ccaddbb40a3142db80d4e84fb4df447", 36332224,
"appli_03.vmd", "a14a48e9f3cfba245857fc74e249befd", 65542),
ES_ESP,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// -- Add-ons : "Nature & Sciences" --
{
{
"adibou2sciences",
"", // "Je découvre la nature et les sciences"
AD_ENTRY3s("intro_ap.stk", "bff25481fc05bc5c6a3aaa8c17e89e5b", 3446050,
"FICHES.ITK", "1670cc3373df162aed3219368665a1ca", 51025920,
"APPBOFR1.ITK", "b5354d97e1115ad337de55410dae82f7", 129994752),
FR_FRA,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2sciences",
"", // "Je découvre la nature et les sciences"
AD_ENTRY3s("intro_ap.stk", "bff25481fc05bc5c6a3aaa8c17e89e5b", 3446050,
"FICHES.ITK", "1670cc3373df162aed3219368665a1ca", 51025920,
"APPBOFR1.ITK", "8bd95ce195278a29f0375ca2e2f3475d", 139196416),
FR_CAN,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2sciences",
"", // "Discover Nature, Animals & Planets"
AD_ENTRY2s("intro_ap.stk", "b630020cb8b6bc6f4b98876647ad418d", 3460620,
"FICHES.ITK", "2a704840f883b908f444f5215ab05e72", 52092928),
EN_GRB,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2sciences",
"", // "Natur & Technik"
AD_ENTRY2s("intro_ap.stk", "404731e0108a43197ad408bda216a76e", 3162292,
"FICHES.ITK", "c301766d759d9ac8d7362558cc7a20c8", 51316736),
DE_DEU,
kPlatformWindows,
ADGF_ADDON,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// -- Add-ons : "Anglais" (English for non-native speakers) --
{
{
"adibou2anglais",
"",
AD_ENTRY2s("intro_ap.stk", "1c83832cfeeace2a4b1b9ca448fc5322", 1967132,
"LIPSYNC.ITK", "90ea1687c8d40989b5ff52c7ecaaf8b3", 107792384),
FR_FRA,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSTABLE,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// -- Add-ons : Music --
{
{
"adibou2music",
"",
AD_ENTRY2s("intro_ap.stk", "2147748e04ac11bd7155779e1456be07", 1631068,
"MUZIKO.ITK", "101cd1690f13bf458e3988822a46e942", 54806528),
FR_FRA,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSTABLE,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2music",
"",
AD_ENTRY2s("intro_ap.stk", "0f3a372bb2e7d49ee430208a868f8605", 1629000,
"MUZIKO.ITK", "48e4576339b796f657a41d548abd97e1", 52834304),
DE_DEU,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSTABLE,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
// -- Demos --
{
{
"adibou2",
"ADIBOU 2 Demo",
AD_ENTRY1s("intro.stk", "0f197c6b8f1cef3fb4aa37438a52e031", 954276),
FR_FRA,
kPlatformWindows,
ADGF_DEMO,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
{
// Titlescreen says "ADIBOO: Limited version!", Sierra setup says "Adiboo 2 Demo"
// Supplied by eientei95
{
"adibou2",
"ADIBOO 2 Demo",
AD_ENTRY1s("intro.stk", "ea6c2d25f33135db763c1175979d904a", 528108),
EN_GRB,
kPlatformWindows,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeatures640x480,
0, 0, 0
},
{
{
"adibou2",
"Non-Interactive Demo",
AD_ENTRY2s("demogb.scn", "9291455a908ac0e6aaaca686e532609b", 105,
"demogb.vmd", "bc9c1db97db7bec8f566332444fa0090", 14320840),
EN_GRB,
kPlatformWindows,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
0, 0, 9
},
{
{
"adibou2",
"Non-Interactive Demo",
AD_ENTRY2s("demoall.scn", "c8fd308c037b829800006332b2c32674", 106,
"demoall.vmd", "4672b2deacc6fca97484840424b1921b", 14263433),
DE_DEU,
kPlatformWindows,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
0, 0, 10
},
{
{
"adibou2",
"Non-Interactive Demo",
AD_ENTRY2s("demofra.scn", "d1b2b1618af384ea1120def8b986c02b", 106,
"demofra.vmd", "b494cdec1aac7e54c3f2480512d2880e", 14297100),
FR_FRA,
kPlatformWindows,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
0, 0, 11
},
{ // Shipped as an Demo / Preview for Nature et Sciences on Adibou presente Dessin CD
// Supplied by BJNFNE
{
"adibou2",
"Nature et Sciences Preview",
AD_ENTRY1s("intro.stk", "22b997d97eef71c867b49092bd89c2b8", 38128),
FR_FRA,
kPlatformWindows,
ADGF_UNSTABLE | ADGF_DEMO,
GUIO0()
},
kFeatures640x480,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_ADIBOU2_H

View File

@@ -0,0 +1,371 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Adibou 3 / Adiboo 3 series. */
/* This Game uses the DEV7 Engine, more Information can be found here: https://wiki.scummvm.org/index.php?title=DEV7_Information */
/* These games are part of the Adibou series. For more information, refer to our wiki: https://wiki.scummvm.org/index.php?title=Adibou_Games */
#ifndef GOB_DETECTION_TABLES_ADIBOU3_H
#define GOB_DETECTION_TABLES_ADIBOU3_H
// -- French: Adibou 3 --
{
{ // Supplied by BJNFNE
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adibou 3 3.00 (Engine: DEV7 version 1.2.0.0)
AD_ENTRY1s("b3_common.stk", "8819bc86b7af241ed336b1a84e34de07", 499731),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
{
{ // Supplied by BJNFNE
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adibou 3 3.00 (Engine: DEV7 version 1.2.0.0)
AD_ENTRY1s("b3_common.stk", "8819bc86b7af241ed336b1a84e34de07", 499731),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
{
{
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adibou 3 3.00 (Engine: DEV7 version 1.2.0.0)
AD_ENTRY1s("b3_common.stk", "c8d8db01b33ded9ecba2e371ca188a4c", 501767),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
// -- German: Adiboo 3 --
{
{ // Supplied by BJNFNE
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adiboo 3 3.10 (shipped with Nature Application) (Engine: DEV7 version 1.3.0.0)
AD_ENTRY1s("b3_common.stk", "13360fa1d7298c2f06abeba244485a45", 552447),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
{
{ // Supplied by BJNFNE
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adiboo 3 3.00 (Engine: DEV7 version 1.2.0.0)
AD_ENTRY1s("b3_common.stk", "e3ed6837d19cc0ed19275f3196de2ae3", 523246),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
{
{ // Supplied by BJNFNE
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adiboo 3 3.10 (Engine: DEV7 version 1.30b)
AD_ENTRY1s("b3_common.stk", "2293ff44a5bb7a36f5219443f0ede5cf", 554569),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
{
{ // Supplied by BJNFNE
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adiboo 3 3.10 (shipped with English Application) (Engine: DEV7 version 1.30b)
AD_ENTRY1s("b3_common.stk", "fc3a619b44366ded7027bc458d34be6a", 554569),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
{
{ // Supplied by BJNFNE
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adiboo 3 3.10 (shipped with Nature Application) (Engine: DEV7 version 1.30b)
AD_ENTRY1s("b3_common.stk", "814d8edb015969618dbcc670b18fcfb4", 554569),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
// -- English: Adiboo 3 --
{
{ // Supplied by BJNFNE
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adiboo 3 3.00 (Engine: DEV7 version 1.2.0.0)
AD_ENTRY1s("b3_common.stk", "3f34b0172396321d0c5e37c53b4de005", 523852),
EN_ANY,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
{
{
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adiboo 3 3.10 (shipped with Music Application) (Engine: DEV7 version 1.3.0.0)
AD_ENTRY1s("b3_common.stk", "4409c79e9005f46bf4298dc0273c9d12", 552743),
EN_ANY,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
// -- Dutch: Adiboo 3 --
{
{ // Supplied by Coby Cat
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adiboo 3 3.00 (Published by Transposia) (Engine: DEV7 version 1.2.0.0)
AD_ENTRY1s("b3_common.stk", "2650174b2b45ae776ebccc02073fea1f", 523647),
NL_NLD,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
// -- Rusian: Антошка 3 --
{
{
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Антошка 3 3.10 (Published by Akella) (Engine: DEV7 version 1.3.0.0)
AD_ENTRY1s("b3_common.stk", "9795c08d44b7d79dd6ecfdb415892fbf", 553095),
RU_RUS,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
// -- Demos --
{
{
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adiboo 3 Preview Demo (Engine: DEV7 version 1.2.0.0)
AD_ENTRY1s("VmdLauncher.stk", "89a55e998a03063e35c92c8b5c76c4f4", 88596675),
EN_ANY,
kPlatformWindows,
ADGF_UNSUPPORTED | ADGF_DEMO,
GUIO0()
},
kFeatures800x600,
"VmdLauncher.stk", "VmdLauncher.obc", 0
},
{
{ // Supplied by BJNFNE
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adiboo 3 3.10 Demo (Engine: DEV7 version 1.30b)
AD_ENTRY1s("b3_common.stk", "0c7624de252a9be3c67616f298ecb34a", 558632),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED | ADGF_DEMO,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
{
{
"adibou3",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adibou 3 3.10 Du pareil au même (Engine: DEV7 version 1.30b)
AD_ENTRY1s("b3_common.stk", "c0a485db0c58462693fe3da3c8eaa084", 559844),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED | ADGF_DEMO,
GUIO0()
},
kFeatures800x600,
"b3_common.stk", "b3_storyboard.obc", 0
},
// -- Add-ons : Read/Count 4-5 years --
{
{
"adibou3readcount45",
"", // "Lecture/Calcul 4-5 ans"
AD_ENTRY2s("BMA45F300.BCD1", "0db3f04047a68606ca184037825dbedb", 284,
"BFR45F300.BCD1", "dbcbff695b14b80dc44f1b06b92d56b5", 301),
FR_FRA,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
// -- Add-ons : Read/Count 5-6 years --
{
{
"adibou3readcount56",
"", // "Read/Count 5-6 age"
AD_ENTRY2s("BFR56A300.BCD1", "b6ab820cf0b8948731a634e5aea18a1a", 293,
"BMA56A300.BCD1", "9e2e7087a004cb0d4114ff07a3d1b41a", 285),
EN_ANY,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
// -- Add-ons : Read/Count 6-7 years --
{
{
"adibou3readcount67",
"", // "Lesen/Rechnen 6-7 Jahre"
AD_ENTRY2s("BFR67D300.BCD1", "819f13cfaebf01a036131c60f6618d91", 303,
"BMA67D300.BCD1", "14d86a43a14ffc2a464e9c02946f0ed6", 302),
DE_DEU,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
// -- Add-ons : Nature & Sciences --
{
{
"adibou3sciences",
"", // "L'île volante 4-7 ans"
AD_ENTRY1s("bsc47F310.bcd1", "e30b6a3fbe993dc867161d5465b7efba", 286),
FR_FRA,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
{
{
"adibou3sciences",
"", // "Das schwebende Land (Natur & Technik 4-7 Jahre)"
AD_ENTRY1s("bsc47D310.bcd1", "1ea4391027ea3d412577c13cad808249", 307),
DE_DEU,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
// -- Add-ons : Music --
{
{
"adibou3music",
"", // Die rätselhafte Musikmaschine (Musik 4-7 Jahre)
AD_ENTRY1s("bmu47D310.bcd1", "cac210f0c5c7d13667a84072d2f3947c", 324),
DE_DEU,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
// -- Add-ons : Anglais --
{
{
"adibou3anglais",
"", // Das Königreich Hocus Pocus (Englisch 4-7 Jahre)
AD_ENTRY1s("blg47D310.bcd1", "cbbb2ab6399776ae3ec14c4c2edb1a96", 327),
DE_DEU,
kPlatformWindows,
ADGF_ADDON | ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_ADIBOU3_H

View File

@@ -0,0 +1,128 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Adiboud'chou / Addy Buschu series. */
/* This Game uses the DEV7 Engine, more Information can be found here: https://wiki.scummvm.org/index.php?title=DEV7_Information */
/* These games are part of the Adibou series. For more information, refer to our wiki: https://wiki.scummvm.org/index.php?title=Adibou_Games */
#ifndef GOB_DETECTION_TABLES_ADIBOUDCHOU_H
#define GOB_DETECTION_TABLES_ADIBOUDCHOU_H
// -- French: Adiboud'chou series --
{
{
"adiboudchoumer",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adiboud'chou a la mer 1.01 (Engine: DEV7 version unknown)
AD_ENTRY1s("adbc_envir_obc.stk", "57f0eda5d4029abdb2f6b6201e02905e", 3204281),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adbc_envir_obc.stk", "adbc_init.obc", 0
},
// -- German: Addy Buschu series --
{
{ // Supplied by BJNFNE
"adiboudchoumer",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Addy Buschu am Meer 1.01 (Engine: DEV7 version unknown)
AD_ENTRY2s("adbc_envir_obc.stk", "46b7db9f7e77a077d9ac8506130ba9a2", 2830950,
"DMDCD101.CD1", "d41d8cd98f00b204e9800998ecf8427e", 0),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adbc_envir_obc.stk", "adbc_init.obc", 0
},
{
{ // Supplied by BJNFNE
"adiboudchoubanquise",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Addy Buschu Schnee & Eis 1.00 (Engine: DEV7 version 1.0.0.0)
AD_ENTRY2s("adbc_envir_obc.stk", "fde006186b93b4f33486f021826f88a0", 5199806,
"DNDCD100.CD1", "d41d8cd98f00b204e9800998ecf8427e", 0),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adbc_envir_obc.stk", "adbc_init.obc", 0
},
{
{ // Supplied by BJNFNE
"adiboudchoucampagne",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Addy Buschu auf dem Land 1.00 (Engine: DEV7 version unknown)
AD_ENTRY2s("adbc_envir_obc.stk", "4b43d3d1a8bc908d80e729069c5bb59f", 2831471,
"DCDCD100.CD1", "d41d8cd98f00b204e9800998ecf8427e", 0),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adbc_envir_obc.stk", "adbc_init.obc", 0
},
{
{ // Supplied by BJNFNE
"adiboudchoujunglesavane",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Addy Buschu Die bunte Tierwelt 1.00 (Engine: DEV7 version 1.0.0.0)
AD_ENTRY2s("adbc_envir_obc.stk", "7f33561f295030cbe64a21f941ef1efc", 3188852,
"djdcd100.cd1", "d41d8cd98f00b204e9800998ecf8427e", 0),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adbc_envir_obc.stk", "adbc_init.obc", 0
},
// -- Russian: Антошка
{
{
"adiboudchoucampagne",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Антошка. В гостях у друзей 1.00 (Engine: DEV7 version 1.0.0.0)
AD_ENTRY2s("adbc_envir_obc.stk", "1b65643b2aa794f38f3b18efb9e68b92", 3210008,
"DCDCF100.CD1", "d41d8cd98f00b204e9800998ecf8427e" ,0),
RU_RUS,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adbc_envir_obc.stk", "adbc_init.obc", 0
},
#endif // GOB_DETECTION_TABLES_ADIBOUDCHOU_H

View File

@@ -0,0 +1,85 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Adibou présente / Adiboo presents series. */
/* This Game uses the DEV7 Engine, more Information can be found here: https://wiki.scummvm.org/index.php?title=DEV7_Information */
#ifndef GOB_DETECTION_TABLES_ADIBOUPRESENTE_H
#define GOB_DETECTION_TABLES_ADIBOUPRESENTE_H
// -- French: Adibou présente Dessin --
{
{ // Supplied by BJNFNE
"adiboudessin",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adibou présente Dessin 1.00 (Engine: DEV7 version 1.10a)
AD_ENTRY2s("adibou.stk", "14e3f8e9c237d4236d93e08c60b781bc", 217172,
"PD47F100.CD1", "d41d8cd98f00b204e9800998ecf8427e", 0),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adibou.stk", "main.obc", 0
},
// -- French: Adibou présente Cuisine --
{
{ // Supplied by BJNFNE
"adiboucuisine",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adibou présente Cuisine 1.00 (Engine: DEV7 version 1.0.0.0)
AD_ENTRY2s("adibou.stk", "cb2d576f6d546485af7693d4eaf1142b", 174027,
"PC47F100.CD1", "d41d8cd98f00b204e9800998ecf8427e", 0),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adibou.stk", "main.obc", 0
},
// -- French: Adibou présente Magie --
{
{
"adiboumagie",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Adibou présente Magie 1.00 (Engine: DEV7 version 1.0.0.0)
AD_ENTRY2s("adibou.stk", "977d2449d398f3df23238d718fca35b5", 61097,
"Pm47f100.cd1", "3389dae361af79b04c9c8e7057f60cc6", 1),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"adibou.stk", "main.obc", 0
},
#endif // GOB_DETECTION_TABLES_ADIBOUPRESENTE_H

View File

@@ -0,0 +1,159 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Bargon Attack. */
#ifndef GOB_DETECTION_TABLES_BARGON_H
#define GOB_DETECTION_TABLES_BARGON_H
// -- DOS VGA Floppy --
{
{
"bargon",
"",
AD_ENTRY1s("intro.stk", "da3c54be18ab73fbdb32db24624a9c23", 3181825),
EN_GRB,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by cesardark in bug #3123
{
"bargon",
"",
AD_ENTRY1s("intro.stk", "11103b304286c23945560b391fd37e7d", 3181890),
ES_ESP,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by paul66 in bug #3143
{
"bargon",
"",
AD_ENTRY1s("intro.stk", "da3c54be18ab73fbdb32db24624a9c23", 3181825),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by kizkoool in bugreport #3926
{
"bargon",
"",
AD_ENTRY1s("intro.stk", "00f6b4e2ee26e5c40b488e2df5adcf03", 3975580),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by glorfindel in bugreport #3193
{
"bargon",
"Fanmade",
AD_ENTRY1s("intro.stk", "da3c54be18ab73fbdb32db24624a9c23", 3181825),
IT_ITA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Russian fan translation by PRCA
{
"bargon",
"Fanmade",
AD_ENTRY1s("intro.stk", "0937f20c9177a9c4111e48f8916fea47", 3185593),
RU_RUS,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
// -- Amiga --
{ // Supplied by pwigren in bugreport #3355
{
"bargon",
"",
AD_ENTRY1s("intro.stk", "569d679fe41d49972d34c9fce5930dda", 269825),
EN_GRB,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by gabberhead in bugreport #15178
{
"bargon",
"",
AD_ENTRY1s("intro.stk", "e9ec1eebdec327794681b2b66a30f159", 270055),
DE_DEU,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
// -- Atari ST --
{ // Supplied by Trekky in the forums
{
"bargon",
"",
AD_ENTRY1s("intro.stk", "2f54b330d21f65b04b7c1f8cca76426c", 262109),
FR_FRA,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_BARGON_H

View File

@@ -0,0 +1,118 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Croustibat. */
#ifndef GOB_DETECTION_TABLES_CROUSTI_H
#define GOB_DETECTION_TABLES_CROUSTI_H
// -- DOS VGA Floppy --
{
{ // Supplied by DrMcCoy
"crousti",
"v1.01",
AD_ENTRY1s("intro.stk", "63fd795818fa72c32b903bbd99e18ea1", 851926),
PT_PRT,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{ // English Fan Translation by denzquix
"crousti",
"v1.01",
AD_ENTRY1s("intro.stk", "c660f5500907ecf18a05412d4fda2222", 850731),
EN_ANY,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{ // German Fan Translation by BJNFNE
// 23.07.2023
"crousti",
"v1.01",
AD_ENTRY1s("intro.stk", "df96be976e53cc7de9e2741c45c18a1f", 864746),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{ // German Fan Translation by BJNFNE
// 10.09.2023
"crousti",
"v1.01",
AD_ENTRY1s("intro.stk", "7b86a951602bccc2c55eb5f644310d93", 864040),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{ // German Fan Translation by BJNFNE
// 10.09.2023
"crousti",
"v1.01 Big Letters",
AD_ENTRY1s("intro.stk", "f739ed7d681a8e2619a14faafbf169e1", 864044),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{ // German Fan Translation by BJNFNE
// 10.09.2023
"crousti",
"v1.01 Small/Big Letters",
AD_ENTRY1s("intro.stk", "e35840d99c89544021524a9b99ab20f7", 864032),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_CROUSTI_H

View File

@@ -0,0 +1,211 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for The Last Dynasty. */
#ifndef GOB_DETECTION_TABLES_DYNASTY_H
#define GOB_DETECTION_TABLES_DYNASTY_H
// -- Windows --
{
{
"dynasty",
"",
AD_ENTRY1s("intro.stk", "6190e32404b672f4bbbc39cf76f41fda", 2511470),
EN_USA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"dynasty",
"",
AD_ENTRY1s("intro.stk", "61e4069c16e27775a6cc6d20f529fb36", 2511300),
EN_USA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"dynasty",
"",
AD_ENTRY1s("intro.stk", "61e4069c16e27775a6cc6d20f529fb36", 2511300),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"dynasty",
"",
AD_ENTRY1s("intro.stk", "b3f8472484b7a1df94557b51e7b6fca0", 2322644),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"dynasty",
"",
AD_ENTRY1s("intro.stk", "bdbdac8919200a5e71ffb9fb0709f704", 2446652),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{ // Supplied by trembyle
"dynasty",
"",
AD_ENTRY1s("intro.stk", "a4a50c70d001b4398b174f1bff1987f6", 2607984),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{ // Supplied by trembyle
"dynasty",
"",
AD_ENTRY1s("intro.stk", "4bfcc878f2fb2f0809d1f257e1180cf1", 2857990),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
// -- Demos --
{ // Non-interactive
{
"dynasty",
"Demo",
AD_ENTRY1s("intro.stk", "464538a17ed39755d7f1ba9c751af1bd", 1847864),
EN_ANY,
kPlatformWindows,
ADGF_DEMO,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Non-interactive
{ // Supplied by trembyle
"dynasty",
"Demo",
AD_ENTRY1s("intro.stk", "e49340fe5078e38e9f9290dfb75f98a5", 1348),
EN_ANY,
kPlatformWindows,
ADGF_DEMO,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"dynasty",
"Demo",
AD_ENTRY1s("lda1.stk", "0e56a899357cbc0bf503260fd2dd634e", 15032774),
EN_ANY,
kPlatformWindows,
ADGF_DEMO,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
"lda1.stk", 0, 0
},
{
{
"dynasty",
"Demo",
AD_ENTRY1s("lda1.stk", "8669ea2e9a8239c070dc73958fbc8753", 15567724),
DE_DEU,
kPlatformWindows,
ADGF_DEMO,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480,
"lda1.stk", 0, 0
},
{
{ // Supplied by trembyle
"dynasty",
"Demo",
AD_ENTRY2s("demo.scn", "a0d801c43a560b7471114744858b129c", 89,
"demo5.vmd", "2abb7b6a26406c984f389f0b24b5e28e", 13290970),
EN_ANY,
kPlatformDOS,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
"demo.scn", 0, 1
},
// Combined demo for Woodruff and The Last Dynasty
{
{ // Supplied by trembyle
"dynastywood",
"Non-Interactive Demos",
AD_ENTRY2s("demo.scn", "040a00b7276aa86fe7a51f5f362f63c7", 124,
"demo5.vmd", "2abb7b6a26406c984f389f0b24b5e28e", 13290970),
EN_ANY,
kPlatformDOS,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
"demo.scn", 0, 1
},
#endif // GOB_DETECTION_TABLES_DYNASTY_H

View File

@@ -0,0 +1,92 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for English Fever. */
/* This Game uses the DEV7 Engine, more Information can be found here: https://wiki.scummvm.org/index.php?title=DEV7_Information */
#ifndef GOB_DETECTION_TABLES_ENGLISHFEVER_H
#define GOB_DETECTION_TABLES_ENGLISHFEVER_H
// -- French: English Fever Hysteria on Campus --
{
{
"englishfever",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // English Fever Hysteria on Campus 1.00 (Engine: DEV7 version 1.30)
AD_ENTRY1s("L_Module_Start.itk", "d6f1a4b742f695187b350083fe1b2fc1", 747558),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"L_Module_Start.itk", "L_Module_Start.obc", 0
},
// -- German: English Fever Commando Kids
{
{ // Supplied by BJNFNE
"englishfever",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // English Fever Commando Kids 1.00 (Engine: DEV7 version 1.30)
AD_ENTRY1s("L_Module_Start.itk", "6090620324734b17fe8b591852b693df", 747551),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"L_Module_Start.itk", "L_Module_Start.obc", 0
},
// -- English Fever Funny Camp
{
{ // Supplied by Indy4-Fan
"englishfever",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // English Fever Funny Camp 1.00 (Engine: DEV7 version 1.30)
AD_ENTRY1s("L_Module_Start.itk", "6090620324734b17fe8b591852b693df", 747551),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"L_Module_Start.itk", "L_Module_Start.obc", 0
},
// -- English Fever Extreme Summer
{
{ // Supplied by Indy4-Fan
"englishfever",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // English Fever Extreme Summer 1.00 (Engine: DEV7 version 1.30)
AD_ENTRY1s("L_Module_Start.itk", "d89ba463c0d7fc2f6e008360644ac305", 747586),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"L_Module_Start.itk", "L_Module_Start.obc", 0
},
#endif // GOB_DETECTION_TABLES_ENGLISHFEVER_H

View File

@@ -0,0 +1,535 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_DETECTION_TABLES_FALLBACK_H
#define GOB_DETECTION_TABLES_FALLBACK_H
// -- Tables for the filename-based fallback --
static const GOBGameDescription fallbackDescs[] = {
{ //0
{
"gob1",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ //1
{
"gob1",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ //2
{
"gob2",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ //3
{
"gob2",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ //4
{
"gob2",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ //5
{
"bargon",
"",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ //6
{
"gob3",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ //7
{
"gob3",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ //8
{
"woodruff",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ //9
{
"lit",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ //10
{
"lit",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ //11
{
"lit",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ //12
{
"urban",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesTrueColor,
0, 0, 0
},
{ //13
{
"playtoons1",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ //14
{
"playtoons2",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ //15
{
"playtoons3",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ //16
{
"playtoons4",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ //17
{
"playtoons5",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ //18
{
"playtnck1",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ //19
{
"bambou",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ //20
{
"fascination",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
"disk0.stk", 0, 0
},
{ //21
{
"geisha",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA | kFeaturesAdLib,
"disk1.stk", "intro.tot", 0
},
{ //22
{
"littlered",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{ //23
{
"littlered",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ //24
{
"onceupon",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformUnknown,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{ //25
{
"adi2",
"",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x400,
"adi2.stk", 0, 0
},
{ //26
{
"adi4",
"",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"adif41.stk", 0, 0
},
{ //27
{
"coktelplayer",
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
kFeaturesAdLib | kFeatures640x480 | kFeaturesSCNDemo,
"", "", 8
}
};
static const ADFileBasedFallback fileBased[] = {
{ &fallbackDescs[ 0].desc, { "intro.stk", "disk1.stk", "disk2.stk", "disk3.stk", "disk4.stk", 0 } },
{ &fallbackDescs[ 1].desc, { "intro.stk", "gob.lic", 0 } },
{ &fallbackDescs[ 2].desc, { "intro.stk", 0 } },
{ &fallbackDescs[ 2].desc, { "intro.stk", "disk2.stk", "disk3.stk", 0 } },
{ &fallbackDescs[ 3].desc, { "intro.stk", "disk2.stk", "disk3.stk", "musmac1.mid", 0 } },
{ &fallbackDescs[ 4].desc, { "intro.stk", "gobnew.lic", 0 } },
{ &fallbackDescs[ 5].desc, { "intro.stk", "scaa.imd", "scba.imd", "scbf.imd", 0 } },
{ &fallbackDescs[ 6].desc, { "intro.stk", "imd.itk", 0 } },
{ &fallbackDescs[ 7].desc, { "intro.stk", "mus_gob3.lic", 0 } },
{ &fallbackDescs[ 8].desc, { "intro.stk", "woodruff.itk", 0 } },
{ &fallbackDescs[ 9].desc, { "intro.stk", "commun1.itk", 0 } },
{ &fallbackDescs[10].desc, { "intro.stk", "commun1.itk", "musmac1.mid", 0 } },
{ &fallbackDescs[11].desc, { "intro.stk", "commun1.itk", "lost.lic", 0 } },
{ &fallbackDescs[12].desc, { "intro.stk", "cd1.itk", "objet1.itk", 0 } },
{ &fallbackDescs[13].desc, { "playtoon.stk", "archi.stk", 0 } },
{ &fallbackDescs[14].desc, { "playtoon.stk", "spirou.stk", 0 } },
{ &fallbackDescs[15].desc, { "playtoon.stk", "chato.stk", 0 } },
{ &fallbackDescs[16].desc, { "playtoon.stk", "manda.stk", 0 } },
{ &fallbackDescs[17].desc, { "playtoon.stk", "wakan.stk", 0 } },
{ &fallbackDescs[18].desc, { "playtoon.stk", "dan.itk" } },
{ &fallbackDescs[19].desc, { "intro.stk", "bambou.itk", 0 } },
{ &fallbackDescs[20].desc, { "disk0.stk", "disk1.stk", "disk2.stk", "disk3.stk", 0 } },
{ &fallbackDescs[21].desc, { "disk1.stk", "disk2.stk", "disk3.stk", 0 } },
{ &fallbackDescs[22].desc, { "intro.stk", "stk2.stk", "stk3.stk", 0 } },
{ &fallbackDescs[23].desc, { "intro.stk", "stk2.stk", "stk3.stk", "mod.babayaga", 0 } },
{ &fallbackDescs[24].desc, { "stk1.stk", "stk2.stk", "stk3.stk", 0 } },
{ &fallbackDescs[25].desc, { "adi2.stk", 0 } },
{ &fallbackDescs[26].desc, { "adif41.stk", "adim41.stk", 0 } },
{ &fallbackDescs[27].desc, { "coktelplayer.scn", 0 } },
{ 0, { 0 } }
};
// -- Tables for detecting the specific Once Upon A Time game --
enum OnceUponATime {
kOnceUponATimeInvalid = -1,
kOnceUponATimeAbracadabra = 0,
kOnceUponATimeBabaYaga = 1,
kOnceUponATimeMAX
};
enum OnceUponATimePlatform {
kOnceUponATimePlatformInvalid = -1,
kOnceUponATimePlatformDOS = 0,
kOnceUponATimePlatformAmiga = 1,
kOnceUponATimePlatformAtariST = 2,
kOnceUponATimePlatformMAX
};
static const GOBGameDescription fallbackOnceUpon[kOnceUponATimeMAX][kOnceUponATimePlatformMAX] = {
{ // kOnceUponATimeAbracadabra
{ // kOnceUponATimePlatformDOS
{
"abracadabra",
"",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{ // kOnceUponATimePlatformAmiga
{
"abracadabra",
"",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{ // kOnceUponATimePlatformAtariST
{
"abracadabra",
"",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
}
},
{ // kOnceUponATimeBabaYaga
{ // kOnceUponATimePlatformDOS
{
"babayaga",
"",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{ // kOnceUponATimePlatformAmiga
{
"babayaga",
"",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{ // kOnceUponATimePlatformAtariST
{
"babayaga",
"",
AD_ENTRY1(0, 0),
UNK_LANG,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
}
}
};
#endif // GOB_DETECTION_TABLES_FALLBACK_H

View File

@@ -0,0 +1,283 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Fascination. */
#ifndef GOB_DETECTION_TABLES_FASCIN_H
#define GOB_DETECTION_TABLES_FASCIN_H
// -- DOS VGA Floppy (1 disk) --
{ // Supplied by scoriae
{
"fascination",
"VGA",
AD_ENTRY1s("disk0.stk", "c14330d052fe4da5a441ac9d81bc5891", 1061955),
EN_ANY,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
"disk0.stk", 0, 0
},
{
{
"fascination",
"VGA",
AD_ENTRY1s("disk0.stk", "e8ab4f200a2304849f462dc901705599", 183337),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
"disk0.stk", 0, 0
},
// -- DOS VGA Floppy (3 disks) --
{ // Supplied by alex86r in bug report #5691
{
"fascination",
"VGA 3 disks edition",
AD_ENTRY1s("disk0.stk", "ab3dfdce43917bc806812959d692fc8f", 1061929),
IT_ITA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
"disk0.stk", 0, 0
},
{
{
"fascination",
"VGA 3 disks edition",
AD_ENTRY1s("disk0.stk", "a50a8495e1b2d67699fb562cb98fc3e2", 1064387),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
"disk0.stk", 0, 0
},
{
{
"fascination",
"Censored",
AD_ENTRY1s("intro.stk", "d6e45ce548598727e2b5587a99718eba", 1055909),
HE_ISR,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
"intro.stk", 0, 0
},
{ // Supplied by windlepoons in bug report #4371
{
"fascination",
"VGA 3 disks edition",
AD_ENTRY1s("disk0.stk", "3a24e60a035250189643c86a9ceafb97", 1062480),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
"disk0.stk", 0, 0
},
// -- DOS VGA CD --
{
{
"fascination",
"CD (Censored)",
AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953),
EN_ANY,
kPlatformDOS,
ADGF_CD,
GUIO1(GUIO_NOSUBTITLES)
},
kFeaturesCD,
"intro.stk", 0, 0
},
{
{
"fascination",
"CD (Censored)",
AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953),
FR_FRA,
kPlatformDOS,
ADGF_CD,
GUIO1(GUIO_NOSUBTITLES)
},
kFeaturesCD,
"intro.stk", 0, 0
},
{
{
"fascination",
"CD (Censored)",
AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953),
DE_DEU,
kPlatformDOS,
ADGF_CD,
GUIO1(GUIO_NOSUBTITLES)
},
kFeaturesCD,
"intro.stk", 0, 0
},
{
{
"fascination",
"CD (Censored)",
AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953),
IT_ITA,
kPlatformDOS,
ADGF_CD,
GUIO1(GUIO_NOSUBTITLES)
},
kFeaturesCD,
"intro.stk", 0, 0
},
{
{
"fascination",
"CD (Censored)",
AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953),
ES_ESP,
kPlatformDOS,
ADGF_CD,
GUIO1(GUIO_NOSUBTITLES)
},
kFeaturesCD,
"intro.stk", 0, 0
},
{ // Supplied by dianiu in Bugreport #7069
{
"fascination",
"",
AD_ENTRY1s("disk0.stk", "fbf73d7919e1a6752d924eccc14838d7", 190498),
ES_ESP,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
"disk0.stk", 0, 0
},
// -- Amiga --
{
{
"fascination",
"",
AD_ENTRY1s("disk0.stk", "68b1c01564f774c0b640075fbad1b695", 189968),
DE_DEU,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
"disk0.stk", 0, 0
},
{
{
"fascination",
"",
AD_ENTRY1s("disk0.stk", "7062117e9c5adfb6bfb2dac3ff74df9e", 189951),
EN_GRB,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
"disk0.stk", 0, 0
},
{
{
"fascination",
"",
AD_ENTRY1s("disk0.stk", "55c154e5a3e8e98afebdcff4b522e1eb", 190005),
FR_FRA,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
"disk0.stk", 0, 0
},
{
{
"fascination",
"",
AD_ENTRY1s("disk0.stk", "7691827fff35df7799f14cfd6be178ad", 189931),
IT_ITA,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
"disk0.stk", 0, 0
},
{ // Supplied by CaptainHIT in bug report #11592
{
"fascination",
"",
AD_ENTRY1s("disk0.stk", "be68d6609da9ded9489dc2c4523035d2", 190030),
ES_ESP,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
"disk0.stk", 0, 0
},
// -- Atari ST --
{
{
"fascination",
"",
AD_ENTRY1s("disk0.stk", "aff9fcc619f4dd19eae228affd0d34c8", 189964),
EN_ANY,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
"disk0.stk", 0, 0
},
#endif // GOB_DETECTION_TABLES_FASCIN_H

View 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Geisha. */
#ifndef GOB_DETECTION_TABLES_GEISHA_H
#define GOB_DETECTION_TABLES_GEISHA_H
// -- DOS EGA Floppy --
{
{
"geisha",
"v1.0",
AD_ENTRY1s("disk1.stk", "6eebbb98ad90cd3c44549fc2ab30f632", 212153),
EN_ANY,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA | kFeaturesAdLib,
"disk1.stk", "intro.tot", 0
},
{
{
"geisha",
"v1.0",
AD_ENTRY1s("disk1.stk", "6eebbb98ad90cd3c44549fc2ab30f632", 212153),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA | kFeaturesAdLib,
"disk1.stk", "intro.tot", 0
},
{ // Supplied by misterhands in bug report #6079
{
"geisha",
"v1.0",
AD_ENTRY1s("disk1.stk", "0c4c16090921664f50baefdfd24d7f5d", 211889),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA | kFeaturesAdLib,
"disk1.stk", "intro.tot", 0
},
{ // Supplied by einstein95 in bug report #6102
{
"geisha",
"v1.0",
AD_ENTRY1s("disk1.stk", "49107ac897e7c00af6c4ecd78a74a710", 212169),
ES_ESP,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA | kFeaturesAdLib,
"disk1.stk", "intro.tot", 0
},
{ // Supplied by einstein95 in bug report #6102
{
"geisha",
"v1.0",
AD_ENTRY1s("disk1.stk", "49107ac897e7c00af6c4ecd78a74a710", 212169),
IT_ITA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA | kFeaturesAdLib,
"disk1.stk", "intro.tot", 0
},
{ // Supplied by alestedx in bug report #6269
{
"geisha",
"v1.0",
AD_ENTRY1s("disk1.stk", "49107ac897e7c00af6c4ecd78a74a710", 212164),
ES_ESP,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA | kFeaturesAdLib,
"disk1.stk", "intro.tot", 0
},
{ // Supplied by Hkz
{
"geisha",
"v1.0",
AD_ENTRY1s("disk1.stk", "49107ac897e7c00af6c4ecd78a74a710", 212164),
IT_ITA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA | kFeaturesAdLib,
"disk1.stk", "intro.tot", 0
},
{
{
"geisha",
"",
AD_ENTRY1s("disk1.stk", "f4d4d9d20f7ad1f879fc417d47faba89", 336732),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA | kFeaturesAdLib,
"disk1.stk", "intro.tot", 0
},
// -- Amiga --
{
{
"geisha",
"",
AD_ENTRY1s("disk1.stk", "e5892f00917c62423e93f5fd9920cf47", 208120),
EN_GRB,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
"disk1.stk", "intro.tot", 0
},
{ // Supplied by CaptainHIT in bug report #11594
{
"geisha",
"",
AD_ENTRY1s("disk1.stk", "260abe99a1fe0aa0ca76348e9f9f7746", 208133),
DE_DEU,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
"disk1.stk", "intro.tot", 0
},
{ // Supplied by CaptainHIT in bug report #11593
{
"geisha",
"",
AD_ENTRY1s("disk1.stk", "948a74459c9433273bb4c7a2b4ccbf6c", 208135),
FR_FRA,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
"disk1.stk", "intro.tot", 0
},
{ // Supplied by CaptainHIT in bug report #11595
{
"geisha",
"",
AD_ENTRY1s("disk1.stk", "84e2b52fbfa965c59dc6a6db52b39450", 208148),
ES_ESP,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
"disk1.stk", "intro.tot", 0
},
#endif // GOB_DETECTION_TABLES_GEISHA_H

View File

@@ -0,0 +1,746 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Gobliiins. */
#ifndef GOB_DETECTION_TABLES_GOB1_H
#define GOB_DETECTION_TABLES_GOB1_H
// -- DOS EGA Floppy --
{ // Supplied by Florian Zeitz on scummvm-devel
{
"gob1",
"EGA",
AD_ENTRY1s("intro.stk", "c65e9cc8ba23a38456242e1f2b1caad4", 135561),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesEGA | kFeaturesAdLib,
0, 0, 0
},
{
{
"gob1",
"EGA",
AD_ENTRY1("intro.stk", "f9233283a0be2464248d83e14b95f09c"),
RU_RUS,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesEGA | kFeaturesAdLib,
0, 0, 0
},
// -- DOS VGA Floppy --
{ // Supplied by Theruler76 in bug report #2024
{
"gob1",
"VGA",
AD_ENTRY1s("intro.stk", "26a9118c0770fa5ac93a9626761600b2", 233466),
EN_ANY,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by raziel_ in bug report #3620
{
"gob1",
"VGA",
AD_ENTRY1s("intro.stk", "e157cb59c6d330ca70d12ab0ef1dd12b", 288972),
EN_GRB,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- DOS VGA CD --
{ // Provided by pykman in the forums.
{
"gob1",
"CD",
AD_ENTRY1s("intro.stk", "97d2443948b2e367cf567fe7e101f5f2", 4049267),
PL_POL,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"gob1",
"CD v1.000",
AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"),
EN_USA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"gob1",
"CD v1.000",
AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"),
DE_DEU,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"gob1",
"CD v1.000",
AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"),
FR_FRA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"gob1",
"CD v1.000",
AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"),
IT_ITA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"gob1",
"CD v1.000",
AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"),
ES_ESP,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // CD 1.02 version. Multilingual
{
"gob1",
"CD v1.02",
AD_ENTRY1s("intro.stk", "8bd873137b6831c896ee8ad217a6a398", 3295368),
EN_USA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // CD 1.02 version. Multilingual
{
"gob1",
"CD v1.02",
AD_ENTRY1s("intro.stk", "8bd873137b6831c896ee8ad217a6a398", 3295368),
DE_DEU,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // CD 1.02 version. Multilingual
{
"gob1",
"CD v1.02",
AD_ENTRY1s("intro.stk", "8bd873137b6831c896ee8ad217a6a398", 3295368),
FR_FRA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // CD 1.02 version. Multilingual
{
"gob1",
"CD v1.02",
AD_ENTRY1s("intro.stk", "8bd873137b6831c896ee8ad217a6a398", 3295368),
IT_ITA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // CD 1.02 version. Multilingual
{
"gob1",
"CD v1.02",
AD_ENTRY1s("intro.stk", "8bd873137b6831c896ee8ad217a6a398", 3295368),
ES_ESP,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob1",
"CD v1.02",
AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248),
HU_HUN,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob1",
"CD v1.02",
AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248),
FR_FRA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob1",
"CD v1.02",
AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248),
ES_ESP,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob1",
"CD v1.02",
AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248),
IT_ITA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
// -- Mac --
{ // Supplied by raina in the forums
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "6d837c6380d8f4d984c9f6cc0026df4f", 192712),
EN_ANY,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by paul66 in bug report #3045
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267", 199890),
EN_ANY,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by paul66 in bug report #3045
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267", 199890),
DE_DEU,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by paul66 in bug report #3045
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267", 199890),
FR_FRA,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by paul66 in bug report #3045
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267", 199890),
IT_ITA,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by paul66 in bug report #3045
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267", 199890),
ES_ESP,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "acdda40f4b20a87d4cfd760d3833a6e1", 453404),
JA_JPN,
kPlatformMacintosh,
ADGF_UNSTABLE,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by Svipur in bug report #14531 (Adapted to CD by A.P.$lasH)
{
"gob1",
"CD adaptatiton",
AD_ENTRY1s("intro.stk", "dd3975b66f37d2f360f34ee1f83041f1", 3231773),
RU_RUS,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
// -- Windows --
{ // Supplied by Hkz on #scummvm
{
"gob1",
"",
AD_ENTRY2s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472,
"musmac1.mid", "4f66903b33df8a20edd4c748809c0b56", 8161),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by Hkz on #scummvm
{
"gob1",
"",
AD_ENTRY2s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472,
"musmac1.mid", "4f66903b33df8a20edd4c748809c0b56", 8161),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by Hkz on #scummvm
{
"gob1",
"",
AD_ENTRY2s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472,
"musmac1.mid", "4f66903b33df8a20edd4c748809c0b56", 8161),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by Hkz on #scummvm
{
"gob1",
"",
AD_ENTRY2s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472,
"musmac1.mid", "4f66903b33df8a20edd4c748809c0b56", 8161),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by Hkz on #scummvm
{
"gob1",
"",
AD_ENTRY2s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472,
"musmac1.mid", "4f66903b33df8a20edd4c748809c0b56", 8161),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob1",
"",
AD_ENTRY2s("intro.stk", "e157cb59c6d330ca70d12ab0ef1dd12b", 288972,
"musmac1.mid", "4f66903b33df8a20edd4c748809c0b56", 8161),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob1",
"",
AD_ENTRY2s("intro.stk", "e157cb59c6d330ca70d12ab0ef1dd12b", 288972,
"musmac1.mid", "4f66903b33df8a20edd4c748809c0b56", 8161),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob1",
"",
AD_ENTRY2s("intro.stk", "e157cb59c6d330ca70d12ab0ef1dd12b", 288972,
"musmac1.mid", "4f66903b33df8a20edd4c748809c0b56", 8161),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob1",
"",
AD_ENTRY2s("intro.stk", "e157cb59c6d330ca70d12ab0ef1dd12b", 288972,
"musmac1.mid", "4f66903b33df8a20edd4c748809c0b56", 8161),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob1",
"",
AD_ENTRY2s("intro.stk", "e157cb59c6d330ca70d12ab0ef1dd12b", 288972,
"musmac1.mid", "4f66903b33df8a20edd4c748809c0b56", 8161),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Found in french ADI 2.5 Anglais Multimedia 5e
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Found in french ADI 2.5 Anglais Multimedia 5e
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Found in french ADI 2.5 Anglais Multimedia 5e
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Found in french ADI 2.5 Anglais Multimedia 5e
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Found in french ADI 2.5 Anglais Multimedia 5e
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Amiga --
{
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "c65e9cc8ba23a38456242e1f2b1caad4", 135561),
UNK_LANG,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
},
{
{
"gob1",
"",
AD_ENTRY2s("intro.stk", "c65e9cc8ba23a38456242e1f2b1caad4", 135561,
"disk1.stk", "a6ed3c1c9a46c511952bac0c11c691f5", 367048),
DE_DEU,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
},
// -- Demos --
{
{
"gob1",
"Demo",
AD_ENTRY1("intro.stk", "972f22c6ff8144a6636423f0354ca549"),
EN_GRB,
kPlatformAmiga,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{
{ // dated 8/1/93
"gob1",
"Interactive Demo (v2.0)",
AD_ENTRY1s("intro.stk", "e72bd1e3828c7dec4c8a3e58c48bdfdb", 280044),
EN_ANY,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{
{
"gob1",
"Interactive Demo",
AD_ENTRY1s("intro.stk", "a796096280d5efd48cf8e7dfbe426eb5", 193595),
EN_GRB,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4324
{
"gob1",
"Interactive Demo",
AD_ENTRY1s("intro.stk", "35a098571af9a03c04e2303aec7c9249", 116582),
FR_FRA,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
// -- CD-i --
{
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "0e022d3f2481b39e9175d37b2c6ad4c6", 2390121),
FR_FRA,
kPlatformCDi,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, "AVT003.TOT", 0
},
{ // Found on ADI Accompagnement Scolaire - Francais-Maths CE1/CE2
{
"gob1",
"CE1/CE2",
AD_ENTRY1s("intro.stk", "ae38e1dac63576b9a7d34a96fd6eb37c", 5731374),
FR_FRA,
kPlatformCDi,
ADGF_DEMO | ADGF_UNSTABLE,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, "AVT008.TOT", 0
},
{ // Found on ADI Accompagnement Scolaire - Francais-Maths CM1/CM2
{
"gob1",
"CM1/CM2",
AD_ENTRY1s("intro.stk", "ca15cc119fea5ee432083e7f6b873c38", 2441216),
FR_FRA,
kPlatformCDi,
ADGF_DEMO | ADGF_UNSTABLE,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, "AVT003.TOT", 0
},
{ // Found on ADI Spielerisch lernen (German CD-i version) Found on Klasse 1&2 also on 3&4
{
"gob1",
"",
AD_ENTRY1s("intro.stk", "0acc50f67f9323c3654921915dab2d63", 7098368),
DE_DEU,
kPlatformCDi,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
kFeaturesAdLib,
0, "avt003.tot", 0
},
#endif // GOB_DETECTION_TABLES_GOB1_H

View File

@@ -0,0 +1,635 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Gobliins 2: The Prince Buffoon. */
#ifndef GOB_DETECTION_TABLES_GOB2_H
#define GOB_DETECTION_TABLES_GOB2_H
// -- DOS VGA Floppy --
{
{
"gob2",
"",
AD_ENTRY1("intro.stk", "b45b984ee8017efd6ea965b9becd4d66"),
EN_GRB,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob2",
"v1.03",
AD_ENTRY1("intro.stk", "dedb5d31d8c8050a8cf77abedcc53dae"),
EN_USA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by raziel_ in bug report #3621
{
"gob2",
"v1.02",
AD_ENTRY1s("intro.stk", "25a99827cd59751a80bed9620fb677a0", 893302),
EN_USA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob2",
"",
AD_ENTRY1s("intro.stk", "a13ecb4f6d8fd881ebbcc02e45cb5475", 837275),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by blackwhiteeagle in bug report #2934
{
"gob2",
"v1.02",
AD_ENTRY1("intro.stk", "3e4e7db0d201587dd2df4003b2993ef6"),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob2",
"",
AD_ENTRY1("intro.stk", "a13892cdf4badda85a6f6fb47603a128"),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4163
{
"gob2",
"v1.02",
AD_ENTRY1s("intro.stk", "c47faf1d406504e6ffe63243610bb1f4", 828799),
IT_ITA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob2",
"v1.02",
AD_ENTRY1s("intro.stk", "cd3e1df8b273636ee32e34b7064f50e8", 874488),
RU_RUS,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by arcepi in bug report #3060
{
"gob2",
"",
AD_ENTRY1s("intro.stk", "5f53c56e3aa2f1e76c2e4f0caa15887f", 829232),
ES_ESP,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
// -- DOS VGA CD --
{
{
"gob2",
"CD v1.000",
AD_ENTRY1s("intro.stk", "9de5fbb41cf97182109e5fecc9d90347", 4328864),
EN_USA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by pykman in bug report #5365
{
"gob2",
"CD v2.01",
AD_ENTRY1s("intro.stk", "3025f05482b646c18c2c79c615a3a1df", 5011726),
PL_POL,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by pykman in bug report #5365
{
"gob2",
"CD v1.02",
AD_ENTRY1s("intro.stk", "978afddcac81bb95a04757b61f78471c", 619825),
PL_POL,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"gob2",
"CD v2.01",
AD_ENTRY1s("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04", 4541724),
EN_ANY,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"gob2",
"CD v2.01",
AD_ENTRY1s("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04", 4541724),
DE_DEU,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"gob2",
"CD v2.01",
AD_ENTRY1s("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04", 4541724),
FR_FRA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"gob2",
"CD v2.01",
AD_ENTRY1s("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04", 4541724),
IT_ITA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"gob2",
"CD v2.01",
AD_ENTRY1s("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04", 4541724),
ES_ESP,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Hebrew fan translation
{
"gob2",
"CD v2.01",
AD_ENTRY1s("intro.stk", "b768039f8d0a12c39ca28dcd33d584ba", 4696209),
HE_ISR,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob2",
"CD v1.02",
AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236),
HU_HUN,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob2",
"CD v1.02",
AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236),
FR_FRA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob2",
"CD v1.02",
AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236),
DE_DEU,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob2",
"CD v1.02",
AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236),
ES_ESP,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob2",
"CD v1.02",
AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236),
IT_ITA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
// -- Windows --
{
{
"gob2",
"v1.02",
AD_ENTRY2s("intro.stk", "285d7340f98ebad65d465585da12910b", 837286,
"musmac1.mid", "834e55205b710d0af5f14a6f2320dd8e", 8661),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob2",
"v1.02",
AD_ENTRY2s("intro.stk", "25a99827cd59751a80bed9620fb677a0", 893302,
"musmac1.mid", "834e55205b710d0af5f14a6f2320dd8e", 8661),
EN_USA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob2",
"v1.02",
AD_ENTRY2s("intro.stk", "25a99827cd59751a80bed9620fb677a0", 893302,
"musmac1.mid", "834e55205b710d0af5f14a6f2320dd8e", 8661),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob2",
"v1.02",
AD_ENTRY2s("intro.stk", "25a99827cd59751a80bed9620fb677a0", 893302,
"musmac1.mid", "834e55205b710d0af5f14a6f2320dd8e", 8661),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob2",
"v1.02",
AD_ENTRY2s("intro.stk", "6efac0a14c0de4d57dde8592456c8acf", 845172,
"musmac1.mid", "834e55205b710d0af5f14a6f2320dd8e", 8661),
EN_USA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob2",
"v1.02",
AD_ENTRY2s("intro.stk", "6efac0a14c0de4d57dde8592456c8acf", 845172,
"musmac1.mid", "834e55205b710d0af5f14a6f2320dd8e", 8661),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Found in french ADI 2 Francais-Maths CM1
{
"gob2",
"v1.03",
AD_ENTRY1s("intro.stk", "24489330a1d67ff978211f574822a5a6", 883756),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Found in french ADI 2.5 Anglais Multimedia 5e
{
"gob2",
"v1.02",
AD_ENTRY1s("intro.stk", "285d7340f98ebad65d465585da12910b", 837286),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Included in a German version of Adi 2
{
"gob2",
"v1.03",
AD_ENTRY1s("intro.stk", "271863a3dfc27665fac4b3589a0e735f", 947966),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Mac --
{ // Supplied by fac76 in bug report #3108
{
"gob2",
"v1.02",
AD_ENTRY2s("intro.stk", "b45b984ee8017efd6ea965b9becd4d66", 828443,
"musmac1.mid", "7f96f491448c7a001b32df89cf8d2af2", 1658),
EN_ANY,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by koalet in bug report #4064
{
"gob2",
"",
AD_ENTRY2s("intro.stk", "a13ecb4f6d8fd881ebbcc02e45cb5475", 837275,
"musmac1.mid", "7f96f491448c7a001b32df89cf8d2af2", 1658),
FR_FRA,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Amiga --
{ // Supplied by fac76 in bug report #3608
{
"gob2",
"v1.02",
AD_ENTRY1s("intro.stk", "eebf2810122cfd17399260cd1468e994", 554014),
EN_GRB,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
},
{
{
"gob2",
"v1.02",
AD_ENTRY1s("intro.stk", "d28b9e9b41f31acfa58dcd12406c7b2c", 554865),
DE_DEU,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4164
{
"gob2",
"v1.02",
AD_ENTRY1s("intro.stk", "686c88f7302a80b744aae9f8413e853d", 554384),
IT_ITA,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by aldozx in the forums
{
"gob2",
"",
AD_ENTRY1s("intro.stk", "abc3e786cd78197773954c75815b278b", 554721),
ES_ESP,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by damsoftPL in bug report #12033
{
"gob2",
"",
AD_ENTRY1s("intro.stk", "d721383633b7acd6f18752e1ad217473", 559840),
PL_POL,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
},
// -- Atari ST --
{ // Supplied by bgk in bug report #3161
{
"gob2",
"v1.02",
AD_ENTRY1s("intro.stk", "4b13c02d1069b86bcfec80f4e474b98b", 554680),
FR_FRA,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
// -- Demos --
{
{
"gob2",
"Non-Interactive Demo (v1.0)",
AD_ENTRY1s("intro.stk", "8b1c98ff2ab2e14f47a1b891e9b92217", 907690),
EN_GRB,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, "usa.tot", 0
},
{
{
"gob2",
"Interactive Demo (v1.01)",
AD_ENTRY1s("intro.stk", "cf1c95b2939bd8ff58a25c756cb6125e", 492226),
EN_GRB,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob2",
"Interactive Demo (v1.02)",
AD_ENTRY1s("intro.stk", "4b278c2678ea01383fd5ca114d947eea", 575920),
EN_GRB,
kPlatformAmiga,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by polluks in bug report #3628
{
"gob2",
"Interactive Demo (v1.0)",
AD_ENTRY1s("intro.stk", "9fa85aea959fa8c582085855fbd99346", 553063),
EN_GRB,
kPlatformAmiga,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_GOB2_H

View File

@@ -0,0 +1,552 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Goblins 3 / Goblins Quest 3. */
#ifndef GOB_DETECTION_TABLES_GOB3_H
#define GOB_DETECTION_TABLES_GOB3_H
// -- DOS VGA Floppy --
{
{
"gob3",
"v1.00",
AD_ENTRY1s("intro.stk", "32b0f57f5ae79a9ae97e8011df38af42", 157084),
EN_GRB,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"",
AD_ENTRY1s("intro.stk", "904fc32032295baa3efb3a41f17db611", 178582),
HE_ISR,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by raziel_ in bug report #3622
{
"gob3",
"v0.50",
AD_ENTRY1s("intro.stk", "16b014bf32dbd6ab4c5163c44f56fed1", 445104),
EN_GRB,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // dated March 17, 1994
{
"gob3",
"v1.00",
AD_ENTRY1s("intro.stk", "1e2f64ec8dfa89f42ee49936a27e66e7", 159444),
EN_USA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by paul66 in bug report #3045
{
"gob3",
"",
AD_ENTRY1s("intro.stk", "f6d225b25a180606fa5dbe6405c97380", 161516),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"",
AD_ENTRY1("intro.stk", "e42a4f2337d6549487a80864d7826972"),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by Paranoimia on #scummvm
{
"gob3",
"",
AD_ENTRY1s("intro.stk", "fe8144daece35538085adb59c2d29613", 159402),
IT_ITA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"v0.50",
AD_ENTRY1s("intro.stk", "4e3af248a48a2321364736afab868527", 204265),
RU_RUS,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"",
AD_ENTRY1("intro.stk", "8d28ce1591b0e9cc79bf41cad0fc4c9c"),
UNK_LANG,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by SiRoCs in bug report #3949
{
"gob3",
"v1.00",
AD_ENTRY1s("intro.stk", "d3b72938fbbc8159198088811f9e6d19", 160382),
ES_ESP,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Windows --
{
{
"gob3",
"v1.00",
AD_ENTRY2s("intro.stk", "16b014bf32dbd6ab4c5163c44f56fed1", 445104,
"musmac1.mid", "948c546cad3a9de5bff3fe4107c82bf1", 6404),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"v1.00",
AD_ENTRY2s("intro.stk", "16b014bf32dbd6ab4c5163c44f56fed1", 445104,
"musmac1.mid", "948c546cad3a9de5bff3fe4107c82bf1", 6404),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"v1.00",
AD_ENTRY2s("intro.stk", "16b014bf32dbd6ab4c5163c44f56fed1", 445104,
"musmac1.mid", "948c546cad3a9de5bff3fe4107c82bf1", 6404),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"v1.00",
AD_ENTRY2s("intro.stk", "edd7403e5dc2a14459d2665a4c17714d", 209534,
"musmac1.mid", "948c546cad3a9de5bff3fe4107c82bf1", 6404),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"",
AD_ENTRY2s("intro.stk", "428e2de130cf3b303c938924539dc50d", 324420,
"musmac1.mid", "948c546cad3a9de5bff3fe4107c82bf1", 6404),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"",
AD_ENTRY2s("intro.stk", "428e2de130cf3b303c938924539dc50d", 324420,
"musmac1.mid", "948c546cad3a9de5bff3fe4107c82bf1", 6404),
EN_ANY,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Found in Found in french ADI 2.5 Anglais Multimedia 5e
{
"gob3",
"v1.00",
AD_ENTRY1s("intro.stk", "edd7403e5dc2a14459d2665a4c17714d", 209534),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Mac --
{ // Supplied by fac76 in bug report #3272
{
"gob3",
"v1.00",
AD_ENTRY2s("intro.stk", "32b0f57f5ae79a9ae97e8011df38af42", 157084,
"musmac1.mid", "834e55205b710d0af5f14a6f2320dd8e", 8661),
EN_GRB,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Amiga --
{
{
"gob3",
"",
AD_ENTRY1s("intro.stk", "bd679eafde2084d8011f247e51b5a805", 197532),
EN_GRB,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, "menu.tot", 0
},
{
{
"gob3",
"",
AD_ENTRY1s("intro.stk", "bd679eafde2084d8011f247e51b5a805", 197532),
DE_DEU,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, "menu.tot", 0
},
// -- DOS VGA CD --
{
{
"gob3",
"CD v1.000",
AD_ENTRY1("intro.stk", "6f2c226c62dd7ab0ab6f850e89d3fc47"),
EN_USA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by pykman in bug report #5365
{
"gob3",
"CD v1.02",
AD_ENTRY1s("intro.stk", "978afddcac81bb95a04757b61f78471c", 619825),
PL_POL,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by paul66 and noizert in bug reports #3045 and #3137
{
"gob3",
"CD v1.02",
AD_ENTRY1s("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261", 612482),
EN_ANY,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by paul66 and noizert in bug reports #3045 and #3137
{
"gob3",
"CD v1.02",
AD_ENTRY1s("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261", 612482),
DE_DEU,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by paul66 and noizert in bug reports #3045 and #3137
{
"gob3",
"CD v1.02",
AD_ENTRY1s("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261", 612482),
FR_FRA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by paul66 and noizert in bug reports #3045 and #3137
{
"gob3",
"CD v1.02",
AD_ENTRY1s("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261", 612482),
IT_ITA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by paul66 and noizert in bug reports #3045 and #3137
{
"gob3",
"CD v1.02",
AD_ENTRY1s("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261", 612482),
ES_ESP,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob3",
"CD v1.02",
AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220),
HU_HUN,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob3",
"CD v1.02",
AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220),
FR_FRA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob3",
"CD v1.02",
AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220),
DE_DEU,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4375
{
"gob3",
"CD v1.02",
AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220),
ES_ESP,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
// -- Demos --
{
{
"gob3",
"Non-interactive Demo (v1.0)",
AD_ENTRY1s("intro.stk", "b9b898fccebe02b69c086052d5024a55", 600143),
FR_FRA,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"Interactive Demo (v0.02)",
AD_ENTRY1s("intro.stk", "7aebd94e49c2c5c518c9e7b74f25de9d", 270737),
FR_FRA,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"Interactive Demo 2 (v0.02)",
AD_ENTRY1s("intro.stk", "e5dcbc9f6658ebb1e8fe26bc4da0806d", 590631),
FR_FRA,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"gob3",
"Interactive Demo 3 (v0.02)",
AD_ENTRY1s("intro.stk", "9e20ad7b471b01f84db526da34eaf0a2", 395561),
EN_ANY,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by Dark-Star on #scummvm
{
"gob3",
"Interactive Demo 4",
AD_ENTRY1s("intro.stk", "9c7c9002506fc976128ffe8f308d428c", 395562),
EN_GRB,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by Dark-Star on #scummvm
{
"gob3",
"Interactive Demo 4",
AD_ENTRY1s("intro.stk", "9c7c9002506fc976128ffe8f308d428c", 395562),
DE_DEU,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by Dark-Star on #scummvm
{
"gob3",
"Interactive Demo 4",
AD_ENTRY1s("intro.stk", "9c7c9002506fc976128ffe8f308d428c", 395562),
FR_FRA,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_GOB3_H

View File

@@ -0,0 +1,255 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Inca II: Wiracocha. */
#ifndef GOB_DETECTION_TABLES_INCA2_H
#define GOB_DETECTION_TABLES_INCA2_H
// -- DOS VGA Floppy --
{
{
"inca2",
"v1.000",
AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072),
EN_USA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"inca2",
"v1.000",
AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"inca2",
"v1.000",
AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// US floppy box dated 18.03.1994
{
{
"inca2",
"v1.0",
AD_ENTRY1s("intro.stk", "48cc6e6b0b0b343f876290d2700d8eba", 804780),
EN_USA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- DOS VGA CD --
{
{
"inca2",
"",
AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828),
EN_USA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{ // Bugreport #12757
"inca2",
"v1.07",
AD_ENTRY1s("intro.stk", "b56e4147acc5852c6fc2de5985ab94b0", 804796),
EN_USA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"inca2",
"",
AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"inca2",
"",
AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"inca2",
"",
AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828),
IT_ITA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"inca2",
"",
AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828),
ES_ESP,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
// -- Windows --
{
{
"inca2",
"",
AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612),
EN_USA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"inca2",
"",
AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"inca2",
"",
AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"inca2",
"",
AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"inca2",
"",
AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Demos --
{
{
"inca2",
"Non-Interactive Demo (v2.0)", // dated 8/1/93
AD_ENTRY1s("cons.imd", "f896ba0c4a1ac7f7260d342655980b49", 17804),
EN_ANY,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesBATDemo,
0, 0, 7
},
#endif // GOB_DETECTION_TABLES_INCA2_H

View File

@@ -0,0 +1,462 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Lost in Time. */
#ifndef GOB_DETECTION_TABLES_LIT_H
#define GOB_DETECTION_TABLES_LIT_H
// -- DOS VGA Floppy (Part I and II) --
{
{
"lit",
"v1.10",
AD_ENTRY1s("intro.stk", "7b7f48490dedc8a7cb999388e2fadbe3", 3930674),
EN_USA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"lit",
"",
AD_ENTRY1s("intro.stk", "e0767783ff662ed93665446665693aef", 4371238),
HE_ISR,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by cartman_ on #scummvm
{
"lit",
"",
AD_ENTRY1s("intro.stk", "f1f78b663893b58887add182a77df151", 3944090),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #3960
{
"lit",
"",
AD_ENTRY1s("intro.stk", "cd322cb3c64ef2ba2f2134aa2122cfe9", 3936700),
ES_ESP,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- DOS CD --
{
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
EN_USA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
FR_FRA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
IT_ITA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
DE_DEU,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
ES_ESP,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
EN_GRB,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by SiRoCs in bug report #3943 dated 09.06.93
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
EN_USA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by SiRoCs in bug report #3943 dated 09.06.93
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
FR_FRA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by SiRoCs in bug report #3943 dated 09.06.93
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
IT_ITA,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by SiRoCs in bug report #3943 dated 09.06.93
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
DE_DEU,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by SiRoCs in bug report #3943 dated 09.06.93
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
ES_ESP,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
{ // Supplied by SiRoCs in bug report #3943 dated 09.06.93
{
"lit",
"CD v1.00",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
EN_GRB,
kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesCD,
0, 0, 0
},
// -- Windows (Part I and II) --
{
{
"lit",
"v1.10",
AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4207330),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"lit",
"v1.10",
AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4207330),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"lit",
"v1.10",
AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4207330),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"lit",
"v1.10",
AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4219382),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"lit",
"v1.10",
AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4219382),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Found in french ADI 2.6 Francais-Maths 4e
{
"lit",
"",
AD_ENTRY1s("intro.stk", "58ee9583a4fb837f02d9a58e5f442656", 3937120),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Windows (Part I only) --
{
{
"lit1",
"Light install",
AD_ENTRY2s("intro.stk", "93c91bc9e783d00033042ae83144d7dd", 72318,
"partie2.itk", "78f00bd8eb9e680e6289bba0130b1b33", 664064),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"lit1",
"Full install",
AD_ENTRY2s("intro.stk", "93c91bc9e783d00033042ae83144d7dd", 72318,
"partie2.itk", "78f00bd8eb9e680e6289bba0130b1b33", 4396644),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Windows (Part II only) --
{
{
"lit2",
"Light install",
AD_ENTRY1s("intro.stk", "17acbb212e62addbe48dc8f2282c98cb", 72318),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"lit2",
"Full install",
AD_ENTRY2s("intro.stk", "17acbb212e62addbe48dc8f2282c98cb", 72318,
"partie4.itk", "6ce4967e0c79d7daeabc6c1d26783d4c", 2612087),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Mac (Part I and II) --
{ // Supplied by koalet in bug report #4066
{
"lit",
"",
AD_ENTRY2s("intro.stk", "af98bcdc70e1f1c1635577fd726fe7f1", 3937310,
"musmac1.mid", "ae7229bb09c6abe4e60a2768b24bc890", 9398),
FR_FRA,
kPlatformMacintosh,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Demos --
{
{
"lit",
"Demo (v1.0)",
AD_ENTRY1s("demo.stk", "c06f8cc20eb239d4c71f225ce3093edf", 609402),
EN_ANY,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
"demo.stk", "demo.tot", 0
},
{
{
"lit",
"Non-interactive Demo",
AD_ENTRY1s("demo.stk", "2eba8abd9e3878c57307576012dd2fec", 3031494),
FR_FRA,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
"demo.stk", "demo.tot", 0
},
{
{
"lit",
"Non-interactive Demo",
AD_ENTRY1s("demo.stk", "895359c918a145adc048f779b3cdacc3", 645068),
FR_FRA,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
"demo.stk", "demo.tot", 0
},
// -- Pirated! Do not re-add nor un-tag! --
{
{
"lit",
"",
AD_ENTRY1s("intro.stk", "3712e7527ba8ce5637d2aadf62783005", 72318),
FR_FRA,
kPlatformDOS,
ADGF_PIRATED,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_LIT_H

View File

@@ -0,0 +1,264 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Once Upon A Time: Little Red Riding Hood. */
#ifndef GOB_DETECTION_TABLES_LITTLERED_H
#define GOB_DETECTION_TABLES_LITTLERED_H
// -- DOS EGA Floppy --
{
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490),
EN_GRB,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490),
ES_ESP,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490),
IT_ITA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
// -- Windows --
{
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{ // Included in a German version of Adi 2 - Supplied by BJNFNE
{
"littlered",
"v1.1",
AD_ENTRY1s("intro.stk", "1c00173d73a3691cc93948f6575d7c75", 1188138),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{ // Found in french ADI 2 Francais-Maths CM1
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{ // Found in french ADI 2 Francais-Maths CM1
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{ // Found in french ADI 2 Francais-Maths CM1
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{ // Found in french ADI 2 Francais-Maths CM1
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{ // Found in french ADI 2 Francais-Maths CM1
{
"littlered",
"",
AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
// -- Amiga --
{
{
"littlered",
"",
AD_ENTRY2s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490,
"mod.babayaga", "43484cde74e0860785f8e19f0bc776d1", 60248),
UNK_LANG,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_LITTLERED_H

View File

@@ -0,0 +1,70 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Le pays des Pierres Magiques / The Land of the Magic Stones / Das Zauberland der Zaubersteine */
/* This Game uses the DEV7 Engine, more Information can be found here: https://wiki.scummvm.org/index.php?title=DEV7_Information */
#ifndef GOB_DETECTION_TABLES_MAGICSTONES_H
#define GOB_DETECTION_TABLES_MAGICSTONES_H
// -- French: Le pays des Pierres Magiques --
{
{ // Added by Strangerke in 2009
"magicstones",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // A la poursuite du dragon de feu (Engine: DEV7 version 1.2.0.0)
AD_ENTRY2s("ed4.stk", "98721a7cfdc5a358d7ac56b7c6d3ba3d", 541882,
"ed4_cd.itk", "0627a91d9a6f4772c33747ce752024c2", 606993908),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"ed4.stk","main.obc",0
},
// -- German: Das Zauberland der Zaubersteine --
{
{ // Supplied by codengine
"magicstones",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // Die Suche nach dem Feuerdrachen (Engine: DEV7 version 1.2.0.0)
AD_ENTRY2s("ed4.stk", "805ceadf60b9446e06078ba9cb7f75ee", 542754,
"ed4_cd.itk", "02de8ac4f12ed0e4cf5577683f443dcb", 599645278),
DE_DEU,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"ed4.stk","main.obc",0
},
#endif // GOB_DETECTION_TABLES_MAGICSTONES_H

View File

@@ -0,0 +1,51 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for the Nathan Vacances series. */
/* This Game uses the DEV7 Engine, more Information can be found here: https://wiki.scummvm.org/index.php?title=DEV7_Information */
#ifndef GOB_DETECTION_TABLES_NATHANVACANCES_H
#define GOB_DETECTION_TABLES_NATHANVACANCES_H
// -- French: Nathan Vacances --
{
{
"nathanvacances",
MetaEngineDetection::GAME_NOT_IMPLEMENTED, // CM1/CE2 1.00 (DEV7 version 1.20a)
AD_ENTRY2s("common.stk", "344185d17c593122a548122df63b70cf", 1851672,
"ah88f100.cd1", "d41d8cd98f00b204e9800998ecf8427e", 0),
FR_FRA,
kPlatformWindows,
ADGF_UNSUPPORTED,
GUIO0()
},
kFeatures800x600,
"common.stk", "A5HS_Start.obc", 0
},
#endif // GOB_DETECTION_TABLES_NATHANVACANCES_H

View File

@@ -0,0 +1,423 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Once Upon A Time: Baba Yaga and Abracadabra. */
#ifndef GOB_DETECTION_TABLES_ONCEUPON_H
#define GOB_DETECTION_TABLES_ONCEUPON_H
// -- Once Upon A Time: Abracadabra, Amiga --
{
{
"abracadabra",
"",
AD_ENTRY3s("stk1.stk", "a8e963eea170155548e5bc1d0f07d50d", 209806,
"stk2.stk", "e4b21818af03930dc9cab2ad4c93cb5b", 362106,
"stk3.stk", "76874ad92782f9b2de57beafc05ec877", 353482),
FR_FRA,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"abracadabra",
"",
AD_ENTRY3s("stk1.stk", "a8e963eea170155548e5bc1d0f07d50d", 209806,
"stk2.stk", "e4b21818af03930dc9cab2ad4c93cb5b", 362106,
"stk3.stk", "76874ad92782f9b2de57beafc05ec877", 353482),
DE_DEU,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"abracadabra",
"",
AD_ENTRY3s("stk1.stk", "a8e963eea170155548e5bc1d0f07d50d", 209806,
"stk2.stk", "e4b21818af03930dc9cab2ad4c93cb5b", 362106,
"stk3.stk", "76874ad92782f9b2de57beafc05ec877", 353482),
EN_ANY,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"abracadabra",
"",
AD_ENTRY3s("stk1.stk", "a8e963eea170155548e5bc1d0f07d50d", 209806,
"stk2.stk", "e4b21818af03930dc9cab2ad4c93cb5b", 362106,
"stk3.stk", "76874ad92782f9b2de57beafc05ec877", 353482),
IT_ITA,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"abracadabra",
"",
AD_ENTRY3s("stk1.stk", "a8e963eea170155548e5bc1d0f07d50d", 209806,
"stk2.stk", "e4b21818af03930dc9cab2ad4c93cb5b", 362106,
"stk3.stk", "76874ad92782f9b2de57beafc05ec877", 353482),
ES_ESP,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
// -- Once Upon A Time: Abracadabra, Atari ST --
{
{
"abracadabra",
"",
AD_ENTRY3s("stk1.stk", "a8e963eea170155548e5bc1d0f07d50d", 209806,
"stk2.stk", "c6440aaf068ec3149ae89bc5c41ebf02", 362123,
"stk3.stk", "5af3c1202ba6fcf8dad2b2125e1c1383", 353257),
FR_FRA,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"abracadabra",
"",
AD_ENTRY3s("stk1.stk", "a8e963eea170155548e5bc1d0f07d50d", 209806,
"stk2.stk", "c6440aaf068ec3149ae89bc5c41ebf02", 362123,
"stk3.stk", "5af3c1202ba6fcf8dad2b2125e1c1383", 353257),
DE_DEU,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"abracadabra",
"",
AD_ENTRY3s("stk1.stk", "a8e963eea170155548e5bc1d0f07d50d", 209806,
"stk2.stk", "c6440aaf068ec3149ae89bc5c41ebf02", 362123,
"stk3.stk", "5af3c1202ba6fcf8dad2b2125e1c1383", 353257),
EN_ANY,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"abracadabra",
"",
AD_ENTRY3s("stk1.stk", "a8e963eea170155548e5bc1d0f07d50d", 209806,
"stk2.stk", "c6440aaf068ec3149ae89bc5c41ebf02", 362123,
"stk3.stk", "5af3c1202ba6fcf8dad2b2125e1c1383", 353257),
IT_ITA,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"abracadabra",
"",
AD_ENTRY3s("stk1.stk", "a8e963eea170155548e5bc1d0f07d50d", 209806,
"stk2.stk", "c6440aaf068ec3149ae89bc5c41ebf02", 362123,
"stk3.stk", "5af3c1202ba6fcf8dad2b2125e1c1383", 353257),
ES_ESP,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
// -- Once Upon A Time: Baba Yaga, DOS EGA Floppy --
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "3c777f43e6fb49fde9222543447e135a", 204813,
"stk2.stk", "6cf0b009dd185a8f589e91a1f9c33df5", 361582,
"stk3.stk", "6473183ca4db1b5b5cea047f9af59a26", 328925),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "3c777f43e6fb49fde9222543447e135a", 204813,
"stk2.stk", "6cf0b009dd185a8f589e91a1f9c33df5", 361582,
"stk3.stk", "6473183ca4db1b5b5cea047f9af59a26", 328925),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "3c777f43e6fb49fde9222543447e135a", 204813,
"stk2.stk", "6cf0b009dd185a8f589e91a1f9c33df5", 361582,
"stk3.stk", "6473183ca4db1b5b5cea047f9af59a26", 328925),
EN_ANY,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "3c777f43e6fb49fde9222543447e135a", 204813,
"stk2.stk", "6cf0b009dd185a8f589e91a1f9c33df5", 361582,
"stk3.stk", "6473183ca4db1b5b5cea047f9af59a26", 328925),
IT_ITA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "3c777f43e6fb49fde9222543447e135a", 204813,
"stk2.stk", "6cf0b009dd185a8f589e91a1f9c33df5", 361582,
"stk3.stk", "6473183ca4db1b5b5cea047f9af59a26", 328925),
ES_ESP,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib | kFeaturesEGA,
0, 0, 0
},
// -- Once Upon A Time: Baba Yaga, Amiga --
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "bcc823d2888057031e54716ed1b3c80e", 205090,
"stk2.stk", "f76bf7c2ff60d816d69962d1a593207c", 362122,
"stk3.stk", "6227d1aefdf39d88dcf83e38bea2a9af", 328922),
FR_FRA,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "bcc823d2888057031e54716ed1b3c80e", 205090,
"stk2.stk", "f76bf7c2ff60d816d69962d1a593207c", 362122,
"stk3.stk", "6227d1aefdf39d88dcf83e38bea2a9af", 328922),
DE_DEU,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "bcc823d2888057031e54716ed1b3c80e", 205090,
"stk2.stk", "f76bf7c2ff60d816d69962d1a593207c", 362122,
"stk3.stk", "6227d1aefdf39d88dcf83e38bea2a9af", 328922),
EN_ANY,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "bcc823d2888057031e54716ed1b3c80e", 205090,
"stk2.stk", "f76bf7c2ff60d816d69962d1a593207c", 362122,
"stk3.stk", "6227d1aefdf39d88dcf83e38bea2a9af", 328922),
IT_ITA,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "bcc823d2888057031e54716ed1b3c80e", 205090,
"stk2.stk", "f76bf7c2ff60d816d69962d1a593207c", 362122,
"stk3.stk", "6227d1aefdf39d88dcf83e38bea2a9af", 328922),
ES_ESP,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
// -- Once Upon A Time: Baba Yaga, Atari ST --
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "17a4e3e7a18cc97231c92d280c7878a1", 205095,
"stk2.stk", "bfbc380e5461f63af28e9e6b10f334b5", 362128,
"stk3.stk", "6227d1aefdf39d88dcf83e38bea2a9af", 328922),
FR_FRA,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "17a4e3e7a18cc97231c92d280c7878a1", 205095,
"stk2.stk", "bfbc380e5461f63af28e9e6b10f334b5", 362128,
"stk3.stk", "6227d1aefdf39d88dcf83e38bea2a9af", 328922),
DE_DEU,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "17a4e3e7a18cc97231c92d280c7878a1", 205095,
"stk2.stk", "bfbc380e5461f63af28e9e6b10f334b5", 362128,
"stk3.stk", "6227d1aefdf39d88dcf83e38bea2a9af", 328922),
EN_ANY,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "17a4e3e7a18cc97231c92d280c7878a1", 205095,
"stk2.stk", "bfbc380e5461f63af28e9e6b10f334b5", 362128,
"stk3.stk", "6227d1aefdf39d88dcf83e38bea2a9af", 328922),
IT_ITA,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
{
{
"babayaga",
"",
AD_ENTRY3s("stk1.stk", "17a4e3e7a18cc97231c92d280c7878a1", 205095,
"stk2.stk", "bfbc380e5461f63af28e9e6b10f334b5", 362128,
"stk3.stk", "6227d1aefdf39d88dcf83e38bea2a9af", 328922),
ES_ESP,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesEGA,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_ONCEUPON_H

View File

@@ -0,0 +1,465 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for the Playtoons series. */
/* This Game uses the DEV6 Engine, more Information can be found here: https://wiki.scummvm.org/index.php?title=DEV6_Information */
/* These games are part of the Playtoons series. For more information, refer to our wiki: https://wiki.scummvm.org/index.php?title=Playtoons */
#ifndef GOB_DETECTION_TABLES_PLAYTOONS_H
#define GOB_DETECTION_TABLES_PLAYTOONS_H
// -- Playtoons 1: Uncle Archibald --
{
{
"playtoons1",
"v1.002",
AD_ENTRY2s("playtoon.stk", "8c98e9a11be9bb203a55e8c6e68e519b", 25574338,
"archi.stk", "8d44b2a0d4e3139471213f9f0ed21e81", 5524674),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{
{
"playtoons1",
"Pack mes histoires animées",
AD_ENTRY2s("playtoon.stk", "55f0293202963854192e39474e214f5f", 30448474,
"archi.stk", "8d44b2a0d4e3139471213f9f0ed21e81", 5524674),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{
{
"playtoons1",
"",
AD_ENTRY2s("playtoon.stk", "c5ca2a288cdaefca9556cd9ae4b579cf", 25158926,
"archi.stk", "8d44b2a0d4e3139471213f9f0ed21e81", 5524674),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{ // Supplied by scoriae in the forums
{
"playtoons1",
"v1.002",
AD_ENTRY2s("playtoon.stk", "9e513e993a5b0e2496add3f50c08764b", 30448506,
"archi.stk", "00d8274519dfcf8a0d8ae3099daea0f8", 5532135),
EN_ANY,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{
{
"playtoonsdemo",
"Non-Interactive",
AD_ENTRY1s("play123.scn", "4689a31f543915e488c3bc46ea358add", 258),
EN_ANY,
kPlatformWindows,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
0, 0, 3
},
{
{
"playtoons1",
"Non-Interactive Demo",
AD_ENTRY2s("e.scn", "8a0db733c3f77be86e74e8242e5caa61", 124,
"demarchg.vmd", "d14a95da7d8792faf5503f649ffcbc12", 5619415),
EN_ANY,
kPlatformWindows,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
0, 0, 4
},
{
{
"playtoons1",
"Non-Interactive Demo",
AD_ENTRY1s("i.scn", "8b3294474d39970463663edd22341730", 285),
IT_ITA,
kPlatformWindows,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
0, 0, 5
},
{
{
"playtoons1",
"Non-Interactive Demo",
AD_ENTRY1s("s.scn", "1f527010626b5490761f16ba7a6f639a", 251),
ES_ESP,
kPlatformWindows,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
0, 0, 6
},
// -- Playtoons 2: The Case of the Counterfeit Collaborator (Spirou) --
{
{
"playtoons2",
"",
AD_ENTRY2s("playtoon.stk", "4772c96be88a57f0561519e4a1526c62", 24406262,
"spirou.stk", "5d9c7644d0c47840169b4d016765cc1a", 9816201),
EN_ANY,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{
{
"playtoons2",
"",
AD_ENTRY2s("playtoon.stk", "55a85036dd93cce93532d8f743d90074", 17467154,
"spirou.stk", "e3e1b6148dd72fafc3637f1a8e5764f5", 9812043),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{ // Bugreport #7052
{
"playtoons2",
"v1.002",
AD_ENTRY2s("playtoon.stk", "8c98e9a11be9bb203a55e8c6e68e519b", 25574338,
"spirou.stk", "91080dc148de1bbd6a97321c1a1facf3", 9817086),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{
{
"playtoons2",
"v1.002",
AD_ENTRY2s("playtoon.stk", "c5ca2a288cdaefca9556cd9ae4b579cf", 25158926,
"spirou.stk", "91080dc148de1bbd6a97321c1a1facf3", 9817086),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{ // Supplied by Hkz
{
"playtoons2",
"",
AD_ENTRY2s("playtoon.stk", "2572685400852d12759a2fbf09ec88eb", 9698780,
"spirou.stk", "d3cfeff920b6343a2ece55088f530dba", 7076608),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{ // Supplied by scoriae in the forums
{
"playtoons2",
"v1.002",
AD_ENTRY2s("playtoon.stk", "9e513e993a5b0e2496add3f50c08764b", 30448506,
"spirou.stk", "993737f112ca6a9b33c814273280d832", 9825760),
EN_ANY,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
// -- Playtoons 3: The Secret of the Castle --
{
{
"playtoons3",
"v1.002",
AD_ENTRY2s("playtoon.stk", "8c98e9a11be9bb203a55e8c6e68e519b", 25574338,
"chato.stk", "4fa4ed96a427c344e9f916f9f236598d", 6033793),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{
{
"playtoons3",
"v1.002",
AD_ENTRY2s("playtoon.stk", "9e513e993a5b0e2496add3f50c08764b", 30448506,
"chato.stk", "8fc8d0da5b3e758908d1d7298d497d0b", 6041026),
EN_ANY,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{
{
"playtoons3",
"Pack mes histoires animées",
AD_ENTRY2s("playtoon.stk", "55f0293202963854192e39474e214f5f", 30448474,
"chato.stk", "4fa4ed96a427c344e9f916f9f236598d", 6033793),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{
{
"playtoons3",
"",
AD_ENTRY2s("playtoon.stk", "c5ca2a288cdaefca9556cd9ae4b579cf", 25158926,
"chato.stk", "3c6cb3ac8a5a7cf681a19971a92a748d", 6033791),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{ // Supplied by Hkz on #scummvm
{
"playtoons3",
"",
AD_ENTRY2s("playtoon.stk", "4772c96be88a57f0561519e4a1526c62", 24406262,
"chato.stk", "bdef407387112bfcee90e664865ac3af", 6033867),
EN_ANY,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
// -- Playtoons 4: The Mandarin Prince --
{
{
"playtoons4",
"v1.002",
AD_ENTRY2s("playtoon.stk", "b7f5afa2dc1b0f75970b7c07d175db1b", 24340406,
"manda.stk", "92529e0b927191d9898a34c2892e9a3a", 6485072),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{ // Supplied by indy4fan in bug report #13100. Orig title: "Der Mandarin-Prinz"
{
"playtoons4",
"",
AD_ENTRY2s("playtoon.stk", "f853153e9be33b9e0ec6970d05642e51", 30448480,
"manda.stk", "fb65d32f43ade3ff573a8534d5a1a91e", 6492732),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{ //Supplied by goodoldgeorg in bug report #4390
{
"playtoons4",
"v1.002",
AD_ENTRY2s("playtoon.stk", "9e513e993a5b0e2496add3f50c08764b", 30448506,
"manda.stk", "69a79c9f61b2618e482726f2ff68078d", 6499208),
EN_ANY,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
// -- Playtoons 5: The Stone of Wakan --
{
{
"playtoons5",
"v1.002",
AD_ENTRY2s("playtoon.stk", "55f0293202963854192e39474e214f5f", 30448474,
"wakan.stk", "f493bf82851bc5ba74d57de6b7e88df8", 5520153),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{ // Supplied by indy4fan in bug report #13099. Orig title: "Der Stein von Wakan"
{
"playtoons5",
"v1.002",
AD_ENTRY2s("playtoon.stk", "9e513e993a5b0e2496add3f50c08764b", 30448506,
"wakan.stk", "5518139580becd8c49bbfbdd4f49187a", 5523417),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
// -- Playtoons Construction Kit 1: Monsters --
{
{
"playtnck1",
"v1.002",
AD_ENTRY2s("playtoon.stk", "5f9aae29265f1f105ad8ec195dff81de", 68382024,
"dan.itk", "906d67b3e438d5e95ec7ea9e781a94f3", 3000320),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
// -- Playtoons Construction Kit 2: Knights --
{
{
"playtnck2",
"v1.002",
AD_ENTRY2s("playtoon.stk", "5f9aae29265f1f105ad8ec195dff81de", 68382024,
"dan.itk", "74eeb075bd2cb47b243349730264af01", 3213312),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
// -- Playtoons Construction Kit 3: Far West --
{
{
"playtnck3",
"v1.002",
AD_ENTRY2s("playtoon.stk", "5f9aae29265f1f105ad8ec195dff81de", 68382024,
"dan.itk", "9a8f62809eca5a52f429b5b6a8e70f8f", 2861056),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
{
{ // Supplied by laenion in Bugreport #13457
"playtnck3",
"",
AD_ENTRY2s("playtoon.stk", "9ca3a2c19a3261cf9fa0f40eebc9d3ad", 65879662,
"dan.itk", "e8566d7efb8601a323adc918948d03fe", 3325952),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro2.stk", 0, 0
},
// -- Bambou le sauveur de la jungle --
{
{
"bambou",
"",
AD_ENTRY2s("intro.stk", "2f8db6963ff8d72a8331627ebda918f4", 3613238,
"bambou.itk", "0875914d31126d0749313428f10c7768", 114440192),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
"intro.stk", "intro.tot", 0
},
#endif // GOB_DETECTION_TABLES_PLAYTOONS_H

View File

@@ -0,0 +1,146 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Urban Runner. */
/* This Game uses the DEV6 Engine, more Information can be found here: https://wiki.scummvm.org/index.php?title=DEV6_Information */
#ifndef GOB_DETECTION_TABLES_URBAN_H
#define GOB_DETECTION_TABLES_URBAN_H
// -- Windows --
{
{
"urban",
"v1.00",
AD_ENTRY1s("intro.stk", "3ab2c542bd9216ae5d02cc6f45701ae1", 1252436),
EN_USA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesTrueColor,
0, 0, 0
},
{ // Supplied by Collector9 in bug report #5611
{
"urban",
"v1.00",
AD_ENTRY1s("intro.stk", "6ce3d878178932053267237ec4843ce1", 1252518),
EN_USA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesTrueColor,
0, 0, 0
},
{ // Supplied by gamin in the forums
{
"urban",
"v1.00",
AD_ENTRY1s("intro.stk", "b991ed1d31c793e560edefdb349882ef", 1276408),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesTrueColor,
0, 0, 0
},
{ // Supplied by jvprat on #scummvm
{
"urban",
"",
AD_ENTRY1s("intro.stk", "4ec3c0864e2b54c5b4ccf9f6ad96528d", 1253328),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesTrueColor,
0, 0, 0
},
{ // Supplied by Alex on the gobsmacked blog
{
"urban",
"",
AD_ENTRY1s("intro.stk", "9ea647085a16dd0fb9ecd84cd8778ec9", 1253436),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesTrueColor,
0, 0, 0
},
{ // Supplied by alex86r in bug report #5690
{
"urban",
"v1.01",
AD_ENTRY1s("intro.stk", "4e4a3c017fe5475353bf94c455fe3efd", 1253448),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesTrueColor,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4308
{
"urban",
"v1.00",
AD_ENTRY1s("intro.stk", "4bd31979ea3d77a58a358c09000a85ed", 1253018),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesTrueColor,
0, 0, 0
},
// -- Demos --
{
{
"urban",
"Non-Interactive Demo",
AD_ENTRY3s("wdemo.s24", "14ac9bd51db7a075d69ddb144904b271", 87,
"demo.vmd", "65d04715d871c292518b56dd160b0161", 9091237,
"urband.vmd", "60343891868c91854dd5c82766c70ecc", 922461),
EN_ANY,
kPlatformWindows,
ADGF_DEMO,
GUIO1(GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesTrueColor | kFeaturesSCNDemo,
0, 0, 2
},
#endif // GOB_DETECTION_TABLES_URBAN_H

View File

@@ -0,0 +1,309 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for Ween: The Prophecy. */
#ifndef GOB_DETECTION_TABLES_WEEN_H
#define GOB_DETECTION_TABLES_WEEN_H
// -- DOS VGA Floppy --
{
{
"ween",
"",
AD_ENTRY1("intro.stk", "2bb8878a8042244dd2b96ff682381baa"),
EN_GRB,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"ween",
"",
AD_ENTRY1s("intro.stk", "de92e5c6a8c163007ffceebef6e67f7d", 7117568),
EN_USA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by cybot_tmin in bug report #3084
{
"ween",
"",
AD_ENTRY1s("intro.stk", "6d60f9205ecfbd8735da2ee7823a70dc", 7014426),
ES_ESP,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"ween",
"",
AD_ENTRY1s("intro.stk", "4b10525a3782aa7ecd9d833b5c1d308b", 7029591),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by eolyn in Bugreport #11524
{
"ween",
"",
AD_ENTRY1s("intro.stk", "cae57980940b919305e33a65d0f1dcc3", 7017982),
FR_FRA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by cartman_ on #scummvm
{
"ween",
"",
AD_ENTRY1("intro.stk", "63170e71f04faba88673b3f510f9c4c8"),
DE_DEU,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{ // Supplied by glorfindel in bugreport #3193
{
"ween",
"",
AD_ENTRY1s("intro.stk", "8b57cd510da8a3bbd99e3a0297a8ebd1", 7018771),
IT_ITA,
kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
// -- Amiga --
{ // Supplied by vampir_raziel in bug report #3055
{
"ween",
"",
AD_ENTRY2s("intro.stk", "bfd9d02faf3d8d60a2cf744f95eb48dd", 456570,
"ween.ins", "d2cb24292c9ddafcad07e23382027218", 87800),
EN_GRB,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by vampir_raziel in bug report #3055
{
"ween",
"",
AD_ENTRY1s("intro.stk", "257fe669705ac4971efdfd5656eef16a", 457719),
FR_FRA,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by vampir_raziel in bug report #3055
{
"ween",
"",
AD_ENTRY1s("intro.stk", "dffd1ab98fe76150d6933329ca6f4cc4", 459458),
FR_FRA,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by vampir_raziel in bug report #3055
{
"ween",
"",
AD_ENTRY1s("intro.stk", "af83debf2cbea21faa591c7b4608fe92", 458192),
DE_DEU,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #4139
{
"ween",
"",
AD_ENTRY2s("intro.stk", "dffd1ab98fe76150d6933329ca6f4cc4", 459458,
"ween.ins", "d2cb24292c9ddafcad07e23382027218", 87800),
IT_ITA,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{ // Supplied by CaptainHIT in bug report #11591
{
"ween",
"",
AD_ENTRY1s("intro.stk", "53c57051c69c641fcc5270a41d35e7d5", 458536),
ES_ESP,
kPlatformAmiga,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
// -- Atari ST --
{ // Supplied by pwigren in bug report #3355
{
"ween",
"",
AD_ENTRY2s("intro.stk", "bfd9d02faf3d8d60a2cf744f95eb48dd", 456570,
"music__5.snd", "7d1819b9981ecddd53d3aacbc75f1cc8", 13446),
EN_GRB,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
{
{
"ween",
"",
AD_ENTRY1("intro.stk", "e6d13fb3b858cb4f78a8780d184d5b2c"),
FR_FRA,
kPlatformAtariST,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesNone,
0, 0, 0
},
// -- Demos --
{
{
"ween",
"Demo",
AD_ENTRY1("intro.stk", "2e9c2898f6bf206ede801e3b2e7ee428"),
EN_USA,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, "show.tot", 0
},
{
{
"ween",
"Demo (v2.0)", // dated 8/1/93
AD_ENTRY1s("intro.stk", "15fb91a1b9b09684b28ac75edf66e504", 2340230),
EN_USA,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, "show.tot", 0
},
{
{
"ween",
"Demo",
AD_ENTRY1("intro.stk", "aca10b973c03ba8b8b2804f4e7029ece"),
DE_DEU,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{
"ween",
"Demo",
AD_ENTRY1("intro.stk", "aca10b973c03ba8b8b2804f4e7029ece"),
EN_GRB,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
{
{ // Supplied by trembyle
"ween",
"v1.2 Demo",
AD_ENTRY1s("intro.stk", "dcff8f3a7dd1f4c33fd94aa7659b7578", 2425477),
EN_GRB,
kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kFeaturesAdLib,
0, 0, 0
},
#endif // GOB_DETECTION_TABLES_WEEN_H

View File

@@ -0,0 +1,365 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
/* Detection tables for (The Bizarre Adventures of) Woodruff and the Schnibble (of Azimuth). */
#ifndef GOB_DETECTION_TABLES_WOODRUFF_H
#define GOB_DETECTION_TABLES_WOODRUFF_H
// -- Windows CD --
{
{
"woodruff",
"v1.00",
AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"woodruff",
"v1.00",
AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"woodruff",
"v1.00",
AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"woodruff",
"v1.00",
AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"woodruff",
"v1.00",
AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Russian Akella version
{
"woodruff",
"v1.00",
AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390),
RU_RUS,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"woodruff",
"v1.00",
AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"woodruff",
"v1.00",
AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"woodruff",
"v1.00",
AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"woodruff",
"v1.01",
AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"woodruff",
"v1.00",
AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{
{
"woodruff",
"v1.00",
AD_ENTRY1s("intro.stk", "5f5f4e0a72c33391e67a47674b120cc6", 20296422),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Supplied by jvprat on #scummvm
{
"woodruff",
"",
AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Supplied by jvprat on #scummvm
{
"woodruff",
"",
AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Supplied by jvprat on #scummvm
{
"woodruff",
"",
AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Supplied by jvprat on #scummvm
{
"woodruff",
"",
AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Supplied by jvprat on #scummvm
{
"woodruff",
"",
AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Supplied by DjDiabolik in bug report #3737
{
"woodruff",
"",
AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736),
EN_GRB,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Supplied by DjDiabolik in bug report #3737
{
"woodruff",
"",
AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736),
DE_DEU,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Supplied by DjDiabolik in bug report #3737
{
"woodruff",
"",
AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736),
FR_FRA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Supplied by DjDiabolik in bug report #3737
{
"woodruff",
"",
AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736),
IT_ITA,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Supplied by DjDiabolik in bug report #3737
{
"woodruff",
"",
AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736),
ES_ESP,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #3950
{
"woodruff",
"",
AD_ENTRY1s("intro.stk", "08a96bf061af1fa4f75c6a7cc56b60a4", 20734979),
PL_POL,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
{ // Russian fanmade translation by PRCA
{
"woodruff",
"Fanmade",
AD_ENTRY1s("intro.stk", "3767f779996d64e8413fc1e2300ba032", 20651219),
RU_RUS,
kPlatformWindows,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480,
0, 0, 0
},
// -- Demos --
{
{
"woodruff",
"Non-Interactive Demo",
AD_ENTRY2s("demo.scn", "16bb85fc5f8e519147b60475dbf33962", 89,
"wooddem3.vmd", "a1700596172c2d4e264760030c3a3d47", 8994250),
EN_ANY,
kPlatformWindows,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
kFeatures640x480 | kFeaturesSCNDemo,
0, 0, 1
},
#endif // GOB_DETECTION_TABLES_WOODRUFF_H

735
engines/gob/draw.cpp Normal file
View File

@@ -0,0 +1,735 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "common/str.h"
#include "gob/gob.h"
#include "gob/draw.h"
#include "gob/global.h"
#include "gob/util.h"
#include "gob/dataio.h"
#include "gob/game.h"
#include "gob/resources.h"
#include "gob/script.h"
#include "gob/inter.h"
#include "gob/video.h"
#include "gob/palanim.h"
namespace Gob {
Draw::Draw(GobEngine *vm) : _vm(vm) {
_renderFlags = 0;
_fontIndex = 0;
_spriteLeft = 0;
_spriteTop = 0;
_spriteRight = 0;
_spriteBottom = 0;
_destSpriteX = 0;
_destSpriteY = 0;
_backColor = 0;
_frontColor = 0;
_colorOffset = 0;
_transparency = 0;
_sourceSurface = 0;
_destSurface = 0;
_letterToPrint = 0;
_textToPrint = nullptr;
_hotspotText = nullptr;
_backDeltaX = 0;
_backDeltaY = 0;
for (int i = 0; i < kFontCount; i++)
_fonts[i] = nullptr;
_spritesArray.resize(kSpriteCount);
_invalidatedCount = 0;
for (int i = 0; i < 30; i++) {
_invalidatedTops[i] = 0;
_invalidatedLefts[i] = 0;
_invalidatedRights[i] = 0;
_invalidatedBottoms[i] = 0;
}
_noInvalidated = false;
_noInvalidated57 = false;
_paletteCleared = false;
_applyPal = false;
for (int i = 0; i < 18; i++)
_unusedPalette1[i] = 0;
for (int i = 0; i < 16; i++)
_unusedPalette2[i] = 0;
for (int i = 0; i < 256; i++) {
_vgaPalette[i].red = 0;
_vgaPalette[i].blue = 0;
_vgaPalette[i].green = 0;
}
_showCursor = 0;
_cursorIndex = 0;
_transparentCursor = 0;
_cursorTimeKey = 0;
_cursorX = 0;
_cursorY = 0;
_cursorWidth = 0;
_cursorHeight = 0;
_cursorHotspotXVar = -1;
_cursorHotspotYVar = -1;
_cursorHotspotX = -1;
_cursorHotspotY = -1;
_cursorAnim = 0;
for (int i = 0; i < 40; i++) {
_cursorAnimLow[i] = 0;
_cursorAnimHigh[i] = 0;
_cursorAnimDelays[i] = 0;
}
_cursorCount = 0;
_palLoadData1[0] = 0;
_palLoadData1[1] = 17;
_palLoadData1[2] = 34;
_palLoadData1[3] = 51;
_palLoadData2[0] = 0;
_palLoadData2[1] = 68;
_palLoadData2[2] = 136;
_palLoadData2[3] = 204;
_needAdjust = 2;
_scrollOffsetX = 0;
_scrollOffsetY = 0;
_pattern = 0;
_cursorDrawnFromScripts = false;
}
Draw::~Draw() {
for (int i = 0; i < kFontCount; i++)
delete _fonts[i];
}
void Draw::invalidateRect(int16 left, int16 top, int16 right, int16 bottom) {
if (_renderFlags & RENDERFLAG_NOINVALIDATE) {
_vm->_video->dirtyRectsAll();
return;
}
if (left > right)
SWAP(left, right);
if (top > bottom)
SWAP(top, bottom);
if ((left > (_vm->_video->_surfWidth - 1)) || (right < 0) ||
(top > (_vm->_video->_surfHeight - 1)) || (bottom < 0))
return;
_noInvalidated = false;
if (_invalidatedCount >= 30) {
_invalidatedLefts[0] = 0;
_invalidatedTops[0] = 0;
_invalidatedRights[0] = _vm->_video->_surfWidth - 1;
_invalidatedBottoms[0] = _vm->_video->_surfHeight - 1;
_invalidatedCount = 1;
return;
}
if (left < 0)
left = 0;
if (right > (_vm->_video->_surfWidth - 1))
right = _vm->_video->_surfWidth - 1;
if (top < 0)
top = 0;
if (bottom > (_vm->_video->_surfHeight - 1))
bottom = _vm->_video->_surfHeight - 1;
left &= 0xFFF0;
right |= 0x000F;
for (int rect = 0; rect < _invalidatedCount; rect++) {
if (_invalidatedTops[rect] > top) {
if (_invalidatedTops[rect] > bottom) {
for (int i = _invalidatedCount; i > rect; i--) {
_invalidatedLefts[i] = _invalidatedLefts[i - 1];
_invalidatedTops[i] = _invalidatedTops[i - 1];
_invalidatedRights[i] = _invalidatedRights[i - 1];
_invalidatedBottoms[i] = _invalidatedBottoms[i - 1];
}
_invalidatedLefts[rect] = left;
_invalidatedTops[rect] = top;
_invalidatedRights[rect] = right;
_invalidatedBottoms[rect] = bottom;
_invalidatedCount++;
return;
}
if (_invalidatedBottoms[rect] < bottom)
_invalidatedBottoms[rect] = bottom;
if (_invalidatedLefts[rect] > left)
_invalidatedLefts[rect] = left;
if (_invalidatedRights[rect] < right)
_invalidatedRights[rect] = right;
_invalidatedTops[rect] = top;
return;
}
if (_invalidatedBottoms[rect] < top)
continue;
if (_invalidatedBottoms[rect] < bottom)
_invalidatedBottoms[rect] = bottom;
if (_invalidatedLefts[rect] > left)
_invalidatedLefts[rect] = left;
if (_invalidatedRights[rect] < right)
_invalidatedRights[rect] = right;
return;
}
_invalidatedLefts[_invalidatedCount] = left;
_invalidatedTops[_invalidatedCount] = top;
_invalidatedRights[_invalidatedCount] = right;
_invalidatedBottoms[_invalidatedCount] = bottom;
_invalidatedCount++;
}
void Draw::blitInvalidated() {
if (_noInvalidated57 &&
((_vm->_global->_videoMode == 5) || (_vm->_global->_videoMode == 7)))
return;
if (_cursorIndex == 4)
blitCursor();
if (_vm->_inter && _vm->_inter->_terminate)
return;
if (_noInvalidated && !_applyPal)
return;
if (_vm->isTrueColor())
_applyPal = false;
if (_noInvalidated) {
setPalette();
_applyPal = false;
return;
}
if (_cursorSprites)
_showCursor = (_showCursor & ~2) | ((_showCursor & 1) << 1);
if (_applyPal) {
clearPalette();
forceBlit();
setPalette();
_invalidatedCount = 0;
_noInvalidated = true;
_applyPal = false;
return;
}
_vm->_video->_doRangeClamp = false;
for (int i = 0; i < _invalidatedCount; i++) {
_frontSurface->blit(*_backSurface,
_invalidatedLefts[i], _invalidatedTops[i],
_invalidatedRights[i], _invalidatedBottoms[i],
_invalidatedLefts[i], _invalidatedTops[i]);
_vm->_video->dirtyRectsAdd(_invalidatedLefts[i], _invalidatedTops[i],
_invalidatedRights[i], _invalidatedBottoms[i]);
}
_vm->_video->_doRangeClamp = true;
_invalidatedCount = 0;
_noInvalidated = true;
_applyPal = false;
}
void Draw::setPalette() {
_vm->validateVideoMode(_vm->_global->_videoMode);
_vm->_global->_pPaletteDesc->unused1 = _unusedPalette1;
_vm->_global->_pPaletteDesc->unused2 = _unusedPalette2;
_vm->_global->_pPaletteDesc->vgaPal = _vgaPalette;
_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
_paletteCleared = false;
}
void Draw::clearPalette() {
if (!_paletteCleared) {
_vm->_util->clearPalette();
_paletteCleared = true;
}
}
void Draw::dirtiedRect(int16 surface,
int16 left, int16 top, int16 right, int16 bottom) {
dirtiedRect(_spritesArray[surface], left, top, right, bottom);
}
void Draw::dirtiedRect(SurfacePtr surface,
int16 left, int16 top, int16 right, int16 bottom) {
if (surface == _backSurface)
invalidateRect(left, top, right, bottom);
else if (surface == _frontSurface)
_vm->_video->dirtyRectsAdd(left, top, right, bottom);
else if (_vm->_video->_splitSurf && (surface == _vm->_video->_splitSurf))
_vm->_video->retrace();
}
void Draw::initSpriteSurf(int16 index, int16 width, int16 height,
int16 flags, byte bpp) {
_spritesArray[index] = _vm->_video->initSurfDesc(width, height, flags, bpp);
_spritesArray[index]->clear();
}
void Draw::freeSprite(int16 index) {
assert(index < kSpriteCount);
_spritesArray[index].reset();
if (index == kFrontSurface)
_spritesArray[index] = _frontSurface;
if (index == kBackSurface)
_spritesArray[index] = _backSurface;
}
void Draw::adjustCoords(char adjust, int16 *coord1, int16 *coord2) {
if (_needAdjust == 2 || _needAdjust == 10)
return;
switch (adjust) {
case 0:
if (coord2)
*coord2 *= 2;
if (coord1)
*coord1 *= 2;
break;
case 1:
if (coord2)
*coord2 = (signed) ((unsigned) (*coord2 + 1) / 2);
if (coord1)
*coord1 = (signed) ((unsigned) (*coord1 + 1) / 2);
break;
case 2:
if (coord2)
*coord2 = *coord2 * 2 + 1;
if (coord1)
*coord1 = *coord1 * 2 + 1;
break;
default:
break;
}
}
void Draw::resizeCursors(int16 width, int16 height, int16 count, bool transparency) {
if (width <= 0)
width = _vm->_draw->_cursorWidth;
if (height <= 0)
height = _vm->_draw->_cursorHeight;
_vm->_draw->_transparentCursor = transparency;
bool sameCursorDimensions = (_vm->_draw->_cursorWidth == width) && (_vm->_draw->_cursorHeight == height);
// Cursors sprite already big enough
if (sameCursorDimensions &&
_vm->_draw->_cursorCount >= count)
return;
debugC(5, kDebugGraphics, "Resizing cursors: size %dx%d -> %dx%d, cursor count %d -> %d)",
_vm->_draw->_cursorWidth,
_vm->_draw->_cursorHeight,
width,
height,
_vm->_draw->_cursorCount,
count);
SurfacePtr oldCursorsSprites = _vm->_draw->_cursorSprites;
int oldCursorCount = _vm->_draw->_cursorCount;
_vm->_draw->_cursorCount = count;
_vm->_draw->_cursorWidth = width;
_vm->_draw->_cursorHeight = height;
_vm->_draw->freeSprite(Draw::kCursorSurface);
_vm->_draw->_cursorSprites.reset();
_vm->_draw->_cursorSpritesBack.reset();
_vm->_draw->initSpriteSurf(Draw::kCursorSurface, width * count, height, 2);
_vm->_draw->_cursorSpritesBack = _vm->_draw->_spritesArray[Draw::kCursorSurface];
_vm->_draw->_cursorSprites = _vm->_draw->_cursorSpritesBack;
if (sameCursorDimensions && oldCursorCount < count)
_vm->_draw->_cursorSprites->blit(*oldCursorsSprites);
oldCursorsSprites.reset();
}
int Draw::stringLength(const char *str, uint16 fontIndex) {
static const int8 japaneseExtraCharLen[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
if (fontIndex >= kFontCount) {
warning("Draw::stringLength(): Font %d > Count %d", fontIndex, kFontCount);
return 0;
}
if (!_fonts[fontIndex])
return 0;
Font &font = *_fonts[fontIndex];
int len = 0;
if (_vm->_global->_language == 10) {
for (int i = 0; str[i] != 0; i++) {
if (((unsigned char) str[i+1]) < 128) {
len += japaneseExtraCharLen[4];
i++;
} else
len += font.getCharWidth();
}
} else {
if (!font.isMonospaced())
while (*str != '\0')
len += font.getCharWidth(*str++);
else
len = strlen(str) * font.getCharWidth();
}
return len;
}
void Draw::printTextCentered(int16 id, int16 left, int16 top, int16 right,
int16 bottom, const char *str, int16 fontIndex, int16 color) {
adjustCoords(1, &left, &top);
adjustCoords(1, &right, &bottom);
uint16 centerOffset = _vm->_game->_script ? _vm->_game->_script->getFunctionOffset(TOTFile::kFunctionCenter) : 0;
if (centerOffset != 0) {
_vm->_game->_script->call(centerOffset);
WRITE_VAR(17, (uint32) id);
WRITE_VAR(18, (uint32) left);
WRITE_VAR(19, (uint32) top);
WRITE_VAR(20, (uint32) (right - left + 1));
WRITE_VAR(21, (uint32) (bottom - top + 1));
_vm->_inter->funcBlock(0);
_vm->_game->_script->pop();
}
if (str[0] == '\0')
return;
if (fontIndex >= kFontCount) {
warning("Draw::printTextCentered(): Font %d > Count %d", fontIndex, kFontCount);
return;
}
if (!_fonts[fontIndex])
return;
_transparency = 1;
_destSpriteX = left;
_destSpriteY = top;
_fontIndex = fontIndex;
_frontColor = color;
_textToPrint = str;
Font &font = *_fonts[fontIndex];
int16 width = 0;
if (!font.isMonospaced()) {
const char *s = str;
while (*s != '\0')
width += font.getCharWidth(*s++);
} else
width = strlen(str) * font.getCharWidth();
adjustCoords(1, &width, nullptr);
_destSpriteX += (right - left + 1 - width) / 2;
spriteOperation(DRAW_PRINTTEXT);
}
void Draw::drawButton(uint16 id, int16 left, int16 top, int16 right, int16 bottom,
char *paramStr, int16 fontIndex, int16 color, int16 shortId) {
int16 width;
char tmpStr[128];
Common::strlcpy(tmpStr, paramStr, 128);
adjustCoords(1, &left, &top);
adjustCoords(1, &right, &bottom);
uint16 centerOffset = _vm->_game->_script ? _vm->_game->_script->getFunctionOffset(TOTFile::kFunctionCenter) : 0;
if (centerOffset != 0) {
_vm->_game->_script->call(centerOffset);
WRITE_VAR(17, (uint32) id & 0x7FFF);
WRITE_VAR(18, (uint32) left);
WRITE_VAR(19, (uint32) top);
WRITE_VAR(20, (uint32) (right - left + 1));
WRITE_VAR(21, (uint32) (bottom - top + 1));
if (_vm->_game->_script->getVersionMinor() >= 4) {
WRITE_VAR(22, (uint32) fontIndex);
WRITE_VAR(23, (uint32) color);
if (id & 0x8000)
WRITE_VAR(24, (uint32) 1);
else
WRITE_VAR(24, (uint32) 0);
WRITE_VAR(25, (uint32) shortId);
if (_hotspotText)
Common::strlcpy(_hotspotText, paramStr, 40);
}
_vm->_inter->funcBlock(0);
_vm->_game->_script->pop();
}
Common::strcpy_s(paramStr, 200, tmpStr);
if (fontIndex >= kFontCount) {
warning("Draw::oPlaytoons_sub_F_1B(): Font %d > Count %d", fontIndex, kFontCount);
return;
}
if (!_fonts[fontIndex])
return;
if (*paramStr) {
_transparency = 1;
_fontIndex = fontIndex;
_frontColor = color;
if (_vm->_game->_script->getVersionMinor() >= 4 && strchr(paramStr, '\\')) {
char str[80];
char *str2;
int16 strLen= 0;
int16 offY, deltaY;
str2 = paramStr;
do {
strLen++;
str2++;
str2 = strchr(str2, '\\');
} while (str2);
deltaY = (bottom - right + 1 - (strLen * _fonts[fontIndex]->getCharHeight())) / (strLen + 1);
offY = right + deltaY;
for (int i = 0; paramStr[i]; i++) {
int j = 0;
while (paramStr[i] && paramStr[i] != 92)
str[j++] = paramStr[i++];
str[j] = 0;
_destSpriteX = left;
_destSpriteY = offY;
_textToPrint = str;
width = stringLength(str, fontIndex);
adjustCoords(1, &width, nullptr);
_destSpriteX += (top - left + 1 - width) / 2;
spriteOperation(DRAW_PRINTTEXT);
offY += deltaY + _fonts[fontIndex]->getCharHeight();
}
} else {
_destSpriteX = left;
if (_vm->_game->_script->getVersionMinor() >= 4)
_destSpriteY = top + (bottom - top + 1 - _fonts[fontIndex]->getCharHeight()) / 2;
else
_destSpriteY = top;
_textToPrint = paramStr;
width = stringLength(paramStr, fontIndex);
adjustCoords(1, &width, nullptr);
_destSpriteX += (right - left + 1 - width) / 2;
spriteOperation(DRAW_PRINTTEXT);
}
}
return;
}
int32 Draw::getSpriteRectSize(int16 index) {
if (!_spritesArray[index])
return 0;
return _spritesArray[index]->getWidth() * _spritesArray[index]->getHeight();
}
void Draw::forceBlit(bool backwards) {
if (!_frontSurface || !_backSurface)
return;
if (_frontSurface == _backSurface)
return;
/*
if (_spritesArray[kFrontSurface] != _frontSurface)
return;
if (_spritesArray[kBackSurface] != _backSurface)
return;
*/
if (!backwards) {
_frontSurface->blit(*_backSurface);
_vm->_video->dirtyRectsAll();
} else
_backSurface->blit(*_frontSurface);
}
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(Surface &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++)
_frontSurface->blit(surfDesc, 0, y, _vm->_width - 1, y, offsets[y], y);
_vm->_palAnim->fadeStep(0);
_vm->_video->dirtyRectsAll();
_vm->_video->waitRetrace();
}
_frontSurface->blit(surfDesc);
_applyPal = false;
_invalidatedCount = 0;
_noInvalidated = true;
_vm->_video->dirtyRectsAll();
delete[] offsets;
}
Font *Draw::loadFont(const char *path) const {
if (!_vm->_dataIO->hasFile(path))
return nullptr;
int32 size;
byte *data = _vm->_dataIO->getFile(path, size);
return new Font(data);
}
bool Draw::loadFont(uint16 fontIndex, const char *path) {
if (fontIndex >= kFontCount) {
warning("Draw::loadFont(): Font %d > Count %d (\"%s\")", fontIndex, kFontCount, path);
return false;
}
delete _fonts[fontIndex];
_fonts[fontIndex] = loadFont(path);
return _fonts[fontIndex] != nullptr;
}
} // End of namespace Gob

366
engines/gob/draw.h Normal file
View File

@@ -0,0 +1,366 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_DRAW_H
#define GOB_DRAW_H
#include "common/stack.h"
#include "gob/video.h"
namespace Common {
class WinResources;
}
namespace Gob {
#define RENDERFLAG_NOINVALIDATE 0x0001
#define RENDERFLAG_CAPTUREPUSH 0x0002
#define RENDERFLAG_COLLISIONS 0x0004
#define RENDERFLAG_CAPTUREPOP 0x0008
#define RENDERFLAG_USEDELTAS 0x0010
#define RENDERFLAG_BORDERHOTSPOTS 0x0040
#define RENDERFLAG_HASWINDOWS 0x0080
#define RENDERFLAG_NOBLITINVALIDATED 0x0200
#define RENDERFLAG_NOSUBTITLES 0x0400
#define RENDERFLAG_FROMSPLIT 0x0800
#define RENDERFLAG_DOUBLECOORDS 0x1000
#define RENDERFLAG_DOUBLEVIDEO 0x2000
class Draw {
public:
static const int kSpriteCount = 100;
static const int kFontCount = 16;
static const int kFrontSurface = 20;
static const int kBackSurface = 21;
static const int kAnimSurface = 22;
static const int kCursorSurface = 23;
static const int kCaptureSurface = 30;
struct FontToSprite {
int8 sprite;
int8 base;
int8 width;
int8 height;
FontToSprite() : sprite(0), base(0), width(0), height(0) {}
};
struct fascinWin {
int16 id;
int16 left;
int16 top;
int16 width;
int16 height;
SurfacePtr savedSurface;
};
int16 _renderFlags;
uint16 _fontIndex;
int16 _spriteLeft;
int16 _spriteTop;
int16 _spriteRight;
int16 _spriteBottom;
int16 _destSpriteX;
int16 _destSpriteY;
int16 _backColor;
int16 _frontColor;
int16 _colorOffset;
int16 _transparency;
int16 _sourceSurface;
int16 _destSurface;
char _letterToPrint;
const char *_textToPrint;
char *_hotspotText;
int16 _backDeltaX;
int16 _backDeltaY;
int16 _subtitleFont;
int16 _subtitleColor;
FontToSprite _fontToSprite[4];
Font *_fonts[kFontCount];
Common::Array<SurfacePtr> _spritesArray;
int16 _invalidatedCount;
int16 _invalidatedLefts[30];
int16 _invalidatedTops[30];
int16 _invalidatedRights[30];
int16 _invalidatedBottoms[30];
bool _noInvalidated;
// Don't blit invalidated rects when in video mode 5 or 7
bool _noInvalidated57;
bool _paletteCleared;
bool _applyPal;
SurfacePtr _backSurface;
SurfacePtr _frontSurface;
int16 _unusedPalette1[18];
int16 _unusedPalette2[16];
Video::Color _vgaPalette[256];
Common::Stack<Video::Color *> _paletteStack;
// 0 (00b): No cursor
// 1 (01b): Cursor would be on _backSurface
// 2 (10b): Cursor would be on _frontSurface
// 3 (11b): Cursor would be on _backSurface and _frontSurface
uint8 _showCursor;
int16 _cursorIndex;
int16 _transparentCursor;
uint32 _cursorTimeKey;
int16 _cursorX;
int16 _cursorY;
int16 _cursorWidth;
int16 _cursorHeight;
int32 _cursorHotspotXVar;
int32 _cursorHotspotYVar;
int32 _cursorHotspotX;
int32 _cursorHotspotY;
SurfacePtr _cursorSprites;
SurfacePtr _cursorSpritesBack;
SurfacePtr _scummvmCursor;
int16 _cursorAnim;
int8 _cursorAnimLow[40];
int8 _cursorAnimHigh[40];
int8 _cursorAnimDelays[40];
Common::String _cursorNames[40];
Common::String _cursorName;
bool _cursorDrawnFromScripts;
int32 _cursorCount;
int16 _palLoadData1[4];
int16 _palLoadData2[4];
// Coordinates adjustment mode
// Some game were released for a higher resolution than the one they
// were originally designed for. adjustCoords() is used to adjust
//
int16 _needAdjust;
int16 _scrollOffsetY;
int16 _scrollOffsetX;
int16 _pattern;
fascinWin _fascinWin[10];
int16 _winMaxWidth;
int16 _winMaxHeight;
int16 _winCount;
int16 _winVarArrayLeft;
int16 _winVarArrayTop;
int16 _winVarArrayWidth;
int16 _winVarArrayHeight;
int16 _winVarArrayStatus;
int16 _winVarArrayLimitsX;
int16 _winVarArrayLimitsY;
void invalidateRect(int16 left, int16 top, int16 right, int16 bottom);
void blitInvalidated();
void setPalette();
void clearPalette();
void dirtiedRect(int16 surface, int16 left, int16 top, int16 right, int16 bottom);
void dirtiedRect(SurfacePtr surface, int16 left, int16 top, int16 right, int16 bottom);
void initSpriteSurf(int16 index, int16 width, int16 height, int16 flags, byte bpp = 0);
void freeSprite(int16 index);
void adjustCoords(char adjust, int16 *coord1, int16 *coord2);
void adjustCoords(char adjust, uint16 *coord1, uint16 *coord2) {
adjustCoords(adjust, (int16 *)coord1, (int16 *)coord2);
}
void resizeCursors(int16 width, int16 height, int16 count, bool transparency);
int stringLength(const char *str, uint16 fontIndex);
void printTextCentered(int16 id, int16 left, int16 top, int16 right,
int16 bottom, const char *str, int16 fontIndex, int16 color);
void drawButton( uint16 id, int16 left, int16 top, int16 right, int16 bottom, char *paramStr, int16 var3, int16 var4, int16 shortId);
int32 getSpriteRectSize(int16 index);
void forceBlit(bool backwards = false);
static const int16 _wobbleTable[360];
void wobble(Surface &surfDesc);
Font *loadFont(const char *path) const;
bool loadFont(uint16 fontIndex, const char *path);
virtual void initScreen() = 0;
virtual void closeScreen() = 0;
virtual void blitCursor() = 0;
virtual void animateCursor(int16 cursor) = 0;
virtual void printTotText(int16 id) = 0;
virtual void spriteOperation(int16 operation, bool ttsAddHotspotText = true) = 0;
virtual int16 openWin(int16 id) { return 0; }
virtual void closeWin(int16 id) {}
virtual int16 handleCurWin() { return 0; }
virtual int16 getWinFromCoord(int16 &dx, int16 &dy) { return -1; }
virtual void moveWin(int16 id) {}
virtual bool overlapWin(int16 idWin1, int16 idWin2) { return false; }
virtual void closeAllWin() {}
virtual void activeWin(int16 id) {}
Draw(GobEngine *vm);
virtual ~Draw();
protected:
GobEngine *_vm;
#ifdef USE_TTS
Common::String _previousTot;
#endif
};
class Draw_v1 : public Draw {
public:
void initScreen() override;
void closeScreen() override;
void blitCursor() override;
void animateCursor(int16 cursor) override;
void printTotText(int16 id) override;
void spriteOperation(int16 operation, bool ttsAddHotspotText = true) override;
Draw_v1(GobEngine *vm);
~Draw_v1() override {}
};
class Draw_v2 : public Draw_v1 {
public:
void initScreen() override;
void closeScreen() override;
void blitCursor() override;
void animateCursor(int16 cursor) override;
void printTotText(int16 id) override;
void spriteOperation(int16 operation, bool ttsAddHotspotText = true) override;
Draw_v2(GobEngine *vm);
~Draw_v2() override {}
private:
uint8 _mayorWorkaroundStatus;
void fixLittleRedStrings();
};
class Draw_Bargon: public Draw_v2 {
public:
void initScreen() override;
Draw_Bargon(GobEngine *vm);
~Draw_Bargon() override {}
};
class Draw_Fascination: public Draw_v2 {
public:
Draw_Fascination(GobEngine *vm);
~Draw_Fascination() override {}
void spriteOperation(int16 operation, bool ttsAddHotspotText = true) override;
void decompWin(int16 x, int16 y, SurfacePtr destPtr);
void drawWin(int16 fct);
void saveWin(int16 id);
void restoreWin(int16 id);
void handleWinBorder(int16 id);
void drawWinTrace(int16 left, int16 top, int16 width, int16 height);
int16 openWin(int16 id) override;
void closeWin(int16 id) override;
int16 getWinFromCoord(int16 &dx, int16 &dy) override;
int16 handleCurWin() override;
void activeWin(int16 id) override;
void moveWin(int16 id) override;
bool overlapWin(int16 idWin1, int16 idWin2) override;
void closeAllWin() override;
};
class Draw_Playtoons: public Draw_v2 {
private:
struct TotTextInfo {
Common::String str;
int16 rectLeft = 0;
int16 rectRight = 0;
int16 rectTop = 0;
int16 rectBottom = 0;
int16 colCmd = 0;
int16 fontIndex = 0;
int16 color = 0;
};
public:
Draw_Playtoons(GobEngine *vm);
~Draw_Playtoons() override {}
void printTotText(int16 id) override;
void spriteOperation(int16 operation, bool ttsAddHotspotText = true) override;
};
class Draw_v7 : public Draw_Playtoons {
public:
Draw_v7(GobEngine *vm);
~Draw_v7() override;
void initScreen() override;
void animateCursor(int16 cursor) override;
private:
Common::WinResources *_cursors;
bool loadCursorFile();
bool loadCursorFromFile(Common::String filename);
};
// Draw operations
#define DRAW_BLITSURF 0
#define DRAW_PUTPIXEL 1
#define DRAW_FILLRECT 2
#define DRAW_DRAWLINE 3
#define DRAW_INVALIDATE 4
#define DRAW_LOADSPRITE 5
#define DRAW_PRINTTEXT 6
#define DRAW_DRAWBAR 7
#define DRAW_CLEARRECT 8
#define DRAW_FILLRECTABS 9
#define DRAW_DRAWLETTER 10
} // End of namespace Gob
#endif // GOB_DRAW_H

View File

@@ -0,0 +1,46 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "gob/gob.h"
#include "gob/draw.h"
#include "gob/global.h"
#include "gob/video.h"
namespace Gob {
Draw_Bargon::Draw_Bargon(GobEngine *vm) : Draw_v2(vm) {
}
void Draw_Bargon::initScreen() {
_vm->_global->_videoMode = 0x14;
_vm->_video->_surfWidth = 640;
_vm->_video->initPrimary(_vm->_global->_videoMode);
Draw_v2::initScreen();
}
} // End of namespace Gob

1138
engines/gob/draw_fascin.cpp Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

541
engines/gob/draw_v1.cpp Normal file
View File

@@ -0,0 +1,541 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "common/str.h"
#include "graphics/cursorman.h"
#include "gob/gob.h"
#include "gob/draw.h"
#include "gob/global.h"
#include "gob/util.h"
#include "gob/game.h"
#include "gob/resources.h"
#include "gob/hotspots.h"
#include "gob/scenery.h"
#include "gob/inter.h"
#include "gob/sound/sound.h"
namespace Gob {
Draw_v1::Draw_v1(GobEngine *vm) : Draw(vm) {
}
void Draw_v1::initScreen() {
_backSurface = _vm->_video->initSurfDesc(320, 200);
_frontSurface = _vm->_global->_primarySurfDesc;
_cursorSprites = _vm->_video->initSurfDesc(_cursorWidth * 2, _cursorHeight, 2);
_scummvmCursor = _vm->_video->initSurfDesc(_cursorWidth , _cursorHeight, SCUMMVM_CURSOR);
}
void Draw_v1::closeScreen() {
}
void Draw_v1::blitCursor() {
if (_cursorIndex == -1)
return;
if (_showCursor == 2)
_showCursor = 0;
}
void Draw_v1::animateCursor(int16 cursor) {
int16 cursorIndex = cursor;
int16 newX = 0, newY = 0;
uint16 hotspotX = 0, hotspotY = 0;
_showCursor = 2;
if (cursorIndex == -1) {
cursorIndex =
_vm->_game->_hotspots->findCursor(_vm->_global->_inter_mouseX,
_vm->_global->_inter_mouseY);
if (_cursorAnimLow[cursorIndex] == -1)
cursorIndex = 1;
}
if (_cursorAnimLow[cursorIndex] != -1) {
if (cursorIndex == _cursorIndex) {
if (_cursorAnimDelays[_cursorIndex] != 0 &&
_cursorAnimDelays[_cursorIndex] * 10 +
_cursorTimeKey <= _vm->_util->getTimeKey()) {
_cursorAnim++;
_cursorTimeKey = _vm->_util->getTimeKey();
} else {
if (_noInvalidated && (_vm->_global->_inter_mouseX == _cursorX) &&
(_vm->_global->_inter_mouseY == _cursorY)) {
_vm->_video->waitRetrace();
return;
}
}
} else {
_cursorIndex = cursorIndex;
if (_cursorAnimDelays[_cursorIndex] != 0) {
_cursorAnim =
_cursorAnimLow[_cursorIndex];
_cursorTimeKey = _vm->_util->getTimeKey();
} else {
_cursorAnim = _cursorIndex;
}
}
if (_cursorAnimDelays[_cursorIndex] != 0 &&
(_cursorAnimHigh[_cursorIndex] < _cursorAnim ||
_cursorAnimLow[_cursorIndex] >
_cursorAnim)) {
_cursorAnim = _cursorAnimLow[_cursorIndex];
}
newX = _vm->_global->_inter_mouseX;
newY = _vm->_global->_inter_mouseY;
if (_cursorHotspotXVar != -1) {
newX -= hotspotX = (uint16) VAR(_cursorIndex + _cursorHotspotXVar);
newY -= hotspotY = (uint16) VAR(_cursorIndex + _cursorHotspotYVar);
} else if (_cursorHotspotX != -1) {
newX -= hotspotX = _cursorHotspotX;
newY -= hotspotY = _cursorHotspotY;
}
_scummvmCursor->clear();
_scummvmCursor->blit(*_cursorSprites,
cursorIndex * _cursorWidth, 0,
(cursorIndex + 1) * _cursorWidth - 1,
_cursorHeight - 1, 0, 0);
CursorMan.replaceCursor(_scummvmCursor->getData(),
_cursorWidth, _cursorHeight, hotspotX, hotspotY, 0, false, &_vm->getPixelFormat());
if (_frontSurface != _backSurface) {
_showCursor = 3;
if (!_noInvalidated) {
int16 tmp = _cursorIndex;
_cursorIndex = -1;
blitInvalidated();
_cursorIndex = tmp;
} else {
_vm->_video->waitRetrace();
if (MIN(newY, _cursorY) < 50)
_vm->_util->delay(5);
_showCursor = 0;
}
}
} else
blitCursor();
_cursorX = newX;
_cursorY = newY;
}
void Draw_v1::printTotText(int16 id) {
byte *dataPtr;
byte *ptr, *ptrEnd;
byte cmd;
int16 destX, destY;
int16 val;
int16 savedFlags;
int16 destSpriteX;
int16 spriteRight, spriteBottom;
char buf[20];
_vm->_sound->cdPlayMultMusic();
TextItem *textItem = _vm->_game->_resources->getTextItem(id);
if (!textItem)
return;
dataPtr = textItem->getData();
ptr = dataPtr;
destX = READ_LE_UINT16(ptr) & 0x7FFF;
destY = READ_LE_UINT16(ptr + 2);
spriteRight = READ_LE_UINT16(ptr + 4);
spriteBottom = READ_LE_UINT16(ptr + 6);
ptr += 8;
if (_renderFlags & RENDERFLAG_CAPTUREPUSH) {
_vm->_game->capturePush(destX, destY,
spriteRight - destX + 1, spriteBottom - destY + 1);
(*_vm->_scenery->_pCaptureCounter)++;
}
_destSpriteX = destX;
_destSpriteY = destY;
_spriteRight = spriteRight;
_spriteBottom = spriteBottom;
_destSurface = kBackSurface;
_backColor = *ptr++;
_transparency = 1;
spriteOperation(DRAW_CLEARRECT);
_backColor = 0;
savedFlags = _renderFlags;
_renderFlags &= ~RENDERFLAG_NOINVALIDATE;
while ((_destSpriteX = READ_LE_UINT16(ptr)) != -1) {
_destSpriteX += destX;
_destSpriteY = READ_LE_UINT16(ptr + 2) + destY;
_spriteRight = READ_LE_UINT16(ptr + 4) + destX;
_spriteBottom = READ_LE_UINT16(ptr + 6) + destY;
ptr += 8;
cmd = *ptr++;
switch ((cmd & 0xF0) >> 4) {
case 0:
_frontColor = cmd & 0xF;
spriteOperation(DRAW_DRAWLINE);
break;
case 1:
_frontColor = cmd & 0xF;
spriteOperation(DRAW_DRAWBAR);
break;
case 2:
_backColor = cmd & 0xF;
spriteOperation(DRAW_FILLRECTABS);
break;
default:
break;
}
}
ptr += 2;
for (ptrEnd = ptr; *ptrEnd != 1; ptrEnd++) {
if (*ptrEnd == 3)
ptrEnd++;
if (*ptrEnd == 2)
ptrEnd += 4;
}
ptrEnd++;
#ifdef USE_TTS
Common::String ttsMessage;
#endif
while (*ptr != 1) {
cmd = *ptr;
if (cmd == 3) {
ptr++;
_fontIndex = (*ptr & 0xF0) >> 4;
_frontColor = *ptr & 0xF;
ptr++;
continue;
} else if (cmd == 2) {
ptr++;
_destSpriteX = destX + READ_LE_UINT16(ptr);
_destSpriteY = destY + READ_LE_UINT16(ptr + 2);
ptr += 4;
continue;
}
if (*ptr != 0xBA) {
_letterToPrint = (char) *ptr;
spriteOperation(DRAW_DRAWLETTER);
_destSpriteX += _fonts[_fontIndex]->getCharWidth();
ptr++;
} else {
cmd = ptrEnd[17] & 0x7F;
if (cmd == 0) {
val = READ_LE_UINT16(ptrEnd + 18) * 4;
Common::sprintf_s(buf, "%d", (int32)VAR_OFFSET(val));
} else if (cmd == 1) {
val = READ_LE_UINT16(ptrEnd + 18) * 4;
Common::strlcpy(buf, GET_VARO_STR(val), 20);
} else {
val = READ_LE_UINT16(ptrEnd + 18) * 4;
Common::sprintf_s(buf, "%d", (int32)VAR_OFFSET(val));
if (buf[0] == '-') {
while (strlen(buf) - 1 < (uint32)ptrEnd[17]) {
_vm->_util->insertStr("0", buf, 1);
}
} else {
while (strlen(buf) - 1 < (uint32)ptrEnd[17]) {
_vm->_util->insertStr("0", buf, 0);
}
}
_vm->_util->insertStr(",", buf, strlen(buf) + 1 - ptrEnd[17]);
}
_textToPrint = buf;
#ifdef USE_TTS
ttsMessage += _textToPrint;
ttsMessage += " ";
#endif
destSpriteX = _destSpriteX;
spriteOperation(DRAW_PRINTTEXT, false);
if (ptrEnd[17] & 0x80) {
if (ptr[1] == ' ') {
_destSpriteX += _fonts[_fontIndex]->getCharWidth();
while (ptr[1] == ' ')
ptr++;
if (ptr[1] == 2) {
if (READ_LE_UINT16(ptr + 4) == _destSpriteY)
ptr += 5;
}
} else if (ptr[1] == 2 && READ_LE_UINT16(ptr + 4) == _destSpriteY) {
ptr += 5;
_destSpriteX += _fonts[_fontIndex]->getCharWidth();
}
} else {
_destSpriteX = destSpriteX + _fonts[_fontIndex]->getCharWidth();
}
ptrEnd += 23;
ptr++;
}
}
#ifdef USE_TTS
if (_previousTot != ttsMessage) {
if (_vm->_game->_hotspots->hoveringOverHotspot()) {
_vm->sayText(ttsMessage);
} else {
_vm->sayText(ttsMessage, Common::TextToSpeechManager::QUEUE);
}
_previousTot = ttsMessage;
}
#endif
delete textItem;
_renderFlags = savedFlags;
if (_renderFlags & RENDERFLAG_COLLISIONS)
_vm->_game->_hotspots->check(0, 0);
if ((_renderFlags & RENDERFLAG_CAPTUREPOP) && *_vm->_scenery->_pCaptureCounter != 0) {
(*_vm->_scenery->_pCaptureCounter)--;
_vm->_game->capturePop(1);
}
}
void Draw_v1::spriteOperation(int16 operation, bool ttsAddHotspotText) {
int16 len;
int16 x, y;
int16 perLine;
Resource *resource;
operation &= 0x0F;
if (_sourceSurface >= 100)
_sourceSurface -= 80;
if (_destSurface >= 100)
_destSurface -= 80;
if (_renderFlags & RENDERFLAG_USEDELTAS) {
if (_sourceSurface == kBackSurface) {
_spriteLeft += _backDeltaX;
_spriteTop += _backDeltaY;
}
if (_destSurface == kBackSurface) {
_destSpriteX += _backDeltaX;
_destSpriteY += _backDeltaY;
if ((operation == DRAW_DRAWLINE) ||
((operation >= DRAW_DRAWBAR) &&
(operation <= DRAW_FILLRECTABS))) {
_spriteRight += _backDeltaX;
_spriteBottom += _backDeltaY;
}
}
}
Font *font = nullptr;
switch (operation) {
case DRAW_BLITSURF:
_spritesArray[_destSurface]->blit(*_spritesArray[_sourceSurface],
_spriteLeft, _spriteTop,
_spriteLeft + _spriteRight - 1,
_spriteTop + _spriteBottom - 1,
_destSpriteX, _destSpriteY, (_transparency == 0) ? -1 : 0);
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY,
_destSpriteX + _spriteRight - 1, _destSpriteY + _spriteBottom - 1);
break;
case DRAW_PUTPIXEL:
_spritesArray[_destSurface]->putPixel(_destSpriteX, _destSpriteY, _frontColor);
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY, _destSpriteX, _destSpriteY);
break;
case DRAW_FILLRECT:
_spritesArray[_destSurface]->fillRect(_destSpriteX, _destSpriteY,
_destSpriteX + _spriteRight - 1,
_destSpriteY + _spriteBottom - 1, _backColor);
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY,
_destSpriteX + _spriteRight - 1, _destSpriteY + _spriteBottom - 1);
break;
case DRAW_DRAWLINE:
_spritesArray[_destSurface]->drawLine(_destSpriteX, _destSpriteY,
_spriteRight, _spriteBottom, _frontColor);
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY, _spriteRight, _spriteBottom);
break;
case DRAW_INVALIDATE:
dirtiedRect(_destSurface, _destSpriteX - _spriteRight, _destSpriteY - _spriteBottom,
_destSpriteX + _spriteRight, _destSpriteY + _spriteBottom);
break;
case DRAW_LOADSPRITE:
resource = _vm->_game->_resources->getResource((uint16) _spriteLeft,
&_spriteRight, &_spriteBottom);
if (!resource)
break;
_vm->_video->drawPackedSprite(resource->getData(),
_spriteRight, _spriteBottom, _destSpriteX, _destSpriteY,
_transparency, *_spritesArray[_destSurface]);
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY,
_destSpriteX + _spriteRight - 1, _destSpriteY + _spriteBottom - 1);
delete resource;
break;
case DRAW_PRINTTEXT:
if ((_fontIndex >= kFontCount) || !_fonts[_fontIndex]) {
warning("Trying to print \"%s\" with undefined font %d", _textToPrint, _fontIndex);
break;
}
font = _fonts[_fontIndex];
len = strlen(_textToPrint);
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY,
_destSpriteX + len * font->getCharWidth() - 1,
_destSpriteY + font->getCharHeight() - 1);
#ifdef USE_TTS
if (ttsAddHotspotText) {
_vm->_game->_hotspots->addHotspotTTSText(_textToPrint, _destSpriteX, _destSpriteY,
_destSpriteX + len * font->getCharWidth() - 1,
_destSpriteY + font->getCharHeight() - 1, _destSurface);
}
#endif
for (int i = 0; i < len; i++) {
font->drawLetter(*_spritesArray[_destSurface], _textToPrint[i],
_destSpriteX, _destSpriteY, _frontColor, _backColor, _transparency);
_destSpriteX += font->getCharWidth();
}
break;
case DRAW_DRAWBAR:
_spritesArray[_destSurface]->drawLine(_destSpriteX, _spriteBottom,
_spriteRight, _spriteBottom, _frontColor);
_spritesArray[_destSurface]->drawLine(_destSpriteX, _destSpriteY,
_destSpriteX, _spriteBottom, _frontColor);
_spritesArray[_destSurface]->drawLine(_spriteRight, _destSpriteY,
_spriteRight, _spriteBottom, _frontColor);
_spritesArray[_destSurface]->drawLine(_destSpriteX, _destSpriteY,
_spriteRight, _destSpriteY, _frontColor);
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY, _spriteRight, _spriteBottom);
break;
case DRAW_CLEARRECT:
if (_backColor < 16) {
_spritesArray[_destSurface]->fillRect(_destSpriteX, _destSpriteY,
_spriteRight, _spriteBottom,
_backColor);
}
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY, _spriteRight, _spriteBottom);
break;
case DRAW_FILLRECTABS:
_spritesArray[_destSurface]->fillRect(_destSpriteX, _destSpriteY,
_spriteRight, _spriteBottom, _backColor);
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY, _spriteRight, _spriteBottom);
break;
case DRAW_DRAWLETTER:
if ((_fontIndex >= kFontCount) || !_fonts[_fontIndex]) {
warning("Trying to print \'%c\' with undefined font %d", _letterToPrint, _fontIndex);
break;
}
font = _fonts[_fontIndex];
if (_fontToSprite[_fontIndex].sprite == -1) {
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY,
_destSpriteX + font->getCharWidth() - 1,
_destSpriteY + font->getCharHeight() - 1);
font->drawLetter(*_spritesArray[_destSurface], _letterToPrint,
_destSpriteX, _destSpriteY, _frontColor, _backColor, _transparency);
break;
}
perLine =
_spritesArray[(int16)_fontToSprite[_fontIndex].sprite]->getWidth() /
_fontToSprite[_fontIndex].width;
y = (_letterToPrint - _fontToSprite[_fontIndex].base) / perLine *
_fontToSprite[_fontIndex].height;
x = (_letterToPrint - _fontToSprite[_fontIndex].base) % perLine *
_fontToSprite[_fontIndex].width;
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY,
_destSpriteX + _fontToSprite[_fontIndex].width,
_destSpriteY + _fontToSprite[_fontIndex].height);
_spritesArray[_destSurface]->blit(*_spritesArray[(int16)_fontToSprite[_fontIndex].sprite], x, y,
x + _fontToSprite[_fontIndex].width,
y + _fontToSprite[_fontIndex].height,
_destSpriteX, _destSpriteY, (_transparency == 0) ? -1 : 0);
break;
default:
break;
}
if (_renderFlags & RENDERFLAG_USEDELTAS) {
if (_sourceSurface == kBackSurface) {
_spriteLeft -= _backDeltaX;
_spriteTop -= _backDeltaY;
}
if (_destSurface == kBackSurface) {
_destSpriteX -= _backDeltaX;
_destSpriteY -= _backDeltaY;
}
}
}
} // End of namespace Gob

1016
engines/gob/draw_v2.cpp Normal file

File diff suppressed because it is too large Load Diff

286
engines/gob/draw_v7.cpp Normal file
View File

@@ -0,0 +1,286 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/formats/winexe_ne.h"
#include "common/formats/winexe_pe.h"
#include "graphics/blit.h"
#include "graphics/cursorman.h"
#include "graphics/wincursor.h"
#include "image/icocur.h"
#include "gob/dataio.h"
#include "gob/draw.h"
#include "gob/game.h"
#include "gob/global.h"
#include "gob/hotspots.h"
#include "gob/inter.h"
#include "gob/resources.h"
#include "gob/scenery.h"
#include "gob/script.h"
namespace Gob {
Draw_v7::Draw_v7(GobEngine *vm) : Draw_Playtoons(vm), _cursors(nullptr) {
}
Draw_v7::~Draw_v7() {
delete _cursors;
}
bool Draw_v7::loadCursorFile() {
if (_cursors)
return true;
if (_vm->_dataIO->hasFile("cursor32.dll")) {
_cursors = new Common::PEResources();
if (_cursors->loadFromEXE("cursor32.dll"))
return true;
} else if (_vm->_dataIO->hasFile("cursor.dll")) {
_cursors = new Common::NEResources();
if (_cursors->loadFromEXE("cursor.dll"))
return true;
}
delete _cursors;
_cursors = nullptr;
return false;
}
bool Draw_v7::loadCursorFromFile(Common::String cursorName) {
Graphics::WinCursorGroup *cursorGroup = nullptr;
Graphics::Cursor *defaultCursor = nullptr;
const Graphics::Cursor *cursor = nullptr;
if (cursorName.hasPrefix("*")) {
// Load from an external .CUR file
cursorName = cursorName.substr(1);
Common::SeekableReadStream *cursorStream = _vm->_dataIO->getFile(cursorName);
if (cursorStream) {
Image::IcoCurDecoder cursorDecoder;
cursorDecoder.open(*cursorStream);
if (cursorDecoder.numItems() > 0) {
cursor = cursorDecoder.loadItemAsCursor(0);
} else {
warning("No cursor item found in file '%s'", cursorName.c_str());
}
} else {
warning("External cursor file '%s' not found", cursorName.c_str());
}
} else {
// Load from a .DLL cursor file and cursor group
if (loadCursorFile())
cursorGroup = Graphics::WinCursorGroup::createCursorGroup(_cursors, Common::WinResourceID(cursorName));
if (cursorGroup && !cursorGroup->cursors.empty() && cursorGroup->cursors[0].cursor) {
cursor = cursorGroup->cursors[0].cursor;
}
}
// If the requested cursor does not exist, create a default one
if (!cursor) {
defaultCursor = Graphics::makeDefaultWinCursor();
cursor = defaultCursor;
}
CursorMan.replaceCursor(cursor);
CursorMan.disableCursorPalette(false);
delete cursorGroup;
delete defaultCursor;
return true;
}
void Draw_v7::initScreen() {
_vm->_game->_preventScroll = false;
_scrollOffsetX = 0;
_scrollOffsetY = 0;
if (!_spritesArray[kBackSurface] || _vm->_global->_videoMode != 0x18) {
initSpriteSurf(kBackSurface, _vm->_video->_surfWidth, _vm->_video->_surfHeight, 0);
_backSurface = _spritesArray[kBackSurface];
_backSurface->clear();
}
if (!_spritesArray[kCursorSurface]) {
initSpriteSurf(kCursorSurface, 32, 16, 2);
_cursorSpritesBack = _spritesArray[kCursorSurface];
_cursorSprites = _cursorSpritesBack;
_scummvmCursor = _vm->_video->initSurfDesc(16, 16, SCUMMVM_CURSOR);
}
_spritesArray[kFrontSurface] = _frontSurface;
_spritesArray[kBackSurface ] = _backSurface;
_vm->_video->dirtyRectsAll();
}
void Draw_v7::animateCursor(int16 cursor) {
if (!_cursorSprites)
return;
int16 cursorIndex = cursor;
int16 newX = 0, newY = 0;
uint16 hotspotX, hotspotY;
_showCursor |= 1;
// .-- _draw_animateCursorSUB1 ---
if (cursorIndex == -1) {
cursorIndex =
_vm->_game->_hotspots->findCursor(_vm->_global->_inter_mouseX,
_vm->_global->_inter_mouseY);
if (_cursorAnimLow[cursorIndex] == -1)
cursorIndex = 1;
}
// '------
if (_cursorAnimLow[cursorIndex] != -1) {
// --- Advance cursor animation
// TODO: Not sure if this is still valid in Adibou2/Adi4
if (cursorIndex == _cursorIndex) {
if ((_cursorAnimDelays[_cursorIndex] != 0) &&
((_cursorTimeKey + (_cursorAnimDelays[_cursorIndex] * 10)) <=
_vm->_util->getTimeKey())) {
_cursorAnim++;
if ((_cursorAnimHigh[_cursorIndex] < _cursorAnim) ||
(_cursorAnimLow[_cursorIndex] > _cursorAnim))
_cursorAnim = _cursorAnimLow[_cursorIndex];
_cursorTimeKey = _vm->_util->getTimeKey();
} /* else { // Not found in Adibou 2 ASM
if (_noInvalidated && (_vm->_global->_inter_mouseX == _cursorX) &&
(_vm->_global->_inter_mouseY == _cursorY)) {
_vm->_video->waitRetrace();
return;
}
}*/
} else {
_cursorIndex = cursorIndex;
if (_cursorAnimDelays[cursorIndex] != 0) {
_cursorAnim = _cursorAnimLow[cursorIndex];
_cursorTimeKey = _vm->_util->getTimeKey();
}
}
if (_cursorAnimDelays[_cursorIndex] != 0) {
if ((_cursorAnimHigh[_cursorIndex] < _cursorAnim) ||
(_cursorAnimLow[_cursorIndex] > _cursorAnim))
_cursorAnim = _cursorAnimLow[_cursorIndex];
cursorIndex = _cursorAnim;
}
// '------
if (cursorIndex == -1)
return;
bool cursorChanged = _cursorNames[cursorIndex] != _cursorName;
if ((!_cursorDrawnFromScripts || !_cursorNames[cursorIndex].empty()) && cursorChanged) {
_cursorName = _cursorNames[cursorIndex];
// If the cursor name is empty, that cursor will be drawn by the scripts
if (_cursorNames[cursorIndex].empty() || _cursorNames[cursorIndex] == "VIDE") { // "VIDE" is "empty" in french
for (int i = 0; i < 40; i++) {
_cursorNames[i].clear();
}
_cursorDrawnFromScripts = true;
_cursorX = _vm->_global->_inter_mouseX;
_cursorY = _vm->_global->_inter_mouseY;
_showCursor &= ~1;
return;
} else {
_cursorDrawnFromScripts = false;
loadCursorFromFile(_cursorName);
_cursorX = _vm->_global->_inter_mouseX;
_cursorY = _vm->_global->_inter_mouseY;
}
}
if (_cursorDrawnFromScripts) {
hotspotX = 0;
hotspotY = 0;
if (_cursorHotspotXVar != -1) {
hotspotX = (uint16)VAR(_cursorIndex + _cursorHotspotXVar);
hotspotY = (uint16)VAR(_cursorIndex + _cursorHotspotYVar);
} else if (_cursorHotspotX != -1) {
hotspotX = _cursorHotspotX;
hotspotY = _cursorHotspotY;
}
newX = _vm->_global->_inter_mouseX - hotspotX;
newY = _vm->_global->_inter_mouseY - hotspotY;
if (_scummvmCursor->getWidth() != _cursorWidth || _scummvmCursor->getHeight() != _cursorHeight) {
_vm->_draw->_scummvmCursor.reset();
_vm->_draw->_scummvmCursor = _vm->_video->initSurfDesc(_cursorWidth, _cursorHeight, SCUMMVM_CURSOR);
}
_scummvmCursor->clear();
_scummvmCursor->blit(*_cursorSprites,
cursorIndex * _cursorWidth, 0,
(cursorIndex + 1) * _cursorWidth - 1,
_cursorHeight - 1, 0, 0);
CursorMan.replaceCursor(_scummvmCursor->getData(),
_cursorWidth, _cursorHeight, hotspotX, hotspotY, 0, false, &_vm->getPixelFormat());
CursorMan.disableCursorPalette(true);
}
if (_frontSurface != _backSurface) {
if (!_noInvalidated) {
int16 tmp = _cursorIndex;
_cursorIndex = -1;
blitInvalidated();
_cursorIndex = tmp;
} else {
_showCursor = 3;
_vm->_video->waitRetrace();
if (MIN(newY, _cursorY) < 50)
_vm->_util->delay(5);
}
}
if (!cursorChanged && !_cursorDrawnFromScripts)
return;
} else {
blitCursor();
_cursorX = newX;
_cursorY = newY;
}
_showCursor &= ~1;
}
} // End of namespace Gob

1198
engines/gob/expression.cpp Normal file

File diff suppressed because it is too large Load Diff

180
engines/gob/expression.h Normal file
View File

@@ -0,0 +1,180 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_EXPRESSION_H
#define GOB_EXPRESSION_H
#include "common/scummsys.h"
namespace Gob {
class GobEngine;
enum {
OP_NEG = 1,
OP_ADD = 2,
OP_SUB = 3,
OP_BITOR = 4,
OP_MUL = 5,
OP_DIV = 6,
OP_MOD = 7,
OP_BITAND = 8,
OP_BEGIN_EXPR = 9,
OP_END_EXPR = 10,
OP_NOT = 11,
OP_END_MARKER = 12, // Marks end of an array or string
OP_ARRAY_INT8 = 16,
OP_LOAD_VAR_INT16 = 17,
OP_LOAD_VAR_INT8 = 18,
OP_LOAD_IMM_INT32 = 19,
OP_LOAD_IMM_INT16 = 20,
OP_LOAD_IMM_INT8 = 21,
OP_LOAD_IMM_STR = 22,
OP_LOAD_VAR_INT32 = 23,
OP_LOAD_VAR_INT32_AS_INT16 = 24,
OP_LOAD_VAR_STR = 25,
OP_ARRAY_INT32 = 26,
OP_ARRAY_INT16 = 27,
OP_ARRAY_STR = 28,
OP_FUNC = 29,
OP_OR = 30, // Logical OR
OP_AND = 31, // Logical AND
OP_LESS = 32,
OP_LEQ = 33,
OP_GREATER = 34,
OP_GEQ = 35,
OP_EQ = 36,
OP_NEQ = 37
};
enum {
FUNC_SQRT1 = 0,
FUNC_SQRT2 = 1,
FUNC_SQRT3 = 6,
FUNC_SQR = 5,
FUNC_ABS = 7,
FUNC_RAND = 10
};
enum {
TYPE_IMM_INT8 = OP_LOAD_IMM_INT8, // 21
TYPE_IMM_INT32 = OP_LOAD_IMM_INT32, // 19
TYPE_IMM_INT16 = OP_LOAD_IMM_INT16, // 20
TYPE_IMM_STR = OP_LOAD_IMM_STR, // 22
TYPE_VAR_INT8 = OP_LOAD_VAR_INT8, // 18
TYPE_VAR_INT16 = OP_LOAD_VAR_INT16, // 17
TYPE_VAR_INT32 = OP_LOAD_VAR_INT32, // 23
TYPE_VAR_STR = OP_LOAD_VAR_STR, // 25
TYPE_ARRAY_INT8 = OP_ARRAY_INT8, // 16
TYPE_ARRAY_INT16 = OP_ARRAY_INT16, // 27
TYPE_ARRAY_INT32 = OP_ARRAY_INT32, // 26
TYPE_ARRAY_STR = OP_ARRAY_STR, // 28
TYPE_VAR_INT32_AS_INT16 = OP_LOAD_VAR_INT32_AS_INT16 // 24
};
enum {
// FIXME: The following two 'truth values' are stored inside the list
// of "operators". So they somehow coincide with OP_LOAD_VAR_INT32
// and OP_LOAD_VAR_INT32_AS_INT16. I haven't yet quite understood
// how, resp. what that means. You have been warned.
GOB_TRUE = 24,
GOB_FALSE = 23
};
class Expression {
public:
Expression(GobEngine *vm);
virtual ~Expression() {}
void skipExpr(char stopToken);
void printExpr(char stopToken);
void printVarIndex();
uint16 parseVarIndex(uint16 *size = 0, uint16 *type = 0);
int16 parseValExpr(byte stopToken = 99);
int16 parseExpr(byte stopToken, byte *type);
int32 getResultInt();
char *getResultStr();
private:
class Stack {
public:
byte *opers;
int32 *values;
Stack(size_t size = 20);
~Stack();
};
class StackFrame {
public:
byte *opers;
int32 *values;
int16 pos;
StackFrame(const Stack &stack);
void push(int count = 1);
void pop(int count = 1);
};
enum PointerType {
kExecPtr = 0,
kInterVar = 1,
kResStr = 2
};
GobEngine *_vm;
int32 _resultInt;
char _resultStr[200];
int32 encodePtr(byte *ptr, int type);
byte *decodePtr(int32 n);
void printExpr_internal(char stopToken);
bool getVarBase(uint32 &varBase, bool mindStop = false,
uint16 *size = 0, uint16 *type = 0);
int cmpHelper(const StackFrame &stackFrame);
void loadValue(byte operation, uint32 varBase, const StackFrame &stackFrame);
void simpleArithmetic1(StackFrame &stackFrame);
void simpleArithmetic2(StackFrame &stackFrame);
bool complexArithmetic(Stack &stack, StackFrame &stackFrame, int16 brackStart);
void getResult(byte operation, int32 value, byte *type);
};
} // End of namespace Gob
#endif // GOB_EXPRESSION_H

1122
engines/gob/game.cpp Normal file

File diff suppressed because it is too large Load Diff

211
engines/gob/game.h Normal file
View File

@@ -0,0 +1,211 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_GAME_H
#define GOB_GAME_H
#include "common/str.h"
#include "gob/util.h"
#include "gob/video.h"
#include "gob/sound/sounddesc.h"
namespace Gob {
class Script;
class Resources;
class Variables;
class Hotspots;
class Environments {
public:
static const uint8 kEnvironmentCount = 20;
Environments(GobEngine *vm);
~Environments();
void set(uint8 env);
void get(uint8 env) const;
const Common::String &getTotFile(uint8 env) const;
bool has(Variables *variables, uint8 startEnv = 0, int16 except = -1) const;
bool has(Script *script , uint8 startEnv = 0, int16 except = -1) const;
bool has(Resources *resources, uint8 startEnv = 0, int16 except = -1) const;
void deleted(Variables *variables);
void clear();
bool setMedia(uint8 env);
bool getMedia(uint8 env);
bool clearMedia(uint8 env);
private:
struct Environment {
int32 cursorHotspotX;
int32 cursorHotspotY;
Common::String totFile;
Variables *variables;
Script *script;
Resources *resources;
};
struct Media {
SurfacePtr sprites[10];
SoundDesc sounds[10];
Font *fonts[17];
};
GobEngine *_vm;
Environment _environments[kEnvironmentCount];
Media _media[kEnvironmentCount];
};
class TotFunctions {
public:
TotFunctions(GobEngine *vm);
~TotFunctions();
int find(const Common::String &totFile) const;
bool load(const Common::String &totFile);
bool unload(const Common::String &totFile);
bool call(const Common::String &totFile, const Common::String &function) const;
bool call(const Common::String &totFile, uint16 offset) const;
Common::String getFunctionName(const Common::String &totFile, uint16 offset) const;
private:
static const uint8 kTotCount = 100;
struct Function {
Common::String name;
byte type;
uint16 offset;
};
struct Tot {
Common::String file;
Common::List<Function> functions;
Script *script;
Resources *resources;
};
GobEngine *_vm;
Tot _tots[kTotCount];
bool loadTot(Tot &tot, const Common::String &file);
void freeTot(Tot &tot);
bool loadIDE(Tot &tot);
int findFree() const;
bool call(const Tot &tot, uint16 offset) const;
};
class Game {
public:
Script *_script;
Resources *_resources;
Hotspots *_hotspots;
Common::String _curTotFile;
Common::String _totToLoad;
int32 _startTimeKey;
MouseButtons _mouseButtons;
bool _hasForwardedEventsFromVideo;
MouseButtons _forwardedMouseButtonsFromVideo;
int16 _forwardedKeyFromVideo;
bool _noScroll;
bool _preventScroll;
bool _wantScroll;
int16 _wantScrollX;
int16 _wantScrollY;
byte _handleMouse;
char _forceHandleMouse;
Game(GobEngine *vm);
virtual ~Game();
void prepareStart();
void playTot(int32 function);
void capturePush(int16 left, int16 top, int16 width, int16 height);
void capturePop(char doDraw);
void freeSoundSlot(int16 slot);
void wantScroll(int16 x, int16 y);
void evaluateScroll();
int16 checkKeys(int16 *pMousex = 0, int16 *pMouseY = 0,
MouseButtons *pButtons = 0, char handleMouse = 0);
void start();
void totSub(int8 flags, const Common::String &totFile);
void switchTotSub(int16 index, int16 function);
void deletedVars(Variables *variables);
bool loadFunctions(const Common::String &tot, uint16 flags);
bool callFunction(const Common::String &tot, const Common::String &function, int16 param);
Common::String getFunctionName(const Common::String &tot, uint16 offset);
protected:
GobEngine *_vm;
char _tempStr[256];
// Capture
Common::Rect _captureStack[20];
int16 _captureCount;
// For totSub()
int8 _curEnvironment;
int8 _numEnvironments;
Environments _environments;
TotFunctions _totFunctions;
void clearUnusedEnvironment();
};
} // End of namespace Gob
#endif // GOB_GAME_H

View File

@@ -0,0 +1,93 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_GAMEIDTOTYPE_H
#define GOB_GAMEIDTOTYPE_H
#include "gob/detection/detection.h"
namespace Gob {
struct GameIdToType {
const char *gameId;
GameType gameType;
};
static const GameIdToType gameIdToType[] = {
{ "gob1", kGameTypeGob1 },
{ "gob2", kGameTypeGob2 },
{ "gob3", kGameTypeGob3 },
{ "ween", kGameTypeWeen },
{ "bargon", kGameTypeBargon },
{ "babayaga", kGameTypeBabaYaga },
{ "abracadabra", kGameTypeAbracadabra },
{ "englishfever", kGameTypeNone },
{ "littlered", kGameTypeLittleRed },
{ "onceupon", kGameTypeOnceUponATime },
{ "crousti", kGameTypeCrousti },
{ "lit", kGameTypeLostInTime },
{ "lit1", kGameTypeLostInTime },
{ "lit2", kGameTypeLostInTime },
{ "nathanvacances", kGameTypeNone },
{ "inca2", kGameTypeInca2 },
{ "woodruff", kGameTypeWoodruff },
{ "dynasty", kGameTypeDynasty },
{ "dynastywood", kGameTypeDynastyWood },
{ "urban", kGameTypeUrban },
{ "playtoons1", kGameTypePlaytoons },
{ "playtoons2", kGameTypePlaytoons },
{ "playtoons3", kGameTypePlaytoons },
{ "playtoons4", kGameTypePlaytoons },
{ "playtoons5", kGameTypePlaytoons },
{ "playtnck1", kGameTypePlaytoons },
{ "playtnck2", kGameTypePlaytoons },
{ "playtnck3", kGameTypePlaytoons },
{ "playtoonsdemo", kGameTypePlaytoons },
{ "pierresmagiques", kGameTypeNone },
{ "bambou", kGameTypeBambou },
{ "fascination", kGameTypeFascination },
{ "geisha", kGameTypeGeisha },
{ "adi1", kGameTypeAdi1 },
{ "adi2", kGameTypeAdi2 },
{ "adi4", kGameTypeAdi4 },
{ "adi5", kGameTypeNone },
{ "adibou1", kGameTypeAdibou1 },
{ "adibou2", kGameTypeAdibou2 },
{ "adibou3", kGameTypeNone },
{ "adiboucuisine", kGameTypeNone },
{ "adiboudessin", kGameTypeNone },
{ "adiboumagie", kGameTypeNone },
{ "adiboudchoumer", kGameTypeNone },
{ "adiboudchoubanquise", kGameTypeNone },
{ "adiboudchoucampagne", kGameTypeNone },
{ "adiboudchoujunglesavane", kGameTypeNone },
{ nullptr, kGameTypeNone }
};
} // End of namespace Gob
#endif // GOB_GAMEIDTOTYPE_H

137
engines/gob/global.cpp Normal file
View File

@@ -0,0 +1,137 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "gob/gob.h"
#include "gob/global.h"
namespace Gob {
Global::Global(GobEngine *vm) : _vm(vm) {
for (int i = 0; i < 128; i++)
_pressedKeys[i] = 0;
_presentCGA = UNDEF;
_presentEGA = UNDEF;
_presentVGA = UNDEF;
_presentHER = UNDEF;
_videoMode = 0;
_fakeVideoMode = 0;
_oldMode = 3;
_soundFlags = 0;
_language = 0x8000;
_languageWanted = 0x8000;
_foundLanguage = false;
_useMouse = UNDEF;
_mousePresent = UNDEF;
_mouseXShift = 3;
_mouseYShift = 3;
_mouseMinX = 0;
_mouseMinY = 0;
_mouseMaxX = 320;
_mouseMaxY = 200;
_useJoystick = 1;
_primaryWidth = 0;
_primaryHeight = 0;
_colorCount = 16;
for (int i = 0; i < 256; i++) {
_redPalette [i] = 0;
_greenPalette[i] = 0;
_bluePalette [i] = 0;
}
_unusedPalette1[ 0] = (int16) 0x0000;
_unusedPalette1[ 1] = (int16) 0x000B;
_unusedPalette1[ 2] = (int16) 0x0000;
_unusedPalette1[ 3] = (int16) 0x5555;
_unusedPalette1[ 4] = (int16) 0xAAAA;
_unusedPalette1[ 5] = (int16) 0xFFFF;
_unusedPalette1[ 6] = (int16) 0x0000;
_unusedPalette1[ 7] = (int16) 0x5555;
_unusedPalette1[ 8] = (int16) 0xAAAA;
_unusedPalette1[ 9] = (int16) 0xFFFF;
_unusedPalette1[10] = (int16) 0x0000;
_unusedPalette1[11] = (int16) 0x5555;
_unusedPalette1[12] = (int16) 0xAAAA;
_unusedPalette1[13] = (int16) 0xFFFF;
_unusedPalette1[14] = (int16) 0x0000;
_unusedPalette1[15] = (int16) 0x5555;
_unusedPalette1[16] = (int16) 0xAAAA;
_unusedPalette1[17] = (int16) 0xFFFF;
for (int i = 0; i < 16; i++)
_unusedPalette2[i] = i;
_vgaPalette[ 0].red = 0x00; _vgaPalette[ 0].green = 0x00; _vgaPalette[ 0].blue = 0x00;
_vgaPalette[ 1].red = 0x00; _vgaPalette[ 1].green = 0x00; _vgaPalette[ 1].blue = 0x2A;
_vgaPalette[ 2].red = 0x00; _vgaPalette[ 2].green = 0x2A; _vgaPalette[ 2].blue = 0x00;
_vgaPalette[ 3].red = 0x00; _vgaPalette[ 3].green = 0x2A; _vgaPalette[ 3].blue = 0x2A;
_vgaPalette[ 4].red = 0x2A; _vgaPalette[ 4].green = 0x00; _vgaPalette[ 4].blue = 0x00;
_vgaPalette[ 5].red = 0x2A; _vgaPalette[ 5].green = 0x00; _vgaPalette[ 5].blue = 0x2A;
_vgaPalette[ 6].red = 0x2A; _vgaPalette[ 6].green = 0x15; _vgaPalette[ 6].blue = 0x00;
_vgaPalette[ 7].red = 0x2A; _vgaPalette[ 7].green = 0x2A; _vgaPalette[ 7].blue = 0x2A;
_vgaPalette[ 8].red = 0x15; _vgaPalette[ 8].green = 0x15; _vgaPalette[ 8].blue = 0x15;
_vgaPalette[ 9].red = 0x15; _vgaPalette[ 9].green = 0x15; _vgaPalette[ 9].blue = 0x3F;
_vgaPalette[10].red = 0x15; _vgaPalette[10].green = 0x3F; _vgaPalette[10].blue = 0x15;
_vgaPalette[11].red = 0x15; _vgaPalette[11].green = 0x3F; _vgaPalette[11].blue = 0x3F;
_vgaPalette[12].red = 0x3F; _vgaPalette[12].green = 0x15; _vgaPalette[12].blue = 0x15;
_vgaPalette[13].red = 0x3F; _vgaPalette[13].green = 0x15; _vgaPalette[13].blue = 0x3F;
_vgaPalette[14].red = 0x3F; _vgaPalette[14].green = 0x3F; _vgaPalette[14].blue = 0x15;
_vgaPalette[15].red = 0x3F; _vgaPalette[15].green = 0x3F; _vgaPalette[15].blue = 0x3F;
_pPaletteDesc = nullptr;
_setAllPalette = false;
_dontSetPalette = false;
_debugFlag = 0;
_inter_animDataSize = 10;
_inter_mouseX = 0;
_inter_mouseY = 0;
_speedFactor = 1;
_doSubtitles = false;
_noCd = false;
_curWinId = 0;
}
Global::~Global() {
}
} // End of namespace Gob

159
engines/gob/global.h Normal file
View File

@@ -0,0 +1,159 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_GLOBAL_H
#define GOB_GLOBAL_H
#include "common/file.h"
#include "common/endian.h"
#include "gob/video.h"
namespace Gob {
#define VIDMODE_CGA 0x05
#define VIDMODE_EGA 0x0D
#define VIDMODE_VGA 0x13
#define VIDMODE_HER 0x07
#define MIDI_FLAG 0x4000
#define PROAUDIO_FLAG 0x0010
#define ADLIB_FLAG 0x0008
#define BLASTER_FLAG 0x0004
#define INTERSOUND_FLAG 0x0002
#define SPEAKER_FLAG 0x0001
//#define NO 0
//#define YES 1
#define UNDEF 2
#define F1_KEY 0x3B00
#define F2_KEY 0x3C00
#define F3_KEY 0x3D00
#define F4_KEY 0x3E00
#define F5_KEY 0x3F00
#define F6_KEY 0x4000
#define ESCAPE 0x001B
#define ENTER 0x000D
/* Video drivers */
#define UNK_DRIVER 0
#define VGA_DRIVER 1
#define EGA_DRIVER 2
#define CGA_DRIVER 3
#define HER_DRIVER 4
enum Language {
kLanguageFrench = 0,
kLanguageGerman = 1,
kLanguageBritish = 2,
kLanguageSpanish = 3,
kLanguageItalian = 4,
kLanguageAmerican = 5,
kLanguageDutch = 6,
kLanguageKorean = 7,
kLanguageHebrew = 8,
kLanguagePortuguese = 9,
kLanguageJapanese = 10
};
class Global {
public:
char _pressedKeys[128];
int16 _presentCGA;
int16 _presentEGA;
int16 _presentVGA;
int16 _presentHER;
int16 _videoMode;
int16 _fakeVideoMode;
int16 _oldMode;
uint16 _soundFlags;
uint16 _language;
uint16 _languageWanted;
bool _foundLanguage;
char _useMouse;
int16 _mousePresent;
int16 _mouseXShift;
int16 _mouseYShift;
int16 _mouseMinX;
int16 _mouseMinY;
int16 _mouseMaxX;
int16 _mouseMaxY;
char _useJoystick;
int16 _primaryWidth;
int16 _primaryHeight;
int16 _colorCount;
char _redPalette[256];
char _greenPalette[256];
char _bluePalette[256];
int16 _unusedPalette1[18];
int16 _unusedPalette2[16];
Video::Color _vgaPalette[16];
Video::PalDesc _paletteStruct;
Video::PalDesc *_pPaletteDesc;
bool _setAllPalette;
bool _dontSetPalette;
SurfacePtr _primarySurfDesc;
int16 _debugFlag;
int16 _inter_animDataSize;
int16 _inter_mouseX;
int16 _inter_mouseY;
// Can be 1, 2 or 3 for normal, double and triple speed, respectively
uint8 _speedFactor;
bool _doSubtitles;
bool _noCd;
int16 _curWinId;
Global(GobEngine *vm);
~Global();
protected:
GobEngine *_vm;
};
} // End of namespace Gob
#endif // GOB_GLOBAL_H

808
engines/gob/gob.cpp Normal file
View File

@@ -0,0 +1,808 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/debug-channels.h"
#include "backends/audiocd/audiocd.h"
#include "base/plugins.h"
#include "common/config-manager.h"
#include "engines/util.h"
#include "audio/mididrv.h"
#include "audio/mixer.h"
#include "gui/gui-manager.h"
#include "gui/dialog.h"
#include "gui/widget.h"
#include "gob/gob.h"
#include "gob/global.h"
#include "gob/hotspots.h"
#include "gob/util.h"
#include "gob/dataio.h"
#include "gob/game.h"
#include "gob/sound/sound.h"
#include "gob/init.h"
#include "gob/inter.h"
#include "gob/draw.h"
#include "gob/goblin.h"
#include "gob/map.h"
#include "gob/mult.h"
#include "gob/palanim.h"
#include "gob/scenery.h"
#include "gob/videoplayer.h"
#include "gob/save/saveload.h"
#include "gob/pregob/pregob.h"
#include "gob/pregob/onceupon/abracadabra.h"
#include "gob/pregob/onceupon/babayaga.h"
namespace Gob {
#define MAX_TIME_DELTA 100
const Common::Language GobEngine::_gobToScummVMLang[] = {
Common::FR_FRA,
Common::DE_DEU,
Common::EN_GRB,
Common::ES_ESP,
Common::IT_ITA,
Common::EN_USA,
Common::NL_NLD,
Common::KO_KOR,
Common::HE_ISR,
Common::PT_BRA,
Common::JA_JPN
};
class PauseDialog : public GUI::Dialog {
public:
PauseDialog();
void reflowLayout() override;
void handleKeyDown(Common::KeyState state) override;
private:
Common::String _message;
GUI::StaticTextWidget *_text;
};
PauseDialog::PauseDialog() : GUI::Dialog(0, 0, 0, 0) {
_backgroundType = GUI::ThemeEngine::kDialogBackgroundSpecial;
_message = "Game paused. Press Ctrl+p again to continue.";
_text = new GUI::StaticTextWidget(this, 4, 0, 10, 10,
_message, Graphics::kTextAlignCenter);
}
void PauseDialog::reflowLayout() {
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
int width = g_gui.getStringWidth(_message) + 16;
int height = g_gui.getFontHeight() + 8;
_w = width;
_h = height;
_x = (screenW - width) / 2;
_y = (screenH - height) / 2;
_text->setSize(_w - 8, _h);
}
void PauseDialog::handleKeyDown(Common::KeyState state) {
// Close on CTRL+p
if ((state.hasFlags(Common::KBD_CTRL)) && (state.keycode == Common::KEYCODE_p))
close();
}
GobEngine::GobEngine(OSystem *syst) : Engine(syst), _rnd("gob") {
_sound = nullptr; _mult = nullptr; _game = nullptr;
_global = nullptr; _dataIO = nullptr; _goblin = nullptr;
_vidPlayer = nullptr; _init = nullptr; _inter = nullptr;
_map = nullptr; _palAnim = nullptr; _scenery = nullptr;
_draw = nullptr; _util = nullptr; _video = nullptr;
_saveLoad = nullptr; _preGob = nullptr;
_pauseStart = 0;
// Setup mixer
bool muteSFX = ConfMan.getBool("mute") || ConfMan.getBool("sfx_mute");
bool muteMusic = ConfMan.getBool("mute") || ConfMan.getBool("music_mute");
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType,
muteSFX ? 0 : ConfMan.getInt("sfx_volume"));
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType,
muteMusic ? 0 : ConfMan.getInt("music_volume"));
_copyProtection = ConfMan.getBool("copy_protection");
#ifdef USE_TTS
_weenVoiceNotepad = true;
#endif
_console = new GobConsole(this);
setDebugger(_console);
}
GobEngine::~GobEngine() {
deinitGameParts();
//_console is deleted by Engine
}
const char *GobEngine::getLangDesc(int16 language) const {
if ((language < 0) || (language > 10))
language = 2;
return Common::getLanguageDescription(_gobToScummVMLang[language]);
}
void GobEngine::validateLanguage() {
if (_global->_languageWanted != _global->_language) {
warning("Your game version doesn't support the requested language %s",
getLangDesc(_global->_languageWanted));
if (((_global->_languageWanted == 2) && (_global->_language == 5)) ||
((_global->_languageWanted == 5) && (_global->_language == 2)))
warning("Using %s instead", getLangDesc(_global->_language));
else
warning("Using the first language available: %s",
getLangDesc(_global->_language));
_global->_languageWanted = _global->_language;
}
}
void GobEngine::validateVideoMode(int16 videoMode) {
if ((videoMode != 0x10) && (videoMode != 0x13) &&
(videoMode != 0x14) && (videoMode != 0x18))
error("Video mode 0x%X is not supported", videoMode);
}
EndiannessMethod GobEngine::getEndiannessMethod() const {
return _endiannessMethod;
}
Endianness GobEngine::getEndianness() const {
if ((getPlatform() == Common::kPlatformAmiga) ||
(getPlatform() == Common::kPlatformMacintosh) ||
(getPlatform() == Common::kPlatformAtariST))
return kEndiannessBE;
return kEndiannessLE;
}
Common::Platform GobEngine::getPlatform() const {
return _platform;
}
GameType GobEngine::getGameType() const {
return _gameType;
}
bool GobEngine::isCD() const {
return (_features & kFeaturesCD) != 0;
}
bool GobEngine::isEGA() const {
return (_features & kFeaturesEGA) != 0;
}
bool GobEngine::hasAdLib() const {
return (_features & kFeaturesAdLib) != 0;
}
bool GobEngine::isSCNDemo() const {
return (_features & kFeaturesSCNDemo) != 0;
}
bool GobEngine::isBATDemo() const {
return (_features & kFeaturesBATDemo) != 0;
}
bool GobEngine::is640x400() const {
return (_features & kFeatures640x400) != 0;
}
bool GobEngine::is640x480() const {
return (_features & kFeatures640x480) != 0;
}
bool GobEngine::is800x600() const {
return (_features & kFeatures800x600) != 0;
}
bool GobEngine::is16Colors() const {
return (_features & kFeatures16Colors) != 0;
}
bool GobEngine::isTrueColor() const {
return (_features & kFeaturesTrueColor) != 0;
}
bool GobEngine::isDemo() const {
return (isSCNDemo() || isBATDemo());
}
const char *GobEngine::getGameVersion() const {
// Making sure that we return a set of predetermined versions
const Common::String extra = _extra;
if (extra.hasSuffix("1.01"))
return "1.01";
else if (extra.hasSuffix("1.02"))
return "1.02";
else if (extra.hasSuffix("1.07"))
return "1.07";
else
return "1.00";
}
bool GobEngine::hasResourceSizeWorkaround() const {
return _resourceSizeWorkaround;
}
bool GobEngine::isCurrentTot(const Common::String &tot) const {
return _game->_curTotFile.equalsIgnoreCase(tot);
}
const Graphics::PixelFormat &GobEngine::getPixelFormat() const {
return _pixelFormat;
}
void GobEngine::setTrueColor(bool trueColor, bool convertAllSurfaces, Graphics::PixelFormat *trueColorFormat) {
if (isTrueColor() == trueColor)
return;
_features = (_features & ~kFeaturesTrueColor) | (trueColor ? kFeaturesTrueColor : 0);
_video->setSize(trueColorFormat);
_pixelFormat = g_system->getScreenFormat();
if (_draw->_backSurface)
_draw->_backSurface->setBPP(_pixelFormat.bytesPerPixel);
if (_draw->_frontSurface)
_draw->_frontSurface->setBPP(_pixelFormat.bytesPerPixel);
if (_draw->_cursorSprites)
_draw->_cursorSprites->setBPP(_pixelFormat.bytesPerPixel);
if (_draw->_cursorSpritesBack)
_draw->_cursorSpritesBack->setBPP(_pixelFormat.bytesPerPixel);
if (_draw->_scummvmCursor)
_draw->_scummvmCursor->setBPP(_pixelFormat.bytesPerPixel);
if (convertAllSurfaces) {
Common::Array<SurfacePtr>::iterator surf;
for (surf = _draw->_spritesArray.begin(); surf != _draw->_spritesArray.end(); ++surf)
if (*surf)
(*surf)->setBPP(_pixelFormat.bytesPerPixel);
}
}
Common::Error GobEngine::run() {
Common::Error err;
err = initGameParts();
if (err.getCode() != Common::kNoError)
return err;
err = initGraphics();
if (err.getCode() != Common::kNoError)
return err;
// On some systems it's not safe to run CD audio games from the CD.
if (isCD()) {
if (!existExtractedCDAudioFiles()
&& !isDataAndCDAudioReadFromSameCD()) {
warnMissingExtractedCDAudio();
}
}
_system->getAudioCDManager()->open();
_global->_debugFlag = 1;
_video->_doRangeClamp = true;
// WORKAROUND: Some versions check the video mode to detect the system
if (_platform == Common::kPlatformAmiga)
_global->_fakeVideoMode = 0x11;
else if (_platform == Common::kPlatformAtariST)
_global->_fakeVideoMode = 0x10;
else
_global->_fakeVideoMode = 0x13;
_global->_videoMode = 0x13;
_global->_useMouse = 1;
_global->_soundFlags = MIDI_FLAG | SPEAKER_FLAG | BLASTER_FLAG | ADLIB_FLAG;
if (ConfMan.hasKey("language"))
_language = Common::parseLanguage(ConfMan.get("language"));
switch (_language) {
case Common::FR_FRA:
_global->_language = kLanguageFrench;
break;
case Common::DE_DEU:
_global->_language = kLanguageGerman;
break;
case Common::EN_ANY:
case Common::EN_GRB:
case Common::HU_HUN:
_global->_language = kLanguageBritish;
break;
case Common::ES_ESP:
_global->_language = kLanguageSpanish;
break;
case Common::IT_ITA:
_global->_language = kLanguageItalian;
break;
case Common::EN_USA:
_global->_language = kLanguageAmerican;
break;
case Common::NL_NLD:
_global->_language = kLanguageDutch;
break;
case Common::KO_KOR:
_global->_language = kLanguageKorean;
break;
case Common::HE_ISR:
_global->_language = kLanguageHebrew;
break;
case Common::PT_BRA:
_global->_language = kLanguagePortuguese;
break;
case Common::JA_JPN:
_global->_language = kLanguageJapanese;
break;
case Common::RU_RUS:
if (_gameType == kGameTypeWoodruff || _gameType == kGameTypeBargon)
_global->_language = kLanguageBritish;
else
_global->_language = kLanguageFrench;
break;
default:
_global->_language = kLanguageBritish;
break;
}
_global->_languageWanted = _global->_language;
#ifdef USE_TTS
Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
if (ttsMan) {
ttsMan->setLanguage(ConfMan.get("language"));
ttsMan->enable(ConfMan.getBool("tts_enabled"));
}
switch (_language) {
case Common::HU_HUN:
_ttsEncoding = Common::CodePage::kWindows1250;
break;
case Common::KO_KOR:
_ttsEncoding = Common::CodePage::kWindows949;
break;
case Common::HE_ISR:
_ttsEncoding = Common::CodePage::kDos862;
break;
case Common::JA_JPN:
_ttsEncoding = Common::CodePage::kWindows932;
break;
case Common::RU_RUS:
_ttsEncoding = Common::CodePage::kWindows1251;
break;
default:
_ttsEncoding = Common::CodePage::kDos850;
break;
}
#endif
_init->initGame();
return Common::kNoError;
}
void GobEngine::pauseEngineIntern(bool pause) {
if (pause) {
_pauseStart = _system->getMillis();
} else {
uint32 duration = _system->getMillis() - _pauseStart;
_util->notifyPaused(duration);
_game->_startTimeKey += duration;
_draw->_cursorTimeKey += duration;
if (_inter && (_inter->_soundEndTimeKey != 0))
_inter->_soundEndTimeKey += duration;
}
if (_vidPlayer)
_vidPlayer->pauseAll(pause);
_mixer->pauseAll(pause);
}
void GobEngine::syncSoundSettings() {
Engine::syncSoundSettings();
_init->updateConfig();
if (_sound)
_sound->adlibSyncVolume();
}
void GobEngine::pauseGame() {
pauseEngineIntern(true);
PauseDialog pauseDialog;
pauseDialog.runModal();
pauseEngineIntern(false);
}
#ifdef USE_TTS
void GobEngine::sayText(const Common::String &text, Common::TextToSpeechManager::Action action) const {
if (text.empty()) {
return;
}
Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
if (ttsMan && ConfMan.getBool("tts_enabled")) {
ttsMan->say(text, action, _ttsEncoding);
}
}
void GobEngine::stopTextToSpeech() const {
Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
if (ttsMan && ConfMan.getBool("tts_enabled") && ttsMan->isSpeaking()) {
ttsMan->stop();
_game->_hotspots->clearPreviousSaid();
}
}
#endif
Common::Error GobEngine::initGameParts() {
_resourceSizeWorkaround = false;
// Just detect some devices some of which will be always there if the music is not disabled
_noMusic = MidiDriver::getMusicType(MidiDriver::detectDevice(MDT_PCSPK | MDT_MIDI | MDT_ADLIB)) == MT_NULL ? true : false;
_endiannessMethod = kEndiannessMethodSystem;
_global = new Global(this);
_util = new Util(this);
_dataIO = new DataIO();
_palAnim = new PalAnim(this);
_vidPlayer = new VideoPlayer(this);
_sound = new Sound(this);
_game = new Game(this);
switch (_gameType) {
case kGameTypeGob1:
_init = new Init_v1(this);
_video = new Video_v1(this);
_inter = new Inter_v1(this);
_mult = new Mult_v1(this);
_draw = new Draw_v1(this);
_map = new Map_v1(this);
_goblin = new Goblin_v1(this);
_scenery = new Scenery_v1(this);
// WORKAROUND: The EGA version of Gobliiins claims a few resources are
// larger than they actually are. The original happily reads
// past the resource structure boundary, but we don't.
// To make sure we don't throw an error like we normally do
// (which leads to these resources not loading), we enable
// this workaround that automatically fixes the resources
// sizes.
//
// This glitch is visible in levels
// - 03 (ICIGCAA)
// - 09 (ICVGCGT)
// - 16 (TCVQRPM)
// - 20 (NNGWTTO)
// See also ScummVM bug report #7162.
if (isEGA())
_resourceSizeWorkaround = true;
break;
case kGameTypeGeisha:
_init = new Init_Geisha(this);
_video = new Video_v1(this);
_inter = new Inter_Geisha(this);
_mult = new Mult_v1(this);
_draw = new Draw_v1(this);
_map = new Map_v1(this);
_goblin = new Goblin_v1(this);
_scenery = new Scenery_v1(this);
_saveLoad = new SaveLoad_Geisha(this, _targetName.c_str());
_endiannessMethod = kEndiannessMethodAltFile;
break;
case kGameTypeFascination:
_init = new Init_Fascination(this);
_video = new Video_v2(this);
_inter = new Inter_Fascination(this);
_mult = new Mult_v2(this);
_draw = new Draw_Fascination(this);
_map = new Map_v2(this);
_goblin = new Goblin_v2(this);
_scenery = new Scenery_v2(this);
_saveLoad = new SaveLoad_Fascination(this, _targetName.c_str());
break;
case kGameTypeWeen:
case kGameTypeGob2:
case kGameTypeCrousti:
_init = new Init_v2(this);
_video = new Video_v2(this);
_inter = new Inter_v2(this);
_mult = new Mult_v2(this);
_draw = new Draw_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);
_mult = new Mult_v2(this);
_draw = new Draw_Bargon(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 kGameTypeLittleRed:
_init = new Init_v2(this);
_video = new Video_v2(this);
_inter = new Inter_LittleRed(this);
_mult = new Mult_v2(this);
_draw = new Draw_v2(this);
_map = new Map_v2(this);
_goblin = new Goblin_v2(this);
_scenery = new Scenery_v2(this);
// WORKAROUND: Little Red Riding Hood has a small resource size glitch in the
// screen where Little Red needs to find the animals' homes.
_resourceSizeWorkaround = true;
break;
case kGameTypeGob3:
_init = new Init_v3(this);
_video = new Video_v2(this);
_inter = new Inter_v3(this);
_mult = new Mult_v2(this);
_draw = new Draw_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(), SaveLoad_v3::kScreenshotTypeGob3);
break;
case kGameTypeInca2:
_init = new Init_v3(this);
_video = new Video_v2(this);
_inter = new Inter_Inca2(this);
_mult = new Mult_v2(this);
_draw = new Draw_v2(this);
_map = new Map_v2(this);
_goblin = new Goblin_v3(this);
_scenery = new Scenery_v2(this);
_saveLoad = new SaveLoad_Inca2(this, _targetName.c_str());
break;
case kGameTypeLostInTime:
_init = new Init_v3(this);
_video = new Video_v2(this);
_inter = new Inter_v3(this);
_mult = new Mult_v2(this);
_draw = new Draw_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(), SaveLoad_v3::kScreenshotTypeLost);
break;
case kGameTypeWoodruff:
_init = new Init_v4(this);
_video = new Video_v2(this);
_inter = new Inter_v4(this);
_mult = new Mult_v2(this);
_draw = new Draw_v2(this);
_map = new Map_v2(this);
_goblin = new Goblin_v4(this);
_scenery = new Scenery_v2(this);
_saveLoad = new SaveLoad_v4(this, _targetName.c_str());
break;
case kGameTypeDynasty:
case kGameTypeDynastyWood:
_init = new Init_v3(this);
_video = new Video_v2(this);
_inter = new Inter_v5(this);
_mult = new Mult_v2(this);
_draw = new Draw_v2(this);
_map = new Map_v2(this);
_goblin = new Goblin_v4(this);
_scenery = new Scenery_v2(this);
_saveLoad = new SaveLoad(this);
break;
case kGameTypeUrban:
_init = new Init_v6(this);
_video = new Video_v6(this);
_inter = new Inter_v6(this);
_mult = new Mult_v2(this);
_draw = new Draw_v2(this);
_map = new Map_v2(this);
_goblin = new Goblin_v4(this);
_scenery = new Scenery_v2(this);
_saveLoad = new SaveLoad_v6(this, _targetName.c_str());
break;
case kGameTypePlaytoons:
case kGameTypeBambou:
_init = new Init_v2(this);
_video = new Video_v6(this);
_inter = new Inter_Playtoons(this);
_mult = new Mult_v2(this);
_draw = new Draw_Playtoons(this);
_map = new Map_v2(this);
_goblin = new Goblin_v4(this);
_scenery = new Scenery_v2(this);
_saveLoad = new SaveLoad_Playtoons(this, _targetName.c_str());
break;
case kGameTypeAdibou2:
case kGameTypeAdi4:
_init = new Init_v7(this);
_video = new Video_v6(this);
_inter = new Inter_v7(this);
_mult = new Mult_v2(this);
_draw = new Draw_v7(this);
_map = new Map_v2(this);
_goblin = new Goblin_v7(this);
_scenery = new Scenery_v2(this);
_saveLoad = new SaveLoad_v7(this, _targetName.c_str());
break;
case kGameTypeAdibou1:
case kGameTypeAdi2:
_init = new Init_v2(this);
_video = new Video_v2(this);
_inter = new Inter_Adibou1(this);
_mult = new Mult_v2(this);
_draw = new Draw_v2(this);
_map = new Map_v2(this);
_goblin = new Goblin_v2(this);
_scenery = new Scenery_v2(this);
_saveLoad = new SaveLoad_Adibou1(this, _targetName.c_str());
break;
case kGameTypeAbracadabra:
_init = new Init_v2(this);
_video = new Video_v2(this);
_mult = new Mult_v2(this);
_draw = new Draw_v2(this);
_map = new Map_v2(this);
_goblin = new Goblin_v2(this);
_scenery = new Scenery_v2(this);
_preGob = new OnceUpon::Abracadabra(this);
break;
case kGameTypeBabaYaga:
_init = new Init_v2(this);
_video = new Video_v2(this);
_mult = new Mult_v2(this);
_draw = new Draw_v2(this);
_map = new Map_v2(this);
_goblin = new Goblin_v2(this);
_scenery = new Scenery_v2(this);
_preGob = new OnceUpon::BabaYaga(this);
break;
default:
deinitGameParts();
return Common::kUnsupportedGameidError;
}
// Setup mixer
syncSoundSettings();
if (_inter)
_inter->setupOpcodes();
return Common::kNoError;
}
void GobEngine::deinitGameParts() {
delete _preGob; _preGob = nullptr;
delete _saveLoad; _saveLoad = nullptr;
delete _mult; _mult = nullptr;
delete _vidPlayer; _vidPlayer = nullptr;
delete _game; _game = nullptr;
delete _global; _global = nullptr;
delete _goblin; _goblin = nullptr;
delete _init; _init = nullptr;
delete _inter; _inter = nullptr;
delete _map; _map = nullptr;
delete _palAnim; _palAnim = nullptr;
delete _scenery; _scenery = nullptr;
delete _draw; _draw = nullptr;
delete _util; _util = nullptr;
delete _video; _video = nullptr;
delete _sound; _sound = nullptr;
delete _dataIO; _dataIO = nullptr;
}
Common::Error GobEngine::initGraphics() {
if (is800x600()) {
warning("GobEngine::initGraphics(): 800x600 games currently unsupported");
return Common::kUnsupportedGameidError;
} else if (is640x480()) {
_width = 640;
_height = 480;
_mode = 0x18;
} else if (is640x400()) {
_width = 640;
_height = 400;
_mode = 0x18;
} else {
_width = 320;
_height = 200;
_mode = 0x14;
}
Graphics::ModeList modes;
modes.push_back(Graphics::Mode(_width, _height));
if (getGameType() == kGameTypeLostInTime) {
modes.push_back(Graphics::Mode(640, 400));
}
initGraphicsModes(modes);
_video->setSize();
_pixelFormat = g_system->getScreenFormat();
_video->_surfWidth = _width;
_video->_surfHeight = _height;
_video->_splitHeight1 = _height;
_global->_mouseMaxX = _width;
_global->_mouseMaxY = _height;
_global->_primarySurfDesc = SurfacePtr(new Surface(_width, _height, _pixelFormat.bytesPerPixel));
return Common::kNoError;
}
} // End of namespace Gob

290
engines/gob/gob.h Normal file
View File

@@ -0,0 +1,290 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_GOB_H
#define GOB_GOB_H
#include "common/random.h"
#include "common/system.h"
#include "common/text-to-speech.h"
#include "graphics/pixelformat.h"
#include "engines/engine.h"
#include "gob/console.h"
#include "gob/detection/detection.h"
/**
* This is the namespace of the Gob engine.
*
* Status of this engine: Supported
*
* Games using this engine:
* - Adi 1
* - Adi 2
* - Adi 4
* - Adi 5
* - Adibou 1
* - Adibou 2
* - Adibou 3
* - Adibou présente Cuisine
* - Adibou présente Dessin
* - Adibou présente Magie
* - Adiboud'chou a la mer
* - Adiboud'chou sur la banquise
* - Adiboud'chou a la campagne
* - Adiboud'chou dans la jungle et la savane
* - English Fever
* - Gobliiins
* - Gobliins 2
* - Goblins 3
* - Ween: The Prophecy
* - Bargon Attack
* - Le pays des Pierres Magiques
* - Lost in Time
* - Nathan Vacances CM1/CE2
* - The Bizarre Adventures of Woodruff and the Schnibble
* - Fascination
* - Inca II: Nations of Immortality
* - Urban Runner
* - Bambou le sauveur de la jungle
* - Playtoons 1 Uncle Archibald
* - Playtoons 2 The Case of the Counterfeit Collaborator (Spirou)
* - Playtoons 3 The Secret of the Castle
* - Playtoons 4 The Mandarin Prince
* - Playtoons 5 The Stone of Wakan
* - Playtoons Construction Kit 1 Monsters
* - Playtoons Construction Kit 2 Knights
* - Playtoons Construction Kit 3 The Far West
* - Geisha
* - Once Upon A Time: Abracadabra
* - Once Upon A Time: Baba Yaga
* - Once Upon A Time: Little Red Riding Hood
* - Croustibat
*/
class GobMetaEngine;
namespace Gob {
class Game;
class Sound;
class Video;
class Global;
class Draw;
class DataIO;
class Goblin;
class VideoPlayer;
class Init;
class Inter;
class Map;
class Mult;
class PalAnim;
class Scenery;
class Util;
class SaveLoad;
class PreGob;
#define WRITE_VAR_UINT32(var, val) _vm->_inter->_variables->writeVar32(var, val)
#define WRITE_VAR_UINT16(var, val) _vm->_inter->_variables->writeVar16(var, val)
#define WRITE_VAR_UINT8(var, val) _vm->_inter->_variables->writeVar8(var, val)
#define WRITE_VAR_STR(var, str) _vm->_inter->_variables->writeVarString(var, str)
#define WRITE_VARO_UINT32(off, val) _vm->_inter->_variables->writeOff32(off, val)
#define WRITE_VARO_UINT16(off, val) _vm->_inter->_variables->writeOff16(off, val)
#define WRITE_VARO_UINT8(off, val) _vm->_inter->_variables->writeOff8(off, val)
#define WRITE_VARO_STR(off, str) _vm->_inter->_variables->writeOffString(off, str)
#define READ_VAR_UINT32(var) _vm->_inter->_variables->readVar32(var)
#define READ_VAR_UINT16(var) _vm->_inter->_variables->readVar16(var)
#define READ_VAR_UINT8(var) _vm->_inter->_variables->readVar8(var)
#define READ_VARO_UINT32(off) _vm->_inter->_variables->readOff32(off)
#define READ_VARO_UINT16(off) _vm->_inter->_variables->readOff16(off)
#define READ_VARO_UINT8(off) _vm->_inter->_variables->readOff8(off)
#define GET_VAR_STR(var) _vm->_inter->_variables->getAddressVarString(var)
#define GET_VARO_STR(off) _vm->_inter->_variables->getAddressOffString(off)
#define GET_VAR_FSTR(var) _vm->_inter->_variables->getAddressVarString(var)
#define GET_VARO_FSTR(off) _vm->_inter->_variables->getAddressOffString(off)
#define WRITE_VAR_OFFSET(off, val) WRITE_VARO_UINT32((off), (val))
#define WRITE_VAR(var, val) WRITE_VAR_UINT32((var), (val))
#define VAR_OFFSET(off) READ_VARO_UINT32(off)
#define VAR(var) READ_VAR_UINT32(var)
// WARNING: Reordering these will invalidate save games!
enum Endianness {
kEndiannessLE,
kEndiannessBE
};
enum EndiannessMethod {
kEndiannessMethodLE, ///< Always little endian.
kEndiannessMethodBE, ///< Always big endian.
kEndiannessMethodSystem, ///< Follows system endianness.
kEndiannessMethodAltFile ///< Different endianness in alternate file.
};
enum {
kDebugFuncOp = 1,
kDebugDrawOp,
kDebugGobOp,
kDebugSound,
kDebugExpression,
kDebugGameFlow,
kDebugFileIO,
kDebugSaveLoad,
kDebugGraphics,
kDebugVideo,
kDebugHotspots,
kDebugDemo,
};
class GobEngine : public Engine {
private:
GameType _gameType;
int32 _features;
Common::Platform _platform;
const char *_extra;
EndiannessMethod _endiannessMethod;
uint32 _pauseStart;
// Engine APIs
Common::Error run() override;
bool hasFeature(EngineFeature f) const override;
void pauseEngineIntern(bool pause) override;
void syncSoundSettings() override;
Common::Error initGameParts();
Common::Error initGraphics();
void deinitGameParts();
public:
static const Common::Language _gobToScummVMLang[];
Common::RandomSource _rnd;
Common::Language _language;
uint16 _width;
uint16 _height;
uint8 _mode;
Graphics::PixelFormat _pixelFormat;
Common::String _startStk;
Common::String _startTot;
uint32 _demoIndex;
bool _copyProtection;
bool _noMusic;
GobConsole *_console;
bool _resourceSizeWorkaround;
bool _enableAdibou2FreeBananasWorkaround;
bool _enableAdibou2FlowersInfiniteLoopWorkaround;
Global *_global;
Util *_util;
DataIO *_dataIO;
Game *_game;
Sound *_sound;
Video *_video;
Draw *_draw;
Goblin *_goblin;
Init *_init;
Map *_map;
Mult *_mult;
PalAnim *_palAnim;
Scenery *_scenery;
Inter *_inter;
SaveLoad *_saveLoad;
VideoPlayer *_vidPlayer;
PreGob *_preGob;
#ifdef USE_TTS
bool _weenVoiceNotepad;
Common::CodePage _ttsEncoding;
#endif
const char *getLangDesc(int16 language) const;
void validateLanguage();
void validateVideoMode(int16 videoMode);
void pauseGame();
#ifdef USE_TTS
void sayText(const Common::String &text, Common::TextToSpeechManager::Action action = Common::TextToSpeechManager::INTERRUPT) const;
void stopTextToSpeech() const;
#endif
EndiannessMethod getEndiannessMethod() const;
Endianness getEndianness() const;
Common::Platform getPlatform() const;
GameType getGameType() const;
bool isCD() const;
bool isEGA() const;
bool hasAdLib() const;
bool isSCNDemo() const;
bool isBATDemo() const;
bool is640x400() const;
bool is640x480() const;
bool is800x600() const;
bool is16Colors() const;
bool isTrueColor() const;
bool isDemo() const;
bool hasResourceSizeWorkaround() const;
bool isCurrentTot(const Common::String &tot) const;
void setTrueColor(bool trueColor, bool convertAllSurfaces, Graphics::PixelFormat *format = nullptr);
const Graphics::PixelFormat &getPixelFormat() const;
GobEngine(OSystem *syst);
~GobEngine() override;
void initGame(const GOBGameDescription *gd);
GameType getGameType(const char *gameId) const;
bool gameTypeHasAddOns() const override;
bool dirCanBeGameAddOn(const Common::FSDirectory &dir) const override;
bool dirMustBeGameAddOn(const Common::FSDirectory &dir) const override;
/**
* Used to obtain the game version as a fallback
* from our detection tables, if the VERSION file
* is missing
*/
const char *getGameVersion() const;
};
} // End of namespace Gob
#endif // GOB_GOB_H

1930
engines/gob/goblin.cpp Normal file

File diff suppressed because it is too large Load Diff

353
engines/gob/goblin.h Normal file
View File

@@ -0,0 +1,353 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_GOBLIN_H
#define GOB_GOBLIN_H
#include "gob/util.h"
#include "gob/mult.h"
#include "gob/variables.h"
#include "gob/sound/sounddesc.h"
namespace Gob {
#define TYPE_USUAL 0
#define TYPE_AMORPHOUS 1
#define TYPE_MOBILE 3
class Goblin {
public:
#include "common/pack-start.h" // START STRUCT PACKING
struct Gob_State {
int16 animation;
int16 layer;
int16 unk0;
int16 unk1;
int16 sndItem; // high/low byte - sound sample index
int16 freq; // high/low byte * 100 - frequency
int16 repCount; // high/low byte - repeat count
int16 sndFrame;
} PACKED_STRUCT;
typedef Gob_State *Gob_PState;
typedef Gob_PState Gob_StateLine[6];
struct Gob_Object {
int16 animation;
int16 state;
int16 stateColumn;
int16 curFrame;
int16 xPos;
int16 yPos;
int16 dirtyLeft;
int16 dirtyTop;
int16 dirtyRight;
int16 dirtyBottom;
int16 left;
int16 top;
int16 right;
int16 bottom;
int16 nextState;
int16 multState;
int16 actionStartState;
int16 curLookDir;
int16 pickable;
int16 relaxTime;
Gob_StateLine *stateMach;
Gob_StateLine *realStateMach;
char doAnim;
int8 order;
char noTick;
char toRedraw;
char type;
char maxTick;
char tick;
char multObjIndex;
char unk14;
char visible;
} PACKED_STRUCT;
struct Gob_Pos {
char x;
char y;
} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Gob_Object *_goblins[4];
int16 _currentGoblin;
SoundDesc _soundData[16];
int16 _gobStateLayer;
char _goesAtTarget;
char _readyToAct;
int16 _gobAction; // 0 - move, 3 - do action, 4 - pick
// goblins: 0 - picker, 1 - fighter, 2 - mage
Gob_Pos _gobPositions[3];
int16 _gobDestX;
int16 _gobDestY;
int16 _pressedMapX;
int16 _pressedMapY;
char _pathExistence;
// Pointers to interpreter variables
VariableReference _some0ValPtr;
VariableReference _gobRetVarPtr;
VariableReference _curGobVarPtr;
VariableReference _curGobXPosVarPtr;
VariableReference _curGobYPosVarPtr;
VariableReference _itemInPocketVarPtr;
VariableReference _curGobStateVarPtr;
VariableReference _curGobFrameVarPtr;
VariableReference _curGobMultStateVarPtr;
VariableReference _curGobNextStateVarPtr;
VariableReference _curGobScrXVarPtr;
VariableReference _curGobScrYVarPtr;
VariableReference _curGobLeftVarPtr;
VariableReference _curGobTopVarPtr;
VariableReference _curGobRightVarPtr;
VariableReference _curGobBottomVarPtr;
VariableReference _curGobDoAnimVarPtr;
VariableReference _curGobOrderVarPtr;
VariableReference _curGobNoTickVarPtr;
VariableReference _curGobTypeVarPtr;
VariableReference _curGobMaxTickVarPtr;
VariableReference _curGobTickVarPtr;
VariableReference _curGobActStartStateVarPtr;
VariableReference _curGobLookDirVarPtr;
VariableReference _curGobPickableVarPtr;
VariableReference _curGobRelaxVarPtr;
VariableReference _curGobMaxFrameVarPtr;
VariableReference _destItemStateVarPtr;
VariableReference _destItemFrameVarPtr;
VariableReference _destItemMultStateVarPtr;
VariableReference _destItemNextStateVarPtr;
VariableReference _destItemScrXVarPtr;
VariableReference _destItemScrYVarPtr;
VariableReference _destItemLeftVarPtr;
VariableReference _destItemTopVarPtr;
VariableReference _destItemRightVarPtr;
VariableReference _destItemBottomVarPtr;
VariableReference _destItemDoAnimVarPtr;
VariableReference _destItemOrderVarPtr;
VariableReference _destItemNoTickVarPtr;
VariableReference _destItemTypeVarPtr;
VariableReference _destItemMaxTickVarPtr;
VariableReference _destItemTickVarPtr;
VariableReference _destItemActStartStVarPtr;
VariableReference _destItemLookDirVarPtr;
VariableReference _destItemPickableVarPtr;
VariableReference _destItemRelaxVarPtr;
VariableReference _destItemMaxFrameVarPtr;
int16 _destItemType;
int16 _destItemState;
int16 _itemToObject[20];
Gob_Object *_objects[20];
int16 _objCount;
int16 _gobsCount;
int16 _itemIndInPocket;
int16 _itemIdInPocket;
char _itemByteFlag;
int16 _destItemId;
int16 _destActionItem;
Gob_Object *_actDestItemDesc;
int16 _forceNextState[10];
char _boreCounter;
int16 _positionedGob;
char _noPick;
// Gob2:
int16 _soundSlotsCount;
int16 _soundSlots[60];
bool _gob1Busy;
bool _gob2Busy;
int16 _gob1RelaxTimeVar;
int16 _gob2RelaxTimeVar;
bool _gob1NoTurn;
bool _gob2NoTurn;
// Functions
char rotateState(int16 from, int16 to);
void playSound(SoundDesc &snd, int16 repCount, int16 freq);
void drawObjects();
void animateObjects();
int16 getObjMaxFrame(Gob_Object * obj);
bool objIntersected(Gob_Object * obj1, Gob_Object * obj2);
void setMultStates(Gob_Object * gobDesc);
int16 nextLayer(Gob_Object * gobDesc);
void showBoredom(int16 gobIndex);
void switchGoblin(int16 index);
void zeroObjects();
void freeAllObjects();
void loadObjects(const char *source);
void initVarPointers();
void saveGobDataToVars(int16 xPos, int16 yPos, int16 someVal);
void loadGobDataFromVars();
void pickItem(int16 indexToPocket, int16 idToPocket);
void placeItem(int16 indexInPocket, int16 idInPocket);
void swapItems(int16 indexToPick, int16 idToPick);
void treatItemPick(int16 itemId);
int16 treatItem(int16 action);
int16 doMove(Gob_Object *gobDesc, int16 cont, int16 action);
void setState(int16 index, int16 state);
void updateLayer1(Mult::Mult_AnimData *animData);
void updateLayer2(Mult::Mult_AnimData *animData);
void move(int16 destX, int16 destY, int16 objIndex);
void animate(Mult::Mult_Object *obj);
virtual void handleGoblins() = 0;
virtual void placeObject(Gob_Object * objDesc, char animated,
int16 index, int16 x, int16 y, int16 state) = 0;
virtual void freeObjects() = 0;
virtual void initiateMove(Mult::Mult_Object *obj) = 0;
virtual void moveAdvance(Mult::Mult_Object *obj, Gob_Object *gobDesc,
int16 nextAct, int16 framesCount) = 0;
virtual void setGoblinState(Mult::Mult_Object *obj, int16 animState);
Goblin(GobEngine *vm);
virtual ~Goblin();
protected:
Util::List *_objList;
int16 _rotStates[4][4];
GobEngine *_vm;
int16 peekGoblin(Gob_Object *curGob);
void initList();
void sortByOrder(Util::List *list);
void adjustDest(int16 posX, int16 posY);
void adjustTarget();
void targetDummyItem(Gob_Object *gobDesc);
void targetItem();
void moveFindItem(int16 posX, int16 posY);
void moveCheckSelect(int16 framesCount, Gob_Object * gobDesc,
int16 *pGobIndex, int16 *nextAct);
void moveInitStep(int16 framesCount, int16 action, int16 cont,
Gob_Object *gobDesc, int16 *pGobIndex, int16 *pNextAct);
void moveTreatRopeStairs(Gob_Object *gobDesc);
void playSounds(Mult::Mult_Object *obj);
virtual bool isMovement(int8 state) = 0;
virtual void advMovement(Mult::Mult_Object *obj, int8 state) = 0;
virtual void movePathFind(Mult::Mult_Object *obj,
Gob_Object *gobDesc, int16 nextAct) = 0;
};
class Goblin_v1 : public Goblin {
public:
void handleGoblins() override {}
void placeObject(Gob_Object * objDesc, char animated,
int16 index, int16 x, int16 y, int16 state) override;
void freeObjects() override;
void initiateMove(Mult::Mult_Object *obj) override;
void moveAdvance(Mult::Mult_Object *obj, Gob_Object *gobDesc,
int16 nextAct, int16 framesCount) override;
Goblin_v1(GobEngine *vm);
~Goblin_v1() override {}
protected:
bool isMovement(int8 state) override { return false; }
void advMovement(Mult::Mult_Object *obj, int8 state) override {}
void movePathFind(Mult::Mult_Object *obj,
Gob_Object *gobDesc, int16 nextAct) override;
};
class Goblin_v2 : public Goblin_v1 {
public:
void handleGoblins() override;
void placeObject(Gob_Object * objDesc, char animated,
int16 index, int16 x, int16 y, int16 state) override;
void freeObjects() override;
void initiateMove(Mult::Mult_Object *obj) override;
void moveAdvance(Mult::Mult_Object *obj, Gob_Object *gobDesc,
int16 nextAct, int16 framesCount) override;
Goblin_v2(GobEngine *vm);
~Goblin_v2() override {}
protected:
bool isMovement(int8 state) override;
void advMovement(Mult::Mult_Object *obj, int8 state) override;
void movePathFind(Mult::Mult_Object *obj,
Gob_Object *gobDesc, int16 nextAct) override;
};
class Goblin_v3 : public Goblin_v2 {
public:
void placeObject(Gob_Object * objDesc, char animated,
int16 index, int16 x, int16 y, int16 state) override;
Goblin_v3(GobEngine *vm);
~Goblin_v3() override {}
protected:
bool isMovement(int8 state) override;
void advMovement(Mult::Mult_Object *obj, int8 state) override;
};
class Goblin_v4 : public Goblin_v3 {
public:
void movePathFind(Mult::Mult_Object *obj,
Gob_Object *gobDesc, int16 nextAct) override;
void moveAdvance(Mult::Mult_Object *obj, Gob_Object *gobDesc,
int16 nextAct, int16 framesCount) override;
Goblin_v4(GobEngine *vm);
~Goblin_v4() override {}
private:
int16 turnState(int16 state, uint16 dir);
};
class Goblin_v7 : public Goblin_v4 {
public:
Goblin_v7(GobEngine *vm);
~Goblin_v7() override {}
void initiateMove(Mult::Mult_Object *obj) override;
void setGoblinState(Mult::Mult_Object *obj, int16 animState) override;
private:
int32 computeObjNextDirection(Mult::Mult_Object &obj);
int32 findPath(int8 x, int8 y, int8 destX, int8 destY);
bool directionWalkable(int8 x, int8 y, int8 direction);
int32 bestWalkableDirectionFromOriginAndDest(int8 x, int8 y, int8 destX, int8 destY);
};
} // End of namespace Gob
#endif // GOB_GOBLIN_H

724
engines/gob/goblin_v1.cpp Normal file
View File

@@ -0,0 +1,724 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "gob/gob.h"
#include "gob/goblin.h"
#include "gob/util.h"
#include "gob/map.h"
#include "gob/mult.h"
#include "gob/scenery.h"
#include "gob/sound/sound.h"
namespace Gob {
Goblin_v1::Goblin_v1(GobEngine *vm) : Goblin(vm) {
_rotStates[0][0] = 0; _rotStates[0][1] = 22; _rotStates[0][2] = 23; _rotStates[0][3] = 24;
_rotStates[1][0] = 13; _rotStates[1][1] = 2; _rotStates[1][2] = 12; _rotStates[1][3] = 14;
_rotStates[2][0] = 16; _rotStates[2][1] = 15; _rotStates[2][2] = 4; _rotStates[2][3] = 17;
_rotStates[3][0] = 27; _rotStates[3][1] = 25; _rotStates[3][2] = 26; _rotStates[3][3] = 6;
}
void Goblin_v1::freeObjects() {
int16 state;
int16 col;
for (int i = 0; i < 16; i++)
_vm->_sound->sampleFree(&_soundData[i]);
for (int i = 0; i < 4; i++) {
if (_goblins[i] == nullptr)
continue;
_goblins[i]->stateMach = _goblins[i]->realStateMach;
for (state = 0; state < 40; state++) {
for (col = 0; col < 6; col++) {
delete _goblins[i]->stateMach[state][col];
_goblins[i]->stateMach[state][col] = nullptr;
}
}
if (i == 3) {
for (state = 40; state < 70; state++) {
delete _goblins[3]->stateMach[state][0];
_goblins[3]->stateMach[state][0] = nullptr;
}
}
delete[] _goblins[i]->stateMach;
delete _goblins[i];
_goblins[i] = nullptr;
}
for (int i = 0; i < 20; i++) {
if (_objects[i] == nullptr)
continue;
_objects[i]->stateMach = _objects[i]->realStateMach;
for (state = 0; state < 40; state++) {
for (col = 0; col < 6; col++) {
delete _objects[i]->stateMach[state][col];
_objects[i]->stateMach[state][col] = nullptr;
}
}
delete[] _objects[i]->stateMach;
delete _objects[i];
_objects[i] = nullptr;
}
}
void Goblin_v1::placeObject(Gob_Object *objDesc, char animated,
int16 index, int16 x, int16 y, int16 state) {
int16 layer;
if (objDesc->stateMach[objDesc->state][0] != nullptr) {
objDesc->animation = objDesc->stateMach[objDesc->state][0]->animation;
objDesc->noTick = 0;
objDesc->toRedraw = 1;
objDesc->doAnim = animated;
objDesc->maxTick = 1;
objDesc->tick = 1;
objDesc->curFrame = 0;
objDesc->type = 0;
objDesc->actionStartState = 0;
objDesc->nextState = -1;
objDesc->multState = -1;
objDesc->stateColumn = 0;
objDesc->curLookDir = 0;
objDesc->visible = 1;
objDesc->pickable = 0;
objDesc->unk14 = 0;
objDesc->relaxTime = _vm->_util->getRandom(30);
layer = objDesc->stateMach[objDesc->state][0]->layer;
_vm->_scenery->updateAnim(layer, 0, objDesc->animation, 0,
objDesc->xPos, objDesc->yPos, 0);
objDesc->order = _vm->_scenery->_toRedrawBottom / 24 + 3;
objDesc->left = objDesc->xPos;
objDesc->right = objDesc->xPos;
objDesc->dirtyLeft = objDesc->xPos;
objDesc->dirtyRight = objDesc->xPos;
objDesc->top = objDesc->yPos;
objDesc->bottom = objDesc->yPos;
objDesc->dirtyTop = objDesc->yPos;
objDesc->dirtyBottom = objDesc->yPos;
_vm->_util->listInsertBack(_objList, objDesc);
}
}
void Goblin_v1::initiateMove(Mult::Mult_Object *obj) {
_vm->_map->findNearestToDest(nullptr);
_vm->_map->findNearestToGob(nullptr);
_vm->_map->optimizePoints(nullptr, 0, 0);
_pathExistence = _vm->_map->checkDirectPath(nullptr,
_vm->_map->_curGoblinX, _vm->_map->_curGoblinY,
_pressedMapX, _pressedMapY);
if (_pathExistence == 3) {
if (_vm->_map->checkLongPath(_vm->_map->_curGoblinX, _vm->_map->_curGoblinY,
_pressedMapX, _pressedMapY,
_vm->_map->_nearestWayPoint, _vm->_map->_nearestDest) == 0) {
_pathExistence = 0;
} else {
const WayPoint &wayPoint = _vm->_map->getWayPoint(_vm->_map->_nearestWayPoint);
_vm->_map->_destX = wayPoint.x;
_vm->_map->_destY = wayPoint.y;
}
}
}
void Goblin_v1::movePathFind(Mult::Mult_Object *obj,
Gob_Object *gobDesc, int16 nextAct) {
if (_pathExistence == 1) {
_vm->_map->_curGoblinX = _gobPositions[_currentGoblin].x;
_vm->_map->_curGoblinY = _gobPositions[_currentGoblin].y;
if ((_vm->_map->_curGoblinX == _pressedMapX) &&
(_vm->_map->_curGoblinY == _pressedMapY) && (_gobAction != 0)) {
_readyToAct = 1;
_pathExistence = 0;
}
nextAct = (int16) _vm->_map->getDirection(_vm->_map->_curGoblinX,
_vm->_map->_curGoblinY, _vm->_map->_destX, _vm->_map->_destY);
if (nextAct == kDirNone)
_pathExistence = 0;
} else if (_pathExistence == 3) {
_vm->_map->_curGoblinX = _gobPositions[_currentGoblin].x;
_vm->_map->_curGoblinY = _gobPositions[_currentGoblin].y;
if ((_vm->_map->_curGoblinX == _gobDestX) &&
(_vm->_map->_curGoblinY == _gobDestY)) {
_pathExistence = 1;
_vm->_map->_destX = _pressedMapX;
_vm->_map->_destY = _pressedMapY;
} else {
if (_vm->_map->checkDirectPath(nullptr, _vm->_map->_curGoblinX,
_vm->_map->_curGoblinY, _gobDestX, _gobDestY) == 1) {
_vm->_map->_destX = _gobDestX;
_vm->_map->_destY = _gobDestY;
} else if ((_vm->_map->_curGoblinX == _vm->_map->_destX) &&
(_vm->_map->_curGoblinY == _vm->_map->_destY)) {
if (_vm->_map->_nearestWayPoint > _vm->_map->_nearestDest) {
_vm->_map->optimizePoints(nullptr, 0, 0);
const WayPoint &wayPoint = _vm->_map->getWayPoint(_vm->_map->_nearestWayPoint);
_vm->_map->_destX = wayPoint.x;
_vm->_map->_destY = wayPoint.y;
if (_vm->_map->_nearestWayPoint > _vm->_map->_nearestDest)
_vm->_map->_nearestWayPoint--;
} else if (_vm->_map->_nearestWayPoint < _vm->_map->_nearestDest) {
_vm->_map->optimizePoints(nullptr, 0, 0);
const WayPoint &wayPoint = _vm->_map->getWayPoint(_vm->_map->_nearestWayPoint);
_vm->_map->_destX = wayPoint.x;
_vm->_map->_destY = wayPoint.y;
if (_vm->_map->_nearestWayPoint < _vm->_map->_nearestDest)
_vm->_map->_nearestWayPoint++;
} else {
if ((_vm->_map->checkDirectPath(nullptr, _vm->_map->_curGoblinX,
_vm->_map->_curGoblinY, _gobDestX, _gobDestY) == 3) &&
(_vm->_map->getPass(_pressedMapX, _pressedMapY) != 0)) {
const WayPoint &wayPoint = _vm->_map->getWayPoint(_vm->_map->_nearestWayPoint);
_vm->_map->_destX = wayPoint.x;
_vm->_map->_destY = wayPoint.y;
} else {
_pathExistence = 1;
_vm->_map->_destX = _pressedMapX;
_vm->_map->_destY = _pressedMapY;
}
}
}
nextAct = (int16) _vm->_map->getDirection(_vm->_map->_curGoblinX,
_vm->_map->_curGoblinY, _vm->_map->_destX, _vm->_map->_destY);
}
}
if ((_readyToAct != 0) && ((_gobAction == 3) || (_gobAction == 4)))
nextAct = 0x4DC8;
switch (nextAct) {
case kDirW:
gobDesc->nextState = rotateState(gobDesc->curLookDir, 0);
break;
case kDirE:
gobDesc->nextState = rotateState(gobDesc->curLookDir, 4);
break;
case 16:
gobDesc->nextState = 16;
break;
case 23:
gobDesc->nextState = 23;
break;
case kDirN:
if ((_vm->_map->getPass(_vm->_map->_curGoblinX, _vm->_map->_curGoblinY - 1) == 6) &&
(_currentGoblin != 1)) {
_pathExistence = 0;
break;
}
if (_vm->_map->getPass(_vm->_map->_curGoblinX, _vm->_map->_curGoblinY) == 3) {
gobDesc->nextState = 8;
break;
}
if ((_vm->_map->getPass(_vm->_map->_curGoblinX, _vm->_map->_curGoblinY) == 6) &&
(_currentGoblin == 1)) {
gobDesc->nextState = 28;
break;
}
gobDesc->nextState = rotateState(gobDesc->curLookDir, 2);
break;
case kDirS:
if ((_vm->_map->getPass(_vm->_map->_curGoblinX, _vm->_map->_curGoblinY + 1) == 6) &&
(_currentGoblin != 1)) {
_pathExistence = 0;
break;
}
if (_vm->_map->getPass(_vm->_map->_curGoblinX, _vm->_map->_curGoblinY) == 3) {
gobDesc->nextState = 9;
break;
}
if ((_vm->_map->getPass(_vm->_map->_curGoblinX, _vm->_map->_curGoblinY) == 6) &&
(_currentGoblin == 1)) {
gobDesc->nextState = 29;
break;
}
gobDesc->nextState = rotateState(gobDesc->curLookDir, 6);
break;
case kDirSE:
if ((_vm->_map->getPass(_vm->_map->_curGoblinX + 1, _vm->_map->_curGoblinY + 1) == 6) &&
(_currentGoblin != 1)) {
_pathExistence = 0;
break;
}
gobDesc->nextState = 5;
if (gobDesc->curLookDir == 4)
break;
gobDesc->nextState = rotateState(gobDesc->curLookDir, 4);
break;
case kDirSW:
if ((_vm->_map->getPass(_vm->_map->_curGoblinX - 1, _vm->_map->_curGoblinY + 1) == 6) &&
(_currentGoblin != 1)) {
_pathExistence = 0;
break;
}
gobDesc->nextState = 7;
if (gobDesc->curLookDir == 0)
break;
gobDesc->nextState = rotateState(gobDesc->curLookDir, 0);
break;
case kDirNW:
if ((_vm->_map->getPass(_vm->_map->_curGoblinX - 1, _vm->_map->_curGoblinY - 1) == 6) &&
(_currentGoblin != 1)) {
_pathExistence = 0;
break;
}
gobDesc->nextState = 1;
if (gobDesc->curLookDir == 0)
break;
gobDesc->nextState = rotateState(gobDesc->curLookDir, 0);
break;
case kDirNE:
if ((_vm->_map->getPass(_vm->_map->_curGoblinX + 1, _vm->_map->_curGoblinY - 1) == 6) &&
(_currentGoblin != 1)) {
_pathExistence = 0;
break;
}
gobDesc->nextState = 3;
if (gobDesc->curLookDir == 4)
break;
gobDesc->nextState = rotateState(gobDesc->curLookDir, 4);
break;
case 0x4DC8:
if ((_currentGoblin == 0) && (_gobAction == 3) &&
(_itemIndInPocket == -1)) {
_destItemId = -1;
_readyToAct = 0;
break;
}
if ((_currentGoblin == 0) && (_gobAction == 4) &&
(_itemIndInPocket == -1) && (_destActionItem == 0)) {
gobDesc->multState = 104;
_destItemId = -1;
_readyToAct = 0;
break;
}
if ((_currentGoblin == 0) && (_gobAction == 4) &&
(_itemIndInPocket == -1 && _destActionItem != 0) &&
(_itemToObject[_destActionItem] != -1) &&
(_objects[_itemToObject[_destActionItem]]->pickable == 0)) {
gobDesc->multState = 104;
_destItemId = -1;
_readyToAct = 0;
break;
}
switch (_vm->_map->_itemPoses[_destActionItem].orient) {
case 0:
case -4:
gobDesc->nextState = 10;
gobDesc->curLookDir = 0;
_destItemId = -1;
break;
case -1:
case 4:
gobDesc->nextState = 11;
gobDesc->curLookDir = 4;
_destItemId = -1;
break;
default:
break;
}
break;
default:
if ((_vm->_map->getPass(_vm->_map->_curGoblinX, _vm->_map->_curGoblinY) == 3) ||
((_vm->_map->getPass(_vm->_map->_curGoblinX, _vm->_map->_curGoblinY) == 6)
&& (_currentGoblin == 1))) {
gobDesc->nextState = 20;
break;
}
switch (gobDesc->curLookDir) {
case 2:
case 4:
gobDesc->nextState = 18;
break;
case 6:
case 0:
gobDesc->nextState = 19;
break;
default:
break;
}
break;
}
return;
}
void Goblin_v1::moveAdvance(Mult::Mult_Object *obj, Gob_Object *gobDesc,
int16 nextAct, int16 framesCount) {
int16 i;
int16 newX;
int16 newY;
int16 flag;
movePathFind(nullptr, gobDesc, nextAct);
gobDesc->curFrame++;
if (gobDesc->curFrame == 1)
gobDesc->actionStartState = gobDesc->state;
if ((_goesAtTarget == 0) && (gobDesc->stateMach == gobDesc->realStateMach)) {
switch (gobDesc->state) {
case 0:
case 1:
case 7:
case 13:
case 16:
case 27:
gobDesc->curLookDir = 0;
break;
case 3:
case 4:
case 5:
case 12:
case 23:
case 26:
gobDesc->curLookDir = 4;
break;
case 28:
if (_currentGoblin != 1)
break;
gobDesc->curLookDir = 2;
break;
case 2:
case 8:
case 15:
case 22:
case 25:
gobDesc->curLookDir = 2;
break;
case 29:
if (_currentGoblin != 1)
break;
gobDesc->curLookDir = 6;
break;
case 6:
case 9:
case 14:
case 17:
case 24:
gobDesc->curLookDir = 6;
break;
default:
break;
}
}
if ((gobDesc->state >= 0) && (gobDesc->state < 10) &&
(gobDesc->stateMach == gobDesc->realStateMach) &&
((gobDesc->curFrame == 3) || (gobDesc->curFrame == 6))) {
_vm->_sound->speakerOn(10 * _vm->_util->getRandom(3) + 50, 5);
}
if ((_currentGoblin == 0) &&
(gobDesc->stateMach == gobDesc->realStateMach) &&
((gobDesc->state == 10) || (gobDesc->state == 11)) &&
(gobDesc->curFrame == 9)) {
_vm->_sound->blasterStop(0);
if (_itemIndInPocket != -1)
_vm->_sound->blasterPlay(&_soundData[14], 1, 9000);
else
_vm->_sound->blasterPlay(&_soundData[14], 1, 5000);
}
if (_boreCounter++ == 120) {
_boreCounter = 0;
for (i = 0; i < 3; i++)
showBoredom(i);
}
if ((gobDesc->multState != -1) && (gobDesc->curFrame == framesCount) &&
(gobDesc->state != gobDesc->multState)) {
gobDesc->nextState = gobDesc->multState;
gobDesc->multState = -1;
newX = _vm->_scenery->getAnimLayer(gobDesc->animation,
_gobStateLayer)->animDeltaX + gobDesc->xPos;
newY = _vm->_scenery->getAnimLayer(gobDesc->animation,
_gobStateLayer)->animDeltaY + gobDesc->yPos;
_gobStateLayer = nextLayer(gobDesc);
gobDesc->xPos = newX;
gobDesc->yPos = newY;
} else {
if ((gobDesc->curFrame == 3) &&
(gobDesc->stateMach == gobDesc->realStateMach) &&
((gobDesc->state < 10) ||
((_currentGoblin == 1) && ((gobDesc->state == 28) ||
(gobDesc->state == 29))))) {
flag = 0;
if (_forceNextState[0] != -1) {
gobDesc->nextState = _forceNextState[0];
for (i = 0; i < 9; i++)
_forceNextState[i] = _forceNextState[i + 1];
}
_vm->_map->_curGoblinX = _gobPositions[_currentGoblin].x;
_vm->_map->_curGoblinY = _gobPositions[_currentGoblin].y;
if (gobDesc->nextState != gobDesc->state) {
_gobStateLayer = nextLayer(gobDesc);
flag = 1;
}
switch (gobDesc->state) {
case 0:
_gobPositions[_currentGoblin].x--;
break;
case 2:
case 8:
_gobPositions[_currentGoblin].y--;
break;
case 4:
_gobPositions[_currentGoblin].x++;
break;
case 6:
case 9:
_gobPositions[_currentGoblin].y++;
break;
case 1:
_gobPositions[_currentGoblin].x--;
_gobPositions[_currentGoblin].y--;
break;
case 3:
_gobPositions[_currentGoblin].x++;
_gobPositions[_currentGoblin].y--;
break;
case 5:
_gobPositions[_currentGoblin].x++;
_gobPositions[_currentGoblin].y++;
break;
case 7:
_gobPositions[_currentGoblin].x--;
_gobPositions[_currentGoblin].y++;
break;
case 38:
_gobPositions[_currentGoblin].y++;
break;
default:
break;
}
if (_currentGoblin == 1) {
if (gobDesc->state == 28)
_gobPositions[1].y--;
if (gobDesc->state == 29)
_gobPositions[1].y++;
}
if (flag != 0) {
_vm->_scenery->updateAnim(_gobStateLayer, 0,
gobDesc->animation, 0, gobDesc->xPos, gobDesc->yPos, 0);
gobDesc->yPos =
(_vm->_map->_curGoblinY + 1) * 6 -
(_vm->_scenery->_toRedrawBottom - _vm->_scenery->_animTop);
gobDesc->xPos =
_vm->_map->_curGoblinX * 12 - (_vm->_scenery->_toRedrawLeft -
_vm->_scenery->_animLeft);
}
if (((gobDesc->state == 10) || (gobDesc->state == 11)) &&
(_currentGoblin != 0))
_goesAtTarget = 1;
}
if (gobDesc->curFrame != framesCount)
return;
if (_forceNextState[0] != -1) {
gobDesc->nextState = _forceNextState[0];
for (i = 0; i < 9; i++)
_forceNextState[i] = _forceNextState[i + 1];
}
_vm->_map->_curGoblinX = _gobPositions[_currentGoblin].x;
_vm->_map->_curGoblinY = _gobPositions[_currentGoblin].y;
_gobStateLayer = nextLayer(gobDesc);
if (gobDesc->stateMach == gobDesc->realStateMach) {
switch (gobDesc->nextState) {
case 0:
_gobPositions[_currentGoblin].x--;
break;
case 2:
case 8:
_gobPositions[_currentGoblin].y--;
break;
case 4:
_gobPositions[_currentGoblin].x++;
break;
case 6:
case 9:
_gobPositions[_currentGoblin].y++;
break;
case 1:
_gobPositions[_currentGoblin].x--;
_gobPositions[_currentGoblin].y--;
break;
case 3:
_gobPositions[_currentGoblin].x++;
_gobPositions[_currentGoblin].y--;
break;
case 5:
_gobPositions[_currentGoblin].x++;
_gobPositions[_currentGoblin].y++;
break;
case 7:
_gobPositions[_currentGoblin].x--;
_gobPositions[_currentGoblin].y++;
break;
case 38:
_gobPositions[_currentGoblin].y++;
break;
default:
break;
}
if (_currentGoblin == 1) {
if (gobDesc->nextState == 28)
_gobPositions[1].y--;
if (gobDesc->nextState == 29)
_gobPositions[1].y++;
}
}
_vm->_scenery->updateAnim(_gobStateLayer, 0, gobDesc->animation, 0,
gobDesc->xPos, gobDesc->yPos, 0);
gobDesc->yPos =
(_vm->_map->_curGoblinY + 1) * 6 - (_vm->_scenery->_toRedrawBottom -
_vm->_scenery->_animTop);
gobDesc->xPos =
_vm->_map->_curGoblinX * 12 -
(_vm->_scenery->_toRedrawLeft - _vm->_scenery->_animLeft);
if (((gobDesc->state == 10) || (gobDesc->state == 11)) &&
(_currentGoblin != 0))
_goesAtTarget = 1;
}
return;
}
} // End of namespace Gob

728
engines/gob/goblin_v2.cpp Normal file
View File

@@ -0,0 +1,728 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "gob/gob.h"
#include "gob/goblin.h"
#include "gob/global.h"
#include "gob/util.h"
#include "gob/game.h"
#include "gob/map.h"
#include "gob/mult.h"
#include "gob/scenery.h"
#include "gob/inter.h"
namespace Gob {
Goblin_v2::Goblin_v2(GobEngine *vm) : Goblin_v1(vm) {
_gobsCount = -1;
_rotStates[0][0] = 0; _rotStates[0][1] = 18; _rotStates[0][2] = 19; _rotStates[0][3] = 20;
_rotStates[1][0] = 13; _rotStates[1][1] = 2; _rotStates[1][2] = 12; _rotStates[1][3] = 14;
_rotStates[2][0] = 16; _rotStates[2][1] = 15; _rotStates[2][2] = 4; _rotStates[2][3] = 17;
_rotStates[3][0] = 23; _rotStates[3][1] = 21; _rotStates[3][2] = 22; _rotStates[3][3] = 6;
}
void Goblin_v2::freeObjects() {
_vm->_map->_usesObliqueCoordinates = false;
if (_gobsCount < 0)
return;
for (int i = 0; i < _gobsCount; i++) {
delete[] _vm->_mult->_objects[i].goblinStates[0];
delete[] _vm->_mult->_objects[i].goblinStates;
}
for (int i = 0; i < _soundSlotsCount; i++)
if ((_soundSlots[i] & 0x8000) == 0)
_vm->_game->freeSoundSlot(_soundSlots[i]);
_gobsCount = -1;
}
void Goblin_v2::placeObject(Gob_Object *objDesc, char animated,
int16 index, int16 x, int16 y, int16 state) {
Mult::Mult_Object *obj;
Mult::Mult_AnimData *objAnim;
int16 layer;
int16 animation;
obj = &_vm->_mult->_objects[index];
objAnim = obj->pAnimData;
obj->goblinX = x;
obj->goblinY = y;
objAnim->order = y;
if (state == -1) {
objAnim->frame = 0;
objAnim->isPaused = 0;
objAnim->isStatic = 0;
objAnim->newCycle = 0;
_vm->_scenery->updateAnim(objAnim->layer, 0, objAnim->animation, 0,
*obj->pPosX, *obj->pPosY, 0);
if (!_vm->_map->hasBigTiles())
*obj->pPosY = (y + 1) * _vm->_map->getTilesHeight()
- (_vm->_scenery->_animBottom - _vm->_scenery->_animTop);
else
*obj->pPosY = ((y + 1) * _vm->_map->getTilesHeight()) -
(_vm->_scenery->_animBottom - _vm->_scenery->_animTop) - (y + 1) / 2;
*obj->pPosX = x * _vm->_map->getTilesWidth();
} else {
if ((obj->goblinStates != nullptr) && (obj->goblinStates[state] != nullptr)) {
layer = obj->goblinStates[state][0].layer;
animation = obj->goblinStates[state][0].animation;
objAnim->state = state;
objAnim->layer = layer;
objAnim->animation = animation;
objAnim->frame = 0;
objAnim->isPaused = 0;
objAnim->isStatic = 0;
objAnim->newCycle = _vm->_scenery->getAnimLayer(animation, layer)->framesCount;
// WORKAROUND: In the brain level of Gob3, where Blount and Were-blount are
// separated, Blount may be declared as inactive and can't move when exiting
// and reentering the level - bug #5760.
// Change his animation type here to mark him as enabled
if (_vm->getGameType() == kGameTypeGob3 && _vm->isCurrentTot("EMAP1018.TOT") && index == 0 &&
x == 3 && y == 33 && state == 9 && layer == 27 && animation == 0 && objAnim->animType == 1)
objAnim->animType = 100;
_vm->_scenery->updateAnim(layer, 0, animation, 0, *obj->pPosX, *obj->pPosY, 0);
if (!_vm->_map->hasBigTiles())
*obj->pPosY = (y + 1) * _vm->_map->getTilesHeight()
- (_vm->_scenery->_animBottom - _vm->_scenery->_animTop);
else
*obj->pPosY = ((y + 1) * _vm->_map->getTilesHeight()) -
(_vm->_scenery->_animBottom - _vm->_scenery->_animTop) - (y + 1) / 2;
*obj->pPosX = x * _vm->_map->getTilesWidth();
initiateMove(obj);
} else
initiateMove(obj);
}
}
void Goblin_v2::initiateMove(Mult::Mult_Object *obj) {
obj->destX = obj->gobDestX;
obj->destY = obj->gobDestY;
_vm->_map->findNearestToDest(obj);
_vm->_map->findNearestToGob(obj);
_vm->_map->optimizePoints(obj, obj->goblinX, obj->goblinY);
obj->pAnimData->pathExistence = _vm->_map->checkDirectPath(obj,
obj->goblinX, obj->goblinY, obj->gobDestX, obj->gobDestY);
if (obj->pAnimData->pathExistence == 3) {
const WayPoint &wayPoint = _vm->_map->getWayPoint(obj->nearestWayPoint);
obj->destX = wayPoint.x;
obj->destY = wayPoint.y;
}
}
void Goblin_v2::movePathFind(Mult::Mult_Object *obj, Gob_Object *gobDesc, int16 nextAct) {
Mult::Mult_AnimData *animData = obj->pAnimData;
animData->newCycle = _vm->_scenery->getAnimLayer(animData->animation, animData->layer)->framesCount;
int16 gobX = obj->goblinX;
int16 gobY = obj->goblinY;
int16 destX = obj->destX;
int16 destY = obj->destY;
int16 gobDestX = obj->gobDestX;
int16 gobDestY = obj->gobDestY;
animData->destX = gobDestX;
animData->destY = gobDestY;
animData->order = gobY;
Direction dir = kDirNone;
if (animData->pathExistence == 1) {
dir = _vm->_map->getDirection(gobX, gobY, destX, destY);
if (dir == kDirNone)
animData->pathExistence = 0;
if ((gobX == gobDestX) && (gobY == gobDestY))
animData->pathExistence = 4;
} else if (animData->pathExistence == 3) {
if ((gobX != gobDestX) || (gobY != gobDestY)) {
if (_vm->_map->checkDirectPath(obj, gobX, gobY, gobDestX, gobDestY) != 1) {
if ((gobX == destX) && (gobY == destY)) {
if (obj->nearestWayPoint > obj->nearestDest) {
_vm->_map->optimizePoints(obj, gobX, gobY);
const WayPoint &wayPoint = _vm->_map->getWayPoint(obj->nearestWayPoint);
destX = wayPoint.x;
destY = wayPoint.y;
if (_vm->_map->checkDirectPath(obj, gobX, gobY, destX, destY) == 3) {
WRITE_VAR(56, 1);
animData->pathExistence = 0;
}
if (obj->nearestWayPoint > obj->nearestDest)
obj->nearestWayPoint--;
} else if (obj->nearestWayPoint < obj->nearestDest) {
_vm->_map->optimizePoints(obj, gobX, gobY);
const WayPoint &wayPoint = _vm->_map->getWayPoint(obj->nearestWayPoint);
destX = wayPoint.x;
destY = wayPoint.y;
if (_vm->_map->checkDirectPath(obj, gobX, gobY, destX, destY) == 3) {
WRITE_VAR(56, 1);
animData->pathExistence = 0;
}
if (obj->nearestWayPoint < obj->nearestDest)
obj->nearestWayPoint++;
} else {
if ((_vm->_map->checkDirectPath(obj, gobX, gobY, gobDestX, gobDestY) == 3) &&
(_vm->_map->getPass(gobDestX, gobDestY) != 0)) {
const WayPoint &wayPoint = _vm->_map->getWayPoint(obj->nearestWayPoint);
destX = wayPoint.x;
destY = wayPoint.y;
WRITE_VAR(56, 1);
} else {
animData->pathExistence = 1;
destX = gobDestX;
destY = gobDestY;
}
}
}
} else {
destX = gobDestX;
destY = gobDestY;
}
dir = _vm->_map->getDirection(gobX, gobY, destX, destY);
} else {
animData->pathExistence = 4;
destX = gobDestX;
destY = gobDestY;
}
}
obj->goblinX = gobX;
obj->goblinY = gobY;
obj->destX = destX;
obj->destY = destY;
obj->gobDestX = gobDestX;
obj->gobDestY = gobDestY;
switch (dir) {
case kDirNW:
animData->nextState = 1;
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10)
animData->nextState = 40;
if (_vm->_map->getPass(obj->goblinX - 1, obj->goblinY - 2) != 10)
animData->nextState = 1;
}
break;
case kDirN:
animData->nextState =
(animData->curLookDir == 2) ? 2 : rotateState(animData->curLookDir, 2);
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10) {
if (_vm->_map->getPass(obj->goblinX - 1, obj->goblinY - 2) == 10)
animData->nextState = 40;
else if (_vm->_map->getPass(obj->goblinX + 1, obj->goblinY - 2) == 10)
animData->nextState = 42;
else
animData->nextState = 2;
}
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 20)
animData->nextState = 38;
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 19)
animData->nextState = 26;
}
break;
case kDirNE:
animData->nextState = 3;
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10)
animData->nextState = 42;
if (_vm->_map->getPass(obj->goblinX + 1, obj->goblinY - 2) != 10)
animData->nextState = 3;
}
break;
case kDirW:
animData->nextState = rotateState(animData->curLookDir, 0);
break;
case kDirE:
animData->nextState = rotateState(animData->curLookDir, 4);
break;
case kDirSW:
animData->nextState = 7;
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10)
animData->nextState = 41;
if (_vm->_map->getPass(obj->goblinX - 1, obj->goblinY + 2) != 10)
animData->nextState = 7;
}
break;
case kDirS:
animData->nextState =
(animData->curLookDir == 6) ? 6 : rotateState(animData->curLookDir, 6);
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 20)
animData->nextState = 39;
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 19)
animData->nextState = 27;
}
break;
case kDirSE:
animData->nextState = 5;
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10)
animData->nextState = 43;
if (_vm->_map->getPass(obj->goblinX + 1, obj->goblinY + 2) != 10)
animData->nextState = 5;
}
break;
default:
if (animData->curLookDir == 0)
animData->nextState = 8;
else if (animData->curLookDir == 2)
animData->nextState = 29;
else if (animData->curLookDir == 4)
animData->nextState = 9;
else if (animData->curLookDir == 6)
animData->nextState = 28;
break;
}
}
void Goblin_v2::moveAdvance(Mult::Mult_Object *obj, Gob_Object *gobDesc,
int16 nextAct, int16 framesCount) {
if (!obj->goblinStates)
return;
movePathFind(obj, nullptr, 0);
playSounds(obj);
Mult::Mult_AnimData *animData = obj->pAnimData;
framesCount = _vm->_scenery->getAnimLayer(animData->animation, animData->layer)->framesCount;
if (animData->isPaused == 0)
animData->frame++;
switch (animData->stateType) {
case 0:
case 1:
animData->isPaused = 0;
break;
case 4:
if (animData->frame == 0)
animData->isPaused = 1;
break;
case 6:
if (animData->frame >= framesCount)
animData->isPaused = 1;
break;
default:
break;
}
switch (animData->state) {
case 0:
case 1:
case 7:
case 13:
case 16:
case 23:
case 40:
case 41:
animData->curLookDir = 0;
break;
case 2:
case 15:
case 18:
case 21:
case 26:
case 38:
animData->curLookDir = 2;
break;
case 3:
case 4:
case 5:
case 12:
case 19:
case 22:
case 42:
case 43:
animData->curLookDir = 4;
break;
case 6:
case 14:
case 17:
case 20:
case 27:
case 39:
animData->curLookDir = 6;
break;
case 8:
case 9:
case 28:
case 29:
if (animData->pathExistence == 4)
animData->pathExistence = 5;
break;
default:
break;
}
if ((animData->newState != -1) && (animData->frame == framesCount) &&
(animData->newState != animData->state)) {
animData->nextState = animData->newState;
animData->newState = -1;
animData->state = animData->nextState;
Scenery::AnimLayer *animLayer =
_vm->_scenery->getAnimLayer(animData->animation, animData->layer);
*obj->pPosX += animLayer->animDeltaX;
*obj->pPosY += animLayer->animDeltaY;
int16 animation = obj->goblinStates[animData->nextState][0].animation;
int16 layer = obj->goblinStates[animData->nextState][0].layer;
animData->layer = layer;
animData->animation = animation;
animData->frame = 0;
return;
}
if (isMovement(animData->state)) {
int16 state = animData->nextState;
if (animData->frame == ((framesCount + 1) / 2)) {
int16 gobX = obj->goblinX;
int16 gobY = obj->goblinY + 1;
advMovement(obj, state);
if (animData->state != state) {
int16 animation = obj->goblinStates[state][0].animation;
int16 layer = obj->goblinStates[state][0].layer;
animData->layer = layer;
animData->animation = animation;
animData->frame = 0;
animData->state = state;
_vm->_scenery->updateAnim(layer, 0, animation, 0, *obj->pPosX, *obj->pPosY, 0);
uint32 gobPosX = gobX * _vm->_map->getTilesWidth();
uint32 gobPosY = (gobY * _vm->_map->getTilesHeight()) -
(_vm->_scenery->_animBottom - _vm->_scenery->_animTop);
if (_vm->_map->hasBigTiles())
gobPosY -= gobY / 2;
*obj->pPosX = gobPosX;
*obj->pPosY = gobPosY;
}
}
}
if (animData->frame < framesCount)
return;
int16 state = animData->nextState;
int16 animation = obj->goblinStates[state][0].animation;
int16 layer = obj->goblinStates[state][0].layer;
animData->layer = layer;
animData->animation = animation;
animData->frame = 0;
animData->state = state;
int16 gobX = obj->goblinX;
int16 gobY = obj->goblinY + 1;
advMovement(obj, state);
_vm->_scenery->updateAnim(layer, 0, animation, 0, *obj->pPosX, *obj->pPosY, 0);
uint32 gobPosX = gobX * _vm->_map->getTilesWidth();
uint32 gobPosY = (gobY * _vm->_map->getTilesHeight()) -
(_vm->_scenery->_animBottom - _vm->_scenery->_animTop);
if (_vm->_map->hasBigTiles())
gobPosY -= gobY / 2;
*obj->pPosX = gobPosX;
*obj->pPosY = gobPosY;
}
void Goblin_v2::handleGoblins() {
Mult::Mult_Object *obj0, *obj1;
Mult::Mult_AnimData *anim0, *anim1;
int16 pass;
int16 gob1State, gob2State;
int16 gob1X, gob2X;
int16 gob1Y, gob2Y;
int16 gob1DestX, gob2DestX;
int16 gob1DestY, gob2DestY;
obj0 = &_vm->_mult->_objects[0];
obj1 = &_vm->_mult->_objects[1];
anim0 = obj0->pAnimData;
anim1 = obj1->pAnimData;
gob1State = anim0->state;
gob2State = anim1->state;
if (!anim0->isBusy) {
if (!_gob1Busy && (anim0->isStatic == 0)) {
if ((VAR(_gob1RelaxTimeVar) == 0) && (gob1State == 28)) {
// Goblin 1 showing boredom
gob1State = _vm->_util->getRandom(3) + 24;
setState(0, gob1State);
WRITE_VAR(_gob1RelaxTimeVar, 100);
} else
WRITE_VAR(_gob1RelaxTimeVar, VAR(_gob1RelaxTimeVar) - 1);
}
if ((gob1State == 8) || (gob1State == 9) || (gob1State == 29))
anim0->curLookDir = 6;
}
if (!anim1->isBusy) {
if (!_gob2Busy && (anim1->isStatic == 0)) {
if ((VAR(_gob2RelaxTimeVar) == 0) && (gob2State == 28)) {
// Goblin 2 showing boredom
gob2State = _vm->_util->getRandom(3) + 24;
setState(1, gob2State);
WRITE_VAR(_gob2RelaxTimeVar, 100);
} else
WRITE_VAR(_gob2RelaxTimeVar, VAR(_gob2RelaxTimeVar) - 1);
}
if ((gob2State == 8) || (gob2State == 9) || (gob2State == 29))
anim1->curLookDir = 6;
}
if ((anim0->isBusy == 1) && (anim0->isStatic == 0) &&
((anim0->state == 28) || (anim0->state == 29)))
anim0->curLookDir = 0;
if ((anim1->isBusy == 1) && (anim1->isStatic == 0) &&
((anim1->state == 28) || (anim1->state == 29)))
anim1->curLookDir = 0;
if (VAR(18) != ((uint32) -1)) {
if (anim0->layer == 44)
anim0->curLookDir = 4;
else if (anim0->layer == 45)
anim0->curLookDir = 0;
if (anim0->isBusy == 0)
anim0->curLookDir = 6;
}
if (VAR(19) != ((uint32) -1)) {
if (anim1->layer == 48)
anim1->curLookDir = 4;
else if (anim1->layer == 49)
anim1->curLookDir = 0;
if (anim1->isBusy == 0)
anim1->curLookDir = 6;
}
if ((anim0->layer == 45) && (anim0->curLookDir == 4) && (anim0->pathExistence == 5) &&
(VAR(18) == ((uint32) -1)) && !_gob1NoTurn) {
setState(0, 19); // Turning right->left
}
if ((anim0->layer == 44) && (anim0->curLookDir == 0) && (anim0->pathExistence == 5) &&
(VAR(18) == ((uint32) -1)) && !_gob1NoTurn) {
setState(0, 16); // Turning left->right
}
if ((anim1->layer == 49) && (anim1->curLookDir == 4) && (anim1->pathExistence == 5) &&
(VAR(19) == ((uint32) -1)) && !_gob2NoTurn) {
setState(1, 19); // Turning right->left
}
if ((anim1->layer == 48) && (anim1->curLookDir == 0) && (anim1->pathExistence == 5) &&
(VAR(19) == ((uint32) -1)) && !_gob2NoTurn) {
setState(1, 16); // Turning left->right
}
gob1X = obj0->goblinX;
gob2X = obj1->goblinX;
gob1Y = obj0->goblinY;
gob2Y = obj1->goblinY;
gob1DestX = anim0->destX;
gob2DestX = anim1->destX;
gob1DestY = anim0->destY;
gob2DestY = anim1->destY;
pass = _vm->_map->getPass(gob1X, gob1Y);
if ((pass > 17) && (pass < 21)) // Ladders, ropes, stairs
updateLayer1(anim0);
pass = _vm->_map->getPass(gob2X, gob2Y);
if ((pass > 17) && (pass < 21)) // Ladders, ropes, stairs
updateLayer2(anim1);
if ((gob1DestX < 0) || (gob1DestX > 39) || (gob1DestY < 0) || (gob1DestY > 39))
return;
if (gob1Y > gob1DestY) {
if (_vm->_map->getPass(gob1DestX, gob1DestY) > 17) {
do {
gob1DestY--;
} while (_vm->_map->getPass(gob1DestX, gob1DestY) > 17);
gob1DestY++;
if (_vm->_map->getPass(gob1DestX - 1, gob1DestY) == 0) {
if (_vm->_map->getPass(gob1DestX + 1, gob1DestY) != 0)
gob1DestX++;
} else
gob1DestX--;
move(gob1DestX, gob1DestY, 0);
}
} else {
if (_vm->_map->getPass(gob1DestX, gob1DestY) > 17) {
do {
gob1DestY++;
} while (_vm->_map->getPass(gob1DestX, gob1DestY) > 17);
gob1DestY--;
if (_vm->_map->getPass(gob1DestX - 1, gob1DestY) == 0) {
if (_vm->_map->getPass(gob1DestX + 1, gob1DestY) != 0)
gob1DestX++;
} else
gob1DestX--;
move(gob1DestX, gob1DestY, 0);
}
}
if (gob2Y > gob2DestY) {
if (_vm->_map->getPass(gob2DestX, gob2DestY) > 17) {
do {
gob2DestY--;
} while (_vm->_map->getPass(gob2DestX, gob2DestY) > 17);
gob2DestY++;
if (_vm->_map->getPass(gob2DestX - 1, gob2DestY) == 0) {
if (_vm->_map->getPass(gob2DestX + 1, gob2DestY) != 0)
gob2DestX++;
} else
gob2DestX--;
move(gob2DestX, gob2DestY, 1);
}
} else {
if (_vm->_map->getPass(gob2DestX, gob2DestY) > 17) {
do {
gob2DestY++;
} while (_vm->_map->getPass(gob2DestX, gob2DestY) > 17);
gob2DestY--;
if (_vm->_map->getPass(gob2DestX - 1, gob2DestY) == 0) {
if (_vm->_map->getPass(gob2DestX + 1, gob2DestY) != 0)
gob2DestX++;
} else
gob2DestX--;
move(gob2DestX, gob2DestY, 1);
}
}
}
bool Goblin_v2::isMovement(int8 state) {
if ((state >= 0) && (state < 8))
return true;
if ((state == 38) || (state == 39))
return true;
return false;
}
void Goblin_v2::advMovement(Mult::Mult_Object *obj, int8 state) {
switch (state) {
case 0:
obj->goblinX--;
break;
case 1:
obj->goblinX--;
obj->goblinY--;
break;
case 2:
case 38:
obj->goblinY--;
break;
case 3:
obj->goblinX++;
obj->goblinY--;
break;
case 4:
obj->goblinX++;
break;
case 5:
obj->goblinX++;
obj->goblinY++;
break;
case 6:
case 39:
obj->goblinY++;
break;
case 7:
obj->goblinX--;
obj->goblinY++;
break;
default:
break;
}
}
} // End of namespace Gob

141
engines/gob/goblin_v3.cpp Normal file
View File

@@ -0,0 +1,141 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "gob/gob.h"
#include "gob/goblin.h"
#include "gob/mult.h"
namespace Gob {
Goblin_v3::Goblin_v3(GobEngine *vm) : Goblin_v2(vm) {
}
bool Goblin_v3::isMovement(int8 state) {
if ((state >= 0) && (state < 8))
return true;
if ((state >= 40) && (state < 44))
return true;
if ((state == 26) || (state == 27))
return true;
if ((state == 38) || (state == 39))
return true;
return false;
}
void Goblin_v3::advMovement(Mult::Mult_Object *obj, int8 state) {
switch (state) {
case 0:
obj->goblinX--;
break;
case 1:
obj->goblinX--;
obj->goblinY--;
break;
case 2:
case 26:
case 38:
obj->goblinY--;
break;
case 3:
obj->goblinX++;
obj->goblinY--;
break;
case 4:
obj->goblinX++;
break;
case 5:
obj->goblinX++;
obj->goblinY++;
break;
case 6:
case 27:
case 39:
obj->goblinY++;
break;
case 7:
obj->goblinX--;
obj->goblinY++;
break;
case 40:
obj->goblinX--;
obj->goblinY -= 2;
break;
case 41:
obj->goblinX--;
obj->goblinY += 2;
break;
case 42:
obj->goblinX++;
obj->goblinY -= 2;
break;
case 43:
obj->goblinX++;
obj->goblinY += 2;
break;
default:
break;
}
}
void Goblin_v3::placeObject(Gob_Object *objDesc, char animated,
int16 index, int16 x, int16 y, int16 state) {
Mult::Mult_Object &obj = _vm->_mult->_objects[index];
Mult::Mult_AnimData &objAnim = *(obj.pAnimData);
if (!obj.goblinStates)
return;
if ((state != -1) && (obj.goblinStates[state] != nullptr)) {
if (state == 8)
objAnim.curLookDir = 0;
else if (state == 9)
objAnim.curLookDir = 4;
else if (state == 28)
objAnim.curLookDir = 6;
else if (state == 29)
objAnim.curLookDir = 2;
}
Goblin_v2::placeObject(objDesc, animated, index, x, y, state);
}
} // End of namespace Gob

659
engines/gob/goblin_v4.cpp Normal file
View File

@@ -0,0 +1,659 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "gob/gob.h"
#include "gob/goblin.h"
#include "gob/global.h"
#include "gob/mult.h"
#include "gob/map.h"
#include "gob/scenery.h"
#include "gob/inter.h"
namespace Gob {
Goblin_v4::Goblin_v4(GobEngine *vm) : Goblin_v3(vm) {
}
void Goblin_v4::movePathFind(Mult::Mult_Object *obj, Gob_Object *gobDesc, int16 nextAct) {
Mult::Mult_AnimData *animData;
int16 framesCount;
int16 gobX;
int16 gobY;
int16 gobDestX;
int16 gobDestY;
int16 destX;
int16 destY;
int16 dir;
dir = 0;
animData = obj->pAnimData;
framesCount = _vm->_scenery->getAnimLayer(animData->animation, animData->layer)->framesCount;
animData->newCycle = framesCount;
gobX = obj->goblinX;
gobY = obj->goblinY;
animData->order = gobY;
gobDestX = obj->gobDestX;
gobDestY = obj->gobDestY;
animData->destX = gobDestX;
animData->destY = gobDestY;
destX = obj->destX;
destY = obj->destY;
if (animData->pathExistence == 1) {
dir = _vm->_map->getDirection(gobX, gobY, destX, destY);
if (dir == 0)
animData->pathExistence = 0;
if ((gobX == destX) && (gobY == destY))
animData->pathExistence = 4;
} else if (animData->pathExistence == 3) {
if ((gobX == gobDestX) && (gobY == gobDestY)) {
animData->pathExistence = 4;
destX = gobDestX;
destY = gobDestY;
} else {
if (_vm->_map->checkDirectPath(obj, gobX, gobY, gobDestX, gobDestY) != 1) {
if ((gobX == destX) && (gobY == destY)) {
if (obj->nearestWayPoint > obj->nearestDest) {
_vm->_map->optimizePoints(obj, gobX, gobY);
const WayPoint &wayPoint = _vm->_map->getWayPoint(obj->nearestWayPoint);
destX = wayPoint.x;
destY = wayPoint.y;
if (_vm->_map->checkDirectPath(obj, gobX, gobY, destX, destY) == 3) {
WRITE_VAR(56, 1);
animData->pathExistence = 0;
}
if (obj->nearestWayPoint > obj->nearestDest)
obj->nearestWayPoint--;
} else if (obj->nearestWayPoint < obj->nearestDest) {
_vm->_map->optimizePoints(obj, gobX, gobY);
const WayPoint &wayPoint = _vm->_map->getWayPoint(obj->nearestWayPoint);
destX = wayPoint.x;
destY = wayPoint.y;
if (_vm->_map->checkDirectPath(obj, gobX, gobY, destX, destY) == 3) {
WRITE_VAR(56, 1);
animData->pathExistence = 0;
}
if (obj->nearestWayPoint < obj->nearestDest)
obj->nearestWayPoint++;
} else {
if ((_vm->_map->checkDirectPath(obj, gobX, gobY, gobDestX, gobDestY) == 3) &&
(_vm->_map->getPass(gobDestX, gobDestY) != 0)) {
const WayPoint &wayPoint = _vm->_map->getWayPoint(obj->nearestWayPoint);
destX = wayPoint.x;
destY = wayPoint.y;
WRITE_VAR(56, 1);
} else {
animData->pathExistence = 1;
destX = gobDestX;
destY = gobDestY;
}
}
}
} else {
destX = gobDestX;
destY = gobDestY;
}
dir = _vm->_map->getDirection(gobX, gobY, destX, destY);
}
}
obj->goblinX = gobX;
obj->goblinY = gobY;
obj->gobDestX = gobDestX;
obj->gobDestY = gobDestY;
obj->destX = destX;
obj->destY = destY;
if (_vm->_map->getVersion() == 4) {
switch (dir) {
case kDirNW:
animData->nextState = turnState(animData->state, kDirNW);
if ((_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10) &&
(animData->nextState == 1))
animData->nextState = 40;
if (_vm->_map->getPass(obj->goblinX - 1, obj->goblinY - 2) != 10)
animData->nextState = turnState(animData->state, kDirNW);
break;
case kDirN:
animData->nextState =
(animData->curLookDir == 2) ? 2 : turnState(animData->state, kDirN);
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10) {
if (_vm->_map->getPass(obj->goblinX - 1, obj->goblinY - 2) != 10) {
if (_vm->_map->getPass(obj->goblinX + 1, obj->goblinY - 2) == 10)
animData->nextState = 42;
else
animData->nextState = 2;
} else
animData->nextState = 40;
}
if ((_vm->_map->getPass(obj->goblinX, obj->goblinY) == 20) &&
(animData->nextState == 2))
animData->nextState = 38;
if ((_vm->_map->getPass(obj->goblinX, obj->goblinY) == 19) &&
(animData->nextState == 2))
animData->nextState = 26;
break;
case kDirNE:
animData->nextState = turnState(animData->state, kDirNE);
if ((_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10) &&
(animData->nextState == 3))
animData->nextState = 42;
if (_vm->_map->getPass(obj->goblinX + 1, obj->goblinY - 2) != 10)
animData->nextState = turnState(animData->state, kDirNE);
break;
case kDirW:
animData->nextState = turnState(animData->state, kDirW);
break;
case kDirE:
animData->nextState = turnState(animData->state, kDirE);
break;
case kDirSW:
animData->nextState = turnState(animData->state, kDirSW);
if ((_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10) &&
(animData->nextState == 7))
animData->nextState = 41;
if (_vm->_map->getPass(obj->goblinX - 1, obj->goblinY) != 10)
animData->nextState = turnState(animData->state, kDirSW);
break;
case kDirS:
animData->nextState =
(animData->curLookDir == 6) ? 6 : turnState(animData->state, kDirS);
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10) {
if (_vm->_map->getPass(obj->goblinX - 1, obj->goblinY + 2) != 10) {
if (_vm->_map->getPass(obj->goblinX + 1, obj->goblinY + 2) == 10)
animData->nextState = 43;
else
animData->nextState = 6;
} else
animData->nextState = 41;
}
if ((_vm->_map->getPass(obj->goblinX, obj->goblinY) == 20) &&
(animData->nextState == 6))
animData->nextState = 39;
if ((_vm->_map->getPass(obj->goblinX, obj->goblinY) == 19) &&
(animData->nextState == 6))
animData->nextState = 27;
break;
case kDirSE:
animData->nextState = turnState(animData->state, kDirSE);
if ((_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10) &&
(animData->nextState == 5))
animData->nextState = 43;
if (_vm->_map->getPass(obj->goblinX + 1, obj->goblinY) != 10)
animData->nextState = turnState(animData->state, kDirSE);
break;
default:
switch (animData->state) {
case 0:
case 8:
animData->nextState = 8;
break;
case 1:
case 10:
case 40:
animData->nextState = 10;
break;
case 2:
case 29:
animData->nextState = 29;
break;
case 3:
case 11:
case 42:
animData->nextState = 11;
break;
case 4:
case 9:
animData->nextState = 9;
break;
case 5:
case 30:
case 43:
animData->nextState = 30;
break;
case 6:
case 28:
animData->nextState = 28;
break;
case 7:
case 31:
case 41:
animData->nextState = 31;
break;
default:
break;
}
break;
}
} else {
switch (dir) {
case kDirNW:
animData->nextState = 1;
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10)
animData->nextState = 40;
if (_vm->_map->getPass(obj->goblinX - 1, obj->goblinY - 2) != 10)
animData->nextState = 1;
}
break;
case kDirN:
animData->nextState =
(animData->curLookDir == 2) ? 2 : rotateState(animData->curLookDir, 2);
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10) {
if (_vm->_map->getPass(obj->goblinX - 1, obj->goblinY - 2) != 10) {
if (_vm->_map->getPass(obj->goblinX + 1, obj->goblinY - 2) == 10)
animData->nextState = 42;
else
animData->nextState = 2;
} else
animData->nextState = 40;
} else if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 20)
animData->nextState = 38;
else if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 19)
animData->nextState = 26;
}
break;
case kDirNE:
animData->nextState = 3;
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10)
animData->nextState = 42;
if (_vm->_map->getPass(obj->goblinX + 1, obj->goblinY - 2) != 10)
animData->nextState = 3;
}
break;
case kDirW:
animData->nextState = rotateState(animData->curLookDir, 0);
break;
case kDirE:
animData->nextState = rotateState(animData->curLookDir, 4);
break;
case kDirSW:
animData->nextState = 7;
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10)
animData->nextState = 41;
if (_vm->_map->getPass(obj->goblinX - 1, obj->goblinY + 2) != 10)
animData->nextState = 7;
}
break;
case kDirS:
animData->nextState =
(animData->curLookDir == 6) ? 6 : rotateState(animData->curLookDir, 6);
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 20)
animData->nextState = 39;
else if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 19)
animData->nextState = 27;
}
break;
case kDirSE:
animData->nextState = 5;
if (_vm->_map->getScreenWidth() == 640) {
if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10)
animData->nextState = 43;
if (_vm->_map->getPass(obj->goblinX + 1, obj->goblinY + 2) != 10)
animData->nextState = 5;
}
break;
default:
switch (animData->curLookDir) {
case 0:
animData->nextState = 8;
break;
case 1:
animData->nextState = 10;
break;
case 2:
animData->nextState = 29;
break;
case 3:
animData->nextState = 11;
break;
case 4:
animData->nextState = 9;
break;
case 5:
animData->nextState = 30;
break;
case 6:
animData->nextState = 28;
break;
case 7:
animData->nextState = 31;
break;
default:
break;
}
break;
}
}
}
void Goblin_v4::moveAdvance(Mult::Mult_Object *obj, Gob_Object *gobDesc,
int16 nextAct, int16 framesCount) {
Mult::Mult_AnimData *animData;
int16 gobX;
int16 gobY;
int16 animation;
int16 state;
int16 layer;
if (!obj->goblinStates)
return;
movePathFind(obj, nullptr, 0);
playSounds(obj);
animData = obj->pAnimData;
framesCount = _vm->_scenery->getAnimLayer(animData->animation, animData->layer)->framesCount;
if (animData->isPaused == 0)
animData->frame++;
switch (animData->stateType) {
case 0:
case 1:
animData->isPaused = 0;
break;
case 4:
if (animData->frame == 0)
animData->isPaused = 1;
break;
case 6:
if (animData->frame >= framesCount)
animData->isPaused = 1;
break;
default:
break;
}
switch (animData->state) {
case 0:
case 1:
case 7:
case 13:
case 16:
case 23:
case 40:
case 41:
animData->curLookDir = 0;
break;
case 2:
case 15:
case 18:
case 21:
case 26:
case 38:
animData->curLookDir = 2;
break;
case 3:
case 4:
case 5:
case 12:
case 19:
case 22:
case 42:
case 43:
animData->curLookDir = 4;
break;
case 6:
case 14:
case 17:
case 20:
case 27:
case 39:
animData->curLookDir = 6;
break;
case 8:
case 9:
case 10:
case 11:
case 28:
case 29:
case 30:
case 31:
if (animData->pathExistence == 4)
animData->pathExistence = 5;
break;
default:
break;
}
if ((animData->newState != -1) && (animData->frame == framesCount) &&
(animData->newState != animData->state)) {
animData->nextState = animData->newState;
animData->newState = -1;
animData->state = animData->nextState;
Scenery::AnimLayer *animLayer =
_vm->_scenery->getAnimLayer(animData->animation, animData->layer);
*obj->pPosX += animLayer->animDeltaX;
*obj->pPosY += animLayer->animDeltaY;
animation = obj->goblinStates[animData->nextState][0].animation;
layer = obj->goblinStates[animData->nextState][0].layer;
animData->layer = layer;
animData->animation = animation;
animData->frame = 0;
} else {
if (isMovement(animData->state)) {
state = animData->nextState;
if (animData->frame == ((framesCount + 1) / 2)) {
gobX = obj->goblinX;
gobY = obj->goblinY;
advMovement(obj, state);
if (animData->state != state) {
animation = obj->goblinStates[state][0].animation;
layer = obj->goblinStates[state][0].layer;
animData->layer = layer;
animData->animation = animation;
animData->frame = 0;
animData->state = state;
_vm->_scenery->updateAnim(layer, 0, animation, 0, *obj->pPosX, *obj->pPosY, 0);
if (_vm->_map->hasBigTiles())
*obj->pPosY = ((gobY + 1) * _vm->_map->getTilesHeight()) -
(_vm->_scenery->_animBottom - _vm->_scenery->_animTop) - (gobY + 1) / 2;
else
*obj->pPosY = ((gobY + 1) * _vm->_map->getTilesHeight()) -
(_vm->_scenery->_animBottom - _vm->_scenery->_animTop);
*obj->pPosX = gobX * _vm->_map->getTilesWidth();
}
}
}
if (animData->frame >= framesCount) {
state = animData->nextState;
animation = obj->goblinStates[state][0].animation;
layer = obj->goblinStates[state][0].layer;
animData->layer = layer;
animData->animation = animation;
animData->frame = 0;
animData->state = state;
gobX = obj->goblinX;
gobY = obj->goblinY;
advMovement(obj, state);
_vm->_scenery->updateAnim(layer, 0, animation, 0, *obj->pPosX, *obj->pPosY, 0);
if (_vm->_map->hasBigTiles())
*obj->pPosY = ((gobY + 1) * _vm->_map->getTilesHeight()) -
(_vm->_scenery->_animBottom - _vm->_scenery->_animTop) - (gobY + 1) / 2;
else
*obj->pPosY = ((gobY + 1) * _vm->_map->getTilesHeight()) -
(_vm->_scenery->_animBottom - _vm->_scenery->_animTop);
*obj->pPosX = gobX * _vm->_map->getTilesWidth();
}
}
}
int16 Goblin_v4::turnState(int16 state, uint16 dir) {
static const int16 newStates[8][8] = {
{ 0, 1, 10, 10, 10, 31, 31, 7},
{ 0, 1, 2, 29, 29, 29, 8, 8},
{10, 1, 2, 3, 11, 11, 11, 10},
{29, 29, 2, 3, 4, 9, 9, 9},
{30, 11, 11, 3, 4, 5, 30, 30},
{28, 28, 9, 9, 4, 5, 6, 28},
{31, 31, 31, 30, 30, 5, 6, 7},
{ 0, 8, 8, 8, 28, 28, 6, 7}
};
int16 dx = state, cx = 0;
switch (state) {
case 0:
case 8:
dx = 0;
break;
case 1:
case 10:
case 40:
dx = 1;
break;
case 3:
case 11:
case 42:
dx = 3;
break;
case 5:
case 30:
case 43:
dx = 5;
break;
case 7:
case 31:
case 41:
dx = 7;
break;
case 9:
dx = 4;
break;
case 28:
dx = 6;
break;
case 29:
dx = 2;
break;
default:
break;
}
switch (dir) {
case kDirNW:
cx = 1;
break;
case kDirN:
cx = 2;
break;
case kDirNE:
cx = 3;
break;
case kDirW:
cx = 0;
break;
case kDirE:
cx = 4;
break;
case kDirSW:
cx = 7;
break;
case kDirS:
cx = 6;
break;
case kDirSE:
cx = 5;
break;
default:
break;
}
return newStates[dx][cx];
}
} // End of namespace Gob

591
engines/gob/goblin_v7.cpp Normal file
View File

@@ -0,0 +1,591 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "gob/global.h"
#include "gob/gob.h"
#include "gob/goblin.h"
#include "gob/inter.h"
#include "gob/map.h"
#include "gob/mult.h"
#include "gob/scenery.h"
#include "gob/videoplayer.h"
namespace Gob {
Goblin_v7::Goblin_v7(GobEngine *vm) : Goblin_v4(vm) {
}
void Goblin_v7::setGoblinState(Mult::Mult_Object *obj, int16 animState) {
char str[128];
obj->pAnimData->layer &= 3;
int32 var_4 = 0;
Common::strlcpy(str, obj->animName, 128);
if (obj->pAnimData->curLookDir >= 10) {
if (obj->pAnimData->curLookDir == 26 ||
obj->pAnimData->curLookDir == 36) {
if (str[strlen(str) - 1] == 'U') {
str[strlen(str) - 3] = '\0';
} else
str[strlen(str) - 2] = '\0';
} else {
str[strlen(str) - 3] = '\0';
}
} else {
str[strlen(str) - 2] = '\0';
}
if (animState < 100)
var_4 = 1;
else
var_4 = 0;
animState %= 100;
obj->pAnimData->curLookDir = animState;
int16 newXCorrection = 0;
int16 newYCorrection = 0;
while (true) {
// obj->animVariables[1]: number of fields per state
// obj->animVariables[2]: max number of states
if (animState <= 0 || animState > (int16) obj->animVariables->at(2)) {
obj->pAnimData->animType = 11;
return;
}
int32 newOffset = animState * (int16) obj->animVariables->at(1);
VariableReferenceArray animVariablesForState = obj->animVariables->arrayAt(newOffset);
if (animVariablesForState.at(0) == 0) {
newXCorrection = (int16) animVariablesForState.at(1);
newYCorrection = (int16) animVariablesForState.at(2);
break;
}
if ((int16) animVariablesForState.at(0) == -2) {
// Reflexion relative to Y axis:
// Some videos exist only for "west" directions (W, NW, SW, N S),
// "east" directions (E, NE, SE) are then obtained by symmetry
switch (animState) {
case 1:
animState = 5;
break;
case 2:
animState = 4;
break;
case 4:
animState = 2;
break;
case 5:
animState = 1;
break;
case 6:
animState = 8;
break;
case 8:
animState = 6;
break;
case 31:
case 32:
case 33:
case 34:
case 35:
case 36:
case 37:
animState -= 10;
break;
default: // 3, 7, 9-30, > 36
obj->pAnimData->animType = 11;
return;
}
obj->pAnimData->layer |= 0x80;
newXCorrection = (int16) animVariablesForState.at(1);
newYCorrection = (int16) animVariablesForState.at(2);
break;
}
if ((int16) animVariablesForState.at(0) == -1) {
obj->pAnimData->animType = 11;
return;
}
animState = (int16) animVariablesForState.at(0);
}
if (obj->pAnimData->stateType == 1) {
if (animState == 22)
animState = 27;
else if (animState == 25)
animState = 26;
}
switch (animState) {
case 1:
Common::strlcat(str, "GG", 128);
break;
case 2:
Common::strlcat(str, "GH", 128);
break;
case 3:
Common::strlcat(str, "HH", 128);
break;
case 4:
Common::strlcat(str, "DH", 128);
break;
case 5:
Common::strlcat(str, "DD", 128);
break;
case 6:
Common::strlcat(str, "DB", 128);
break;
case 7:
Common::strlcat(str, "BB", 128);
break;
case 8:
Common::strlcat(str, "GB", 128);
break;
case 21:
Common::strlcat(str, "COG", 128);
break;
case 22: {
uint animIndex = _vm->_rnd.getRandomNumber(1);
switch (animIndex) {
case 0:
Common::strlcat(str, "EFR", 128); // scared (EFFRAYE)
break;
case 1:
Common::strlcat(str, "EF1", 128);
break;
default:
break;
}
break;
}
case 23:
Common::strlcat(str, "EXP", 128);
break;
case 24:
Common::strlcat(str, "FRA", 128);
break;
case 25: {
uint animIndex = _vm->_rnd.getRandomNumber(3);
switch (animIndex) {
case 0:
Common::strlcat(str, "PAR", 128); // talking (PARLE)
break;
case 1:
Common::strlcat(str, "PA1", 128);
break;
case 2:
Common::strlcat(str, "PA2", 128);
break;
case 3:
Common::strlcat(str, "PA3", 128);
break;
default:
break;
}
break;
}
case 26: {
uint animIndex = _vm->_rnd.getRandomNumber(3);
switch (animIndex) {
case 0:
Common::strlcat(str, "PAU", 128); // taking a break (PAUSE)
break;
case 1:
Common::strlcat(str, "P1", 128);
break;
case 2:
Common::strlcat(str, "P2", 128);
break;
case 3:
Common::strlcat(str, "P3", 128);
break;
default:
break;
}
break;
}
case 27: {
uint animIndex = _vm->_rnd.getRandomNumber(1);
switch (animIndex) {
case 0:
Common::strlcat(str, "RIR", 128); // laughing (RIRE)
break;
case 1:
Common::strlcat(str, "RI1", 128);
break;
default:
break;
}
break;
}
default:
Common::strlcat(str, Common::String::format("%02d", animState).c_str(), 128);
}
if (strcmp(str, obj->animName) != 0) {
_vm->_mult->closeObjVideo(*obj);
Common::strlcpy(obj->animName, str, 16);
}
int32 newX = 0;
int32 newY = 0;
if (_vm->_map->_usesObliqueCoordinates) {
// Oblique coordinates to screen coordinates mapping
newX = (_vm->_map->getTilesWidth() / 2) * obj->pAnimData->destX +
(_vm->_map->getTilesWidth() / 2) * obj->pAnimData->destY -
(_vm->_map->getTilesWidth() * 39) / 2;
newY = (_vm->_map->getTilesHeight() / 2) * obj->pAnimData->destY -
(_vm->_map->getTilesHeight() / 2) * obj->pAnimData->destX +
(_vm->_map->getTilesHeight() * 20);
if (animState > 10) {
obj->destX = obj->pAnimData->destX;
obj->goblinX = obj->destX;
obj->destY = obj->pAnimData->destY;
obj->goblinY = obj->destY;
}
} else {
newY = obj->pAnimData->destY * _vm->_map->getTilesHeight();
newX = obj->pAnimData->destX * _vm->_map->getTilesWidth();
}
*obj->pPosX = newX + newXCorrection;
*obj->pPosY = newY + newYCorrection;
obj->pAnimData->frame = 0;
if (var_4 == 0) {
_vm->_mult->closeObjVideo(*obj);
VideoPlayer::Properties props;
props.x = -1;
props.y = -1;
props.startFrame = 0;
props.lastFrame = 0;
props.breakKey = 0;
props.flags = 0x1601;
props.palStart = 0;
props.palEnd = 0;
props.sprite = 50 - obj->pAnimData->animation - 1;
_vm->_mult->openObjVideo(str, props, obj->pAnimData->animation);
} else {
if (obj->videoSlot == 0 ||
strcmp(obj->animName, str) != 0 ||
(_vm->_vidPlayer->getFlags(obj->videoSlot - 1) & 0x800)) {
VideoPlayer::Properties props;
props.x = -1;
props.y = -1;
props.startFrame = 0;
props.lastFrame = 0;
props.breakKey = 0;
props.flags = 0x1601;
props.palStart = 0;
props.palEnd = 0;
props.sprite = 50 - obj->pAnimData->animation - 1;
_vm->_mult->openObjVideo(str, props, obj->pAnimData->animation);
}
}
}
/*
* NOTE: conversion between direction index, coordinates in Map with _map->_usesObliqueCoordinates
* and screen coordinates
* -----------------------------------------------------
* | dir. index | Map obl. | screen |
* | 0 | ( 0, 0) | ( 0, 0) |
* | 1 | (-1, -1) | (-1, 0) -> left |
* | 2 | ( 0, -1) | (-1, -1) -> up-left |
* | 3 | ( 1, -1) | ( 0, -1) -> up |
* | 4 | ( 1, 0) | ( 1, -1) -> up-right |
* | 5 | ( 1, 1) | ( 1, 0) -> right |
* | 6 | ( 0, 1) | ( 1, 1) -> down-right |
* | 7 | (-1, 1) | ( 0, 1) -> down |
* | 8 | (-1, 0) | (-1, 1) -> down-left |
* | 9 | ( 0, 0) | ( 0, 0) |
* -----------------------------------------------------
*/
static int8 deltaXFromDirection[10] = {0, -1, 0, 1, 1, 1, 0, -1, -1, 0};
static int8 deltaYFromDirection[10] = {0, -1, -1, -1, 0, 1, 1, 1, 0, 0};
static bool positionWalkable(Map *map, int8 x, int8 y) {
return !map->getPass(x, y, map->getMapWidth());
}
static void updateGobDest(Map *map, Mult::Mult_Object &obj) {
if (!positionWalkable(map, obj.gobDestX, obj.gobDestY)) {
int8 newGobDestX = 0;
int32 var_8 = 1000;
int8 newGobDestY = 0;
for (int32 direction = 2; direction <= 8; direction += 2) {
int32 nbrOfStepsDir = 0;
int8 tempGobDestX = obj.gobDestX;
int8 tempGobDestY = obj.gobDestY;
while (true) {
tempGobDestX += deltaXFromDirection[direction];
tempGobDestY += deltaYFromDirection[direction];
nbrOfStepsDir++;
if (tempGobDestX < 0
|| tempGobDestX >= map->getMapWidth()
|| tempGobDestY < 0
|| tempGobDestY >= map->getMapHeight()) {
break;
}
if (positionWalkable(map, tempGobDestX, tempGobDestY)) {
if (nbrOfStepsDir < var_8) {
newGobDestX = tempGobDestX;
newGobDestY = tempGobDestY;
var_8 = nbrOfStepsDir;
break;
}
}
}
}
if (var_8 != 1000) {
obj.gobDestX = newGobDestX;
obj.gobDestY = newGobDestY;
}
}
}
int8 directionFromDeltaXY(int8 deltaX, int8 deltaY) {
for (int8 direction = 1; direction <= 8; ++direction) {
if (deltaXFromDirection[direction] == deltaX &&
deltaYFromDirection[direction] == deltaY)
return direction;
}
return 0;
}
bool Goblin_v7::directionWalkable(int8 x, int8 y, int8 direction) {
int8 nextX = x + deltaXFromDirection[direction];
int8 nextY = y + deltaYFromDirection[direction];
if (nextX >= 0 &&
nextX < _vm->_map->getMapWidth() &&
nextY >= 0 &&
nextY < _vm->_map->getMapHeight()) {
return positionWalkable(_vm->_map, nextX, nextY);
} else
return false;
}
int32 Goblin_v7::bestWalkableDirectionFromOriginAndDest(int8 x, int8 y, int8 destX, int8 destY) {
int8 deltaX = 0;
int8 deltaY = 0;
if (destX < x)
deltaX = -1;
else if (destX > x)
deltaX = 1;
if (destY < y)
deltaY = -1;
else if (destY > y)
deltaY = 1;
int8 direction = directionFromDeltaXY(deltaX, deltaY);
if (directionWalkable(x, y, direction))
return direction;
// Look for another walkable direction
direction -= 1;
if (direction <= 0)
direction += 8;
if (directionWalkable(x, y, direction))
return direction;
direction += 2;
if (direction > 8)
direction -= 8;
if (directionWalkable(x, y, direction))
return direction;
direction -= 3;
if (direction <= 0)
direction += 8;
if (directionWalkable(x, y, direction))
return -direction;
direction += 4;
if (direction > 8)
direction -= 8;
if (directionWalkable(x, y, direction))
return -direction;
return 0;
}
int32 Goblin_v7::findPath(int8 x, int8 y, int8 destX, int8 destY) {
int8 currentX = x;
int8 currentY = y;
int8 returnToPreviousStepDir = -1;
int8 var_8 = 0;
int8 firstDirection = 0;
int8 var_1C = 0;
while (true) {
int8 currentDirection = bestWalkableDirectionFromOriginAndDest(currentX, currentY, destX, destY);
if (currentDirection == 0)
return 0;
if (currentDirection >= 0) {
if (var_8 == 1) {
var_8 = 2;
var_1C = findPath(x, y, currentX, currentY);
if (var_1C > 0)
firstDirection = var_1C;
}
} else {
currentDirection = -currentDirection;
if (var_8 == 0)
var_8 = 1;
}
if (returnToPreviousStepDir > 0) {
returnToPreviousStepDir += 4;
if (returnToPreviousStepDir > 8)
returnToPreviousStepDir -= 8;
}
if (currentDirection == returnToPreviousStepDir) {
currentDirection += 4;
if (currentDirection > 8)
currentDirection -= 8;
if (!directionWalkable(currentX, currentY, currentDirection))
return 0;
}
if (firstDirection == 0)
firstDirection = currentDirection;
returnToPreviousStepDir = currentDirection; // Will be inverted later
currentX += deltaXFromDirection[currentDirection];
currentY += deltaYFromDirection[currentDirection];
if (currentX != destX || currentY != destY)
continue;
else
return firstDirection;
}
}
int32 Goblin_v7::computeObjNextDirection(Mult::Mult_Object &obj) {
Mult::Mult_AnimData animData = *obj.pAnimData;
if (animData.stateType == 1) {
warning("STUB: Goblin_v7::computeObjNextDirection animData.stateType == 1");
return 0;
} else {
updateGobDest(_vm->_map, obj);
int32 direction = findPath(obj.goblinX, obj.goblinY, obj.gobDestX, obj.gobDestY);
if (direction == 0) {
direction = bestWalkableDirectionFromOriginAndDest(obj.goblinX, obj.goblinY, obj.gobDestX, obj.gobDestY);
if (direction < 0)
direction = -direction;
}
if (animData.newState > 0) {
int32 newState = animData.newState + 4;
if (newState > 8) {
newState -= 8;
}
if (direction == newState) {
direction = animData.newState;
if (!directionWalkable(obj.goblinX, obj.goblinY, direction))
return 0;
}
}
if (direction < 0)
return 0;
obj.destX = obj.goblinX + deltaXFromDirection[direction];
obj.destY = obj.goblinY + deltaYFromDirection[direction];
return direction;
}
}
void Goblin_v7::initiateMove(Mult::Mult_Object *obj) {
int32 animState = 0;
if (obj->goblinX != obj->gobDestX || obj->goblinY != obj->gobDestY) {
debugC(5, kDebugGameFlow, "Computing Obj %s new state (obj->goblinX = %d, obj->gobDestX = %d, obj->goblinY = %d, obj->gobDestY = %d)",
obj->animName, obj->goblinX , obj->gobDestX , obj->goblinY ,obj->gobDestY);
animState = computeObjNextDirection(*obj);
debugC(5, kDebugGameFlow, "Obj %s new state = %d (obj->goblinX = %d, obj->gobDestX = %d, obj->goblinY = %d, obj->gobDestY = %d)",
obj->animName, animState, obj->goblinX , obj->gobDestX , obj->goblinY ,obj->gobDestY);
}
debugC(5, kDebugGameFlow, "Obj %s initiateMove (lookDir=%d, obj->posX=%d, obj->posY=%d, obj->goblinX = %d, obj->gobDestX = %d, obj->goblinY = %d, obj->gobDestY = %d)",
obj->animName, obj->pAnimData->curLookDir, (int16) *obj->pPosX, (int16) *obj->pPosY, obj->goblinX , obj->gobDestX , obj->goblinY , obj->gobDestY);
if (animState != 0) {
obj->pAnimData->newState = animState;
setGoblinState(obj, animState);
} else {
if (obj->pAnimData->destX != obj->pAnimData->gobDestX_maybe || obj->pAnimData->destY != obj->pAnimData->gobDestY_maybe)
obj->pAnimData->pathExistence = 2;
else
obj->pAnimData->pathExistence = 1;
obj->pAnimData->animType = 12;
if (obj->pAnimData->curLookDir >= 20) {
if (obj->pAnimData->curLookDir >= 30) {
if (obj->pAnimData->curLookDir >= 40)
return;
else {
setGoblinState(obj, 105);
obj->pAnimData->pathExistence = 3;
}
} else {
setGoblinState(obj, 101);
obj->pAnimData->pathExistence = 3;
}
} else {
setGoblinState(obj, obj->pAnimData->curLookDir + 100);
}
}
}
} // End of namespace Gob

2497
engines/gob/hotspots.cpp Normal file

File diff suppressed because it is too large Load Diff

318
engines/gob/hotspots.h Normal file
View File

@@ -0,0 +1,318 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_HOTSPOTS_H
#define GOB_HOTSPOTS_H
#include "common/stack.h"
#include "gob/util.h"
namespace Gob {
class Font;
class Script;
class Hotspots {
public:
static const int kHotspotCount = 250;
enum Type {
kTypeNone = 0,
kTypeMove = 1,
kTypeClick = 2,
kTypeInput1NoLeave = 3,
kTypeInput1Leave = 4,
kTypeInput2NoLeave = 5,
kTypeInput2Leave = 6,
kTypeInput3NoLeave = 7,
kTypeInput3Leave = 8,
kTypeInputFloatNoLeave = 9,
kTypeInputFloatLeave = 10,
kTypeEnable2 = 11,
kTypeEnable1 = 12,
kTypeClickEnter = 21
};
enum State {
kStateFilledDisabled = 0xC,
kStateFilled = 0x8,
kStateDisabled = 0x4,
kStateType2 = 0x2,
kStateType1 = 0x1
};
Hotspots(GobEngine *vm);
~Hotspots();
/** Remove all hotspots. */
void clear();
/** Add a hotspot, returning the new index. */
uint16 add(uint16 id,
uint16 left, uint16 top, uint16 right, uint16 bottom,
uint16 flags, uint16 key,
uint16 funcEnter, uint16 funcLeave, uint16 funcPos);
/** Remove a specific hotspot. */
void remove(uint16 id);
/** Remove all hotspots in this state. */
void removeState(uint8 state);
/** Push the current hotspots onto the stack.
*
* @param all 0: Don't push global ones; 1: Push all; 2: Push only the disabled ones
* @param force Force a push although _shouldPush is false
*/
void push(uint8 all, bool force = false);
/** Pop hotspots from the stack. */
void pop();
/** Check the current hotspot. */
uint16 check(uint8 handleMouse, int16 delay, uint16 &id, uint16 &index);
/** Check the current hotspot. */
uint16 check(uint8 handleMouse, int16 delay);
/** Evaluate hotspot changes. */
void evaluate();
/** Return the cursor found in the hotspot to the coordinates. */
int16 findCursor(uint16 x, uint16 y) const;
/** implementation of oPlaytoons_F_1B code*/
void createButton();
#ifdef USE_TTS
bool hoveringOverHotspot() const;
void addHotspotTTSText(const Common::String &text, uint16 x1, uint16 y1, uint16 x2, uint16 y2, int16 surf);
void voiceUnassignedHotspots();
void voiceHotspotTTSText(int16 x, int16 y);
void clearHotspotTTSText();
void clearUnassignedHotspotTTSText();
void clearPreviousSaid();
void adjustHotspotTTSTextRect(int16 oldLeft, int16 oldTop, int16 oldRight, int16 oldBottom, int16 newX, int16 newY, int16 surf);
#endif
private:
struct Hotspot {
uint16 id;
uint16 left;
uint16 top;
uint16 right;
uint16 bottom;
uint16 flags;
uint16 key;
uint16 funcEnter;
uint16 funcLeave;
uint16 funcPos;
Script *scriptFuncLeave;
Script *scriptFuncPos;
Hotspot();
Hotspot(uint16 i,
uint16 l, uint16 t, uint16 r, uint16 b, uint16 f, uint16 k,
uint16 enter, uint16 leave, uint16 pos);
void clear();
Type getType () const;
MouseButtons getButton() const;
uint16 getWindow() const;
uint8 getCursor() const;
uint8 getState () const;
/** Is this hotspot the block end marker? */
bool isEnd() const;
bool isInput () const;
bool isActiveInput() const;
bool isInputLeave () const;
bool isFilled () const;
bool isFilledEnabled() const;
bool isFilledNew () const;
bool isDisabled () const;
/** Are the specified coordinates in the hotspot? */
bool isIn(uint16 x, uint16 y) const;
/** Does the specified button trigger the hotspot? */
bool buttonMatch(MouseButtons button) const;
static uint8 getState(uint16 id);
void disable();
void enable ();
};
#ifdef USE_TTS
struct HotspotTTSText {
Common::String str;
Common::Rect rect;
int16 hotspot;
bool voiced;
int16 surf;
};
#endif
struct StackEntry {
bool shouldPush;
Hotspot *hotspots;
uint32 size;
uint32 key;
uint32 id;
uint32 index;
uint16 x;
uint16 y;
};
struct InputDesc {
uint16 fontIndex;
uint16 backColor;
uint16 frontColor;
uint16 length;
const char *str;
};
GobEngine *_vm;
Hotspot *_hotspots;
Common::Stack<StackEntry> _stack;
bool _shouldPush;
uint16 _currentKey;
uint16 _currentIndex;
uint16 _currentId;
uint16 _currentX;
uint16 _currentY;
#ifdef USE_TTS
Common::String _previousSaid;
bool _hotspotSpokenLast;
Common::Array<HotspotTTSText> _hotspotTTSText;
int16 _currentHotspotTTSTextIndex;
#endif
/** Add a hotspot, returning the new index. */
uint16 add(const Hotspot &hotspot);
/** Recalculate all hotspot parameters
*
* @param force Force recalculation of all hotspots, including global ones.
*/
void recalculate(bool force);
/** Is this a valid hotspot? */
bool isValid(uint16 key, uint16 id, uint16 index) const;
/** Call a hotspot subroutine. */
void call(uint16 offset);
/** Handling hotspot enter events. */
void enter(uint16 index);
/** Handling hotspot leave events. */
void leave(uint16 index);
/** Check whether a specific part of the window forces a certain cursor. */
int16 windowCursor(int16 &dx, int16 &dy) const;
/** Which hotspot is the mouse cursor currently at? */
uint16 checkMouse(Type type, uint16 &id, uint16 &index) const;
/** Did the current hotspot change in the meantime? */
bool checkHotspotChanged();
/** Update events from a specific input. */
uint16 updateInput(uint16 xPos, uint16 yPos, uint16 width, uint16 height,
uint16 backColor, uint16 frontColor, char *str, uint16 fontIndex,
Type type, int16 &duration, uint16 &id, uint16 &index);
/** Handle all inputs we currently manage. */
uint16 handleInputs(int16 time, uint16 inputCount, uint16 &curInput,
InputDesc *inputs, uint16 &id, uint16 &index);
/** Evaluate adding new hotspots script commands. */
void evaluateNew(uint16 i, uint16 *ids, InputDesc *inputs,
uint16 &inputId, bool &hasInput, uint16 &inputCount);
/** Find the hotspot requested by script commands. */
bool evaluateFind(uint16 key, int16 timeVal, const uint16 *ids,
uint16 leaveWindowIndex, uint16 hotspotIndex1, uint16 hotspotIndex2,
uint16 endIndex, int16 &duration, uint16 &id, uint16 &index, bool &finished);
// Finding specific hotspots
/** Find the hotspot index that corresponds to the input index. */
uint16 inputToHotspot(uint16 input) const;
/** Find the input index that corresponds to the hotspot index. */
uint16 hotspotToInput(uint16 hotspot) const;
/** Find the input that was clicked on. */
uint16 findClickedInput(uint16 index) const;
/** Find the first input hotspot with a leave function. */
bool findFirstInputLeave(uint16 &id, uint16 &inputId, uint16 &index) const;
/** Find the hotspot with the matching key, case sensitively. */
bool findKey(uint16 key, uint16 &id, uint16 &index) const;
/** Find the hotspot with the matching key, case insensitively. */
bool findKeyCaseInsensitive(uint16 key, uint16 &id, uint16 &index) const;
/** Find the nth plain (without Type1 or Type2 state) hotspot. */
bool findNthPlain(uint16 n, uint16 startIndex, uint16 &id, uint16 &index) const;
/** Leave the nth plain (without Type1 or Type2 state) hotspot. */
bool leaveNthPlain(uint16 n, uint16 startIndex, int16 timeVal, const uint16 *ids,
uint16 &id, uint16 &index, int16 &duration);
// Hotspot ID variable access
void setCurrentHotspot(const uint16 *ids, uint16 id) const;
uint32 getCurrentHotspot() const;
// String input functions
void cleanFloatString(const Hotspot &spot) const;
void checkStringMatch(const Hotspot &spot, const InputDesc &input,
uint16 inputPos) const;
void matchInputStrings(const InputDesc *inputs) const;
uint16 convertSpecialKey(uint16 key) const;
/** Calculate the graphical cursor position. */
void getTextCursorPos(const Font &font, const char *str,
uint32 pos, uint16 x, uint16 y, uint16 width, uint16 height,
uint16 &cursorX, uint16 &cursorY, uint16 &cursorWidth, uint16 &cursorHeight) const;
/** Fill that rectangle with the color. */
void fillRect(uint16 x, uint16 y, uint16 width, uint16 height, uint16 color) const;
/** Print the given text. */
void printText(uint16 x, uint16 y, const char *str, uint16 fontIndex, uint16 color) const;
/** Go through all inputs we manage and redraw their texts. */
void updateAllTexts(const InputDesc *inputs) const;
#ifdef USE_TTS
void expandHotspotTTSText(uint16 spotID);
void removeHotspotTTSText(uint16 spotID);
#endif
};
} // End of namespace Gob
#endif // GOB_HOTSPOTS_H

531
engines/gob/html_parser.cpp Normal file
View File

@@ -0,0 +1,531 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/str.h"
#include "gob/html_parser.h"
#include "gob/global.h"
#include "gob/draw.h"
#include "gob/gob.h"
#include "gob/script.h"
#include "gob/inter.h"
namespace Gob {
HtmlContext::HtmlContext(Common::SeekableReadStream *stream, GobEngine *vm) : _stream(stream), _vm(vm) {
_pos = 0;
_posBak = -1;
_field_10 = false;
_currentMarkIndex = 1;
for (uint32 i = 0; i < kMaxNbrOfHtmlMarks; ++i) {
_marks[i]._field_0 = 3;
_marks[i]._field_4 = 0;
_marks[i]._field_8 = 0;
_marks[i]._pos = 0;
for (uint32 j = 0; j < 5; ++j) {
_marks[i]._field_14[j] = 0;
}
_marks[i]._field_28 = 0;
}
}
HtmlContext::~HtmlContext() {
delete _stream;
}
Common::HashMap<Common::String, HtmlContext::HtmlTagType> *HtmlContext::_htmlTagsTypesMap = nullptr;
Common::HashMap<Common::String, char> *HtmlContext::_htmlEntitiesMap = nullptr;
HtmlContext::HtmlTagType HtmlContext::getHtmlTagType(const char *tag) {
if (_htmlTagsTypesMap == nullptr) {
_htmlTagsTypesMap = new Common::HashMap<Common::String, HtmlTagType>();
// Initialize the map on first use
(*_htmlTagsTypesMap)["BODY"] = kHtmlTagType_Body;
(*_htmlTagsTypesMap)["FONT"] = kHtmlTagType_Font;
(*_htmlTagsTypesMap)["/FONT"] = kHtmlTagType_Font_Close;
(*_htmlTagsTypesMap)["IMG"] = kHtmlTagType_Img;
(*_htmlTagsTypesMap)["A"] = kHtmlTagType_A;
(*_htmlTagsTypesMap)["/A"] = kHtmlTagType_A_Close;
(*_htmlTagsTypesMap)["TITLE"] = kHtmlTagType_Title;
(*_htmlTagsTypesMap)["/TITLE"] = kHtmlTagType_Title_Close;
(*_htmlTagsTypesMap)["/HTML"] = kHtmlTagType_HTML_Close;
(*_htmlTagsTypesMap)["BR"] = kHtmlTagType_BR;
(*_htmlTagsTypesMap)["P"] = kHtmlTagType_P;
(*_htmlTagsTypesMap)["/P"] = kHtmlTagType_P_Close;
(*_htmlTagsTypesMap)["U"] = kHtmlTagType_U;
(*_htmlTagsTypesMap)["/U"] = kHtmlTagType_U_Close;
(*_htmlTagsTypesMap)["B"] = kHtmlTagType_B;
(*_htmlTagsTypesMap)["/B"] = kHtmlTagType_B_Close;
(*_htmlTagsTypesMap)["EM"] = kHtmlTagType_EM;
(*_htmlTagsTypesMap)["/EM"] = kHtmlTagType_EM_Close;
(*_htmlTagsTypesMap)["I"] = kHtmlTagType_I;
(*_htmlTagsTypesMap)["/I"] = kHtmlTagType_I_Close;
(*_htmlTagsTypesMap)["SUB"] = kHtmlTagType_SUB;
(*_htmlTagsTypesMap)["/SUB"] = kHtmlTagType_SUB_Close;
(*_htmlTagsTypesMap)["SUP"] = kHtmlTagType_SUP;
(*_htmlTagsTypesMap)["/SUP"] = kHtmlTagType_SUP_Close;
}
if (_htmlTagsTypesMap->contains(tag))
return (*_htmlTagsTypesMap)[tag];
else
return kHtmlTagType_None;
}
char HtmlContext::getHtmlEntityLatin1Char(const char *entity) {
if (_htmlEntitiesMap == nullptr) {
_htmlEntitiesMap = new Common::HashMap<Common::String, char>();
// Initialize the map on first use
(*_htmlEntitiesMap)["quot"] = '\x22';
(*_htmlEntitiesMap)["nbsp"] = '\x20';
(*_htmlEntitiesMap)["iexcl"] = '\xA1';
(*_htmlEntitiesMap)["cent"] = '\xA2';
(*_htmlEntitiesMap)["pound"] = '\xA3';
(*_htmlEntitiesMap)["curren"] = '\xA4';
(*_htmlEntitiesMap)["yen"] = '\xA5';
(*_htmlEntitiesMap)["brvbar"] = '\xA6';
(*_htmlEntitiesMap)["sect"] = '\xA7';
(*_htmlEntitiesMap)["uml"] = '\xA8';
(*_htmlEntitiesMap)["copy"] = '\xA9';
(*_htmlEntitiesMap)["ordf"] = '\xAA';
(*_htmlEntitiesMap)["laquo"] = '\xAB';
(*_htmlEntitiesMap)["not"] = '\xAC';
(*_htmlEntitiesMap)["shy"] = '\xAD';
(*_htmlEntitiesMap)["reg"] = '\xAE';
(*_htmlEntitiesMap)["macr"] = '\xAF';
(*_htmlEntitiesMap)["deg"] = '\xB0';
(*_htmlEntitiesMap)["plusmn"] = '\xB1';
(*_htmlEntitiesMap)["sup2"] = '\xB2';
(*_htmlEntitiesMap)["sup3"] = '\xB3';
(*_htmlEntitiesMap)["acute"] = '\xB4';
(*_htmlEntitiesMap)["micro"] = '\xB5';
(*_htmlEntitiesMap)["para"] = '\xB6';
(*_htmlEntitiesMap)["middot"] = '\xB7';
(*_htmlEntitiesMap)["cedil"] = '\xB8';
(*_htmlEntitiesMap)["sup1"] = '\xB9';
(*_htmlEntitiesMap)["ordm"] = '\xBA';
(*_htmlEntitiesMap)["raquo"] = '\xBB';
(*_htmlEntitiesMap)["frac14"] = '\xBC';
(*_htmlEntitiesMap)["frac12"] = '\xBD';
(*_htmlEntitiesMap)["frac34"] = '\xBE';
(*_htmlEntitiesMap)["iquest"] = '\xBF';
(*_htmlEntitiesMap)["Agrave"] = '\xC0';
(*_htmlEntitiesMap)["Aacute"] = '\xC1';
(*_htmlEntitiesMap)["Acirc"] = '\xC2';
(*_htmlEntitiesMap)["Atilde"] = '\xC3';
(*_htmlEntitiesMap)["Auml"] = '\xC4';
(*_htmlEntitiesMap)["Aring"] = '\xC5';
(*_htmlEntitiesMap)["AElig"] = '\xC6';
(*_htmlEntitiesMap)["Ccedil"] = '\xC7';
(*_htmlEntitiesMap)["Egrave"] = '\xC8';
(*_htmlEntitiesMap)["Eacute"] = '\xC9';
(*_htmlEntitiesMap)["Ecirc"] = '\xCA';
(*_htmlEntitiesMap)["Euml"] = '\xCB';
(*_htmlEntitiesMap)["Igrave"] = '\xCC';
(*_htmlEntitiesMap)["Iacute"] = '\xCD';
(*_htmlEntitiesMap)["Icirc"] = '\xCE';
(*_htmlEntitiesMap)["Iuml"] = '\xCF';
(*_htmlEntitiesMap)["ETH"] = '\xD0';
(*_htmlEntitiesMap)["Ntilde"] = '\xD1';
(*_htmlEntitiesMap)["Ograve"] = '\xD2';
(*_htmlEntitiesMap)["Oacute"] = '\xD3';
(*_htmlEntitiesMap)["Ocirc"] = '\xD4';
(*_htmlEntitiesMap)["Otilde"] = '\xD5';
(*_htmlEntitiesMap)["Ouml"] = '\xD6';
(*_htmlEntitiesMap)["times"] = '\xD7';
(*_htmlEntitiesMap)["Oslash"] = '\xD8';
(*_htmlEntitiesMap)["Ugrave"] = '\xD9';
(*_htmlEntitiesMap)["Uacute"] = '\xDA';
(*_htmlEntitiesMap)["Ucirc"] = '\xDB';
(*_htmlEntitiesMap)["Uuml"] = '\xDC';
(*_htmlEntitiesMap)["Yacute"] = '\xDD';
(*_htmlEntitiesMap)["THORN"] = '\xDE';
(*_htmlEntitiesMap)["szlig"] = '\xDF';
(*_htmlEntitiesMap)["agrave"] = '\xE0';
(*_htmlEntitiesMap)["aacute"] = '\xE1';
(*_htmlEntitiesMap)["acirc"] = '\xE2';
(*_htmlEntitiesMap)["atilde"] = '\xE3';
(*_htmlEntitiesMap)["auml"] = '\xE4';
(*_htmlEntitiesMap)["aring"] = '\xE5';
(*_htmlEntitiesMap)["aelig"] = '\xE6';
(*_htmlEntitiesMap)["ccedil"] = '\xE7';
(*_htmlEntitiesMap)["egrave"] = '\xE8';
(*_htmlEntitiesMap)["eacute"] = '\xE9';
(*_htmlEntitiesMap)["ecirc"] = '\xEA';
(*_htmlEntitiesMap)["euml"] = '\xEB';
(*_htmlEntitiesMap)["igrave"] = '\xEC';
(*_htmlEntitiesMap)["iacute"] = '\xED';
(*_htmlEntitiesMap)["icirc"] = '\xEE';
(*_htmlEntitiesMap)["iuml"] = '\xEF';
(*_htmlEntitiesMap)["eth"] = '\xF0';
(*_htmlEntitiesMap)["ntilde"] = '\xF1';
(*_htmlEntitiesMap)["ograve"] = '\xF2';
(*_htmlEntitiesMap)["oacute"] = '\xF3';
(*_htmlEntitiesMap)["ocirc"] = '\xF4';
(*_htmlEntitiesMap)["otilde"] = '\xF5';
(*_htmlEntitiesMap)["ouml"] = '\xF6';
(*_htmlEntitiesMap)["divide"] = '\xF7';
(*_htmlEntitiesMap)["oslash"] = '\xF8';
(*_htmlEntitiesMap)["ugrave"] = '\xF9';
(*_htmlEntitiesMap)["uacute"] = '\xFA';
(*_htmlEntitiesMap)["ucirc"] = '\xFB';
(*_htmlEntitiesMap)["uuml"] = '\xFC';
(*_htmlEntitiesMap)["yacute"] = '\xFD';
(*_htmlEntitiesMap)["thorn"] = '\xFE';
(*_htmlEntitiesMap)["yuml"] = '\xFF';
(*_htmlEntitiesMap)["gt"] = '\x3E';
(*_htmlEntitiesMap)["lt"] = '\x3C';
}
if (*entity == '&') {
++entity;
}
if (*entity == '#') {
++entity;
int code = atoi(entity);
if (code >= 32 && code <= 255) {
return (char) code;
} else {
warning("HtmlContext::getHtmlEntityLatin1Char(): Invalid char value %s", entity);
return '&';
}
}
if (_htmlEntitiesMap->contains(entity))
return (*_htmlEntitiesMap)[entity];
else {
warning("HtmlContext::getHtmlEntityLatin1Char(): Unknown entity \"%s\"", entity);
return '&';
}
}
Common::String HtmlContext::substituteHtmlEntities(const char *text) {
Common::String result;
const char *charPtr = text;
while (*charPtr != '\0') {
if (*charPtr == '&') {
Common::String entityName = popStringPrefix(&charPtr, ';');
char entityChar = getHtmlEntityLatin1Char(entityName.c_str());
result += entityChar;
} else if (*charPtr == '\r') {
result += ' ';
++charPtr;
} else {
result += *charPtr;
}
if (*charPtr != '\0')
++charPtr;
}
return result;
}
Common::String HtmlContext::popStringPrefix(const char **charPtr, char sep) {
const char *startPtr = *charPtr;
if (sep == ' ') {
while (!Common::isSpace(**charPtr) && **charPtr != '\0')
++*charPtr;
return Common::String(startPtr, *charPtr - startPtr);
} else {
while (**charPtr != sep && **charPtr != '\0')
++*charPtr;
return Common::String(startPtr, *charPtr - startPtr);
}
}
void HtmlContext::seekCommand(Common::String command, Common::String commandArg, uint16 destVar) {
if (!_stream) {
warning("HtmlContext::seekCommand(): No open stream");
return;
}
if (command.hasPrefix("SAVEMARK")) {
if (_buffer[0] == '\0') {
_currentTagType = HtmlContext::kHtmlTagType_HTML_Close;
return;
}
if (command == "SAVEMARK_BACK") {
if (_posBak == -1) {
warning("o7_seekHtmlFile(): No saved position");
} else {
debugC(5, kDebugGameFlow, "o7_seekHtmlFile: SAVEMARK_BACK pos %d -> %d", _pos, _posBak);
_pos = _posBak;
}
}
const char*htmlBufferPtr = _buffer;
if (!commandArg.empty()) {
while (*htmlBufferPtr != '\0') {
Common::String string(htmlBufferPtr, 4 * _vm->_global->_inter_animDataSize);
string = HtmlContext::substituteHtmlEntities(string.c_str());
if (strcmp(commandArg.c_str(), string.c_str()) == 0) {
break;
}
++htmlBufferPtr;
}
}
if (strcmp(htmlBufferPtr, commandArg.c_str()) == 0) {
_pos = _pos - strlen(_buffer) + htmlBufferPtr - _buffer;
} else if (!commandArg.empty()) {
warning("o7_seekHtmlFile(): Cannot find string \"%s\" while using SAVEMARK", commandArg.c_str());
}
if (_currentMarkIndex < 20) {
HtmlMark &mark = _marks[_currentMarkIndex];
mark._field_0 = READ_VARO_UINT32(destVar);
mark._field_4 = READ_VARO_UINT32(destVar + 4);
mark._field_8 = READ_VARO_UINT32(destVar + 8);
mark._field_C = READ_VARO_UINT32(destVar + 0xC);
mark._pos = _pos;
for (uint32 i = 0; i < 5; ++i) {
mark._field_14[i] = READ_VARO_UINT32(destVar + 0x14 + i * 4);
}
mark._field_28 = READ_VARO_UINT32(destVar + 0x28);
++_currentMarkIndex;
} else {
warning("o7_seekHtmlFile(): Mark index %d out of range while using SAVEMARK (max number of marks = %d)",
_currentMarkIndex,
20);
}
} else if (command.hasPrefix("GETMARK")) {
int markIndex = atoi(commandArg.c_str());
if (markIndex < 0 || markIndex >= (int) kMaxNbrOfHtmlMarks) {
warning("o7_seekHtmlFile(): mark index %d out of range", markIndex);
return;
}
_currentMarkIndex = markIndex;
HtmlMark &mark = _marks[markIndex];
_pos = mark._pos;
WRITE_VAR_OFFSET(destVar, mark._field_0);
WRITE_VAR_OFFSET(destVar + 4, mark._field_4);
WRITE_VAR_OFFSET(destVar + 8, mark._field_8);
WRITE_VAR_OFFSET(destVar + 0xC, mark._field_C);
for (uint32 i = 0; i < 5; ++i) {
WRITE_VAR_OFFSET(destVar + 0x14 + i * 4, mark._field_14[i]);
}
WRITE_VAR_OFFSET(destVar + 0x28, mark._field_28);
} else if (command == "SEEK") {
if (commandArg == "0")
_pos = 0;
if (_pos >= 0)
_stream->seek(_pos, SEEK_SET);
else
warning("o7_seekHtmlFile(): Invalid seek position %d", _pos);
// NB: Seek to other offsets than 0 does not seem to be implemented in the original engine
} else {
warning("o7_seekHtmlFile(): Unknown command \"%s\"", command.c_str());
}
}
void HtmlContext::parseTagAttributes(const char *tagAttributes) {
const char *tagAttributesPtr = tagAttributes;
while (*tagAttributesPtr != '\0') {
// Skip leading spaces
while (Common::isSpace(*tagAttributesPtr))
++tagAttributesPtr;
if (*tagAttributesPtr == '\0')
return;
Common::String attrName = popStringPrefix(&tagAttributesPtr, '=');
if (attrName.empty()) {
warning("HtmlContext::parseTagAttributes(): Missing '=' in tag attributes");
return;
}
Common::String attrValue;
if (tagAttributesPtr[1] == '\"') {
tagAttributesPtr += 2;
attrValue = popStringPrefix(&tagAttributesPtr, '\"');
} else {
++tagAttributesPtr;
attrValue = popStringPrefix(&tagAttributesPtr, ' ');
}
attrValue.toUppercase();
// Handle attribute and value
switch (_currentTagType) {
case kHtmlTagType_Font:
if (strcmp(attrName.c_str(), "FACE") == 0)
_htmlVariables[0] = attrValue;
else if (strcmp(attrName.c_str(), "SIZE") == 0)
_htmlVariables[1] = attrValue;
else if (strcmp(attrName.c_str(), "COLOR") == 0) {
_htmlVariables[2] = attrValue;
}
break;
case kHtmlTagType_Img:
if (strcmp(attrName.c_str(), "SRC") == 0)
_htmlVariables[0] = attrValue;
else if (strcmp(attrName.c_str(), "HEIGHT") == 0)
_htmlVariables[1] = attrValue;
else if (strcmp(attrName.c_str(), "WIDTH") == 0)
_htmlVariables[2] = attrValue;
else if (strcmp(attrName.c_str(), "BORDER") == 0)
_htmlVariables[3] = attrValue;
_htmlVariables[0] = attrValue;
if (!_field_10) {
_posBak = _pos;
}
break;
case kHtmlTagType_A:
if (strcmp(attrName.c_str(), "NAME") == 0)
_htmlVariables[0] = attrValue;
else if (strcmp(attrName.c_str(), "HREF") == 0) {
_htmlVariables[1] = attrValue;
_posBak = _pos;
_field_10 = true;
}
break;
default:
break;
}
if (*tagAttributesPtr == '\"')
++tagAttributesPtr;
}
}
void HtmlContext::cleanTextNode(int animDataSize) {
_buffer[animDataSize * 4 - 1] = '\0';
size_t len = strlen(_buffer);
char *htmlBufferPtr = strchr(_buffer, '<');
if (!htmlBufferPtr) {
char* charPtr2 = _buffer + len - 1;
while (charPtr2 > _buffer && *charPtr2 != ' ') {
--charPtr2;
}
if (charPtr2 > _buffer) {
if (*charPtr2 == ' ')
charPtr2[1] = '\0';
else
*charPtr2 = '\0';
}
} else {
*htmlBufferPtr = '\0';
}
htmlBufferPtr = strchr(_buffer, '&');
if (htmlBufferPtr) {
char *charPtr2 = strchr(_buffer, ';');
if (!charPtr2 || charPtr2 < htmlBufferPtr) {
*htmlBufferPtr = '\0';
}
}
}
void HtmlContext::nextKeyword(uint16 destVar, uint16 destVarTagType) {
_currentTagType = kHtmlTagType_None;
if (!_stream) {
warning("HtmlContext::nextKeyword(): No open stream");
return;
}
if (!_stream->seek(_pos, SEEK_SET)) {
_currentTagType = kHtmlTagType_HTML_Close;
return;
}
memset(_buffer, 0, sizeof(_buffer));
_stream->read(_buffer, sizeof(_buffer) - 1);
const char *htmlBufferPtr = _buffer;
if (*htmlBufferPtr == '<') {
++htmlBufferPtr;
Common::String tagAndAttributes = popStringPrefix(&htmlBufferPtr, '>');
const char *tagAndAttributesPtr = tagAndAttributes.c_str();
if (!tagAndAttributes.empty()) {
Common::String tagName = popStringPrefix(&tagAndAttributesPtr, ' ');
_currentTagType = getHtmlTagType(tagName.c_str());
}
if (_currentTagType == kHtmlTagType_None) {
while (*htmlBufferPtr != '>' && *htmlBufferPtr != '\0') {
++htmlBufferPtr;
}
} else {
// Handle tag attributes
parseTagAttributes(tagAndAttributesPtr);
}
if (*htmlBufferPtr == '>') {
++htmlBufferPtr;
// Skip CRLF
while (*htmlBufferPtr == '\r' || *htmlBufferPtr == '\n') {
++htmlBufferPtr;
}
}
} else {
_currentTagType = kHtmlTagType_OutsideTag;
cleanTextNode(_vm->_global->_inter_animDataSize);
Common::String text = popStringPrefix(&htmlBufferPtr, '<');
if (text.empty()) {
_currentTagType = kHtmlTagType_Error;
} else {
_htmlVariables[0] = substituteHtmlEntities(text.c_str());;
}
}
_pos = _pos + (htmlBufferPtr - _buffer);
// Write Html info to game variables
WRITE_VAR_OFFSET(destVarTagType, _currentTagType);
for (int i = 0; i < 10; ++i) {
WRITE_VARO_STR(destVar + i * 4 * _vm->_global->_inter_animDataSize,
_htmlVariables[i].substr(0, 4 * _vm->_global->_inter_animDataSize).c_str());
}
}
} // End of namespace Gob

120
engines/gob/html_parser.h Normal file
View File

@@ -0,0 +1,120 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_HTML_PARSER_H
#define GOB_HTML_PARSER_H
#include "common/hashmap.h"
#include "common/str.h"
#include "gob/gob.h"
namespace Common {
class SeekableReadStream;
}
namespace Gob {
struct HtmlMark {
uint32 _field_0;
uint32 _field_4;
uint32 _field_8;
uint32 _field_C;
uint32 _pos;
uint32 _field_14[5];
uint32 _field_28;
};
class HtmlContext {
public:
HtmlContext(Common::SeekableReadStream *stream, GobEngine *vm);
~HtmlContext();
void seekCommand(Common::String command, Common::String commandArg, uint16 destVar);
void nextKeyword(uint16 destVar, uint16 destVarTagType);
private:
enum HtmlTagType {
kHtmlTagType_None = -1,
kHtmlTagType_Error,
kHtmlTagType_OutsideTag,
kHtmlTagType_Body,
kHtmlTagType_Font,
kHtmlTagType_Font_Close,
kHtmlTagType_Img,
kHtmlTagType_A,
kHtmlTagType_A_Close,
kHtmlTagType_Title,
kHtmlTagType_Title_Close,
kHtmlTagType_HTML_Close,
kHtmlTagType_BR,
kHtmlTagType_P,
kHtmlTagType_P_Close,
kHtmlTagType_U,
kHtmlTagType_U_Close,
kHtmlTagType_B,
kHtmlTagType_B_Close,
kHtmlTagType_EM,
kHtmlTagType_EM_Close,
kHtmlTagType_I,
kHtmlTagType_I_Close,
kHtmlTagType_SUB,
kHtmlTagType_SUB_Close,
kHtmlTagType_SUP,
kHtmlTagType_SUP_Close,
};
static Common::HashMap<Common::String, HtmlTagType> *_htmlTagsTypesMap;
static Common::HashMap<Common::String, char> *_htmlEntitiesMap;
static Common::String popStringPrefix(const char **charPtr, char sep);
static HtmlTagType getHtmlTagType(const char *tag);
static char getHtmlEntityLatin1Char(const char *entity);
static Common::String substituteHtmlEntities(const char *text);
void parseTagAttributes(const char* tagAttributes);
void cleanTextNode(int animDataSize);
static const uint32 kMaxNbrOfHtmlMarks = 20;
HtmlTagType _currentTagType;
Common::SeekableReadStream *_stream;
int _pos;
int _posBak;
bool _field_10;
char _buffer[256];
HtmlMark _marks[kMaxNbrOfHtmlMarks];
uint32 _currentMarkIndex;
Common::String _htmlVariables[10];
GobEngine *_vm;
};
} // End of namespace Gob
#endif // GOB_HTML_PARSER_H

168
engines/gob/image/brc.cpp Normal file
View File

@@ -0,0 +1,168 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*/
#include "brc.h"
#include "common/stream.h"
#include "common/textconsole.h"
namespace Image {
BRCDecoder::BRCDecoder(): _palette(0), _format(2, 5, 5, 5, 0, 10, 5, 0, 0) {
}
BRCDecoder::~BRCDecoder() {
destroy();
}
void BRCDecoder::destroy() {
_surface.free();
}
void BRCDecoder::readRawChunk(Common::SeekableReadStream &stream, uint16 *&dest) {
byte chunkSize = stream.readByte();
for (byte i = 0; i < chunkSize; i++) {
*dest++ = stream.readUint16LE();
}
}
void BRCDecoder::readRLEChunk(Common::SeekableReadStream &stream, uint16 *&dest) {
byte chunkSize = stream.readByte();
for (byte i = 0; i < chunkSize; i++) {
byte runLength = stream.readByte();
uint16 pixel = stream.readUint16LE();
for (byte j = 0; j < runLength; j++)
*dest++ = pixel;
}
}
void BRCDecoder::readRawChunkColumnWise(Common::SeekableReadStream &stream, uint16 *&dest, uint16 *&destColumnStart, uint32 &remainingHeight) {
byte chunkSize = stream.readByte();
for (byte i = 0; i < chunkSize; i++) {
uint16 pixel = stream.readUint16LE();
*dest = pixel;
remainingHeight--;
if (remainingHeight == 0) {
++destColumnStart;
dest = destColumnStart;
remainingHeight = _surface.h;
} else {
dest += _surface.w;
}
}
}
void BRCDecoder::readRLEChunkColumnWise(Common::SeekableReadStream &stream, uint16 *&dest, uint16 *&destColumnStart, uint32 &remainingHeight) {
byte chunkSize = stream.readByte();
for (byte i = 0; i < chunkSize; i++) {
byte runLength = stream.readByte();
uint16 pixel = stream.readUint16LE();
for (byte j = 0; j < runLength; j++) {
*dest = pixel;
remainingHeight--;
if (remainingHeight == 0) {
++destColumnStart;
dest = destColumnStart;
remainingHeight = _surface.h;
} else {
dest += _surface.w;
}
}
}
}
void BRCDecoder::loadBRCData(Common::SeekableReadStream &stream, uint32 nbrOfChunks, bool firstChunkIsRLE) {
uint16 *dest = (uint16*) _surface.getBasePtr(0, 0);
if (firstChunkIsRLE) {
for (uint32 i = 0; i < nbrOfChunks; i++) {
readRLEChunk(stream, dest);
readRawChunk(stream, dest);
}
} else {
for (uint32 i = 0; i < nbrOfChunks; i++) {
readRawChunk(stream, dest);
readRLEChunk(stream, dest);
}
}
}
void BRCDecoder::loadBRCDataColumnWise(Common::SeekableReadStream &stream, uint32 nbrOfChunks, bool firstChunkIsRLE) {
uint16 *dest = (uint16*) _surface.getBasePtr(0, 0);
uint16 *destColumnStart = dest;
uint32 remainingHeight = _surface.h;
if (firstChunkIsRLE) {
for (uint32 i = 0; i < nbrOfChunks; i++) {
readRLEChunkColumnWise(stream, dest, destColumnStart, remainingHeight);
readRawChunkColumnWise(stream, dest, destColumnStart, remainingHeight);
}
} else {
for (uint32 i = 0; i < nbrOfChunks; i++) {
readRawChunkColumnWise(stream, dest, destColumnStart, remainingHeight);
readRLEChunkColumnWise(stream, dest, destColumnStart, remainingHeight);
}
}
}
bool BRCDecoder::loadStream(Common::SeekableReadStream &stream) {
destroy();
uint32 fileType = stream.readUint32BE();
if (fileType != MKTAG('B', 'R', 'C', '\0')) {
warning("Missing BRC header");
return false;
}
stream.skip(8); // unknown
stream.readUint32LE(); // data size
uint32 width = stream.readUint32LE();
uint32 height = stream.readUint32LE();
if (width == 0 || height == 0)
return false;
uint32 bpp = stream.readUint32LE();
if (bpp != 2) {
warning("Unsupported bpp (%d) for BRCDecoder", bpp);
return false;
}
_surface.create(width, height, _format);
uint32 flags = stream.readUint32LE();
uint32 headerSize = stream.readUint32LE();
uint32 nbrOfChunks = stream.readUint32LE();
bool columnWise = !(flags & 0x10);
bool firstChunkIsRLE = flags & 2;
stream.seek(headerSize, SEEK_SET);
if (columnWise)
loadBRCDataColumnWise(stream, nbrOfChunks, firstChunkIsRLE);
else
loadBRCData(stream, nbrOfChunks, firstChunkIsRLE);
return true;
}
} // End of namespace Image

79
engines/gob/image/brc.h Normal file
View File

@@ -0,0 +1,79 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*/
/**
* @file
* Image decoder used in engines:
* - gob
*/
#ifndef IMAGE_BRC_H
#define IMAGE_BRC_H
#include "graphics/surface.h"
#include "image/image_decoder.h"
namespace Common {
class SeekableReadStream;
}
namespace Graphics {
struct Surface;
}
namespace Image {
/**
* @defgroup image_brc BRC decoder
* @ingroup image
*
* @brief Decoder for BRC images.
*
* @{
*/
class BRCDecoder : public ImageDecoder {
public:
BRCDecoder();
~BRCDecoder() override;
// ImageDecoder API
void destroy() override;
bool loadStream(Common::SeekableReadStream &stream) override;
const Graphics::Surface *getSurface() const override { return &_surface; }
const Graphics::Palette &getPalette() const override { return _palette; }
private:
Graphics::Surface _surface;
Graphics::Palette _palette;
Graphics::PixelFormat _format;
void loadBRCData(Common::SeekableReadStream &stream, uint32 nbrOfChunks, bool firstChunkIsRLE);
void loadBRCDataColumnWise(Common::SeekableReadStream &stream, uint32 nbrOfChunks, bool firstChunkIsRLE);
void readRawChunk(Common::SeekableReadStream &stream, uint16 *&dest);
void readRLEChunk(Common::SeekableReadStream &stream, uint16 *&dest);
void readRawChunkColumnWise(Common::SeekableReadStream &stream, uint16 *&dest, uint16 *&destColumnStart, uint32 &remainingHeight);
void readRLEChunkColumnWise(Common::SeekableReadStream &stream, uint16 *&dest, uint16 *&destColumnStart, uint32 &remainingHeight);
};
} // End of namespace Image
#endif

152
engines/gob/iniconfig.cpp Normal file
View File

@@ -0,0 +1,152 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/memstream.h"
#include "gob/iniconfig.h"
#include "gob/save/saveload.h"
namespace Gob {
INIConfig::INIConfig(GobEngine *vm) : _vm(vm) {
}
INIConfig::~INIConfig() {
for (ConfigMap::iterator c = _configs.begin(); c != _configs.end(); ++c)
delete c->_value.config;
}
bool INIConfig::getValue(Common::String &result, const Common::String &file, bool isCd,
const Common::String &section, const Common::String &key,
const Common::String &def) {
Config config;
if (!getConfig(file, config)) {
if (!openConfig(file, isCd, config)) {
result = def;
return false;
}
}
if (!config.config->getKey(key, section, result)) {
result = def;
return false;
}
return true;
}
bool INIConfig::setValue(const Common::String &file, bool isCd, const Common::String &section,
const Common::String &key, const Common::String &value) {
Config config;
if (!getConfig(file, config))
if (!createConfig(file, isCd, config))
return false;
config.config->setKey(key, section, value);
SaveLoad::SaveMode mode = _vm->_saveLoad->getSaveMode(file.c_str());
if (mode == SaveLoad::kSaveModeSave) {
// Sync changes to save file
Common::MemoryWriteStreamDynamic stream(DisposeAfterUse::YES);
config.config->saveToStream(stream);
_vm->_saveLoad->saveFromRaw(file.c_str(), stream.getData(), stream.size(), 0);
}
return true;
}
bool INIConfig::getConfig(const Common::String &file, Config &config) {
if (!_configs.contains(file))
return false;
config = _configs.getVal(file);
return true;
}
bool INIConfig::readConfigFromDisk(const Common::String &file, bool isCd, Gob::INIConfig::Config &config) {
if (!isCd && _vm->_saveLoad->getSaveMode(file.c_str()) == SaveLoad::kSaveModeSave) {
debugC(3, kDebugFileIO, "Loading INI from save file \"%s\"", file.c_str());
// Read from save file
int size = _vm->_saveLoad->getSize(file.c_str());
if (size < 0) {
debugC(3, kDebugFileIO, "Failed to get size of save file \"%s\"", file.c_str());
return false;
}
byte *data = new byte[size];
_vm->_saveLoad->loadToRaw(file.c_str(), data, size, 0);
Common::MemoryReadStream stream(data, size, DisposeAfterUse::YES);
if (!config.config->loadFromStream(stream)) {
debugC(3, kDebugFileIO, "Failed to load INI from save file \"%s\"", file.c_str());
return false;
}
} else {
// GOB uses \ as a path separator but
// it almost always manipulates base names
debugC(3, kDebugFileIO, "Loading INI from plain file \"%s\"", file.c_str());
if (!config.config->loadFromFile(Common::Path(file, '\\'))) {
return false;
}
}
return true;
}
bool INIConfig::openConfig(const Common::String &file, bool isCd, Config &config) {
config.config = new Common::INIFile();
config.config->allowNonEnglishCharacters();
config.created = false;
if (!readConfigFromDisk(file, isCd, config)) {
delete config.config;
config.config = nullptr;
return false;
}
_configs.setVal(file, config);
return true;
}
bool INIConfig::createConfig(const Common::String &file, bool isCd, Config &config) {
config.config = new Common::INIFile();
config.config->allowNonEnglishCharacters();
config.created = true;
readConfigFromDisk(file, isCd, config); // May return false in case we are dealing with a temporary file
_configs.setVal(file, config);
return true;
}
} // End of namespace Gob

71
engines/gob/iniconfig.h Normal file
View File

@@ -0,0 +1,71 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_INICONFIG_H
#define GOB_INICONFIG_H
#include "common/formats/ini-file.h"
#include "common/hashmap.h"
#include "common/str.h"
#include "gob/gob.h"
namespace Gob {
class INIConfig {
public:
INIConfig(GobEngine *vm);
~INIConfig();
bool getValue(Common::String &result, const Common::String &file, bool isCd,
const Common::String &section, const Common::String &key,
const Common::String &def = "");
bool setValue(const Common::String &file, bool isCd, const Common::String &section,
const Common::String &key, const Common::String &value);
private:
struct Config {
Common::INIFile *config;
bool created;
};
typedef Common::HashMap<Common::String, Config, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> ConfigMap;
GobEngine *_vm;
ConfigMap _configs;
bool getConfig(const Common::String &file, Config &config);
bool readConfigFromDisk(const Common::String &file, bool isCd, Config &config);
bool openConfig(const Common::String &file, bool isCd, Config &config);
bool createConfig(const Common::String &file, bool isCd, Config &config);
};
} // End of namespace Gob
#endif // GOB_INICONFIG_H

225
engines/gob/init.cpp Normal file
View File

@@ -0,0 +1,225 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "gob/gob.h"
#include "gob/init.h"
#include "gob/global.h"
#include "gob/util.h"
#include "gob/dataio.h"
#include "gob/draw.h"
#include "gob/game.h"
#include "gob/script.h"
#include "gob/palanim.h"
#include "gob/inter.h"
#include "gob/video.h"
#include "gob/videoplayer.h"
#include "gob/sound/sound.h"
#include "gob/demos/scnplayer.h"
#include "gob/demos/batplayer.h"
#include "gob/pregob/pregob.h"
namespace Gob {
const char *const Init::_fontNames[] = { "jeulet1.let", "jeulet2.let", "jeucar1.let", "jeumath.let" };
Init::Init(GobEngine *vm) : _vm(vm) {
_palDesc = nullptr;
}
Init::~Init() {
}
void Init::cleanup() {
_vm->_global->_primarySurfDesc.reset();
_vm->_sound->speakerOff();
_vm->_sound->blasterStop(0);
_vm->_dataIO->closeArchive(true);
}
void Init::doDemo() {
if (_vm->isSCNDemo()) {
// This is a non-interactive demo with a SCN script and VMD videos
SCNPlayer scnPlayer(_vm);
if (_vm->_demoIndex > 0)
scnPlayer.play(_vm->_demoIndex - 1);
}
if (_vm->isBATDemo()) {
// This is a non-interactive demo with a BAT script and videos
BATPlayer batPlayer(_vm);
if (_vm->_demoIndex > 0)
batPlayer.play(_vm->_demoIndex - 1);
}
}
void Init::initGame() {
initVideo();
updateConfig();
if (!_vm->isDemo()) {
if (_vm->_dataIO->hasFile(_vm->_startStk))
_vm->_dataIO->openArchive(_vm->_startStk, true);
}
_vm->_util->initInput();
_vm->_video->initPrimary(_vm->_global->_videoMode);
_vm->_global->_mouseXShift = 1;
_vm->_global->_mouseYShift = 1;
_palDesc = new Video::PalDesc;
_vm->validateVideoMode(_vm->_global->_videoMode);
_vm->_global->_setAllPalette = true;
_palDesc->vgaPal = _vm->_draw->_vgaPalette;
_palDesc->unused1 = _vm->_draw->_unusedPalette1;
_palDesc->unused2 = _vm->_draw->_unusedPalette2;
_vm->_video->setFullPalette(_palDesc);
for (int i = 0; i < 10; i++)
_vm->_draw->_fascinWin[i].id = -1;
_vm->_draw->_winCount = 0;
for (int i = 0; i < 8; i++)
_vm->_draw->_fonts[i] = nullptr;
if (_vm->isDemo()) {
doDemo();
delete _palDesc;
_vm->_video->initPrimary(-1);
cleanup();
return;
}
if (_vm->_preGob) {
_vm->_preGob->run();
delete _palDesc;
_vm->_video->initPrimary(-1);
cleanup();
return;
}
Common::SeekableReadStream *infFile = _vm->_dataIO->getFile("intro.inf");
if (!infFile) {
for (int i = 0; i < 4; i++)
_vm->_draw->loadFont(i, _fontNames[i]);
} else {
for (int i = 0; i < 8; i++) {
if (infFile->eos())
break;
Common::String font = infFile->readLine();
if (infFile->eos() && font.empty())
break;
font += ".let";
_vm->_draw->loadFont(i, font.c_str());
}
delete infFile;
}
if (_vm->_dataIO->hasFile(_vm->_startTot)) {
_vm->_inter->allocateVars(Script::getVariablesCount(_vm->_startTot.c_str(), _vm));
_vm->_game->_curTotFile = _vm->_startTot;
_vm->_sound->cdTest(1, "GOB");
_vm->_sound->cdLoadLIC("gob.lic");
// Search for a Coktel logo animation or image to display
if (_vm->_dataIO->hasFile("coktel.imd")) {
_vm->_draw->initScreen();
_vm->_draw->_cursorIndex = -1;
_vm->_util->longDelay(200); // Letting everything settle
VideoPlayer::Properties props;
int slot;
if ((slot = _vm->_vidPlayer->openVideo(true, "coktel.imd", props)) >= 0) {
_vm->_vidPlayer->play(slot, props);
_vm->_vidPlayer->closeVideo(slot);
}
_vm->_draw->closeScreen();
} else if (_vm->_dataIO->hasFile("coktel.clt")) {
Common::SeekableReadStream *stream = _vm->_dataIO->getFile("coktel.clt");
if (stream) {
_vm->_draw->initScreen();
_vm->_util->clearPalette();
stream->read((byte *)_vm->_draw->_vgaPalette, 768);
delete stream;
int32 size;
byte *sprite = _vm->_dataIO->getFile("coktel.ims", size);
if (sprite) {
_vm->_video->drawPackedSprite(sprite, 320, 200, 0, 0, 0,
*_vm->_draw->_frontSurface);
_vm->_palAnim->fade(_palDesc, 0, 0);
_vm->_util->delay(500);
delete[] sprite;
}
_vm->_draw->closeScreen();
}
}
_vm->_game->start();
_vm->_sound->cdStop();
_vm->_sound->cdUnloadLIC();
}
delete _palDesc;
_vm->_dataIO->closeArchive(true);
_vm->_video->initPrimary(-1);
cleanup();
}
void Init::updateConfig() {
}
} // End of namespace Gob

125
engines/gob/init.h Normal file
View File

@@ -0,0 +1,125 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#ifndef GOB_INIT_H
#define GOB_INIT_H
#include "gob/gob.h"
#include "gob/video.h"
namespace Gob {
class Init {
public:
Init(GobEngine *vm);
virtual ~Init();
virtual void initGame();
virtual void initVideo() = 0;
virtual void updateConfig();
protected:
Video::PalDesc *_palDesc;
static const char *const _fontNames[4];
GobEngine *_vm;
void cleanup();
void doDemo();
};
class Init_v1 : public Init {
public:
Init_v1(GobEngine *vm);
~Init_v1() override;
void initVideo() override;
};
class Init_Geisha : public Init_v1 {
public:
Init_Geisha(GobEngine *vm);
~Init_Geisha() override;
void initVideo() override;
};
class Init_v2 : public Init_v1 {
public:
Init_v2(GobEngine *vm);
~Init_v2() override;
void initVideo() override;
void initGame() override;
};
class Init_v3 : public Init_v2 {
public:
Init_v3(GobEngine *vm);
~Init_v3() override;
void initVideo() override;
void updateConfig() override;
};
class Init_v4 : public Init_v3 {
public:
Init_v4(GobEngine *vm);
~Init_v4() override;
void updateConfig() override;
};
class Init_v6 : public Init_v3 {
public:
Init_v6(GobEngine *vm);
~Init_v6() override;
void initGame() override;
};
class Init_Fascination : public Init_v2 {
public:
Init_Fascination(GobEngine *vm);
~Init_Fascination() override;
void updateConfig() override;
void initGame() override;
};
class Init_v7 : public Init_v2 {
public:
Init_v7(GobEngine *vm);
~Init_v7() override;
void initGame() override;
};
} // End of namespace Gob
#endif // GOB_INIT_H

View File

@@ -0,0 +1,60 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "gob/gob.h"
#include "gob/init.h"
#include "gob/game.h"
#include "gob/global.h"
namespace Gob {
Init_Fascination::Init_Fascination(GobEngine *vm) : Init_v2(vm) {
}
Init_Fascination::~Init_Fascination() {
}
void Init_Fascination::updateConfig() {
// In Fascination, some empty texts are present and used to clean up the text area.
// Using _doSubtitles does the trick.
// The first obvious example is in the hotel hall: 'Use ...' is displayed at
// the same place than the character dialogs.
_vm->_global->_doSubtitles = true;
}
void Init_Fascination::initGame() {
// HACK - Suppress
// the PC Speaker, as the script checks in the intro for it's presence
// to play or not some noices.
_vm->_global->_soundFlags = MIDI_FLAG | BLASTER_FLAG | ADLIB_FLAG;
Init::initGame();
}
} // End of namespace Gob

View File

@@ -0,0 +1,52 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "gob/gob.h"
#include "gob/init.h"
#include "gob/global.h"
#include "gob/draw.h"
#include "gob/video.h"
namespace Gob {
Init_Geisha::Init_Geisha(GobEngine *vm) : Init_v1(vm) {
}
Init_Geisha::~Init_Geisha() {
}
void Init_Geisha::initVideo() {
Init_v1::initVideo();
_vm->_draw->_cursorWidth = 16;
_vm->_draw->_cursorHeight = 23;
_vm->_draw->_transparentCursor = 1;
}
} // End of namespace Gob

64
engines/gob/init_v1.cpp Normal file
View File

@@ -0,0 +1,64 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/endian.h"
#include "gob/gob.h"
#include "gob/init.h"
#include "gob/global.h"
#include "gob/draw.h"
namespace Gob {
Init_v1::Init_v1(GobEngine *vm) : Init(vm) {
}
Init_v1::~Init_v1() {
}
void Init_v1::initVideo() {
if (_vm->_global->_videoMode)
_vm->validateVideoMode(_vm->_global->_videoMode);
_vm->_global->_mousePresent = 1;
if ((_vm->_global->_videoMode == 0x13) && !_vm->isEGA())
_vm->_global->_colorCount = 256;
_vm->_global->_pPaletteDesc = &_vm->_global->_paletteStruct;
_vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaPalette;
_vm->_global->_pPaletteDesc->unused1 = _vm->_global->_unusedPalette1;
_vm->_global->_pPaletteDesc->unused2 = _vm->_global->_unusedPalette2;
_vm->_video->initSurfDesc(320, 200, PRIMARY_SURFACE);
_vm->_draw->_cursorWidth = 16;
_vm->_draw->_cursorHeight = 16;
_vm->_draw->_transparentCursor = 1;
}
} // End of namespace Gob

96
engines/gob/init_v2.cpp Normal file
View File

@@ -0,0 +1,96 @@
/* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*
* This file is dual-licensed.
* In addition to the GPLv3 license mentioned above, this code is also
* licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
* full text of the license.
*
*/
#include "common/config-manager.h"
#include "common/endian.h"
#include "gob/gob.h"
#include "gob/init.h"
#include "gob/global.h"
#include "gob/draw.h"
#include "gob/video.h"
namespace Gob {
Init_v2::Init_v2(GobEngine *vm) : Init_v1(vm) {
}
Init_v2::~Init_v2() {
}
void Init_v2::initVideo() {
if (_vm->_global->_videoMode)
_vm->validateVideoMode(_vm->_global->_videoMode);
_vm->_draw->_frontSurface = _vm->_global->_primarySurfDesc;
_vm->_video->initSurfDesc(_vm->_video->_surfWidth, _vm->_video->_surfHeight, PRIMARY_SURFACE);
_vm->_global->_mousePresent = 1;
_vm->_global->_colorCount = 16;
if (!_vm->isEGA() &&
!_vm->is16Colors() &&
((_vm->getPlatform() == Common::kPlatformDOS) ||
(_vm->getPlatform() == Common::kPlatformMacintosh) ||
(_vm->getPlatform() == Common::kPlatformWindows)) &&
((_vm->_global->_videoMode == 0x13) ||
(_vm->_global->_videoMode == 0x14)))
_vm->_global->_colorCount = 256;
_vm->_global->_pPaletteDesc = &_vm->_global->_paletteStruct;
_vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaPalette;
_vm->_global->_pPaletteDesc->unused1 = _vm->_global->_unusedPalette1;
_vm->_global->_pPaletteDesc->unused2 = _vm->_global->_unusedPalette2;
_vm->_video->initSurfDesc(_vm->_video->_surfWidth, _vm->_video->_surfHeight, PRIMARY_SURFACE);
_vm->_draw->_cursorWidth = 16;
_vm->_draw->_cursorHeight = 16;
_vm->_draw->_transparentCursor = 1;
}
void Init_v2::initGame() {
if (_vm->getGameType() == kGameTypeAdibou1) {
const Common::FSNode gameDataDir(ConfMan.getPath("path"));
// Add additional applications directories (e.g. "Read/Count 4-5 years").
Common::FSList subdirs;
gameDataDir.getChildren(subdirs, Common::FSNode::kListDirectoriesOnly);
for (const Common::FSNode &subdirNode : subdirs) {
Common::FSDirectory subdir(subdirNode);
if (subdir.hasFile("c51.stk") || subdir.hasFile("c61.stk") || subdir.hasFile("l51.stk") || subdir.hasFile("l61.stk")) {
debugC(1, kDebugFileIO, "Found Adibou/Adi application subdirectory \"%s\", adding it to the search path", subdir.getFSNode().getName().c_str());
SearchMan.addSubDirectoryMatching(gameDataDir, subdir.getFSNode().getName(), 0, 4, true);
}
}
}
Init::initGame();
}
} // End of namespace Gob

Some files were not shown because too many files have changed in this diff Show More