IOS: Merge master

This commit is contained in:
Vincent Bénony 2016-01-06 16:19:03 +01:00
commit 64f50761ec
147 changed files with 3109 additions and 4591 deletions

View file

@ -739,3 +739,6 @@ Special thanks to
two Lost Files of Sherlock Holmes games. James M. Ferguson and Barry
Duncan for their tenacious efforts to recover the sources.
The mindFactory team for writing Broken Sword 2.5, a splendid fan-made
sequel, and for sharing the source code with us.

View file

@ -246,6 +246,9 @@ DIST_FILES_THEMES:=$(addprefix $(srcdir)/gui/themes/,$(DIST_FILES_THEMES))
# Engine data files
DIST_FILES_ENGINEDATA=
ifdef ENABLE_ACCESS
DIST_FILES_ENGINEDATA+=access.dat
endif
ifdef ENABLE_DRASCULA
DIST_FILES_ENGINEDATA+=drascula.dat
endif

4
README
View file

@ -160,7 +160,7 @@ reproducible, and still occurs in the latest git/Daily build version.
Also check the known problems list (below) and the compatibility list
on our website for that game, to ensure the issue is not already known:
http://www.scummvm.org/compatibility_stable.php
http://scummvm.org/compatibility/
Please do not report bugs on games that are not listed as being
completeable in the 'Supported Games' section, or compatibility list. We
@ -2434,7 +2434,7 @@ currently we have only x86 MMX optimized versions, and they will not
compile on other processors.
On Win9x/NT/XP, you can define USE_WINDBG and attach WinDbg to browse
debug messages (see http://www.sysinternals.com/ntw2k/freeware/debugview.shtml).
debug messages (see https://technet.microsoft.com/en-us/sysinternals/debugview.aspx).
GCC and MinGW32:

View file

@ -26,7 +26,7 @@
#include "backends/audiocd/sdl/sdl-audiocd.h"
#if !SDL_VERSION_ATLEAST(1, 3, 0)
#if !SDL_VERSION_ATLEAST(2, 0, 0)
#include "common/textconsole.h"
@ -136,6 +136,6 @@ void SdlAudioCDManager::updateCD() {
}
}
#endif // !SDL_VERSION_ATLEAST(1, 3, 0)
#endif // !SDL_VERSION_ATLEAST(2, 0, 0)
#endif

View file

@ -27,7 +27,7 @@
#include "backends/platform/sdl/sdl-sys.h"
#if !SDL_VERSION_ATLEAST(1, 3, 0)
#if !SDL_VERSION_ATLEAST(2, 0, 0)
/**
* The SDL audio cd manager. Implements real audio cd playback.
@ -49,6 +49,6 @@ protected:
uint32 _cdEndTime, _cdStopTime;
};
#endif // !SDL_VERSION_ATLEAST(1, 3, 0)
#endif // !SDL_VERSION_ATLEAST(2, 0, 0)
#endif

View file

@ -126,8 +126,8 @@ bool PS3SdlEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
* This pauses execution and keeps redrawing the screen until the XMB is closed.
*/
void PS3SdlEventSource::preprocessEvents(SDL_Event *event) {
if (event->type == SDL_ACTIVEEVENT) {
if (event->active.state == SDL_APPMOUSEFOCUS && !event->active.gain) {
if (event->type == SDL_WINDOWEVENT) {
if (event->window.event == SDL_WINDOWEVENT_LEAVE) {
// XMB opened
if (g_engine)
g_engine->pauseEngine(true);
@ -145,9 +145,9 @@ void PS3SdlEventSource::preprocessEvents(SDL_Event *event) {
}
if (event->type == SDL_QUIT)
return;
if (event->type != SDL_ACTIVEEVENT)
if (event->type != SDL_WINDOWEVENT)
continue;
if (event->active.state == SDL_APPMOUSEFOCUS && event->active.gain) {
if (event->window.event == SDL_WINDOWEVENT_ENTER) {
// XMB closed
if (g_engine)
g_engine->pauseEngine(false);

View file

@ -314,7 +314,7 @@ Common::KeyCode SdlEventSource::SDLToOSystemKeycode(const SDLKey key) {
case SDLK_y: return Common::KEYCODE_y;
case SDLK_z: return Common::KEYCODE_z;
case SDLK_DELETE: return Common::KEYCODE_DELETE;
#if SDL_VERSION_ATLEAST(1, 3, 0)
#if SDL_VERSION_ATLEAST(2, 0, 0)
case SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_GRAVE): return Common::KEYCODE_TILDE;
#else
case SDLK_WORLD_16: return Common::KEYCODE_TILDE;
@ -759,7 +759,6 @@ bool SdlEventSource::handleJoyAxisMotion(SDL_Event &ev, Common::Event &event) {
_km.x_down_count = 0;
}
#endif
} else if (ev.jaxis.axis == JOY_YAXIS) {
#ifndef JOY_INVERT_Y
axis = -axis;

View file

@ -1,590 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
// Needed for Raspberry Pi header inclusion
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h"
#if defined(DISPMANX)
#include "backends/graphics/dispmanxsdl/dispmanxsdl-graphics.h"
#include "graphics/scaler/aspect.h"
#include "common/mutex.h"
#include "common/textconsole.h"
#include <bcm_host.h>
struct dispvarsStruct {
DISPMANX_DISPLAY_HANDLE_T display;
DISPMANX_UPDATE_HANDLE_T update;
DISPMANX_ELEMENT_HANDLE_T element;
VC_IMAGE_TYPE_T pixFormat;
VC_DISPMANX_ALPHA_T alpha;
VC_RECT_T bmpRect;
VC_RECT_T srcRect;
VC_RECT_T dstRect;
uint32_t vcImagePtr;
int screen;
int pitch;
unsigned int dispmanxWidth;
unsigned int dispmanxHeight;
bool aspectRatioCorrection;
void *pixmem;
int numpages;
dispmanxPage *pages;
dispmanxPage *currentPage;
int pageflipPending;
pthread_cond_t vsyncCondition;
pthread_mutex_t vsyncCondMutex;
pthread_mutex_t pendingMutex;
SDL_Surface *fscreen;
};
struct dispmanxPage {
DISPMANX_RESOURCE_HANDLE_T resource;
bool used;
// Each page has it's own mutex for
// isolating the access to it's "used" flag.
pthread_mutex_t pageUsedMutex;
// This field will allow us to access the
// main dispvars struct, for the vsync cb.
struct dispvarsStruct *dispvars;
};
DispmanXSdlGraphicsManager::DispmanXSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window)
: SurfaceSdlGraphicsManager(sdlEventSource, window) {
_dispvars = new(dispvarsStruct);
dispmanXInit();
}
DispmanXSdlGraphicsManager::~DispmanXSdlGraphicsManager() {
dispmanXVideoQuit();
delete(_dispvars);
}
void DispmanXSdlGraphicsManager::dispmanXInit() {
_dispvars->screen = 0;
_dispvars->vcImagePtr = 0;
_dispvars->numpages = 3;
_dispvars->pages = (struct dispmanxPage *)calloc(_dispvars->numpages, sizeof(struct dispmanxPage));
_dispvars->pageflipPending = 0;
_dispvars->currentPage = NULL;
_dispvars->pixFormat = VC_IMAGE_RGB565;
/* Transparency disabled */
_dispvars->alpha.flags = DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS;
_dispvars->alpha.opacity = 255;
_dispvars->alpha.mask = 0;
_dispvars->element = 0;
// Init each page's variables
for (int i = 0; i < _dispvars->numpages; i++) {
_dispvars->pages[i].used = false;
_dispvars->pages[i].dispvars = _dispvars;
_dispvars->pages[i].resource = 0;
pthread_mutex_init(&_dispvars->pages[i].pageUsedMutex, NULL);
}
// Initialize the other mutex and condition variables
pthread_cond_init(&_dispvars->vsyncCondition, NULL);
pthread_mutex_init(&_dispvars->pendingMutex, NULL);
pthread_mutex_init(&_dispvars->vsyncCondMutex, NULL);
// Before we call any vc_* function, we need to call this one.
bcm_host_init();
_dispvars->display = vc_dispmanx_display_open(_dispvars->screen);
graphics_get_display_size(_dispvars->display, &_dispvars->dispmanxWidth, &_dispvars->dispmanxHeight);
// We need this so SDL_SetVideoMode() is called once.
_dispvars->fscreen = NULL;
}
void DispmanXSdlGraphicsManager::dispmanXSetup(int srcWidth, int srcHeight) {
unsigned int dstWidth, dstHeight, dstXpos, dstYpos;
// If we have an element, we have to free it along with it's resources.
if (_dispvars->element) {
dispmanXFreeResources();
}
// We do this for 2 bytes per pixel which is default on the Rpi.
_dispvars->pitch = srcWidth * 2;
if (_dispvars->aspectRatioCorrection) {
float aspect = ((float)srcWidth / (float)srcHeight);
dstWidth = _dispvars->dispmanxHeight * aspect;
} else {
dstWidth = _dispvars->dispmanxWidth;
}
dstHeight = _dispvars->dispmanxHeight;
// If we obtain a scaled image width that is bigger than the physical screen width,
// then we keep the physical screen width as our maximun width.
if (dstWidth > _dispvars->dispmanxWidth) {
dstWidth = _dispvars->dispmanxWidth;
}
dstXpos = (_dispvars->dispmanxWidth - dstWidth) / 2;
dstYpos = (_dispvars->dispmanxHeight - dstHeight) / 2;
// Remember we have to transfer the whole bitmap even if we would have
// interest in a part of it! Blitting is done by the GPU.
vc_dispmanx_rect_set(&_dispvars->dstRect, dstXpos, dstYpos, dstWidth, dstHeight);
vc_dispmanx_rect_set(&_dispvars->bmpRect, 0, 0, srcWidth, srcHeight);
vc_dispmanx_rect_set(&_dispvars->srcRect, 0, 0, srcWidth << 16, srcHeight << 16);
for (int i = 0; i < _dispvars->numpages; i++) {
_dispvars->pages[i].resource = vc_dispmanx_resource_create(_dispvars->pixFormat,
srcWidth, srcHeight, &(_dispvars->vcImagePtr));
}
// Add the element. Has to be removed before getting here again.
_dispvars->update = vc_dispmanx_update_start(0);
_dispvars->element = vc_dispmanx_element_add(
_dispvars->update,_dispvars->display, 0,
&_dispvars->dstRect, 0,
&_dispvars->srcRect, DISPMANX_PROTECTION_NONE,
&_dispvars->alpha, 0, (DISPMANX_TRANSFORM_T)0);
vc_dispmanx_update_submit_sync(_dispvars->update);
}
void dispmanXVSyncCallback(DISPMANX_UPDATE_HANDLE_T u, void *arg) {
struct dispmanxPage *page = (struct dispmanxPage*)arg;
struct dispvarsStruct *dispvars = page->dispvars;
// Marking the page as free must be done before the signaling
// so when the update function continues (it won't continue until we signal)
// we can chose this page as free.
if (dispvars->currentPage) {
pthread_mutex_lock(&dispvars->currentPage->pageUsedMutex);
// We mark as free the page that was visible until now.
page->dispvars->currentPage->used = false;
pthread_mutex_unlock(&dispvars->currentPage->pageUsedMutex);
}
// The page on which we issued the flip that
// caused this callback becomes the visible one
dispvars->currentPage = page;
// These two things must be isolated "atomically" to avoid getting
// a false positive in the pending_mutex test in update function.
pthread_mutex_lock(&dispvars->pendingMutex);
dispvars->pageflipPending--;
pthread_cond_signal(&dispvars->vsyncCondition);
pthread_mutex_unlock(&dispvars->pendingMutex);
}
void DispmanXSdlGraphicsManager::dispmanXUpdate() {
// Wait until last issued flip completes to get a free page. Also,
// dispmanx doesn't support issuing more than one pageflip.
pthread_mutex_lock(&_dispvars->pendingMutex);
if (_dispvars->pageflipPending > 0) {
pthread_cond_wait(&_dispvars->vsyncCondition, &_dispvars->pendingMutex);
}
pthread_mutex_unlock(&_dispvars->pendingMutex);
struct dispmanxPage *page = dispmanXGetFreePage();
// Frame blitting
vc_dispmanx_resource_write_data(page->resource, _dispvars->pixFormat,
_dispvars->pitch, _dispvars->pixmem, &_dispvars->bmpRect);
// Issue a page flip at the next vblank interval (will be done at vsync anyway).
_dispvars->update = vc_dispmanx_update_start(0);
vc_dispmanx_element_change_source(_dispvars->update, _dispvars->element,
page->resource);
vc_dispmanx_update_submit(_dispvars->update, &dispmanXVSyncCallback, page);
pthread_mutex_lock(&_dispvars->pendingMutex);
_dispvars->pageflipPending++;
pthread_mutex_unlock(&_dispvars->pendingMutex);
}
struct dispmanxPage *DispmanXSdlGraphicsManager::dispmanXGetFreePage(void) {
struct dispmanxPage *page = NULL;
while (!page) {
// Try to find a free page
for (int i = 0; i < _dispvars->numpages; ++i) {
if (!_dispvars->pages[i].used) {
page = (_dispvars->pages) + i;
break;
}
}
// If no page is free at the moment,
// wait until a free page is freed by vsync CB.
if (!page) {
pthread_mutex_lock(&_dispvars->vsyncCondMutex);
pthread_cond_wait(&_dispvars->vsyncCondition, &_dispvars->vsyncCondMutex);
pthread_mutex_unlock(&_dispvars->vsyncCondMutex);
}
}
// We mark the choosen page as used
pthread_mutex_lock(&page->pageUsedMutex);
page->used = true;
pthread_mutex_unlock(&page->pageUsedMutex);
return page;
}
void DispmanXSdlGraphicsManager::dispmanXFreeResources(void) {
// What if we run into the vsync cb code after freeing the resources?
pthread_mutex_lock(&_dispvars->pendingMutex);
if (_dispvars->pageflipPending > 0)
{
pthread_cond_wait(&_dispvars->vsyncCondition, &_dispvars->pendingMutex);
}
pthread_mutex_unlock(&_dispvars->pendingMutex);
for (int i = 0; i < _dispvars->numpages; i++) {
vc_dispmanx_resource_delete(_dispvars->pages[i].resource);
_dispvars->pages[i].resource = 0;
_dispvars->pages[i].used = false;
}
_dispvars->update = vc_dispmanx_update_start(0);
vc_dispmanx_element_remove(_dispvars->update, _dispvars->element);
vc_dispmanx_update_submit_sync(_dispvars->update);
// We use this on the setup function to know if we have to free resources and element.
_dispvars->element = 0;
}
void DispmanXSdlGraphicsManager::dispmanXVideoQuit() {
// This also waits for pending flips to complete, that's needed before
// we destroy the mutexes and condition.
dispmanXFreeResources();
// Destroy the mutexes and conditions
for (int i = 0; i < _dispvars->numpages; i++) {
pthread_mutex_destroy(&_dispvars->pages[i].pageUsedMutex);
}
pthread_mutex_destroy(&_dispvars->pendingMutex);
pthread_mutex_destroy(&_dispvars->vsyncCondMutex);
pthread_cond_destroy(&_dispvars->vsyncCondition);
free(_dispvars->pages);
// Close display and deinit
vc_dispmanx_display_close(_dispvars->display);
bcm_host_deinit();
}
bool DispmanXSdlGraphicsManager::loadGFXMode() {
_forceFull = true;
// In dispmanX, we manage aspect ratio correction, so for scummvm it's always disabled.
_videoMode.aspectRatioCorrection = false;
_videoMode.overlayWidth = _videoMode.screenWidth;
_videoMode.overlayHeight = _videoMode.screenHeight;
_videoMode.hardwareWidth = _videoMode.screenWidth;
_videoMode.hardwareHeight = _videoMode.screenHeight;
//
// Create the surface that contains the 8 bit game data
//
_screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth, _videoMode.screenHeight,
_screenFormat.bytesPerPixel << 3,
((1 << _screenFormat.rBits()) - 1) << _screenFormat.rShift ,
((1 << _screenFormat.gBits()) - 1) << _screenFormat.gShift ,
((1 << _screenFormat.bBits()) - 1) << _screenFormat.bShift ,
((1 << _screenFormat.aBits()) - 1) << _screenFormat.aShift );
if (_screen == NULL)
error("allocating _screen failed");
// Avoid having SDL_SRCALPHA set even if we supplied an alpha-channel in the format.
SDL_SetAlpha(_screen, 0, 255);
// We set our own default palette to all black.
SDL_SetColors(_screen, _currentPalette, 0, 256);
//
// Create the surface that contains the scaled graphics in 16 bit mode
//
dispmanXSetup(_videoMode.screenWidth, _videoMode.screenHeight);
_hwscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.hardwareWidth, _videoMode.hardwareHeight, 16,
0, 0, 0, 0);
// This is just so SDL 1.x input is initialized. Only once!
if (_dispvars->fscreen == NULL)
_dispvars->fscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 16, SDL_FULLSCREEN);
if (_hwscreen == NULL) {
// Don't use error here because we don't have access to the debug console
warning("Allocating surface for dispmanX rendering _hwscreen failed");
g_system->quit();
}
// We render to dispmanx resources from _hwscreen pixels array
_dispvars->pixmem = _hwscreen->pixels;
_overlayscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.overlayWidth, _videoMode.overlayHeight,
16,
_hwscreen->format->Rmask,
_hwscreen->format->Gmask,
_hwscreen->format->Bmask,
_hwscreen->format->Amask);
if (_overlayscreen == NULL)
error("allocating _overlayscreen failed");
_overlayFormat.bytesPerPixel = _overlayscreen->format->BytesPerPixel;
_overlayFormat.rLoss = _overlayscreen->format->Rloss;
_overlayFormat.gLoss = _overlayscreen->format->Gloss;
_overlayFormat.bLoss = _overlayscreen->format->Bloss;
_overlayFormat.aLoss = _overlayscreen->format->Aloss;
_overlayFormat.rShift = _overlayscreen->format->Rshift;
_overlayFormat.gShift = _overlayscreen->format->Gshift;
_overlayFormat.bShift = _overlayscreen->format->Bshift;
_overlayFormat.aShift = _overlayscreen->format->Ashift;
#ifdef USE_OSD
_osdSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA,
_hwscreen->w,
_hwscreen->h,
16,
_hwscreen->format->Rmask,
_hwscreen->format->Gmask,
_hwscreen->format->Bmask,
_hwscreen->format->Amask);
if (_osdSurface == NULL)
error("allocating _osdSurface failed");
SDL_SetColorKey(_osdSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kOSDColorKey);
#endif
_eventSource->resetKeyboadEmulation(
_videoMode.screenWidth, effectiveScreenHeight());
return true;
}
void DispmanXSdlGraphicsManager::clearOverlay() {
//assert(_transactionMode == kTransactionNone);
Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
if (!_overlayVisible)
return;
// Clear the overlay by making the game screen "look through" everywhere.
SDL_Rect src, dst;
src.x = src.y = 0;
dst.x = dst.y = 0;
src.w = dst.w = _videoMode.screenWidth;
src.h = dst.h = _videoMode.screenHeight;
if (SDL_BlitSurface(_screen, &src, _hwscreen, &dst) != 0)
error("SDL_BlitSurface failed: %s", SDL_GetError());
SDL_LockSurface(_hwscreen);
SDL_LockSurface(_overlayscreen);
Normal1x((byte *)(_hwscreen->pixels), _hwscreen->pitch,
(byte *)_overlayscreen->pixels, _overlayscreen->pitch, _videoMode.screenWidth, _videoMode.screenHeight);
SDL_UnlockSurface(_hwscreen);
SDL_UnlockSurface(_overlayscreen);
_forceFull = true;
}
void DispmanXSdlGraphicsManager::internUpdateScreen() {
SDL_Surface *srcSurf, *origSurf;
int height, width;
// If the shake position changed, fill the dirty area with blackness
if (_currentShakePos != _newShakePos ||
(_mouseNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
SDL_Rect blackrect = {0, 0, (Uint16)(_videoMode.screenWidth * _videoMode.scaleFactor), (Uint16)(_newShakePos * _videoMode.scaleFactor)};
if (_dispvars->aspectRatioCorrection && !_overlayVisible)
blackrect.h = real2Aspect(blackrect.h - 1) + 1;
SDL_FillRect(_hwscreen, &blackrect, 0);
_currentShakePos = _newShakePos;
_forceFull = true;
}
// Check whether the palette was changed in the meantime and update the
// screen surface accordingly.
if (_screen && _paletteDirtyEnd != 0) {
SDL_SetColors(_screen, _currentPalette + _paletteDirtyStart,
_paletteDirtyStart,
_paletteDirtyEnd - _paletteDirtyStart);
_paletteDirtyEnd = 0;
_forceFull = true;
}
#ifdef USE_OSD
// OSD visible (i.e. non-transparent)?
if (_osdAlpha != SDL_ALPHA_TRANSPARENT) {
// Updated alpha value
const int diff = SDL_GetTicks() - _osdFadeStartTime;
if (diff > 0) {
if (diff >= kOSDFadeOutDuration) {
// Back to full transparency
_osdAlpha = SDL_ALPHA_TRANSPARENT;
} else {
// Do a linear fade out...
const int startAlpha = SDL_ALPHA_TRANSPARENT + kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100;
_osdAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration;
}
SDL_SetAlpha(_osdSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, _osdAlpha);
_forceFull = true;
}
}
#endif
if (!_overlayVisible) {
origSurf = _screen;
srcSurf = _hwscreen;
width = _videoMode.screenWidth;
height = _videoMode.screenHeight;
} else {
origSurf = _overlayscreen;
srcSurf = _hwscreen;
width = _videoMode.overlayWidth;
height = _videoMode.overlayHeight;
}
// Add the area covered by the mouse cursor to the list of dirty rects if
// we have to redraw the mouse.
if (_mouseNeedsRedraw)
undrawMouse();
// Force a full redraw if requested
if (_forceFull) {
_numDirtyRects = 1;
_dirtyRectList[0].x = 0;
_dirtyRectList[0].y = 0;
_dirtyRectList[0].w = width;
_dirtyRectList[0].h = height;
}
// Only draw anything if necessary
if (_numDirtyRects > 0 || _mouseNeedsRedraw) {
SDL_Rect *r;
SDL_Rect dst;
SDL_Rect *lastRect = _dirtyRectList + _numDirtyRects;
for (r = _dirtyRectList; r != lastRect; ++r) {
dst = *r;
if (SDL_BlitSurface(origSurf, r, srcSurf, &dst) != 0)
error("SDL_BlitSurface failed: %s", SDL_GetError());
}
// Readjust the dirty rect list in case we are doing a full update.
// This is necessary if shaking is active.
if (_forceFull) {
_dirtyRectList[0].y = 0;
_dirtyRectList[0].h = effectiveScreenHeight();
}
drawMouse();
#ifdef USE_OSD
if (_osdAlpha != SDL_ALPHA_TRANSPARENT) {
SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0);
}
#endif
// Finally, blit all our changes to the screen
if (!_displayDisabled) {
SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList);
dispmanXUpdate();
}
}
_numDirtyRects = 0;
_forceFull = false;
_mouseNeedsRedraw = false;
}
bool DispmanXSdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
// Ctrl-Alt-a toggles aspect ratio correction
if (key == 'a') {
setFeatureState(OSystem::kFeatureAspectRatioCorrection, !_dispvars->aspectRatioCorrection);
#ifdef USE_OSD
char buffer[128];
if (_dispvars->aspectRatioCorrection)
sprintf(buffer, "%s", ("Enabled aspect ratio correction"));
else
sprintf(buffer, "%s", ("Disabled aspect ratio correction"));
displayMessageOnOSD(buffer);
#endif
internUpdateScreen();
return true;
}
return true;
}
bool DispmanXSdlGraphicsManager::hasFeature(OSystem::Feature f) {
if (f == OSystem::kFeatureFullscreenMode) {
return false;
} else {
return SurfaceSdlGraphicsManager::hasFeature(f);
}
}
void DispmanXSdlGraphicsManager::setFullscreenMode(bool enable) {
// Since we're always in fullscreen mode, we do nothing here.
}
void DispmanXSdlGraphicsManager::setAspectRatioCorrection(bool enable) {
Common::StackLock lock(_graphicsMutex);
// We simply take note on what's the aspect ratio correction activation state.
_dispvars->aspectRatioCorrection = enable;
// If we have a videomode setup already, call dispmanXSetup() again so aspect ratio
// correction activation/deactivation works from the menu.
if (_oldVideoMode.setup && _dispvars->aspectRatioCorrection == enable) {
dispmanXSetup(_videoMode.screenWidth, _videoMode.screenHeight);
}
}
#endif

View file

@ -1,53 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef BACKENDS_GRAPHICS_SDL_DISPMANX_H
#define BACKENDS_GRAPHICS_SDL_DISPMANX_H
#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
struct dispvarsStruct;
struct dispmanxPage;
class DispmanXSdlGraphicsManager : public SurfaceSdlGraphicsManager {
public:
DispmanXSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window);
~DispmanXSdlGraphicsManager();
bool loadGFXMode();
void internUpdateScreen();
bool handleScalerHotkeys(Common::KeyCode key);
void setFullscreenMode(bool enable);
void setAspectRatioCorrection(bool enable);
void clearOverlay();
bool hasFeature(OSystem::Feature f);
protected:
// Raspberry Pi Dispmanx API
void dispmanXSetup(int width, int height);
void dispmanXInit();
void dispmanXUpdate();
dispmanxPage *dispmanXGetFreePage();
void dispmanXFreeResources();
void dispmanXVideoQuit();
dispvarsStruct *_dispvars;
};
#endif /* BACKENDS_GRAPHICS_SDL_DISPMANX_H */

View file

@ -51,7 +51,8 @@ OpenGLGraphicsManager::OpenGLGraphicsManager()
_overlayVisible(false), _cursor(nullptr),
_cursorX(0), _cursorY(0), _cursorDisplayX(0),_cursorDisplayY(0), _cursorHotspotX(0), _cursorHotspotY(0),
_cursorHotspotXScaled(0), _cursorHotspotYScaled(0), _cursorWidthScaled(0), _cursorHeightScaled(0),
_cursorKeyColor(0), _cursorVisible(false), _cursorDontScale(false), _cursorPaletteEnabled(false)
_cursorKeyColor(0), _cursorVisible(false), _cursorDontScale(false), _cursorPaletteEnabled(false),
_forceRedraw(false), _scissorOverride(3)
#ifdef USE_OSD
, _osdAlpha(0), _osdFadeStartTime(0), _osd(nullptr)
#endif
@ -343,7 +344,10 @@ void OpenGLGraphicsManager::fillScreen(uint32 col) {
}
void OpenGLGraphicsManager::setShakePos(int shakeOffset) {
if (_gameScreenShakeOffset != shakeOffset) {
_gameScreenShakeOffset = shakeOffset;
_forceRedraw = true;
}
}
void OpenGLGraphicsManager::updateScreen() {
@ -351,8 +355,30 @@ void OpenGLGraphicsManager::updateScreen() {
return;
}
// We only update the screen when there actually have been any changes.
if ( !_forceRedraw
&& !_gameScreen->isDirty()
&& !(_overlayVisible && _overlay->isDirty())
&& !(_cursorVisible && _cursor && _cursor->isDirty())
&& _osdAlpha == 0) {
return;
}
_forceRedraw = false;
// Clear the screen buffer.
if (_scissorOverride && !_overlayVisible) {
// In certain cases we need to assure that the whole screen area is
// cleared. For example, when switching from overlay visible to
// invisible, we need to assure that all contents are cleared to
// properly remove all overlay contents.
GLCALL(glDisable(GL_SCISSOR_TEST));
GLCALL(glClear(GL_COLOR_BUFFER_BIT));
GLCALL(glEnable(GL_SCISSOR_TEST));
--_scissorOverride;
} else {
GLCALL(glClear(GL_COLOR_BUFFER_BIT));
}
const GLfloat shakeOffset = _gameScreenShakeOffset * (GLfloat)_displayHeight / _gameScreen->getHeight();
@ -375,37 +401,8 @@ void OpenGLGraphicsManager::updateScreen() {
_cursorWidthScaled, _cursorHeightScaled);
}
// Fourth step: Draw black borders around the game screen when no overlay
// is visible. This makes sure that the mouse cursor etc. is only drawn
// in the actual game screen area in this case.
if (!_overlayVisible) {
GLCALL(glColor4f(0.0f, 0.0f, 0.0f, 1.0f));
GLCALL(glDisable(GL_TEXTURE_2D));
GLCALL(glDisableClientState(GL_TEXTURE_COORD_ARRAY));
// Top border.
drawRect(0, 0, _outputScreenWidth, _displayY);
// Left border.
drawRect(0, 0, _displayX, _outputScreenHeight);
// Bottom border.
const int y = _displayY + _displayHeight;
drawRect(0, y, _outputScreenWidth, _outputScreenHeight - y);
// Right border.
const int x = _displayX + _displayWidth;
drawRect(x, 0, _outputScreenWidth - x, _outputScreenHeight);
GLCALL(glEnableClientState(GL_TEXTURE_COORD_ARRAY));
GLCALL(glEnable(GL_TEXTURE_2D));
GLCALL(glColor4f(1.0f, 1.0f, 1.0f, 1.0f));
}
#ifdef USE_OSD
// Fifth step: Draw the OSD.
// Fourth step: Draw the OSD.
if (_osdAlpha > 0) {
Common::StackLock lock(_osdMutex);
@ -431,6 +428,8 @@ void OpenGLGraphicsManager::updateScreen() {
GLCALL(glColor4f(1.0f, 1.0f, 1.0f, 1.0f));
}
#endif
refreshScreen();
}
Graphics::Surface *OpenGLGraphicsManager::lockScreen() {
@ -465,6 +464,10 @@ int16 OpenGLGraphicsManager::getOverlayHeight() {
void OpenGLGraphicsManager::showOverlay() {
_overlayVisible = true;
_forceRedraw = true;
// Allow drawing inside full screen area.
GLCALL(glDisable(GL_SCISSOR_TEST));
// Update cursor position.
setMousePosition(_cursorX, _cursorY);
@ -472,6 +475,11 @@ void OpenGLGraphicsManager::showOverlay() {
void OpenGLGraphicsManager::hideOverlay() {
_overlayVisible = false;
_forceRedraw = true;
// Limit drawing to screen area.
GLCALL(glEnable(GL_SCISSOR_TEST));
_scissorOverride = 3;
// Update cursor position.
setMousePosition(_cursorX, _cursorY);
@ -503,6 +511,12 @@ void OpenGLGraphicsManager::grabOverlay(void *buf, int pitch) {
}
bool OpenGLGraphicsManager::showMouse(bool visible) {
// In case the mouse cursor visibility changed we need to redraw the whole
// screen even when nothing else changed.
if (_cursorVisible != visible) {
_forceRedraw = true;
}
bool last = _cursorVisible;
_cursorVisible = visible;
return last;
@ -537,11 +551,8 @@ void OpenGLGraphicsManager::warpMouse(int x, int y) {
return;
}
x = (x * _displayWidth) / _gameScreen->getWidth();
y = (y * _displayHeight) / _gameScreen->getHeight();
x += _displayX;
y += _displayY;
x = (x * _outputScreenWidth) / _gameScreen->getWidth();
y = (y * _outputScreenHeight) / _gameScreen->getHeight();
}
setMousePosition(x, y);
@ -851,6 +862,16 @@ void OpenGLGraphicsManager::notifyContextCreate(const Graphics::PixelFormat &def
GLCALL(glEnable(GL_TEXTURE_2D));
// Setup scissor state accordingly.
if (_overlayVisible) {
GLCALL(glDisable(GL_SCISSOR_TEST));
} else {
GLCALL(glEnable(GL_SCISSOR_TEST));
}
// Clear the whole screen for the first three frames to assure any
// leftovers are cleared.
_scissorOverride = 3;
// We use a "pack" alignment (when reading from textures) to 4 here,
// since the only place where we really use it is the BMP screenshot
// code and that requires the same alignment too.
@ -922,22 +943,21 @@ void OpenGLGraphicsManager::adjustMousePosition(int16 &x, int16 &y) {
y = (y * _overlay->getHeight()) / _outputScreenHeight;
}
} else if (_gameScreen) {
x -= _displayX;
y -= _displayY;
const int16 width = _gameScreen->getWidth();
const int16 height = _gameScreen->getHeight();
x = (x * width) / (int)_displayWidth;
y = (y * height) / (int)_displayHeight;
// Make sure we only supply valid coordinates.
x = CLIP<int16>(x, 0, width - 1);
y = CLIP<int16>(y, 0, height - 1);
x = (x * width) / (int)_outputScreenWidth;
y = (y * height) / (int)_outputScreenHeight;
}
}
void OpenGLGraphicsManager::setMousePosition(int x, int y) {
// Whenever the mouse position changed we force a screen redraw to reflect
// changes properly.
if (_cursorX != x || _cursorY != y) {
_forceRedraw = true;
}
_cursorX = x;
_cursorY = y;
@ -945,8 +965,8 @@ void OpenGLGraphicsManager::setMousePosition(int x, int y) {
_cursorDisplayX = x;
_cursorDisplayY = y;
} else {
_cursorDisplayX = CLIP<int>(x, _displayX, _displayX + _displayWidth - 1);
_cursorDisplayY = CLIP<int>(y, _displayY, _displayY + _displayHeight - 1);
_cursorDisplayX = _displayX + (x * _displayWidth) / _outputScreenWidth;
_cursorDisplayY = _displayY + (y * _displayHeight) / _outputScreenHeight;
}
}
@ -1096,8 +1116,21 @@ void OpenGLGraphicsManager::recalculateDisplayArea() {
_displayX = (_outputScreenWidth - _displayWidth ) / 2;
_displayY = (_outputScreenHeight - _displayHeight) / 2;
// Setup drawing limitation for game graphics.
// This invovles some trickery because OpenGL's viewport coordinate system
// is upside down compared to ours.
GLCALL(glScissor(_displayX,
_outputScreenHeight - _displayHeight - _displayY,
_displayWidth,
_displayHeight));
// Clear the whole screen for the first three frames to remove leftovers.
_scissorOverride = 3;
// Update the cursor position to adjust for new display area.
setMousePosition(_cursorX, _cursorY);
// Force a redraw to assure screen is properly redrawn.
_forceRedraw = true;
}
void OpenGLGraphicsManager::updateCursorPalette() {
@ -1215,20 +1248,4 @@ void OpenGLGraphicsManager::saveScreenshot(const Common::String &filename) const
delete[] pixels;
}
void OpenGLGraphicsManager::drawRect(GLfloat x, GLfloat y, GLfloat w, GLfloat h) {
if (w < 0 || h < 0) {
return;
}
const GLfloat vertices[4*2] = {
x, y,
x + w, y,
x, y + h,
x + w, y + h
};
GLCALL(glVertexPointer(2, GL_FLOAT, 0, vertices));
GLCALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4));
}
} // End of namespace OpenGL

View file

@ -262,6 +262,11 @@ protected:
*/
virtual bool loadVideoMode(uint requestedWidth, uint requestedHeight, const Graphics::PixelFormat &format) = 0;
/**
* Refresh the screen contents.
*/
virtual void refreshScreen() = 0;
/**
* Save a screenshot of the full display as BMP to the given file. This
* uses Common::DumpFile for writing the screenshot.
@ -464,10 +469,19 @@ private:
*/
byte _cursorPalette[3 * 256];
//
// Misc
//
/**
* Draws a rectangle
* Whether the screen contents shall be forced to redrawn.
*/
void drawRect(GLfloat x, GLfloat y, GLfloat w, GLfloat h);
bool _forceRedraw;
/**
* Number of frames glClear shall ignore scissor testing.
*/
uint _scissorOverride;
#ifdef USE_OSD
//

View file

@ -20,8 +20,8 @@
*
*/
#ifndef BACKENDS_GRAPHICS_OPENGL_OPENGL_H
#define BACKENDS_GRAPHICS_OPENGL_OPENGL_H
#ifndef BACKENDS_GRAPHICS_OPENGL_OPENGL_SYS_H
#define BACKENDS_GRAPHICS_OPENGL_OPENGL_SYS_H
// The purpose of this header is to include the OpenGL headers in an uniform
// fashion. A notable example for a non standard port is the Tizen port.

View file

@ -21,6 +21,7 @@
*/
#include "backends/graphics/openglsdl/openglsdl-graphics.h"
#include "backends/events/sdl/sdl-events.h"
#include "common/textconsole.h"
#include "common/config-manager.h"
@ -236,13 +237,6 @@ void OpenGLSdlGraphicsManager::updateScreen() {
}
OpenGLGraphicsManager::updateScreen();
// Swap OpenGL buffers
#if SDL_VERSION_ATLEAST(2, 0, 0)
SDL_GL_SwapWindow(_window->getSDLWindow());
#else
SDL_GL_SwapBuffers();
#endif
}
void OpenGLSdlGraphicsManager::notifyVideoExpose() {
@ -251,6 +245,7 @@ void OpenGLSdlGraphicsManager::notifyVideoExpose() {
void OpenGLSdlGraphicsManager::notifyResize(const uint width, const uint height) {
#if SDL_VERSION_ATLEAST(2, 0, 0)
setActualScreenSize(width, height);
_eventSource->resetKeyboadEmulation(width - 1, height - 1);
#else
if (!_ignoreResizeEvents && _hwScreen && !(_hwScreen->flags & SDL_FULLSCREEN)) {
// We save that we handled a resize event here. We need to know this
@ -301,6 +296,15 @@ bool OpenGLSdlGraphicsManager::loadVideoMode(uint requestedWidth, uint requested
return setupMode(requestedWidth, requestedHeight);
}
void OpenGLSdlGraphicsManager::refreshScreen() {
// Swap OpenGL buffers
#if SDL_VERSION_ATLEAST(2, 0, 0)
SDL_GL_SwapWindow(_window->getSDLWindow());
#else
SDL_GL_SwapBuffers();
#endif
}
bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
// In case we request a fullscreen mode we will use the mode the user
// has chosen last time or the biggest mode available.
@ -386,6 +390,13 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
}
}
#ifdef USE_GLES
// SDL2 will create a GLES2 context by default, so this is needed for GLES1-profile
// functions to work.
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
#endif
_glContext = SDL_GL_CreateContext(_window->getSDLWindow());
if (!_glContext) {
return false;
@ -395,6 +406,7 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
int actualWidth, actualHeight;
getWindowDimensions(&actualWidth, &actualHeight);
setActualScreenSize(actualWidth, actualHeight);
_eventSource->resetKeyboadEmulation(actualWidth - 1, actualHeight - 1);
return true;
#else
// WORKAROUND: Working around infamous SDL bugs when switching
@ -440,6 +452,7 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
if (_hwScreen) {
notifyContextCreate(rgba8888, rgba8888);
setActualScreenSize(_hwScreen->w, _hwScreen->h);
_eventSource->resetKeyboadEmulation(_hwScreen->w - 1, _hwScreen->h - 1);
}
// Ignore resize events (from SDL) for a few frames, if this isn't

View file

@ -65,6 +65,8 @@ protected:
virtual void setInternalMousePosition(int x, int y);
virtual bool loadVideoMode(uint requestedWidth, uint requestedHeight, const Graphics::PixelFormat &format);
virtual void refreshScreen();
private:
bool setupMode(uint width, uint height);

View file

@ -32,6 +32,7 @@
#include "common/textconsole.h"
#include "common/translation.h"
#include "common/util.h"
#include "common/frac.h"
#ifdef USE_RGB_COLOR
#include "common/list.h"
#endif
@ -125,6 +126,7 @@ SurfaceSdlGraphicsManager::SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSou
_hwscreen(0),
#if SDL_VERSION_ATLEAST(2, 0, 0)
_renderer(nullptr), _screenTexture(nullptr),
_viewport(), _windowWidth(1), _windowHeight(1),
#else
_originalBitsPerPixel(0),
#endif
@ -889,9 +891,14 @@ bool SurfaceSdlGraphicsManager::loadGFXMode() {
SDL_SetColorKey(_osdSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kOSDColorKey);
#endif
#if !SDL_VERSION_ATLEAST(2, 0, 0)
// For SDL2 the output resolution might differ from the requested
// resolution. We handle resetting the keyboard emulation properly inside
// our SDL_SetVideoMode wrapper for SDL2.
_eventSource->resetKeyboadEmulation(
_videoMode.screenWidth * _videoMode.scaleFactor - 1,
effectiveScreenHeight() - 1);
#endif
// Distinguish 555 and 565 mode
if (_hwscreen->format->Rmask == 0x7C00)
@ -1756,22 +1763,30 @@ void SurfaceSdlGraphicsManager::setMousePos(int x, int y) {
}
void SurfaceSdlGraphicsManager::warpMouse(int x, int y) {
int y1 = y;
// Don't change actual mouse position, when mouse is outside of our window (in case of windowed mode)
if (!_window->hasMouseFocus()) {
setMousePos(x, y); // but change game cursor position
return;
}
int x1 = x, y1 = y;
if (_videoMode.aspectRatioCorrection && !_overlayVisible)
y1 = real2Aspect(y);
y1 = real2Aspect(y1);
if (_mouseCurState.x != x || _mouseCurState.y != y) {
if (!_overlayVisible)
_window->warpMouseInWindow(x * _videoMode.scaleFactor, y1 * _videoMode.scaleFactor);
else
_window->warpMouseInWindow(x, y1);
if (!_overlayVisible) {
x1 *= _videoMode.scaleFactor;
y1 *= _videoMode.scaleFactor;
}
#if SDL_VERSION_ATLEAST(2, 0, 0)
// Transform our coordinates in "virtual" output coordinate space into
// actual output coordinate space.
x1 = x1 * _windowWidth / _videoMode.hardwareWidth;
y1 = y1 * _windowHeight / _videoMode.hardwareHeight;
#endif
_window->warpMouseInWindow(x1, y1);
// SDL_WarpMouse() generates a mouse movement event, so
// setMousePos() would be called eventually. However, the
@ -2353,6 +2368,16 @@ void SurfaceSdlGraphicsManager::notifyVideoExpose() {
}
void SurfaceSdlGraphicsManager::transformMouseCoordinates(Common::Point &point) {
#if SDL_VERSION_ATLEAST(2, 0, 0)
// In SDL2 the actual output resolution might be different from what we
// requested. Thus, we transform the coordinates from actual output
// coordinate space into the "virtual" output coordinate space.
// Please note that we ignore the possible existence of black bars here,
// this avoids the feeling of stickyness to black bars.
point.x = point.x * _videoMode.hardwareWidth / _windowWidth;
point.y = point.y * _videoMode.hardwareHeight / _windowHeight;
#endif
if (!_overlayVisible) {
point.x /= _videoMode.scaleFactor;
point.y /= _videoMode.scaleFactor;
@ -2380,7 +2405,8 @@ void SurfaceSdlGraphicsManager::deinitializeRenderer() {
SDL_Surface *SurfaceSdlGraphicsManager::SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) {
deinitializeRenderer();
if (!_window->createWindow(width, height, (flags & SDL_FULLSCREEN) ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0)) {
const bool isFullscreen = (flags & SDL_FULLSCREEN) != 0;
if (!_window->createWindow(width, height, isFullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0)) {
return nullptr;
}
@ -2390,6 +2416,32 @@ SDL_Surface *SurfaceSdlGraphicsManager::SDL_SetVideoMode(int width, int height,
return nullptr;
}
SDL_GetWindowSize(_window->getSDLWindow(), &_windowWidth, &_windowHeight);
// We expect full screen resolution as inputs coming from the event system.
_eventSource->resetKeyboadEmulation(_windowWidth - 1, _windowHeight - 1);
// Calculate the "viewport" for the actual area we draw in. In fullscreen
// we can easily get a different resolution than what we requested. In
// this case, we add black bars if necessary to assure the aspect ratio
// is preserved.
const frac_t outputAspect = intToFrac(_windowWidth) / _windowHeight;
const frac_t desiredAspect = intToFrac(width) / height;
_viewport.w = _windowWidth;
_viewport.h = _windowHeight;
// Adjust one dimension for mantaining the aspect ratio.
if (abs(outputAspect - desiredAspect) >= (int)(FRAC_ONE / 1000)) {
if (outputAspect < desiredAspect) {
_viewport.h = height * _windowWidth / width;
} else if (outputAspect > desiredAspect) {
_viewport.w = width * _windowHeight / height;
}
}
_viewport.x = (_windowWidth - _viewport.w) / 2;
_viewport.y = (_windowHeight - _viewport.h) / 2;
_screenTexture = SDL_CreateTexture(_renderer, SDL_PIXELFORMAT_RGB565, SDL_TEXTUREACCESS_STREAMING, width, height);
if (!_screenTexture) {
deinitializeRenderer();
@ -2409,7 +2461,7 @@ void SurfaceSdlGraphicsManager::SDL_UpdateRects(SDL_Surface *screen, int numrect
SDL_UpdateTexture(_screenTexture, nullptr, screen->pixels, screen->pitch);
SDL_RenderClear(_renderer);
SDL_RenderCopy(_renderer, _screenTexture, NULL, NULL);
SDL_RenderCopy(_renderer, _screenTexture, NULL, &_viewport);
SDL_RenderPresent(_renderer);
}
#endif // SDL_VERSION_ATLEAST(2, 0, 0)

View file

@ -171,6 +171,8 @@ protected:
* around this API to keep the code paths as close as possible. */
SDL_Renderer *_renderer;
SDL_Texture *_screenTexture;
SDL_Rect _viewport;
int _windowWidth, _windowHeight;
void deinitializeRenderer();
SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags);

View file

@ -316,6 +316,7 @@ int MidiDriver_TIMIDITY::connect_to_server(const char* hostname, unsigned short
if (connect(fd, (struct sockaddr *)&in, sizeof(in)) < 0) {
warning("TiMidity: connect(): %s", strerror(errno));
::close(fd);
return -1;
}

View file

@ -30,8 +30,10 @@
#include "common/config-manager.h"
#include "common/textconsole.h"
#ifdef GP2X
#if defined(GP2X)
#define SAMPLES_PER_SEC 11025
#elif defined(PLAYSTATION3)
#define SAMPLES_PER_SEC 48000
#else
#define SAMPLES_PER_SEC 44100
#endif
@ -78,10 +80,29 @@ void SdlMixerManager::init() {
if (SDL_OpenAudio(&fmt, &_obtained) != 0) {
warning("Could not open audio device: %s", SDL_GetError());
// The mixer is not marked as ready
_mixer = new Audio::MixerImpl(g_system, desired.freq);
assert(_mixer);
_mixer->setReady(false);
} else {
return;
}
// The obtained sample format is not supported by the mixer, call
// SDL_OpenAudio again with NULL as the second argument to force
// SDL to do resampling to the desired audio spec.
if (_obtained.format != desired.format) {
debug(1, "SDL mixer sound format: %d differs from desired: %d", _obtained.format, desired.format);
SDL_CloseAudio();
if (SDL_OpenAudio(&fmt, NULL) != 0) {
warning("Could not open audio device: %s", SDL_GetError());
// The mixer is not marked as ready
_mixer = new Audio::MixerImpl(g_system, desired.freq);
return;
}
_obtained = desired;
}
debug(1, "Output sample rate: %d Hz", _obtained.freq);
if (_obtained.freq != desired.freq)
warning("SDL mixer output sample rate: %d differs from desired: %d", _obtained.freq, desired.freq);
@ -90,9 +111,6 @@ void SdlMixerManager::init() {
if (_obtained.samples != desired.samples)
warning("SDL mixer output buffer size: %d differs from desired: %d", _obtained.samples, desired.samples);
if (_obtained.format != desired.format)
warning("SDL mixer sound format: %d differs from desired: %d", _obtained.format, desired.format);
#ifndef __SYMBIAN32__
// The SymbianSdlMixerManager does stereo->mono downmixing,
// but otherwise we require stereo output.
@ -106,7 +124,6 @@ void SdlMixerManager::init() {
startAudio();
}
}
SDL_AudioSpec SdlMixerManager::getAudioSpec(uint32 outputRate) {
SDL_AudioSpec desired;

View file

@ -1,108 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "common/scummsys.h"
#if defined(SDL_BACKEND)
#include "backends/mixer/sdl13/sdl13-mixer.h"
#include "common/debug.h"
#include "common/system.h"
#include "common/config-manager.h"
#include "common/textconsole.h"
#ifdef GP2X
#define SAMPLES_PER_SEC 11025
#else
#define SAMPLES_PER_SEC 44100
#endif
Sdl13MixerManager::Sdl13MixerManager()
:
SdlMixerManager(),
_device(0) {
}
Sdl13MixerManager::~Sdl13MixerManager() {
_mixer->setReady(false);
SDL_CloseAudioDevice(_device);
delete _mixer;
}
void Sdl13MixerManager::init() {
// Start SDL Audio subsystem
if (SDL_InitSubSystem(SDL_INIT_AUDIO) == -1) {
error("Could not initialize SDL: %s", SDL_GetError());
}
// Get the desired audio specs
SDL_AudioSpec desired = getAudioSpec(SAMPLES_PER_SEC);
// Start SDL audio with the desired specs
_device = SDL_OpenAudioDevice(NULL, 0, &desired, &_obtained,
SDL_AUDIO_ALLOW_FREQUENCY_CHANGE);
if (_device <= 0) {
warning("Could not open audio device: %s", SDL_GetError());
_mixer = new Audio::MixerImpl(g_system, desired.freq);
assert(_mixer);
_mixer->setReady(false);
} else {
debug(1, "Output sample rate: %d Hz", _obtained.freq);
_mixer = new Audio::MixerImpl(g_system, _obtained.freq);
assert(_mixer);
_mixer->setReady(true);
startAudio();
}
}
void Sdl13MixerManager::startAudio() {
// Start the sound system
SDL_PauseAudioDevice(_device, 0);
}
void Sdl13MixerManager::suspendAudio() {
SDL_CloseAudioDevice(_device);
_audioSuspended = true;
}
int Sdl13MixerManager::resumeAudio() {
if (!_audioSuspended)
return -2;
_device = SDL_OpenAudioDevice(NULL, 0, &_obtained, NULL, 0);
if (_device <= 0) {
return -1;
}
SDL_PauseAudioDevice(_device, 0);
_audioSuspended = false;
return 0;
}
#endif

View file

@ -72,13 +72,11 @@ MODULE_OBJS += \
plugins/sdl/sdl-provider.o \
timer/sdl/sdl-timer.o
# SDL 1.3 removed audio CD support
ifndef USE_SDL13
# SDL 2 removed audio CD support
ifndef USE_SDL2
MODULE_OBJS += \
audiocd/sdl/sdl-audiocd.o
endif
endif
ifdef USE_OPENGL
MODULE_OBJS += \
@ -127,13 +125,7 @@ MODULE_OBJS += \
fs/posix/posix-fs.o \
fs/posix/posix-fs-factory.o \
fs/ps3/ps3-fs-factory.o \
events/ps3sdl/ps3sdl-events.o \
mixer/sdl13/sdl13-mixer.o
endif
ifdef DISPMANX
MODULE_OBJS += \
graphics/dispmanxsdl/dispmanxsdl-graphics.o
events/ps3sdl/ps3sdl-events.o
endif
ifeq ($(BACKEND),tizen)

View file

@ -36,12 +36,6 @@ MODULE_OBJS += \
ps3/ps3.o
endif
ifdef DISPMANX
MODULE_OBJS += \
raspberrypi/raspberrypi-main.o \
raspberrypi/raspberrypi.o
endif
# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
OBJS := $(MODULE_OBJS) $(OBJS)

View file

@ -22,7 +22,7 @@
#include "common/scummsys.h"
#if defined(POSIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(MAEMO) && !defined(WEBOS) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA) && !defined(PLAYSTATION3) && !defined(DISPMANX)
#if defined(POSIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(MAEMO) && !defined(WEBOS) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA) && !defined(PLAYSTATION3)
#include "backends/platform/sdl/posix/posix.h"
#include "backends/plugins/sdl/sdl-provider.h"

View file

@ -31,7 +31,6 @@
#include "backends/saves/default/default-saves.h"
#include "backends/fs/ps3/ps3-fs-factory.h"
#include "backends/events/ps3sdl/ps3sdl-events.h"
#include "backends/mixer/sdl13/sdl13-mixer.h"
#include <dirent.h>
#include <sys/stat.h>
@ -68,14 +67,6 @@ void OSystem_PS3::initBackend() {
if (_savefileManager == 0)
_savefileManager = new DefaultSaveFileManager(PREFIX "/saves");
// Create the mixer manager
if (_mixer == 0) {
_mixerManager = new Sdl13MixerManager();
// Setup and start mixer
_mixerManager->init();
}
// Event source
if (_eventSource == 0)
_eventSource = new PS3SdlEventSource();

View file

@ -4,12 +4,9 @@ ScummVM-RASPBERRYPI README
Notes
============
This version of ScummVM is specially tailored to use DispmanX, the native 2D
API on the Raspberry Pi. The idea is that scaling and drawing on a double
buffer with a non-blocking vsync wait is all done using the on-board VideoCore
hardware, thus using only a small fraction of the CPU ScummVM uses when ran
on a clunky, software-scaled and desynced X11 environment using the X11 API.
Thus, running this version under an X11 session is not supported.
This version of ScummVM uses SDL2 hardware accelerated graphics, be it
plain SDL2 which in turn uses dispmanx/gles2 or by using gles1 via an
SDL2-configured GLES1 context.
Requirements
============
@ -67,40 +64,14 @@ works as in any other system ScummVM runs on.
Building from sources
==============================
We have two options to build once we have the sources in our main GNU/Linux desktop
class PC or in our Raspberry Pi:
1) Building on the Raspberry Pi itself, although possible, is an SLOW task for the
little computer unless you use distributed gcc (or distcc for short).
Local compilation would simply consist of the "standard" GNU/Linux building process:
cd <sources_dir>
./configure --enable-dispmanx -disable-debug --enable-release
--enable-optimizations --disable-mt32emu --disable-flac --disable-mad --disable-vorbis
--disable-tremor --disable-fluidsynth --disable-taskbar --disable-timidity --disable-alsa
--disable-scalers --disable-hq-scalers --disable-savegame-timestamp --disable-eventrecorder
make
As you can see, we're manually disabling scalers because we prefer dispmanx for that, which
makes scalers unnecessary on a CPU limited platform like this, timestamps because most people
doesn't have an RTC on the Raspberry Pi, and event recorder to save SD card write cycles.
All these are automatically disabled when we crosscompile by passing "--host=raspberrypi",
which is not the case.
¡¡It will be an SLOW process, taking several hours to complete, unless you
are running distcc against a fast compilation server!!
2) If we want to build by cross-compiling on a GNU/Linux X86-based computer,
we can find concise instructions for this can be found on the ScummVM wiki:
Recommended method is building by cross-compiling on a GNU/Linux X86-based computer.
You can find concise instructions for this on the ScummVM wiki:
http://wiki.scummvm.org/index.php/Compiling_ScummVM/RPI
NOTE: Distcc is my preferred method as it does cross-compiling totally transparent
(we build ON the Pi but the actual CPU-intensive compilation is made on an external
server), but it involves building a custom gcc version on the compilation server and
configuring a server and client in both the Raspberry Pi and the server.
The configure script is disabling scalers because we prefer dispmanx for that, which
makes scalers unnecessary on a CPU limited platform like this, timestamps because most people
doesn't have an RTC on the Raspberry Pi, and event recorder to save SD card write cycles.
All these are automatically disabled when we crosscompile by passing "--host=raspberrypi".
Enjoy!

View file

@ -1,42 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#if defined(DISPMANX)
#include "backends/platform/sdl/raspberrypi/raspberrypi.h"
#include "backends/graphics/dispmanxsdl/dispmanxsdl-graphics.h"
void OSystem_SDL_RaspberryPi::initBackend() {
// Create the events manager
if (_eventSource == 0)
_eventSource = new SdlEventSource();
// Create the graphics manager
if (_graphicsManager == 0) {
_graphicsManager = new DispmanXSdlGraphicsManager(_eventSource, _window);
}
// Call parent implementation of this method
OSystem_POSIX::initBackend();
}
#endif

View file

@ -1,35 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef SDL_DISPMANX_COMMON_H
#define SDL_DISPMANX_COMMON_H
#if defined(DISPMANX)
#include "backends/platform/sdl/posix/posix.h"
class OSystem_SDL_RaspberryPi : public OSystem_POSIX {
public:
void initBackend();
};
#endif /* DISPMANX */
#endif /* SDL_DISPMANX_COMMON_H */

View file

@ -36,8 +36,8 @@
#include "backends/saves/default/default-saves.h"
// Audio CD support was removed with SDL 1.3
#if SDL_VERSION_ATLEAST(1, 3, 0)
// Audio CD support was removed with SDL 2.0
#if SDL_VERSION_ATLEAST(2, 0, 0)
#include "backends/audiocd/default/default-audiocd.h"
#else
#include "backends/audiocd/sdl/sdl-audiocd.h"
@ -246,8 +246,8 @@ void OSystem_SDL::initBackend() {
#endif
if (_audiocdManager == 0) {
// Audio CD support was removed with SDL 1.3
#if SDL_VERSION_ATLEAST(1, 3, 0)
// Audio CD support was removed with SDL 2.0
#if SDL_VERSION_ATLEAST(2, 0, 0)
_audiocdManager = new DefaultAudioCDManager();
#else
_audiocdManager = new SdlAudioCDManager();

View file

@ -56,6 +56,7 @@ chdir("../../../");
"mmp/scummvm_lastexpress.mmp",
"mmp/scummvm_mads.mmp",
"mmp/scummvm_prince.mmp",
"mmp/scummvm_sherlock.mmp",
"mmp/scummvm_sword25.mmp",
"mmp/scummvm_testbed.mmp",
"mmp/scummvm_zvision.mmp",
@ -203,6 +204,7 @@ ParseModule("_lastexpress","lastexpress", \@section_empty);
ParseModule("_m4", "m4", \@section_empty);
ParseModule("_mads" ,"mads", \@section_empty);
ParseModule("_prince" ,"prince", \@section_empty);
ParseModule("_sherlock" ,"sherlock", \@section_empty);
ParseModule("_sword25" ,"sword25", \@section_empty);
ParseModule("_testbed" ,"testbed", \@section_empty);
ParseModule("_zvision" ,"zvision", \@section_empty);

View file

@ -1,36 +1,32 @@
##################################################################################################################
#### sword25 ignored because of incompatible resolution 800*600
@WorkingEngines = qw(
agos agi cine cge composer cruise draci dreamweb
drascula hugo gob groovie hopkins kyra lastexpress
lure made mohawk mortevielle neverhood parallaction
pegasus queen saga sci scumm sky sword1 sword2
teenagent tinsel toltecs tony toon touche tsage
tucker voyeur wintermute
access avalanche bbvs cge2 fullpipe mads prince
testbed zvision
access agi agos avalanche bbvs cge cge2
cine composer cruise draci drascula
dreamweb fullpipe gob groovie hopkins
hugo kyra lastexpress lure made mads
mohawk mortevielle neverhood parallaction
pegasus prince queen saga sci scumm
sherlock sky sword1 sword2 teenagent
testbed tinsel toltecs tony toon touche
tsage tucker voyeur wintermute zvision
);
#### sword25 yet not added
#### In progress engines are :
#### access avalanche bbvs cge2 fullpipe mads prince
#### testbed zvision
@WorkingEngines_1st = qw(
cine composer cruise drascula groovie
lastexpress made parallaction queen saga
scumm touche tucker wintermute voyeur
access avalanche cge2 zvision
access agi agos cge2 cine composer cruise
drascula gob groovie kyra lastexpress made
neverhood parallaction queen saga scumm
touche tucker voyeur wintermute
);
@WorkingEngines_2nd = qw(
agi agos cge draci dreamweb gob hopkins
hugo kyra lure mohawk mortevielle neverhood
pegasus sci sky sword1 sword2 teenagent
tinsel tsage toltecs tony toon
bbvs fullpipe mads prince testbed
avalanche bbvs cge draci dreamweb fullpipe
hopkins hugo lure mads mohawk mortevielle
pegasus prince sci sherlock sky sword1 sword2
teenagent testbed tinsel toltecs tony toon
tsage zvision
);
#### sword25 yet not added

View file

@ -36,7 +36,7 @@ TARGETPATH sys\bin
TARGETTYPE exe
OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
// fixes error "section .data loaded at [...] overlaps section .text loaded at [...]"
LINKEROPTION GCCE -Tdata 0xAA00000
LINKEROPTION GCCE -Tdata 0xAA00000 --gc-sections --strip-all
UID 0x100039ce 0xA0000658
@ -122,6 +122,7 @@ SOURCEPATH ..\..\..\..
// backend EPOC/SDL/ESDL specific includes
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\platform\sdl\sdl-window.cpp
SOURCE backends\audiocd\sdl\sdl-audiocd.cpp
SOURCE backends\audiocd\default\default-audiocd.cpp
SOURCE backends\fs\symbian\symbian-fs.cpp

View file

@ -37,7 +37,7 @@ TARGETTYPE exe
OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
// fixes error "section .data loaded at [...] overlaps section .text loaded at [...]"
LINKEROPTION GCCE -Tdata 0xAA00000
LINKEROPTION GCCE -Tdata 0xAA00000 --gc-sections --strip-all
UID 0x100039ce 0xA0000657
@ -123,6 +123,7 @@ SOURCEPATH ..\..\..\..
// backend EPOC/SDL/ESDL specific includes
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\platform\sdl\sdl-window.cpp
SOURCE backends\audiocd\sdl\sdl-audiocd.cpp
SOURCE backends\audiocd\default\default-audiocd.cpp
SOURCE backends\fs\symbian\symbian-fs.cpp

View file

@ -39,26 +39,28 @@ Synonyms;}{\*\cs33 \additive \super \sbasedon10 endnote reference;}{\s34\ql \fi-
\f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 \sbasedon0 \snext34 \sautoupd List Bullet;}{\s35\ql \fi-284\li568\ri0\sa120\widctlpar{\*\pn \pnlvlblt\ilvl10\ls2047\pnrnot0\pnf3\pnstart1\pnindent283\pnhang{\pntxtb \'b7}}
\nooverflow\faroman\ls2047\ilvl10\rin0\lin568\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 \sbasedon0 \snext35 \sautoupd List Bullet 2;}{\s36\ql \li0\ri0\sa120\widctlpar\tqc\tx4153\tqr\tx8306\nooverflow\faroman\rin0\lin0\itap0
\f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 \sbasedon0 \snext36 footer;}{\s37\ql \li284\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin284\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 \sbasedon0 \snext37 List Continue;}{
\s38\ql \li566\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin566\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 \sbasedon0 \snext38 List Continue 2;}}{\*\listtable{\list\listtemplateid-737142542\listsimple{\listlevel\levelnfc0
\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li643\jclisttab\tx643 }{\listname ;}\listid-129}
{\list\listtemplateid1907811784\listsimple{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0
\fi-360\li643\jclisttab\tx643 }{\listname ;}\listid-125}{\list\listtemplateid1912741052\listsimple{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\chbrdr
\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid-120}{\list\listtemplateid-51363132\listsimple{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid-119}{\list\listtemplateid947971744\listsimple{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0
\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01*;}{\levelnumbers;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 }{\listname ;}\listid-2}}{\*\listoverridetable{\listoverride\listid-120\listoverridecount0\ls1}
{\listoverride\listid-129\listoverridecount0\ls2}{\listoverride\listid-119\listoverridecount0\ls3}{\listoverride\listid-125\listoverridecount0\ls4}{\listoverride\listid-120\listoverridecount0\ls5}{\listoverride\listid-129\listoverridecount0\ls6}
{\listoverride\listid-119\listoverridecount0\ls7}{\listoverride\listid-125\listoverridecount0\ls8}{\listoverride\listid-120\listoverridecount0\ls9}{\listoverride\listid-129\listoverridecount0\ls10}{\listoverride\listid-119\listoverridecount0\ls11}
{\listoverride\listid-125\listoverridecount0\ls12}{\listoverride\listid-120\listoverridecount0\ls13}{\listoverride\listid-129\listoverridecount0\ls14}{\listoverride\listid-119\listoverridecount0\ls15}{\listoverride\listid-125\listoverridecount0\ls16}
{\listoverride\listid-120\listoverridecount0\ls17}{\listoverride\listid-129\listoverridecount0\ls18}{\listoverride\listid-119\listoverridecount0\ls19}{\listoverride\listid-125\listoverridecount0\ls20}{\listoverride\listid-120\listoverridecount0\ls21}
{\listoverride\listid-129\listoverridecount0\ls22}{\listoverride\listid-119\listoverridecount0\ls23}{\listoverride\listid-125\listoverridecount0\ls24}{\listoverride\listid-120\listoverridecount0\ls25}{\listoverride\listid-129\listoverridecount0\ls26}
{\listoverride\listid-119\listoverridecount0\ls27}{\listoverride\listid-125\listoverridecount0\ls28}{\listoverride\listid-120\listoverridecount0\ls29}{\listoverride\listid-129\listoverridecount0\ls30}{\listoverride\listid-119\listoverridecount0\ls31}
{\listoverride\listid-125\listoverridecount0\ls32}{\listoverride\listid-120\listoverridecount0\ls33}{\listoverride\listid-129\listoverridecount0\ls34}{\listoverride\listid-119\listoverridecount0\ls35}{\listoverride\listid-125\listoverridecount0\ls36}
{\listoverride\listid-120\listoverridecount0\ls37}{\listoverride\listid-129\listoverridecount0\ls38}{\listoverride\listid-119\listoverridecount0\ls39}{\listoverride\listid-125\listoverridecount0\ls40}{\listoverride\listid-2\listoverridecount1{\lfolevel
\listoverrideformat{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283
}}\ls41}{\listoverride\listid-2\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr
\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283 }}\ls42}}{\info{\author Fedor}{\operator Fedor}{\creatim\yr2013\mo11\dy30\hr23\min4}{\revtim\yr2014\mo12\dy29\hr22\min52}{\version102}{\edmins95}{\nofpages8}{\nofwords1514}{\nofchars8634}
{\*\company DEV}{\nofcharsws0}{\vern8249}}\margl1701\margr850\margt1134\margb1134 \deftab708\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0
\dgvshow3\jcompress\viewkind4\viewscale100\nolnhtadjtbl \fet0{\*\template E:\\Documents and Settings\\Administrator\\Application Data\\Microsoft\\\'d8\'e0\'e1\'eb\'ee\'ed\'fb\\cshelp2000.dot}\sectd \linex0\sectdefaultcl {\*\pnseclvl1
\s38\ql \li566\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin566\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 \sbasedon0 \snext38 List Continue 2;}{\*\cs39 \additive \sbasedon10 x x-first x-last;}}{\*\listtable
{\list\listtemplateid-737142542\listsimple{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li643
\jclisttab\tx643 }{\listname ;}\listid-129}{\list\listtemplateid1907811784\listsimple{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\chbrdr
\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-360\li643\jclisttab\tx643 }{\listname ;}\listid-125}{\list\listtemplateid1912741052\listsimple{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
{\leveltext\'02\'00.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid-120}{\list\listtemplateid-51363132\listsimple{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0
\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid-119}{\list\listtemplateid947971744\listsimple
{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01*;}{\levelnumbers;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 }{\listname ;}\listid-2}}{\*\listoverridetable
{\listoverride\listid-120\listoverridecount0\ls1}{\listoverride\listid-129\listoverridecount0\ls2}{\listoverride\listid-119\listoverridecount0\ls3}{\listoverride\listid-125\listoverridecount0\ls4}{\listoverride\listid-120\listoverridecount0\ls5}
{\listoverride\listid-129\listoverridecount0\ls6}{\listoverride\listid-119\listoverridecount0\ls7}{\listoverride\listid-125\listoverridecount0\ls8}{\listoverride\listid-120\listoverridecount0\ls9}{\listoverride\listid-129\listoverridecount0\ls10}
{\listoverride\listid-119\listoverridecount0\ls11}{\listoverride\listid-125\listoverridecount0\ls12}{\listoverride\listid-120\listoverridecount0\ls13}{\listoverride\listid-129\listoverridecount0\ls14}{\listoverride\listid-119\listoverridecount0\ls15}
{\listoverride\listid-125\listoverridecount0\ls16}{\listoverride\listid-120\listoverridecount0\ls17}{\listoverride\listid-129\listoverridecount0\ls18}{\listoverride\listid-119\listoverridecount0\ls19}{\listoverride\listid-125\listoverridecount0\ls20}
{\listoverride\listid-120\listoverridecount0\ls21}{\listoverride\listid-129\listoverridecount0\ls22}{\listoverride\listid-119\listoverridecount0\ls23}{\listoverride\listid-125\listoverridecount0\ls24}{\listoverride\listid-120\listoverridecount0\ls25}
{\listoverride\listid-129\listoverridecount0\ls26}{\listoverride\listid-119\listoverridecount0\ls27}{\listoverride\listid-125\listoverridecount0\ls28}{\listoverride\listid-120\listoverridecount0\ls29}{\listoverride\listid-129\listoverridecount0\ls30}
{\listoverride\listid-119\listoverridecount0\ls31}{\listoverride\listid-125\listoverridecount0\ls32}{\listoverride\listid-120\listoverridecount0\ls33}{\listoverride\listid-129\listoverridecount0\ls34}{\listoverride\listid-119\listoverridecount0\ls35}
{\listoverride\listid-125\listoverridecount0\ls36}{\listoverride\listid-120\listoverridecount0\ls37}{\listoverride\listid-129\listoverridecount0\ls38}{\listoverride\listid-119\listoverridecount0\ls39}{\listoverride\listid-125\listoverridecount0\ls40}
{\listoverride\listid-120\listoverridecount0\ls41}{\listoverride\listid-129\listoverridecount0\ls42}{\listoverride\listid-119\listoverridecount0\ls43}{\listoverride\listid-125\listoverridecount0\ls44}{\listoverride\listid-120\listoverridecount0\ls45}
{\listoverride\listid-129\listoverridecount0\ls46}{\listoverride\listid-119\listoverridecount0\ls47}{\listoverride\listid-125\listoverridecount0\ls48}{\listoverride\listid-2\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23
\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283 }}\ls49}{\listoverride\listid-2
\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr\brdrnone\brdrcf1
\chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283 }}\ls50}}{\info{\author Fedor}{\operator Fedor}{\creatim\yr2013\mo11\dy30\hr23\min4}{\revtim\yr2015\mo11\dy22\hr17\min27}{\version105}{\edmins185}{\nofpages8}{\nofwords1514}{\nofchars8634}{\*\company DEV}
{\nofcharsws0}{\vern8249}}\margl1701\margr850\margt1134\margb1134 \deftab708\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3
\jcompress\viewkind4\viewscale100\nolnhtadjtbl \fet0{\*\template E:\\Documents and Settings\\Administrator\\Application Data\\Microsoft\\\'d8\'e0\'e1\'eb\'ee\'ed\'fb\\cshelp2000.dot}\sectd \linex0\sectdefaultcl {\*\pnseclvl1
\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5
\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang
{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s17\ql \li0\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin0\itap0 \i\f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {
@ -70,20 +72,19 @@ Synonyms;}{\*\cs33 \additive \super \sbasedon10 endnote reference;}{\s34\ql \fi-
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0 \b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28
About ScummVM Help
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls41\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls41\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {About ScummVM Help
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls49\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls49\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {About ScummVM Help
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par }{
This help file based on ScummVM forum thread with some elaborations(in Anotherguest section) and text correction. If you wish add some text or translate you may download and modify source document from https://sourceforge.net/projects/scummvms60git/ and t
hen send me to fedor_qd@mail.ru
\par }{This help file based on ScummVM forum thread with some elaborations(in Anotherguest section) and text correction. If you wish add some text or translate you may download and modify source document from https://sourceforge.net/projects/scummvms60git/ a
nd then send me to fedor_qd@mail.ru
\par Feel free to replace, merge or write you own instead 1st, 2nd and 3rd guides. Other sections require strict translations. And don\rquote t forget add your name :-)
\par First guide contain help by Anotherguest, second - VincentJ, third - murgo. This doc created by Fedor Strizhniou.
\par Enjoys, cheers! Always yours =)}{\lang1059\langfe1033\langnp1059
\par }{\f29
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28 1st guide
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls41\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls41\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, UIQ, UIQ3, S80, s80, S90, s90
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls49\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls49\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, UIQ, UIQ3, S80, s80, S90, s90
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par }{UIQ3 devices: To the top right (holding the phone portrait) you four icons, from the top they are
\par
@ -124,22 +125,22 @@ hen send me to fedor_qd@mail.ru
\par
\par What are these Joystick, Keyboard and Cursor modes anyway?
\par }{\f28
\par }{Joystick mode sends SDL joystick events to ScummVM which acts as a mouse control in ScummVM. Cursor mode sends keyboard arrows instead, so for example it can be used to navigate
through directorylist (one hand use perhaps!?) or save games etc. Keyboard mode is only available for S60 and enables multi-tap to enter text characters in save dialogs. These modes are implemented at the underlying SDL level, so this determines the types
of events that ScummVM receives from SDL.
\par }{Joystick mode sends SDL joystick events to ScummVM which acts as a mouse control in ScummVM. Cursor mode sends keyboard arrows instead, so for exampl
e it can be used to navigate through directorylist (one hand use perhaps!?) or save games etc. Keyboard mode is only available for S60 and enables multi-tap to enter text characters in save dialogs. These modes are implemented at the underlying SDL level,
so this determines the types of events that ScummVM receives from SDL.
\par What are these Shrinked, Zoomed and Upscaled modes anyway?
\par
\par Shrink displays the game on your screen but in a shrinked way, either in Port
rait or Landscape mode, so not all the pixels can be seen. Zoom mode uses the maximum resolution of your phone displaying a smaller part of the game zoomed at 1:1 pixels. For scrolling in S60 Zoom mode: 0+Cursor keys to scroll around, 0+Ok button to cente
r view. Upscale tries to fill the larger screens on S80/S90 devices in a better way for low resolution games. Currently it uses a pixel interpolation upscaling routine.
\par Shrink displays the game on your screen but in a shrinked way, either in Portrait or Landscape mode, so not all the pixels ca
n be seen. Zoom mode uses the maximum resolution of your phone displaying a smaller part of the game zoomed at 1:1 pixels. For scrolling in S60 Zoom mode: 0+Cursor keys to scroll around, 0+Ok button to center view. Upscale tries to fill the larger screens
on S80/S90 devices in a better way for low resolution games. Currently it uses a pixel interpolation upscaling routine.
\par
\par You can also use a bluetooth mouse with S60v3 devices to control your game. You need the bluetooth hid library from Hinkka http://koti.mbnet.fi/hinkka/Download.html to get it to work properly.
\par }{\f29
\par
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28 2nd guide
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls41\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls41\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls49\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls49\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par
\par }{More user-friendly guide for Nokia phones (based on N96 but should apply to most phones)
@ -164,8 +165,8 @@ r view. Upscale tries to fill the larger screens on S80/S90 devices in a better
\par }{1 - Change Input.
\par This is the option you'll probably use the most. There are three settings; A,C and J.
\par
\par A - This is the "Text Input" mode. It allows you to type directly into ScummVM as if you were using a keyboard. Type the same way you would when sending a text message o
ff of your phone. Please note that the pointer is disabled when in this mode. Don't forget to exit Configuration Mode before typing!
\par A - This is the "Text Input" mode. It allows you to type directly into ScummVM as if you were using a keyboard. Type the same way you would wh
en sending a text message off of your phone. Please note that the pointer is disabled when in this mode. Don't forget to exit Configuration Mode before typing!
\par
\par C - This is the "Cursor" mode. This emulates the arrow keys of the keyboard. Some games require using this instead of the mouse (e.g. the destruction derby section towards the end of Full Throttle).
\par
@ -180,9 +181,9 @@ ff of your phone. Please note that the pointer is disabled when in this mode. Do
\par Only applies to Landscape mode, simply swaps the screen output between having the phone tilted on its left side or on its right side.
\par
\par 4 - Toggle Zoom On and Off
\par Zooms in on a portion of the screen. Handy for when you are looking through a screen fo
r items or having trouble reading subtitles. Use the navigation buttons for panning around the play area. Don't forget you'll have to exit out of Configuration Mode before you can move the pointer again. Exiting Configuration Mode does not reset the zoom
level.
\par Zooms in on a portion of the screen. Handy for when you are
looking through a screen for items or having trouble reading subtitles. Use the navigation buttons for panning around the play area. Don't forget you'll have to exit out of Configuration Mode before you can move the pointer again. Exiting Configuration Mo
de does not reset the zoom level.
\par }{\f29
\par }{5 & 6 - Unused
\par
@ -203,12 +204,13 @@ level.
\par
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28 3rd guide
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls41\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls41\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls49\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls49\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par
\par }{ScummVM keys on Nokia e71 (most likely on any other qwerty-device, too), tested on version 0.14.0svn (Feb. 18 20
09 05:56:07). Number keys are inserted by first pressing fn-key (leftmost key at bottom row on E71) and then pressing correct key (e.g. 5 is fn+g). You don't have to press both keys simultaneously.
\par }{ScummVM keys on Nokia
e71 (most likely on any other qwerty-device, too), tested on version 0.14.0svn (Feb. 18 2009 05:56:07). Number keys are inserted by first pressing fn-key (leftmost key at bottom row on E71) and then pressing correct key (e.g. 5 is fn+g). You don't have t
o press both keys simultaneously.
\par
\par Basic keys:
\par
@ -258,8 +260,8 @@ level.
\par p -- punch (hand)
\par
\par AGI games (King's Quest, Police Quest etc.):
\par The games work beautifully on the E71, but there's some stupid bugs (in input). I recall finding some debug keys and "last sentence" / "inventory" -keys in earlier version, but I can't find them any more. Also you can't turn on sirens in Police Quest, whi
ch kinda makes it unplayable.
\par The games work beautifully on the E71, but there's some stupid bugs (in input). I recall finding some debug keys and "last sentence" / "inventory" -keys in earlier version, bu
t I can't find them any more. Also you can't turn on sirens in Police Quest, which kinda makes it unplayable.
\par
\par There's good side and bad side to each input mode:
\par Keyboard (I use this primarily)
@ -280,8 +282,8 @@ ch kinda makes it unplayable.
\par }{\f28
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {ScummVM1 engines list
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls42\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls42\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported engines
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls50\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls50\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported engines
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {access
\par agi
\par agos
@ -315,9 +317,10 @@ ch kinda makes it unplayable.
\par
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {ScummVM2 engines list
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls42\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls42\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported engines
\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls50\pnrnot0
\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls50\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported engines
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {avalanche
\par }{\cs39 bbvs}{
\par cge
\par composer
\par draci
@ -336,6 +339,7 @@ ch kinda makes it unplayable.
\par prince
\par sci
\par \tab SCI32
\par sherlock
\par sky
\par sword1
\par sword2

View file

@ -18,12 +18,9 @@ clean :
del ScummVM.hlp
del ScummVM.hlp.hrh
bld :
cshlpcmp ScummVM.xml
ifeq (WINS,$(findstring WINS, $(PLATFORM)))
copy ScummVM.hlp $(EPOCROOT)epoc32\$(PLATFORM)\c\resource\help
endif
freeze lib cleanlib final resource savespace releasables :
bld freeze lib cleanlib final resource savespace releasables :

View file

@ -38,6 +38,7 @@ TARGETTYPE lib
OPTION GCCE -I'/Symbian/S60_5th_Edition_SDK_v1.0/epoc32/include/png'
// Note: the LIB:*.lib statements are used by AdaptAllMMPs.pl, so don't remove them!
MACRO USE_SYSTEM_REMOVE
//START_AUTO_MACROS_MASTER//
// empty base file, will be updated by Perl build scripts
@ -99,6 +100,7 @@ SOURCEPATH ..\..\..\..\audio
//STOP_AUTO_OBJECTS_AUDIO_//
SOURCE softsynth\fmtowns_pc98\towns_pc98_fmsynth.cpp // Included since its excluded by filter
SOURCE miles_mt32.cpp
#if defined (WINS)
SOURCE rate.cpp // WINS emulator version: add regular .cpp

View file

@ -1,4 +1,9 @@
/* ScummVM - Graphic Adventure Engine
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
* Copyright (C) 2005-2015 The ScummVM Team
* Copyright (C) 2015 Strizniou Fedor
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
@ -20,48 +25,29 @@
*
*/
#ifndef BACKENDS_MIXER_SDL13_H
#define BACKENDS_MIXER_SDL13_H
//
// EPOC MMP makefile project for ScummVM
//
#include "backends/mixer/sdl/sdl-mixer.h"
// *** Definitions
/**
* SDL mixer manager. It wraps the actual implementation
* of the Audio:Mixer used by the engine, and setups
* the SDL audio subsystem and the callback for the
* audio mixer implementation.
*/
class Sdl13MixerManager : public SdlMixerManager {
public:
Sdl13MixerManager();
virtual ~Sdl13MixerManager();
TARGET scummvm_sherlock.lib
TARGETTYPE lib
#include "config.mmh"
/**
* Initialize and setups the mixer
*/
virtual void init();
//START_AUTO_MACROS_SLAVE//
/**
* Pauses the audio system
*/
virtual void suspendAudio();
// empty base file, will be updated by Perl build scripts
/**
* Resumes the audio system
*/
virtual int resumeAudio();
//STOP_AUTO_MACROS_SLAVE//
protected:
// *** SOURCE files
/**
* The opened SDL audio device
*/
SDL_AudioDeviceID _device;
SOURCEPATH ..\..\..\..\engines\sherlock
/**
* Starts SDL audio
*/
virtual void startAudio();
};
//START_AUTO_OBJECTS_SHERLOCK_//
// empty base file, will be updated by Perl build scripts
//STOP_AUTO_OBJECTS_SHERLOCK_//
#endif

View file

@ -127,7 +127,6 @@ void TizenGraphicsManager::setReady() {
void TizenGraphicsManager::updateScreen() {
if (!_initState) {
OpenGLGraphicsManager::updateScreen();
eglSwapBuffers(_eglDisplay, _eglSurface);
}
}
@ -203,3 +202,7 @@ bool TizenGraphicsManager::loadVideoMode(uint requestedWidth, uint requestedHeig
// using a fixed output size we do nothing like that here.
return true;
}
void TizenGraphicsManager::refreshScreen() {
eglSwapBuffers(_eglDisplay, _eglSurface);
}

View file

@ -61,6 +61,8 @@ protected:
bool loadVideoMode(uint requestedWidth, uint requestedHeight, const Graphics::PixelFormat &format);
void refreshScreen();
const Graphics::Font *getFontOSD();
private:

View file

@ -32,6 +32,21 @@
#if defined(__GNUC__) && defined(__MINGW32__) && !defined(__MINGW64__)
#include "backends/taskbar/win32/mingw-compat.h"
#else
// We use functionality introduced with Win7 in this file.
// To assure that including the respective system headers gives us all
// required definitions we set Win7 as minimum version we target.
// See: https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#macros_for_conditional_declarations
#undef _WIN32_WINNT
#define _WIN32_WINNT _WIN32_WINNT_WIN7
// TODO: We might not need to include this file, the MSDN docs are
// not really helpful to decide whether we require it or not.
//
// Casing of the name is a bit of a mess. MinGW64 seems to use all
// lowercase, while MSDN docs suggest "SdkDdkVer.h". We are stuck with
// what MinGW64 uses...
#include <sdkddkver.h>
// We need certain functions that are excluded by default
#undef NONLS
#undef NOICONS
@ -39,11 +54,6 @@
#if defined(ARRAYSIZE)
#undef ARRAYSIZE
#endif
#if defined(_MSC_VER)
// Default MSVC headers for ITaskbarList3 and IShellLink
#include <SDKDDKVer.h>
#endif
#endif
#include <shlobj.h>

65
configure vendored
View file

@ -135,7 +135,6 @@ _faad=auto
_fluidsynth=auto
_opengl=auto
_opengles=auto
_dispmanx=no
_readline=auto
_freetype2=auto
_taskbar=auto
@ -1062,8 +1061,6 @@ for ac_option in $@; do
--disable-libunity) _libunity=no ;;
--enable-opengl) _opengl=yes ;;
--disable-opengl) _opengl=no ;;
--enable-dispmanx) _dispmanx=yes ;;
--disable-dispmanx) _dispmanx=no ;;
--enable-bink) _bink=yes ;;
--disable-bink) _bink=no ;;
--enable-verbose-build) _verbose_build=yes ;;
@ -2062,7 +2059,12 @@ case $_host_cpu in
*)
echo "ARM"
define_in_config_if_yes yes 'USE_ARM_SCALER_ASM'
define_in_config_if_yes yes 'USE_ARM_SOUND_ASM'
# FIXME: The following feature exhibits a bug. It produces distorted
# sound since 9003ce517ff9906b0288f9f7c02197fd091d4554. The ARM
# assembly will need to be properly adapted to the changes to the C
# code in 8f5a7cde2f99de9fef849b0ff688906f05f4643e.
# See bug #6957: "AUDIO: ARM ASM sound code causes distorted audio on 32 bit armv6"
#define_in_config_if_yes yes 'USE_ARM_SOUND_ASM'
define_in_config_if_yes yes 'USE_ARM_SMUSH_ASM'
define_in_config_if_yes yes 'USE_ARM_GFX_ASM'
# FIXME: The following feature exhibits a bug during the intro scene of Indy 4
@ -2430,6 +2432,7 @@ case $_host_os in
;;
ps3)
# Force use of SDL and freetype from the ps3 toolchain
_sdlconfig=sdl2-config
_sdlpath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin"
_freetypepath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin"
@ -2587,22 +2590,25 @@ if test -n "$_host"; then
# This is needed because the official cross compiler doesn't have multiarch enabled
# but Raspbian does.
# Be careful as it's the linker (LDFLAGS) which must know about sysroot.
# These are needed to build against Raspbian's libSDL even if we don't activate
# dispmanx support.
# These are needed to build against Raspbian's libSDL.
append_var LDFLAGS "--sysroot=$RPI_ROOT"
append_var LDFLAGS "-B$RPI_ROOT/usr/lib/arm-linux-gnueabihf"
append_var LDFLAGS "-Xlinker --rpath-link=$RPI_ROOT/usr/lib/arm-linux-gnueabihf"
append_var LDFLAGS "-Xlinker --rpath-link=$RPI_ROOT/lib/arm-linux-gnueabihf"
append_var LDFLAGS "-Xlinker --rpath-link=$RPI_ROOT/opt/vc/lib"
append_var LDFLAGS "-L$RPI_ROOT/opt/vc/lib"
append_var LDFLAGS "-L/opt/rpi_root/lib/arm-linux-gnueabihf -L$RPI_ROOT/usr/lib -L$RPI_ROOT/opt/vc/lib -lbcm_host -lvcos"
# This is so optional OpenGL ES includes are found.
append_var CXXFLAGS "-I$RPI_ROOT/opt/vc/include"
_savegame_timestamp=no
_eventrec=no
_build_scalers=no
_build_hq_scalers=no
# It makes no sense to have both GL and dispmanx rendering support.
_opengl=no
_opengles=no
# We prefer SDL2 on the Raspberry Pi: acceleration now depends on it
# since SDL2 manages dispmanx/GLES2 very well internally.
# SDL1 is bit-rotten on this platform.
_sdlconfig=sdl2-config
# We should add _opengles=yes later here if we wanted the GLES renderer.
# For now, we use plain SDL2 only, which in turn uses GLES2 by default.
;;
dreamcast)
append_var DEFINES "-DDISABLE_DEFAULT_SAVEFILEMANAGER"
@ -3144,9 +3150,6 @@ case $_backend in
_sdlversion=`$_sdlconfig --version`
case $_sdlversion in
1.3.*)
add_line_to_config_mk "USE_SDL13 = 1"
;;
2.0.*)
add_line_to_config_mk "USE_SDL2 = 1"
;;
@ -4071,6 +4074,13 @@ EOF
cat > $TMPC << EOF
#include <$i>
int main(void) { return GL_OES_VERSION_1_1; }
EOF
cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes && _opengles=yes && break
# Test the current header for OpenGL ES on SBCs (Raspberry Pi, Cubieboard, etc)
cat > $TMPC << EOF
#include <$i>
int main(void) { return GL_VERSION_ES_CM_1_1; }
EOF
cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes && _opengles=yes && break
done
@ -4140,35 +4150,6 @@ fi
define_in_config_if_yes "$_opengl" "USE_OPENGL"
define_in_config_if_yes "$_opengles" "USE_GLES"
# Check if Raspberry Pi's Dispmanx graphics have been enabled and everything is in place.
# If dispmanx is disabled, we fall back to plain SDL rendering.
if test "$_dispmanx" = "yes" ; then
echocheck "DispmanX graphics"
_use_dispmanx=no
# These are only needed if, appart from cross-building for Raspberry Pi,
# we are activating dispmanx support.
DISPMANX_CXXFLAGS="-I$RPI_ROOT/usr/include -I$RPI_ROOT/usr/include/arm-linux-gnueabihf -I$RPI_ROOT/opt/vc/include -I$RPI_ROOT/opt/vc/include/interface/vmcs_host/linux -I$RPI_ROOT/opt/vc/include/interface/vcos/pthreads -I$RPI_ROOT/usr/include/SDL"
DISPMANX_LIBS="$RPI_LIBS -L/opt/rpi_root/lib/arm-linux-gnueabihf -L$RPI_ROOT/usr/lib -L$RPI_ROOT/opt/vc/lib -lbcm_host -lvcos -lvchiq_arm"
cat > $TMPC << EOF
#include <bcm_host.h>
int main(int argc, char *argv[]) {
bcm_host_init();
}
EOF
cc_check $DISPMANX_CXXFLAGS $DISPMANX_LIBS && _use_dispmanx=yes
if test "$_use_dispmanx" = "yes"; then
append_var CXXFLAGS "$DISPMANX_CXXFLAGS"
append_var LIBS "$DISPMANX_LIBS"
append_var DEFINES "-DDISPMANX"
add_line_to_config_mk 'DISPMANX = 1'
echo $_use_dispmanx
else echo "no"
fi
fi
#
# Check for nasm
#

View file

@ -392,7 +392,7 @@ int main(int argc, char *argv[]) {
for (int y = 0; y < box.height; ++y) {
printf("// |");
unsigned char data;
unsigned char data = 0;
for (int x = 0; x < box.width; ++x) {
if (!(x % 8))
data = *bitmap++;

View file

@ -0,0 +1,757 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "amazon_resources.h"
namespace Amazon {
const byte MOUSE0[] = {
// hotspot x and y, uint16 LE
0, 0, 0, 0,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0, 2, 6, 1,
0, 3, 6, 6, 1,
0, 3, 6, 6, 1,
0, 4, 6, 6, 6, 1,
0, 4, 6, 6, 6, 1,
0, 5, 6, 6, 6, 6, 1,
0, 5, 6, 6, 6, 6, 1,
0, 6, 6, 6, 6, 6, 6, 1,
0, 6, 6, 6, 6, 6, 6, 1,
0, 7, 6, 6, 6, 6, 6, 6, 1,
0, 6, 6, 6, 6, 6, 6, 1,
0, 5, 6, 6, 6, 6, 1,
2, 3, 6, 6, 1,
3, 3, 6, 6, 1,
3, 3, 6, 6, 1,
4, 2, 6, 1
};
const byte MOUSE1[] = {
// hotspot x and y, uint16 LE
0x07, 0x00, 0x07, 0x00,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0x06, 0x01, 0x05,
0x04, 0x05, 0xFF, 0xFF, 0x00, 0xFF, 0xFF,
0x03, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
0x02, 0x09, 0xFF, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xFF,
0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xFF,
0x00, 0x0D, 0x05, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x00, 0x05,
0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xFF,
0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
0x02, 0x09, 0xFF, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xFF,
0x03, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
0x04, 0x05, 0xFF, 0xFF, 0x00, 0xFF, 0xFF,
0x06, 0x01, 0x05,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00
};
const byte MOUSE2[] = {
// hotspot x and y, uint16 LE
0x08, 0x00, 0x08, 0x00,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0x00, 0x00,
0x00, 0x00,
0x07, 0x02, 0x04, 0x05,
0x07, 0x02, 0x04, 0x05,
0x07, 0x02, 0x04, 0x05,
0x07, 0x02, 0x04, 0x05,
0x07, 0x02, 0x04, 0x05,
0x02, 0x0C, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05,
0x07, 0x02, 0x04, 0x05,
0x07, 0x02, 0x04, 0x05,
0x07, 0x02, 0x04, 0x05,
0x07, 0x02, 0x04, 0x05,
0x07, 0x02, 0x04, 0x05,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00
};
const byte MOUSE3[] = {
// hotspot x and y, uint16 LE
0x00, 0x00, 0x00, 0x00,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0x00, 0x0B, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x00, 0x0C, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06, 0x05,
0x00, 0x0C, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x05, 0x05,
0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x05, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x05,
0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
0x01, 0x0B, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00
};
const byte CURSEYE[] = {
// hotspot x and y, uint16 LE
0x01, 0x00, 0x08, 0x00,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0x04, 0x06, 0x0E, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D,
0x03, 0x09, 0x0E, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0D, 0x0D,
0x02, 0x0B, 0x0E, 0x01, 0x33, 0x33, 0x01, 0x01, 0x33, 0x34, 0x01, 0x01, 0x0D,
0x01, 0x0D, 0x0E, 0x01, 0x04, 0x34, 0x01, 0x01, 0x01, 0x07, 0x33, 0x04, 0x04, 0x01, 0x0D,
0x00, 0x0F, 0x0E, 0x0E, 0x01, 0x07, 0x33, 0x33, 0x01, 0x01, 0x33, 0x34, 0x07, 0x07, 0x06, 0x01, 0x0E,
0x01, 0x0D, 0x0F, 0x0F, 0x06, 0x07, 0x34, 0x33, 0x33, 0x34, 0x07, 0x07, 0x06, 0x0F, 0x0E,
0x03, 0x09, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E,
0x01, 0x01, 0x07,
0x00, 0x03, 0x07, 0x01, 0x07,
0x01, 0x01, 0x07,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00
};
const byte CURSHAND[] = {
// hotspot x and y, uint16 LE
0x02, 0x00, 0x03, 0x00,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0x07, 0x02, 0x17, 0x0E,
0x05, 0x07, 0x0E, 0x12, 0x17, 0x0E, 0x13, 0x17, 0x0E,
0x02, 0x0C, 0x07, 0x00, 0x17, 0x0E, 0x11, 0x0F, 0x0E, 0x11, 0x17, 0x0E, 0x00, 0x17,
0x01, 0x0E, 0x07, 0x01, 0x07, 0x0F, 0x0E, 0x11, 0x17, 0x0E, 0x11, 0x0F, 0x0E, 0x12, 0x17, 0x0E,
0x02, 0x0D, 0x07, 0x00, 0x17, 0x0F, 0x12, 0x0F, 0x0F, 0x11, 0x17, 0x0E, 0x12, 0x0F, 0x0E,
0x04, 0x0B, 0x0F, 0x0E, 0x11, 0x17, 0x0E, 0x12, 0x0F, 0x0F, 0x11, 0x17, 0x0E,
0x04, 0x0B, 0x17, 0x0E, 0x12, 0x17, 0x0E, 0x12, 0x17, 0x0E, 0x11, 0x0F, 0x0E,
0x00, 0x0F, 0x0E, 0x0D, 0x12, 0x00, 0x17, 0x0F, 0x0F, 0x0F, 0x0F, 0x12, 0x0F, 0x0E, 0x12, 0x17, 0x0F,
0x00, 0x0F, 0x0F, 0x17, 0x0D, 0x11, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D,
0x01, 0x0E, 0x0F, 0x17, 0x0F, 0x0E, 0x0F, 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, 0x0F, 0x0F, 0x0E, 0x0D,
0x02, 0x0D, 0x0F, 0x17, 0x0F, 0x0E, 0x0D, 0x0D, 0x0F, 0x0F, 0x0E, 0x0F, 0x0E, 0x0E, 0x12,
0x03, 0x0C, 0x0F, 0x17, 0x0F, 0x0F, 0x0F, 0x0E, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D, 0x12,
0x04, 0x0A, 0x0F, 0x17, 0x0F, 0x0F, 0x0F, 0x0E, 0x0F, 0x0F, 0x0E, 0x0D,
0x05, 0x09, 0x0F, 0x17, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D, 0x12,
0x06, 0x08, 0x17, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D, 0x12,
0x06, 0x07, 0x17, 0x0F, 0x0F, 0x0F, 0x3D, 0x0E, 0x0D
};
const byte CURSGET[] = {
// hotspot x and y, uint16 LE
0x07, 0x00, 0x0E, 0x00,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0x0A, 0x05, 0x1C, 0x07, 0x0F, 0x0F, 0x0F,
0x08, 0x08, 0x1C, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
0x06, 0x0A, 0x1C, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
0x05, 0x0A, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
0x03, 0x0C, 0x07, 0x1C, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
0x02, 0x0D, 0x1C, 0x0F, 0x0E, 0x0E, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
0x01, 0x0E, 0x07, 0x0F, 0x0E, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
0x00, 0x0F, 0x1C, 0x0F, 0x0E, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
0x00, 0x0F, 0x1C, 0x0E, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0C, 0x0C, 0x0E, 0x0F, 0x0F, 0x0F, 0x0C,
0x00, 0x0E, 0x1C, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0C, 0x00, 0x00, 0x0E, 0x0F, 0x0F, 0x0C,
0x00, 0x0E, 0x1C, 0x0E, 0x0F, 0x0D, 0x0F, 0x0F, 0x0C, 0x00, 0x00, 0x0E, 0x1C, 0x0F, 0x0F, 0x0C,
0x00, 0x0D, 0x1C, 0x0D, 0x0F, 0x0D, 0x0F, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x1C, 0x0F, 0x0C,
0x01, 0x0B, 0x0E, 0x0F, 0x0E, 0x0F, 0x0C, 0x00, 0x00, 0x0E, 0x07, 0x0F, 0x0C,
0x02, 0x09, 0x0E, 0x0D, 0x0F, 0x0C, 0x00, 0x07, 0x0E, 0x0F, 0x0C,
0x03, 0x06, 0x0E, 0x0F, 0x0E, 0x07, 0x01, 0x07,
0x07, 0x01, 0x07
};
const byte CURSCLIMB[] = {
// hotspot x and y, uint16 LE
0x03, 0x00, 0x0E, 0x00,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0x06, 0x04, 0x01, 0x01, 0x01, 0x01,
0x06, 0x04, 0x0F, 0x0E, 0x01, 0x01,
0x06, 0x04, 0x0F, 0x0E, 0x0D, 0x01,
0x07, 0x02, 0x0F, 0x0D,
0x00, 0x0C, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x13, 0x12, 0x12, 0x12, 0x12, 0x11, 0x11,
0x00, 0x0D, 0x0D, 0x0E, 0x00, 0x00, 0x13, 0x14, 0x13, 0x12, 0x12, 0x12, 0x11, 0x11, 0x0E,
0x01, 0x0C, 0x0D, 0x0D, 0x0D, 0x0E, 0x11, 0x13, 0x13, 0x12, 0x11, 0x11, 0x0E, 0x0D,
0x02, 0x0C, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x13, 0x12, 0x11, 0x00, 0x00, 0x0E, 0x0D,
0x03, 0x0B, 0x04, 0x04, 0x04, 0x22, 0x21, 0x21, 0x20, 0x00, 0x00, 0x00, 0x0D,
0x02, 0x0D, 0x22, 0x04, 0x20, 0x22, 0x04, 0x21, 0x04, 0x20, 0x00, 0x00, 0x00, 0x0E, 0x0E,
0x03, 0x07, 0x22, 0x21, 0x20, 0x20, 0x22, 0x04, 0x20,
0x04, 0x06, 0x01, 0x01, 0x00, 0x04, 0x22, 0x20,
0x02, 0x09, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x04, 0x20,
0x03, 0x09, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00, 0x22, 0x04, 0x20,
0x02, 0x0B, 0x07, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x20,
0x03, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01
};
const byte CURSTALK[] = {
// hotspot x and y, uint16 LE
0x02, 0x00, 0x0B, 0x00,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0x03, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x01, 0x0C, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06,
0x00, 0x0E, 0x06, 0x06, 0x06, 0x06, 0x07, 0x06, 0x07, 0x07, 0x06, 0x07, 0x07, 0x06, 0x07, 0x06,
0x00, 0x0F, 0x06, 0x08, 0x08, 0x08, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x08, 0x06,
0x00, 0x0F, 0x06, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, 0x06, 0x08, 0x08, 0x06, 0x06,
0x00, 0x0F, 0x06, 0x06, 0x08, 0x06, 0x08, 0x08, 0x08, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x08, 0x06,
0x01, 0x0E, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06,
0x02, 0x0C, 0x06, 0x06, 0x06, 0x07, 0x06, 0x07, 0x06, 0x06, 0x07, 0x06, 0x07, 0x06,
0x04, 0x09, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06,
0x07, 0x04, 0x06, 0x07, 0x07, 0x06,
0x02, 0x08, 0x07, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06,
0x01, 0x06, 0x07, 0x01, 0x07, 0x06, 0x06, 0x06,
0x02, 0x01, 0x07,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00
};
const byte CURSHELP[] = {
// hotspot x and y, uint16 LE
0x02, 0x00, 0x0B, 0x00,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0x04, 0x06, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24,
0x02, 0x0A, 0x24, 0x24, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x20, 0x20,
0x01, 0x0C, 0x24, 0x22, 0x22, 0x22, 0x20, 0x20, 0x20, 0x22, 0x22, 0x22, 0x22, 0x20,
0x00, 0x0E, 0x24, 0x22, 0x22, 0x22, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20,
0x00, 0x0E, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x20,
0x00, 0x0E, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x20,
0x01, 0x0D, 0x24, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20,
0x07, 0x06, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20,
0x05, 0x07, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, 0x20,
0x04, 0x05, 0x24, 0x22, 0x22, 0x22, 0x20,
0x02, 0x07, 0x07, 0x00, 0x24, 0x20, 0x20, 0x20, 0x20,
0x01, 0x03, 0x07, 0x01, 0x07,
0x02, 0x07, 0x07, 0x00, 0x00, 0x24, 0x24, 0x24, 0x24,
0x04, 0x06, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20,
0x04, 0x06, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20,
0x05, 0x04, 0x20, 0x20, 0x20, 0x20
};
const byte *const CURSORS[AMAZON_NUM_CURSORS] = {
MOUSE0, MOUSE1, MOUSE2, MOUSE3, CURSEYE, CURSHAND, CURSGET, CURSCLIMB, CURSTALK, CURSHELP
};
const uint CURSOR_SIZES[AMAZON_NUM_CURSORS] = {
sizeof(MOUSE0), sizeof(MOUSE1), sizeof(MOUSE2), sizeof(MOUSE3), sizeof(CURSEYE),
sizeof(CURSHAND), sizeof(CURSGET), sizeof(CURSCLIMB), sizeof(CURSTALK), sizeof(CURSHELP)
};
const int FONT2_INDEX[] = {
62, 2, 6,
0x0000, 0x0019, 0x0021, 0x002e, 0x0041, 0x005a, 0x0073, 0x008c, 0x0093, 0x009b,
0x00a3, 0x00bc, 0x00d5, 0x00dd, 0x00ea, 0x00f1, 0x00fe, 0x010b, 0x0118, 0x0125,
0x0132, 0x013f, 0x014c, 0x0159, 0x0166, 0x0173, 0x0180, 0x0187, 0x018e, 0x01a7,
0x01b4, 0x01cd, 0x01dc, 0x01f5, 0x0208, 0x0215, 0x0222, 0x022f, 0x023c, 0x0249,
0x025c, 0x0269, 0x0276, 0x0285, 0x0292, 0x029f, 0x02b2, 0x02c5, 0x02d2, 0x02df,
0x02ee, 0x02fb, 0x0308, 0x0315, 0x0322, 0x032f, 0x0342, 0x034f, 0x0362, 0x036f,
0x0388, 0x03a1,
};
const byte FONT2_DATA[] = {
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0xf0, 0xf0, 0xf0,
0x00, 0xf0, 0x00, 0x06, 0xf3, 0xc0, 0xc3, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x07, 0x1c, 0x00,
0x67, 0x9e, 0xc0, 0x07, 0x1c, 0x00, 0x67, 0x9e, 0xc0, 0x07,
0x1c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x02, 0xc0, 0x00, 0x3f,
0xfc, 0x00, 0xb2, 0xc0, 0x00, 0x3f, 0xfc, 0x00, 0x02, 0xcb,
0x00, 0x3f, 0xfc, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x60,
0x70, 0x70, 0x60, 0x1c, 0x00, 0x04, 0x60, 0x18, 0x1c, 0x1c,
0x1c, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x30,
0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf0, 0xf0,
0x00, 0x07, 0x00, 0xf0, 0x03, 0xc0, 0x0f, 0x00, 0x3c, 0x00,
0xf0, 0x00, 0x00, 0x00, 0x07, 0x3f, 0xc0, 0x70, 0x70, 0x70,
0x70, 0x70, 0x70, 0x3f, 0xc0, 0x00, 0x00, 0x07, 0x1f, 0x00,
0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0xff, 0xf0, 0x00, 0x00,
0x08, 0x2b, 0xf0, 0xb0, 0x2c, 0x00, 0xa0, 0x0a, 0x00, 0xff,
0xfc, 0x00, 0x00, 0x07, 0xff, 0xc0, 0x00, 0x70, 0x03, 0xc0,
0x00, 0x70, 0xff, 0xc0, 0x00, 0x00, 0x07, 0x0b, 0xc0, 0x2d,
0xc0, 0xb1, 0xc0, 0xaa, 0xa0, 0x01, 0xc0, 0x00, 0x00, 0x07,
0xff, 0xf0, 0x70, 0x00, 0x7f, 0xc0, 0x00, 0xb0, 0xbf, 0xc0,
0x00, 0x00, 0x07, 0x2f, 0xc0, 0x70, 0x00, 0x7f, 0xc0, 0x70,
0x70, 0x3f, 0xc0, 0x00, 0x00, 0x08, 0xff, 0xfc, 0x00, 0xb0,
0x02, 0xc0, 0x02, 0xc0, 0x0b, 0x00, 0x00, 0x00, 0x08, 0x2f,
0xf0, 0xb0, 0x1c, 0x2f, 0xf0, 0xb0, 0x1c, 0x2f, 0xf0, 0x00,
0x00, 0x07, 0x3f, 0xc0, 0x70, 0x70, 0x3f, 0xf0, 0x00, 0x70,
0x3f, 0xc0, 0x00, 0x00, 0x03, 0xf0, 0xf0, 0x00, 0xf0, 0xf0,
0x00, 0x03, 0xf0, 0xf0, 0x00, 0xf0, 0x30, 0x00, 0x09, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00,
0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x06, 0xff, 0x00, 0x03, 0xc0, 0x0f, 0x00, 0x3c, 0x00,
0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0a, 0x00, 0x40, 0x00, 0x01, 0xf0, 0x00, 0x07, 0x1c,
0x00, 0x1f, 0xff, 0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x00,
0x08, 0x7f, 0xf0, 0x70, 0x1c, 0x7f, 0xf0, 0x70, 0x1c, 0x6a,
0xb0, 0x00, 0x00, 0x08, 0x2f, 0xfc, 0x70, 0x00, 0x70, 0x00,
0x70, 0x00, 0x2a, 0xa8, 0x00, 0x00, 0x08, 0x7f, 0xf0, 0x70,
0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x6a, 0xb0, 0x00, 0x00, 0x07,
0x7f, 0xf0, 0x70, 0x00, 0x7f, 0xc0, 0x70, 0x00, 0x6a, 0xa0,
0x00, 0x00, 0x07, 0x7f, 0xf0, 0x70, 0x00, 0x7f, 0xc0, 0x70,
0x00, 0x60, 0x00, 0x00, 0x00, 0x09, 0x3f, 0xfc, 0x00, 0x70,
0x00, 0x00, 0x70, 0xff, 0x00, 0x70, 0x1c, 0x00, 0x2a, 0xbc,
0x00, 0x00, 0x00, 0x00, 0x08, 0x70, 0x1c, 0x70, 0x1c, 0x7f,
0xfc, 0x70, 0x1c, 0x70, 0x1c, 0x00, 0x00, 0x07, 0xff, 0xf0,
0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0xaa, 0xa0, 0x00, 0x00,
0x08, 0x0f, 0xfc, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x70,
0x70, 0x2a, 0x40, 0x00, 0x00, 0x08, 0x70, 0x2c, 0x72, 0xc0,
0x7f, 0x00, 0x72, 0xc0, 0x70, 0x28, 0x00, 0x00, 0x07, 0x70,
0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x6a, 0xa0, 0x00,
0x00, 0x0a, 0x70, 0x02, 0xc0, 0x7c, 0x09, 0xc0, 0x77, 0x2d,
0xc0, 0x71, 0xb1, 0xc0, 0x60, 0xc1, 0x80, 0x00, 0x00, 0x00,
0x09, 0x70, 0x07, 0x00, 0x77, 0x07, 0x00, 0x71, 0xc7, 0x00,
0x70, 0x77, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x08,
0x2f, 0xf0, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x2a, 0xa0,
0x00, 0x00, 0x08, 0x7f, 0xf0, 0x70, 0x1c, 0x7f, 0xf0, 0x70,
0x00, 0x60, 0x00, 0x00, 0x00, 0x08, 0x2f, 0xf0, 0x70, 0x1c,
0x70, 0x1c, 0x71, 0xdc, 0x2a, 0xa0, 0x00, 0x1c, 0x00, 0x00,
0x08, 0x7f, 0xf0, 0x70, 0x1c, 0x7f, 0xc0, 0x70, 0x70, 0x60,
0x18, 0x00, 0x00, 0x07, 0x2f, 0xf0, 0x70, 0x00, 0x2f, 0xc0,
0x00, 0xb0, 0xbf, 0xc0, 0x00, 0x00, 0x07, 0xff, 0xf0, 0x0b,
0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08,
0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0xdc, 0x1f, 0x1c,
0x00, 0x00, 0x08, 0xf0, 0x1c, 0xb0, 0x1c, 0x70, 0xb0, 0x72,
0xc0, 0x7f, 0x00, 0x00, 0x00, 0x0b, 0xf0, 0x00, 0xb0, 0xb0,
0x00, 0x70, 0x70, 0xc0, 0x70, 0x72, 0x72, 0xc0, 0x7c, 0x1f,
0x00, 0x00, 0x00, 0x00, 0x08, 0xf0, 0x3c, 0x1c, 0xe0, 0x07,
0xc0, 0x1c, 0x70, 0x70, 0x1c, 0x00, 0x00, 0x09, 0x70, 0x07,
0x00, 0x1c, 0x1c, 0x00, 0x07, 0xf0, 0x00, 0x01, 0xc0, 0x00,
0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0xfc, 0x00,
0x70, 0x07, 0x00, 0x1c, 0x00, 0xaa, 0xac, 0x00, 0x00, 0x09,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const int FONT6x6_INDEX[] = {
62, 1, 6,
0x0000, 0x0007, 0x000e, 0x0015, 0x001c, 0x0023, 0x002a, 0x0031, 0x0038, 0x003f,
0x0046, 0x004d, 0x0054, 0x005b, 0x0062, 0x0069, 0x0070, 0x0077, 0x007e, 0x0085,
0x008c, 0x0093, 0x009a, 0x00a1, 0x00a8, 0x00af, 0x00b6, 0x00bd, 0x00c4, 0x00cb,
0x00d2, 0x00d9, 0x00e0, 0x00e7, 0x00ee, 0x00f5, 0x00fc, 0x0103, 0x010a, 0x0111,
0x0118, 0x011f, 0x0126, 0x012d, 0x0134, 0x013b, 0x0142, 0x0149, 0x0150, 0x0157,
0x015e, 0x0165, 0x016c, 0x0173, 0x017a, 0x0181, 0x0188, 0x018f, 0x0196, 0x019d,
0x01a4, 0x01ab,
};
const byte FONT6x6_DATA[] = {
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x30,
0x30, 0x30, 0x00, 0x30, 0x06, 0xd8, 0xd8, 0x90, 0x00, 0x00,
0x00, 0x06, 0x50, 0xf8, 0x50, 0xf8, 0x50, 0x00, 0x06, 0x78,
0xa0, 0x70, 0x28, 0xf0, 0x20, 0x06, 0xc8, 0xd0, 0x20, 0x58,
0x98, 0x00, 0x06, 0x60, 0xd0, 0x60, 0xe8, 0xd0, 0x68, 0x06,
0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x06, 0x30, 0x60, 0x60,
0x60, 0x30, 0x00, 0x07, 0x30, 0x18, 0x18, 0x18, 0x30, 0x00,
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x20, 0x20,
0xf8, 0x20, 0x20, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x30,
0x60, 0x06, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x06, 0x00,
0x00, 0x00, 0x60, 0x60, 0x00, 0x06, 0x18, 0x30, 0x60, 0xc0,
0x80, 0x00, 0x06, 0x70, 0x98, 0xa8, 0xc8, 0x70, 0x00, 0x06,
0x10, 0x30, 0x10, 0x10, 0x10, 0x00, 0x06, 0xf0, 0x08, 0x70,
0x80, 0xf8, 0x00, 0x06, 0xf0, 0x08, 0x70, 0x08, 0xf0, 0x00,
0x06, 0x30, 0x50, 0x90, 0xf8, 0x10, 0x00, 0x06, 0xf0, 0x80,
0xf0, 0x08, 0xf0, 0x00, 0x06, 0x70, 0x80, 0xf0, 0x88, 0x70,
0x00, 0x06, 0xf8, 0x08, 0x10, 0x20, 0x20, 0x00, 0x06, 0x70,
0x88, 0x70, 0x88, 0x70, 0x00, 0x06, 0x70, 0x88, 0x78, 0x08,
0x70, 0x00, 0x06, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x06,
0x60, 0x60, 0x00, 0x60, 0x20, 0x40, 0x06, 0x18, 0x30, 0x60,
0x30, 0x18, 0x00, 0x06, 0x00, 0x78, 0x00, 0x78, 0x00, 0x00,
0x06, 0x60, 0x30, 0x18, 0x30, 0x60, 0x00, 0x06, 0x70, 0x98,
0x30, 0x30, 0x00, 0x30, 0x06, 0x70, 0x88, 0xb8, 0xb0, 0x80,
0x78, 0x06, 0x70, 0x88, 0xf8, 0x88, 0x88, 0x00, 0x06, 0xf0,
0x88, 0xf0, 0x88, 0xf0, 0x00, 0x06, 0x78, 0x80, 0x80, 0x80,
0x78, 0x00, 0x06, 0xf0, 0x88, 0x88, 0x88, 0xf0, 0x00, 0x06,
0xf8, 0x80, 0xf0, 0x80, 0xf8, 0x00, 0x06, 0xf8, 0x80, 0xf0,
0x80, 0x80, 0x00, 0x06, 0x78, 0x80, 0x98, 0x88, 0x78, 0x00,
0x06, 0x88, 0x88, 0xf8, 0x88, 0x88, 0x00, 0x06, 0x70, 0x20,
0x20, 0x20, 0x70, 0x00, 0x06, 0x08, 0x08, 0x08, 0x88, 0x70,
0x00, 0x06, 0x90, 0xa0, 0xc0, 0xa0, 0x90, 0x00, 0x06, 0x80,
0x80, 0x80, 0x80, 0xf0, 0x00, 0x06, 0x88, 0xd8, 0xa8, 0x88,
0x88, 0x00, 0x06, 0x88, 0xc8, 0xa8, 0x98, 0x88, 0x00, 0x06,
0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0x06, 0xf0, 0x88, 0xf0,
0x80, 0x80, 0x00, 0x06, 0x70, 0x88, 0x88, 0x88, 0x70, 0x18,
0x06, 0xf0, 0x88, 0xf0, 0xa0, 0x98, 0x00, 0x06, 0x78, 0x80,
0x70, 0x08, 0xf0, 0x00, 0x06, 0xf8, 0x20, 0x20, 0x20, 0x20,
0x00, 0x06, 0x88, 0x88, 0x88, 0x88, 0x78, 0x00, 0x06, 0x88,
0x88, 0x88, 0x50, 0x20, 0x00, 0x06, 0x88, 0x88, 0xa8, 0xd8,
0x88, 0x00, 0x06, 0x88, 0x50, 0x20, 0x50, 0x88, 0x00, 0x06,
0x88, 0x88, 0x50, 0x20, 0x20, 0x00, 0x06, 0xf8, 0x10, 0x20,
0x40, 0xf8, 0x00, 0x06, 0x78, 0x60, 0x60, 0x60, 0x78, 0x00,
0x06, 0xc0, 0x60, 0x30, 0x18, 0x08, 0x00, 0x06, 0x78, 0x18,
0x18, 0x18, 0x78, 0x00, 0x00, 0x52, 0x41, 0x54, 0x00, 0x41,
0x4c, 0x43, 0x4f, 0x48, 0x4f, 0x4c, 0x00, 0x53, 0x41, 0x46,
0x45, 0x20, 0x43, 0x4f, 0x4d, 0x42, 0x49, 0x4e, 0x41, 0x54,
0x49, 0x4f, 0x4e, 0x00, 0x42, 0x45, 0x41, 0x4b, 0x45, 0x52,
0x00, 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x4d,
0x00, 0x56, 0x41, 0x55, 0x4c, 0x54, 0x20, 0x4b, 0x45, 0x59,
0x00, 0x42, 0x4f, 0x4c, 0x54, 0x20, 0x43, 0x55, 0x54, 0x54,
0x45, 0x52, 0x53, 0x00, 0x42, 0x4c, 0x4f, 0x57, 0x47, 0x55,
0x4e, 0x00, 0x4c, 0x4f, 0x56, 0x45, 0x20, 0x50, 0x4f, 0x54,
0x49, 0x4f, 0x4e, 0x00, 0x4d, 0x4f, 0x4e, 0x45, 0x59, 0x00,
0x44, 0x41, 0x52, 0x54, 0x53, 0x00, 0x54, 0x41, 0x50, 0x45,
0x00, 0x4a, 0x55, 0x4e, 0x47, 0x4c, 0x45, 0x20, 0x50, 0x4f,
0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4d, 0x4f, 0x56, 0x49,
};
const uint FONT2_INDEX_SIZE = sizeof(FONT2_INDEX) / 2;
const uint FONT2_DATA_SIZE = sizeof(FONT2_DATA);
const uint FONT6x6_INDEX_SIZE = sizeof(FONT6x6_INDEX) / 2;
const uint FONT6x6_DATA_SIZE = sizeof(FONT6x6_DATA);
const char *const ROOM_DESCR[64] = {
"Credits", nullptr, nullptr, nullptr, "Outside of Allister Center",
"Hall", "Jason's Lab", nullptr, "Allen's Lab", "Outside of the Vault",
"Inside the Vault", "Reader", "Jason's Apartment", "Jason's ransacked apartment", "Cutscene 1",
"TBD FLYSOUTH", "Cuzco Airport", "TBD INAIR", "Green Monkey Club", "In Plane",
"TBD PILFALL", "TBD COCKPIT", "TBD CRASH", "TBD SINKING", "Cutscene Jungle Walk",
"TBD TOWN", "TBD HOTEL", "TBD CANTINA", nullptr, "TBD MASSACRE",
"TBD TRADE", "TBD BRIDGE", "TBD DOCK", "TBD DRIVER", nullptr,
nullptr, "TBD SHORE", "TBD BOAT", "TBD CABIN", "TBD CAPTIVE",
nullptr, nullptr, "TBD VILLAGE", nullptr, "TBD TREE",
"TBD CANOE", "TBD INTREE", "TBD FALLS", nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr, "TBD WATERFALL",
"TBD INWATER", nullptr, "Cave Bridge", nullptr, nullptr,
nullptr, "Pit with Ants", nullptr, nullptr
};
const byte DEATH_SCREENS_ENG[58] = {
0, 1, 0, 0, 0, 0, 0, 0, 2, 0,
0, 2, 4, 2, 1, 0, 0, 0, 0, 0,
0, 2, 7, 7, 4, 6, 7, 10, 4, 2,
0, 0, 0, 0, 5, 5, 3, 3, 3, 5,
8, 8, 11, 9, 8, 12, 0, 1, 9, 8,
8, 0, 5, 8, 0, 12, 12, 11
};
const byte DEATH_SCREENS_ENG_DEMO[34] = {
1, 2, 1, 1, 1, 1, 1, 1, 4, 1,
3, 4, 2, 4, 2, 1, 1, 1, 1, 1,
1, 4, 2, 4, 2, 4, 2, 4, 4, 4,
1, 1, 1, 1
};
const char *const DEATH_TEXT_ENG[58] = {
"SAM SALVADOR SPOTS YOU AND LETS YOU HAVE IT.",
"WHILE TAKING A MOONLIGHT SWIM YOU DISCOVER THAT PIRANHA REALLY CAN STRIP FLESH TO THE BONE.",
"THE GUARD FILLS YOU FULL OF HOLES BEFORE TOSSING YOU TO THE PIRANHA.",
"YOU'RE ONLY ABLE TO SWIM HALFWAY ACROSS THE RIVER BEFORE RUNNING OUT OF AIR. "
"YOU MAKE SO MUCH NOISE GASPING FOR BREATH THAT SAM EASILY FINDS YOU AND LEAVES "
"YOU IN THE RIVER PERMANENTLY.",
"SAM SALVADOR NOTICES SOMEONE HAS BEEN PLAYING WITH THE CARGO. "
"HE TRACKS YOU DOWN AND LETS YOU HAVE IT.",
"THE GUARD COMES AROUND THE CORNER. HE DECIDES THAT THREE LEAD SLUGS WILL "
"TEACH YOU TO BE MORE POLITE.",
"THE CAPTAIN IS WAITING OUTSIDE THE DOOR.",
"THE CAPTAIN'S RANDOM SHOOTING FINALLY FINDS ITS TARGET.",
"THE CRATE OUTSIDE THE WINDOW EXPLODES, DESTROYING THE SHIP. "
"UNFORTUNATELY, YOU'RE STILL ABOARD.",
"THE DOOR WAS NOT BARRED AND THE CAPTAIN WALKS RIGHT IN AND PARTS YOUR HAIR.",
"",
"YOU RUN OUT ON DECK, THEN REALIZE THAT MAYA IS STILL TIED UP. "
"AS YOU TURN TO GO BACK THE BOAT BLOWS UP.",
"AFTER YOU FAIL TO PROVE YOUR DIVINITY THE NATIVES EAT YOU FOR LUNCH.",
"THIS IS THE GENERIC DEATH SCENE",
"YOU ONLY MAKE IT HALFWAY ACROSS THE RIVER BEFORE THE PIRANHA STRIKE.",
"WITH NOTHING TO PROTECT HIM FROM THE HAIL OF BULLETS ALLEN IS QUICKLY GUNNED DOWN. "
"JASON AND MAYA SOON FOLLOW...",
"THE COMBINATION OF THE WIND AND GUNFIRE KNOCK THE CORRUGATED IRON OVER, "
"LEAVING YOU WITHOUT PROTECTION.",
"WITHOUT SUFFICIENT AMMUNITION, ALLEN IS UNABLE TO HOLD OFF THE ATTACKERS FOR LONG. "
"THIS RESULTS IN A SERIOUS CASE OF LEAD POISONING. ADDITIONAL AMMUNITION SHOULD "
"HAVE BEEN PURCHASED AT THE RIO BLANCO TRADING POST (CHAPTER 6).",
"ALLEN IS A MARVELOUS SHOT, BUT HIS AMMUNITION IS NOT UNLIMITED. "
"SOON IT IS ALL OVER.",
"THE PILOT FEELS YOU ARE TOO CLOSE AND PULLS THE TRIGGER.",
"THE PILOT SHOOTS YOU IN THE HEART, THEN TOSSES YOUR LIFELESS BODY OUT THE DOOR.",
"THE PLANE CRASHES INTO THE JUNGLE CANOPY AT 200 MPH.",
"THE CANOE HITS THE ROCKS AND CAPSIZES, AND THE PIRANHA MAKE YOU THEIR LUNCH GUESTS.",
"YOU TAKE THE WRONG BRANCH AND ACCIDENTALLY DISCOVER THE FOURTH TALLEST WATERFALL "
"IN SOUTH AMERICA.",
"YOU TAKE THE WRONG BRANCH AND DISCOVER A VERY HUNGRY TRIBE OF CANNIBALS.",
"YOU TAKE THE WRONG BRANCH AND BECOME LOST IN THE WINDING WATERWAYS. "
"YOU WANDER UNTIL YOU STARVE TO DEATH.",
"YOU TAKE THE WRONG BRANCH AND BECOME TRAPPED IN THE RAPIDS. "
"EVENTUALLY YOU AND MAYA ARE CRUSHED BETWEEN THE ROCKS.",
"YOU WAIT AROUND FOR SOME TIME, BUT HANS STROHEIM NEVER SPEAKS TO YOU AGAIN. "
"FINALLY YOU RETURN HOME KNOWING YOU HAVE FAILED.",
"DECIDING THAT YOU THREATEN HIM AND HIS WORK, HANS STROHEIM HAS THE NATIVES "
"IN THE VILLAGE KILL YOU.",
"YOU DO NOT GET FAR ENOUGH AWAY BEFORE THE DYNAMITE EXPLODES AND YOU ARE BLOWN "
"INTO A THOUSAND PIECES.",
"YOU ARE STANDING SO CLOSE TO THE ENTRANCE WHEN SANCEZ AND HIS MEN BREAK THROUGH "
"THE WALL THAT YOU ARE QUICKLY SPOTTED AND SHOT",
"THE AMAZON SENTINELS SPOT YOU AND FILL YOU FULL OF ARROWS.",
"SAM MAY BE UGLY, BUT HE'S NOT DEAF. HE HEARS ALL THE NOISE YOU ARE MAKING AND "
"CANCELS YOUR BOARDING PASS.",
"WITH THE BAR OFF THE DOOR THE CAPTAIN WALTZES IN AND BLOWS YOU AWAY",
"THE BEAR WANDERS OFF INTO THE WOODS AND DISTURBS THE TWO LOVEBIRDS. "
"WHEN THEY COME OUT THEY FIND YOU AND PUT YOU IN THE BIG HOUSE FOR TWENTY YEARS.",
"WHEN YOU DO NOT LEAVE THE SECURITY AREA QUICKLY ENOUGH YOU ARE ARRESTED AND CONVICTED "
"AS A COMMIE SPY. YOU EMBARK ON A NEW CAREER STAMPING OUT LICENSE PLATES.",
"THE HUNGRY BEAR SPOTS YOU AND DECIDES YOU WILL MAKE A NICE APPETIZER.",
"YOU DISTURB THE BEAR'S LUNCH AND HE EATS YOU FOR DESSERT.",
"AFTER FAILING TO FIND ANY LUNCH AT THE GARBAGE CAN THE BEAR EATS YOU INSTEAD.",
"THE SUSPICIOUS LIBRARIAN CALLS SECURITY AND YOU ARE SENT TO JAIL.",
"YOU PLUMMET 10,000 FEET TO YOUR DEATH.",
"EL LOCO FLIES INTO AN INSANE RAGE AND BEATS YOU TO A BLOODY PULP.",
"THE WOMAN WALKS OUT THE DOOR AND NEVER RETURNS. YOU SPEND THE REST OF YOUR LIFE "
"IN A FUTILE ATTEMPT TO LOCATE ALLEN.",
"YOU SLIP OFF THE PLATFORM AND FALL TO YOUR DEATH.",
"YOU SLIP OFF THE PLATFORM AND FALL TO YOUR DEATH.",
"YOU COME TOO CLOSE TO THE POWERFUL JAWS OF THE ANT AND HE SNIPS YOU IN TWO BEFORE "
"DEVOURING YOU.",
"B.O.B. HAS A FLAW IN HIS PROGRAMMING THAT DIRECTS HIM TO SHOOT FIRST AND ASK QUESTIONS LATER.",
"THE PLANE SINKS AND THE PIRHANA ATTACK BEFORE YOU EVEN GET OUT THE DOOR.",
"MAYA FALLS OFF THE END OF THE BROKEN BRIDGE.",
"YOUR WEIGHT IS JUST ENOUGH TO CAUSE THE REMAINING SUPPORT CABLE TO SNAP AND YOU "
"FALL TO THE BOTTOM OF THE GORGE.",
"EVEN WITH REPAIRS THE BRIDGE IS NOT STRONG ENOUGH TO HOLD TWO PEOPLE.",
"SANCHEZ AND HIS MEN FIND YOU AND HOLD FIRING SQUAD PRACTICE.",
"THE TWO GUARDS ARE DISTURBED IN THEIR LOVE NEST AND COME LOOKING FOR ANYONE ACTING SUSPICIOUS. "
"THEY FIND YOU AND SEND YOU UP THE RIVER.",
"THE PARACHUTE IS NOT LARGE ENOUGH TO SUPPORT YOU, AND YOU HIT THE TREES AT 140 M.P.H.",
"SANCHEZ AND HIS MEN FOLLOW YOU ACROSS THE BRIDGE AND CUT YOU DOWN IN A HAIL OF GUNFIRE",
"YOU TRIED TO STAB THE ANT BUT HIS SHELL IS TOO DIFFICULT TO PENETRATE. "
"YOU NOTICE A SLIGHT CUT IN THE SHELL UNDERNEATH BUT YOU CAN'T GET TO IT "
"AND HE SNIPS YOU INTO DELICIOUS MEATY CHUNKS.",
"AFTER THE ANT FINISHES SUCKING ALL OF THE SAP OUT OF THE VINE HE TURNS HIS ATTENTION BACK TO YOU "
"AND BITES YOUR HEAD OFF.",
"THE CANTINA OWNER NOTICES YOU ARE TRYING TO STEAL OBJECTS FROM THE TABLES. "
"TWENTY YEARS LATER YOU ARE RELEASED FROM A SOUTH AMERICAN PRISON."
};
const char *const DEATH_TEXT_ENG_DEMO[34] = {
"SAM SALVADOR SPOTS YOU AND LETS YOU HAVE IT.",
"WHILE TAKING A MOONLIGHT SWIM YOU DISCOVER THAT PIRANHA REALLY CAN STRIP FLESH TO THE BONE.",
"THE GUARD FILLS YOU FULL OF HOLES BEFORE TOSSING YOU TO THE PIRANHA.",
"YOU'RE ONLY ABLE TO SWIM HALFWAY ACROSS THE RIVER BEFORE RUNNING OUT OF AIR. YOU MAKE SO MUCH NOISE GASPING FOR BREATH THAT SAM EASILY FINDS YOU AND LEAVES YOU IN THE RIVER PERMANENTLY.",
"SAM SALVADOR NOTICES SOMEONE HAS BEEN PLAYING WITH THE CARGO. HE TRACKS YOU DOWN AND LETS YOU HAVE IT.",
"THE GUARD COMES AROUND THE CORNER. HE DECIDES THAT THREE LEAD SLUGS WILL TEACH YOU TO BE MORE POLITE.",
"THE CAPTAIN IS WAITING OUTSIDE THE DOOR.",
"THE CAPTAIN'S RANDOM SHOOTING FINALLY FINDS ITS TARGET.",
"THE CRATE OUTSIDE THE WINDOW EXPLODES, DESTROYING THE SHIP. UNFORTUNATELY, YOU'RE STILL ABOARD.",
"THE DOOR WAS NOT BARRED AND THE CAPTAIN WALKS RIGHT IN AND PARTS YOUR HAIR.",
"",
"YOU RUN OUT ON DECK, THEN REALIZE THAT MAYA IS STILL TIED UP. AS YOU TURN TO GO BACK THE BOAT BLOWS UP.",
"AFTER YOU FAIL TO PROVE YOUR DIVINITY THE NATIVES EAT YOU FOR LUNCH.",
"THIS IS THE GENERIC DEATH SCENE",
"YOU ONLY MAKE IT HALFWAY ACROSS THE RIVER BEFORE THE PIRANHA STRIKE.",
"WITH NOTHING TO PROTECT HIM FROM THE HAIL OF BULLETS ALLEN IS QUICKLY GUNNED DOWN. JASON AND MAYA SOON FOLLOW...",
"THE COMBINATION OF THE WIND AND GUNFIRE KNOCK THE CORRUGATED IRON OVER, LEAVING YOU WITHOUT PROTECTION.",
"WITHOUT SUFFICIENT AMMUNITION, ALLEN IS UNABLE TO HOLD OFF THE ATTACKERS FOR LONG. THIS RESULTS IN A SERIOUS CASE OF LEAD POISONING.",
"ALLEN IS A MARVELOUS SHOT, BUT HIS AMMUNITION IS NOT UNLIMITED. SOON IT IS ALL OVER.",
"THE PILOT FEELS YOU ARE TOO CLOSE AND PULLS THE TRIGGER.",
"THE PILOT SHOOTS YOU IN THE HEAD, THEN TOSSES YOUR LIFELESS",
"THE PLANE CRASHES INTO THE JUNGLE CANOPY AT 200 MPH.",
"THE CANOE HITS THE ROCKS AND CAPSIZES, AND THE PIRANHA MAKE YOU THEIR LUNCH GUESTS.",
"YOU ACCIDENTALLY DISCOVER THE FOURTH TALLEST WATERFALL IN SOUTH AMERICA.",
"YOU DISCOVER A VERY HUNGRY TRIBE OF CANNIBALS.",
"YOU BECOME LOST IN THE WINDING WATERWAYS AND WANDER UNTIL YOU STARVE TO DEATH.",
"YOU BECOME TRAPPED IN THE RAPIDS AND ARE CRUSHED BETWEEN THE ROCKS.",
"YOU WAIT AROUND FOR SOME TIME, BUT HANS STROHEIM NEVER SPEAKS TO YOU AGAIN. FINALLY YOU RETURN HOME KNOWING YOU HAVE FAILED.",
"DECIDING THAT YOU THREATEN HIM AND HIS WORK, HANS STROHEIM HAS THE NATIVES IN THE VILLAGE KILL YOU.",
"YOU DO NOT GET FAR ENOUGH AWAY BEFORE THE DYNAMITE EXPLODES AND YOU ARE BLOWN INTO A THOUSAND PIECES.",
"STANDING OUT IN THE OPEN YOU ARE EXPOSED TO THE HAIL OF BULLETS FROM SANCHEZ' MEN.",
"THE AMAZON SENTINELS SPOT YOU AND FILL YOU FULL OF ARROWS.",
"SAM MAY BE UGLY, BUT HE'S NOT DEAF. HE HEARS ALL THE NOISE YOU ARE MAKING AND CANCELS YOUR BOARDING PASS.",
"WITH THE BAR OFF THE DOOR THE CAPTAIN WALTZES IN AND BLOWS YOU AWAY"
};
const char *const INVENTORY_NAMES_ENG[85] = {
"RAT", "ALCOHOL", "SAFE COMBINATION", "BEAKER", "MICROFILM",
"VAULT KEY", "BOLT CUTTERS", "BLOWGUN", "LOVE POTION", "MONEY",
"DARTS", "TAPE", "JUNGLE POTION", "MOVIE", "CABINET KEY",
"DISPLAY CASE KEY", "FLITCH'S CAR KEYS", "COAT HANGER",
"CROWBAR", "COMPASS", "MAP", "LETTER OPENER", "LETTER",
"DECODER", "DIPPED DART", "LOADED BLOWGUN", "CARD", "JERRYCAN",
"CIGARETTES", "BIKE PUMP", "PARACHUTE", "PESO", "PEPPERS",
"MACHETE", "POISON ROOT", "AMMUNITION", "PADDLE", "FISHING NET",
"RAT TRAP", "CHEESE", "LOADED TRAP", "KNIFE", "CHOPPED PEPPERS",
"LIGHTER", "LADDER", "SMALL POLE", "JEEP KEY", "CHAIN", "ARROW",
"FILLED JERRY CAN", "EXPLOSIVES", "GEIGER COUNTER", "VINE",
"GOLD NUGGET", "HOLLOW REED", "AMAZON QUEEN KEYS", "FISHING POLE",
"HARPOON", "RAG", "BOTTLE OF RUM", "RAG IN BOTTLE", "MOLOTOV COCKTAIL",
"JUNGLE PLANT", "LADLE", "WORM", "FISH", "FIREWORKS", "BAITED POLE",
"FILLED LADLE", "EMERALD", "SMALL KEY", "SCROLL", "LIT EXPLOSIVES",
"LIGHTER", "BROKEN SPEAR", "SHOE LACES", "TORCH", "LACES AND SPEAR",
"KNIFE SPEAR", "GARBAGE CAN", "RAFT", "INFLATED RAFT",
"JASON'S CAR KEYS", "PESO BILLS", "PLANK"
};
const int COMBO_TABLE[85][4] = {
{ -1, -1, -1, -1 },
{ 12, 3, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ 24, 25, -1, -1 },
{ 10, 24, -1, -1 },
{ -1, -1, -1, -1 },
{ 8, 24, -1, -1 },
{ -1, -1, -1, -1 },
{ 1, 3, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ 7, 25, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ 80, 81, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ 41, 42, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ 39, 40, -1, -1 },
{ 38, 40, -1, -1 },
{ -1, -1, -1, -1 },
{ 32, 42, 77, 78 },
{ -1, -1, -1, -1 },
{ 60, 61, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ 73, 72, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ 64, 67, -1, -1 },
{ -1, -1, -1, -1 },
{ 59, 60, -1, -1 },
{ 58, 60, -1, -1 },
{ 43, 61, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ 56, 67, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ 50, 72, -1, -1 },
{ 75, 77, -1, -1 },
{ 74, 77, -1, -1 },
{ -1, -1, -1, -1 },
{ 41, 78, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ 29, 81, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 },
{ -1, -1, -1, -1 }
};
const char *const NO_HELP_MESSAGE_ENG =
"WE ARE UNABLE TO PROVIDE YOU WITH ANY MORE HINTS. YOUR IQ \
HAS DECREASED SO FAR THAT WE CAN NO LONGER PUT THE HINTS IN TERMS \
YOU CAN UNDERSTAND.";
const char *const NO_HINTS_MESSAGE_ENG = "THE HELP SYSTEM HAS BEEN TURNED OFF FOR THIS GAME.";
const char *const RIVER_HIT1_ENG = "YOU HIT THE ROCKS AND THE CANOE BEGINS TO LEAK.";
const char *const RIVER_HIT2_ENG = "YOU HIT THE ROCKS AND THE CANOE DEVELOPS SERIOUS LEAKS.";
const char *const BAR_MESSAGE_ENG = "YOU ARE TOO BUSY TRYING TO KEEP FROM SINKING TO DO THAT";
const char *const HELPLVLTXT_ENG[3] = { " LEVEL 1 ", " LEVEL 2 ", " LEVEL 3 " };
const char *const IQLABELS_ENG[9] = {
"VEGETABLE",
"NEANDERTHAL",
"LOBOTOMIZED",
"DENSE",
"AVERAGE",
"INTELLIGENT",
"MURPHYITE",
"BRILLIANT",
"GENIUS"
};
const char *const CANT_GET_THERE_ENG = "YOU CAN'T GET THERE FROM HERE.";
} // End of namespace Amazon

View file

@ -0,0 +1,62 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef __AMAZON_RESOURCES_H__
#define __AMAZON_RESOURCES_H__
#include "common/scummsys.h"
namespace Amazon {
#define AMAZON_NUM_CURSORS 10
extern const byte *const CURSORS[AMAZON_NUM_CURSORS];
extern const uint CURSOR_SIZES[AMAZON_NUM_CURSORS];
extern const int FONT2_INDEX[];
extern const byte FONT2_DATA[];
extern const int FONT6x6_INDEX[];
extern const byte FONT6x6_DATA[];
extern const uint FONT2_INDEX_SIZE;
extern const uint FONT2_DATA_SIZE;
extern const uint FONT6x6_INDEX_SIZE;
extern const uint FONT6x6_DATA_SIZE;
extern const char *const ROOM_DESCR[64];
extern const char *const DEATH_TEXT_ENG[58];
extern const char *const DEATH_TEXT_ENG_DEMO[34];
extern const byte DEATH_SCREENS_ENG[58];
extern const byte DEATH_SCREENS_ENG_DEMO[34];
extern const char *const INVENTORY_NAMES_ENG[85];
extern const int COMBO_TABLE[85][4];
extern const char *const NO_HELP_MESSAGE_ENG;
extern const char *const NO_HINTS_MESSAGE_ENG;
extern const char *const RIVER_HIT1_ENG;
extern const char *const RIVER_HIT2_ENG;
extern const char *const BAR_MESSAGE_ENG;
extern const char *const HELPLVLTXT_ENG[3];
extern const char *const IQLABELS_ENG[9];
extern const char *const CANT_GET_THERE_ENG;
} // End of namespace Amazon
#endif

View file

@ -0,0 +1,430 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL
// HACK to allow building with the SDL backend on MinGW
// see bug #1800764 "TOOLS: MinGW tools building broken"
#ifdef main
#undef main
#endif // main
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "common/language.h"
#include "common/rect.h"
#include "create_access_dat.h"
#include "amazon_resources.h"
#include "martian_resources.h"
/**
* Format of the access.dat file that will be created:
* 4 Bytes - Magic string 'SVMA' to identify valid data file
* 2 bytes - Version number
* 2 Bytes - Number of different games data in the data file
* Series of index entries identifying each game:
* 1 byte - Game type: 1 = Amazon, 2 = Martian Memorandum, 3 = Noctropolis
* 1 byte - disc type: 0 = Floppy, 1 = CD, 2 = Common data shared across
* all variations of the given game
* 1 byte - Is Demo: 0 = Full game, 1 = Demo
* 1 byte - Language (Common::Language)
* 4 bytes - File offset for the data for the game
*/
File outputFile;
void writeHeader(int numExecutables);
void writeAmazonCommonData();
void writeMartianCommonData();
bool processExecutable(int idx, const char *name);
void NORETURN_PRE error(const char *s, ...) {
printf("%s\n", s);
exit(1);
}
int main(int argc, char *argv[]) {
const uint NUM_COMMON_ENTRIES = 2;
if (argc < 3) {
printf("Format: %s output_filename executable1 [executable2 ..]\n", argv[0]);
exit(0);
}
// Create the new data file for output
outputFile.open(argv[1], kFileWriteMode);
writeHeader(argc - 2 + NUM_COMMON_ENTRIES);
// Write out entries containing common data for the games
writeAmazonCommonData();
writeMartianCommonData();
// Iterate through processing each specified executable
outputFile.seek(0, SEEK_END);
for (int idx = 2; idx < argc; ++idx) {
if (!processExecutable(idx - 2 + NUM_COMMON_ENTRIES, argv[idx]))
break;
}
// Close the output file
outputFile.close();
}
void writeHeader(int numExecutables) {
// Write out magic string
const char *MAGIC_STR = "SVMA";
outputFile.write(MAGIC_STR, 4);
// Write out version number
outputFile.writeWord(VERSION_NUMBER);
// Write out the number of entries the data file will contain
outputFile.writeWord(numExecutables);
// Write out padding for index entries that will be written
outputFile.writeByte(0, 8 * numExecutables);
}
void writeAmazonCommonData() {
// Write out the header entry
outputFile.seek(8);
outputFile.writeByte(1); // Amazon
outputFile.writeByte(2); // Common data
outputFile.writeByte(0);
outputFile.writeByte(0);
outputFile.writeLong(outputFile.size());
// Write out cursor list
outputFile.seek(0, SEEK_END);
outputFile.writeWord(AMAZON_NUM_CURSORS);
for (uint idx = 0; idx < AMAZON_NUM_CURSORS; ++idx) {
outputFile.writeWord(Amazon::CURSOR_SIZES[idx]);
outputFile.write(Amazon::CURSORS[idx], Amazon::CURSOR_SIZES[idx]);
}
// Write out font data
outputFile.writeWord(Amazon::FONT2_INDEX_SIZE);
for (uint idx = 0; idx < Amazon::FONT2_INDEX_SIZE; ++idx)
outputFile.writeWord(Amazon::FONT2_INDEX[idx]);
outputFile.writeWord(Amazon::FONT2_DATA_SIZE);
outputFile.write(Amazon::FONT2_DATA, Amazon::FONT2_DATA_SIZE);
outputFile.writeWord(Amazon::FONT6x6_INDEX_SIZE);
for (uint idx = 0; idx < Amazon::FONT6x6_INDEX_SIZE; ++idx)
outputFile.writeWord(Amazon::FONT6x6_INDEX[idx]);
outputFile.writeWord(Amazon::FONT6x6_DATA_SIZE);
outputFile.write(Amazon::FONT2_DATA, Amazon::FONT6x6_DATA_SIZE);
}
void writeMartianCommonData() {
// Write out the header entry
outputFile.seek(16);
outputFile.writeByte(2); // Martian
outputFile.writeByte(2); // Common data
outputFile.writeByte(0);
outputFile.writeByte(0);
outputFile.writeLong(outputFile.size());
// Write out cursor list
outputFile.seek(0, SEEK_END);
outputFile.writeByte(MARTIAN_NUM_CURSORS);
for (uint idx = 0; idx < MARTIAN_NUM_CURSORS; ++idx) {
outputFile.writeWord(Martian::CURSOR_SIZES[idx]);
outputFile.write(Martian::CURSORS[idx], Martian::CURSOR_SIZES[idx]);
}
}
bool processExecutable(int exeIdx, const char *name) {
uint dataSegmentOffset;
uint filenamesOffset, numFilenames;
uint charsStart, charsEnd;
uint roomsStart, roomsEnd, numRooms;
uint travelPosOffset;
const char *const *roomDescs;
const byte *deathScreens;
const char *const *deathText;
uint numDeaths;
uint numItems;
const char *const *itemNames;
const int *comboTable;
byte gameId = 0, discType = 0, demoType = 0;
byte language = Common::EN_ANY;
// Open up the file for access
File exeFile;
if (!exeFile.open(name)) {
printf("Could not open file - %s\n", name);
return false;
}
// Total up the first 256 bytes of the executable as a simplified
// means of identifying the different executables we support
uint fileChecksum = 0;
for (int idx = 0; idx < 256; ++idx)
fileChecksum += exeFile.readByte();
switch (fileChecksum) {
case 11899:
// Amazon English floppy
gameId = 1;
dataSegmentOffset = 0xC8C0;
filenamesOffset = dataSegmentOffset + 0x3628;
numFilenames = 100;
charsStart = dataSegmentOffset + 0x4234;
charsEnd = dataSegmentOffset + 0x49c6;
roomsStart = dataSegmentOffset + 0x35a8;
roomsEnd = dataSegmentOffset + 0x4234;
travelPosOffset = dataSegmentOffset + 0x5ff7;
numRooms = 64;
roomDescs = &Amazon::ROOM_DESCR[0];
deathScreens = Amazon::DEATH_SCREENS_ENG;
deathText = &Amazon::DEATH_TEXT_ENG[0];
numDeaths = sizeof(Amazon::DEATH_SCREENS_ENG);
numItems = 85;
itemNames = &Amazon::INVENTORY_NAMES_ENG[0];
comboTable = &Amazon::COMBO_TABLE[0][0];
break;
case 12360:
// Amazon CD English
gameId = 1;
discType = 1;
dataSegmentOffset = 0xd370;
filenamesOffset = dataSegmentOffset + 0x3EA0;
numFilenames = 116;
charsStart = dataSegmentOffset + 0x4BDC;
charsEnd = dataSegmentOffset + 0x5AF4;
roomsStart = dataSegmentOffset + 0x3E20;
roomsEnd = dataSegmentOffset + 0x4BDC;
travelPosOffset = dataSegmentOffset + 0x7125;
numRooms = 64;
roomDescs = &Amazon::ROOM_DESCR[0];
deathScreens = Amazon::DEATH_SCREENS_ENG;
deathText = &Amazon::DEATH_TEXT_ENG[0];
numDeaths = sizeof(Amazon::DEATH_SCREENS_ENG);
numItems = 85;
itemNames = &Amazon::INVENTORY_NAMES_ENG[0];
comboTable = &Amazon::COMBO_TABLE[0][0];
break;
case 11748:
// Amazon English Demo
gameId = 1;
discType = 0;
demoType = 1;
dataSegmentOffset = 0xa2a0;
filenamesOffset = dataSegmentOffset + 0x242C;
numFilenames = 100;
charsStart = dataSegmentOffset + 0x2F1A;
charsEnd = dataSegmentOffset + 0x34FB;
roomsStart = dataSegmentOffset + 0x23AC;
roomsEnd = dataSegmentOffset + 0x2F1A;
travelPosOffset = dataSegmentOffset + 0x494E;
numRooms = 64;
roomDescs = &Amazon::ROOM_DESCR[0];
deathScreens = Amazon::DEATH_SCREENS_ENG;
deathText = &Amazon::DEATH_TEXT_ENG[0];
numDeaths = sizeof(Amazon::DEATH_SCREENS_ENG);
numItems = 85;
itemNames = &Amazon::INVENTORY_NAMES_ENG[0];
comboTable = &Amazon::COMBO_TABLE[0][0];
break;
case 1224:
// Martian Memorandum English packed
printf("Martian Memorandum provided that's packed with EXEPACK.\n");
printf("It needs to be first unpacked before it can be used with this tool.\n");
return false;
case 0:
// Martian Memorandum English
gameId = 2;
dataSegmentOffset = 0x8d78;
filenamesOffset = dataSegmentOffset + 0x373A;
numFilenames = 80;
charsStart = dataSegmentOffset + 0x40F2;
charsEnd = dataSegmentOffset + 0x46F8;
roomsStart = dataSegmentOffset + 0x36DA;
roomsEnd = dataSegmentOffset + 0x40F2;
travelPosOffset = dataSegmentOffset + 0x58E9;
numRooms = 48;
roomDescs = &Martian::ROOM_DESCR[0];
deathScreens = Martian::DEATH_SCREENS_ENG;
deathText = &Martian::DEATH_TEXT_ENG[0];
numDeaths = sizeof(Martian::DEATH_SCREENS_ENG);
numItems = 85;
itemNames = &Martian::INVENTORY_NAMES_ENG[0];
comboTable = nullptr;
break;
default:
printf("Unknown game executable specified - %s\n", name);
exeFile.close();
return false;
}
// Write out header entry
uint outputOffset = outputFile.size();
outputFile.seek(8 + exeIdx * 8);
outputFile.writeByte(gameId);
outputFile.writeByte(discType);
outputFile.writeByte(demoType);
outputFile.writeByte(language);
outputFile.writeLong(outputOffset);
outputFile.seek(0, SEEK_END);
// Write out list of AP filenames
outputFile.writeWord(numFilenames);
for (uint idx = 0; idx < numFilenames; ++idx) {
exeFile.seek(filenamesOffset + idx * 2);
uint nameOffset = exeFile.readWord();
exeFile.seek(dataSegmentOffset + nameOffset);
outputFile.writeString(exeFile);
}
// Write out the character list
exeFile.seek(charsStart);
Common::Array<uint> charOffsets;
charOffsets.push_back(exeFile.readWord());
assert((dataSegmentOffset + charOffsets[0] - exeFile.pos()) < 512);
while (exeFile.pos() < (dataSegmentOffset + charOffsets[0]))
charOffsets.push_back(exeFile.readWord());
outputFile.writeWord(charOffsets.size());
charOffsets.push_back(charsEnd);
for (uint idx = 0; idx < charOffsets.size() - 1; ++idx) {
if (charOffsets[idx] == 0) {
outputFile.writeWord(0);
} else {
uint nextOffset = 0xffff;
for (uint idx2 = 0; idx2 < charOffsets.size(); ++idx2) {
if (charOffsets[idx2] && charOffsets[idx2] > charOffsets[idx] && charOffsets[idx2] < nextOffset)
nextOffset = charOffsets[idx2];
}
uint size = nextOffset - charOffsets[idx];
exeFile.seek(dataSegmentOffset + charOffsets[idx]);
outputFile.writeWord(size);
outputFile.write(exeFile, size);
}
}
// Write out the room data
Common::Array<uint> roomOffsets;
Common::Array<Common::Point> travelPos;
exeFile.seek(roomsStart);
for (uint idx = 0; idx < numRooms; ++idx)
roomOffsets.push_back(exeFile.readWord());
roomOffsets.push_back(roomsEnd);
exeFile.seek(travelPosOffset);
for (uint idx = 0; idx < numRooms; ++idx) {
int16 xp = (int16)exeFile.readWord();
int16 yp = (int16)exeFile.readWord();
travelPos.push_back(Common::Point(xp, yp));
}
outputFile.writeWord(numRooms);
for (uint idx = 0; idx < numRooms; ++idx) {
uint dataSize = 0;
if (roomOffsets[idx] == 0) {
dataSize = 0;
} else {
// Find the offset of the next higher entry that's non-zero
uint offset = 0;
for (uint idx2 = idx + 1; !offset; ++idx2)
offset = roomOffsets[idx2];
dataSize = offset - roomOffsets[idx];
exeFile.seek(dataSegmentOffset + roomOffsets[idx]);
}
// Write out the room description (used only by the debugger)
outputFile.writeString(roomDescs[idx]);
// Write out travel position
outputFile.writeWord((uint16)travelPos[idx].x);
outputFile.writeWord((uint16)travelPos[idx].y);
// Write out the data for the room
outputFile.writeWord(dataSize);
if (dataSize > 0)
outputFile.write(exeFile, dataSize);
}
// Write out the deaths list
outputFile.writeWord(numDeaths);
for (uint idx = 0; idx < numDeaths; ++idx) {
// Write out the screen number and text
outputFile.writeByte(deathScreens[idx]);
outputFile.writeString(deathText[idx]);
}
// Write out inventory data
outputFile.writeWord(numItems);
for (uint idx = 0; idx < numItems; ++idx) {
outputFile.writeString(itemNames[idx]);
if (comboTable == nullptr) {
for (uint cIdx = 0; cIdx < 4; ++cIdx)
outputFile.writeWord(0);
} else {
for (uint cIdx = 0; cIdx < 4; ++cIdx, ++comboTable)
outputFile.writeWord((uint16)*comboTable);
}
}
// Write out game specific strings and other data
if (gameId == 1) {
// Write out miscellaneous strings
outputFile.writeString(Amazon::NO_HELP_MESSAGE_ENG);
outputFile.writeString(Amazon::NO_HINTS_MESSAGE_ENG);
outputFile.writeString(Amazon::RIVER_HIT1_ENG);
outputFile.writeString(Amazon::RIVER_HIT2_ENG);
outputFile.writeString(Amazon::BAR_MESSAGE_ENG);
for (int idx = 0; idx < 3; ++idx)
outputFile.writeString(Amazon::HELPLVLTXT_ENG[idx]);
for (int idx = 0; idx < 9; ++idx)
outputFile.writeString(Amazon::IQLABELS_ENG[idx]);
outputFile.writeString(Amazon::CANT_GET_THERE_ENG);
}
// Do final padding to the next paragraph boundary
if ((outputFile.size() % 16) != 0)
outputFile.writeByte(0, 16 - (outputFile.size() % 16));
// Close the executable and signal that it was processed successfully
exeFile.close();
return true;
}

View file

@ -0,0 +1,184 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef __CREATE_ACCESS_DAT_H__
#define __CREATE_ACCESS_DAT_H__
#include <stdio.h>
#include <stdlib.h>
#include "common/scummsys.h"
#include "common/endian.h"
#include "common/array.h"
#define VERSION_NUMBER 1
enum AccessMode {
kFileReadMode = 1,
kFileWriteMode = 2
};
class File {
private:
FILE *_f;
const byte *_memPtr;
size_t _offset, _size;
public:
File() : _f(nullptr), _memPtr(nullptr), _offset(0), _size(0) {}
bool open(const char *filename, AccessMode mode = kFileReadMode) {
_memPtr = nullptr;
_f = fopen(filename, (mode == kFileReadMode) ? "rb" : "wb+");
return (_f != NULL);
}
bool open(const byte *data, uint size) {
close();
_memPtr = data;
_size = size;
return true;
}
void close() {
if (_f)
fclose(_f);
_f = nullptr;
_memPtr = nullptr;
}
int seek(int32 offset, int whence = SEEK_SET) {
if (_f)
return fseek(_f, offset, whence);
switch (whence) {
case SEEK_SET:
_offset = offset;
break;
case SEEK_CUR:
_offset += offset;
break;
case SEEK_END:
_offset = _size + offset;
break;
default:
break;
}
return _offset;
}
void skip(int32 offset) {
if (_f)
fseek(_f, offset, SEEK_CUR);
else
_offset += offset;
}
long read(void *buffer, size_t len) {
if (_f)
return fread(buffer, 1, len, _f);
uint bytesToRead = CLIP(len, (size_t)0, _size - _offset);
memcpy(buffer, &_memPtr[_offset], bytesToRead);
_offset += bytesToRead;
return bytesToRead;
}
void write(const void *buffer, size_t len) {
assert(_f);
fwrite(buffer, 1, len, _f);
}
void write(File &src, size_t len) {
for (size_t idx = 0; idx < len; ++idx)
writeByte(src.readByte());
}
byte readByte() {
byte v;
read(&v, sizeof(byte));
return v;
}
uint16 readWord() {
uint16 v;
read(&v, sizeof(uint16));
return FROM_LE_16(v);
}
uint32 readLong() {
uint32 v;
read(&v, sizeof(uint32));
return FROM_LE_32(v);
}
void writeByte(byte v) {
write(&v, sizeof(byte));
}
void writeByte(byte v, int len) {
byte *b = new byte[len];
memset(b, v, len);
write(b, len);
delete[] b;
}
void writeWord(uint16 v) {
uint16 vTemp = TO_LE_16(v);
write(&vTemp, sizeof(uint16));
}
void writeLong(uint32 v) {
uint32 vTemp = TO_LE_32(v);
write(&vTemp, sizeof(uint32));
}
void writeString(const char *msg) {
if (!msg) {
writeByte(0);
} else {
do {
writeByte(*msg);
} while (*msg++);
}
}
void writeString(File &src) {
char c;
do {
c = src.readByte();
writeByte(c);
} while (c);
}
uint32 pos() const {
if (_f)
return ftell(_f);
else
return _offset;
}
uint32 size() const {
if (_f) {
uint32 currentPos = pos();
fseek(_f, 0, SEEK_END);
uint32 result = pos();
fseek(_f, currentPos, SEEK_SET);
return result;
} else if (_memPtr) {
return _size;
} else {
return 0;
}
}
bool eof() const {
if (_f)
return feof(_f) != 0;
else if (_memPtr)
return _offset >= _size;
return false;
}
};
#endif

View file

@ -0,0 +1,182 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "martian_resources.h"
namespace Martian {
const byte MOUSE0[] = {
// hotspot x and y, uint16 LE
0, 0, 0, 0,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0, 2, 0xF7, 5,
0, 3, 0xF7, 0xF7, 5,
0, 3, 0xF7, 0xF7, 5,
0, 4, 0xF7, 0xF7, 0xF7, 5,
0, 4, 0xF7, 0xF7, 0xF7, 5,
0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5,
2, 3, 0xF7, 0xF7, 5,
3, 3, 0xF7, 0xF7, 5,
3, 3, 0xF7, 0xF7, 5,
4, 2, 0xF7, 5
};
const byte MOUSE1[] = {
// hotspot x and y, uint16 LE
7, 0, 7, 0,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
6, 1, 0xF7,
4, 5, 0xFF, 0xFF, 0, 0xFF, 0xFF,
3, 7, 0xFF, 0, 0, 0, 0, 0, 0xFF,
2, 9, 0xFF, 0, 0, 0, 0xF7, 0, 0, 0, 0xFF,
1, 11, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF,
1, 11, 0xFF, 0, 0, 0, 0, 0xF7, 0, 0, 0, 0, 0xFF,
0, 13, 0xF7, 0, 0, 0xF7, 0, 0xF7, 0, 0xF7, 0, 0xF7, 0, 0, 0xF7,
1, 11, 0xFF, 0, 0, 0, 0, 0xF7, 0, 0, 0, 0, 0xFF,
1, 11, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF,
2, 9, 0xFF, 0, 0, 0, 0xF7, 0, 0, 0, 0xFF,
3, 7, 0xFF, 0, 0, 0, 0, 0, 0xFF,
4, 5, 0xFF, 0xFF, 0, 0xFF, 0xFF,
6, 1, 0xF7,
0, 0,
0, 0,
0, 0
};
const byte MOUSE2[] = {
// hotspot x and y, uint16 LE
8, 0, 8, 0,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0, 0,
0, 0,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
2, 12, 4, 4, 4, 4, 4, 0, 4, 4, 4, 4, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
0, 0,
0, 0,
0, 0
};
const byte MOUSE3[] = {
// hotspot x and y, uint16 LE
0, 0, 0, 0,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0, 11, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
0, 12, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 5,
0, 12, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 5, 5,
0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 5, 0, 0, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
1, 11, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
0, 0,
0, 0,
0, 0
};
const byte *const CURSORS[MARTIAN_NUM_CURSORS] = {
MOUSE0, MOUSE1, MOUSE2, MOUSE3
};
const uint CURSOR_SIZES[MARTIAN_NUM_CURSORS] = {
sizeof(MOUSE0), sizeof(MOUSE1), sizeof(MOUSE2), sizeof(MOUSE3)
};
const char *const ROOM_DESCR[48] = {
nullptr, "TBD ROOM_TABLE1", "TBD ROOM_TABLE2", "TBD ROOM_TABLE3", "TBD ROOM_TABLE4",
"TBD ROOM_TABLE5", "TBD ROOM_TABLE6", "TBD ROOM_TABLE7", "TBD ROOM_TABLE8", "TBD ROOM_TABLE9",
nullptr, "TBD ROOM_TABLE11", nullptr, "TBD ROOM_TABLE13", "TBD ROOM_TABLE14",
"TBD ROOM_TABLE15", "TBD ROOM_TABLE16", "TBD ROOM_TABLE17", "TBD ROOM_TABLE18", nullptr,
nullptr, "TBD ROOM_TABLE21", "TBD ROOM_TABLE22", "TBD ROOM_TABLE23", "TBD ROOM_TABLE24",
"TBD ROOM_TABLE25", "TBD ROOM_TABLE26", "TBD ROOM_TABLE27", "TBD ROOM_TABLE28", "TBD ROOM_TABLE29",
"TBD ROOM_TABLE30", "TBD ROOM_TABLE31", "TBD ROOM_TABLE32", "TBD ROOM_TABLE33", nullptr,
"TBD ROOM_TABLE35", nullptr, "TBD ROOM_TABLE37", "TBD ROOM_TABLE38", "TBD ROOM_TABLE39",
nullptr, nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, "TBD ROOM_TABLE47"
};
const byte DEATH_SCREENS_ENG[20] = {
5, 5, 3, 3, 7, 4, 6, 2, 2, 2, 1, 5, 3, 5, 2, 8, 5, 3, 8, 5
};
const char *const DEATH_TEXT_ENG[20] = {
"A VICIOUS THUG PULLS OUT HIS GUN AND AIR CONDITIONS YOUR BRAIN.",
"BIG DICK COMES BACK AND ANNOUNCES YOUR TIME IS UP. ONE OF HIS BOYS PROCEEDS TO PART YOUR EYEBROWS.",
"ALTHOUGH HIS FIRST SHOT MISSED, THE PUNK FINDS YOU AND TURNS YOU INTO A DOUGHNUT.",
"THE CREEP SPOTS YOU. HE TURNS AND FIRES HIS WEAPON. IT BURNS A HOLE A BUZZARD CAN FLY THROUGH.",
"OBVIOUSLY RICK LOGAN HAS A FEW TRICK UP HIS SLEEVE. A TREMENDOUS WEIGHT HITS YOUR HEAD. YOU MUMBLE; WATCH OUT FOR THAT TREE...",
"SLOWLY SINKING IN THE SLIMY OOZE, YOU THINK OF SEVERAL JELLO WRESTLING MATCHES YOU'VE ATTENDED. BUT NO MORE...",
"THE PATH SUDDENLY GIVES WAY AND YOU FEEL MANY STAKES TEAR THROUGH YOUR FLESH. HOW DO YOU LIKE YOUR STAKE",
"THE SNAKE SINKS ITS FANGS INTO YOU LEG. THE POISON WORKS QUICKLY. THE SNAKE THEN SWALLOWS YOU WHOLE.",
"YOU FADE AWAY, GLOWING LIKE A LIGHTBULB.",
"YOU TOUCH THE BUBBLING RADIOACTIVE SELTZER. IT IMMEDIATELY CAUSES VITAL ORGANS TO ELONGATE AND EXPLODE. YOU DIE WITH AN ABSURD AND FOOLISH LOOK ON YOUR FACE.",
"THE DOGS PRETTY HUNGRY. IT WON'T TAKE HIM LONG TO FINISH SO SIT BACK AND ENJOY IT.",
"ROCKY DOESN'T LIKE BEING FOLLOWED. HE DECIDES TO BEAT YOU. WITHIN AND INCH OF YOUR LIFE. UNFORTUNATELY, HE MISJUDGED THE DISTANCE",
"YOU STUMBLE INTO DEADLY LASER FIRE.",
"THE OUTPOST AND YOUR BODY PARTS ARE BLOWN TO KINGDOM COME.",
"YOU REACH THE TOP, BUT YOUR AIR SOON RUNS OUT LEAVING YOU BREATHLESS.",
"YOU DIE IN THE FIERY EXPLOSION.",
"YOU FALL HUNDREDS OF FEET TO YOUR DEATH.",
"YOU WALK ONTO A PRESSURE SENSITIVE SECURITY PAD. A LASER ZEROS IN AND BLOWS A HOLE THE SIZE OF A SUBARU TIRE THROUGH YOU.",
"DANGERFIELD'S EXPERIMENT BACKFIRES. IT RELEASES A DEMON FROM HIS SUBCONSCIOUS WHICH DESTROYS THE ENTIRE PLANET.",
"ONCE DANGERFIELD GETS OUT OF HIS CHAMBER, HE PULLS OUT A WEAPON AND LETS YOU HAVE IT."
};
const char *const INVENTORY_NAMES_ENG[55] = {
"CAMERA", "LENS", "PHOTOS", "MAIL", "GUN",
"CASH", "COMLINK", "AMMO", "LOCKPICK KIT", "EARRING",
"RECIEPTS", "PAPER", "LADDER", "BOOTS", "DOCUMENTS",
"KNIFE", "DAGGER", "KEYS", "ROCK", "LOG",
"SHOVEL", "STONE", "REMOTE CONTROL", "FOOD AND WATER", "DOOR CARD KEY",
"FLASHLIGHT", "INTERLOCK KEY", "TOOLS", "REBREATHER", "JET PACK",
"ROD", "HCL2", "SAFE CARD KEY", "TUNING FORK", "STONE",
"ROSE", "KEY", "NOTE", "ALLEN WRENCH", "HOVER BOARD",
"BLUE PRINTS", "LETTER", "MEMORANDUM", "MARKERS", "FILM",
"ANDRETTI FILM", "GLASSES", "AMULET", "FACIAL KIT", "CAT FOOD",
"MONKEY WRENCH", "BIG DICK CARD", "BRA", "BOLT", nullptr
};
} // End of namespace Amazon

View file

@ -20,32 +20,33 @@
*
*/
#include "backends/platform/sdl/raspberrypi/raspberrypi.h"
#include "backends/plugins/sdl/sdl-provider.h"
#ifndef __MARTIAN_RESOURCES_H__
#define __MARTIAN_RESOURCES_H__
#include "common/scummsys.h"
#include "base/main.h"
#if defined(DISPMANX)
int main(int argc, char* argv[]) {
namespace Martian {
// Create our OSystem instance
g_system = new OSystem_SDL_RaspberryPi();
assert(g_system);
#define MARTIAN_NUM_CURSORS 4
extern const byte *const CURSORS[MARTIAN_NUM_CURSORS];
extern const uint CURSOR_SIZES[MARTIAN_NUM_CURSORS];
// Pre initialize the backend
((OSystem_SDL_RaspberryPi *)g_system)->init();
extern const char *const ROOM_DESCR[48];
#ifdef DYNAMIC_MODULES
PluginManager::instance().addPluginProvider(new SDLPluginProvider());
#endif
extern const char *const DEATH_TEXT_ENG[20];
extern const byte DEATH_SCREENS_ENG[20];
extern const char *const INVENTORY_NAMES_ENG[55];
extern const int COMBO_TABLE[85][4];
// Invoke the actual ScummVM main entry point:
int res = scummvm_main(argc, argv);
extern const char *const NO_HELP_MESSAGE_ENG;
extern const char *const NO_HINTS_MESSAGE_ENG;
extern const char *const RIVER_HIT1_ENG;
extern const char *const RIVER_HIT2_ENG;
extern const char *const BAR_MESSAGE_ENG;
extern const char *const HELPLVLTXT_ENG[3];
extern const char *const IQLABELS_ENG[9];
extern const char *const CANT_GET_THERE_ENG;
// Free OSystem
delete (OSystem_SDL_RaspberryPi *)g_system;
return res;
}
} // End of namespace Amazon
#endif

View file

@ -0,0 +1,13 @@
MODULE := devtools/create_access
MODULE_OBJS := \
create_access_dat.o \
amazon_resources.o \
martian_resources.o
# Set the name of the executable
TOOL_EXECUTABLE := create_access
# Include common rules
include $(srcdir)/rules.mk

View file

@ -49,42 +49,42 @@ namespace CreateProjectTool {
(std::find(defines.begin(), defines.end(), name) != defines.end())
#define ADD_SETTING(config, key, value) \
config.settings[key] = Setting(value, "", SettingsNoQuote);
config._settings[key] = Setting(value, "", kSettingsNoQuote);
#define ADD_SETTING_ORDER(config, key, value, order) \
config.settings[key] = Setting(value, "", SettingsNoQuote, 0, order);
#define ADD_SETTING_ORDER_NOVALUE(config, key, comment, order) \
config.settings[key] = Setting("", comment, SettingsNoValue, 0, order);
config._settings[key] = Setting("", comment, kSettingsNoValue, 0, order);
#define ADD_SETTING_QUOTE(config, key, value) \
config.settings[key] = Setting(value);
config._settings[key] = Setting(value);
#define ADD_SETTING_QUOTE_VAR(config, key, value) \
config.settings[key] = Setting(value, "", SettingsQuoteVariable);
config._settings[key] = Setting(value, "", kSettingsQuoteVariable);
#define ADD_SETTING_LIST(config, key, values, flags, indent) \
config.settings[key] = Setting(values, flags, indent);
config._settings[key] = Setting(values, flags, indent);
#define REMOVE_SETTING(config, key) \
config.settings.erase(key);
config._settings.erase(key);
#define ADD_BUILD_FILE(id, name, fileRefId, comment) { \
Object *buildFile = new Object(this, id, name, "PBXBuildFile", "PBXBuildFile", comment); \
buildFile->addProperty("fileRef", fileRefId, name, SettingsNoValue); \
buildFile->addProperty("fileRef", fileRefId, name, kSettingsNoValue); \
_buildFile.add(buildFile); \
_buildFile.flags = SettingsSingleItem; \
_buildFile._flags = kSettingsSingleItem; \
}
#define ADD_FILE_REFERENCE(id, name, properties) { \
Object *fileRef = new Object(this, id, name, "PBXFileReference", "PBXFileReference", name); \
if (!properties.fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties.fileEncoding, "", SettingsNoValue); \
if (!properties.lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties.lastKnownFileType, "", SettingsNoValue|SettingsQuoteVariable); \
if (!properties.fileName.empty()) fileRef->addProperty("name", properties.fileName, "", SettingsNoValue|SettingsQuoteVariable); \
if (!properties.filePath.empty()) fileRef->addProperty("path", properties.filePath, "", SettingsNoValue|SettingsQuoteVariable); \
if (!properties.sourceTree.empty()) fileRef->addProperty("sourceTree", properties.sourceTree, "", SettingsNoValue); \
if (!properties._fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties._fileEncoding, "", kSettingsNoValue); \
if (!properties._lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties._lastKnownFileType, "", kSettingsNoValue|kSettingsQuoteVariable); \
if (!properties._fileName.empty()) fileRef->addProperty("name", properties._fileName, "", kSettingsNoValue|kSettingsQuoteVariable); \
if (!properties._filePath.empty()) fileRef->addProperty("path", properties._filePath, "", kSettingsNoValue|kSettingsQuoteVariable); \
if (!properties._sourceTree.empty()) fileRef->addProperty("sourceTree", properties._sourceTree, "", kSettingsNoValue); \
_fileReference.add(fileRef); \
_fileReference.flags = SettingsSingleItem; \
_fileReference._flags = kSettingsSingleItem; \
}
bool producesObjectFileOnOSX(const std::string &fileName) {
@ -152,11 +152,11 @@ bool shouldSkipFileForTarget(const std::string &fileID, const std::string &targe
XcodeProvider::Group::Group(XcodeProvider *objectParent, const std::string &groupName, const std::string &uniqueName, const std::string &path) : Object(objectParent, uniqueName, groupName, "PBXGroup", "", groupName) {
bool path_is_absolute = (path.length() > 0 && path.at(0) == '/');
addProperty("name", name, "", SettingsNoValue|SettingsQuoteVariable);
addProperty("sourceTree", path_is_absolute ? "<absolute>" : "<group>", "", SettingsNoValue|SettingsQuoteVariable);
addProperty("name", _name, "", kSettingsNoValue | kSettingsQuoteVariable);
addProperty("sourceTree", path_is_absolute ? "<absolute>" : "<group>", "", kSettingsNoValue | kSettingsQuoteVariable);
if (path != "") {
addProperty("path", path, "", SettingsNoValue|SettingsQuoteVariable);
addProperty("path", path, "", kSettingsNoValue | kSettingsQuoteVariable);
}
_childOrder = 0;
_treeName = uniqueName;
@ -165,43 +165,43 @@ XcodeProvider::Group::Group(XcodeProvider *objectParent, const std::string &grou
void XcodeProvider::Group::ensureChildExists(const std::string &name) {
std::map<std::string, Group*>::iterator it = _childGroups.find(name);
if (it == _childGroups.end()) {
Group *child = new Group(parent, name, this->_treeName + '/' + name, name);
Group *child = new Group(_parent, name, this->_treeName + '/' + name, name);
_childGroups[name] = child;
addChildGroup(child);
parent->_groups.add(child);
_parent->_groups.add(child);
}
}
void XcodeProvider::Group::addChildInternal(const std::string &id, const std::string &comment) {
if (properties.find("children") == properties.end()) {
if (_properties.find("children") == _properties.end()) {
Property children;
children.hasOrder = true;
children.flags = SettingsAsList;
properties["children"] = children;
children._hasOrder = true;
children._flags = kSettingsAsList;
_properties["children"] = children;
}
properties["children"].settings[id] = Setting("", comment + " in Sources", SettingsNoValue, 0, _childOrder++);
_properties["children"]._settings[id] = Setting("", comment + " in Sources", kSettingsNoValue, 0, _childOrder++);
if (_childOrder == 1) {
// Force children to use () even when there is only 1 child.
// Also this enforces the use of "," after the single item, instead of ; (see writeProperty)
properties["children"].flags |= SettingsSingleItem;
_properties["children"]._flags |= kSettingsSingleItem;
} else {
properties["children"].flags ^= SettingsSingleItem;
_properties["children"]._flags ^= kSettingsSingleItem;
}
}
void XcodeProvider::Group::addChildGroup(const Group *group) {
addChildInternal(parent->getHash(group->_treeName), group->_treeName);
addChildInternal(_parent->getHash(group->_treeName), group->_treeName);
}
void XcodeProvider::Group::addChildFile(const std::string &name) {
std::string id = "FileReference_" + _treeName + "/" + name;
addChildInternal(parent->getHash(id), name);
addChildInternal(_parent->getHash(id), name);
FileProperty property = FileProperty(name, name, name, "\"<group>\"");
parent->addFileReference(id, name, property);
_parent->addFileReference(id, name, property);
if (producesObjectFileOnOSX(name)) {
parent->addBuildFile(_treeName + "/" + name, name, parent->getHash(id), name + " in Sources");
_parent->addBuildFile(_treeName + "/" + name, name, _parent->getHash(id), name + " in Sources");
}
}
@ -239,31 +239,31 @@ XcodeProvider::Group *XcodeProvider::touchGroupsForPath(const std::string &path)
void XcodeProvider::addFileReference(const std::string &id, const std::string &name, FileProperty properties) {
Object *fileRef = new Object(this, id, name, "PBXFileReference", "PBXFileReference", name);
if (!properties.fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties.fileEncoding, "", SettingsNoValue);
if (!properties.lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties.lastKnownFileType, "", SettingsNoValue|SettingsQuoteVariable);
if (!properties.fileName.empty()) fileRef->addProperty("name", properties.fileName, "", SettingsNoValue|SettingsQuoteVariable);
if (!properties.filePath.empty()) fileRef->addProperty("path", properties.filePath, "", SettingsNoValue|SettingsQuoteVariable);
if (!properties.sourceTree.empty()) fileRef->addProperty("sourceTree", properties.sourceTree, "", SettingsNoValue);
if (!properties._fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties._fileEncoding, "", kSettingsNoValue);
if (!properties._lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties._lastKnownFileType, "", kSettingsNoValue | kSettingsQuoteVariable);
if (!properties._fileName.empty()) fileRef->addProperty("name", properties._fileName, "", kSettingsNoValue | kSettingsQuoteVariable);
if (!properties._filePath.empty()) fileRef->addProperty("path", properties._filePath, "", kSettingsNoValue | kSettingsQuoteVariable);
if (!properties._sourceTree.empty()) fileRef->addProperty("sourceTree", properties._sourceTree, "", kSettingsNoValue);
_fileReference.add(fileRef);
_fileReference.flags = SettingsSingleItem;
_fileReference._flags = kSettingsSingleItem;
}
void XcodeProvider::addProductFileReference(const std::string &id, const std::string &name) {
Object *fileRef = new Object(this, id, name, "PBXFileReference", "PBXFileReference", name);
fileRef->addProperty("explicitFileType", "wrapper.application", "", SettingsNoValue|SettingsQuoteVariable);
fileRef->addProperty("includeInIndex", "0", "", SettingsNoValue);
fileRef->addProperty("path", name, "", SettingsNoValue|SettingsQuoteVariable);
fileRef->addProperty("sourceTree", "BUILT_PRODUCTS_DIR", "", SettingsNoValue);
fileRef->addProperty("explicitFileType", "wrapper.application", "", kSettingsNoValue | kSettingsQuoteVariable);
fileRef->addProperty("includeInIndex", "0", "", kSettingsNoValue);
fileRef->addProperty("path", name, "", kSettingsNoValue | kSettingsQuoteVariable);
fileRef->addProperty("sourceTree", "BUILT_PRODUCTS_DIR", "", kSettingsNoValue);
_fileReference.add(fileRef);
_fileReference.flags = SettingsSingleItem;
_fileReference._flags = kSettingsSingleItem;
}
void XcodeProvider::addBuildFile(const std::string &id, const std::string &name, const std::string &fileRefId, const std::string &comment) {
Object *buildFile = new Object(this, id, name, "PBXBuildFile", "PBXBuildFile", comment);
buildFile->addProperty("fileRef", fileRefId, name, SettingsNoValue);
buildFile->addProperty("fileRef", fileRefId, name, kSettingsNoValue);
_buildFile.add(buildFile);
_buildFile.flags = SettingsSingleItem;
_buildFile._flags = kSettingsSingleItem;
}
XcodeProvider::XcodeProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version)
@ -341,10 +341,10 @@ void XcodeProvider::ouputMainProjectFile(const BuildSetup &setup) {
// Header
project << "// !$*UTF8*$!\n"
"{\n"
"\t" << writeSetting("archiveVersion", "1", "", SettingsNoQuote) << ";\n"
"\t" << writeSetting("archiveVersion", "1", "", kSettingsNoQuote) << ";\n"
"\tclasses = {\n"
"\t};\n"
"\t" << writeSetting("objectVersion", "46", "", SettingsNoQuote) << ";\n"
"\t" << writeSetting("objectVersion", "46", "", kSettingsNoQuote) << ";\n"
"\tobjects = {\n";
//////////////////////////////////////////////////////////////////////////
@ -364,7 +364,7 @@ void XcodeProvider::ouputMainProjectFile(const BuildSetup &setup) {
//////////////////////////////////////////////////////////////////////////
// Footer
project << "\t};\n"
"\t" << writeSetting("rootObject", getHash("PBXProject"), "Project object", SettingsNoQuote) << ";\n"
"\t" << writeSetting("rootObject", getHash("PBXProject"), "Project object", kSettingsNoQuote) << ";\n"
"}\n";
}
@ -416,14 +416,14 @@ void XcodeProvider::setupCopyFilesBuildPhase() {
* (each native target has different build rules)
*/
void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
_frameworksBuildPhase.comment = "PBXFrameworksBuildPhase";
_frameworksBuildPhase._comment = "PBXFrameworksBuildPhase";
// Just use a hardcoded id for the Frameworks-group
Group *frameworksGroup = new Group(this, "Frameworks", "PBXGroup_CustomTemplate_Frameworks_", "");
Property children;
children.hasOrder = true;
children.flags = SettingsAsList;
children._hasOrder = true;
children._flags = kSettingsAsList;
// Setup framework file properties
std::map<std::string, FileProperty> properties;
@ -476,7 +476,7 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libfluidsynth.a", "libfluidsynth", true);
DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libglib.a", "libglib", true);
frameworksGroup->properties["children"] = children;
frameworksGroup->_properties["children"] = children;
_groups.add(frameworksGroup);
// Force this to be added as a sub-group in the root.
_rootSourceGroup->addChildGroup(frameworksGroup);
@ -489,13 +489,13 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
// ScummVM-iOS
Object *framework_iPhone = new Object(this, "PBXFrameworksBuildPhase_" + _targets[IOS_TARGET], "PBXFrameworksBuildPhase", "PBXFrameworksBuildPhase", "", "Frameworks");
framework_iPhone->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
framework_iPhone->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
framework_iPhone->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
framework_iPhone->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
// List of frameworks
Property iOS_files;
iOS_files.hasOrder = true;
iOS_files.flags = SettingsAsList;
iOS_files._hasOrder = true;
iOS_files._flags = kSettingsAsList;
ValueList frameworks_iOS;
frameworks_iOS.push_back("CoreAudio.framework");
@ -539,7 +539,7 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]);
}
framework_iPhone->properties["files"] = iOS_files;
framework_iPhone->_properties["files"] = iOS_files;
_frameworksBuildPhase.add(framework_iPhone);
@ -547,13 +547,13 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
// ScummVM-OS X
Object *framework_OSX = new Object(this, "PBXFrameworksBuildPhase_" + _targets[OSX_TARGET], "PBXFrameworksBuildPhase", "PBXFrameworksBuildPhase", "", "Frameworks");
framework_OSX->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
framework_OSX->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
framework_OSX->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
framework_OSX->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
// List of frameworks
Property osx_files;
osx_files.hasOrder = true;
osx_files.flags = SettingsAsList;
osx_files._hasOrder = true;
osx_files._flags = kSettingsAsList;
ValueList frameworks_osx;
frameworks_osx.push_back("CoreFoundation.framework");
@ -581,13 +581,13 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]);
}
framework_OSX->properties["files"] = osx_files;
framework_OSX->_properties["files"] = osx_files;
_frameworksBuildPhase.add(framework_OSX);
}
void XcodeProvider::setupNativeTarget() {
_nativeTarget.comment = "PBXNativeTarget";
_nativeTarget._comment = "PBXNativeTarget";
// Just use a hardcoded id for the Products-group
Group *productsGroup = new Group(this, "Products", "PBXGroup_CustomTemplate_Products_" , "");
@ -595,26 +595,26 @@ void XcodeProvider::setupNativeTarget() {
for (unsigned int i = 0; i < _targets.size(); i++) {
Object *target = new Object(this, "PBXNativeTarget_" + _targets[i], "PBXNativeTarget", "PBXNativeTarget", "", _targets[i]);
target->addProperty("buildConfigurationList", getHash("XCConfigurationList_" + _targets[i]), "Build configuration list for PBXNativeTarget \"" + _targets[i] + "\"", SettingsNoValue);
target->addProperty("buildConfigurationList", getHash("XCConfigurationList_" + _targets[i]), "Build configuration list for PBXNativeTarget \"" + _targets[i] + "\"", kSettingsNoValue);
Property buildPhases;
buildPhases.hasOrder = true;
buildPhases.flags = SettingsAsList;
buildPhases.settings[getHash("PBXResourcesBuildPhase_" + _targets[i])] = Setting("", "Resources", SettingsNoValue, 0, 0);
buildPhases.settings[getHash("PBXSourcesBuildPhase_" + _targets[i])] = Setting("", "Sources", SettingsNoValue, 0, 1);
buildPhases.settings[getHash("PBXFrameworksBuildPhase_" + _targets[i])] = Setting("", "Frameworks", SettingsNoValue, 0, 2);
target->properties["buildPhases"] = buildPhases;
buildPhases._hasOrder = true;
buildPhases._flags = kSettingsAsList;
buildPhases._settings[getHash("PBXResourcesBuildPhase_" + _targets[i])] = Setting("", "Resources", kSettingsNoValue, 0, 0);
buildPhases._settings[getHash("PBXSourcesBuildPhase_" + _targets[i])] = Setting("", "Sources", kSettingsNoValue, 0, 1);
buildPhases._settings[getHash("PBXFrameworksBuildPhase_" + _targets[i])] = Setting("", "Frameworks", kSettingsNoValue, 0, 2);
target->_properties["buildPhases"] = buildPhases;
target->addProperty("buildRules", "", "", SettingsNoValue|SettingsAsList);
target->addProperty("buildRules", "", "", kSettingsNoValue | kSettingsAsList);
target->addProperty("dependencies", "", "", SettingsNoValue|SettingsAsList);
target->addProperty("dependencies", "", "", kSettingsNoValue | kSettingsAsList);
target->addProperty("name", _targets[i], "", SettingsNoValue|SettingsQuoteVariable);
target->addProperty("productName", PROJECT_NAME, "", SettingsNoValue);
target->addProperty("name", _targets[i], "", kSettingsNoValue | kSettingsQuoteVariable);
target->addProperty("productName", PROJECT_NAME, "", kSettingsNoValue);
addProductFileReference("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i], PROJECT_DESCRIPTION ".app");
productsGroup->addChildByHash(getHash("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i]), PROJECT_DESCRIPTION ".app");
target->addProperty("productReference", getHash("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i]), PROJECT_DESCRIPTION ".app", SettingsNoValue);
target->addProperty("productType", "com.apple.product-type.application", "", SettingsNoValue|SettingsQuoteVariable);
target->addProperty("productReference", getHash("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i]), PROJECT_DESCRIPTION ".app", kSettingsNoValue);
target->addProperty("productType", "com.apple.product-type.application", "", kSettingsNoValue | kSettingsQuoteVariable);
_nativeTarget.add(target);
}
@ -623,38 +623,38 @@ void XcodeProvider::setupNativeTarget() {
}
void XcodeProvider::setupProject() {
_project.comment = "PBXProject";
_project._comment = "PBXProject";
Object *project = new Object(this, "PBXProject", "PBXProject", "PBXProject", "", "Project object");
project->addProperty("buildConfigurationList", getHash("XCConfigurationList_scummvm"), "Build configuration list for PBXProject \"" PROJECT_NAME "\"", SettingsNoValue);
project->addProperty("compatibilityVersion", "Xcode 3.2", "", SettingsNoValue|SettingsQuoteVariable);
project->addProperty("developmentRegion", "English", "", SettingsNoValue);
project->addProperty("hasScannedForEncodings", "1", "", SettingsNoValue);
project->addProperty("buildConfigurationList", getHash("XCConfigurationList_scummvm"), "Build configuration list for PBXProject \"" PROJECT_NAME "\"", kSettingsNoValue);
project->addProperty("compatibilityVersion", "Xcode 3.2", "", kSettingsNoValue | kSettingsQuoteVariable);
project->addProperty("developmentRegion", "English", "", kSettingsNoValue);
project->addProperty("hasScannedForEncodings", "1", "", kSettingsNoValue);
// List of known regions
Property regions;
regions.flags = SettingsAsList;
regions._flags = kSettingsAsList;
ADD_SETTING_ORDER_NOVALUE(regions, "English", "", 0);
ADD_SETTING_ORDER_NOVALUE(regions, "Japanese", "", 1);
ADD_SETTING_ORDER_NOVALUE(regions, "French", "", 2);
ADD_SETTING_ORDER_NOVALUE(regions, "German", "", 3);
project->properties["knownRegions"] = regions;
project->_properties["knownRegions"] = regions;
project->addProperty("mainGroup", _rootSourceGroup->getHashRef(), "CustomTemplate", SettingsNoValue);
project->addProperty("productRefGroup", getHash("PBXGroup_CustomTemplate_Products_"), "" , SettingsNoValue);
project->addProperty("projectDirPath", _projectRoot, "", SettingsNoValue|SettingsQuoteVariable);
project->addProperty("projectRoot", "", "", SettingsNoValue|SettingsQuoteVariable);
project->addProperty("mainGroup", _rootSourceGroup->getHashRef(), "CustomTemplate", kSettingsNoValue);
project->addProperty("productRefGroup", getHash("PBXGroup_CustomTemplate_Products_"), "" , kSettingsNoValue);
project->addProperty("projectDirPath", _projectRoot, "", kSettingsNoValue | kSettingsQuoteVariable);
project->addProperty("projectRoot", "", "", kSettingsNoValue | kSettingsQuoteVariable);
// List of targets
Property targets;
targets.flags = SettingsAsList;
targets.settings[getHash("PBXNativeTarget_" + _targets[IOS_TARGET])] = Setting("", _targets[IOS_TARGET], SettingsNoValue, 0, 0);
targets.settings[getHash("PBXNativeTarget_" + _targets[OSX_TARGET])] = Setting("", _targets[OSX_TARGET], SettingsNoValue, 0, 1);
project->properties["targets"] = targets;
targets._flags = kSettingsAsList;
targets._settings[getHash("PBXNativeTarget_" + _targets[IOS_TARGET])] = Setting("", _targets[IOS_TARGET], kSettingsNoValue, 0, 0);
targets._settings[getHash("PBXNativeTarget_" + _targets[OSX_TARGET])] = Setting("", _targets[OSX_TARGET], kSettingsNoValue, 0, 1);
project->_properties["targets"] = targets;
// Force list even when there is only a single target
project->properties["targets"].flags |= SettingsSingleItem;
project->_properties["targets"]._flags |= kSettingsSingleItem;
_project.add(project);
}
@ -684,7 +684,7 @@ XcodeProvider::ValueList& XcodeProvider::getResourceFiles() const {
}
void XcodeProvider::setupResourcesBuildPhase() {
_resourcesBuildPhase.comment = "PBXResourcesBuildPhase";
_resourcesBuildPhase._comment = "PBXResourcesBuildPhase";
ValueList &files_list = getResourceFiles();
@ -692,12 +692,12 @@ void XcodeProvider::setupResourcesBuildPhase() {
for (unsigned int i = 0; i < _targets.size(); i++) {
Object *resource = new Object(this, "PBXResourcesBuildPhase_" + _targets[i], "PBXResourcesBuildPhase", "PBXResourcesBuildPhase", "", "Resources");
resource->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
resource->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
// Add default files
Property files;
files.hasOrder = true;
files.flags = SettingsAsList;
files._hasOrder = true;
files._flags = kSettingsAsList;
int order = 0;
for (ValueList::iterator file = files_list.begin(); file != files_list.end(); file++) {
@ -712,46 +712,46 @@ void XcodeProvider::setupResourcesBuildPhase() {
ADD_SETTING_ORDER_NOVALUE(files, getHash(resourceAbsolutePath), comment, order++);
}
resource->properties["files"] = files;
resource->_properties["files"] = files;
resource->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
resource->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
_resourcesBuildPhase.add(resource);
}
}
void XcodeProvider::setupSourcesBuildPhase() {
_sourcesBuildPhase.comment = "PBXSourcesBuildPhase";
_sourcesBuildPhase._comment = "PBXSourcesBuildPhase";
// Same as for containers: a rule for each native target
for (unsigned int i = 0; i < _targets.size(); i++) {
const std::string &targetName = _targets[i];
Object *source = new Object(this, "PBXSourcesBuildPhase_" + _targets[i], "PBXSourcesBuildPhase", "PBXSourcesBuildPhase", "", "Sources");
source->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
source->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
Property files;
files.hasOrder = true;
files.flags = SettingsAsList;
files._hasOrder = true;
files._flags = kSettingsAsList;
int order = 0;
for (std::vector<Object*>::iterator file = _buildFile.objects.begin(); file !=_buildFile.objects.end(); ++file) {
const std::string &fileName = (*file)->name;
if (shouldSkipFileForTarget((*file)->id, targetName, fileName)) {
for (std::vector<Object *>::iterator file = _buildFile._objects.begin(); file != _buildFile._objects.end(); ++file) {
const std::string &fileName = (*file)->_name;
if (shouldSkipFileForTarget((*file)->_id, targetName, fileName)) {
continue;
}
if (!producesObjectFileOnOSX(fileName)) {
continue;
}
std::string comment = fileName + " in Sources";
ADD_SETTING_ORDER_NOVALUE(files, getHash((*file)->id), comment, order++);
ADD_SETTING_ORDER_NOVALUE(files, getHash((*file)->_id), comment, order++);
}
setupAdditionalSources(targetName, files, order);
source->properties["files"] = files;
source->_properties["files"] = files;
source->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
source->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
_sourcesBuildPhase.add(source);
}
@ -760,8 +760,8 @@ void XcodeProvider::setupSourcesBuildPhase() {
// Setup all build configurations
void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
_buildConfiguration.comment = "XCBuildConfiguration";
_buildConfiguration.flags = SettingsAsList;
_buildConfiguration._comment = "XCBuildConfiguration";
_buildConfiguration._flags = kSettingsAsList;
std::string projectOutputDirectory;
#ifdef POSIX
@ -792,7 +792,7 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
REMOVE_DEFINE(scummvm_defines, "IPHONE");
REMOVE_DEFINE(scummvm_defines, "IPHONE_OFFICIAL");
REMOVE_DEFINE(scummvm_defines, "SDL_BACKEND");
ADD_SETTING_LIST(scummvm_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, SettingsNoQuote|SettingsAsList, 5);
ADD_SETTING_LIST(scummvm_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, kSettingsNoQuote | kSettingsAsList, 5);
ADD_SETTING(scummvm_Debug, "GCC_THUMB_SUPPORT", "NO");
ADD_SETTING(scummvm_Debug, "GCC_USE_GCC3_PFE_SUPPORT", "NO");
ADD_SETTING(scummvm_Debug, "GCC_WARN_ABOUT_RETURN_TYPE", "YES");
@ -801,7 +801,7 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
scummvm_HeaderPaths.push_back("include/");
scummvm_HeaderPaths.push_back("$(SRCROOT)/engines/");
scummvm_HeaderPaths.push_back("$(SRCROOT)");
ADD_SETTING_LIST(scummvm_Debug, "HEADER_SEARCH_PATHS", scummvm_HeaderPaths, SettingsQuoteVariable|SettingsAsList, 5);
ADD_SETTING_LIST(scummvm_Debug, "HEADER_SEARCH_PATHS", scummvm_HeaderPaths, kSettingsQuoteVariable | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvm_Debug, "LIBRARY_SEARCH_PATHS", "");
ADD_SETTING(scummvm_Debug, "ONLY_ACTIVE_ARCH", "YES");
ADD_SETTING_QUOTE(scummvm_Debug, "OTHER_CFLAGS", "");
@ -809,8 +809,8 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
ADD_SETTING(scummvm_Debug, "PREBINDING", "NO");
ADD_SETTING(scummvm_Debug, "ENABLE_TESTABILITY", "YES");
scummvm_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
scummvm_Debug_Object->properties["buildSettings"] = scummvm_Debug;
scummvm_Debug_Object->addProperty("name", "Debug", "", kSettingsNoValue);
scummvm_Debug_Object->_properties["buildSettings"] = scummvm_Debug;
// Release
Object *scummvm_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_NAME "_Release", PROJECT_NAME, "XCBuildConfiguration", "PBXProject", "Release");
@ -821,8 +821,8 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
REMOVE_SETTING(scummvm_Release, "ONLY_ACTIVE_ARCH");
REMOVE_SETTING(scummvm_Release, "ENABLE_TESTABILITY");
scummvm_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
scummvm_Release_Object->properties["buildSettings"] = scummvm_Release;
scummvm_Release_Object->addProperty("name", "Release", "", kSettingsNoValue);
scummvm_Release_Object->_properties["buildSettings"] = scummvm_Release;
_buildConfiguration.add(scummvm_Debug_Object);
_buildConfiguration.add(scummvm_Release_Object);
@ -842,7 +842,7 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
ValueList iPhone_FrameworkSearchPaths;
iPhone_FrameworkSearchPaths.push_back("$(inherited)");
iPhone_FrameworkSearchPaths.push_back("\"$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"");
ADD_SETTING_LIST(iPhone_Debug, "FRAMEWORK_SEARCH_PATHS", iPhone_FrameworkSearchPaths, SettingsAsList, 5);
ADD_SETTING_LIST(iPhone_Debug, "FRAMEWORK_SEARCH_PATHS", iPhone_FrameworkSearchPaths, kSettingsAsList, 5);
ADD_SETTING(iPhone_Debug, "GCC_DYNAMIC_NO_PIC", "NO");
ADD_SETTING(iPhone_Debug, "GCC_ENABLE_CPP_EXCEPTIONS", "NO");
ADD_SETTING(iPhone_Debug, "GCC_ENABLE_FIX_AND_CONTINUE", "NO");
@ -858,12 +858,12 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
iPhone_HeaderSearchPaths.push_back("$(SRCROOT)");
iPhone_HeaderSearchPaths.push_back("\"" + projectOutputDirectory + "\"");
iPhone_HeaderSearchPaths.push_back("\"" + projectOutputDirectory + "/include\"");
ADD_SETTING_LIST(iPhone_Debug, "HEADER_SEARCH_PATHS", iPhone_HeaderSearchPaths, SettingsAsList|SettingsQuoteVariable, 5);
ADD_SETTING_LIST(iPhone_Debug, "HEADER_SEARCH_PATHS", iPhone_HeaderSearchPaths, kSettingsAsList | kSettingsQuoteVariable, 5);
ADD_SETTING_QUOTE(iPhone_Debug, "INFOPLIST_FILE", "$(SRCROOT)/dists/ios7/Info.plist");
ValueList iPhone_LibPaths;
iPhone_LibPaths.push_back("$(inherited)");
iPhone_LibPaths.push_back("\"" + projectOutputDirectory + "/lib\"");
ADD_SETTING_LIST(iPhone_Debug, "LIBRARY_SEARCH_PATHS", iPhone_LibPaths, SettingsAsList, 5);
ADD_SETTING_LIST(iPhone_Debug, "LIBRARY_SEARCH_PATHS", iPhone_LibPaths, kSettingsAsList, 5);
ADD_SETTING(iPhone_Debug, "ONLY_ACTIVE_ARCH", "YES");
ADD_SETTING(iPhone_Debug, "PREBINDING", "NO");
ADD_SETTING(iPhone_Debug, "PRODUCT_NAME", PROJECT_NAME);
@ -877,12 +877,12 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
ADD_DEFINE(scummvmIOS_defines, "\"$(inherited)\"");
ADD_DEFINE(scummvmIOS_defines, "IPHONE");
ADD_DEFINE(scummvmIOS_defines, "IPHONE_OFFICIAL");
ADD_SETTING_LIST(iPhone_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmIOS_defines, SettingsNoQuote|SettingsAsList, 5);
ADD_SETTING_LIST(iPhone_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmIOS_defines, kSettingsNoQuote | kSettingsAsList, 5);
ADD_SETTING(iPhone_Debug, "ASSETCATALOG_COMPILER_APPICON_NAME", "AppIcon");
ADD_SETTING(iPhone_Debug, "ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME", "LaunchImage");
iPhone_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
iPhone_Debug_Object->properties["buildSettings"] = iPhone_Debug;
iPhone_Debug_Object->addProperty("name", "Debug", "", kSettingsNoValue);
iPhone_Debug_Object->_properties["buildSettings"] = iPhone_Debug;
// Release
Object *iPhone_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Release", _targets[IOS_TARGET] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Release");
@ -894,8 +894,8 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
REMOVE_SETTING(iPhone_Release, "DEBUG_INFORMATION_FORMAT");
ADD_SETTING_QUOTE(iPhone_Release, "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym");
iPhone_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
iPhone_Release_Object->properties["buildSettings"] = iPhone_Release;
iPhone_Release_Object->addProperty("name", "Release", "", kSettingsNoValue);
iPhone_Release_Object->_properties["buildSettings"] = iPhone_Release;
_buildConfiguration.add(iPhone_Debug_Object);
_buildConfiguration.add(iPhone_Release_Object);
@ -925,7 +925,7 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
ADD_DEFINE(scummvmOSX_defines, "\"$(inherited)\"");
ADD_DEFINE(scummvmOSX_defines, "SDL_BACKEND");
ADD_DEFINE(scummvmOSX_defines, "MACOSX");
ADD_SETTING_LIST(scummvmOSX_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmOSX_defines, SettingsNoQuote|SettingsAsList, 5);
ADD_SETTING_LIST(scummvmOSX_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmOSX_defines, kSettingsNoQuote | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvmOSX_Debug, "GCC_VERSION", "");
ValueList scummvmOSX_HeaderPaths;
scummvmOSX_HeaderPaths.push_back("/opt/local/include/SDL");
@ -934,14 +934,14 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
scummvmOSX_HeaderPaths.push_back("include/");
scummvmOSX_HeaderPaths.push_back("$(SRCROOT)/engines/");
scummvmOSX_HeaderPaths.push_back("$(SRCROOT)");
ADD_SETTING_LIST(scummvmOSX_Debug, "HEADER_SEARCH_PATHS", scummvmOSX_HeaderPaths, SettingsQuoteVariable|SettingsAsList, 5);
ADD_SETTING_LIST(scummvmOSX_Debug, "HEADER_SEARCH_PATHS", scummvmOSX_HeaderPaths, kSettingsQuoteVariable | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvmOSX_Debug, "INFOPLIST_FILE", "$(SRCROOT)/dists/macosx/Info.plist");
ValueList scummvmOSX_LibPaths;
scummvmOSX_LibPaths.push_back("/sw/lib");
scummvmOSX_LibPaths.push_back("/opt/local/lib");
scummvmOSX_LibPaths.push_back("\"$(inherited)\"");
scummvmOSX_LibPaths.push_back("\"\\\\\\\"$(SRCROOT)/lib\\\\\\\"\""); // mmmh, all those slashes, it's almost Christmas \o/
ADD_SETTING_LIST(scummvmOSX_Debug, "LIBRARY_SEARCH_PATHS", scummvmOSX_LibPaths, SettingsNoQuote|SettingsAsList, 5);
ADD_SETTING_LIST(scummvmOSX_Debug, "LIBRARY_SEARCH_PATHS", scummvmOSX_LibPaths, kSettingsNoQuote | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvmOSX_Debug, "OTHER_CFLAGS", "");
ValueList scummvmOSX_LdFlags;
scummvmOSX_LdFlags.push_back("-lSDLmain");
@ -956,12 +956,12 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
scummvmOSX_LdFlags.push_back("-lFLAC");
scummvmOSX_LdFlags.push_back("-lSDL");
scummvmOSX_LdFlags.push_back("-lz");
ADD_SETTING_LIST(scummvmOSX_Debug, "OTHER_LDFLAGS", scummvmOSX_LdFlags, SettingsAsList, 5);
ADD_SETTING_LIST(scummvmOSX_Debug, "OTHER_LDFLAGS", scummvmOSX_LdFlags, kSettingsAsList, 5);
ADD_SETTING(scummvmOSX_Debug, "PREBINDING", "NO");
ADD_SETTING(scummvmOSX_Debug, "PRODUCT_NAME", PROJECT_NAME);
scummvmOSX_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
scummvmOSX_Debug_Object->properties["buildSettings"] = scummvmOSX_Debug;
scummvmOSX_Debug_Object->addProperty("name", "Debug", "", kSettingsNoValue);
scummvmOSX_Debug_Object->_properties["buildSettings"] = scummvmOSX_Debug;
// Release
Object *scummvmOSX_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Release", _targets[OSX_TARGET] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Release");
@ -973,27 +973,27 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
REMOVE_SETTING(scummvmOSX_Release, "DEBUG_INFORMATION_FORMAT");
ADD_SETTING_QUOTE(scummvmOSX_Release, "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym");
scummvmOSX_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
scummvmOSX_Release_Object->properties["buildSettings"] = scummvmOSX_Release;
scummvmOSX_Release_Object->addProperty("name", "Release", "", kSettingsNoValue);
scummvmOSX_Release_Object->_properties["buildSettings"] = scummvmOSX_Release;
_buildConfiguration.add(scummvmOSX_Debug_Object);
_buildConfiguration.add(scummvmOSX_Release_Object);
// Warning: This assumes we have all configurations with a Debug & Release pair
for (std::vector<Object *>::iterator config = _buildConfiguration.objects.begin(); config != _buildConfiguration.objects.end(); config++) {
for (std::vector<Object *>::iterator config = _buildConfiguration._objects.begin(); config != _buildConfiguration._objects.end(); config++) {
Object *configList = new Object(this, "XCConfigurationList_" + (*config)->name, (*config)->name, "XCConfigurationList", "", "Build configuration list for " + (*config)->refType + " \"" + (*config)->name + "\"");
Object *configList = new Object(this, "XCConfigurationList_" + (*config)->_name, (*config)->_name, "XCConfigurationList", "", "Build configuration list for " + (*config)->_refType + " \"" + (*config)->_name + "\"");
Property buildConfigs;
buildConfigs.flags = SettingsAsList;
buildConfigs._flags = kSettingsAsList;
buildConfigs.settings[getHash((*config)->id)] = Setting("", "Debug", SettingsNoValue, 0, 0);
buildConfigs.settings[getHash((*(++config))->id)] = Setting("", "Release", SettingsNoValue, 0, 1);
buildConfigs._settings[getHash((*config)->_id)] = Setting("", "Debug", kSettingsNoValue, 0, 0);
buildConfigs._settings[getHash((*(++config))->_id)] = Setting("", "Release", kSettingsNoValue, 0, 1);
configList->properties["buildConfigurations"] = buildConfigs;
configList->_properties["buildConfigurations"] = buildConfigs;
configList->addProperty("defaultConfigurationIsVisible", "0", "", SettingsNoValue);
configList->addProperty("defaultConfigurationName", "Release", "", SettingsNoValue);
configList->addProperty("defaultConfigurationIsVisible", "0", "", kSettingsNoValue);
configList->addProperty("defaultConfigurationName", "Release", "", kSettingsNoValue);
_configurationList.add(configList);
}
@ -1116,30 +1116,30 @@ std::string replace(std::string input, const std::string find, std::string repla
std::string XcodeProvider::writeProperty(const std::string &variable, Property &prop, int flags) const {
std::string output;
output += (flags & SettingsSingleItem ? "" : "\t\t\t") + variable + " = ";
output += (flags & kSettingsSingleItem ? "" : "\t\t\t") + variable + " = ";
if (prop.settings.size() > 1 || (prop.flags & SettingsSingleItem))
output += (prop.flags & SettingsAsList) ? "(\n" : "{\n";
if (prop._settings.size() > 1 || (prop._flags & kSettingsSingleItem))
output += (prop._flags & kSettingsAsList) ? "(\n" : "{\n";
OrderedSettingList settings = prop.getOrderedSettingList();
for (OrderedSettingList::const_iterator setting = settings.begin(); setting != settings.end(); ++setting) {
if (settings.size() > 1 || (prop.flags & SettingsSingleItem))
output += (flags & SettingsSingleItem ? " " : "\t\t\t\t");
if (settings.size() > 1 || (prop._flags & kSettingsSingleItem))
output += (flags & kSettingsSingleItem ? " " : "\t\t\t\t");
output += writeSetting((*setting).first, (*setting).second);
// The combination of SettingsAsList, and SettingsSingleItem should use "," and not ";" (i.e children
// The combination of SettingsAsList, and kSettingsSingleItem should use "," and not ";" (i.e children
// in PBXGroup, so we special case that case here.
if ((prop.flags & SettingsAsList) && (prop.settings.size() > 1 || (prop.flags & SettingsSingleItem))) {
output += (prop.settings.size() > 0) ? ",\n" : "\n";
if ((prop._flags & kSettingsAsList) && (prop._settings.size() > 1 || (prop._flags & kSettingsSingleItem))) {
output += (prop._settings.size() > 0) ? ",\n" : "\n";
} else {
output += ";";
output += (flags & SettingsSingleItem ? " " : "\n");
output += (flags & kSettingsSingleItem ? " " : "\n");
}
}
if (prop.settings.size() > 1 || (prop.flags & SettingsSingleItem))
output += (prop.flags & SettingsAsList) ? "\t\t\t);\n" : "\t\t\t};\n";
if (prop._settings.size() > 1 || (prop._flags & kSettingsSingleItem))
output += (prop._flags & kSettingsAsList) ? "\t\t\t);\n" : "\t\t\t};\n";
return output;
}
@ -1152,32 +1152,31 @@ std::string XcodeProvider::writeSetting(const std::string &variable, std::string
// XCode project generator pbuilder_pbx.cpp, writeSettings() (under LGPL 2.1)
std::string XcodeProvider::writeSetting(const std::string &variable, const Setting &setting) const {
std::string output;
const std::string quote = (setting.flags & SettingsNoQuote) ? "" : "\"";
const std::string quote = (setting._flags & kSettingsNoQuote) ? "" : "\"";
const std::string escape_quote = quote.empty() ? "" : "\\" + quote;
std::string newline = "\n";
// Get indent level
for (int i = 0; i < setting.indent; ++i)
for (int i = 0; i < setting._indent; ++i)
newline += "\t";
// Setup variable
std::string var = (setting.flags & SettingsQuoteVariable) ? "\"" + variable + "\"" : variable;
std::string var = (setting._flags & kSettingsQuoteVariable) ? "\"" + variable + "\"" : variable;
// Output a list
if (setting.flags & SettingsAsList) {
if (setting._flags & kSettingsAsList) {
output += var + ((setting._flags & kSettingsNoValue) ? "(" : " = (") + newline;
output += var + ((setting.flags & SettingsNoValue) ? "(" : " = (") + newline;
for (unsigned int i = 0, count = 0; i < setting._entries.size(); ++i) {
for (unsigned int i = 0, count = 0; i < setting.entries.size(); ++i) {
std::string value = setting.entries.at(i).value;
std::string value = setting._entries.at(i)._value;
if (!value.empty()) {
if (count++ > 0)
output += "," + newline;
output += quote + replace(value, quote, escape_quote) + quote;
std::string comment = setting.entries.at(i).comment;
std::string comment = setting._entries.at(i)._comment;
if (!comment.empty())
output += " /* " + comment + " */";
}
@ -1185,24 +1184,24 @@ std::string XcodeProvider::writeSetting(const std::string &variable, const Setti
}
// Add closing ")" on new line
newline.resize(newline.size() - 1);
output += (setting.flags & SettingsNoValue) ? "\t\t\t)" : "," + newline + ")";
output += (setting._flags & kSettingsNoValue) ? "\t\t\t)" : "," + newline + ")";
} else {
output += var;
output += (setting.flags & SettingsNoValue) ? "" : " = " + quote;
output += (setting._flags & kSettingsNoValue) ? "" : " = " + quote;
for(unsigned int i = 0; i < setting.entries.size(); ++i) {
std::string value = setting.entries.at(i).value;
for (unsigned int i = 0; i < setting._entries.size(); ++i) {
std::string value = setting._entries.at(i)._value;
if (i)
output += " ";
output += value;
std::string comment = setting.entries.at(i).comment;
std::string comment = setting._entries.at(i)._comment;
if (!comment.empty())
output += " /* " + comment + " */";
}
output += (setting.flags & SettingsNoValue) ? "" : quote;
output += (setting._flags & kSettingsNoValue) ? "" : quote;
}
return output;
}

View file

@ -49,24 +49,23 @@ protected:
const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
private:
enum {
SettingsAsList = 0x01,
SettingsSingleItem = 0x02,
SettingsNoQuote = 0x04,
SettingsQuoteVariable = 0x08,
SettingsNoValue = 0x10
kSettingsAsList = 0x01,
kSettingsSingleItem = 0x02,
kSettingsNoQuote = 0x04,
kSettingsQuoteVariable = 0x08,
kSettingsNoValue = 0x10
};
// File properties
struct FileProperty {
std::string fileEncoding;
std::string lastKnownFileType;
std::string fileName;
std::string filePath;
std::string sourceTree;
std::string _fileEncoding;
std::string _lastKnownFileType;
std::string _fileName;
std::string _filePath;
std::string _sourceTree;
FileProperty(std::string fileType = "", std::string name = "", std::string path = "", std::string source = "") :
fileEncoding(""), lastKnownFileType(fileType), fileName(name), filePath(path), sourceTree(source)
{
FileProperty(std::string fileType = "", std::string name = "", std::string path = "", std::string source = "")
: _fileEncoding(""), _lastKnownFileType(fileType), _fileName(name), _filePath(path), _sourceTree(source) {
}
};
@ -75,33 +74,33 @@ private:
typedef std::vector<std::string> ValueList;
struct Entry {
std::string value;
std::string comment;
std::string _value;
std::string _comment;
Entry(std::string val, std::string cmt) : value(val), comment(cmt) {}
Entry(std::string val, std::string cmt) : _value(val), _comment(cmt) {}
};
typedef std::vector<Entry> EntryList;
struct Setting {
EntryList entries;
int flags;
int indent;
int order;
EntryList _entries;
int _flags;
int _indent;
int _order;
explicit Setting(std::string value = "", std::string comment = "", int flgs = 0, int idt = 0, int ord = -1) : flags(flgs), indent(idt), order(ord) {
entries.push_back(Entry(value, comment));
Setting(std::string value = "", std::string comment = "", int flgs = 0, int idt = 0, int ord = -1) : _flags(flgs), _indent(idt), _order(ord) {
_entries.push_back(Entry(value, comment));
}
explicit Setting(ValueList values, int flgs = 0, int idt = 0, int ord = -1) : flags(flgs), indent(idt), order(ord) {
Setting(ValueList values, int flgs = 0, int idt = 0, int ord = -1) : _flags(flgs), _indent(idt), _order(ord) {
for (unsigned int i = 0; i < values.size(); i++)
entries.push_back(Entry(values[i], ""));
_entries.push_back(Entry(values[i], ""));
}
explicit Setting(EntryList ents, int flgs = 0, int idt = 0, int ord = -1) : entries(ents), flags(flgs), indent(idt), order(ord) {}
Setting(EntryList ents, int flgs = 0, int idt = 0, int ord = -1) : _entries(ents), _flags(flgs), _indent(idt), _order(ord) {}
void addEntry(std::string value, std::string comment = "") {
entries.push_back(Entry(value, comment));
_entries.push_back(Entry(value, comment));
}
};
@ -110,45 +109,35 @@ private:
typedef std::vector<SettingPair> OrderedSettingList;
static bool OrderSortPredicate(const SettingPair &s1, const SettingPair &s2) {
return s1.second.order < s2.second.order;
return s1.second._order < s2.second._order;
}
struct Property {
public:
SettingList settings;
int flags;
bool hasOrder;
SettingList _settings;
int _flags;
bool _hasOrder;
Property() : flags(0), hasOrder(false) {}
Property() : _flags(0), _hasOrder(false) {}
// Constructs a simple Property
explicit Property(std::string name, std::string value = "", std::string comment = "", int flgs = 0, int indent = 0, bool order = false) : flags(flgs), hasOrder(order) {
Setting setting(value, comment, flags, indent);
settings[name] = setting;
Property(std::string name, std::string value = "", std::string comment = "", int flgs = 0, int indent = 0, bool order = false) : _flags(flgs), _hasOrder(order) {
_settings[name] = Setting(value, comment, _flags, indent);
}
Property(std::string name, ValueList values, int flgs = 0, int indent = 0, bool order = false) : flags(flgs), hasOrder(order) {
Setting setting(values, flags, indent);
settings[name] = setting;
}
// Copy constructor
Property(const Property &rhs) {
settings = rhs.settings;
flags = rhs.flags;
Property(std::string name, ValueList values, int flgs = 0, int indent = 0, bool order = false) : _flags(flgs), _hasOrder(order) {
_settings[name] = Setting(values, _flags, indent);
}
OrderedSettingList getOrderedSettingList() {
OrderedSettingList list;
// Prepare vector to sort
for (SettingList::const_iterator setting = settings.begin(); setting != settings.end(); ++setting)
for (SettingList::const_iterator setting = _settings.begin(); setting != _settings.end(); ++setting)
list.push_back(SettingPair(setting->first, setting->second));
// Sort vector using setting order
if (hasOrder)
if (_hasOrder)
std::sort(list.begin(), list.end(), OrderSortPredicate);
return list;
@ -162,48 +151,48 @@ private:
// be overkill since we only have to generate a single project
struct Object {
public:
std::string id; // Unique identifier for this object
std::string name; // Name (may not be unique - for ex. configuration entries)
std::string refType; // Type of object this references (if any)
std::string comment; // Main comment (empty for no comment)
std::string _id; // Unique identifier for this object
std::string _name; // Name (may not be unique - for ex. configuration entries)
std::string _refType; // Type of object this references (if any)
std::string _comment; // Main comment (empty for no comment)
PropertyList properties; // List of object properties, including output configuration
PropertyList _properties; // List of object properties, including output configuration
// Constructs an object and add a default type property
Object(XcodeProvider *objectParent, std::string objectId, std::string objectName, std::string objectType, std::string objectRefType = "", std::string objectComment = "")
: id(objectId), name(objectName), refType(objectRefType), comment(objectComment), parent(objectParent) {
: _id(objectId), _name(objectName), _refType(objectRefType), _comment(objectComment), _parent(objectParent) {
assert(objectParent);
assert(!objectId.empty());
assert(!objectName.empty());
assert(!objectType.empty());
addProperty("isa", objectType, "", SettingsNoQuote|SettingsNoValue);
addProperty("isa", objectType, "", kSettingsNoQuote | kSettingsNoValue);
}
// Add a simple Property with just a name and a value
void addProperty(std::string propName, std::string propValue, std::string propComment = "", int propFlags = 0, int propIndent = 0) {
properties[propName] = Property(propValue, "", propComment, propFlags, propIndent);
_properties[propName] = Property(propValue, "", propComment, propFlags, propIndent);
}
std::string toString(int flags = 0) {
std::string output;
output = "\t\t" + parent->getHash(id) + (comment.empty() ? "" : " /* " + comment + " */") + " = {";
output = "\t\t" + _parent->getHash(_id) + (_comment.empty() ? "" : " /* " + _comment + " */") + " = {";
if (flags & SettingsAsList)
if (flags & kSettingsAsList)
output += "\n";
// Special case: always output the isa property first
output += parent->writeProperty("isa", properties["isa"], flags);
output += _parent->writeProperty("isa", _properties["isa"], flags);
// Write each property
for (PropertyList::iterator property = properties.begin(); property != properties.end(); ++property) {
if ((*property).first == "isa")
for (PropertyList::iterator property = _properties.begin(); property != _properties.end(); ++property) {
if (property->first == "isa")
continue;
output += parent->writeProperty((*property).first, (*property).second, flags);
output += _parent->writeProperty(property->first, property->second, flags);
}
if (flags & SettingsAsList)
if (flags & kSettingsAsList)
output += "\t\t";
output += "};\n";
@ -213,35 +202,34 @@ private:
// Slight hack, to allow Group access to parent.
protected:
XcodeProvider *parent;
XcodeProvider *_parent;
private:
// Returns the type property (should always be the first in the properties map)
std::string getType() {
assert(!properties.empty());
assert(!properties["isa"].settings.empty());
assert(!_properties.empty());
assert(!_properties["isa"]._settings.empty());
SettingList::iterator it = properties["isa"].settings.begin();
return (*it).first;
SettingList::iterator it = _properties["isa"]._settings.begin();
return it->first;
}
};
struct ObjectList {
private:
std::map<std::string, bool> objectMap;
std::map<std::string, bool> _objectMap;
public:
std::vector<Object *> objects;
std::string comment;
int flags;
std::vector<Object *> _objects;
std::string _comment;
int _flags;
void add(Object *obj) {
std::map<std::string, bool>::iterator it = objectMap.find(obj->id);
if (it != objectMap.end() && it->second == true)
std::map<std::string, bool>::iterator it = _objectMap.find(obj->_id);
if (it != _objectMap.end() && it->second == true)
return;
objects.push_back(obj);
objectMap[obj->id] = true;
_objects.push_back(obj);
_objectMap[obj->_id] = true;
}
Object *find(std::string id) {
@ -256,14 +244,14 @@ private:
std::string toString() {
std::string output;
if (!comment.empty())
output = "\n/* Begin " + comment + " section */\n";
if (!_comment.empty())
output = "\n/* Begin " + _comment + " section */\n";
for (std::vector<Object *>::iterator object = objects.begin(); object != objects.end(); ++object)
output += (*object)->toString(flags);
for (std::vector<Object *>::iterator object = _objects.begin(); object != _objects.end(); ++object)
output += (*object)->toString(_flags);
if (!comment.empty())
output += "/* End " + comment + " section */\n";
if (!_comment.empty())
output += "/* End " + _comment + " section */\n";
return output;
}
@ -285,7 +273,7 @@ private:
void addChildGroup(const Group *group);
void ensureChildExists(const std::string &name);
Group *getChildGroup(const std::string &name);
std::string getHashRef() const { return parent->getHash(id); }
std::string getHashRef() const { return _parent->getHash(_id); }
};
// The path used by the root-source group

View file

@ -1310,6 +1310,10 @@ begin_credits("Credits");
"Electronic Arts for providing the source code of the two Lost Files of Sherlock Holmes games. ".
"James M. Ferguson and Barry Duncan for their tenacious efforts to recover the sources.");
add_paragraph(
"The mindFactory team for writing Broken Sword 2.5, a splendid fan-made sequel, and for sharing ".
"the source code with us.");
end_section();
end_credits();

View file

@ -1,6 +1,9 @@
engine-data README
-------------------------------------------------------------------------------
access.dat
TODO
drascula.dat
TODO

Binary file not shown.

View file

@ -36,12 +36,12 @@ Unauthorized distribution of an installable package with non freeware games incl
Building from source
====================
This port of ScummVM to the PS3 is based on SDL. It uses the open source SDK PSL1GHT.
This port of ScummVM to the PS3 is based on SDL2. It uses the open source SDK PSL1GHT.
The dependencies needed to build it are :
- The toolchain from https://github.com/ps3dev/ps3toolchain
- SDL from https://github.com/zeldin/SDL_PSL1GHT
- SDL from https://bitbucket.org/bgK/sdl_psl1ght
- ScummVM from https://github.com/scummvm/scummvm
Once all the dependencies are correctly setup, an installable package can be obtained from source by issuing the following command :

View file

@ -20,6 +20,9 @@ scummmodern.zip FILE "gui/themes/scummmodern.zip"
translations.dat FILE "gui/themes/translations.dat"
#endif
#if ENABLE_ACCESS == STATIC_PLUGIN
access.dat FILE "dists/engine-data/access.dat"
#endif
#if ENABLE_DRASCULA == STATIC_PLUGIN
drascula.dat FILE "dists/engine-data/drascula.dat"
#endif

View file

@ -20,6 +20,9 @@ scummmodern.zip FILE "gui/themes/scummmodern.zip"
translations.dat FILE "gui/themes/translations.dat"
#endif
#if ENABLE_ACCESS == STATIC_PLUGIN
access.dat FILE "dists/engine-data/access.dat"
#endif
#if ENABLE_DRASCULA == STATIC_PLUGIN
drascula.dat FILE "dists/engine-data/drascula.dat"
#endif

View file

@ -53,7 +53,6 @@ Name: {group}\Copyright; Filename: {app}\COPYRIGHT.txt; WorkingDir: {app}; Comme
Name: {group}\News; Filename: {app}\NEWS.txt; WorkingDir: {app}; Comment: NEWS; Flags: createonlyiffileexists; Languages: not de
Name: {group}\Neues; Filename: {app}\Neues.txt; WorkingDir: {app}; Comment: Neues; Flags: createonlyiffileexists; Languages: de
;QUICKSTART
Name: {group}\QuickStart; Filename: {app}\QUICKSTART.txt; WorkingDir: {app}; Comment: QUICKSTART; Flags: createonlyiffileexists; Languages: not (de or es or fr or it or nb or se)
Name: {group}\Schnellstart; Filename: {app}\Schnellstart.txt; WorkingDir: {app}; Comment: Schnellstart; Flags: createonlyiffileexists; Languages: de
Name: {group}\InicioRapido; Filename: {app}\InicioRapido.txt; WorkingDir: {app}; Comment: InicioRapido; Flags: createonlyiffileexists; Languages: es
Name: {group}\DemarrageRapide; Filename: {app}\DemarrageRapide.txt; WorkingDir: {app}; Comment: DemarrageRapide; Flags: createonlyiffileexists; Languages: fr
@ -93,7 +92,6 @@ Source: COPYRIGHT.txt; DestDir: {app}; Flags: ignoreversion
Source: NEWS.txt; DestDir: {app}; Flags: ignoreversion; Languages: not de
Source: doc/de/Neues.txt; DestDir: {app}; Flags: ignoreversion; Languages: de
;QUICKSTART
Source: doc/QUICKSTART.txt; DestDir: {app}; Flags: ignoreversion isreadme; Languages: not (de or es or fr or it or nb or se)
Source: doc/de/Schnellstart.txt; DestDir: {app}; Flags: ignoreversion isreadme; Languages: de
Source: doc/es/InicioRapido.txt; DestDir: {app}; Flags: ignoreversion isreadme; Languages: es
Source: doc/fr/DemarrageRapide.txt; DestDir: {app}; Flags: ignoreversion isreadme; Languages: fr

View file

@ -8,6 +8,13 @@ Sie auf Englisch unter:
- Unterstützung für Sfinx hinzugefügt.
- Unterstützung für Zork Nemesis: The Forbidden Lands hinzugefügt.
- Unterstützung für Zork: Grand Inquisitor hinzugefügt.
- Unterstützung für The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel hinzugefügt.
- Unterstützung für The Lost Files of Sherlock Holmes: The Case of the Rose Tattoo hinzugefügt.
- Unterstützung für Beavis and Butthead in Virtual Stupidity hinzugefügt.
- Unterstützung für Amazon: Guardians of Eden hinzugefügt.
Neue Portierungen:
- Portierung auf den Raspberry Pi erfolgt.
Allgemein:
- Code für Munt-MT-32-Emulation auf Version 1.5.0 aktualisiert.

View file

@ -34,19 +34,24 @@ namespace Access {
AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc)
: _gameDescription(gameDesc), Engine(syst), _randomSource("Access"),
_useItem(_flags[99]), _startup(_flags[170]), _manScaleOff(_flags[172]) {
_aboutBox = nullptr;
_animation = nullptr;
_bubbleBox = nullptr;
_char = nullptr;
_debugger = nullptr;
_events = nullptr;
_files = nullptr;
_invBox = nullptr;
_inventory = nullptr;
_helpBox = nullptr;
_midi = nullptr;
_player = nullptr;
_res = nullptr;
_room = nullptr;
_screen = nullptr;
_scripts = nullptr;
_sound = nullptr;
_travelBox = nullptr;
_video = nullptr;
_destIn = nullptr;
@ -130,6 +135,7 @@ AccessEngine::~AccessEngine() {
delete _inventory;
delete _midi;
delete _player;
delete _res;
delete _room;
delete _screen;
delete _scripts;
@ -204,6 +210,13 @@ void AccessEngine::initialize() {
}
Common::Error AccessEngine::run() {
_res = Resources::init(this);
Common::String errorMessage;
if (!_res->load(errorMessage)) {
GUIErrorMessage(errorMessage);
return Common::kNoError;
}
setVGA();
initialize();

View file

@ -42,6 +42,7 @@
#include "access/font.h"
#include "access/inventory.h"
#include "access/player.h"
#include "access/resources.h"
#include "access/room.h"
#include "access/screen.h"
#include "access/scripts.h"
@ -147,6 +148,7 @@ public:
FileManager *_files;
InventoryManager *_inventory;
Player *_player;
Resources *_res;
Room *_room;
Screen *_screen;
Scripts *_scripts;

View file

@ -146,27 +146,24 @@ void AmazonEngine::playGame() {
}
void AmazonEngine::setupGame() {
Amazon::AmazonResources &res = *((Amazon::AmazonResources *)_res);
// Load death list
if (isDemo()) {
_deaths.resize(34);
for (int i = 0; i < 34; ++i) {
_deaths[i]._screenId = DEATH_SCREENS_DEMO[i];
_deaths[i]._msg = DEATH_TEXT_DEMO[i];
}
} else {
_deaths.resize(58);
for (int i = 0; i < 58; ++i) {
_deaths[i]._screenId = DEATH_SCREENS[i];
_deaths[i]._msg = DEATH_TEXT[i];
}
_deaths.resize(_res->DEATHS.size());
for (uint idx = 0; idx < _deaths.size(); ++idx) {
_deaths[idx]._screenId = res.DEATHS[idx]._screenId;
_deaths[idx]._msg = res.DEATHS[idx]._msg;
}
// Load the deaths cells
_deaths._cells.resize(13);
for (int i = 0; i < 13; ++i)
_deaths._cells[i] = CellIdent(DEATH_CELLS[i][0], DEATH_CELLS[i][1], DEATH_CELLS[i][2]);
// Miscellaneous
_fonts._font1.load(FONT6x6_INDEX, FONT6x6_DATA);
_fonts._font2.load(FONT2_INDEX, FONT2_DATA);
_fonts._font1.load(&res.FONT6x6_INDEX[0], &res.FONT6x6_DATA[0]);
_fonts._font2.load(&res.FONT2_INDEX[0], &res.FONT2_DATA[0]);
initVariables();
}
@ -195,8 +192,8 @@ void AmazonEngine::initVariables() {
_timers.push_back(te);
}
_player->_playerX = _player->_rawPlayer.x = _travelPos[_player->_roomNumber][0];
_player->_playerY = _player->_rawPlayer.y = _travelPos[_player->_roomNumber][1];
_player->_playerX = _player->_rawPlayer.x = _res->ROOMTBL[_player->_roomNumber]._travelPos.x;
_player->_playerY = _player->_rawPlayer.y = _res->ROOMTBL[_player->_roomNumber]._travelPos.y;
_room->_selectCommand = -1;
_events->setNormalCursor(CURSOR_CROSSHAIRS);
_mouseMode = 0;
@ -411,6 +408,7 @@ void AmazonEngine::calcIQ() {
}
void AmazonEngine::helpTitle() {
AmazonResources &res = *(AmazonResources *)_res;
int width = _fonts._font2.stringWidth(_bubbleBox->_bubbleTitle);
int posX = 160 - (width / 2);
_fonts._font2._fontColors[0] = 0;
@ -419,13 +417,13 @@ void AmazonEngine::helpTitle() {
_fonts._font2._fontColors[3] = 35;
_fonts._font2.drawString(_screen, _bubbleBox->_bubbleTitle, Common::Point(posX, 24));
width = _fonts._font2.stringWidth(HELPLVLTXT[_helpLevel]);
width = _fonts._font2.stringWidth(res.HELPLVLTXT[_helpLevel]);
posX = 160 - (width / 2);
_fonts._font2._fontColors[0] = 0;
_fonts._font2._fontColors[1] = 10;
_fonts._font2._fontColors[2] = 11;
_fonts._font2._fontColors[3] = 12;
_fonts._font2.drawString(_screen, HELPLVLTXT[_helpLevel], Common::Point(posX, 36));
_fonts._font2.drawString(_screen, res.HELPLVLTXT[_helpLevel], Common::Point(posX, 36));
Common::String iqText = "IQ: ";
calcIQ();
@ -441,7 +439,7 @@ void AmazonEngine::helpTitle() {
index /= 20;
iqText += " ";
iqText += IQLABELS[index];
iqText += res.IQLABELS[index];
width = _fonts._font2.stringWidth(iqText);
posX = 160 - (width / 2);
@ -642,6 +640,7 @@ void AmazonEngine::startChapter(int chapter) {
_room->init4Quads();
}
if (isCD()) {
if (chapter == 14) {
_conversation = 31;
_char->loadChar(_conversation);
@ -663,6 +662,7 @@ void AmazonEngine::startChapter(int chapter) {
_scripts->cmdRetPos();
}
}
}
void AmazonEngine::dead(int deathId) {

View file

@ -1598,7 +1598,7 @@ void River::moveCanoe() {
if (events._leftButton && pt.y >= 140) {
if (pt.x < _vm->_room->_rMouse[8][0]) {
// Disk icon wasn't clicked
_vm->_scripts->printString(BAR_MESSAGE);
_vm->_scripts->printString(AMRES.BAR_MESSAGE);
} else {
// Clicked on the Disc icon. Show the ScummVM menu
_vm->_room->handleCommand(9);

File diff suppressed because it is too large Load diff

View file

@ -24,6 +24,8 @@
#define ACCESS_AMAZON_RESOURCES_H
#include "common/scummsys.h"
#include "common/array.h"
#include "access/resources.h"
namespace Access {
@ -42,9 +44,6 @@ struct RiverStruct {
int _offsetY;
};
extern const char *const FILENAMES[];
extern const char *const FILENAMES_DEMO[];
extern const int SIDEOFFR[];
extern const int SIDEOFFL[];
extern const int SIDEOFFU[];
@ -58,8 +57,6 @@ extern const int DIAGOFFULY[];
extern const int DIAGOFFDLX[];
extern const int DIAGOFFDLY[];
extern const byte *const CURSORS[10];
extern const int _travelPos[][2];
extern const int OVEROFFR[];
@ -75,37 +72,6 @@ extern const int OVEROFFULY[];
extern const int OVEROFFDLX[];
extern const int OVEROFFDLY[];
extern const byte *const ROOM_TABLE[];
extern const char *const ROOM_DESCR[];
extern const byte *const ROOM_TABLE_DEMO[];
extern const int ROOM_NUMB;
extern const byte *const CHARTBL[];
extern const byte *const CHARTBL_DEMO[];
extern const char *const INVENTORY_NAMES[];
extern const int FONT2_INDEX[];
extern const byte FONT2_DATA[];
extern const int FONT6x6_INDEX[];
extern const byte FONT6x6_DATA[];
extern const char *const NO_HELP_MESSAGE;
extern const char *const NO_HINTS_MESSAGE;
extern const char *const RIVER_HIT1;
extern const char *const RIVER_HIT2;
extern const char *const BAR_MESSAGE;
extern const char *const HELPLVLTXT[3];
extern const char *const IQLABELS[9];
extern const byte DEATH_SCREENS[58];
extern const byte DEATH_SCREENS_DEMO[34];
extern const char *const DEATH_TEXT[58];
extern const char *const DEATH_TEXT_DEMO[34];
extern const int DEATH_CELLS[13][3];
extern const int CHAPTER_CELLS[17][3];
@ -155,6 +121,31 @@ extern const int CAST_END_OBJ1[4][4];
extern const int RMOUSE[10][2];
class AmazonResources: public Resources {
protected:
/**
* Load data from the access.dat file
*/
virtual void load(Common::SeekableReadStream &s);
public:
Common::Array<int> FONT2_INDEX;
Common::Array<byte> FONT2_DATA;
Common::Array<int> FONT6x6_INDEX;
Common::Array<byte> FONT6x6_DATA;
Common::String NO_HELP_MESSAGE;
Common::String NO_HINTS_MESSAGE;
Common::String RIVER_HIT1;
Common::String RIVER_HIT2;
Common::String BAR_MESSAGE;
Common::String HELPLVLTXT[3];
Common::String IQLABELS[9];
public:
AmazonResources(AccessEngine *vm) : Resources(vm) {}
virtual ~AmazonResources() {}
};
#define AMRES (*((Amazon::AmazonResources *)_vm->_res))
} // End of namespace Amazon
} // End of namespace Access

View file

@ -41,10 +41,7 @@ AmazonRoom::~AmazonRoom() {
}
void AmazonRoom::loadRoom(int roomNumber) {
if (_vm->isDemo())
loadRoomData(ROOM_TABLE_DEMO[roomNumber]);
else
loadRoomData(ROOM_TABLE[roomNumber]);
loadRoomData(&AMRES.ROOMTBL[roomNumber]._data[0]);
}
void AmazonRoom::reloadRoom() {

View file

@ -401,10 +401,10 @@ void AmazonScripts::cmdHelp_v2() {
_game->_useItem = 0;
if (_game->_noHints) {
printString(NO_HELP_MESSAGE);
printString(AMRES.NO_HELP_MESSAGE);
return;
} else if (_game->_hintLevel == 0) {
printString(NO_HINTS_MESSAGE);
printString(AMRES.NO_HINTS_MESSAGE);
return;
}
}
@ -473,12 +473,29 @@ void AmazonScripts::cmdCycleBack() {
if (_vm->_startup == -1)
_vm->_screen->cyclePaletteBackwards();
}
void AmazonScripts::cmdChapter() {
Resource *activeScript = nullptr;
if (_vm->isDemo()) {
cmdSetHelp();
} else {
int chapter = _data->readByte();
if (!_vm->isCD()) {
// For floppy version, the current script remains active even
// after the end of the chapter start, so we need to save it
activeScript = _resource;
_resource = nullptr;
_data = nullptr;
}
_game->startChapter(chapter);
if (!_vm->isCD()) {
assert(!_resource);
setScript(activeScript, false);
}
}
}

View file

@ -53,6 +53,13 @@ Animation::Animation(AccessEngine *vm, Common::SeekableReadStream *stream) : Man
uint32 startOfs = stream->pos();
_type = stream->readByte();
// WORKAROUND: In Amazon floppy English, there's an animation associated with
// the librarian that isn't used, and has junk data. Luckily, it's animation
// type is also invalid, so if the _type isn't in range, exit immediately
if (_type < 0 || _type > 7)
return;
_scaling = stream->readSByte();
stream->readByte(); // unk
_frameNumber = stream->readByte();

View file

@ -28,6 +28,8 @@
namespace Access {
const int TRANSPARENCY = 0;
SpriteResource::SpriteResource(AccessEngine *vm, Resource *res) {
Common::Array<uint32> offsets;
int count = res->_stream->readUint16LE();
@ -64,7 +66,7 @@ SpriteFrame::SpriteFrame(AccessEngine *vm, Common::SeekableReadStream *stream, i
// Empty surface
byte *data = (byte *)getPixels();
Common::fill(data, data + w * h, 0);
Common::fill(data, data + w * h, TRANSPARENCY);
// Decode the data
for (int y = 0; y < h; ++y) {
@ -202,7 +204,7 @@ void ASurface::transBlitFrom(ASurface *src, const Common::Point &destPos) {
byte *destP = (byte *)getBasePtr(destPos.x, destPos.y + yp);
for (int xp = 0; xp < this->w; ++xp, ++srcP, ++destP) {
if (*srcP != 0)
if (*srcP != TRANSPARENCY)
*destP = *srcP;
}
}
@ -294,6 +296,13 @@ void ASurface::copyBlock(ASurface *src, const Common::Rect &bounds) {
copyRectToSurface(*src, bounds.left, bounds.top, bounds);
}
void ASurface::copyTo(ASurface *dest) {
if (dest->empty())
dest->create(this->w, this->h);
dest->blitFrom(*this);
}
void ASurface::saveBlock(const Common::Rect &bounds) {
_savedBounds = bounds;
_savedBounds.clip(Common::Rect(0, 0, this->w, this->h));

View file

@ -63,6 +63,8 @@ public:
void create(uint16 width, uint16 height);
bool empty() const { return w == 0 || h == 0 || pixels == nullptr; }
void clearBuffer();
bool clip(Common::Rect &r);
@ -113,7 +115,7 @@ public:
virtual void addDirtyRect(const Common::Rect &r) {}
void copyTo(ASurface *dest) { dest->blitFrom(*this); }
void copyTo(ASurface *dest);
void saveBlock(const Common::Rect &bounds);

View file

@ -95,8 +95,9 @@ void BubbleBox::placeBubble1(const Common::String &msg) {
void BubbleBox::calcBubble(const Common::String &msg) {
// Save points
Common::Point printOrg = _vm->_screen->_printOrg;
Common::Point printStart = _vm->_screen->_printStart;
Screen &screen = *_vm->_screen;
Common::Point printOrg = screen._printOrg;
Common::Point printStart = screen._printStart;
// Figure out maximum width allowed
if (_type == kBoxTypeFileDialog) {
@ -114,15 +115,15 @@ void BubbleBox::calcBubble(const Common::String &msg) {
int width = 0;
bool lastLine;
do {
lastLine = _vm->_fonts._font2.getLine(s, _vm->_screen->_maxChars * 6, line, width);
lastLine = _vm->_fonts._font2.getLine(s, screen._maxChars * 6, line, width);
_vm->_fonts._printMaxX = MAX(width, _vm->_fonts._printMaxX);
_vm->_screen->_printOrg.y += 6;
_vm->_screen->_printOrg.x = _vm->_screen->_printStart.x;
screen._printOrg.y += 6;
screen._printOrg.x = screen._printStart.x;
} while (!lastLine);
if (_type == kBoxTypeFileDialog)
++_vm->_screen->_printOrg.y += 6;
++screen._printOrg.y += 6;
// Determine the width for the area
width = (((_vm->_fonts._printMaxX >> 4) + 1) << 4) + 5;
@ -131,7 +132,7 @@ void BubbleBox::calcBubble(const Common::String &msg) {
bounds.setWidth(width);
// Determine the height for area
int y = _vm->_screen->_printOrg.y + 6;
int y = screen._printOrg.y + 6;
if (_type == kBoxTypeFileDialog)
y += 6;
int height = y - bounds.top;
@ -141,6 +142,9 @@ void BubbleBox::calcBubble(const Common::String &msg) {
if (height >= 0)
bounds.setHeight(bounds.height() + 13 - (height % 13));
if (bounds.bottom > screen.h)
bounds.translate(0, screen.h - bounds.bottom);
// Add the new bounds to the bubbles list
_bubbles.push_back(bounds);

View file

@ -31,7 +31,7 @@ CharEntry::CharEntry(const byte *data, AccessEngine *vm) {
Common::MemoryReadStream s(data, 999);
_charFlag = s.readByte();
if (vm->getGameID() == GType_MartianMemorandum) {
if (vm->getGameID() != GType_Amazon || !vm->isCD()) {
_screenFile.load(s);
_estabIndex = s.readSint16LE();
} else {
@ -78,25 +78,12 @@ CharEntry::CharEntry() {
/*------------------------------------------------------------------------*/
CharManager::CharManager(AccessEngine *vm) : Manager(vm) {
switch (vm->getGameID()) {
case GType_Amazon:
// Setup character list
if (_vm->isDemo()) {
for (int i = 0; i < 27; ++i)
_charTable.push_back(CharEntry(Amazon::CHARTBL_DEMO[i], vm));
} else {
for (int i = 0; i < 37; ++i)
_charTable.push_back(CharEntry(Amazon::CHARTBL[i], vm));
}
break;
case GType_MartianMemorandum:
for (int i = 0; i < 27; ++i)
_charTable.push_back(CharEntry(Martian::CHARTBL_MM[i], vm));
break;
default:
error("Unknown game");
for (uint idx = 0; idx < _vm->_res->CHARTBL.size(); ++idx) {
if (_vm->_res->CHARTBL[idx].size() == 0)
_charTable.push_back(CharEntry());
else
_charTable.push_back(CharEntry(&_vm->_res->CHARTBL[idx][0], _vm));
}
_charFlag = 0;
@ -177,6 +164,10 @@ void CharManager::charMenu() {
} else
error("Game not supported");
// Make a backup copy of the screen including the character buttons,
// for restoring when erasing conversation boxes
screen.copyTo(&_vm->_buffer1);
screen.restoreScreen();
delete spr;
}

View file

@ -69,29 +69,9 @@ Debugger::Debugger(AccessEngine *vm) : GUI::Debugger(), _vm(vm) {
registerCmd("scene", WRAP_METHOD(Debugger, Cmd_LoadScene));
registerCmd("cheat", WRAP_METHOD(Debugger, Cmd_Cheat));
registerCmd("playmovie", WRAP_METHOD(Debugger, Cmd_PlayMovie));
switch (vm->getGameID()) {
case GType_Amazon:
_sceneNumb = Amazon::ROOM_NUMB;
_sceneDescr = new Common::String[_sceneNumb];
for (int i = 0; i < _sceneNumb; i++)
_sceneDescr[i] = Common::String(Amazon::ROOM_DESCR[i]);
break;
case GType_MartianMemorandum:
_sceneNumb = Martian::ROOM_NUMB;
_sceneDescr = new Common::String[_sceneNumb];
for (int i = 0; i < _sceneNumb; i++)
_sceneDescr[i] = Common::String(Martian::ROOM_DESCR[i]);
break;
default:
_sceneDescr = nullptr;
_sceneNumb = 0;
break;
}
}
Debugger::~Debugger() {
delete[] _sceneDescr;
}
bool Debugger::Cmd_LoadScene(int argc, const char **argv) {
@ -99,18 +79,18 @@ bool Debugger::Cmd_LoadScene(int argc, const char **argv) {
case 1:
debugPrintf("Current scene is: %d\n\n", _vm->_player->_roomNumber);
for (int i = 0; i < _sceneNumb; i++)
if (_sceneDescr[i].size())
debugPrintf("%d - %s\n", i, _sceneDescr[i].c_str());
for (uint i = 0; i < _vm->_res->ROOMTBL.size(); i++)
if (!_vm->_res->ROOMTBL[i]._desc.empty())
debugPrintf("%d - %s\n", i, _vm->_res->ROOMTBL[i]._desc.c_str());
return true;
case 2: {
int newRoom = strToInt(argv[1]);
if (newRoom < 0 || newRoom >= _sceneNumb) {
if (newRoom < 0 || newRoom >= (int)_vm->_res->ROOMTBL.size()) {
debugPrintf("Invalid Room Number\n");
return true;
}
if (!_sceneDescr[newRoom].size()) {
if (_vm->_res->ROOMTBL[newRoom]._desc.empty()) {
debugPrintf("Unused Room Number\n");
return true;
}

View file

@ -40,8 +40,6 @@ protected:
bool Cmd_LoadScene(int argc, const char **argv);
bool Cmd_Cheat(int argc, const char **argv);
bool Cmd_PlayMovie(int argc, const char **argv);
Common::String *_sceneDescr;
int _sceneNumb;
public:
static Debugger *init(AccessEngine *vm);
void postEnter();

View file

@ -74,7 +74,7 @@ void EventsManager::setCursor(CursorType cursorId) {
_invCursor.w / 2, _invCursor.h / 2, 0);
} else {
// Get a pointer to the mouse data to use, and get the cursor hotspot
const byte *srcP = Amazon::CURSORS[cursorId];
const byte *srcP = &_vm->_res->CURSORS[cursorId][0];
int hotspotX = (int16)READ_LE_UINT16(srcP);
int hotspotY = (int16)READ_LE_UINT16(srcP + 2);
srcP += 4;

View file

@ -84,20 +84,6 @@ byte *Resource::data() {
/*------------------------------------------------------------------------*/
FileManager::FileManager(AccessEngine *vm) : _vm(vm) {
switch (vm->getGameID()) {
case GType_Amazon:
if (_vm->isDemo())
_filenames = &Amazon::FILENAMES_DEMO[0];
else
_filenames = &Amazon::FILENAMES[0];
break;
case GType_MartianMemorandum:
_filenames = &Martian::FILENAMES[0];
break;
default:
error("Unknown game");
}
_fileNumber = -1;
_setPaletteFlag = true;
}
@ -215,8 +201,8 @@ void FileManager::handleFile(Resource *res) {
void FileManager::setAppended(Resource *res, int fileNum) {
// Open the file for access
if (!res->_file.open(_filenames[fileNum]))
error("Could not open file %s", _filenames[fileNum]);
if (!res->_file.open(_vm->_res->FILENAMES[fileNum]))
error("Could not open file %s", _vm->_res->FILENAMES[fileNum].c_str());
// If a different file has been opened then previously, load its index
if (_fileNumber != fileNum) {

View file

@ -70,7 +70,6 @@ public:
class FileManager {
private:
AccessEngine *_vm;
const char * const *_filenames;
void openFile(Resource *res, const Common::String &filename);

View file

@ -66,27 +66,9 @@ InventoryManager::InventoryManager(AccessEngine *vm) : Manager(vm) {
_iconDisplayFlag = true;
_boxNum = 0;
const char *const *names;
const int *combineP;
switch (vm->getGameID()) {
case GType_Amazon:
names = Amazon::INVENTORY_NAMES;
combineP = &Amazon::COMBO_TABLE[0][0];
_inv.resize(85);
for (uint i = 0; i < _inv.size(); ++i, combineP += 4)
_inv[i].load(names[i], combineP);
break;
case GType_MartianMemorandum:
names = Martian::INVENTORY_NAMES;
combineP = nullptr;
_inv.resize(55);
for (uint i = 0; i < _inv.size(); ++i)
_inv[i].load(names[i], nullptr);
break;
default:
error("Unknown game");
}
_inv.resize(_vm->_res->INVENTORY.size());
for (uint idx = 0; idx < _inv.size(); ++idx)
_inv[idx].load(_vm->_res->INVENTORY[idx]._desc, _vm->_res->INVENTORY[idx]._combo);
for (uint i = 0; i < 26; ++i) {
const int *r = INVCOORDS[i];
@ -138,6 +120,7 @@ int InventoryManager::newDisplayInv() {
getList();
initFields();
files._setPaletteFlag = false;
files.loadScreen(&_vm->_buffer1, 99, 0);
_vm->_buffer1.copyTo(&_vm->_buffer2);
_vm->copyBF2Vid();
@ -200,7 +183,6 @@ int InventoryManager::newDisplayInv() {
_invModeFlag = false;
events.debounceLeft();
_vm->_timers.restoreTimers();
_vm->_startup = 1;
int result = 0;
if (!_invRefreshFlag) {
@ -217,12 +199,15 @@ int InventoryManager::newDisplayInv() {
}
int InventoryManager::displayInv() {
int *inv = (int *) malloc (Martian::INVENTORY_SIZE * sizeof(int));
int *inv = (int *) malloc(_vm->_res->INVENTORY.size() * sizeof(int));
const char **names = (const char **)malloc(_vm->_res->INVENTORY.size() * sizeof(const char *));
for (int i = 0; i < Martian::INVENTORY_SIZE; i++)
for (uint i = 0; i < _vm->_res->INVENTORY.size(); i++) {
inv[i] = _inv[i]._value;
names[i] = _inv[i]._name.c_str();
}
_vm->_events->forceSetCursor(CURSOR_CROSSHAIRS);
_vm->_invBox->getList(Martian::INVENTORY_NAMES, inv);
_vm->_invBox->getList(names, inv);
int btnSelected = 0;
int boxX = _vm->_invBox->doBox_v1(_startInvItem, _startInvBox, btnSelected);

View file

@ -68,8 +68,8 @@ void MartianEngine::initVariables() {
_timers.push_back(te);
}
_player->_playerX = _player->_rawPlayer.x = _travelPos[_player->_roomNumber][0];
_player->_playerY = _player->_rawPlayer.y = _travelPos[_player->_roomNumber][1];
_player->_playerX = _player->_rawPlayer.x = _res->ROOMTBL[_player->_roomNumber]._travelPos.x;
_player->_playerY = _player->_rawPlayer.y = _res->ROOMTBL[_player->_roomNumber]._travelPos.y;
_room->_selectCommand = -1;
_events->setNormalCursor(CURSOR_CROSSHAIRS);
_mouseMode = 0;
@ -280,10 +280,10 @@ void MartianEngine::doCredits() {
void MartianEngine::setupGame() {
// Load death list
_deaths.resize(20);
for (int i = 0; i < 20; ++i) {
_deaths[i]._screenId = Martian::DEATH_SCREENS[i];
_deaths[i]._msg = Martian::DEATHMESSAGE[i];
_deaths.resize(_res->DEATHS.size());
for (uint idx = 0; idx < _deaths.size(); ++idx) {
_deaths[idx]._screenId = _res->DEATHS[idx]._screenId;
_deaths[idx]._msg = _res->DEATHS[idx]._msg;
}
// Setup timers
@ -297,14 +297,14 @@ void MartianEngine::setupGame() {
}
// Miscellaneous
// TODO: Replace with Martian fonts when located
_fonts._font1.load(Amazon::FONT6x6_INDEX, Amazon::FONT6x6_DATA);
_fonts._font2.load(Amazon::FONT2_INDEX, Amazon::FONT2_DATA);
Amazon::AmazonResources &res = *((Amazon::AmazonResources *)_res);
_fonts._font1.load(&res.FONT6x6_INDEX[0], &res.FONT6x6_DATA[0]);
_fonts._font2.load(&res.FONT2_INDEX[0], &res.FONT2_DATA[0]);
// Set player room and position
_player->_roomNumber = 7;
_player->_playerX = _player->_rawPlayer.x = _travelPos[_player->_roomNumber][0];
_player->_playerY = _player->_rawPlayer.y = _travelPos[_player->_roomNumber][1];
_player->_playerX = _player->_rawPlayer.x = _res->ROOMTBL[_player->_roomNumber]._travelPos.x;
_player->_playerY = _player->_rawPlayer.y = _res->ROOMTBL[_player->_roomNumber]._travelPos.y;
}
void MartianEngine::showDeathText(Common::String msg) {

View file

@ -27,691 +27,6 @@ namespace Access {
namespace Martian {
const char *const FILENAMES[] = {
"R00.AP", "R01.AP", "R02.AP", "R03.AP", "R04.AP", "R05.AP", "R06.AP", "R07.AP",
"R08.AP", "R09.AP", "R10.AP", "R11.AP", "R12.AP", "R13.AP", "R14.AP", "R15.AP",
"R16.AP", "R17.AP", "R18.AP", "R19.AP", "R20.AP", "R21.AP", "R22.AP", "R23.AP",
"R24.AP", "R25.AP", "R26.AP", "R27.AP", "R28.AP", "R29.AP", "R30.AP", "R31.AP",
"R32.AP", "R33.AP", "R34.AP", "R35.AP", "R36.AP", "R37.AP", "R38.AP", "R39.AP",
"R40.AP","TITLE.AP","R42.AP","S01.AP", "R44.AP", "R45.AP","SOUND.AP","MUSIC.AP",
"DEAD.AP","EST.AP", "W02.AP", "C02.AP", "C05.AP", "C04.AP", "C10.AP", "C03.AP",
"C07.AP", "LOVE.AP","CAFE.AP","C08.AP", "C18.AP", "C19.AP", "C21.AP", "C23.AP",
"C12.AP", "C16.AP","CAFE1.AP","C05A.AP","C06.AP","C11.AP", "C13.AP", "C20.AP",
"C16A.AP","C09.AP", "R45.AP", "R46.AP", "R47.AP", "R48.AP", "R49.AP"
};
const byte MOUSE0[] = {
// hotspot x and y, uint16 LE
0, 0, 0, 0,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0, 2, 0xF7, 5,
0, 3, 0xF7, 0xF7, 5,
0, 3, 0xF7, 0xF7, 5,
0, 4, 0xF7, 0xF7, 0xF7, 5,
0, 4, 0xF7, 0xF7, 0xF7, 5,
0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5,
2, 3, 0xF7, 0xF7, 5,
3, 3, 0xF7, 0xF7, 5,
3, 3, 0xF7, 0xF7, 5,
4, 2, 0xF7, 5
};
const byte MOUSE1[] = {
// hotspot x and y, uint16 LE
7, 0, 7, 0,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
6, 1, 0xF7,
4, 5, 0xFF, 0xFF, 0, 0xFF, 0xFF,
3, 7, 0xFF, 0, 0, 0, 0, 0, 0xFF,
2, 9, 0xFF, 0, 0, 0, 0xF7, 0, 0, 0, 0xFF,
1, 11, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF,
1, 11, 0xFF, 0, 0, 0, 0, 0xF7, 0, 0, 0, 0, 0xFF,
0, 13, 0xF7, 0, 0, 0xF7, 0, 0xF7, 0, 0xF7, 0, 0xF7, 0, 0, 0xF7,
1, 11, 0xFF, 0, 0, 0, 0, 0xF7, 0, 0, 0, 0, 0xFF,
1, 11, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF,
2, 9, 0xFF, 0, 0, 0, 0xF7, 0, 0, 0, 0xFF,
3, 7, 0xFF, 0, 0, 0, 0, 0, 0xFF,
4, 5, 0xFF, 0xFF, 0, 0xFF, 0xFF,
6, 1, 0xF7,
0, 0,
0, 0,
0, 0
};
const byte MOUSE2[] = {
// hotspot x and y, uint16 LE
8, 0, 8, 0,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0, 0,
0, 0,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
2, 12, 4, 4, 4, 4, 4, 0, 4, 4, 4, 4, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
7, 2, 4, 5,
0, 0,
0, 0,
0, 0
};
const byte MOUSE3[] = {
// hotspot x and y, uint16 LE
0, 0, 0, 0,
// byte 1: number of skipped pixels
// byte 2: number of plotted pixels
// then, pixels
0, 11, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
0, 12, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 5,
0, 12, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 5, 5,
0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 5, 0, 0, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5,
0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
1, 11, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
0, 0,
0, 0,
0, 0
};
const byte *const CURSORS[4] = { MOUSE0, MOUSE1, MOUSE2, MOUSE3 };
const int _travelPos[][2] = {
{ -1, 0 },
{ 228, 117 },
{ 28, 98 },
{ 161, 140 },
{ 160, 116 },
{ 34, 119 },
{ 166, 105 },
{ 260, 126 },
{ 37, 107 },
{ 78, 139 },
{ 0, 0 },
{ 13, 112 },
{ 0, 0 },
{ 16, 122 },
{ 33, 126 },
{ 10, 160 },
{ 150, 102 },
{ 134, 160 },
{ 160, 76 },
{ 0, 0 },
{ 0, 0 },
{ 36, 116 },
{ 214, 113 },
{ 30, 127 },
{ 143, 131 },
{ 163, 103 },
{ 254, 106 },
{ 28, 161 },
{ 11, 164 },
{ 276, 134 },
{ 93, 118 },
{ 22, 150 },
{ 282, 156 },
{ 149, 92 },
{ 0, 0 },
{ 43, 410 },
{ 0, 0 },
{ 10, 136 },
{ 41, 100 },
{ 157, 97 },
{ -1, 5 },
{ -1, 4 },
{ -1, 10 },
{ -1, 7 },
{ -1, 3 },
{ -1, 8 },
{ -1, 6 },
{ -1, 20 },
{ -1, 18 },
{ -1, 19 },
{ -1, 21 }
};
const int INVENTORY_SIZE = 55;
const char *const INVENTORY_NAMES[] = {
"CAMERA", "LENS", "PHOTOS", "MAIL", "GUN",
"CASH", "COMLINK", "AMMO", "LOCKPICK KIT", "EARRING",
"RECIEPTS", "PAPER", "LADDER", "BOOTS", "DOCUMENTS",
"KNIFE", "DAGGER", "KEYS", "ROCK", "LOG",
"SHOVEL", "STONE", "REMOTE CONTROL", "FOOD AND WATER", "DOOR CARD KEY",
"FLASHLIGHT", "INTERLOCK KEY", "TOOLS", "REBREATHER", "JET PACK",
"ROD", "HCL2", "SAFE CARD KEY", "TUNING FORK", "STONE",
"ROSE", "KEY", "NOTE", "ALLEN WRENCH", "HOVER BOARD",
"BLUE PRINTS", "LETTER", "MEMORANDUM", "MARKERS", "FILM",
"ANDRETTI FILM", "GLASSES", "AMULET", "FACIAL KIT", "CAT FOOD",
"MONKEY WRENCH", "BIG DICK CARD", "BRA", "BOLT", nullptr
};
const byte ROOM_TABLE1[] = {
0x00, 0x2f, 0x00, 0x0d, 0x00, 0x30, 0x22, 0x30, 0x01, 0x00,
0x00, 0x00, 0x01, 0x01, 0x00, 0x03, 0x00, 0xff, 0x01, 0x00,
0x02, 0x00, 0x01, 0x00, 0x01, 0x00, 0xc0, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE2[] = {
0x00, 0x2f, 0x00, 0x0d, 0x00, 0x32, 0x28, 0x25, 0x02, 0x00,
0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0x00, 0xff, 0x02, 0x00,
0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0xc8, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x06, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE3[] = {
0x00, 0x2f, 0x00, 0x0f, 0x00, 0x1e, 0x19, 0x24, 0x03, 0x00,
0x00, 0x00, 0x03, 0x03, 0x00, 0x03, 0x00, 0xff, 0x03, 0x00,
0x02, 0x00, 0x03, 0x00, 0x01, 0x00, 0x78, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x02, 0x00,
0x03, 0x00, 0x04, 0x00, 0x01, 0x00, 0x03, 0x00, 0x05, 0x00,
0x01, 0x00, 0x03, 0x00, 0x06, 0x00, 0x01, 0x00, 0x2e, 0x00,
0x01, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE4[] = {
0x00, 0x2f, 0x00, 0x06, 0x00, 0x36, 0x27, 0x32, 0x04, 0x00,
0x00, 0x00, 0x04, 0x04, 0x00, 0x03, 0x00, 0xff, 0x04, 0x00,
0x02, 0x00, 0x04, 0x00, 0x01, 0x00, 0xc8, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x07, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x05, 0x00,
0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE5[] = {
0x00, 0x2f, 0x00, 0x00, 0x00, 0x28, 0x19, 0x36, 0x05, 0x00,
0x00, 0x00, 0x05, 0x05, 0x00, 0x03, 0x00, 0xff, 0x05, 0x00,
0x02, 0x00, 0x05, 0x00, 0x01, 0x00, 0xa0, 0x20, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x02, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x03, 0x00,
0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE6[] = {
0x00, 0x2f, 0x00, 0x07, 0x00, 0x40, 0x36, 0x36, 0x06, 0x00,
0x00, 0x00, 0x06, 0x06, 0x00, 0x03, 0x00, 0xff, 0x06, 0x00,
0x02, 0x00, 0x06, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x13, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x08, 0x00,
0x01, 0x00, 0x2e, 0x00, 0x14, 0x00, 0x01, 0x00, 0x2e, 0x00,
0x07, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE7[] = {
0x00, 0x2f, 0x00, 0x0e, 0x00, 0x40, 0x32, 0x3b, 0x07, 0x00,
0x00, 0x00, 0x07, 0x07, 0x00, 0x03, 0x00, 0xff, 0x07, 0x00,
0x02, 0x00, 0x07, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x14, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00,
0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE8[] = {
0x00, 0x2f, 0x00, 0x0a, 0x00, 0x30, 0x22, 0x46, 0x08, 0x00,
0x00, 0x00, 0x08, 0x08, 0x00, 0x03, 0x00, 0xff, 0x08, 0x00,
0x02, 0x00, 0x08, 0x00, 0x01, 0x00, 0xc0, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0xff, 0xff,
};
const byte ROOM_TABLE9[] = {
0x00, 0x2f, 0x00, 0x07, 0x00, 0x32, 0x0c, 0x29, 0x09, 0x00,
0x00, 0x00, 0x09, 0x09, 0x00, 0x03, 0x00, 0xff, 0x09, 0x00,
0x02, 0x00, 0x09, 0x00, 0x01, 0x00, 0xc8, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0xff, 0xff,
};
const byte ROOM_TABLE11[] = {
0x00, 0x2f, 0x00, 0x00, 0x00, 0x40, 0x3a, 0x22, 0x0b, 0x00,
0x00, 0x00, 0x0b, 0x0b, 0x00, 0x03, 0x00, 0xff, 0x0b, 0x00,
0x02, 0x00, 0x0b, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0xff, 0xff,
};
const byte ROOM_TABLE13[] = {
0x00, 0x2f, 0x00, 0x0c, 0x00, 0x40, 0x36, 0x2c, 0x0d, 0x00,
0x00, 0x00, 0x0d, 0x0d, 0x00, 0x03, 0x00, 0xff, 0x0d, 0x00,
0x02, 0x00, 0x0d, 0x00, 0x01, 0x00, 0xe6, 0x40, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00,
0x01, 0x00, 0x2e, 0x00, 0x0b, 0x00, 0x01, 0x00, 0x2e, 0x00,
0x15, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE14[] = {
0x00, 0x2f, 0x00, 0x05, 0x00, 0x40, 0x3e, 0x33, 0x0e, 0x00,
0x00, 0x00, 0x0e, 0x0e, 0x00, 0x03, 0x00, 0xff, 0x0e, 0x00,
0x02, 0x00, 0x0e, 0x00, 0x01, 0x00, 0xfe, 0x40, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x09, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00,
0x01, 0x00, 0x2e, 0x00, 0x13, 0x00, 0x01, 0x00, 0x2e, 0x00,
0x0a, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE15[] = {
0x00, 0x2f, 0x00, 0x0c, 0x00, 0x28, 0x0c, 0x5e, 0x0f, 0x00,
0x00, 0x00, 0x0f, 0x0f, 0x00, 0x03, 0x00, 0xff, 0x0f, 0x00,
0x02, 0x00, 0x0f, 0x00, 0x01, 0x00, 0xb4, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x11, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE16[] = {
0x00, 0x2f, 0x00, 0x05, 0x00, 0x28, 0x1e, 0x24, 0x10, 0x00,
0x00, 0x00, 0x10, 0x10, 0x00, 0x03, 0x00, 0xff, 0x10, 0x00,
0x02, 0x00, 0x10, 0x00, 0x01, 0x00, 0xa0, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x07, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE17[] = {
0x00, 0x2f, 0x00, 0x06, 0x00, 0x28, 0x19, 0x2b, 0x11, 0x00,
0x00, 0x00, 0x11, 0x11, 0x00, 0x03, 0x00, 0xff, 0x11, 0x00,
0x02, 0x00, 0x11, 0x00, 0x01, 0x00, 0xa0, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE18[] = {
0x00, 0x2f, 0x00, 0x00, 0x00, 0x2d, 0x14, 0x3c, 0x12, 0x00,
0x00, 0x00, 0x12, 0x12, 0x00, 0x03, 0x00, 0xff, 0x12, 0x00,
0x02, 0x00, 0x12, 0x00, 0x01, 0x00, 0xb1, 0x40, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE21[] = {
0x00, 0x2f, 0x00, 0x07, 0x00, 0x3c, 0x2a, 0x29, 0x15, 0x00,
0x00, 0x00, 0x15, 0x15, 0x00, 0x03, 0x00, 0xff, 0x15, 0x00,
0x02, 0x00, 0x15, 0x00, 0x01, 0x00, 0xf0, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x12, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00,
0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE22[] = {
0x00, 0x2f, 0x00, 0x0a, 0x00, 0x40, 0x2d, 0x27, 0x16, 0x00,
0x00, 0x00, 0x16, 0x16, 0x00, 0x03, 0x00, 0xff, 0x16, 0x00,
0x02, 0x00, 0x16, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x16, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00,
0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE23[] = {
0x00, 0x2f, 0x00, 0x0a, 0x00, 0x40, 0x38, 0x24, 0x17, 0x00,
0x00, 0x00, 0x17, 0x17, 0x00, 0x03, 0x00, 0xff, 0x17, 0x00,
0x02, 0x00, 0x17, 0x00, 0x01, 0x00, 0xfe, 0x40, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x0f, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x17, 0x00,
0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE24[] = {
0x00, 0x2f, 0x00, 0x06, 0x00, 0x3e, 0x10, 0x62, 0x18, 0x00,
0x00, 0x00, 0x18, 0x18, 0x00, 0x03, 0x00, 0xff, 0x18, 0x00,
0x02, 0x00, 0x18, 0x00, 0x01, 0x00, 0xf8, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x16, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE25[] = {
0x00, 0x2f, 0x00, 0x0e, 0x00, 0x3e, 0x37, 0x19, 0x19, 0x00,
0x00, 0x00, 0x19, 0x19, 0x00, 0x03, 0x00, 0xff, 0x19, 0x00,
0x02, 0x00, 0x19, 0x00, 0x01, 0x00, 0xf8, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x10, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00,
0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE26[] = {
0x00, 0x2f, 0x00, 0x06, 0x00, 0x34, 0x28, 0x28, 0x1a, 0x00,
0x00, 0x00, 0x1a, 0x1a, 0x00, 0x03, 0x00, 0xff, 0x1a, 0x00,
0x02, 0x00, 0x1a, 0x00, 0x01, 0x00, 0xd0, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x07, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE27[] = {
0x00, 0x2f, 0x00, 0x0f, 0x00, 0x1b, 0x16, 0x18, 0x1b, 0x00,
0x00, 0x00, 0x1b, 0x1b, 0x00, 0x03, 0x00, 0xff, 0x1b, 0x00,
0x02, 0x00, 0x1b, 0x00, 0x01, 0x00, 0x70, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x0d, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00,
0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE28[] = {
0x00, 0x2f, 0x00, 0x09, 0x00, 0x25, 0x10, 0x43, 0x1c, 0x00,
0x00, 0x00, 0x1c, 0x1c, 0x00, 0x03, 0x00, 0xff, 0x1c, 0x00,
0x02, 0x00, 0x1c, 0x00, 0x01, 0x00, 0x94, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0xff, 0xff,
};
const byte ROOM_TABLE29[] = {
0x00, 0x2f, 0x00, 0x0a, 0x00, 0x20, 0x18, 0x56, 0x1d, 0x00,
0x00, 0x00, 0x1d, 0x1d, 0x00, 0x03, 0x00, 0xff, 0x1d, 0x00,
0x02, 0x00, 0x1d, 0x00, 0x01, 0x00, 0x80, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x17, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x10, 0x00,
0x02, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE30[] = {
0x00, 0x2f, 0x00, 0x07, 0x00, 0x3f, 0x1c, 0x27, 0x1e, 0x00,
0x00, 0x00, 0x1e, 0x1e, 0x00, 0x03, 0x00, 0xff, 0x1e, 0x00,
0x02, 0x00, 0x1e, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff,
0xff, 0xff, 0x1e, 0x00, 0x04, 0x00, 0xff, 0xff, 0x2e, 0x00,
0x00, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x15, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE31[] = {
0x00, 0x2f, 0x00, 0x0d, 0x00, 0x32, 0x2e, 0x69, 0x1f, 0x00,
0x00, 0x00, 0x1f, 0x1f, 0x00, 0x03, 0x00, 0xff, 0x1f, 0x00,
0x02, 0x00, 0x1f, 0x00, 0x01, 0x00, 0xc8, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0xff, 0xff,
};
const byte ROOM_TABLE32[] = {
0x00, 0x2f, 0x00, 0x07, 0x00, 0x40, 0x3b, 0x4b, 0x20, 0x00,
0x00, 0x00, 0x20, 0x20, 0x00, 0x03, 0x00, 0xff, 0x20, 0x00,
0x02, 0x00, 0x20, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE33[] = {
0x00, 0x2f, 0x00, 0x0b, 0x00, 0x30, 0x10, 0x51, 0x21, 0x00,
0x00, 0x00, 0x21, 0x21, 0x00, 0x03, 0x00, 0xff, 0x21, 0x00,
0x02, 0x00, 0x21, 0x00, 0x01, 0x00, 0xc0, 0x40, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0xff, 0xff,
};
const byte ROOM_TABLE35[] = {
0x00, 0x2f, 0x00, 0x0f, 0x00, 0x1e, 0x18, 0x25, 0x23, 0x00,
0x00, 0x00, 0x23, 0x23, 0x00, 0x03, 0x00, 0xff, 0x23, 0x00,
0x02, 0x00, 0x23, 0x00, 0x01, 0x00, 0x78, 0x18, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00,
0x01, 0x00, 0x2e, 0x00, 0x16, 0x00, 0x01, 0x00, 0x2e, 0x00,
0x0c, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE37[] = {
0x00, 0x2f, 0x00, 0x0f, 0x00, 0x3f, 0x3a, 0x1a, 0x25, 0x00,
0x00, 0x00, 0x25, 0x25, 0x00, 0x03, 0x00, 0xff, 0x25, 0x00,
0x02, 0x00, 0x25, 0x00, 0x01, 0x00, 0xfe, 0x40, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x0d, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE38[] = {
0x00, 0x2f, 0x00, 0x0d, 0x00, 0x40, 0x32, 0x32, 0x26, 0x00,
0x00, 0x00, 0x26, 0x26, 0x00, 0x03, 0x00, 0xff, 0x26, 0x00,
0x02, 0x00, 0x26, 0x00, 0x01, 0x00, 0xf0, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x0b, 0x00, 0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE39[] = {
0x00, 0x2f, 0x00, 0x0a, 0x00, 0x3c, 0x10, 0x4c, 0x27, 0x00,
0x00, 0x00, 0x27, 0x27, 0x00, 0x03, 0x00, 0xff, 0x27, 0x00,
0x02, 0x00, 0x27, 0x00, 0x01, 0x00, 0xf0, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00,
0x2e, 0x00, 0x11, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x0f, 0x00,
0x01, 0x00, 0xff, 0xff,
};
const byte ROOM_TABLE47[] = {
0x00, 0x2f, 0x00, 0x06, 0x00, 0x28, 0x1e, 0x32, 0x2b, 0x00,
0x00, 0x00, 0x46, 0x2b, 0x00, 0x03, 0x00, 0xff, 0x2b, 0x00,
0x02, 0x00, 0x2b, 0x00, 0x01, 0x00, 0xf0, 0x00, 0xff, 0xff,
0xff, 0xff, 0x2b, 0x00, 0x04, 0x00, 0xff, 0xff, 0x2e, 0x00,
0x04, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00,
};
const byte *const ROOM_TABLE[] = {
nullptr, ROOM_TABLE1, ROOM_TABLE2, ROOM_TABLE3, ROOM_TABLE4, ROOM_TABLE5, ROOM_TABLE6,
ROOM_TABLE7, ROOM_TABLE8, ROOM_TABLE9, nullptr, ROOM_TABLE11, nullptr, ROOM_TABLE13,
ROOM_TABLE14, ROOM_TABLE15, ROOM_TABLE16, ROOM_TABLE17, ROOM_TABLE18, nullptr, nullptr,
ROOM_TABLE21, ROOM_TABLE22, ROOM_TABLE23, ROOM_TABLE24, ROOM_TABLE25, ROOM_TABLE26, ROOM_TABLE27,
ROOM_TABLE28, ROOM_TABLE29, ROOM_TABLE30, ROOM_TABLE31, ROOM_TABLE32, ROOM_TABLE33, nullptr,
ROOM_TABLE35, nullptr, ROOM_TABLE37, ROOM_TABLE38, ROOM_TABLE39, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr, nullptr, ROOM_TABLE47
};
const char *const ROOM_DESCR[] = {
nullptr, "TBD ROOM_TABLE1", "TBD ROOM_TABLE2", "TBD ROOM_TABLE3", "TBD ROOM_TABLE4",
"TBD ROOM_TABLE5", "TBD ROOM_TABLE6", "TBD ROOM_TABLE7", "TBD ROOM_TABLE8", "TBD ROOM_TABLE9",
nullptr, "TBD ROOM_TABLE11", nullptr, "TBD ROOM_TABLE13", "TBD ROOM_TABLE14",
"TBD ROOM_TABLE15", "TBD ROOM_TABLE16", "TBD ROOM_TABLE17", "TBD ROOM_TABLE18", nullptr,
nullptr, "TBD ROOM_TABLE21", "TBD ROOM_TABLE22", "TBD ROOM_TABLE23", "TBD ROOM_TABLE24",
"TBD ROOM_TABLE25", "TBD ROOM_TABLE26", "TBD ROOM_TABLE27", "TBD ROOM_TABLE28", "TBD ROOM_TABLE29",
"TBD ROOM_TABLE30", "TBD ROOM_TABLE31", "TBD ROOM_TABLE32", "TBD ROOM_TABLE33", nullptr,
"TBD ROOM_TABLE35", nullptr, "TBD ROOM_TABLE37", "TBD ROOM_TABLE38", "TBD ROOM_TABLE39",
nullptr, nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, "TBD ROOM_TABLE47"
};
const int ROOM_NUMB = 48;
const byte MMCHAR_0[] = {
0x02, 0x31, 0x00, 0x08, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
};
const byte MMCHAR_2[] = {
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x32, 0x33, 0x00, 0x01, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0x33, 0x00, 0x00, 0x00, 0x33,
0x00, 0x02, 0x00, 0x33, 0x00, 0x0b, 0x00, 0x33, 0x00, 0x03,
0x00, 0x33, 0x00, 0x0c, 0x00, 0x33, 0x00, 0x04, 0x00, 0x33,
0x00, 0x0d, 0x00, 0x33, 0x00, 0x05, 0x00, 0x33, 0x00, 0x0e,
0x00, 0x33, 0x00, 0x06, 0x00, 0x33, 0x00, 0x0f, 0x00, 0x33,
0x00, 0x07, 0x00, 0x33, 0x00, 0x10, 0x00, 0x33, 0x00, 0x08,
0x00, 0x33, 0x00, 0x11, 0x00, 0x33, 0x00, 0x09, 0x00, 0x33,
0x00, 0x12, 0x00, 0x33, 0x00, 0x0a, 0x00, 0x33, 0x00, 0x13,
0x00, 0xff, 0xff,
};
const byte MMCHAR_3[] = {
0x02, 0x31, 0x00, 0x03, 0x00, 0x35, 0x00, 0x37, 0x00, 0x02,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x4b, 0x37, 0x00, 0x01, 0x00,
0xff, 0x37, 0x00, 0x03, 0x00, 0x37, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_4[] = {
0x01, 0x31, 0x00, 0x0a, 0x00, 0x36, 0x00, 0x35, 0x00, 0x02,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x49, 0x35, 0x00, 0x01, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0x35, 0x00, 0x00, 0x00, 0x35,
0x00, 0x03, 0x00, 0x35, 0x00, 0x0c, 0x00, 0x35, 0x00, 0x04,
0x00, 0x35, 0x00, 0x0d, 0x00, 0x35, 0x00, 0x05, 0x00, 0x35,
0x00, 0x0e, 0x00, 0x35, 0x00, 0x06, 0x00, 0x35, 0x00, 0x0f,
0x00, 0x35, 0x00, 0x07, 0x00, 0x35, 0x00, 0x10, 0x00, 0x35,
0x00, 0x08, 0x00, 0x35, 0x00, 0x11, 0x00, 0x35, 0x00, 0x09,
0x00, 0x35, 0x00, 0x12, 0x00, 0x35, 0x00, 0x0a, 0x00, 0x35,
0x00, 0x13, 0x00, 0x35, 0x00, 0x0b, 0x00, 0x35, 0x00, 0x14,
0x00, 0xff, 0xff,
};
const byte MMCHAR_5[] = {
0x01, 0x31, 0x00, 0x08, 0x00, 0x37, 0x00, 0x34, 0x00, 0x02,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x48, 0x34, 0x00, 0x01, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x43,
0x00, 0x00, 0x00, 0x34, 0x00, 0x03, 0x00, 0x43, 0x00, 0x01,
0x00, 0x34, 0x00, 0x04, 0x00, 0x43, 0x00, 0x02, 0x00, 0x34,
0x00, 0x05, 0x00, 0x43, 0x00, 0x03, 0x00, 0x34, 0x00, 0x06,
0x00, 0x43, 0x00, 0x04, 0x00, 0x34, 0x00, 0x07, 0x00, 0x43,
0x00, 0x05, 0x00, 0x34, 0x00, 0x08, 0x00, 0x43, 0x00, 0x06,
0x00, 0x34, 0x00, 0x09, 0x00, 0x43, 0x00, 0x07, 0x00, 0x34,
0x00, 0x0a, 0x00, 0x43, 0x00, 0x08, 0x00, 0x34, 0x00, 0x0b,
0x00, 0x43, 0x00, 0x09, 0x00, 0x34, 0x00, 0x0c, 0x00, 0x43,
0x00, 0x0a, 0x00, 0x34, 0x00, 0x0d, 0x00, 0x43, 0x00, 0x0b,
0x00, 0x34, 0x00, 0x0e, 0x00, 0x43, 0x00, 0x0c, 0x00, 0x34,
0x00, 0x0f, 0x00, 0x43, 0x00, 0x0d, 0x00, 0x34, 0x00, 0x10,
0x00, 0xff, 0xff,
};
const byte MMCHAR_6[] = {
0x02, 0x31, 0x00, 0x03, 0x00, 0x38, 0x00, 0x44, 0x00, 0x03,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x4e, 0x44, 0x00, 0x01, 0x00,
0xff, 0x44, 0x00, 0x02, 0x00, 0x44, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_7[] = {
0x02, 0x31, 0x00, 0x01, 0x00, 0x39, 0x00, 0x38, 0x00, 0x02,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x4c, 0x38, 0x00, 0x01, 0x00,
0xff, 0x38, 0x00, 0x03, 0x00, 0x38, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_8[] = {
0x03, 0xff, 0xff, 0xff, 0xff, 0x3a, 0x00, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x3b, 0x00, 0x01, 0x00,
0xff, 0x3b, 0x00, 0x02, 0x00, 0x3b, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_9[] = {
0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x59, 0x4a, 0x00, 0x01, 0x00,
0xff, 0x4a, 0x00, 0x02, 0x00, 0x4a, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_10[] = {
0x01, 0x31, 0x00, 0x0a, 0x00, 0x3c, 0x00, 0x36, 0x00, 0x02,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x4a, 0x36, 0x00, 0x01, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0x36, 0x00, 0x00, 0x00, 0x36,
0x00, 0x03, 0x00, 0x36, 0x00, 0x13, 0x00, 0x36, 0x00, 0x04,
0x00, 0x36, 0x00, 0x14, 0x00, 0x36, 0x00, 0x05, 0x00, 0x36,
0x00, 0x15, 0x00, 0x36, 0x00, 0x06, 0x00, 0x36, 0x00, 0x16,
0x00, 0x36, 0x00, 0x07, 0x00, 0x36, 0x00, 0x17, 0x00, 0x36,
0x00, 0x08, 0x00, 0x36, 0x00, 0x18, 0x00, 0x36, 0x00, 0x09,
0x00, 0x36, 0x00, 0x19, 0x00, 0x36, 0x00, 0x0a, 0x00, 0x36,
0x00, 0x1a, 0x00, 0x36, 0x00, 0x0b, 0x00, 0x36, 0x00, 0x1b,
0x00, 0x36, 0x00, 0x0c, 0x00, 0x36, 0x00, 0x1c, 0x00, 0x36,
0x00, 0x0d, 0x00, 0x36, 0x00, 0x1d, 0x00, 0x36, 0x00, 0x0e,
0x00, 0x36, 0x00, 0x1e, 0x00, 0x36, 0x00, 0x0f, 0x00, 0x36,
0x00, 0x1f, 0x00, 0x36, 0x00, 0x10, 0x00, 0x36, 0x00, 0x20,
0x00, 0x36, 0x00, 0x11, 0x00, 0x36, 0x00, 0x21, 0x00, 0x36,
0x00, 0x12, 0x00, 0x36, 0x00, 0x22, 0x00, 0xff, 0xff,
};
const byte MMCHAR_11[] = {
0x03, 0xff, 0xff, 0xff, 0xff, 0x3d, 0x00, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x55, 0x45, 0x00, 0x01, 0x00,
0xff, 0x45, 0x00, 0x02, 0x00, 0x45, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_12[] = {
0x03, 0xff, 0xff, 0xff, 0xff, 0x3e, 0x00, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x40, 0x00, 0x01, 0x00,
0xff, 0x40, 0x00, 0x02, 0x00, 0x40, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_13[] = {
0x00, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x46, 0x00, 0x02,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x56, 0x46, 0x00, 0x01, 0x00,
0xff, 0x46, 0x00, 0x03, 0x00, 0x46, 0x00, 0x00, 0x00, 0x46,
0x00, 0x04, 0x00, 0x46, 0x00, 0x0d, 0x00, 0x46, 0x00, 0x05,
0x00, 0x46, 0x00, 0x0e, 0x00, 0x46, 0x00, 0x06, 0x00, 0x46,
0x00, 0x0f, 0x00, 0x46, 0x00, 0x07, 0x00, 0x46, 0x00, 0x10,
0x00, 0x46, 0x00, 0x08, 0x00, 0x46, 0x00, 0x11, 0x00, 0x46,
0x00, 0x09, 0x00, 0x46, 0x00, 0x12, 0x00, 0x46, 0x00, 0x0a,
0x00, 0x46, 0x00, 0x13, 0x00, 0x46, 0x00, 0x0b, 0x00, 0x46,
0x00, 0x14, 0x00, 0x46, 0x00, 0x0c, 0x00, 0x46, 0x00, 0x15,
0x00, 0xff, 0xff,
};
const byte MMCHAR_15[] = {
0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x00, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x57, 0x47, 0x00, 0x01, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0x47,
0x00, 0x02, 0x00, 0x47, 0x00, 0x05, 0x00, 0x47, 0x00, 0x03,
0x00, 0x47, 0x00, 0x06, 0x00, 0x47, 0x00, 0x04, 0x00, 0x47,
0x00, 0x07, 0x00, 0xff, 0xff,
};
const byte MMCHAR_16[] = {
0x03, 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x54, 0x41, 0x00, 0x01, 0x00,
0xff, 0x41, 0x00, 0x02, 0x00, 0x41, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_18[] = {
0x02, 0x31, 0x00, 0x07, 0x00, 0x44, 0x00, 0x3c, 0x00, 0x03,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x50, 0x3c, 0x00, 0x01, 0x00,
0xff, 0x3c, 0x00, 0x02, 0x00, 0x3c, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_19[] = {
0x02, 0x31, 0x00, 0x07, 0x00, 0x45, 0x00, 0x3d, 0x00, 0x03,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x51, 0x3d, 0x00, 0x01, 0x00,
0xff, 0x3d, 0x00, 0x02, 0x00, 0x3d, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_20[] = {
0x02, 0x31, 0x00, 0x02, 0x00, 0x46, 0x00, 0x48, 0x00, 0x02,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x58, 0x48, 0x00, 0x01, 0x00,
0xff, 0x48, 0x00, 0x03, 0x00, 0x48, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_21[] = {
0x02, 0x31, 0x00, 0x07, 0x00, 0x47, 0x00, 0x3e, 0x00, 0x03,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x52, 0x3e, 0x00, 0x01, 0x00,
0xff, 0x3e, 0x00, 0x02, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_23[] = {
0x02, 0x31, 0x00, 0x08, 0x00, 0x49, 0x00, 0x3f, 0x00, 0x03,
0x00, 0x80, 0x00, 0xf7, 0x00, 0x53, 0x3f, 0x00, 0x01, 0x00,
0xff, 0x3f, 0x00, 0x02, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xff,
0xff,
};
const byte MMCHAR_24[] = {
0x02, 0x32, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x47, 0x32, 0x00, 0x02, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0x32, 0x00, 0x01, 0x00, 0x32,
0x00, 0x03, 0x00, 0x32, 0x00, 0x0a, 0x00, 0x32, 0x00, 0x04,
0x00, 0x32, 0x00, 0x0b, 0x00, 0x32, 0x00, 0x05, 0x00, 0x32,
0x00, 0x0c, 0x00, 0x32, 0x00, 0x06, 0x00, 0x32, 0x00, 0x0d,
0x00, 0x32, 0x00, 0x07, 0x00, 0x32, 0x00, 0x0e, 0x00, 0x32,
0x00, 0x08, 0x00, 0x32, 0x00, 0x0f, 0x00, 0x32, 0x00, 0x09,
0x00, 0x32, 0x00, 0x10, 0x00, 0xff, 0xff
};
const byte MMCHAR_25[] = {
0x02, 0x39, 0x00, 0x01, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x39, 0x00, 0x00, 0x00, 0x39, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF
};
const byte MMCHAR_26[] = {
0x01, 0x3a, 0x00, 0x01, 0x00, 0x0a, 0x00, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x3a, 0x00, 0x02, 0x00,
0xff, 0x3a, 0x00, 0x03, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x42,
0x00, 0x00, 0x00, 0x3a, 0x00, 0x04, 0x00, 0x42, 0x00, 0x01,
0x00, 0x3a, 0x00, 0x05, 0x00, 0x42, 0x00, 0x02, 0x00, 0x3a,
0x00, 0x06, 0x00, 0x42, 0x00, 0x03, 0x00, 0x3a, 0x00, 0x07,
0x00, 0x42, 0x00, 0x04, 0x00, 0x3a, 0x00, 0x08, 0x00, 0x42,
0x00, 0x05, 0x00, 0x3a, 0x00, 0x09, 0x00, 0x42, 0x00, 0x06,
0x00, 0x3a, 0x00, 0x0a, 0x00, 0x42, 0x00, 0x07, 0x00, 0x3a,
0x00, 0x0b, 0x00, 0x42, 0x00, 0x08, 0x00, 0x3a, 0x00, 0x0c,
0x00, 0x42, 0x00, 0x09, 0x00, 0x3a, 0x00, 0x0d, 0x00, 0x42,
0x00, 0x0a, 0x00, 0x3a, 0x00, 0x0e, 0x00, 0x42, 0x00, 0x0b,
0x00, 0x3a, 0x00, 0x0f, 0x00, 0x42, 0x00, 0x0c, 0x00, 0x3a,
0x00, 0x10, 0x00, 0x42, 0x00, 0x0d, 0x00, 0x3a, 0x00, 0x11,
0x00, 0x42, 0x00, 0x0e, 0x00, 0x3a, 0x00, 0x12, 0x00, 0x42,
0x00, 0x0f, 0x00, 0x3a, 0x00, 0x13, 0x00, 0x42, 0x00, 0x10,
0x00, 0x3a, 0x00, 0x14, 0x00, 0x42, 0x00, 0x11, 0x00, 0x3a,
0x00, 0x15, 0x00, 0xff, 0xff
};
const byte MMCHAR_27[] = {
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x58, 0x49, 0x00, 0x01, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0x49, 0x00, 0x00, 0x00, 0x49,
0x00, 0x02, 0x00, 0x49, 0x00, 0x0a, 0x00, 0x49, 0x00, 0x03,
0x00, 0x49, 0x00, 0x0b, 0x00, 0x49, 0x00, 0x04, 0x00, 0x49,
0x00, 0x0c, 0x00, 0x49, 0x00, 0x05, 0x00, 0x49, 0x00, 0x0d,
0x00, 0x49, 0x00, 0x06, 0x00, 0x49, 0x00, 0x0e, 0x00, 0x49,
0x00, 0x07, 0x00, 0x49, 0x00, 0x0f, 0x00, 0x49, 0x00, 0x08,
0x00, 0x49, 0x00, 0x10, 0x00, 0x49, 0x00, 0x09, 0x00, 0x49,
0x00, 0x11, 0x00, 0xff, 0xff,
};
// HACK: MMCHAR_0 has been used to replace the missing CHAR: 1, 14, 17 and 22
const byte *const CHARTBL_MM[] = {
MMCHAR_0, MMCHAR_0, MMCHAR_2, MMCHAR_3, MMCHAR_4,
MMCHAR_5, MMCHAR_6, MMCHAR_7, MMCHAR_8, MMCHAR_9,
MMCHAR_10, MMCHAR_11, MMCHAR_12, MMCHAR_13, MMCHAR_0,
MMCHAR_15, MMCHAR_16, MMCHAR_0, MMCHAR_18, MMCHAR_19,
MMCHAR_20, MMCHAR_21, MMCHAR_0, MMCHAR_23, MMCHAR_24,
MMCHAR_25, MMCHAR_26, MMCHAR_27
};
const int SIDEOFFR[] = { 4, 0, 7, 10, 3, 1, 2, 13, 0, 0, 0, 0 };
const int SIDEOFFL[] = { 11, 6, 1, 4, 10, 6, 1, 4, 0, 0, 0, 0 };
const int SIDEOFFU[] = { 1, 2, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0 };
@ -765,7 +80,7 @@ const char *const TRAVDATA[] = {
"COOPER BRADBURY", nullptr
};
const char *const _askTBL[] = {
const char *const ASK_TBL[] = {
"NONE", "MARSHALL ALEXANDER", "TERRAFORM CORP.", "COLLIER STANTON", "ROCKWELL BACHE",
"JOCQUES SPARROW", "NORA DESMOND ALEXANDER", "GALACTIC PICTURES", "LAWRENCE BARKLEY", "TMS",
"MAC MALDEN", "STANTON EXPEDITION", "LOWELL PERCIVAL", "CHANTAL VARGAS", "RICK LOGAN",
@ -783,33 +98,6 @@ byte HELP[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1
};
const byte DEATH_SCREENS[] = {
5, 5, 3, 3, 7, 4, 6, 2, 2, 2, 1, 5, 3, 5, 2, 8, 5, 3, 8, 5
};
const char *const DEATHMESSAGE[] = {
"A VICIOUS THUG PULLS OUT HIS GUN AND AIR CONDITIONS YOUR BRAIN.",
"BIG DICK COMES BACK AND ANNOUNCES YOUR TIME IS UP. ONE OF HIS BOYS PROCEEDS TO PART YOUR EYEBROWS.",
"ALTHOUGH HIS FIRST SHOT MISSED, THE PUNK FINDS YOU AND TURNS YOU INTO A DOUGHNUT.",
"THE CREEP SPOTS YOU. HE TURNS AND FIRES HIS WEAPON. IT BURNS A HOLE A BUZZARD CAN FLY THROUGH.",
"OBVIOUSLY RICK LOGAN HAS A FEW TRICK UP HIS SLEEVE. A TREMENDOUS WEIGHT HITS YOUR HEAD. YOU MUMBLE; WATCH OUT FOR THAT TREE...",
"SLOWLY SINKING IN THE SLIMY OOZE, YOU THINK OF SEVERAL JELLO WRESTLING MATCHES YOU'VE ATTENDED. BUT NO MORE...",
"THE PATH SUDDENLY GIVES WAY AND YOU FEEL MANY STAKES TEAR THROUGH YOUR FLESH. HOW DO YOU LIKE YOUR STAKE",
"THE SNAKE SINKS ITS FANGS INTO YOU LEG. THE POISON WORKS QUICKLY. THE SNAKE THEN SWALLOWS YOU WHOLE.",
"YOU FADE AWAY, GLOWING LIKE A LIGHTBULB.",
"YOU TOUCH THE BUBBLING RADIOACTIVE SELTZER. IT IMMEDIATELY CAUSES VITAL ORGANS TO ELONGATE AND EXPLODE. YOU DIE WITH AN ABSURD AND FOOLISH LOOK ON YOUR FACE.",
"THE DOGS PRETTY HUNGRY. IT WON'T TAKE HIM LONG TO FINISH SO SIT BACK AND ENJOY IT.",
"ROCKY DOESN'T LIKE BEING FOLLOWED. HE DECIDES TO BEAT YOU. WITHIN AND INCH OF YOUR LIFE. UNFORTUNATELY, HE MISJUDGED THE DISTANCE",
"YOU STUMBLE INTO DEADLY LASER FIRE.",
"THE OUTPOST AND YOUR BODY PARTS ARE BLOWN TO KINGDOM COME.",
"YOU REACH THE TOP, BUT YOUR AIR SOON RUNS OUT LEAVING YOU BREATHLESS.",
"YOU DIE IN THE FIERY EXPLOSION.",
"YOU FALL HUNDREDS OF FEET TO YOUR DEATH.",
"YOU WALK ONTO A PRESSURE SENSITIVE SECURITY PAD. A LASER ZEROS IN AND BLOWS A HOLE THE SIZE OF A SUBARU TIRE THROUGH YOU.",
"DANGERFIELD'S EXPERIMENT BACKFIRES. IT RELEASES A DEMON FROM HIS SUBCONSCIOUS WHICH DESTROYS THE ENTIRE PLANET.",
"ONCE DANGERFIELD GETS OUT OF HIS CHAMBER, HE PULLS OUT A WEAPON AND LETS YOU HAVE IT."
};
const char *const SPEC7MESSAGE = {
"THOMAS DANGERFIELD'S MAD EXPERIMENT OF ATTEMPTING TO HARNESS THE STONE'S POWER, ENDED HIS LIFE. DANGERFIELD WAS A DECENT HUMAN " \
"BEING ONCE, BUT WAS DRIVEN INSANE BY HIS QUEST FOR THE ULTIMATE POWER. ALEXIS AND I DECIDE THAT DEACON HAWKE IS THE ONLY " \

View file

@ -24,31 +24,17 @@
#define ACCESS_MARTIAN_RESOURCES_H
#include "common/scummsys.h"
#include "access/resources.h"
namespace Access {
namespace Martian {
extern const char *const FILENAMES[];
extern const int SIDEOFFR[];
extern const int SIDEOFFL[];
extern const int SIDEOFFU[];
extern const int SIDEOFFD[];
extern const byte *const CURSORS[4];
extern const int _travelPos[][2];
extern const int INVENTORY_SIZE;
extern const char *const INVENTORY_NAMES[];
extern const byte *const ROOM_TABLE[];
extern const char *const ROOM_DESCR[];
extern const int ROOM_NUMB;
extern const byte *const CHARTBL_MM[];
extern const int SIDEOFFR[];
extern const int SIDEOFFL[];
extern const int SIDEOFFU[];
@ -60,16 +46,24 @@ extern const byte ICON_PALETTE[];
extern const int RMOUSE[10][2];
extern byte HELP[];
extern const char *const _askTBL[];
extern const char *const ASK_TBL[];
extern const char *const TRAVDATA[];
extern const byte DEATH_SCREENS[];
extern const char *const DEATHMESSAGE[];
extern const char *const SPEC7MESSAGE;
extern const byte _byte1EEB5[];
extern const int PICTURERANGE[][2];
class MartianResources : public Resources {
public:
public:
MartianResources(AccessEngine *vm) : Resources(vm) {}
virtual ~MartianResources() {}
};
#define MMRES (*((Martian::MartianResources *)_vm->_res))
} // End of namespace Martian
} // End of namespace Access

View file

@ -39,7 +39,7 @@ MartianRoom::~MartianRoom() {
}
void MartianRoom::loadRoom(int roomNumber) {
loadRoomData(ROOM_TABLE[roomNumber]);
loadRoomData(&MMRES.ROOMTBL[roomNumber]._data[0]);
}
void MartianRoom::reloadRoom() {

View file

@ -22,9 +22,140 @@
#include "access/resources.h"
#include "access/access.h"
#include "access/amazon/amazon_resources.h"
#include "access/martian/martian_resources.h"
namespace Access {
Resources *Resources::init(AccessEngine *vm) {
if (vm->getGameID() == GType_Amazon)
return new Amazon::AmazonResources(vm);
else if (vm->getGameID() == GType_MartianMemorandum)
return new Martian::MartianResources(vm);
error("Unknown game");
}
bool Resources::load(Common::String &errorMessage) {
Common::File f;
if (!f.open("access.dat")) {
errorMessage = "Could not locate required access.dat file";
return false;
}
// Check for the magic identifier
char buffer[4];
f.read(buffer, 4);
if (strncmp(buffer, "SVMA", 4)) {
errorMessage = "Located access.dat file had invalid contents";
return false;
}
// Validate the version number
uint expectedVersion = 1;
uint version = f.readUint16LE();
if (version != expectedVersion) {
errorMessage = Common::String::format(
"Incorrect version of access.dat found. Expected %d but got %d",
expectedVersion, version);
return false;
}
// Load in the index
uint count = f.readUint16LE();
_datIndex.resize(count);
for (uint idx = 0; idx < _datIndex.size(); ++idx) {
_datIndex[idx]._gameId = f.readByte();
_datIndex[idx]._discType = f.readByte();
_datIndex[idx]._demoType = f.readByte();
_datIndex[idx]._language = (Common::Language)f.readByte();
_datIndex[idx]._fileOffset = f.readUint32LE();
}
// Load in the data for the game
load(f);
return true;
}
void Resources::load(Common::SeekableReadStream &s) {
uint count;
// Get the offset of the data for the game
uint entryOffset = findEntry(_vm->getGameID(), _vm->isCD() ? 1 : 0,
_vm->isDemo() ? 1 : 0, _vm->getLanguage());
s.seek(entryOffset);
// Load filename list
count = s.readUint16LE();
FILENAMES.resize(count);
for (uint idx = 0; idx < count; ++idx)
FILENAMES[idx] = readString(s);
// Load the character data
count = s.readUint16LE();
CHARTBL.resize(count);
for (uint idx = 0; idx < count; ++idx) {
uint count2 = s.readUint16LE();
CHARTBL[idx].resize(count2);
if (count2 > 0)
s.read(&CHARTBL[idx][0], count2);
}
// Load the room data
count = s.readUint16LE();
ROOMTBL.resize(count);
for (uint idx = 0; idx < count; ++idx) {
ROOMTBL[idx]._desc = readString(s);
ROOMTBL[idx]._travelPos.x = s.readSint16LE();
ROOMTBL[idx]._travelPos.y = s.readSint16LE();
uint count2 = s.readUint16LE();
ROOMTBL[idx]._data.resize(count2);
if (count2 > 0)
s.read(&ROOMTBL[idx]._data[0], count2);
}
// Load the deaths list
count = s.readUint16LE();
DEATHS.resize(count);
for (uint idx = 0; idx < count; ++idx) {
DEATHS[idx]._screenId = s.readByte();
DEATHS[idx]._msg = readString(s);
}
// Load in the inventory list
count = s.readUint16LE();
INVENTORY.resize(count);
for (uint idx = 0; idx < count; ++idx) {
INVENTORY[idx]._desc = readString(s);
for (uint idx2 = 0; idx2 < 4; ++idx2)
INVENTORY[idx]._combo[idx2] = s.readSint16LE();
}
}
uint Resources::findEntry(byte gameId, byte discType, byte demoType, Common::Language language) {
for (uint idx = 0; idx < _datIndex.size(); ++idx) {
DATEntry &de = _datIndex[idx];
if (de._gameId == gameId && de._discType == discType &&
de._demoType == demoType && de._language == language)
return de._fileOffset;
}
error("Could not locate appropriate access.dat entry");
}
Common::String Resources::readString(Common::SeekableReadStream &s) {
Common::String result;
char c;
while ((c = s.readByte()) != 0)
result += c;
return result;
}
/*------------------------------------------------------------------------*/
const byte INITIAL_PALETTE[18 * 3] = {
0x00, 0x00, 0x00,
0xff, 0xff, 0xff,
@ -49,14 +180,14 @@ const byte INITIAL_PALETTE[18 * 3] = {
const char *const GENERAL_MESSAGES[] = {
"LOOKING THERE REVEALS NOTHING OF INTEREST.", // LOOK_MESSAGE
"THAT DOESN'T OPEN.", // OPEN_MESSAGE
"THAT WON'T MOVE." // MOVE_MESSAGE
"THAT WON'T MOVE.", // MOVE_MESSAGE
"YOU CAN'T TAKE THAT.", // GET_MESSAGE
"THAT DOESN'T SEEM TO WORK.", // USE_MESSAGE
"YOU CAN'T CLIMB THAT.", // GO_MESSAGE
"THERE SEEMS TO BE NO RESPONSE.", // TALK_MESSAGE
"THIS OBJECT REQUIRES NO HINTS", // HELP_MESSAGE
"THIS OBJECT REQUIRES NO HINTS", // HELP_MESSAGE
"THAT DOESN'T SEEM TO WORK.", // USE_MESSAGE
"THAT DOESN'T SEEM TO WORK." // USE_MESSAGE
};
const int INVCOORDS[][4] = {

View file

@ -24,6 +24,11 @@
#define ACCESS_RESOURCES_H
#include "common/scummsys.h"
#include "common/array.h"
#include "common/language.h"
#include "common/rect.h"
#include "common/str-array.h"
#include "common/stream.h"
namespace Access {
@ -33,6 +38,66 @@ extern const char *const GENERAL_MESSAGES[];
extern const int INVCOORDS[][4];
class AccessEngine;
class Resources {
struct DATEntry {
byte _gameId;
byte _discType;
byte _demoType;
Common::Language _language;
uint _fileOffset;
};
struct RoomEntry {
Common::String _desc;
Common::Point _travelPos;
Common::Array<byte> _data;
};
struct DeathEntry {
byte _screenId;
Common::String _msg;
};
struct InventoryEntry {
Common::String _desc;
int _combo[4];
};
protected:
AccessEngine *_vm;
Common::Array<DATEntry> _datIndex;
/**
* Locate a specified entry in the index and return it's file offset
*/
uint findEntry(byte gameId, byte discType, byte demoType, Common::Language language);
/**
* Read a string in from the passed stream
*/
Common::String readString(Common::SeekableReadStream &s);
/**
* Load data from the access.dat file
*/
virtual void load(Common::SeekableReadStream &s);
public:
Common::StringArray FILENAMES;
Common::Array< Common::Array<byte> > CHARTBL;
Common::Array<RoomEntry> ROOMTBL;
Common::Array<DeathEntry> DEATHS;
Common::Array<InventoryEntry> INVENTORY;
Common::Array< Common::Array<byte> > CURSORS;
Common::String CANT_GET_THERE;
public:
Resources(AccessEngine *vm) : _vm(vm) {}
virtual ~Resources() {}
static Resources *init(AccessEngine *vm);
/**
* Load the access.dat file
*/
bool load(Common::String &errorMessage);
};
} // End of namespace Access
#endif /* ACCESS_RESOURCES_H */

View file

@ -111,8 +111,7 @@ void Room::takePicture() {
return;
}
// TODO: simplify the second part of the test when tested
if ((_vm->_scrollCol < 35) || ((_vm->_scrollRow >= 10) && (_vm->_scrollRow >= 20))){
if ((_vm->_scrollCol < 35) || (_vm->_scrollRow >= 20)){
Common::String msg = "THAT ISN'T INTERESTING ENOUGH TO WASTE FILM ON.";
_vm->_scripts->doCmdPrint_v1(msg);
return;
@ -173,12 +172,14 @@ void Room::doRoom() {
reloadFlag = false;
_vm->_startup = 8;
_function = FN_NONE;
bool fadeIn = true;
while (!_vm->shouldQuit()) {
_vm->_images.clear();
if (_vm->_startup != -1 && --_vm->_startup == 0) {
if (_vm->_startup == -1 && !fadeIn) {
_vm->_events->showCursor();
_vm->_screen->fadeIn();
fadeIn = true;
}
// Poll for events
@ -612,6 +613,7 @@ void Room::handleCommand(int commandId) {
void Room::executeCommand(int commandId) {
EventsManager &events = *_vm->_events;
Screen &screen = *_vm->_screen;
_selectCommand = commandId;
if (_vm->getGameID() == GType_MartianMemorandum) {
@ -698,8 +700,8 @@ void Room::executeCommand(int commandId) {
break;
}
}
_vm->_screen->saveScreen();
_vm->_screen->setDisplayScan();
screen.saveScreen();
screen.setDisplayScan();
// Get the toolbar icons resource
Resource *iconData = _vm->_files->loadFile("ICONS.LZ");
@ -707,7 +709,9 @@ void Room::executeCommand(int commandId) {
delete iconData;
// Draw the button as selected
_vm->_screen->plotImage(spr, _selectCommand + 2,
screen.plotImage(spr, 0, Common::Point(0, 177));
screen.plotImage(spr, 1, Common::Point(143, 177));
screen.plotImage(spr, _selectCommand + 2,
Common::Point(_rMouse[_selectCommand][0], (_vm->getGameID() == GType_MartianMemorandum) ? 184 : 176));
_vm->_screen->restoreScreen();
@ -928,16 +932,9 @@ RoomInfo::RoomInfo(const byte *data, int gameType, bool isCD, bool isDemo) {
_roomFlag = stream.readByte();
if (gameType == GType_Amazon) {
if (isCD)
_estIndex = -1;
if (gameType == GType_Amazon && isCD)
_estIndex = stream.readSint16LE();
else {
_estIndex = -1;
if (!isDemo)
stream.readSint16LE();
}
} else
_estIndex = -1;
_musicFile.load(stream);
_scaleH1 = stream.readByte();

View file

@ -89,6 +89,11 @@ void Screen::setPanel(int num) {
}
void Screen::updateScreen() {
if (_vm->_startup >= 0) {
--_vm->_startup;
return;
}
// Merge the dirty rects
mergeDirtyRects();
@ -181,7 +186,7 @@ void Screen::forceFadeOut() {
int v = *srcP;
if (v) {
repeatFlag = true;
*srcP = MAX(*srcP - FADE_AMOUNT, 0);
*srcP = MAX((int)*srcP - FADE_AMOUNT, 0);
}
}

View file

@ -164,7 +164,7 @@ void Scripts::charLoop() {
_sequence = 2000;
searchForSequence();
_vm->_images.clear();
_vm->_buffer2.blitFrom(_vm->_buffer1);
_vm->_buffer2.copyBlock(&_vm->_buffer1, Common::Rect(0, 0, _vm->_buffer2.w, _vm->_buffer2.h));
_vm->_newRects.clear();
executeScript();
@ -536,6 +536,7 @@ void Scripts::cmdDispInv_v1() {
void Scripts::cmdDispInv_v2() {
_vm->_inventory->newDisplayInv();
_vm->_events->forceSetCursor(CURSOR_ARROW);
}
void Scripts::cmdSetAbout() {
@ -689,19 +690,20 @@ void Scripts::cmdDoTravel() {
int idx = _vm->_travelBox->_tempListIdx[boxX];
if (Martian::_byte1EEB5[idx] != _vm->_byte26CB5) {
_vm->_bubbleBox->_bubbleTitle = "_travel";
_vm->_bubbleBox->printString("YOU CAN'T GET THERE FROM HERE.");
_vm->_bubbleBox->printString(_vm->_res->CANT_GET_THERE);
continue;
}
if (_vm->_player->_roomNumber != idx) {
_vm->_player->_roomNumber = idx;
_vm->_room->_function = FN_CLEAR1;
if (Martian::_travelPos[idx][0] == -1) {
if (_vm->_res->ROOMTBL[idx]._travelPos.x == -1) {
// For x == -1, the y value is a script Id, not a co-ordinate
_vm->_player->_roomNumber = idx;
_vm->_room->_conFlag = true;
_vm->_scripts->converse1(Martian::_travelPos[idx][1]);
_vm->_scripts->converse1(_vm->_res->ROOMTBL[idx]._travelPos.y);
return;
}
_vm->_player->_rawPlayer = Common::Point(Martian::_travelPos[idx][0], Martian::_travelPos[idx][1]);
_vm->_player->_rawPlayer = _vm->_res->ROOMTBL[idx]._travelPos;
cmdRetPos();
return;
}
@ -1033,7 +1035,7 @@ void Scripts::cmdPrintWatch() {
}
void Scripts::cmdDispAbout() {
_vm->_travelBox->getList(Martian::_askTBL, _vm->_ask);
_vm->_travelBox->getList(Martian::ASK_TBL, _vm->_ask);
int btnSelected = 0;
int boxX = _vm->_aboutBox->doBox_v1(_vm->_startAboutItem, _vm->_startAboutBox, btnSelected);
_vm->_startAboutItem = _vm->_boxDataStart;

View file

@ -39,13 +39,13 @@ typedef void(Scripts::*ScriptMethodPtr)();
class Scripts : public Manager {
private:
Resource *_resource;
int _specialFunction;
void clearWatch();
void printWatch();
protected:
Resource *_resource;
Common::SeekableReadStream *_data;
ScriptMethodPtr COMMAND_LIST[100];

View file

@ -51,11 +51,20 @@ void SoundManager::clearSounds() {
_mixer->stopHandle(_effectsHandle);
while (_queue.size()) {
delete _queue[0];
delete _queue[0]._stream;
_queue.remove_at(0);
}
}
bool SoundManager::isSoundQueued(int soundId) const {
for (uint idx = 0; idx < _queue.size(); ++idx) {
if (_queue[idx]._soundId == soundId)
return true;
}
return false;
}
void SoundManager::loadSoundTable(int idx, int fileNum, int subfile, int priority) {
debugC(1, kDebugSound, "loadSoundTable(%d, %d, %d)", idx, fileNum, subfile);
@ -77,12 +86,15 @@ Resource *SoundManager::loadSound(int fileNum, int subfile) {
void SoundManager::playSound(int soundIndex, bool loop) {
debugC(1, kDebugSound, "playSound(%d, %d)", soundIndex, loop);
if (isSoundQueued(soundIndex))
// Prevent duplicate copies of a sound from being queued
return;
int priority = _soundTable[soundIndex]._priority;
playSound(_soundTable[soundIndex]._res, priority, loop);
playSound(_soundTable[soundIndex]._res, priority, loop, soundIndex);
}
void SoundManager::playSound(Resource *res, int priority, bool loop) {
void SoundManager::playSound(Resource *res, int priority, bool loop, int soundIndex) {
debugC(1, kDebugSound, "playSound");
byte *resourceData = res->data();
@ -109,7 +121,7 @@ void SoundManager::playSound(Resource *res, int priority, bool loop) {
byte internalSampleRate = resourceData[5];
int sampleSize = READ_LE_UINT16(resourceData + 7);
assert( (sampleSize + 32) == res->_size);
assert( (sampleSize + 32) <= res->_size);
int sampleRate = 0;
switch (internalSampleRate) {
@ -139,14 +151,15 @@ void SoundManager::playSound(Resource *res, int priority, bool loop) {
error("Unknown format");
if (loop) {
_queue.push_back(new Audio::LoopingAudioStream(audioStream, 0, DisposeAfterUse::NO));
_queue.push_back(QueuedSound(new Audio::LoopingAudioStream(audioStream, 0,
DisposeAfterUse::NO), soundIndex));
} else {
_queue.push_back(audioStream);
_queue.push_back(QueuedSound(audioStream, soundIndex));
}
if (!_mixer->isSoundHandleActive(_effectsHandle))
_mixer->playStream(Audio::Mixer::kSFXSoundType, &_effectsHandle,
_queue[0], -1, _mixer->kMaxChannelVolume, 0,
_queue[0]._stream, -1, _mixer->kMaxChannelVolume, 0,
DisposeAfterUse::NO);
}
@ -156,12 +169,12 @@ void SoundManager::checkSoundQueue() {
if (_queue.empty() || _mixer->isSoundHandleActive(_effectsHandle))
return;
delete _queue[0];
delete _queue[0]._stream;
_queue.remove_at(0);
if (_queue.size() && _queue[0])
if (_queue.size() && _queue[0]._stream)
_mixer->playStream(Audio::Mixer::kSFXSoundType, &_effectsHandle,
_queue[0], -1, _mixer->kMaxChannelVolume, 0,
_queue[0]._stream, -1, _mixer->kMaxChannelVolume, 0,
DisposeAfterUse::NO);
}
@ -213,7 +226,7 @@ MusicManager::MusicManager(AccessEngine *vm) : _vm(vm) {
//
switch (musicType) {
case MT_ADLIB: {
if (_vm->getGameID() == GType_Amazon) {
if (_vm->getGameID() == GType_Amazon && !_vm->isDemo()) {
Resource *midiDrvResource = _vm->_files->loadFile(92, 1);
Common::MemoryReadStream *adLibInstrumentStream = new Common::MemoryReadStream(midiDrvResource->data(), midiDrvResource->_size);

View file

@ -45,15 +45,24 @@ struct SoundEntry {
};
class SoundManager {
struct QueuedSound {
Audio::AudioStream *_stream;
int _soundId;
QueuedSound() : _stream(nullptr), _soundId(-1) {}
QueuedSound(Audio::AudioStream *stream, int soundId) : _stream(stream), _soundId(soundId) {}
};
private:
AccessEngine *_vm;
Audio::Mixer *_mixer;
Audio::SoundHandle _effectsHandle;
Common::Array<Audio::AudioStream *> _queue;
Common::Array<QueuedSound> _queue;
void clearSounds();
void playSound(Resource *res, int priority, bool loop);
void playSound(Resource *res, int priority, bool loop, int soundIndex = -1);
bool isSoundQueued(int soundId) const;
public:
Common::Array<SoundEntry> _soundTable;
bool _playingSound;

View file

@ -372,6 +372,7 @@ AccessVIDMovieDecoder::StreamVideoTrack::StreamVideoTrack(uint32 width, uint32 h
_curFrame = -1;
_nextFrameStartTime = 0;
_endOfTrack = false;
_dirtyPalette = false;
memset(&_palette, 0, sizeof(_palette));

View file

@ -143,7 +143,6 @@ private:
private:
int16 decodeSample(uint8 dataNibble);
uint32 _codecTag;
uint16 _sampleRate;
bool _stereo;
};

View file

@ -143,7 +143,6 @@ bool Console::Cmd_Version(int argc, const char **argv) {
const char *wordScanPtr = NULL;
const char *wordStartPtr = NULL;
const char *versionStartPtr = NULL;
const char *versionPtr = NULL;
int wordLen = 0;
char curChar = 0;
int versionLen = 0;
@ -179,7 +178,6 @@ bool Console::Cmd_Version(int argc, const char **argv) {
// Now scan this text for version information
wordScanPtr = scriptTextPtr;
versionPtr = NULL;
do {
curChar = *wordScanPtr;

View file

@ -84,6 +84,15 @@ void AgiEngine::newRoom(int n) {
break;
}
if (getVersion() < 0x2000) {
warning("STUB: NewRoom(%d)", n);
v->flags &= ~fDidntMove;
// animateObject(0);
agiLoadResource(rVIEW, _game.viewTable[0].currentView);
setView(&_game.viewTable[0], _game.viewTable[0].currentView);
} else {
_game.vars[vBorderTouchEgo] = 0;
setflag(fNewRoomExec, true);
@ -92,6 +101,7 @@ void AgiEngine::newRoom(int n) {
writeStatus();
writePrompt();
}
}
void AgiEngine::resetControllers() {
int i;

View file

@ -1711,22 +1711,6 @@ void cmdCallV1(AgiGame *state, uint8 *p) {
_v[13] = 1;
}
void cmdNewRoomV1(AgiGame *state, uint8 *p) {
warning("cmdNewRoomV1()");
state->_vm->agiLoadResource(rLOGIC, p0);
state->max_logics = 1;
state->logic_list[1] = p0;
_v[13] = 1;
}
void cmdNewRoomVV1(AgiGame *state, uint8 *p) {
warning("cmdNewRoomVV1()");
state->_vm->agiLoadResource(rLOGIC, _v[p0]);
state->max_logics = 1;
state->logic_list[1] = _v[p0];
_v[13] = 1;
}
void cmdUnknown(AgiGame *state, uint8 *p) {
warning("Skipping unknown opcode %2X", *(code + ip - 1));
}

View file

@ -60,7 +60,7 @@ AgiInstruction insV1[] = {
{ "subv", "vv", &cmdSubV }, // 08
{ "load.view", "n", &cmdLoadView }, // 09
{ "animate.obj", "n", &cmdAnimateObj }, // 0A
{ "new.room", "n", &cmdNewRoomV1 }, // 0B
{ "new.room", "n", &cmdNewRoom }, // 0B
{ "draw.pic", "v", &cmdDrawPicV1 }, // 0C
{ "print", "s", &cmdPrint }, // 0D TODO
{ "status", "", &cmdStatus }, // 0E TODO
@ -112,7 +112,7 @@ AgiInstruction insV1[] = {
{ "set.v", "v", &cmdSetV }, // 3C
{ "reset.v", "v", &cmdResetV }, // 3D
{ "toggle.v", "v", &cmdToggleV }, // 3E
{ "new.room.v", "v", &cmdNewRoomVV1 }, // 3F TODO
{ "new.room.v", "v", &cmdNewRoom }, // 3F
{ "call", "n", &cmdCallV1 }, // 40 TODO
{ "quit", "", &cmdQuitV1 }, // 41
{ "set.speed", "v", &cmdSetSpeed }, // 42

View file

@ -237,8 +237,6 @@ void cmdAdjEgoMoveToXY(AgiGame *state, uint8 *p);
void cmdSetSpeed(AgiGame *state, uint8 *p);
void cmdSetItemView(AgiGame *state, uint8 *p);
void cmdCallV1(AgiGame *state, uint8 *p);
void cmdNewRoomV1(AgiGame *state, uint8 *p);
void cmdNewRoomVV1(AgiGame *state, uint8 *p);
void cmdUnknown(AgiGame *state, uint8 *p);
void condEqual(AgiGame *state, uint8 *p);

View file

@ -345,7 +345,7 @@ void SoundGen2GS::advanceMidiPlayer() {
case MIDI_PITCH_WHEEL:
parm1 = *p++;
parm2 = *p++;
debugC(3, kDebugLevelSound, "channel %X: pitch wheel (unimplemented)", chn);
debugC(3, kDebugLevelSound, "channel %X: pitch wheel (unimplemented) %02X, %02X", chn, parm1, parm2);
break;
default:

View file

@ -79,7 +79,7 @@ bool WagProperty::read(Common::SeekableReadStream &stream) {
uint32 readBytes = stream.read(_propData, _propSize); // Read the data in
_propData[_propSize] = 0; // Set the trailing zero for easy C-style string access
_readOk = (_propData != NULL && readBytes == _propSize); // Check that we got the whole data
_readOk = (readBytes == _propSize); // Check that we got the whole data
return _readOk;
}

View file

@ -161,11 +161,13 @@ void AgiEngine::dictionaryWords(char *msg) {
char *q = NULL;
int wid, wlen;
assert(msg);
debugC(2, kDebugLevelScripts, "msg = \"%s\"", msg);
cleanInput();
for (p = msg; p && *p && getvar(vWordNotFound) == 0;) {
for (p = msg; *p && getvar(vWordNotFound) == 0;) {
if (*p == 0x20)
p++;
@ -205,7 +207,7 @@ void AgiEngine::dictionaryWords(char *msg) {
break;
}
if (p != NULL && *p) {
if (*p) {
debugC(2, kDebugLevelScripts, "p = %s", p);
*p = 0;
p++;

View file

@ -1384,7 +1384,7 @@ void BbvsEngine::checkEasterEgg(char key) {
};
if (_currSceneNum == kCredits) {
memcpy(&_easterEggInput[1], &_easterEggInput[0], 6);
memmove(&_easterEggInput[1], &_easterEggInput[0], 6);
_easterEggInput[0] = key;
for (int i = 0; i < ARRAYSIZE(kEasterEggStrings); ++i) {
if (!scumm_strnicmp(kEasterEggStrings[i], _easterEggInput, kEasterEggLengths[i])) {

View file

@ -68,7 +68,7 @@ class Sound {
public:
SmpInfo _smpinf;
Sound(CGE2Engine *vm);
explicit Sound(CGE2Engine *vm);
~Sound();
void open();
void close();
@ -116,7 +116,7 @@ private:
// Stop MIDI File
void sndMidiStop();
public:
MusicPlayer(CGE2Engine *vm);
explicit MusicPlayer(CGE2Engine *vm);
~MusicPlayer();
void loadMidi(int ref);

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