renamed namespace ScummVM to Common
svn-id: r10544
This commit is contained in:
parent
f26d3d1784
commit
0e645f88ae
58 changed files with 143 additions and 142 deletions
|
@ -65,7 +65,7 @@ class FSList;
|
|||
*/
|
||||
class FilesystemNode {
|
||||
protected:
|
||||
typedef ScummVM::String String;
|
||||
typedef Common::String String;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -146,7 +146,7 @@ public:
|
|||
/*
|
||||
* A sorted list of multiple file system nodes. E.g. the contents of a given directory.
|
||||
*/
|
||||
class FSList : ScummVM::List<FilesystemNode *> {
|
||||
class FSList : Common::List<FilesystemNode *> {
|
||||
public:
|
||||
~FSList() {
|
||||
for (int i = 0; i < _size; i++)
|
||||
|
|
|
@ -124,7 +124,7 @@ FSList *PalmOSFilesystemNode::listDir(ListMode mode) const {
|
|||
return myList;
|
||||
}
|
||||
|
||||
const char *lastPathComponent(const ScummVM::String &str) {
|
||||
const char *lastPathComponent(const Common::String &str) {
|
||||
const char *start = str.c_str();
|
||||
const char *cur = start + str.size() - 2;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
static const char *lastPathComponent(const ScummVM::String &str) {
|
||||
static const char *lastPathComponent(const Common::String &str) {
|
||||
const char *start = str.c_str();
|
||||
const char *cur = start + str.size() - 2;
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ FSList *WindowsFilesystemNode::listDir(ListMode mode) const {
|
|||
return myList;
|
||||
}
|
||||
|
||||
const char *lastPathComponent(const ScummVM::String &str) {
|
||||
const char *lastPathComponent(const Common::String &str) {
|
||||
const char *start = str.c_str();
|
||||
const char *cur = start + str.size() - 2;
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ FSList *GP32FilesystemNode::listDir(ListMode mode) const {
|
|||
return myList;
|
||||
}
|
||||
|
||||
const char *lastPathComponent(const ScummVM::String &str) {
|
||||
const char *lastPathComponent(const Common::String &str) {
|
||||
const char *start = str.c_str();
|
||||
const char *cur = start + str.size() - 2;
|
||||
|
||||
|
|
|
@ -672,7 +672,7 @@ bool GameDetector::detectGame() {
|
|||
}
|
||||
}
|
||||
|
||||
const ScummVM::String& GameDetector::getGameName() {
|
||||
const Common::String& GameDetector::getGameName() {
|
||||
if (_gameText.isEmpty()) {
|
||||
_gameText = "Unknown game: \"";
|
||||
_gameText += _gameFileName;
|
||||
|
|
|
@ -103,7 +103,7 @@ struct Language {
|
|||
typedef Engine *(*EngineFactory)(GameDetector *detector, OSystem *syst);
|
||||
|
||||
class GameDetector {
|
||||
typedef ScummVM::String String;
|
||||
typedef Common::String String;
|
||||
|
||||
public:
|
||||
static const MusicDriver *getMusicDrivers();
|
||||
|
|
|
@ -131,9 +131,9 @@ public:
|
|||
|
||||
class DynamicPlugin : public Plugin {
|
||||
void *_dlHandle;
|
||||
ScummVM::String _filename;
|
||||
Common::String _filename;
|
||||
|
||||
ScummVM::String _name;
|
||||
Common::String _name;
|
||||
const TargetSettings *_targets;
|
||||
int _targetCount;
|
||||
EngineFactory _ef;
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
|
||||
|
||||
/** List of plugins. */
|
||||
typedef ScummVM::List<Plugin *> PluginList;
|
||||
typedef Common::List<Plugin *> PluginList;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -228,7 +228,7 @@ const int Config::count_domains() {
|
|||
return count;
|
||||
}
|
||||
|
||||
ScummVM::StringList Config::get_domains() {
|
||||
Common::StringList Config::get_domains() {
|
||||
StringList domainNames;
|
||||
DomainMap::Iterator d, end(domains.end());
|
||||
for (d = domains.begin(); d != end; ++d) {
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
|
||||
class Config {
|
||||
public:
|
||||
typedef ScummVM::String String;
|
||||
typedef ScummVM::StringList StringList;
|
||||
typedef ScummVM::StringMap StringMap;
|
||||
typedef ScummVM::Map<String, StringMap> DomainMap;
|
||||
typedef Common::String String;
|
||||
typedef Common::StringList StringList;
|
||||
typedef Common::StringMap StringMap;
|
||||
typedef Common::Map<String, StringMap> DomainMap;
|
||||
|
||||
Config (const String & = String("config.cfg"), const String & = String("default"));
|
||||
const char *get(const String &key, const String &dom = String()) const;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "common/scummsys.h"
|
||||
#include <assert.h>
|
||||
|
||||
namespace ScummVM {
|
||||
namespace Common {
|
||||
|
||||
template <class T>
|
||||
class List {
|
||||
|
@ -126,6 +126,6 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
} // End of namespace ScummVM
|
||||
} // End of namespace Common
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "common/scummsys.h"
|
||||
|
||||
namespace ScummVM {
|
||||
namespace Common {
|
||||
|
||||
template <class Key, class Value>
|
||||
class Map {
|
||||
|
@ -247,6 +247,6 @@ class String;
|
|||
|
||||
typedef Map<String, String> StringMap;
|
||||
|
||||
} // End of namespace ScummVM
|
||||
} // End of namespace Common
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "common/scummsys.h"
|
||||
#include "common/util.h"
|
||||
|
||||
namespace ScummVM {
|
||||
namespace Common {
|
||||
|
||||
/*! @brief simple class for handling both 2D position and size
|
||||
|
||||
|
@ -108,6 +108,6 @@ struct Rect {
|
|||
}
|
||||
};
|
||||
|
||||
} // End of namespace ScummVM
|
||||
} // End of namespace Common
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <ctype.h>
|
||||
|
||||
namespace ScummVM {
|
||||
namespace Common {
|
||||
|
||||
String::String(const char *str, int len) {
|
||||
_refCount = new int(1);
|
||||
|
@ -266,4 +266,4 @@ bool operator != (const char* y, const ConstString &x) {
|
|||
return x != y;
|
||||
}
|
||||
|
||||
} // End of namespace ScummVM
|
||||
} // End of namespace Common
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace ScummVM {
|
||||
namespace Common {
|
||||
|
||||
/*
|
||||
TODO
|
||||
|
@ -141,6 +141,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
} // End of namespace ScummVM
|
||||
} // End of namespace Common
|
||||
|
||||
#endif
|
||||
|
|
1
configure
vendored
1
configure
vendored
|
@ -354,6 +354,7 @@ case $hosttype in
|
|||
Darwin)
|
||||
DEFINES="$DEFINES -DUNIX -DMACOSX"
|
||||
LIBS="$LIBS -framework QuickTime -framework AudioUnit"
|
||||
#CXXFLAGS="$CXXFLAGS -faltivec"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
|
||||
/* EditTextWidget */
|
||||
class EditTextWidget : public StaticTextWidget {
|
||||
typedef ScummVM::StringList StringList;
|
||||
typedef ScummVM::String String;
|
||||
typedef Common::StringList StringList;
|
||||
typedef Common::String String;
|
||||
protected:
|
||||
String _backupString;
|
||||
bool _caretVisible;
|
||||
|
|
|
@ -255,7 +255,7 @@ void ListWidget::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
|
|||
void ListWidget::drawWidget(bool hilite) {
|
||||
NewGui *gui = _boss->getGui();
|
||||
int i, pos, len = _list.size();
|
||||
ScummVM::String buffer;
|
||||
Common::String buffer;
|
||||
|
||||
// Draw a thin frame around the list.
|
||||
gui->hLine(_x, _y, _x + _w - 1, gui->_color);
|
||||
|
@ -296,7 +296,7 @@ void ListWidget::drawCaret(bool erase) {
|
|||
int16 color = erase ? gui->_textcolorhi : gui->_bgcolor;
|
||||
int x = _x + _boss->getX() + 3;
|
||||
int y = _y + _boss->getY() + 1;
|
||||
ScummVM::String buffer;
|
||||
Common::String buffer;
|
||||
|
||||
y += (_selectedItem - _currentPos) * kLineHeight;
|
||||
|
||||
|
|
|
@ -42,8 +42,8 @@ enum {
|
|||
|
||||
/* ListWidget */
|
||||
class ListWidget : public Widget, public CommandReceiver, public CommandSender {
|
||||
typedef ScummVM::StringList StringList;
|
||||
typedef ScummVM::String String;
|
||||
typedef Common::StringList StringList;
|
||||
typedef Common::String String;
|
||||
protected:
|
||||
StringList _list;
|
||||
bool _editable;
|
||||
|
|
|
@ -38,7 +38,7 @@ static uint32 up_down_arrows[8] = {
|
|||
0x00001000,
|
||||
};
|
||||
|
||||
const ScummVM::String PopUpWidget::emptyStr;
|
||||
const Common::String PopUpWidget::emptyStr;
|
||||
|
||||
//
|
||||
// PopUpDialog
|
||||
|
@ -251,7 +251,7 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) {
|
|||
int x = _x + 1;
|
||||
int y = _y + 1 + kLineHeight * entry;
|
||||
int w = _w - 2;
|
||||
ScummVM::String &name = _popUpBoss->_entries[entry].name;
|
||||
Common::String &name = _popUpBoss->_entries[entry].name;
|
||||
|
||||
_gui->fillRect(x, y, w, kLineHeight, hilite ? _gui->_textcolorhi : _gui->_bgcolor);
|
||||
if (name.size() == 0) {
|
||||
|
|
|
@ -38,13 +38,13 @@ enum {
|
|||
*/
|
||||
class PopUpWidget : public Widget, public CommandSender {
|
||||
friend class PopUpDialog;
|
||||
typedef ScummVM::String String;
|
||||
typedef Common::String String;
|
||||
|
||||
struct Entry {
|
||||
String name;
|
||||
uint32 tag;
|
||||
};
|
||||
typedef ScummVM::List<Entry> EntryList;
|
||||
typedef Common::List<Entry> EntryList;
|
||||
protected:
|
||||
static const String emptyStr;
|
||||
|
||||
|
|
|
@ -28,11 +28,11 @@ AboutDialog::AboutDialog(NewGui *gui)
|
|||
: Dialog(gui, 10, 20, 300, 124) {
|
||||
addButton((_w - kButtonWidth)/2, 100, "OK", kCloseCmd, '\r'); // Close dialog - FIXME
|
||||
|
||||
ScummVM::String version("ScummVM ");
|
||||
Common::String version("ScummVM ");
|
||||
version += gScummVMVersion;
|
||||
new StaticTextWidget(this, 10, 10, _w - 20, kLineHeight, version, kTextAlignCenter);
|
||||
|
||||
ScummVM::String date("(built on ");
|
||||
Common::String date("(built on ");
|
||||
date += gScummVMBuildDate;
|
||||
date += ')';
|
||||
new StaticTextWidget(this, 10, 20, _w - 20, kLineHeight, date, kTextAlignCenter);
|
||||
|
|
|
@ -143,7 +143,7 @@ void BrowserDialog::updateListing() {
|
|||
assert(_nodeContent != NULL);
|
||||
|
||||
// Populate the ListWidget
|
||||
ScummVM::StringList list;
|
||||
Common::StringList list;
|
||||
int size = _nodeContent->size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
list.push_back((*_nodeContent)[i].displayName());
|
||||
|
|
|
@ -32,8 +32,8 @@ class FilesystemNode;
|
|||
class FSList;
|
||||
|
||||
class BrowserDialog : public Dialog {
|
||||
typedef ScummVM::String String;
|
||||
typedef ScummVM::StringList StringList;
|
||||
typedef Common::String String;
|
||||
typedef Common::StringList StringList;
|
||||
public:
|
||||
BrowserDialog(NewGui *gui, const char *title);
|
||||
virtual ~BrowserDialog();
|
||||
|
|
|
@ -33,8 +33,8 @@ class ListWidget;
|
|||
*/
|
||||
|
||||
class ChooserDialog : public Dialog {
|
||||
typedef ScummVM::String String;
|
||||
typedef ScummVM::StringList StringList;
|
||||
typedef Common::String String;
|
||||
typedef Common::StringList StringList;
|
||||
public:
|
||||
ChooserDialog(NewGui *gui, const String title, const StringList &list);
|
||||
|
||||
|
|
|
@ -279,11 +279,11 @@ Widget *Dialog::findWidget(int x, int y) {
|
|||
return w;
|
||||
}
|
||||
|
||||
ButtonWidget *Dialog::addButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey) {
|
||||
ButtonWidget *Dialog::addButton(int x, int y, const Common::String &label, uint32 cmd, char hotkey) {
|
||||
return new ButtonWidget(this, x, y, kButtonWidth, 16, label, cmd, hotkey);
|
||||
}
|
||||
|
||||
PushButtonWidget *Dialog::addPushButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey) {
|
||||
PushButtonWidget *Dialog::addPushButton(int x, int y, const Common::String &label, uint32 cmd, char hotkey) {
|
||||
return new PushButtonWidget(this, x, y, kButtonWidth, 16, label, cmd, hotkey);
|
||||
}
|
||||
|
||||
|
|
|
@ -82,8 +82,8 @@ protected:
|
|||
|
||||
Widget *findWidget(int x, int y); // Find the widget at pos x,y if any
|
||||
|
||||
ButtonWidget *addButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey);
|
||||
PushButtonWidget *addPushButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey);
|
||||
ButtonWidget *addButton(int x, int y, const Common::String &label, uint32 cmd, char hotkey);
|
||||
PushButtonWidget *addPushButton(int x, int y, const Common::String &label, uint32 cmd, char hotkey);
|
||||
|
||||
void setResult(int result) { _result = result; }
|
||||
};
|
||||
|
|
|
@ -48,7 +48,7 @@ enum {
|
|||
kQuitCmd = 'QUIT'
|
||||
};
|
||||
|
||||
typedef ScummVM::List<const TargetSettings *> GameList;
|
||||
typedef Common::List<const TargetSettings *> GameList;
|
||||
|
||||
/*
|
||||
* A dialog that allows the user to edit a config game entry.
|
||||
|
@ -75,8 +75,8 @@ enum {
|
|||
};
|
||||
|
||||
class EditGameDialog : public Dialog {
|
||||
typedef ScummVM::String String;
|
||||
typedef ScummVM::StringList StringList;
|
||||
typedef Common::String String;
|
||||
typedef Common::StringList StringList;
|
||||
public:
|
||||
EditGameDialog(NewGui *gui, const String &domain, const TargetSettings *target);
|
||||
|
||||
|
@ -229,7 +229,7 @@ void LauncherDialog::close() {
|
|||
|
||||
void LauncherDialog::updateListing() {
|
||||
int i;
|
||||
ScummVM::StringList l;
|
||||
Common::StringList l;
|
||||
|
||||
// Retrieve a list of all games defined in the config file
|
||||
_domains.clear();
|
||||
|
|
|
@ -30,8 +30,8 @@ class GameDetector;
|
|||
class ListWidget;
|
||||
|
||||
class LauncherDialog : public Dialog {
|
||||
typedef ScummVM::String String;
|
||||
typedef ScummVM::StringList StringList;
|
||||
typedef Common::String String;
|
||||
typedef Common::StringList StringList;
|
||||
public:
|
||||
LauncherDialog(NewGui *gui, GameDetector &detector);
|
||||
~LauncherDialog();
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#include "common/list.h"
|
||||
|
||||
class MessageDialog : public Dialog {
|
||||
typedef ScummVM::String String;
|
||||
typedef ScummVM::StringList StringList;
|
||||
typedef Common::String String;
|
||||
typedef Common::StringList StringList;
|
||||
public:
|
||||
MessageDialog(NewGui *gui, const String &message, uint32 timer = 0, bool showOKButton = true, bool showCancelButton = false);
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
// This class hopefully will replace the old Gui class completly one day
|
||||
class NewGui {
|
||||
friend class Dialog;
|
||||
typedef ScummVM::String String;
|
||||
typedef Common::String String;
|
||||
public:
|
||||
|
||||
// Main entry for the GUI: this will start an event loop that keeps running
|
||||
|
|
|
@ -30,7 +30,7 @@ class GameDetector;
|
|||
class PopUpWidget;
|
||||
|
||||
class GlobalOptionsDialog : public Dialog {
|
||||
typedef ScummVM::String String;
|
||||
typedef Common::String String;
|
||||
public:
|
||||
GlobalOptionsDialog(NewGui *gui, GameDetector &detector);
|
||||
~GlobalOptionsDialog();
|
||||
|
|
|
@ -134,7 +134,7 @@ protected:
|
|||
/* StaticTextWidget */
|
||||
class StaticTextWidget : public Widget {
|
||||
protected:
|
||||
typedef ScummVM::String String;
|
||||
typedef Common::String String;
|
||||
|
||||
String _label;
|
||||
int _align;
|
||||
|
|
|
@ -158,8 +158,8 @@ int Scumm::getAngleFromPos(int x, int y) const {
|
|||
}
|
||||
}
|
||||
|
||||
int Actor::calcMovementFactor(ScummVM::Point next) {
|
||||
ScummVM::Point actorPos(_pos);
|
||||
int Actor::calcMovementFactor(Common::Point next) {
|
||||
Common::Point actorPos(_pos);
|
||||
int diffX, diffY;
|
||||
int32 deltaXFactor, deltaYFactor;
|
||||
|
||||
|
@ -341,7 +341,7 @@ void Actor::setBox(int box) {
|
|||
|
||||
int Actor::actorWalkStep() {
|
||||
int tmpX, tmpY;
|
||||
ScummVM::Point actorPos;
|
||||
Common::Point actorPos;
|
||||
int distX, distY;
|
||||
int nextFacing;
|
||||
|
||||
|
@ -1334,7 +1334,7 @@ void Actor::startWalkAnim(int cmd, int angle) {
|
|||
|
||||
void Actor::walkActor() {
|
||||
int new_dir, next_box;
|
||||
ScummVM::Point foundPath;
|
||||
Common::Point foundPath;
|
||||
|
||||
if (_vm->_version >= 7) {
|
||||
// FIXME - this is kind of a hack right now but it fixes the
|
||||
|
@ -1414,7 +1414,7 @@ void Actor::walkActor() {
|
|||
|
||||
/*
|
||||
void Actor::walkActorV12() {
|
||||
ScummVM::Point foundPath, tmp;
|
||||
Common::Point foundPath, tmp;
|
||||
int new_dir, next_box;
|
||||
|
||||
if (moving & MF_TURN) {
|
||||
|
@ -1465,7 +1465,7 @@ void Actor::walkActorV12() {
|
|||
*/
|
||||
|
||||
void Actor::walkActorOld() {
|
||||
ScummVM::Point p2, p3; // Gate locations
|
||||
Common::Point p2, p3; // Gate locations
|
||||
int new_dir, next_box;
|
||||
|
||||
if (!moving)
|
||||
|
|
|
@ -37,13 +37,13 @@ enum MoveFlags {
|
|||
};
|
||||
|
||||
struct ActorWalkData {
|
||||
ScummVM::Point dest; // Final destination
|
||||
Common::Point dest; // Final destination
|
||||
byte destbox;
|
||||
int16 destdir;
|
||||
ScummVM::Point cur; // Current position
|
||||
Common::Point cur; // Current position
|
||||
byte curbox;
|
||||
ScummVM::Point next; // Next position on our way to the destination
|
||||
ScummVM::Point point3;
|
||||
Common::Point next; // Next position on our way to the destination
|
||||
Common::Point point3;
|
||||
int32 deltaXFactor, deltaYFactor;
|
||||
uint16 xfrac, yfrac;
|
||||
};
|
||||
|
@ -82,7 +82,7 @@ public:
|
|||
static void initActorClass(Scumm *scumm);
|
||||
|
||||
public:
|
||||
ScummVM::Point _pos;
|
||||
Common::Point _pos;
|
||||
int top, bottom;
|
||||
int elevation;
|
||||
uint width;
|
||||
|
@ -133,7 +133,7 @@ public:
|
|||
void putActor(int x, int y, byte room);
|
||||
void setActorWalkSpeed(uint newSpeedX, uint newSpeedY);
|
||||
protected:
|
||||
int calcMovementFactor(ScummVM::Point next);
|
||||
int calcMovementFactor(Common::Point next);
|
||||
int actorWalkStep();
|
||||
int remapDirection(int dir, bool is_walking);
|
||||
void setupActorScale();
|
||||
|
@ -204,8 +204,8 @@ protected:
|
|||
|
||||
bool isPlayer();
|
||||
|
||||
bool findPathTowards(byte box, byte box2, byte box3, ScummVM::Point &foundPath);
|
||||
void findPathTowardsOld(byte box, byte box2, byte box3, ScummVM::Point &p2, ScummVM::Point &p3);
|
||||
bool findPathTowards(byte box, byte box2, byte box3, Common::Point &foundPath);
|
||||
void findPathTowardsOld(byte box, byte box2, byte box3, Common::Point &p2, Common::Point &p3);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -77,7 +77,7 @@ struct Box { /* Internal walkbox file format */
|
|||
|
||||
|
||||
static bool compareSlope(int X1, int Y1, int X2, int Y2, int X3, int Y3);
|
||||
static ScummVM::Point closestPtOnLine(int ulx, int uly, int llx, int lly, int x, int y);
|
||||
static Common::Point closestPtOnLine(int ulx, int uly, int llx, int lly, int x, int y);
|
||||
|
||||
|
||||
byte Scumm::getMaskFromBox(int box) {
|
||||
|
@ -434,7 +434,7 @@ bool Scumm::checkXYInBoxBounds(int b, int x, int y) {
|
|||
if (box.ul.x == box.ur.x && box.ul.y == box.ur.y && box.lr.x == box.ll.x && box.lr.y == box.ll.y ||
|
||||
box.ul.x == box.ll.x && box.ul.y == box.ll.y && box.ur.x == box.lr.x && box.ur.y == box.lr.y) {
|
||||
|
||||
ScummVM::Point pt;
|
||||
Common::Point pt;
|
||||
pt = closestPtOnLine(box.ul.x, box.ul.y, box.lr.x, box.lr.y, x, y);
|
||||
if (distanceFromPt(x, y, pt.x, pt.y) <= 4)
|
||||
return true;
|
||||
|
@ -536,11 +536,11 @@ bool compareSlope(int X1, int Y1, int X2, int Y2, int X3, int Y3) {
|
|||
return (Y2 - Y1) * (X3 - X1) <= (Y3 - Y1) * (X2 - X1);
|
||||
}
|
||||
|
||||
ScummVM::Point closestPtOnLine(int ulx, int uly, int llx, int lly, int x, int y) {
|
||||
Common::Point closestPtOnLine(int ulx, int uly, int llx, int lly, int x, int y) {
|
||||
int lydiff, lxdiff;
|
||||
int32 dist, a, b, c;
|
||||
int x2, y2;
|
||||
ScummVM::Point pt;
|
||||
Common::Point pt;
|
||||
|
||||
if (llx == ulx) { // Vertical line?
|
||||
x2 = ulx;
|
||||
|
@ -641,7 +641,7 @@ bool Scumm::inBoxQuickReject(int b, int x, int y, int threshold) {
|
|||
}
|
||||
|
||||
int Scumm::getClosestPtOnBox(int b, int x, int y, int16& outX, int16& outY) {
|
||||
ScummVM::Point pt;
|
||||
Common::Point pt;
|
||||
uint dist;
|
||||
uint bestdist = 0xFFFFFF;
|
||||
BoxCoords box;
|
||||
|
@ -769,10 +769,10 @@ int Scumm::getPathToDestBox(byte from, byte to) {
|
|||
* Computes the next point actor a has to walk towards in a straight
|
||||
* line in order to get from box1 to box3 via box2.
|
||||
*/
|
||||
bool Actor::findPathTowards(byte box1nr, byte box2nr, byte box3nr, ScummVM::Point &foundPath) {
|
||||
bool Actor::findPathTowards(byte box1nr, byte box2nr, byte box3nr, Common::Point &foundPath) {
|
||||
BoxCoords box1;
|
||||
BoxCoords box2;
|
||||
ScummVM::Point tmp;
|
||||
Common::Point tmp;
|
||||
int i, j;
|
||||
int flag;
|
||||
int q, pos;
|
||||
|
@ -1142,10 +1142,10 @@ bool Scumm::areBoxesNeighbours(int box1nr, int box2nr) {
|
|||
return result;
|
||||
}
|
||||
|
||||
void Actor::findPathTowardsOld(byte trap1, byte trap2, byte final_trap, ScummVM::Point &p2, ScummVM::Point &p3) {
|
||||
ScummVM::Point pt;
|
||||
ScummVM::Point gateA[2];
|
||||
ScummVM::Point gateB[2];
|
||||
void Actor::findPathTowardsOld(byte trap1, byte trap2, byte final_trap, Common::Point &p2, Common::Point &p3) {
|
||||
Common::Point pt;
|
||||
Common::Point gateA[2];
|
||||
Common::Point gateB[2];
|
||||
|
||||
_vm->getGates(trap1, trap2, gateA, gateB);
|
||||
|
||||
|
@ -1183,15 +1183,15 @@ void Actor::findPathTowardsOld(byte trap1, byte trap2, byte final_trap, ScummVM:
|
|||
* This way the lines bound a 'corridor' between the two boxes, through which
|
||||
* the actor has to walk to get from trap1 to trap2.
|
||||
*/
|
||||
void Scumm::getGates(int trap1, int trap2, ScummVM::Point gateA[2], ScummVM::Point gateB[2]) {
|
||||
void Scumm::getGates(int trap1, int trap2, Common::Point gateA[2], Common::Point gateB[2]) {
|
||||
int i, j;
|
||||
int dist[8];
|
||||
int minDist[3];
|
||||
int closest[3];
|
||||
int box[3];
|
||||
BoxCoords coords;
|
||||
ScummVM::Point closestPoint[8];
|
||||
ScummVM::Point boxCorner[8];
|
||||
Common::Point closestPoint[8];
|
||||
Common::Point boxCorner[8];
|
||||
int line1, line2;
|
||||
|
||||
// For all corner coordinates of the first box, compute the point closest
|
||||
|
|
|
@ -39,10 +39,10 @@ typedef enum {
|
|||
} BoxFlags;
|
||||
|
||||
struct BoxCoords { /* Box coordinates */
|
||||
ScummVM::Point ul;
|
||||
ScummVM::Point ur;
|
||||
ScummVM::Point ll;
|
||||
ScummVM::Point lr;
|
||||
Common::Point ul;
|
||||
Common::Point ur;
|
||||
Common::Point ll;
|
||||
Common::Point lr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -60,7 +60,7 @@ void Scumm::setCameraAt(int pos_x, int pos_y) {
|
|||
}
|
||||
|
||||
void Scumm_v7::setCameraAt(int pos_x, int pos_y) {
|
||||
ScummVM::Point old;
|
||||
Common::Point old;
|
||||
|
||||
old = camera._cur;
|
||||
|
||||
|
@ -133,7 +133,7 @@ void Scumm_v7::setCameraFollows(Actor *a) {
|
|||
}
|
||||
|
||||
|
||||
void Scumm::clampCameraPos(ScummVM::Point *pt) {
|
||||
void Scumm::clampCameraPos(Common::Point *pt) {
|
||||
if (pt->x < VAR(VAR_CAMERA_MIN_X))
|
||||
pt->x = (short) VAR(VAR_CAMERA_MIN_X);
|
||||
|
||||
|
@ -226,7 +226,7 @@ void Scumm::moveCamera() {
|
|||
}
|
||||
|
||||
void Scumm_v7::moveCamera() {
|
||||
ScummVM::Point old = camera._cur;
|
||||
Common::Point old = camera._cur;
|
||||
Actor *a = NULL;
|
||||
|
||||
if (camera._follows) {
|
||||
|
|
|
@ -30,7 +30,7 @@ struct VirtScreen;
|
|||
|
||||
class CharsetRenderer {
|
||||
public:
|
||||
ScummVM::Rect _str;
|
||||
Common::Rect _str;
|
||||
int _nextLeft, _nextTop;
|
||||
|
||||
int _top;
|
||||
|
|
|
@ -170,7 +170,7 @@ void ScummDialog::addResText(int x, int y, int w, int h, int resID) {
|
|||
}
|
||||
|
||||
|
||||
const ScummVM::String ScummDialog::queryResString(int stringno) {
|
||||
const Common::String ScummDialog::queryResString(int stringno) {
|
||||
byte *result;
|
||||
|
||||
if (stringno == 0)
|
||||
|
@ -352,7 +352,7 @@ void SaveLoadDialog::close() {
|
|||
|
||||
void SaveLoadDialog::fillList() {
|
||||
// Get savegame names
|
||||
ScummVM::StringList l;
|
||||
Common::StringList l;
|
||||
char name[32];
|
||||
uint i = _saveMode ? 1 : 0;
|
||||
bool avail_saves[81];
|
||||
|
@ -715,7 +715,7 @@ KeysDialog::KeysDialog(NewGui *gui, Scumm *scumm)
|
|||
_keyMapping->setFlags(WIDGET_CLEARBG);
|
||||
|
||||
// Get actions names
|
||||
ScummVM::StringList l;
|
||||
Common::StringList l;
|
||||
|
||||
for (int i = 1; i < TOTAL_ACTIONS; i++)
|
||||
l.push_back(getActionName(i));
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
: Dialog(gui, x, y, w, h), _scumm(scumm) {}
|
||||
|
||||
protected:
|
||||
typedef ScummVM::String String;
|
||||
typedef Common::String String;
|
||||
|
||||
Scumm *_scumm;
|
||||
|
||||
|
@ -88,7 +88,7 @@ public:
|
|||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
|
||||
protected:
|
||||
typedef ScummVM::String String;
|
||||
typedef Common::String String;
|
||||
|
||||
PushButtonWidget *_nextButton;
|
||||
PushButtonWidget *_prevButton;
|
||||
|
|
|
@ -802,7 +802,7 @@ void Scumm::restoreCharsetBg() {
|
|||
_charset->_nextTop = _string[0].ypos;
|
||||
}
|
||||
|
||||
void Scumm::restoreBG(ScummVM::Rect rect, byte backColor) {
|
||||
void Scumm::restoreBG(Common::Rect rect, byte backColor) {
|
||||
VirtScreen *vs;
|
||||
int topline, height, width;
|
||||
byte *backbuff, *bgbak;
|
||||
|
@ -873,7 +873,7 @@ void Scumm::restoreBG(ScummVM::Rect rect, byte backColor) {
|
|||
}
|
||||
|
||||
bool Scumm::hasCharsetMask(int left, int top, int right, int bottom) {
|
||||
ScummVM::Rect rect(left, top, right, bottom);
|
||||
Common::Rect rect(left, top, right, bottom);
|
||||
|
||||
return _charset->_hasMask && rect.intersects(gdi._mask);
|
||||
}
|
||||
|
|
10
scumm/gfx.h
10
scumm/gfx.h
|
@ -34,10 +34,10 @@ enum { /** Camera modes */
|
|||
};
|
||||
|
||||
struct CameraData { /** Camera state data */
|
||||
ScummVM::Point _cur;
|
||||
ScummVM::Point _dest;
|
||||
ScummVM::Point _accel;
|
||||
ScummVM::Point _last;
|
||||
Common::Point _cur;
|
||||
Common::Point _dest;
|
||||
Common::Point _accel;
|
||||
Common::Point _last;
|
||||
int _leftTrigger, _rightTrigger;
|
||||
byte _follows, _mode;
|
||||
bool _movingToActor;
|
||||
|
@ -114,7 +114,7 @@ public:
|
|||
int _numZBuffer;
|
||||
int _imgBufOffs[8];
|
||||
int32 _numStrips;
|
||||
ScummVM::Rect _mask;
|
||||
Common::Rect _mask;
|
||||
byte _C64Colors[4];
|
||||
|
||||
protected:
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
class ScummHelp {
|
||||
protected:
|
||||
typedef ScummVM::String String;
|
||||
typedef Common::String String;
|
||||
|
||||
public:
|
||||
static int numPages(byte gameId);
|
||||
|
|
|
@ -971,7 +971,7 @@ void Scumm_v2::o2_doSentence() {
|
|||
}
|
||||
|
||||
void Scumm_v2::o2_drawSentence() {
|
||||
ScummVM::Rect sentenceline;
|
||||
Common::Rect sentenceline;
|
||||
static char sentence[256];
|
||||
const byte *temp;
|
||||
int slot = getVerbSlot(VAR(VAR_SENTENCE_VERB),0);
|
||||
|
@ -1537,7 +1537,7 @@ void Scumm_v2::setUserState(byte state) {
|
|||
}
|
||||
|
||||
// Hide all verbs and inventory
|
||||
ScummVM::Rect rect;
|
||||
Common::Rect rect;
|
||||
rect.top = virtscr[2].topline;
|
||||
rect.bottom = virtscr[2].topline + 8*88;
|
||||
rect.left = 0;
|
||||
|
|
|
@ -2861,7 +2861,7 @@ printf("o5_oldRoomEffect ODDBALL: _opcode = 0x%x, a = 0x%x\n", _opcode, a);
|
|||
// For now, we force a redraw of the screen background. This
|
||||
// Makes the Zak end credits work more or less correctly.
|
||||
VirtScreen *vs = &virtscr[0];
|
||||
restoreBG(ScummVM::Rect(0,vs->topline, vs->width, vs->topline + vs->height));
|
||||
restoreBG(Common::Rect(0,vs->topline, vs->width, vs->topline + vs->height));
|
||||
virtscr[0].setDirtyRange(0, virtscr[0].height);
|
||||
updateDirtyScreen(0);
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ struct Box;
|
|||
struct BoxCoords;
|
||||
struct FindObjectInRoom;
|
||||
|
||||
typedef ScummVM::Map<ScummVM::String, int> ObjectIDMap;
|
||||
typedef Common::Map<Common::String, int> ObjectIDMap;
|
||||
|
||||
// Use g_scumm from error() ONLY
|
||||
extern Scumm *g_scumm;
|
||||
|
@ -115,7 +115,7 @@ struct ObjectData;
|
|||
|
||||
struct BlastText {
|
||||
int16 xpos, ypos;
|
||||
ScummVM::Rect rect;
|
||||
Common::Rect rect;
|
||||
byte color;
|
||||
byte charset;
|
||||
bool center;
|
||||
|
@ -123,7 +123,7 @@ struct BlastText {
|
|||
};
|
||||
|
||||
struct V2MouseoverBox {
|
||||
ScummVM::Rect rect;
|
||||
Common::Rect rect;
|
||||
byte color;
|
||||
byte hicolor;
|
||||
};
|
||||
|
@ -431,8 +431,8 @@ protected:
|
|||
int _keyPressed;
|
||||
uint16 _lastKeyHit;
|
||||
|
||||
ScummVM::Point _mouse;
|
||||
ScummVM::Point _virtualMouse;
|
||||
Common::Point _mouse;
|
||||
Common::Point _virtualMouse;
|
||||
|
||||
uint16 _mouseButStat;
|
||||
byte _leftBtnPressed, _rightBtnPressed;
|
||||
|
@ -720,7 +720,7 @@ protected:
|
|||
int8 v2_mouseover_box;
|
||||
|
||||
void initV2MouseOver();
|
||||
void checkV2MouseOver(ScummVM::Point pos);
|
||||
void checkV2MouseOver(Common::Point pos);
|
||||
void checkV2Inventory(int x, int y);
|
||||
void redrawV2Inventory();
|
||||
|
||||
|
@ -819,7 +819,7 @@ protected:
|
|||
void drawRoomObject(int i, int arg);
|
||||
void drawBox(int x, int y, int x2, int y2, int color);
|
||||
|
||||
void restoreBG(ScummVM::Rect rect, byte backColor = 0);
|
||||
void restoreBG(Common::Rect rect, byte backColor = 0);
|
||||
void redrawBGStrip(int start, int num);
|
||||
void redrawBGAreas();
|
||||
|
||||
|
@ -829,7 +829,7 @@ protected:
|
|||
virtual void setCameraFollows(Actor *a);
|
||||
virtual void moveCamera();
|
||||
virtual void panCameraTo(int x, int y);
|
||||
void clampCameraPos(ScummVM::Point *pt);
|
||||
void clampCameraPos(Common::Point *pt);
|
||||
void actorFollowCamera(int act);
|
||||
|
||||
const byte *getPalettePtr();
|
||||
|
@ -981,7 +981,7 @@ public:
|
|||
byte getNumBoxes();
|
||||
byte *getBoxMatrixBaseAddr();
|
||||
int getPathToDestBox(byte from, byte to);
|
||||
void getGates(int trap1, int trap2, ScummVM::Point gateA[2], ScummVM::Point gateB[2]);
|
||||
void getGates(int trap1, int trap2, Common::Point gateA[2], Common::Point gateB[2]);
|
||||
bool inBoxQuickReject(int box, int x, int y, int threshold);
|
||||
int getClosestPtOnBox(int box, int x, int y, int16& outX, int16& outY);
|
||||
int getSpecialBox(int param1, int param2);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "common/util.h"
|
||||
|
||||
class FilePtr : public File {
|
||||
ScummVM::String _filename;
|
||||
Common::String _filename;
|
||||
int32 _refcount;
|
||||
public:
|
||||
FilePtr(const char *fname, const char *directory) :
|
||||
|
|
|
@ -99,9 +99,9 @@ void Scumm::initV2MouseOver() {
|
|||
v2_mouseover_boxes[kSentenceLine].hicolor = hi_color;
|
||||
}
|
||||
|
||||
void Scumm::checkV2MouseOver(ScummVM::Point pos) {
|
||||
void Scumm::checkV2MouseOver(Common::Point pos) {
|
||||
VirtScreen *vs = &virtscr[2];
|
||||
ScummVM::Rect rect;
|
||||
Common::Rect rect;
|
||||
byte *ptr, *dst;
|
||||
int i, x, y, new_box = -1;
|
||||
|
||||
|
@ -197,7 +197,7 @@ void Scumm::checkV2Inventory(int x, int y) {
|
|||
void Scumm::redrawV2Inventory() {
|
||||
int i;
|
||||
int max_inv;
|
||||
ScummVM::Rect inventoryBox;
|
||||
Common::Rect inventoryBox;
|
||||
|
||||
v2_mouseover_box = -1;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ enum {
|
|||
struct VerbSlot {
|
||||
int16 x, y;
|
||||
int16 right, bottom;
|
||||
ScummVM::Rect old;
|
||||
Common::Rect old;
|
||||
uint16 verbid;
|
||||
uint8 color, hicolor, dimcolor, bkcolor, type;
|
||||
uint8 charset_nr, curmode;
|
||||
|
|
|
@ -179,7 +179,7 @@ protected:
|
|||
int _numStates;
|
||||
int _state;
|
||||
|
||||
ScummVM::Rect _hitRect;
|
||||
Common::Rect _hitRect;
|
||||
|
||||
public:
|
||||
Sword2Widget(Sword2Dialog *parent, int states) :
|
||||
|
@ -234,7 +234,7 @@ public:
|
|||
return _state;
|
||||
}
|
||||
|
||||
virtual void paint(ScummVM::Rect *clipRect = NULL) {
|
||||
virtual void paint(Common::Rect *clipRect = NULL) {
|
||||
DrawSurface(&_sprites[_state], _surfaces[_state]._surface, clipRect);
|
||||
}
|
||||
|
||||
|
@ -574,7 +574,7 @@ public:
|
|||
createSurfaceImages(3406, x, y);
|
||||
}
|
||||
|
||||
virtual void paint(ScummVM::Rect *clipRect = NULL) {
|
||||
virtual void paint(Common::Rect *clipRect = NULL) {
|
||||
// This will redraw a bit more than is strictly necessary,
|
||||
// but I doubt that will make any noticeable difference.
|
||||
|
||||
|
@ -948,7 +948,7 @@ public:
|
|||
return &_text[0];
|
||||
}
|
||||
|
||||
virtual void paint(ScummVM::Rect *clipRect = NULL) {
|
||||
virtual void paint(Common::Rect *clipRect = NULL) {
|
||||
Sword2Widget::paint();
|
||||
|
||||
// HACK: The main dialog is responsible for drawing the text
|
||||
|
|
|
@ -305,7 +305,7 @@ int32 PlaySmacker(char *filename, _movieTextObject *text[], uint8 *musicOut) {
|
|||
SetNeedRedraw();
|
||||
|
||||
// HACK: Remove the instructions created above
|
||||
ScummVM::Rect r;
|
||||
Common::Rect r;
|
||||
|
||||
memset(lpBackBuffer, 0, screenWide * MENUDEEP);
|
||||
r.left = r.top = 0;
|
||||
|
|
|
@ -377,7 +377,7 @@ extern int32 ReadKey(_keyboardEvent *ke);
|
|||
//-----------------------------------------------------------------------------
|
||||
extern int32 DrawSprite(_spriteInfo *s);
|
||||
extern int32 CreateSurface(_spriteInfo *s, uint8 **surface);
|
||||
extern void DrawSurface(_spriteInfo *s, uint8 *surface, ScummVM::Rect *clipRect = NULL);
|
||||
extern void DrawSurface(_spriteInfo *s, uint8 *surface, Common::Rect *clipRect = NULL);
|
||||
extern void DeleteSurface(uint8 *surface);
|
||||
extern int32 OpenLightMask(_spriteInfo *s);
|
||||
extern int32 CloseLightMask(void);
|
||||
|
|
|
@ -43,7 +43,7 @@ static uint8 pocketStatus[2][RDMENU_MAXPOCKETS] = {
|
|||
|
||||
static uint8 iconCount = 0;
|
||||
|
||||
void ClearIconArea(int menu, int pocket, ScummVM::Rect *r) {
|
||||
void ClearIconArea(int menu, int pocket, Common::Rect *r) {
|
||||
byte *dst;
|
||||
int i;
|
||||
|
||||
|
@ -74,7 +74,7 @@ int32 ProcessMenu(void) {
|
|||
uint8 frameCount;
|
||||
int32 curx, xoff;
|
||||
int32 cury, yoff;
|
||||
ScummVM::Rect r1, r2;
|
||||
Common::Rect r1, r2;
|
||||
int32 delta;
|
||||
static int32 lastTime = 0;
|
||||
|
||||
|
@ -254,7 +254,7 @@ int32 HideMenu(uint8 menu) {
|
|||
*/
|
||||
|
||||
int32 CloseMenuImmediately(void) {
|
||||
ScummVM::Rect r;
|
||||
Common::Rect r;
|
||||
int i;
|
||||
|
||||
menuStatus[0] = RDMENU_HIDDEN;
|
||||
|
@ -284,7 +284,7 @@ int32 CloseMenuImmediately(void) {
|
|||
*/
|
||||
|
||||
int32 SetMenuIcon(uint8 menu, uint8 pocket, uint8 *icon) {
|
||||
ScummVM::Rect r;
|
||||
Common::Rect r;
|
||||
|
||||
debug(5, "stub SetMenuIcon( %d, %d )", menu, pocket);
|
||||
|
||||
|
|
|
@ -74,12 +74,12 @@ typedef struct {
|
|||
|
||||
BlockSurface **blockSurfaces[MAXLAYERS] = { 0, 0, 0, 0, 0 };
|
||||
|
||||
void UploadRect(ScummVM::Rect *r) {
|
||||
void UploadRect(Common::Rect *r) {
|
||||
g_system->copy_rect(lpBackBuffer + r->top * screenWide + r->left,
|
||||
screenWide, r->left, r->top, r->right - r->left, r->bottom - r->top);
|
||||
}
|
||||
|
||||
void BlitBlockSurface(BlockSurface *s, ScummVM::Rect *r, ScummVM::Rect *clip_rect) {
|
||||
void BlitBlockSurface(BlockSurface *s, Common::Rect *r, Common::Rect *clip_rect) {
|
||||
if (r->top > clip_rect->bottom || r->left > clip_rect->right || r->bottom <= clip_rect->top || r->right <= clip_rect->left)
|
||||
return;
|
||||
|
||||
|
@ -703,7 +703,7 @@ int32 SetLocationMetrics(uint16 w, uint16 h) {
|
|||
|
||||
int32 RenderParallax(_parallax *p, int16 l) {
|
||||
int16 x, y;
|
||||
ScummVM::Rect r;
|
||||
Common::Rect r;
|
||||
|
||||
if (locationWide == screenWide)
|
||||
x = 0;
|
||||
|
@ -715,7 +715,7 @@ int32 RenderParallax(_parallax *p, int16 l) {
|
|||
else
|
||||
y = ((int32) ((p->h - (screenDeep - MENUDEEP * 2)) * scrolly) / (int32) (locationDeep - (screenDeep - MENUDEEP * 2)));
|
||||
|
||||
ScummVM::Rect clip_rect;
|
||||
Common::Rect clip_rect;
|
||||
|
||||
// Leave enough space for the top and bottom menues
|
||||
|
||||
|
|
|
@ -56,6 +56,6 @@ extern int16 locationDeep;
|
|||
void SquashImage(byte *dst, uint16 dstPitch, uint16 dstWidth, uint16 dstHeight, byte *src, uint16 srcPitch, uint16 srcWidth, uint16 srcHeight, byte *backbuf);
|
||||
void StretchImage(byte *dst, uint16 dstPitch, uint16 dstWidth, uint16 dstHeight, byte *src, uint16 srcPitch, uint16 srcWidth, uint16 srcHeight, byte *backbuf);
|
||||
|
||||
void UploadRect(ScummVM::Rect *r);
|
||||
void UploadRect(Common::Rect *r);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -295,8 +295,8 @@ int32 CreateSurface(_spriteInfo *s, uint8 **sprite) {
|
|||
* @param clipRect the clipping rectangle
|
||||
*/
|
||||
|
||||
void DrawSurface(_spriteInfo *s, uint8 *surface, ScummVM::Rect *clipRect) {
|
||||
ScummVM::Rect rd, rs;
|
||||
void DrawSurface(_spriteInfo *s, uint8 *surface, Common::Rect *clipRect) {
|
||||
Common::Rect rd, rs;
|
||||
uint16 x, y, srcPitch;
|
||||
uint8 *src, *dst;
|
||||
|
||||
|
@ -398,7 +398,7 @@ int32 DrawSprite(_spriteInfo *s) {
|
|||
uint16 srcPitch;
|
||||
bool freeSprite = false;
|
||||
bool clipped = false;
|
||||
ScummVM::Rect rd, rs;
|
||||
Common::Rect rd, rs;
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// Decompression and mirroring
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue