Strip trailing whitespaces in the whole code base.

svn-id: r40867
This commit is contained in:
Johannes Schickel 2009-05-24 15:17:42 +00:00
parent 7c1eb05714
commit b3c6751b9b
163 changed files with 734 additions and 734 deletions

View File

@ -469,7 +469,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
event.type = Common::EVENT_RTL;
}
}
#ifdef ENABLE_VKEYBD
#ifdef ENABLE_VKEYBD
else if (event.kbd.keycode == Common::KEYCODE_F7 && event.kbd.flags == 0) {
if (_vk->isDisplaying()) {
_vk->close(true);
@ -483,7 +483,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
}
}
#endif
#ifdef ENABLE_KEYMAPPER
#ifdef ENABLE_KEYMAPPER
else if (event.kbd.keycode == Common::KEYCODE_F8 && event.kbd.flags == 0) {
if (!_remap) {
_remap = true;

View File

@ -143,7 +143,7 @@ public:
virtual int shouldQuit() const { return _shouldQuit; }
virtual int shouldRTL() const { return _shouldRTL; }
virtual void resetRTL() { _shouldRTL = false; }
#ifdef ENABLE_KEYMAPPER
virtual Common::Keymapper *getKeymapper() { return _keymapper; }
#endif

View File

@ -224,7 +224,7 @@ GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path) {
lastSlash = r;
}
}
if (path == "mp:/") {
// This is the root directory
_isDirectory = true;

View File

@ -264,7 +264,7 @@ void Ps2FilesystemNode::doverify(void) {
_isHere = false;
_isDirectory = false;
return;
}
}
switch (medium) {
#if 0
@ -361,7 +361,7 @@ AbstractFSNode *Ps2FilesystemNode::getChild(const Common::String &n) const {
/*
int fd;
if (_path == "pfs0:")
fd = fio.dopen("pfs0:/");
else
@ -442,7 +442,7 @@ bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
if ( (mode == Common::FSNode::kListAll) ||
((mode == Common::FSNode::kListDirectoriesOnly) &&
((mode == Common::FSNode::kListDirectoriesOnly) &&
(dirent.stat.mode & FIO_S_IFDIR)) ||
((mode == Common::FSNode::kListFilesOnly) &&
@ -499,7 +499,7 @@ char *Ps2FilesystemNode::getDeviceDescription() const {
return "Host";
else if (strncmp(_path.c_str(), "mc0", 3) == 0)
return "Memory Card";
else
else
return "WTF ???";
}

View File

@ -136,10 +136,10 @@ SymbianFilesystemNode::SymbianFilesystemNode(const Common::String &path) {
} else {
_isValid = ETrue;
_isDirectory = EFalse;
TParsePtrC parser(fname);
if(parser.PathPresent() && parser.Path().Compare(_L("\\")) == KErrNone && !parser.NameOrExtPresent()) {
TParsePtrC parser(fname);
if(parser.PathPresent() && parser.Path().Compare(_L("\\")) == KErrNone && !parser.NameOrExtPresent()) {
_isDirectory = ETrue;
}
}
}
}

View File

@ -31,7 +31,7 @@
namespace Common {
Action::Action(Keymap *boss, const char *i, String des, ActionType typ,
Action::Action(Keymap *boss, const char *i, String des, ActionType typ,
KeyType prefKey, int pri, int flg)
: _boss(boss), description(des), type(typ), preferredKey(prefKey),
priority(pri), flags(flg), _hwKey(0) {

View File

@ -63,12 +63,12 @@ private:
Keymap *_boss;
public:
Action(Keymap *boss, const char *id, String des = "",
Action(Keymap *boss, const char *id, String des = "",
ActionType typ = kGenericActionType,
KeyType prefKey = kGenericKeyType,
int pri = 0, int flg = 0 );
void addEvent(const Event &evt) {
void addEvent(const Event &evt) {
events.push_back(evt);
}
@ -101,7 +101,7 @@ public:
addEvent(evt);
}
Keymap *getParent() {
Keymap *getParent() {
return _boss;
}
@ -111,10 +111,10 @@ public:
};
struct ActionPriorityComp : public BinaryFunction<Action, Action, bool> {
bool operator()(const Action *x, const Action *y) const {
bool operator()(const Action *x, const Action *y) const {
return x->priority > y->priority;
}
bool operator()(const Action &x, const Action &y) const {
bool operator()(const Action &x, const Action &y) const {
return x.priority > y.priority;
}
};

View File

@ -38,17 +38,17 @@ namespace Common {
#define HWKEY_ID_SIZE (30)
/**
* Describes an available hardware key
* Describes an available hardware key
*/
struct HardwareKey {
/** unique id used for saving/loading to config */
char hwKeyId[HWKEY_ID_SIZE];
/** Human readable description */
String description;
String description;
/**
* The KeyState that is generated by the back-end
/**
* The KeyState that is generated by the back-end
* when this hardware key is pressed.
*/
KeyState key;
@ -69,7 +69,7 @@ struct HardwareKey {
* Simple class to encapsulate a device's set of HardwareKeys.
* Each device should instantiate this and call addHardwareKey a number of times
* in its constructor to define the device's available keys.
*/
*/
class HardwareKeySet {
public:

View File

@ -124,7 +124,7 @@ void Keymap::loadMappings(const HardwareKeySet *hwKeys) {
if (!_configDomain)
return;
ConfigManager::Domain::iterator it;
ConfigManager::Domain::iterator it;
String prefix = KEYMAP_KEY_PREFIX + _name + "_";
for (it = _configDomain->begin(); it != _configDomain->end(); it++) {
@ -138,7 +138,7 @@ void Keymap::loadMappings(const HardwareKeySet *hwKeys) {
Action *ua = getAction(actionId);
if (!ua) {
warning("'%s' keymap does not contain Action with ID %s",
warning("'%s' keymap does not contain Action with ID %s",
_name.c_str(), actionId);
_configDomain->erase(key);
@ -199,7 +199,7 @@ bool Keymap::isComplete(const HardwareKeySet *hwKeys) {
// TODO:
// - current weakness:
// - if an action finds a key with required type but a parent action with
// - if an action finds a key with required type but a parent action with
// higher priority is using it, that key is never used
void Keymap::automaticMapping(HardwareKeySet *hwKeys) {
// Create copies of action and key lists.
@ -208,7 +208,7 @@ void Keymap::automaticMapping(HardwareKeySet *hwKeys) {
List<Action*>::iterator actIt;
List<const HardwareKey*>::iterator keyIt, selectedKey;
// Remove actions and keys from local lists that have already been mapped.
actIt = actions.begin();
@ -227,16 +227,16 @@ void Keymap::automaticMapping(HardwareKeySet *hwKeys) {
// Sort remaining actions by priority.
ActionPriorityComp priorityComp;
sort(actions.begin(), actions.end(), priorityComp);
// First mapping pass:
// - Match if a key's preferred action type is the same as the action's
// - Match if a key's preferred action type is the same as the action's
// type, or vice versa.
// - Priority is given to:
// - keys that match action types over key types.
// - keys that have not been used by parent maps.
// - If a key has been used by a parent map the new action must have a
// higher priority than the parent action.
// - As soon as the number of skipped actions equals the number of keys
// - As soon as the number of skipped actions equals the number of keys
// remaining we stop matching. This means that the second pass will assign keys
// to these higher priority skipped actions.
uint skipped = 0;
@ -317,7 +317,7 @@ void Keymap::automaticMapping(HardwareKeySet *hwKeys) {
if (selectedKey != keys.end()) {
act->mapKey(*selectedKey);
keys.erase(selectedKey);
} else {// no match = no keys left
} else {// no match = no keys left
break;
}
}

View File

@ -48,7 +48,7 @@ class HardwareKeySet;
template<> struct Hash<KeyState>
: public UnaryFunction<KeyState, uint> {
uint operator()(const KeyState &val) const {
uint operator()(const KeyState &val) const {
return (uint)val.keycode | ((uint)val.flags << 24);
}
};
@ -78,7 +78,7 @@ public:
* @return a pointer to the Action or 0 if no
*/
Action *getMappedAction(const KeyState& ks) const;
void setConfigDomain(ConfigManager::Domain *dom);
/**
@ -94,7 +94,7 @@ public:
*/
void saveMappings();
void automaticMapping(HardwareKeySet *hwKeys);
/**
@ -110,7 +110,7 @@ private:
friend struct Action;
/**
* Adds a new Action to this Map,
* Adds a new Action to this Map,
* adding it at the back of the internal array
* @param action the Action to add
*/
@ -141,7 +141,7 @@ private:
String _name;
Keymap *_parent;
List<Action*> _actions;
HashMap<KeyState, Action*> _keymap;
HashMap<KeyState, Action*> _keymap;
ConfigManager::Domain *_configDomain;
};

View File

@ -86,7 +86,7 @@ void Keymapper::addGlobalKeymap(Keymap *keymap) {
void Keymapper::addGameKeymap(Keymap *keymap) {
if (ConfMan.getActiveDomain() == 0)
error("Call to Keymapper::addGameKeymap when no game loaded");
// Detect whether the active game changed since last call.
// If so, flush the game key configuration.
if (_gameDomain.getConfigDomain() != ConfMan.getActiveDomain()) {
@ -118,7 +118,7 @@ void Keymapper::initKeymap(Domain &domain, Keymap *map) {
void Keymapper::cleanupGameKeymaps() {
// Flush all game specific keymaps
_gameDomain.deleteAllKeyMaps();
// Now restore the stack of active maps. Re-add all global keymaps, drop
// the game specific (=deleted) ones.
Stack<MapRecord> newStack;

View File

@ -41,7 +41,7 @@ namespace Common {
class Keymapper {
public:
struct MapRecord {
Keymap* keymap;
bool inherit;
@ -53,11 +53,11 @@ public:
IgnoreCase_Hash, IgnoreCase_EqualTo> {
public:
Domain() : _configDomain(0) {}
~Domain() {
~Domain() {
deleteAllKeyMaps();
}
void setConfigDomain(ConfigManager::Domain *confDom) {
void setConfigDomain(ConfigManager::Domain *confDom) {
_configDomain = confDom;
}
ConfigManager::Domain *getConfigDomain() {
@ -69,7 +69,7 @@ public:
void deleteAllKeyMaps();
Keymap *getKeymap(const String& name);
private:
ConfigManager::Domain *_configDomain;
};
@ -120,10 +120,10 @@ public:
Keymap *getKeymap(const String& name, bool &global);
/**
* Push a new keymap to the top of the active stack, activating
* Push a new keymap to the top of the active stack, activating
* it for use.
* @param name name of the keymap to push
* @param inherit if true keymapper will iterate down the
* @param inherit if true keymapper will iterate down the
* stack if it cannot find a key in the new map
* @return true if succesful
*/
@ -136,7 +136,7 @@ public:
/**
* @brief Map a key press event.
* If the active keymap contains a Action mapped to the given key, then
* If the active keymap contains a Action mapped to the given key, then
* the Action's events are pushed into the EventManager's event queue.
* @param key key that was pressed
* @param keyDown true for key down, false for key up
@ -180,7 +180,7 @@ private:
HardwareKeySet *_hardwareKeys;
void pushKeymap(Keymap *newMap, bool inherit, bool global);
Action *getAction(const KeyState& key);
void executeAction(const Action *act, bool keyDown);

View File

@ -146,7 +146,7 @@ void RemapDialog::reflowLayout() {
_colCount = (areaW - scrollbarWidth) / colWidth;
_rowCount = (areaH + spacing) / (buttonHeight + spacing);
if (_colCount <= 0 || _rowCount <= 0)
if (_colCount <= 0 || _rowCount <= 0)
error("Remap dialog too small to display any keymaps!");
_scrollBar->resize(areaX + areaW - scrollbarWidth, areaY, scrollbarWidth, areaH);
@ -164,9 +164,9 @@ void RemapDialog::reflowLayout() {
ActionWidgets widg;
if (i >= _keymapWidgets.size()) {
widg.actionText =
widg.actionText =
new GUI::StaticTextWidget(this, 0, 0, 0, 0, "", Graphics::kTextAlignRight);
widg.keyButton =
widg.keyButton =
new GUI::ButtonWidget(this, 0, 0, 0, 0, "", kRemapCmd + i);
_keymapWidgets.push_back(widg);
} else {
@ -208,7 +208,7 @@ void RemapDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 d
void RemapDialog::startRemapping(uint i) {
if (_topAction + i >= _currentActions.size())
return;
return;
_remapTimeout = getMillis() + kRemapTimeoutDelay;
_activeRemapAction = _currentActions[_topAction + i].action;
@ -287,7 +287,7 @@ void RemapDialog::loadKeymap() {
if (act->getMappedKey())
freeKeys.remove(act->getMappedKey());
}
// loop through remaining finding mappings for unmapped keys
if (top.inherit) {
for (int i = activeKeymaps.size() - 2; i >= 0; --i) {
@ -365,7 +365,7 @@ void RemapDialog::refreshKeymap() {
widg.actionText->setVisible(true);
widg.keyButton->setVisible(true);
actionI++;
actionI++;
} else {
widg.actionText->setVisible(false);
widg.keyButton->setVisible(false);
@ -373,7 +373,7 @@ void RemapDialog::refreshKeymap() {
//widg.actionText->draw();
//widg.keyButton->draw();
}
// need to redraw entire Dialog so that invisible
// need to redraw entire Dialog so that invisible
// widgets disappear
draw();
}

View File

@ -647,7 +647,7 @@ void displayMode8Bit() {
// ConsoleInit destroys the hardware palette :-(
OSystem_DS::instance()->restoreHardwarePalette();
// BG_PALETTE_SUB[255] = RGB15(31,31,31);//by default font will be rendered with color 255
// Do text stuff
@ -893,7 +893,7 @@ void displayMode16Bit() {
BG3_XDX = isCpuScalerEnabled() ? 256 : (int) (1.25f * 256);
BG3_XDY = 0;
BG3_YDX = 0;
BG3_YDX = 0;
BG3_YDY = (int) ((200.0f / 192.0f) * 256);
#ifdef HEAVY_LOGGING
@ -1571,7 +1571,7 @@ void addEventsToQueue() {
}
static int selectHoldCount = 0;
static int selectHoldCount = 0;
static const int SELECT_HOLD_TIME = 60;
if ((getKeysHeld() & KEY_SELECT)) {
@ -1585,8 +1585,8 @@ void addEventsToQueue() {
selectHoldCount = 0;
}
if (getKeysReleased() & KEY_SELECT) {
if (selectHoldCount < SELECT_HOLD_TIME) {
// Just pressed select - show DS options screen
@ -1838,7 +1838,7 @@ void soundBufferEmptyHandler() {
}
currentTimeMillis++;
// TIMER0 end
soundHiPart = !soundHiPart;
}

View File

@ -335,7 +335,7 @@ void DSOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint
close();
}
if ((!guard) && (cmd == 0x40000000)) {
close();
g_engine->openMainMenuDialog();

View File

@ -425,12 +425,12 @@ void OSystem_DS::grabOverlay(OverlayColor* buf, int pitch) {
for (int y = 0; y < 200; y++) {
u16* src = start + (y * 320);
u16* dest = ((u16 *) (buf)) + (y * pitch);
for (int x = 0; x < 320; x++) {
*dest++ = *src++;
}
}
}
void OSystem_DS::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {

View File

@ -171,7 +171,7 @@ bool ZipFile::findFile(const char *search) {
char searchName[128];
strcpy(searchName, search);
char *tmp = searchName;
// Change slashes to backslashes
for (; *tmp; ++tmp) {
if (*tmp == '/')

View File

@ -8,12 +8,12 @@
* 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.
@ -27,7 +27,7 @@
#include "blit_arm.h"
void blitLandscapeScreenRect16bpp(uint16 *dst, uint16 *src, int width, int height, int screenWidth, int screenHeight)
{
{
for (int x = width; x > 0; x--) {
for (int y = height; y > 0; y--) {
*(dst++) = *src;
@ -47,5 +47,5 @@ void blitLandscapeScreenRect8bpp(uint16 *dst, byte *src, int width, int height,
}
dst -= screenHeight + height;
src += 1 - height * screenWidth;
}
}
}

View File

@ -66,7 +66,7 @@ void iPhone_updateScreenRect(unsigned short* screen, int x1, int y1, int x2, int
void iPhone_initSurface(int width, int height);
bool iPhone_fetchEvent(int *outEvent, float *outX, float *outY);
const char* iPhone_getDocumentsDir();
#ifdef __cplusplus
}
#endif

View File

@ -47,7 +47,7 @@
int _fullHeight;
int _widthOffset;
int _heightOffset;
EAGLContext* _context;
GLuint _viewRenderbuffer;
GLuint _viewFramebuffer;

View File

@ -88,7 +88,7 @@ int OSystem_IPHONE::timerHandler(int t) {
void OSystem_IPHONE::initBackend() {
#ifdef IPHONE_OFFICIAL
_savefile = new DefaultSaveFileManager(iPhone_getDocumentsDir());
_savefile = new DefaultSaveFileManager(iPhone_getDocumentsDir());
#else
_savefile = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH);
#endif
@ -159,7 +159,7 @@ void OSystem_IPHONE::initSize(uint width, uint height) {
bzero(_fullscreen, fullSize);
iPhone_initSurface(width, height);
_fullScreenIsDirty = false;
dirtyFullScreen();
_mouseVisible = false;
@ -300,9 +300,9 @@ void OSystem_IPHONE::internUpdateScreen() {
Common::Rect dirtyRect = _dirtyRects.remove_at(_dirtyRects.size() - 1);
//printf("Drawing: (%i, %i) -> (%i, %i)\n", dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom);
drawDirtyRect(dirtyRect);
if (_overlayVisible)
drawDirtyOverlayRect(dirtyRect);
@ -315,7 +315,7 @@ void OSystem_IPHONE::internUpdateScreen() {
Common::Rect dirtyRect = _dirtyOverlayRects.remove_at(_dirtyOverlayRects.size() - 1);
//printf("Drawing: (%i, %i) -> (%i, %i)\n", dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom);
drawDirtyOverlayRect(dirtyRect);
drawMouseCursorOnRectUpdate(dirtyRect, mouseRect);
updateHardwareSurfaceForRect(dirtyRect);
@ -332,7 +332,7 @@ void OSystem_IPHONE::drawDirtyRect(const Common::Rect& dirtyRect) {
for (int y = h; y > 0; y--) {
for (int x = w; x > 0; x--)
*dst++ = _palette[*src++];
dst += _screenWidth - w;
src += _screenWidth - w;
}
@ -392,7 +392,7 @@ void OSystem_IPHONE::drawMouseCursorOnRectUpdate(const Common::Rect& updatedRect
}
void OSystem_IPHONE::updateHardwareSurfaceForRect(const Common::Rect& updatedRect) {
iPhone_updateScreenRect(_fullscreen, updatedRect.left, updatedRect.top, updatedRect.right, updatedRect.bottom );
iPhone_updateScreenRect(_fullscreen, updatedRect.left, updatedRect.top, updatedRect.right, updatedRect.bottom );
}
Graphics::Surface *OSystem_IPHONE::lockScreen() {
@ -610,7 +610,7 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
case kInputMouseDragged:
if (!handleEvent_mouseDragged(event, x, y))
return false;
break;
break;
case kInputMouseSecondDragged:
if (!handleEvent_mouseSecondDragged(event, x, y))
return false;
@ -618,13 +618,13 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
case kInputMouseSecondDown:
_secondaryTapped = true;
if (!handleEvent_secondMouseDown(event, x, y))
return false;
return false;
break;
case kInputMouseSecondUp:
_secondaryTapped = false;
if (!handleEvent_secondMouseUp(event, x, y))
return false;
break;
return false;
break;
case kInputOrientationChanged:
handleEvent_orientationChanged((int)xUnit);
return false;
@ -781,30 +781,30 @@ bool OSystem_IPHONE::handleEvent_mouseDragged(Common::Event &event, int x, int y
int deltaY = _lastPadY - y;
_lastPadX = x;
_lastPadY = y;
mouseNewPosX = (int)(_mouseX - deltaX / 0.5f);
mouseNewPosY = (int)(_mouseY - deltaY / 0.5f);
if (mouseNewPosX < 0)
mouseNewPosX = 0;
else if (mouseNewPosX > _screenWidth)
mouseNewPosX = _screenWidth;
if (mouseNewPosY < 0)
mouseNewPosY = 0;
else if (mouseNewPosY > _screenHeight)
mouseNewPosY = _screenHeight;
} else {
mouseNewPosX = x;
mouseNewPosY = y;
}
event.type = Common::EVENT_MOUSEMOVE;
event.mouse.x = mouseNewPosX;
event.mouse.y = mouseNewPosY;
warpMouse(mouseNewPosX, mouseNewPosY);
return true;
}
@ -812,27 +812,27 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
if (_gestureStartX == -1 || _gestureStartY == -1) {
return false;
}
int vecX = (x - _gestureStartX);
int vecY = (y - _gestureStartY);
int lengthSq = vecX * vecX + vecY * vecY;
//printf("Lengthsq: %u\n", lengthSq);
if (lengthSq > 15000) { // Long enough gesture to react upon.
_gestureStartX = -1;
_gestureStartY = -1;
float vecLength = sqrt(lengthSq);
float vecXNorm = vecX / vecLength;
float vecYNorm = vecY / vecLength;
//printf("Swipe vector: (%.2f, %.2f)\n", vecXNorm, vecYNorm);
if (vecXNorm > -0.50 && vecXNorm < 0.50 && vecYNorm > 0.75) {
// Swipe down
event.type = Common::EVENT_KEYDOWN;
_queuedInputEvent.type = Common::EVENT_KEYUP;
event.kbd.flags = _queuedInputEvent.kbd.flags = 0;
event.kbd.keycode = _queuedInputEvent.kbd.keycode = Common::KEYCODE_F5;
event.kbd.ascii = _queuedInputEvent.kbd.ascii = Common::ASCII_F5;
@ -849,7 +849,7 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
GUI::TimedMessageDialog dialog(dialogMsg, 1500);
dialog.runModal();
return false;
} else if (vecXNorm > 0.75 && vecYNorm > -0.5 && vecYNorm < 0.5) {
// Swipe right
_touchpadModeEnabled = !_touchpadModeEnabled;
@ -861,12 +861,12 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
GUI::TimedMessageDialog dialog(dialogMsg, 1500);
dialog.runModal();
return false;
} else if (vecXNorm < -0.75 && vecYNorm > -0.5 && vecYNorm < 0.5) {
// Swipe left
return false;
}
}
}
return false;
}
@ -893,7 +893,7 @@ void OSystem_IPHONE::handleEvent_orientationChanged(int orientation) {
if (_screenOrientation != newOrientation) {
_screenOrientation = newOrientation;
iPhone_initSurface(_screenWidth, _screenHeight);
dirtyFullScreen();
if (_overlayVisible)
dirtyFullOverlayScreen();
@ -1231,7 +1231,7 @@ Common::SeekableReadStream *OSystem_IPHONE::createConfigReadStream() {
strncat(buf, "/Preferences", 256 - strlen(buf) );
Common::FSNode file(buf);
#else
Common::FSNode file(SCUMMVM_PREFS_PATH);
Common::FSNode file(SCUMMVM_PREFS_PATH);
#endif
return file.createReadStream();
}
@ -1241,10 +1241,10 @@ Common::WriteStream *OSystem_IPHONE::createConfigWriteStream() {
char buf[256];
strncpy(buf, iPhone_getDocumentsDir(), 256);
strncat(buf, "/Preferences", 256 - strlen(buf) );
Common::FSNode file(buf);
Common::FSNode file(buf);
#else
Common::FSNode file(SCUMMVM_PREFS_PATH);
#endif
Common::FSNode file(SCUMMVM_PREFS_PATH);
#endif
return file.createWriteStream();
}
@ -1288,7 +1288,7 @@ void iphone_main(int argc, char *argv[]) {
chdir("/var/mobile/");
#endif
g_system = OSystem_IPHONE_create();
assert(g_system);

View File

@ -104,7 +104,7 @@ protected:
TimerProc _timerCallback;
Common::Array<Common::Rect> _dirtyRects;
Common::Array<Common::Rect> _dirtyOverlayRects;
Common::Array<Common::Rect> _dirtyOverlayRects;
ScreenOrientation _screenOrientation;
bool _fullScreenIsDirty;
bool _fullScreenOverlayIsDirty;
@ -168,7 +168,7 @@ public:
virtual void quit();
FilesystemFactory *getFilesystemFactory() { return _fsFactory; }
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
virtual void getTimeAndDate(struct tm &t) const;
virtual void setWindowCaption(const char *caption);
@ -186,13 +186,13 @@ public:
protected:
void internUpdateScreen();
void dirtyFullScreen();
void dirtyFullOverlayScreen();
void dirtyFullOverlayScreen();
void clipRectToScreen(int16 &x, int16 &y, int16 &w, int16 &h);
void suspendLoop();
void drawDirtyRect(const Common::Rect& dirtyRect);
void drawDirtyOverlayRect(const Common::Rect& dirtyRect);
void drawDirtyOverlayRect(const Common::Rect& dirtyRect);
void drawMouseCursorOnRectUpdate(const Common::Rect& updatedRect, const Common::Rect& mouseRect);
void updateHardwareSurfaceForRect(const Common::Rect& updatedRect);
void updateHardwareSurfaceForRect(const Common::Rect& updatedRect);
static void AQBufferCallback(void *in, AudioQueueRef inQ, AudioQueueBufferRef outQB);
static int timerHandler(int t);
@ -207,5 +207,5 @@ protected:
bool handleEvent_secondMouseUp(Common::Event &event, int x, int y);
bool handleEvent_mouseDragged(Common::Event &event, int x, int y);
bool handleEvent_mouseSecondDragged(Common::Event &event, int x, int y);
bool handleEvent_mouseSecondDragged(Common::Event &event, int x, int y);
};

View File

@ -162,7 +162,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
// _tvMode = TV_NTSC;
printf("Setting up %s mode\n", (_tvMode == TV_PAL) ? "PAL" : "NTSC");
// set screen size, 640x512 for pal, 640x448 for ntsc
_tvWidth = 640;
_tvHeight = ((_tvMode == TV_PAL) ? 512 /*544*/ : 448);
@ -188,7 +188,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_clutPtrs[TEXT] = _clutPtrs[SCREEN] + 0x2000;
_texPtrs[SCREEN] = _clutPtrs[SCREEN] + 0x3000;
_texPtrs[TEXT] = 0; // these buffers are stored in the alpha gaps of the frame buffers
_texPtrs[MOUSE] = 128 * 256 * 4;
_texPtrs[MOUSE] = 128 * 256 * 4;
_texPtrs[PRINTF] = _texPtrs[MOUSE] + M_SIZE * M_SIZE * 4;
_showOverlay = false;
@ -249,7 +249,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
updateScreen();
createAnimTextures();
// create anim thread
ee_thread_t animThread, thisThread;
ReferThreadStatus(GetThreadId(), &thisThread);
@ -683,7 +683,7 @@ void Gs2dScreen::animThread(void) {
do {
WaitSema(g_AnimSema);
} while ((!_systemQuit) && (!g_RunAnim));
if (_systemQuit)
break;
@ -808,7 +808,7 @@ const uint32 Gs2dScreen::_binaryClut[16] __attribute__((aligned(64))) = {
GS_RGBA( 0, 0, 0, 0x20), // scrPrintf: semitransparent
GS_RGBA(0xC0, 0xC0, 0xC0, 0), // scrPrintf: red
GS_RGBA(0x16, 0x16, 0xF0, 0), // scrPrintf: blue
GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), // unused
GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), GS_RGBA(0xFF, 0xFF, 0xFF, 0x80),
GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), GS_RGBA(0xFF, 0xFF, 0xFF, 0x80),

View File

@ -77,7 +77,7 @@ public:
void showOverlay(void);
void hideOverlay(void);
Graphics::PixelFormat getOverlayFormat(void);
int16 getOverlayWidth(void);
int16 getOverlayWidth(void);
int16 getOverlayHeight(void);
//- mouse routines

View File

@ -267,7 +267,7 @@ void Ps2File::cacheReadSync(void) {
}
}
uint32 Ps2File::read(void *dest, uint32 len) {
uint32 Ps2File::read(void *dest, uint32 len) {
// uint32 r=0, d=0, ds=0, sz=0;
#ifdef __PS2_FILE_SEMA__
WaitSema(_sema);

View File

@ -56,7 +56,7 @@ public:
virtual bool getErr(void);
virtual void setErr(bool);
private:
void cacheReadAhead(void);
void cacheReadSync(void);

View File

@ -23,7 +23,7 @@
class PS2Icon {
public:
PS2Icon() {};
~PS2Icon() {};
uint16 decompressData(uint16 **data);

View File

@ -41,7 +41,7 @@ static const char netArg[] = "192.168.0.10" "\0" "255.255.255.0" "\0" "192.168.0
IrxFile irxFiles[] = {
{ "SIO2MAN", BIOS, NOTHING, NULL, 0 },
{ "MCMAN", BIOS, NOTHING, NULL, 0 },
{ "MCMAN", BIOS, NOTHING, NULL, 0 },
{ "MCSERV", BIOS, NOTHING, NULL, 0 },
{ "PADMAN", BIOS, NOTHING, NULL, 0 },
{ "LIBSD", BIOS, NOTHING, NULL, 0 },
@ -73,7 +73,7 @@ PS2Device detectBootPath(const char *elfPath, char *bootPath) {
PS2Device device = _getDev(elfPath);
printf("elf path: %s, device %d\n", elfPath, device);
strcpy(bootPath, elfPath);
char *pathPos = bootPath;
@ -115,7 +115,7 @@ PS2Device detectBootPath(const char *elfPath, char *bootPath) {
return device;
}
int loadIrxModules(int device, const char *irxPath, IrxReference **modules) {
int loadIrxModules(int device, const char *irxPath, IrxReference **modules) {
IrxReference *resModules = (IrxReference *)malloc(numIrxFiles * sizeof(IrxReference));
IrxReference *curModule = resModules;

View File

@ -209,7 +209,7 @@ void OSystem_PS2::startIrxModules(int numModules, IrxReference *modules) {
}
} else
sioprintf("Module \"%s\" wasn't found: %d\n", modules[i].path, modules[i].errorCode);
if ((modules[i].errorCode < 0) || (res < 0) || (rv < 0)) {
if (!(modules[i].fileRef->flags & OPTIONAL)) {
if (modules[i].errorCode < 0)
@ -220,7 +220,7 @@ void OSystem_PS2::startIrxModules(int numModules, IrxReference *modules) {
quit();
}
}
if (modules[i].buffer)
free(modules[i].buffer);
} else {
@ -723,7 +723,7 @@ void OSystem_PS2::msgPrintf(int millis, char *format, ...) {
while ((*lnEnd) && (*lnEnd != '\n'))
lnEnd++;
*lnEnd = '\0';
Common::String str(lnSta);
int width = Graphics::g_sysfont.getStringWidth(str);
if (width > maxWidth)
@ -821,17 +821,17 @@ void OSystem_PS2::quit(void) {
// ("", 0, NULL);
/* back to PS2 Browser */
/*
/*
__asm__ __volatile__(
" li $3, 0x04;"
" syscall;"
" nop;"
);
*/
/*
SifIopReset("rom0:UNDL ", 0);
while (!SifIopSync()) ;
while (!SifIopSync()) ;
// SifIopReboot(...);
*/
#else
@ -959,7 +959,7 @@ void OSystem_PS2::makeConfigPath() {
sprintf(path, "mc0:ScummVM/ScummVM.ini");
else
ps2_fclose(src);
_configFile = strdup(path);
}
@ -967,7 +967,7 @@ Common::SeekableReadStream *OSystem_PS2::createConfigReadStream() {
Common::FSNode file(_configFile);
return file.createReadStream();
}
Common::WriteStream *OSystem_PS2::createConfigWriteStream() {
Common::FSNode file(_configFile);
return file.createWriteStream();

View File

@ -84,7 +84,7 @@ public:
virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
virtual int16 getOverlayWidth(void);
virtual int16 getOverlayHeight(void);
virtual bool showMouse(bool visible);
virtual void warpMouse(int x, int y);

View File

@ -164,7 +164,7 @@ void SymbianActions::initInstanceGame() {
// Pause
if(is_cruise) {
_key_action[ACTION_PAUSE].setKey('P');
}
}
else {
_key_action[ACTION_PAUSE].setKey(' ');
}

View File

@ -1737,8 +1737,8 @@ void OSystem_WINCE3::internUpdateScreen() {
toolbarScaler = Normal2x;
else if (_videoMode.scaleFactor == 3)
toolbarScaler = Normal3x;
toolbarScaler((byte *)toolbarSurface->pixels, srcPitch,
(byte *)_hwscreen->pixels + (_toolbarHandler.getOffset() * _scaleFactorYm / _scaleFactorYd * dstPitch),
toolbarScaler((byte *)toolbarSurface->pixels, srcPitch,
(byte *)_hwscreen->pixels + (_toolbarHandler.getOffset() * _scaleFactorYm / _scaleFactorYd * dstPitch),
dstPitch, toolbar_rect[0].w, toolbar_rect[0].h);
SDL_UnlockSurface(toolbarSurface);
SDL_UnlockSurface(_hwscreen);

View File

@ -41,7 +41,7 @@ class ImageMap {
public:
~ImageMap();
Polygon *createArea(const String& id);
void removeArea(const String& id);
void removeAllAreas();

View File

@ -62,31 +62,31 @@ static void blit(Graphics::Surface *surf_dst, Graphics::Surface *surf_src, int16
int dstAdd = surf_dst->w - blitW;
int srcAdd = surf_src->w - blitW;
for (int i = 0; i < blitH; ++i) {
for (int j = 0; j < blitW; ++j, ++dst, ++src) {
for (int i = 0; i < blitH; ++i) {
for (int j = 0; j < blitW; ++j, ++dst, ++src) {
OverlayColor col = *src;
if (col != transparent)
*dst = col;
}
dst += dstAdd;
src += srcAdd;
src += srcAdd;
}
}
VirtualKeyboardGUI::VirtualKeyboardGUI(VirtualKeyboard *kbd)
: _kbd(kbd), _displaying(false), _drag(false),
_drawCaret(false), _displayEnabled(false), _firstRun(true),
: _kbd(kbd), _displaying(false), _drag(false),
_drawCaret(false), _displayEnabled(false), _firstRun(true),
_cursorAnimateTimer(0), _cursorAnimateCounter(0) {
assert(_kbd);
assert(g_system);
_system = g_system;
_lastScreenChanged = _system->getScreenChangeID();
_screenW = _system->getOverlayWidth();
_screenH = _system->getOverlayHeight();
memset(_cursor, 0xFF, sizeof(_cursor));
}
@ -138,7 +138,7 @@ bool VirtualKeyboardGUI::fontIsSuitable(const Graphics::Font *font, const Rect&
void VirtualKeyboardGUI::checkScreenChanged() {
if (_lastScreenChanged != _system->getScreenChangeID())
screenChanged();
screenChanged();
}
void VirtualKeyboardGUI::initSize(int16 w, int16 h) {
@ -297,7 +297,7 @@ void VirtualKeyboardGUI::mainLoop() {
break;
case Common::EVENT_MOUSEMOVE:
if (_drag)
move(event.mouse.x - _dragPoint.x,
move(event.mouse.x - _dragPoint.x,
event.mouse.y - _dragPoint.y);
break;
case Common::EVENT_SCREEN_CHANGED:
@ -349,7 +349,7 @@ void VirtualKeyboardGUI::redraw() {
int16 w = _dirtyRect.width();
int16 h = _dirtyRect.height();
if (w <= 0 || h <= 0) return;
Graphics::Surface surf;
surf.create(w, h, sizeof(OverlayColor));
@ -362,17 +362,17 @@ void VirtualKeyboardGUI::redraw() {
src += _overlayBackup.w;
}
blit(&surf, _kbdSurface, _kbdBound.left - _dirtyRect.left,
blit(&surf, _kbdSurface, _kbdBound.left - _dirtyRect.left,
_kbdBound.top - _dirtyRect.top, _kbdTransparentColor);
if (_displayEnabled) {
blit(&surf, &_dispSurface, _dispX - _dirtyRect.left,
blit(&surf, &_dispSurface, _dispX - _dirtyRect.left,
_dispY - _dirtyRect.top, _dispBackColor);
}
_system->copyRectToOverlay((OverlayColor*)surf.pixels, surf.w,
_system->copyRectToOverlay((OverlayColor*)surf.pixels, surf.w,
_dirtyRect.left, _dirtyRect.top, surf.w, surf.h);
surf.free();
resetDirtyRect();
}
@ -390,7 +390,7 @@ void VirtualKeyboardGUI::animateCaret() {
if (_system->getMillis() % kCaretBlinkTime < kCaretBlinkTime / 2) {
if (!_drawCaret) {
_drawCaret = true;
_drawCaret = true;
_dispSurface.drawLine(_caretX, 0, _caretX, _dispSurface.h, _dispForeColor);
extendDirtyRect(Rect(_dispX + _caretX, _dispY, _dispX + _caretX + 1, _dispY + _dispSurface.h));
}
@ -412,17 +412,17 @@ void VirtualKeyboardGUI::updateDisplay() {
uint dispTextEnd;
if (_dispI > cursorPos)
_dispI = cursorPos;
dispTextEnd = calculateEndIndex(wholeText, _dispI);
while (cursorPos > dispTextEnd)
dispTextEnd = calculateEndIndex(wholeText, ++_dispI);
String dispText = String(wholeText.c_str() + _dispI, wholeText.c_str() + dispTextEnd);
// draw to display surface
_dispSurface.fillRect(Rect(_dispSurface.w, _dispSurface.h), _dispBackColor);
_dispFont->drawString(&_dispSurface, dispText, 0, 0, _dispSurface.w, _dispForeColor);
String beforeCaret(wholeText.c_str() + _dispI, wholeText.c_str() + cursorPos);
_caretX = _dispFont->getStringWidth(beforeCaret);
if (_drawCaret) _dispSurface.drawLine(_caretX, 0, _caretX, _dispSurface.h, _dispForeColor);

View File

@ -62,9 +62,9 @@ public:
/**
* Interrupts the event loop and resets the overlay to its initial state.
*/
*/
void close();
bool isDisplaying() { return _displaying; }
/**
@ -73,7 +73,7 @@ public:
void reset();
/**
* Activates drag mode. Takes the keyboard-relative coordinates of the
* Activates drag mode. Takes the keyboard-relative coordinates of the
* cursor as an argument.
*/
void startDrag(int16 x, int16 y);
@ -82,16 +82,16 @@ public:
* Deactivates drag mode
* */
void endDrag();
/**
* Checks for a screen change in the backend and re-inits the virtual
* Checks for a screen change in the backend and re-inits the virtual
* keyboard if it has.
*/
void checkScreenChanged();
/**
* Sets the GUI's internal screen size variables
*/
*/
void initSize(int16 w, int16 h);
private:

View File

@ -38,7 +38,7 @@
namespace Common {
VirtualKeyboardParser::VirtualKeyboardParser(VirtualKeyboard *kbd)
VirtualKeyboardParser::VirtualKeyboardParser(VirtualKeyboard *kbd)
: XMLParser(), _keyboard(kbd) {
}
@ -59,7 +59,7 @@ bool VirtualKeyboardParser::closedKeyCallback(ParserNode *node) {
return parserError("Initial mode of keyboard pack not defined");
} else if (node->name.equalsIgnoreCase("mode")) {
if (!_layoutParsed) {
return parserError("'%s' layout missing from '%s' mode",
return parserError("'%s' layout missing from '%s' mode",
_mode->resolution.c_str(), _mode->name.c_str());
}
}
@ -119,7 +119,7 @@ bool VirtualKeyboardParser::parserCallback_mode(ParserNode *node) {
String resolutions = node->values["resolutions"];
StringTokenizer tok (resolutions, " ,");
// select best resolution simply by minimising the difference between the
// select best resolution simply by minimising the difference between the
// overlay size and the resolution dimensions.
// TODO: improve this by giving preference to a resolution that is smaller
// than the overlay res (so the keyboard can't be too big for the screen)
@ -200,7 +200,7 @@ bool VirtualKeyboardParser::parserCallback_event(ParserNode *node) {
delete evt;
return parserError("Key modifier element must contain modifier attributes");
}
evt->type = VirtualKeyboard::kVKEventModifier;
byte *flags = (byte*) malloc(sizeof(byte));
*(flags) = parseFlags(node->values["modifiers"]);

View File

@ -38,13 +38,13 @@
** Virtual Keyboard Pack File Format **
***************************************
The new virtual keyboard for ScummVM is implemented in the same way as a HTML
ImageMap. It uses a single bitmap of the entire keyboard layout and then a
image map description allows certain areas of the bitmap to be given special
actions. Most of these actions will be a virtual key press event, but there
will also be special keys that will change the keyboard layout or close the
The new virtual keyboard for ScummVM is implemented in the same way as a HTML
ImageMap. It uses a single bitmap of the entire keyboard layout and then a
image map description allows certain areas of the bitmap to be given special
actions. Most of these actions will be a virtual key press event, but there
will also be special keys that will change the keyboard layout or close the
keyboard. The HTML image map description is contained in a larger XML file that
can describe all the different modes of the keyboard, and also different
can describe all the different modes of the keyboard, and also different
keyboard layouts for different screen resolutions.
********************************************
@ -92,7 +92,7 @@ keyboard layouts for different screen resolutions.
<keyboard>
This is the required, root element of the file format.
This is the required, root element of the file format.
required attributes:
- initial_mode: name of the mode the keyboard will show initially
@ -108,12 +108,12 @@ child tags:
<mode>
This tag encapsulates a single mode of the keyboard. Within are a number of
This tag encapsulates a single mode of the keyboard. Within are a number of
layouts, which provide the specific implementation at different resolutions.
required attributes:
- name: the name of the mode
- resolutions: list of the different layout resolutions
- name: the name of the mode
- resolutions: list of the different layout resolutions
child tags:
- layout
@ -129,12 +129,12 @@ same as an event's name.
required attributes:
- name: name of the event
- type: key | modifier | switch_mode | submit | cancel | clear | delete |
- type: key | modifier | switch_mode | submit | cancel | clear | delete |
move_left | move_right - see VirtualKeyboard::EventType for explanation
for key events
- code / ascii: describe a key press in ScummVM KeyState format
for key and modifier events
- modifiers: modifier keystate as comma-separated list of shift, ctrl and/or
- modifiers: modifier keystate as comma-separated list of shift, ctrl and/or
alt.
for switch_mode events
- mode: name of the mode that should be switched to
@ -148,8 +148,8 @@ required attributes:
- resolution: the screen resolution that this layout is designed for
- bitmap: filename of the 24-bit bitmap that will be used for this layout
optional attributes:
- transparent_color: color in r,g,b format that will be used for keycolor
optional attributes:
- transparent_color: color in r,g,b format that will be used for keycolor
transparency (defaults to (255,0,255).
- display_font_color: color in r,g,b format that will be used for the text of
the keyboard display (defaults to (0,0,0).
@ -161,13 +161,13 @@ child nodes:
<map>
These tags describe the image map for a particular layout. It uses the same
format as HTML image maps. The only area shapes that are supported are
These tags describe the image map for a particular layout. It uses the same
format as HTML image maps. The only area shapes that are supported are
rectangles and polygons. The target attribute of each area should be the name
of an event for this mode (see <event> tag). They will usually be generated by
an external tool such as GIMP's Image Map plugin, and so will not be written
by hand, but for more information on HTML image map format see
- http://www.w3schools.com/TAGS/tag_map.asp
an external tool such as GIMP's Image Map plugin, and so will not be written
by hand, but for more information on HTML image map format see
- http://www.w3schools.com/TAGS/tag_map.asp
- http://www.w3schools.com/TAGS/tag_area.asp
*/
@ -177,21 +177,21 @@ namespace Common {
/**
* Subclass of Common::XMLParser that parses the virtual keyboard pack
* description file
*/
*/
class VirtualKeyboardParser : public XMLParser {
public:
/**
* Enum dictating how extensive a parse will be
* Enum dictating how extensive a parse will be
*/
enum ParseMode {
/**
* Full parse - when loading keyboard pack for first time
*/
kParseFull,
/**
* Just check resolutions and reload layouts if needed - following a
kParseFull,
/**
* Just check resolutions and reload layouts if needed - following a
* change in screen size
*/
kParseCheckResolutions

View File

@ -97,7 +97,7 @@ bool VirtualKeyboard::loadKeyboardPack(String packName) {
// uncompressed keyboard pack
if (!_parser->loadFile(vkDir.getChild(packName + ".xml")))
return false;
} else if (vkDir.getChild(packName + ".zip").exists()) {
// compressed keyboard pack
#ifdef USE_ZLIB
@ -239,7 +239,7 @@ void VirtualKeyboard::close(bool submit) {
_kbdGUI->close();
}
bool VirtualKeyboard::isDisplaying() {
bool VirtualKeyboard::isDisplaying() {
return _kbdGUI->isDisplaying();
}
@ -359,7 +359,7 @@ void VirtualKeyboard::KeyPressQueue::clear() {
_strChanged = true;
}
bool VirtualKeyboard::KeyPressQueue::empty() {
bool VirtualKeyboard::KeyPressQueue::empty() {
return _keys.empty();
}

View File

@ -54,7 +54,7 @@ class VirtualKeyboardParser;
* This includes storage of the virtual key press events when the user clicks
* a key and delivery of them when the keyboard is closed, as well as managing
* the internal state of the keyboard, such as its active mode.
*/
*/
class VirtualKeyboard {
protected:
@ -73,7 +73,7 @@ protected:
kVKEventSubmit,
/** Close the keyboard, without submitting keypresses */
kVKEventCancel,
/** Clear the virtual keypress queue */
/** Clear the virtual keypress queue */
kVKEventClear,
/** Move the keypress queue insert position backwards */
kVKEventMoveLeft,
@ -87,23 +87,23 @@ protected:
struct VKEvent {
String name;
VKEventType type;
/**
/**
* Void pointer that will point to different types of data depending
* on the type of the event, these are:
* - KeyState struct for kVKEventKey events
* - a flags byte for kVKEventModifier events
* - c-string stating the name of the new mode for kSwitchMode events
*/
*/
void *data;
VKEvent() : data(0) {}
~VKEvent() {
if (data)
free(data);
}
};
typedef HashMap<String, VKEvent*> VKEventMap;
typedef HashMap<String, VKEvent*> VKEventMap;
/**
* Mode struct encapsulates all the data for each mode of the keyboard
@ -122,7 +122,7 @@ protected:
Mode() : image(0) {}
~Mode() { delete image; }
};
typedef HashMap<String, Mode, IgnoreCase_Hash, IgnoreCase_EqualTo> ModeMap;
enum HorizontalAlignment {
@ -143,7 +143,7 @@ protected:
uint strLen;
};
/**
/**
* Class that stores the queue of virtual key presses, as well as
* maintaining a string that represents a preview of the queue
*/
@ -182,11 +182,11 @@ public:
VirtualKeyboard();
virtual ~VirtualKeyboard();
/**
* Loads the keyboard pack with the given name.
* The system first looks for an uncompressed keyboard pack by searching
* for packName.xml in the filesystem, if this does not exist then it
* The system first looks for an uncompressed keyboard pack by searching
* for packName.xml in the filesystem, if this does not exist then it
* searches for a compressed keyboard pack by looking for packName.zip.
* @param packName name of the keyboard pack
*/
@ -201,7 +201,7 @@ public:
/**
* Hides the keyboard, ending the event loop.
* @param submit if true all accumulated key presses are submitted to
* @param submit if true all accumulated key presses are submitted to
* the event manager
*/
void close(bool submit);
@ -218,7 +218,7 @@ public:
return _loaded;
}
protected:
protected:
OSystem *_system;
Archive *_fileArchive;
@ -227,7 +227,7 @@ protected:
VirtualKeyboardGUI *_kbdGUI;
KeyPressQueue _keyQueue;
friend class VirtualKeyboardParser;
VirtualKeyboardParser *_parser;

View File

@ -221,7 +221,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
}
static void setupGraphics(OSystem &system) {
system.beginGFXTransaction();
// Set the user specified graphics mode (if any).
system.setGraphicsMode(ConfMan.get("gfx_mode").c_str());
@ -265,13 +265,13 @@ static void setupKeymapper(OSystem &system) {
// Now create the global keymap
act = new Action(globalMap, "MENU", "Menu", kGenericActionType, kSelectKeyType);
act->addKeyEvent(KeyState(KEYCODE_F5, ASCII_F5, 0));
act = new Action(globalMap, "SKCT", "Skip", kGenericActionType, kActionKeyType);
act->addKeyEvent(KeyState(KEYCODE_ESCAPE, ASCII_ESCAPE, 0));
act = new Action(globalMap, "PAUS", "Pause", kGenericActionType, kStartKeyType);
act->addKeyEvent(KeyState(KEYCODE_SPACE, ' ', 0));
act = new Action(globalMap, "SKLI", "Skip line", kGenericActionType, kActionKeyType);
act->addKeyEvent(KeyState(KEYCODE_PERIOD, '.', 0));
@ -344,7 +344,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
setupGraphics(system);
// Init the event manager. As the virtual keyboard is loaded here, it must
// Init the event manager. As the virtual keyboard is loaded here, it must
// take place after the backend is initiated and the screen has been setup
system.getEventManager()->init();
@ -395,7 +395,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
// screen to draw on yet.
warning("Could not find any engine capable of running the selected game");
}
// reset the graphics to default
setupGraphics(system);
launcherDialog();

View File

@ -159,7 +159,7 @@ namespace ListInternal {
bool operator==(const Iterator<T>& a, const ConstIterator<T>& b) {
return a._node == b._node;
}
template<typename T>
bool operator!=(const Iterator<T>& a, const ConstIterator<T>& b) {
return a._node != b._node;

View File

@ -89,7 +89,7 @@ private:
public:
Stack<T>() {}
Stack<T>(const Array<T> &stackContent) : _stack(stackContent) {}
bool empty() const {
return _stack.empty();
}

View File

@ -347,7 +347,7 @@ int AgiEngine::playGame() {
}
interpretCycle();
// Check if the user has asked to load a game from the command line
// or the launcher
if (firstLoop) {

View File

@ -195,7 +195,7 @@ static const AGIGameDescription gameDescriptions[] = {
// Black Cauldron (PC 5.25") 2.10 11/10/88 [AGI 3.002.098]
GAME3("bc", "2.10 1988-11-10 5.25\"", "bcdir", "0c5a9acbcc7e51127c34818e75806df6", 0x3149, GID_BC),
// Black Cauldron (PC) 2.10 [AGI 3.002.097]
GAME3("bc", "2.10", "bcdir", "0de3953c9225009dc91e5b0d1692967b", 0x3149, GID_BC),
@ -524,7 +524,7 @@ static const AGIGameDescription gameDescriptions[] = {
// Troll's Tale
GAMEpre_PS("troll", "", "troll.img", "62903f264b3d849be4214b3a5c42a2fa", 184320, 0x0000, GID_TROLL, Common::kPlatformPC),
// Winnie the Pooh in the Hundred Acre Wood
GAMEpre_P("winnie", "", "title.pic", "2e7900c1ccaa7671d65405f6d1efed30", 0x0000, GID_WINNIE, Common::kPlatformPC),

View File

@ -115,7 +115,7 @@ bool Mickey::chooseY_N(int ofsPrompt, bool fErrorMsg) {
break;
}
}
return false;
}
@ -509,7 +509,7 @@ bool Mickey::getMenuSelRow(MSA_MENU menu, int *sel0, int *sel1, int iRow) {
animate();
drawMenu(menu, *sel0, *sel1);
}
return false;
}
@ -535,7 +535,7 @@ void Mickey::getMenuSel(char *buffer, int *sel0, int *sel1) {
}
}
}
if (_clickToMove || getMenuSelRow(menu, sel0, sel1, 2)) {
break;
}
@ -1358,11 +1358,11 @@ void Mickey::intro() {
// show copyright and play theme
printExeMsg(IDO_MSA_COPYRIGHT);
// Quit if necessary
if (_vm->shouldQuit())
return;
playSound(IDI_MSA_SND_THEME);
// load game
@ -1375,7 +1375,7 @@ void Mickey::intro() {
return;
}
}
// Quit if necessary
if (_vm->shouldQuit())
return;
@ -1386,7 +1386,7 @@ void Mickey::intro() {
drawRoom();
printRoomDesc();
// Quit if necessary
if (_vm->shouldQuit())
return;
@ -2104,7 +2104,7 @@ void Mickey::waitAnyKey(bool anim) {
break;
}
}
if (anim) {
animate();
_vm->_gfx->doUpdate();

View File

@ -565,7 +565,7 @@ void Troll::gameLoop() {
memset(_roomStates, 0, sizeof(_roomStates));
memset(_inventory, 0, sizeof(_inventory));
while (!done && !_vm->shouldQuit()) {
*menu = 0;

View File

@ -446,7 +446,7 @@ int Winnie::parser(int pc, int index, uint8 *buffer) {
_vm->_gfx->doUpdate();
_vm->_system->updateScreen();
}
return IDI_WTP_PAR_OK;
}
@ -1016,7 +1016,7 @@ phase2:
if (parser(hdr.ofsDesc[iBlock] - _roomOffset, iBlock, roomdata) == IDI_WTP_PAR_BACK)
goto phase1;
}
while (!_vm->shouldQuit()) {
for (iBlock = 0; iBlock < IDI_WTP_MAX_BLOCK; iBlock++) {
switch(parser(hdr.ofsBlock[iBlock] - _roomOffset, iBlock, roomdata)) {

View File

@ -46,11 +46,11 @@ AgiSound *AgiSound::createFromRawResource(uint8 *data, uint32 len, int resnum, S
uint16 type = READ_LE_UINT16(data);
switch (type) { // Create a sound object based on the type
case AGI_SOUND_SAMPLE:
case AGI_SOUND_SAMPLE:
return new IIgsSample(data, len, resnum, manager);
case AGI_SOUND_MIDI:
case AGI_SOUND_MIDI:
return new IIgsMidi (data, len, resnum, manager);
case AGI_SOUND_4CHN:
case AGI_SOUND_4CHN:
return new PCjrSound (data, len, resnum, manager);
}

View File

@ -272,9 +272,9 @@ char *AgiEngine::wordWrapString(const char *s, int *len) {
if (wLen) {
memcpy(outStr, pWord, wLen);
outStr += wLen;
}
}
lnLen += wLen+1;
if (lnLen > msgWidth) {
msgWidth = lnLen;

View File

@ -1770,104 +1770,104 @@ static const byte english_elvira1Font[] = {
};
static const byte english_pnFont[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00,
0x00, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x24, 0x7E, 0x24, 0x24, 0x7E, 0x24, 0x00,
0x00, 0x08, 0x3E, 0x28, 0x3E, 0x0A, 0x3E, 0x08,
0x00, 0x62, 0x64, 0x08, 0x10, 0x26, 0x46, 0x00,
0x00, 0x10, 0x28, 0x10, 0x2A, 0x44, 0x3A, 0x00,
0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00,
0x00, 0x20, 0x10, 0x10, 0x10, 0x10, 0x20, 0x00,
0x00, 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14, 0x00,
0x00, 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10,
0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
0x00, 0x3C, 0x46, 0x4A, 0x52, 0x62, 0x3C, 0x00,
0x00, 0x18, 0x28, 0x08, 0x08, 0x08, 0x3E, 0x00,
0x00, 0x3C, 0x42, 0x02, 0x3C, 0x40, 0x7E, 0x00,
0x00, 0x3C, 0x42, 0x0C, 0x02, 0x42, 0x3C, 0x00,
0x00, 0x08, 0x18, 0x28, 0x48, 0x7E, 0x08, 0x00,
0x00, 0x7E, 0x40, 0x7C, 0x02, 0x42, 0x3C, 0x00,
0x00, 0x3C, 0x40, 0x7C, 0x42, 0x42, 0x3C, 0x00,
0x00, 0x7E, 0x02, 0x04, 0x08, 0x10, 0x10, 0x00,
0x00, 0x3C, 0x42, 0x3C, 0x42, 0x42, 0x3C, 0x00,
0x00, 0x3C, 0x42, 0x42, 0x3E, 0x02, 0x3C, 0x00,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00,
0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x10, 0x20,
0x00, 0x00, 0x04, 0x08, 0x10, 0x08, 0x04, 0x00,
0x00, 0x00, 0x00, 0x3E, 0x00, 0x3E, 0x00, 0x00,
0x00, 0x00, 0x10, 0x08, 0x04, 0x08, 0x10, 0x00,
0x00, 0x3C, 0x42, 0x04, 0x08, 0x00, 0x08, 0x00,
0x00, 0x3C, 0x4A, 0x56, 0x5E, 0x40, 0x3C, 0x00,
0x00, 0x3C, 0x42, 0x42, 0x7E, 0x42, 0x42, 0x00,
0x00, 0x7C, 0x42, 0x7C, 0x42, 0x42, 0x7C, 0x00,
0x00, 0x3C, 0x42, 0x40, 0x40, 0x42, 0x3C, 0x00,
0x00, 0x78, 0x44, 0x42, 0x42, 0x44, 0x78, 0x00,
0x00, 0x7E, 0x40, 0x7C, 0x40, 0x40, 0x7E, 0x00,
0x00, 0x7E, 0x40, 0x7C, 0x40, 0x40, 0x40, 0x00,
0x00, 0x3C, 0x42, 0x40, 0x4E, 0x42, 0x3C, 0x00,
0x00, 0x42, 0x42, 0x7E, 0x42, 0x42, 0x42, 0x00,
0x00, 0x3E, 0x08, 0x08, 0x08, 0x08, 0x3E, 0x00,
0x00, 0x02, 0x02, 0x02, 0x42, 0x42, 0x3C, 0x00,
0x00, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, 0x00,
0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7E, 0x00,
0x00, 0x42, 0x66, 0x5A, 0x42, 0x42, 0x42, 0x00,
0x00, 0x42, 0x62, 0x52, 0x4A, 0x46, 0x42, 0x00,
0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00,
0x00, 0x7C, 0x42, 0x42, 0x7C, 0x40, 0x40, 0x00,
0x00, 0x3C, 0x42, 0x42, 0x52, 0x4A, 0x3C, 0x00,
0x00, 0x7C, 0x42, 0x42, 0x7C, 0x44, 0x42, 0x00,
0x00, 0x3C, 0x40, 0x3C, 0x02, 0x42, 0x3C, 0x00,
0x00, 0xFE, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00,
0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00,
0x00, 0x42, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00,
0x00, 0x42, 0x42, 0x42, 0x42, 0x5A, 0x24, 0x00,
0x00, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x00,
0x00, 0x82, 0x44, 0x28, 0x10, 0x10, 0x10, 0x00,
0x00, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x00,
0x00, 0x0E, 0x08, 0x08, 0x08, 0x08, 0x0E, 0x00,
0x00, 0x00, 0x40, 0x20, 0x10, 0x08, 0x04, 0x00,
0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x70, 0x00,
0x00, 0x10, 0x38, 0x54, 0x10, 0x10, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
0x00, 0x1C, 0x22, 0x78, 0x20, 0x20, 0x7E, 0x00,
0x00, 0x00, 0x38, 0x04, 0x3C, 0x44, 0x3C, 0x00,
0x00, 0x20, 0x20, 0x3C, 0x22, 0x22, 0x3C, 0x00,
0x00, 0x00, 0x1C, 0x20, 0x20, 0x20, 0x1C, 0x00,
0x00, 0x04, 0x04, 0x3C, 0x44, 0x44, 0x3C, 0x00,
0x00, 0x00, 0x38, 0x44, 0x78, 0x40, 0x3C, 0x00,
0x00, 0x0C, 0x10, 0x18, 0x10, 0x10, 0x10, 0x00,
0x00, 0x00, 0x3C, 0x44, 0x44, 0x3C, 0x04, 0x38,
0x00, 0x40, 0x40, 0x78, 0x44, 0x44, 0x44, 0x00,
0x00, 0x10, 0x00, 0x30, 0x10, 0x10, 0x38, 0x00,
0x00, 0x04, 0x00, 0x04, 0x04, 0x04, 0x24, 0x18,
0x00, 0x20, 0x28, 0x30, 0x30, 0x28, 0x24, 0x00,
0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x00,
0x00, 0x00, 0x68, 0x54, 0x54, 0x54, 0x54, 0x00,
0x00, 0x00, 0x78, 0x44, 0x44, 0x44, 0x44, 0x00,
0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
0x00, 0x00, 0x78, 0x44, 0x44, 0x78, 0x40, 0x40,
0x00, 0x00, 0x3C, 0x44, 0x44, 0x3C, 0x04, 0x06,
0x00, 0x00, 0x1C, 0x20, 0x20, 0x20, 0x20, 0x00,
0x00, 0x00, 0x38, 0x40, 0x38, 0x04, 0x78, 0x00,
0x00, 0x10, 0x38, 0x10, 0x10, 0x10, 0x0C, 0x00,
0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00,
0x00, 0x00, 0x44, 0x44, 0x28, 0x28, 0x10, 0x00,
0x00, 0x00, 0x44, 0x54, 0x54, 0x54, 0x28, 0x00,
0x00, 0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
0x00, 0x00, 0x44, 0x44, 0x44, 0x3C, 0x04, 0x38,
0x00, 0x00, 0x7C, 0x08, 0x10, 0x20, 0x7C, 0x00,
0x00, 0x0E, 0x08, 0x30, 0x08, 0x08, 0x0E, 0x00,
0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
0x00, 0x70, 0x10, 0x0C, 0x10, 0x10, 0x70, 0x00,
0x00, 0x14, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3C, 0x42, 0x99, 0xA1, 0xA1, 0x99, 0x42, 0x3C,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00,
0x00, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x24, 0x7E, 0x24, 0x24, 0x7E, 0x24, 0x00,
0x00, 0x08, 0x3E, 0x28, 0x3E, 0x0A, 0x3E, 0x08,
0x00, 0x62, 0x64, 0x08, 0x10, 0x26, 0x46, 0x00,
0x00, 0x10, 0x28, 0x10, 0x2A, 0x44, 0x3A, 0x00,
0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00,
0x00, 0x20, 0x10, 0x10, 0x10, 0x10, 0x20, 0x00,
0x00, 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14, 0x00,
0x00, 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10,
0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
0x00, 0x3C, 0x46, 0x4A, 0x52, 0x62, 0x3C, 0x00,
0x00, 0x18, 0x28, 0x08, 0x08, 0x08, 0x3E, 0x00,
0x00, 0x3C, 0x42, 0x02, 0x3C, 0x40, 0x7E, 0x00,
0x00, 0x3C, 0x42, 0x0C, 0x02, 0x42, 0x3C, 0x00,
0x00, 0x08, 0x18, 0x28, 0x48, 0x7E, 0x08, 0x00,
0x00, 0x7E, 0x40, 0x7C, 0x02, 0x42, 0x3C, 0x00,
0x00, 0x3C, 0x40, 0x7C, 0x42, 0x42, 0x3C, 0x00,
0x00, 0x7E, 0x02, 0x04, 0x08, 0x10, 0x10, 0x00,
0x00, 0x3C, 0x42, 0x3C, 0x42, 0x42, 0x3C, 0x00,
0x00, 0x3C, 0x42, 0x42, 0x3E, 0x02, 0x3C, 0x00,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00,
0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x10, 0x20,
0x00, 0x00, 0x04, 0x08, 0x10, 0x08, 0x04, 0x00,
0x00, 0x00, 0x00, 0x3E, 0x00, 0x3E, 0x00, 0x00,
0x00, 0x00, 0x10, 0x08, 0x04, 0x08, 0x10, 0x00,
0x00, 0x3C, 0x42, 0x04, 0x08, 0x00, 0x08, 0x00,
0x00, 0x3C, 0x4A, 0x56, 0x5E, 0x40, 0x3C, 0x00,
0x00, 0x3C, 0x42, 0x42, 0x7E, 0x42, 0x42, 0x00,
0x00, 0x7C, 0x42, 0x7C, 0x42, 0x42, 0x7C, 0x00,
0x00, 0x3C, 0x42, 0x40, 0x40, 0x42, 0x3C, 0x00,
0x00, 0x78, 0x44, 0x42, 0x42, 0x44, 0x78, 0x00,
0x00, 0x7E, 0x40, 0x7C, 0x40, 0x40, 0x7E, 0x00,
0x00, 0x7E, 0x40, 0x7C, 0x40, 0x40, 0x40, 0x00,
0x00, 0x3C, 0x42, 0x40, 0x4E, 0x42, 0x3C, 0x00,
0x00, 0x42, 0x42, 0x7E, 0x42, 0x42, 0x42, 0x00,
0x00, 0x3E, 0x08, 0x08, 0x08, 0x08, 0x3E, 0x00,
0x00, 0x02, 0x02, 0x02, 0x42, 0x42, 0x3C, 0x00,
0x00, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, 0x00,
0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7E, 0x00,
0x00, 0x42, 0x66, 0x5A, 0x42, 0x42, 0x42, 0x00,
0x00, 0x42, 0x62, 0x52, 0x4A, 0x46, 0x42, 0x00,
0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00,
0x00, 0x7C, 0x42, 0x42, 0x7C, 0x40, 0x40, 0x00,
0x00, 0x3C, 0x42, 0x42, 0x52, 0x4A, 0x3C, 0x00,
0x00, 0x7C, 0x42, 0x42, 0x7C, 0x44, 0x42, 0x00,
0x00, 0x3C, 0x40, 0x3C, 0x02, 0x42, 0x3C, 0x00,
0x00, 0xFE, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00,
0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00,
0x00, 0x42, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00,
0x00, 0x42, 0x42, 0x42, 0x42, 0x5A, 0x24, 0x00,
0x00, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x00,
0x00, 0x82, 0x44, 0x28, 0x10, 0x10, 0x10, 0x00,
0x00, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x00,
0x00, 0x0E, 0x08, 0x08, 0x08, 0x08, 0x0E, 0x00,
0x00, 0x00, 0x40, 0x20, 0x10, 0x08, 0x04, 0x00,
0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x70, 0x00,
0x00, 0x10, 0x38, 0x54, 0x10, 0x10, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
0x00, 0x1C, 0x22, 0x78, 0x20, 0x20, 0x7E, 0x00,
0x00, 0x00, 0x38, 0x04, 0x3C, 0x44, 0x3C, 0x00,
0x00, 0x20, 0x20, 0x3C, 0x22, 0x22, 0x3C, 0x00,
0x00, 0x00, 0x1C, 0x20, 0x20, 0x20, 0x1C, 0x00,
0x00, 0x04, 0x04, 0x3C, 0x44, 0x44, 0x3C, 0x00,
0x00, 0x00, 0x38, 0x44, 0x78, 0x40, 0x3C, 0x00,
0x00, 0x0C, 0x10, 0x18, 0x10, 0x10, 0x10, 0x00,
0x00, 0x00, 0x3C, 0x44, 0x44, 0x3C, 0x04, 0x38,
0x00, 0x40, 0x40, 0x78, 0x44, 0x44, 0x44, 0x00,
0x00, 0x10, 0x00, 0x30, 0x10, 0x10, 0x38, 0x00,
0x00, 0x04, 0x00, 0x04, 0x04, 0x04, 0x24, 0x18,
0x00, 0x20, 0x28, 0x30, 0x30, 0x28, 0x24, 0x00,
0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x00,
0x00, 0x00, 0x68, 0x54, 0x54, 0x54, 0x54, 0x00,
0x00, 0x00, 0x78, 0x44, 0x44, 0x44, 0x44, 0x00,
0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
0x00, 0x00, 0x78, 0x44, 0x44, 0x78, 0x40, 0x40,
0x00, 0x00, 0x3C, 0x44, 0x44, 0x3C, 0x04, 0x06,
0x00, 0x00, 0x1C, 0x20, 0x20, 0x20, 0x20, 0x00,
0x00, 0x00, 0x38, 0x40, 0x38, 0x04, 0x78, 0x00,
0x00, 0x10, 0x38, 0x10, 0x10, 0x10, 0x0C, 0x00,
0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00,
0x00, 0x00, 0x44, 0x44, 0x28, 0x28, 0x10, 0x00,
0x00, 0x00, 0x44, 0x54, 0x54, 0x54, 0x28, 0x00,
0x00, 0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
0x00, 0x00, 0x44, 0x44, 0x44, 0x3C, 0x04, 0x38,
0x00, 0x00, 0x7C, 0x08, 0x10, 0x20, 0x7C, 0x00,
0x00, 0x0E, 0x08, 0x30, 0x08, 0x08, 0x0E, 0x00,
0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
0x00, 0x70, 0x10, 0x0C, 0x10, 0x10, 0x70, 0x00,
0x00, 0x14, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3C, 0x42, 0x99, 0xA1, 0xA1, 0x99, 0x42, 0x3C,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) {

View File

@ -539,7 +539,7 @@ void AGOSEngine::dumpBitmap(const char *filename, const byte *offs, uint16 w, ui
src += 5;
} while (--count);
dst += w;
}
}
} else if (flags & 0x80) {
for (i = 0; i != w; i += 2) {
byte *c = vc10_depackColumn(&state);
@ -580,7 +580,7 @@ void AGOSEngine::palLoad(byte *pal, const byte *vga1, int a, int b) {
const byte *src;
uint16 num, palSize;
byte *palptr = (byte *)&pal[0];
if (getGameType() == GType_FF || getGameType() == GType_PP) {
num = 256;
palSize = 768;

View File

@ -354,11 +354,11 @@ void AGOSEngine::drawIcon(WindowBlock *window, uint icon, uint x, uint y) {
dst += _dxSurfacePitch;
}
} else {
uint8 palette[4];
palette[0] = *src >> 4;
palette[1] = *src++ & 0xf;
palette[2] = *src >> 4;
palette[3] = *src++ & 0xf;
uint8 palette[4];
palette[0] = *src >> 4;
palette[1] = *src++ & 0xf;
palette[2] = *src >> 4;
palette[3] = *src++ & 0xf;
for (int yp = 0; yp < 24; ++yp, src += 6) {
// Get bit-set representing the 24 pixels for the line
uint32 v1 = (READ_BE_UINT16(src) << 8) | *(src + 4);

View File

@ -463,9 +463,9 @@ bool AGOSEngine::processSpecialKeys() {
_lastMinute = t1;
}
}
if (shouldQuit())
_exitCutscene = true;
_exitCutscene = true;
switch (_keyPressed.keycode) {
case Common::KEYCODE_UP:
@ -694,7 +694,7 @@ void AGOSEngine_PN::interact(char *buffer, uint8 size) {
_inputting = true;
_inputReady = true;
}
while (!shouldQuit() && _inputReady) {
if (!_noScanFlag && _scanFlag) {
buffer[0] = 1;
@ -744,7 +744,7 @@ void AGOSEngine_PN::clearCursor(WindowBlock *window) {
bool AGOSEngine_PN::processSpecialKeys() {
if (shouldQuit())
_exitCutscene = true;
_exitCutscene = true;
switch (_keyPressed.keycode) {
case Common::KEYCODE_ESCAPE:

View File

@ -704,7 +704,7 @@ static bool getBit(Common::Stack<uint32> &dataList, uint32 &srcVal) {
static uint32 copyBits(Common::Stack<uint32> &dataList, uint32 &srcVal, int numBits) {
uint32 destVal = 0;
for (int i = 0; i < numBits; ++i) {
bool f = getBit(dataList, srcVal);
destVal = (destVal << 1) | (f ? 1 : 0);

View File

@ -147,7 +147,7 @@ void AGOSEngine_PN::opn_opcode01() {
int32 sp = varval() + varval();
_variableArray[12] = sp % 65536;
_variableArray[13] = sp / 65536;
if (sp > 65535)
if (sp > 65535)
sp=65535;
writeval(str, (int)sp);
setScriptReturn(true);
@ -329,7 +329,7 @@ void AGOSEngine_PN::opn_opcode25() {
void AGOSEngine_PN::opn_opcode26() {
while ((_stackbase->classnum != -1) && (_stackbase != NULL))
junkstack();
dumpstack();
dumpstack();
setScriptReturn(true);
}
@ -371,10 +371,10 @@ void AGOSEngine_PN::opn_opcode31() {
slot = matchSaveGame(_saveFile, countSaveGames());
strcpy(bf, genSaveName(slot));
break;
case 1:
case 1:
strcpy(bf, "test.sav");
break;
case 2:
case 2:
// NOTE: Is this case ever used?
error("opn_opcode31: case 2");
break;
@ -776,7 +776,7 @@ void AGOSEngine_PN::writeval(uint8 *ptr, int val) {
_workptr = ptr;
_linct = 255;
if ((a = readfromline()) < 247)
if ((a = readfromline()) < 247)
error("writeval: Write to constant (%d)", a);
switch (a) {
@ -836,7 +836,7 @@ int AGOSEngine_PN::actCallD(int n) {
funcentry(pf, n);
addstack(-1);
funccpy(pf);
setposition(n, 0);
setposition(n, 0);
return(doline(1));
}
@ -1065,7 +1065,7 @@ void AGOSEngine_PN::dumpstack() {
if (_stackbase == NULL)
error("dumpstack: Stack underflow or unknown longjmp");
a = _stackbase->nextframe;
a = _stackbase->nextframe;
free((char *)_stackbase);
_stackbase = a;
}
@ -1076,7 +1076,7 @@ void AGOSEngine_PN::junkstack() {
if (_stackbase == NULL)
error("junkstack: Stack underflow or unknown longjmp");
a = _stackbase->nextframe;
a = _stackbase->nextframe;
if (_stackbase->classnum == -1)
free((char *)_stackbase->savearea);
free((char *)_stackbase);
@ -1100,7 +1100,7 @@ void AGOSEngine_PN::popstack(int type) {
b = 0;
while (a < 6)
_variableArray[b++] = _stackbase->flag[a++];
b = 24;
b = 24;
a = 0;
while (a < 8)
_variableArray[b++] = _stackbase->param[a++];

View File

@ -56,7 +56,7 @@ byte *AGOSEngine::uncompressToken(byte a, byte *ptr) {
if (a == 0xFF || a == 0xFE || a == 0xFD) {
if (a == 0xFF)
ptr2 = _twoByteTokenStrings;
if (a == 0xFE)
if (a == 0xFE)
ptr2 = _secondTwoByteTokenStrings;
if (a == 0xFD)
ptr2 = _thirdTwoByteTokenStrings;
@ -79,7 +79,7 @@ byte *AGOSEngine::uncompressToken(byte a, byte *ptr) {
count1++;
}
ptr1 = _byteTokenStrings; /* Find it */
while (count1--) {
while (count1--) {
while (*ptr1++)
;
}
@ -224,7 +224,7 @@ l1: _stringTabPtr[i++] = mem;
;
mem++;
}
_stringTabPos = i;
}
}
@ -936,7 +936,7 @@ char *AGOSEngine_PN::unctok(char *c, int n) {
*c = 0;
return c;
}
void AGOSEngine_PN::uncomstr(char *c, uint32 x) {
if (x > _textBaseSize)
error("UNCOMSTR: TBASE over-run\n");
@ -1441,7 +1441,7 @@ void AGOSEngine_PN::getResponse(uint16 charNum, uint16 objNum, uint16 &msgNum1,
}
ptr++;
}
while ((num = *ptr++) != 0) {
if (num == objNum) {
msgNum2 = *ptr++;
@ -1534,7 +1534,7 @@ char *AGOSEngine_PN::getMessage(char *msg, uint16 num) {
char *tmpPtr = strPtr1;
char *strPtr2 = strPtr1;
while (*strPtr2 != 0 && *strPtr2 != 32)
while (*strPtr2 != 0 && *strPtr2 != 32)
strPtr2++;
while (*strPtr2) {

View File

@ -540,7 +540,7 @@ int AGOSEngine::startSubroutine(Subroutine *sub) {
// WORKAROUND: If the game is saved, right after Simon is thrown in the dungeon of Sordid's Fortress of Doom,
// the saved game fails to load correctly. When loading the saved game, the sequence of Simon waking is started,
// before the scene is actually reloaded, due to a script bug. We manually add the extra script code from the
// before the scene is actually reloaded, due to a script bug. We manually add the extra script code from the
// updated DOS CD release, which fixed this particular script bug.
if (getGameType() == GType_SIMON2 && sub->id == 12101) {
const byte bit = 228;
@ -577,7 +577,7 @@ restart:
}
// WORKAROUND: Feeble walks in the incorrect direction, when looking at the Vent in the Research and Testing area of
// the Company Central Command Compound. We manually add the extra script code from the updated English 2CD release,
// the Company Central Command Compound. We manually add the extra script code from the updated English 2CD release,
// which fixed this particular script bug.
if (getGameType() == GType_FF && _language == Common::EN_ANY) {
if (sub->id == 39125 && readVariable(84) == 2) {

View File

@ -754,7 +754,7 @@ void AGOSEngine::boxController(uint x, uint y, uint mode) {
if (_clickOnly)
return;
if (best_ha->flags & kBFInvertTouch) {
if (!(best_ha->flags & kBFBoxSelected)) {
hitarea_leave(best_ha, false);
@ -763,7 +763,7 @@ void AGOSEngine::boxController(uint x, uint y, uint mode) {
} else {
if (mode == 0)
return;
if (!(best_ha->flags & kBFInvertSelect))
return;
@ -1145,7 +1145,7 @@ void AGOSEngine_PN::hitBox1(HitArea *ha) {
_mousePrintFG++;
_mouseString1 = _mouseString;
_mouseString = (const char*)"showname \0";
}
}

View File

@ -331,7 +331,7 @@ Palette &Palette::load(const byte *buf, const uint size, const Graphics::PixelFo
const int rBytePos = bytePos(format.rShift, format.bytesPerPixel, isBigEndian(endian));
const int gBytePos = bytePos(format.gShift, format.bytesPerPixel, isBigEndian(endian));
const int bBytePos = bytePos(format.bShift, format.bytesPerPixel, isBigEndian(endian));
for (uint i = 0; i < numColors; i++) {
// format.rMax(), format.gMax(), format.bMax() are also used as masks here
_colors[i].r = (buf[i * format.bytesPerPixel + rBytePos] >> (format.rShift % 8)) & format.rMax();

View File

@ -750,7 +750,7 @@ void processAnimation(void) {
currentActor->flag = 1;
}
currentActor->pathId = computePathfinding(moveInfo, params.X, params.Y,
currentActor->pathId = computePathfinding(moveInfo, params.X, params.Y,
aniX, aniY, currentActor->stepX, currentActor->stepY, currentActor->pathId);
if (currentActor->pathId == ANIM_WAIT) {
@ -804,7 +804,7 @@ void processAnimation(void) {
// , so 'break' statements should *not* be used at the end of case areas
switch (currentActor->phase) {
case ANIM_PHASE_STATIC_END:
case ANIM_PHASE_STATIC:
case ANIM_PHASE_STATIC:
{
// In-place (on the spot) animationos

View File

@ -81,7 +81,7 @@ void restoreBackground(backgroundIncrustStruct *pIncrust) {
int xp = j + X;
int yp = i + Y;
if ((xp >= 0) && (yp >= 0) && (xp < 320) && (yp < 200))
if ((xp >= 0) && (yp >= 0) && (xp < 320) && (yp < 200))
pBackground[yp * 320 + xp] = pIncrust->ptr[i * width + j];
}
}
@ -101,7 +101,7 @@ backgroundIncrustStruct *addBackgroundIncrust(int16 overlayIdx, int16 objectIdx,
// Don't process any further if not a sprite or polygon
if (!ptr) return NULL;
if ((filesDatabase[params.fileIdx].subData.resourceType != OBJ_TYPE_SPRITE) &&
if ((filesDatabase[params.fileIdx].subData.resourceType != OBJ_TYPE_SPRITE) &&
(filesDatabase[params.fileIdx].subData.resourceType != OBJ_TYPE_POLY)) {
return NULL;
}

View File

@ -570,8 +570,8 @@ int findObject(int mouseX, int mouseY, int *outObjOvl, int *outObjIdx) {
cellStruct *currentObject = cellHead.prev;
while (currentObject) {
if (currentObject->overlay > 0 && overlayTable[currentObject->overlay].alreadyLoaded &&
(currentObject->type == OBJ_TYPE_SPRITE || currentObject->type == OBJ_TYPE_MASK ||
if (currentObject->overlay > 0 && overlayTable[currentObject->overlay].alreadyLoaded &&
(currentObject->type == OBJ_TYPE_SPRITE || currentObject->type == OBJ_TYPE_MASK ||
currentObject->type == OBJ_TYPE_EXIT || currentObject->type == OBJ_TYPE_VIRTUAL)) {
const char* pObjectName = getObjectName(currentObject->idx, overlayTable[currentObject->overlay].ovlData->arrayNameObj);
@ -633,7 +633,7 @@ int findObject(int mouseX, int mouseY, int *outObjOvl, int *outObjIdx) {
offset += j;
if (offset >= 0) {
if (filesDatabase[offset].resType == OBJ_TYPE_LINE &&
if (filesDatabase[offset].resType == OBJ_TYPE_LINE &&
filesDatabase[offset].subData.ptr) {
dataPtr = (int16 *)filesDatabase[offset].subData.ptr;
}

View File

@ -424,7 +424,7 @@ int loadSetEntry(const char *name, uint8 *ptr, int currentEntryIdx, int currentD
localBuffer.hotspotY = s4.readUint16BE();
localBuffer.hotspotX = s4.readUint16BE();
if (sec == 1)
if (sec == 1)
// Type 1: Width - (1*2) , Type 5: Width - (5*2)
localBuffer.width -= localBuffer.type * 2;

View File

@ -47,8 +47,8 @@ bool Debugger::cmd_hotspots(int argc, const char **argv) {
cellStruct *currentObject = cellHead.prev;
while (currentObject) {
if (currentObject->overlay > 0 && overlayTable[currentObject->overlay].alreadyLoaded &&
(currentObject->type == OBJ_TYPE_SPRITE || currentObject->type == OBJ_TYPE_MASK ||
if (currentObject->overlay > 0 && overlayTable[currentObject->overlay].alreadyLoaded &&
(currentObject->type == OBJ_TYPE_SPRITE || currentObject->type == OBJ_TYPE_MASK ||
currentObject->type == OBJ_TYPE_EXIT || currentObject->type == OBJ_TYPE_VIRTUAL)) {
const char *pObjectName = getObjectName(currentObject->idx, overlayTable[currentObject->overlay].ovlData->arrayNameObj);

View File

@ -1394,7 +1394,7 @@ int16 Op_SongSize(void) {
*pSize = size;
} else
oldSize = 0;
return oldSize;
}
@ -1412,7 +1412,7 @@ int16 Op_SetPattern(void) {
int16 Op_FadeSong(void) {
_vm->music().fadeSong();
return 0;
}
@ -1646,7 +1646,7 @@ int16 Op_SetVolume(void) {
int volume = 63 - newVolume;
_vm->music().setVolume(volume << 2);
}
return oldVolume >> 2;
}

View File

@ -180,7 +180,7 @@ static void syncFilesDatabase(Common::Serializer &s) {
s.syncAsUint16LE(fe.width);
s.syncAsUint16LE(fe.resType);
s.syncAsUint16LE(fe.height);
// TODO: Have a look at the saving/loading of this pointer
tmp = (fe.subData.ptr) ? 1 : 0;
s.syncAsUint32LE(tmp);
@ -602,7 +602,7 @@ static void DoSync(Common::Serializer &s) {
syncBackgroundTable(s);
syncPalScreen(s);
syncSoundList(s);
for (int i = 0; i < stateID; ++i)
s.syncAsSint16LE(globalVars[i]);

View File

@ -188,7 +188,7 @@ void MusicPlayer::removeSong() {
}
_songPlayed = false;
strcpy(_musicName, "");
}

View File

@ -45,7 +45,7 @@ private:
byte _masterVolume;
byte *_songPointer;
// TODO: lib_SongSize
// TODO: lib_SongSize
int _songSize;
void patchMidi(uint32 adr, const byte *data, int size);

View File

@ -135,8 +135,8 @@ int16 german_fontCharacterTable[256] = {
86, 87, 88, 89, 90, 91, 92,
-1, -1, -1,
0x72,
-1, -1,
0x5e,
-1, -1,
0x5e,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
0x6a,
-1, -1, -1, -1, -1,

View File

@ -371,7 +371,7 @@ void DataIO::openDataFile(const char *src, bool itk) {
ChunkDesc *dataDesc;
char path[128];
int16 file;
char *fakeTotPtr;
char *fakeTotPtr;
strncpy0(path, src, 127);
if (!strchr(path, '.')) {

View File

@ -44,7 +44,7 @@ DemoPlayer::Script DemoPlayer::_scripts[] = {
{kScriptSourceFile, "e.scn"},
{kScriptSourceFile, "i.scn"},
{kScriptSourceFile, "s.scn"},
{kScriptSourceDirect,
{kScriptSourceDirect,
"slide machu.imd 20\nslide conseil.imd 20\nslide cons.imd 20\n" \
"slide tumia.imd 1\nslide tumib.imd 1\nslide tumic.imd 1\n" \
"slide tumid.imd 1\nslide post.imd 1\nslide posta.imd 1\n" \

View File

@ -849,7 +849,7 @@ static const GOBGameDescription gameDescriptions[] = {
kFeaturesNone,
0, 0, 0
},
{ // Supplied by goodoldgeorg in bug report #2563539
{ // Supplied by goodoldgeorg in bug report #2563539
{
"ween",
"",
@ -1489,7 +1489,7 @@ static const GOBGameDescription gameDescriptions[] = {
kGameTypeFascination,
kFeaturesNone,
"disk0.stk", 0, 0
},
},
{
{
"fascination",
@ -1502,7 +1502,7 @@ static const GOBGameDescription gameDescriptions[] = {
kGameTypeFascination,
kFeaturesNone,
"disk0.stk", 0, 0
},
},
{
{
"fascination",
@ -1515,7 +1515,7 @@ static const GOBGameDescription gameDescriptions[] = {
kGameTypeFascination,
kFeaturesNone,
"disk0.stk", 0, 0
},
},
{
{
"fascination",
@ -1528,7 +1528,7 @@ static const GOBGameDescription gameDescriptions[] = {
kGameTypeFascination,
kFeaturesNone,
"disk0.stk", 0, 0
},
},
{
{
"geisha",

View File

@ -234,7 +234,7 @@ void Inter::funcBlock(int16 retFlag) {
// The EGA, Mac and Windows versions of gob1 doesn't add a delay after
// showing images between levels. We manually add it here.
if ((_vm->getGameType() == kGameTypeGob1) &&
( _vm->isEGA() ||
( _vm->isEGA() ||
(_vm->getPlatform() == Common::kPlatformMacintosh) ||
(_vm->getPlatform() == Common::kPlatformWindows))) {

View File

@ -55,8 +55,8 @@ const int Inter_Fascination::_goblinFuncLookUp[][2] = {
{10, 9},
{11, 10},
{12, 11},
{1000, 12},
{1001, 13},
{1000, 12},
{1001, 13},
{1002, 14}
};
@ -515,7 +515,7 @@ void Inter_Fascination::setupOpcodes() {
_opcodesDrawFascination = opcodesDraw;
_opcodesFuncFascination = opcodesFunc;
_opcodesGoblinFascination = opcodesGoblin;
_opcodesGoblinFascination = opcodesGoblin;
}
void Inter_Fascination::executeDrawOpcode(byte i) {
@ -676,14 +676,14 @@ void Inter_Fascination::oFascin_cdUnknown6() {
void Inter_Fascination::oFascin_setRenderFlags() {
int16 expr;
// warning("Fascination oFascin_cdUnknown10 (set render flags)");
// warning("Fascination oFascin_cdUnknown10 (set render flags)");
evalExpr(&expr);
warning("_draw_renderFlags <- %d",expr);
_vm->_draw->_renderFlags = expr;
}
void Inter_Fascination::oFascin_cdUnknown11() {
// warning("Fascination oFascin_cdUnknown11 (set variable)");
// warning("Fascination oFascin_cdUnknown11 (set variable)");
evalExpr(0);
}
@ -744,7 +744,7 @@ const char *Inter_Fascination::getOpcodeGoblinDesc(int i) {
for (int j = 0; j < ARRAYSIZE(_goblinFuncLookUp); j++)
if (_goblinFuncLookUp[j][0] == i)
return _opcodesGoblinFascination[_goblinFuncLookUp[j][1]].desc;
warning("Error in getOpcodeGoblinDesc %d",i);
warning("Error in getOpcodeGoblinDesc %d",i);
return "";
}

View File

@ -1001,7 +1001,7 @@ void Inter_v5::o5_gob96(OpGobParams &params) {
warning("Dynasty Stub: GobFunc 96: %d, %d, %d, %d",
speedThrottle4, speedThrottle3, speedThrottle2, speedThrottle1);
// TODO
// TODO
}
void Inter_v5::o5_gob97(OpGobParams &params) {

View File

@ -86,7 +86,7 @@ enum {
enum {
// FIXME: The following two 'truth values' are stored inside the list
// of "operators". So they somehow coincide with OP_LOAD_VAR_UINT32
// and OP_LOAD_VAR_UINT32_AS_UINT16. I haven't yet quite understood
// and OP_LOAD_VAR_UINT32_AS_UINT16. I haven't yet quite understood
// how, resp. what that means. You have been warned.
GOB_TRUE = 24,
GOB_FALSE = 23

View File

@ -60,7 +60,7 @@ void GraphicsMan::update() {
_fading = 0;
// Clear the buffer when ending the fade out
if (_fading == 2)
if (_fading == 2)
_foreground.fillRect(Common::Rect(640, 320), 0);
}
}

View File

@ -99,17 +99,17 @@ public:
virtual GUI::Debugger *getDebugger();
bool isEGA() const { return (getFeatures() & GF_EGA) != 0; }
virtual Common::Error loadGameState(int slot) {
virtual Common::Error loadGameState(int slot) {
return loadGame(slot) ? Common::kReadingFailed : Common::kNoError;
}
virtual Common::Error saveGameState(int slot, const char *desc) {
String s(desc);
return saveGame(slot, s) ? Common::kReadingFailed : Common::kNoError;
}
virtual bool canLoadGameStateCurrently() {
virtual bool canLoadGameStateCurrently() {
return _saveLoadAllowed && !Fights.isFighting();
}
virtual bool canSaveGameStateCurrently() {
virtual bool canSaveGameStateCurrently() {
return _saveLoadAllowed && !Fights.isFighting();
}
};

View File

@ -431,7 +431,7 @@ void GameDatabaseV2::load(Common::SeekableReadStream &sourceS) {
// "Decrypt" the text data
for (uint32 i = 0; i < textSize; i++)
_gameText[i] += 0x1E;
sourceS.seek(objectsOffs);
if (version == 40) {

View File

@ -244,7 +244,7 @@ static const MadeGameDescription gameDescriptions[] = {
GF_CD_COMPRESSED,
3,
},
{
// Return to Zork - French CD version 1.2 5/13/95 (installed)
// Patch #2685032 submitted by goodoldgeorg

View File

@ -77,7 +77,7 @@ void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, u
byte *cmdBuffer = source + cmdOffs;
ValueReader maskReader(source + maskOffs, (maskFlags & 2) != 0);
ValueReader pixelReader(source + pixelOffs, (pixelFlags & 2) != 0);
if ((maskFlags != 0) && (maskFlags != 2) && (pixelFlags != 0) && (pixelFlags != 2) && (cmdFlags != 0))
error("decompressImage() Unsupported flags: cmdFlags = %02X; maskFlags = %02X, pixelFlags = %02X", cmdFlags, maskFlags, pixelFlags);

View File

@ -280,7 +280,7 @@ Common::Error MadeEngine::run() {
} else {
error ("Unknown MADE game");
}
if ((getFeatures() & GF_CD) || (getFeatures() & GF_CD_COMPRESSED))
checkCD();

View File

@ -117,7 +117,7 @@ public:
bool _autoStopSound;
uint _soundEnergyIndex;
SoundEnergyArray *_soundEnergyArray;
uint32 _musicBeatStart;
uint32 _cdTimeStart;

View File

@ -64,7 +64,7 @@ void PictureResource::load(byte *source, int size) {
void PictureResource::loadRaw(byte *source, int size) {
// Loads a "raw" picture as used in RtZ, LGoP2, Manhole:N&E and Rodney's Funscreen
Common::MemoryReadStream *sourceS = new Common::MemoryReadStream(source, size);
_hasPalette = (sourceS->readByte() != 0);
@ -118,7 +118,7 @@ void PictureResource::loadChunked(byte *source, int size) {
uint32 chunkType = sourceS->readUint32BE();
uint32 chunkSize = sourceS->readUint32BE();
if (sourceS->eos())
break;

View File

@ -51,15 +51,15 @@ ScreenEffects::ScreenEffects(Screen *screen) : _screen(screen) {
vfxY1 = 0;
vfxWidth = 0;
vfxHeight = 0;
_fxPalette = new byte[768];
}
ScreenEffects::~ScreenEffects() {
delete[] _fxPalette;
}
void ScreenEffects::run(int16 effectNum, Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) {
// Workaround: we set up the final palette beforehand, to reduce CPU usage during the screen effect.
// The visual difference is not noticeable, but CPU load is much much less (as palette updates are very expensive).

View File

@ -53,7 +53,7 @@ private:
void setPalette(byte *palette);
void setBlendedPalette(byte *palette, byte *newPalette, int colorCount, int16 value, int16 maxValue);
void copyFxRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2);
void vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
void vfx01(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
void vfx02(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);

View File

@ -632,7 +632,7 @@ int16 ScriptFunctions::sfClearMono(int16 argc, int16 *argv) {
}
int16 ScriptFunctions::sfGetSoundEnergy(int16 argc, int16 *argv) {
// This is called while in-game voices are played to animate
// This is called while in-game voices are played to animate
// mouths when NPCs are talking
int result = 0;
if (_vm->_mixer->isSoundHandleActive(_audioStreamHandle) && _vm->_soundEnergyArray) {

View File

@ -150,7 +150,7 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
uint16 ofs = 0;
uint16 i = 0, l = 0;
byte val;
SoundEnergyItem soundEnergyItem;
const int modeValues[3][4] = {
@ -225,11 +225,11 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
for (i = 0; i < workChunkSize; i++)
soundBuffer[i] = *source++;
workSample = soundBuffer[workChunkSize - 1] - 128;
soundEnergyItem.energy = 4;
if (soundEnergyArray)
soundEnergyArray->push_back(soundEnergyItem);
break;
default:

View File

@ -649,7 +649,7 @@ public:
struct DebugPoint {
Point point;
byte color;
DebugPoint() : color(0) {}
DebugPoint(const Point &p, byte c): point(p), color(c) {}

View File

@ -104,7 +104,7 @@ enum GameFileTypes {
GAME_SOUNDFILE = 1 << 2, // SFX (also contains voices and MIDI music in SAGA 2 games)
GAME_VOICEFILE = 1 << 3, // Voices (also contains SFX in the ITE floppy version)
// ITE specific
GAME_DIGITALMUSICFILE = 1 << 4, // ITE digital music, added by Wyrmkeep
GAME_DIGITALMUSICFILE = 1 << 4, // ITE digital music, added by Wyrmkeep
GAME_MACBINARY = 1 << 5, // ITE Mac CD Guild
GAME_DEMOFILE = 1 << 6, // Early ITE demo
GAME_SWAPENDIAN = 1 << 7, // Used to identify the BE voice file in the ITE combined version

View File

@ -399,7 +399,7 @@ void Scene::skipScene() {
_sceneQueue.erase(_sceneQueue.begin(), queueIterator);
endScene();
loadScene(*_sceneQueue.begin());
break;
}

View File

@ -316,7 +316,7 @@ void Script::setupScriptOpcodeList() {
// String manipulation
OPCODE(opDummy), // 71: opStrCat, string concatenation (unused)
OPCODE(opDummy), // 72: opStrFormat, string formatting (unused)
// Assignment
// Assignment
OPCODE(opDummy), // 73: assign (unused)
OPCODE(opDummy), // 74: += (unused)
OPCODE(opDummy), // 75: -= (unused)
@ -434,7 +434,7 @@ void Script::setupScriptOpcodeList() {
// String manipulation
OPCODE(opDummy), // 80: opStrCat, string concatenation (unused)
OPCODE(opDummy), // 81: opStrFormat, string formatting (unused)
// Assignment
// Assignment
OPCODE(opDummy), // 82: assign (unused)
OPCODE(opDummy), // 83: += (unused)
OPCODE(opDummy), // 84: -= (unused)
@ -660,7 +660,7 @@ void Script::opCcallV(SCRIPTOP_PARAMS) {
(this->*scriptFunction)(thread, argumentsCount, stopParsing);
if (stopParsing)
return;
if (scriptFunction == &Saga::Script::sfScriptGotoScene) {
stopParsing = true;
breakOut = true;

View File

@ -444,7 +444,7 @@ protected:
void setupScriptOpcodeList();
void opDummy(SCRIPTOP_PARAMS) { warning("Dummy opcode called"); }
void opNextBlock(SCRIPTOP_PARAMS) {
void opNextBlock(SCRIPTOP_PARAMS) {
thread->_instructionOffset = (((thread->_instructionOffset) >> 10) + 1) << 10;
}
void opDup(SCRIPTOP_PARAMS);

View File

@ -219,7 +219,7 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
file->open(soundFileName);
soundResourceLength = file->size();
context->isBigEndian = true;
} else
} else
#endif
{
ResourceData* resourceData = context->getResourceData(resourceId);

View File

@ -1042,7 +1042,7 @@ reg_t kDoAudio(EngineState *s, int funct_nr, int argc, reg_t *argv) {
if (audioRes) {
audioStream = Audio::makeLinearInputStream(audioRes->data, audioRes->size, _audioRate, Audio::Mixer::FLAG_UNSIGNED, 0, 0);
sampleLen = audioRes->size * 60 / _audioRate;
sampleLen = audioRes->size * 60 / _audioRate;
} else {
// No patch file found, read it from the audio volume
byte volume;
@ -1057,8 +1057,8 @@ reg_t kDoAudio(EngineState *s, int funct_nr, int argc, reg_t *argv) {
sprintf(filename, "AUDIO%03d.%03d", _lang, volume);
// Try to load compressed
audioStream = Audio::AudioStream::openStreamFile(filename, start, duration);
if (!audioStream) {
audioStream = Audio::AudioStream::openStreamFile(filename, start, duration);
if (!audioStream) {
// Compressed file load failed, try to load original raw data
byte *soundbuff = (byte *)malloc(size);
Common::File* audioFile = new Common::File();
@ -1094,7 +1094,7 @@ reg_t kDoAudio(EngineState *s, int funct_nr, int argc, reg_t *argv) {
case kSci1AudioPosition:
if (mixer->isSoundHandleActive(_audioHandle)) {
return make_reg(0, mixer->getSoundElapsedTime(_audioHandle) * 6 / 100); // return elapsed time in ticks
} else {
} else {
return make_reg(0, -1); // Sound finished
}
case kSci1AudioRate:

View File

@ -91,8 +91,8 @@ static void play_song(SongIterator *it) {
}
static void player_tell_synth(int buf_nr, byte *buf) {
byte op1 = (buf_nr < 2 ? 0 : buf[1]);
byte op2 = (buf_nr < 3 ? 0 : buf[2]);
byte op1 = (buf_nr < 2 ? 0 : buf[1]);
byte op2 = (buf_nr < 3 ? 0 : buf[2]);
static_cast<MidiDriver *>(mididrv)->send(buf[0], op1, op2);
}

View File

@ -99,7 +99,7 @@ protected:
void PolledPlayerAudioStream::queryTimestamp() {
Audio::Timestamp stamp;
if (!new_song) {
_mode = FEED_MODE_IDLE;
} else {

View File

@ -522,7 +522,7 @@ bool ScummDebugger::Cmd_Debug(int argc, const char **argv) {
} else if (argv[1][0] == '-') {
result = Common::disableDebugChannel(argv[1] + 1);
}
if (result) {
DebugPrintf("%s %s\n", (argv[1][0] == '+') ? "Enabled" : "Disabled", argv[1] + 1);
} else {

View File

@ -440,9 +440,9 @@ void ScummEngine_v3::processKeyboard(Common::KeyState lastKeyHit) {
// SCUMM var 244 is the episode score
// and var 245 is the series score
char text[50];
updateIQPoints();
sprintf(text, "IQ Points: Episode = %d, Series = %d", _scummVars[244], _scummVars[245]);
Indy3IQPointsDialog indy3IQPointsDialog(this, text);
runDialog(indy3IQPointsDialog);

View File

@ -829,7 +829,7 @@ int ScummEngine::remapPaletteColor(int r, int g, int b, int threshold) {
uint sum, bestsum, bestitem = 0;
int startColor = (_game.version == 8) ? 24 : 1;
if (_game.heversion >= 99)
pal = _hePalettes + 1024 + startColor * 3;
else

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