aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-10-02 17:43:02 +0000
committerMax Horn2003-10-02 17:43:02 +0000
commit0e645f88ae1586dbac2bf0855fd0fda1f8f11eeb (patch)
treecef3882f5cb527ab9ced0c208d6f9c045bf8f3c4 /scumm
parentf26d3d1784756fccaaf306f6b13a28cb709ad5bc (diff)
downloadscummvm-rg350-0e645f88ae1586dbac2bf0855fd0fda1f8f11eeb.tar.gz
scummvm-rg350-0e645f88ae1586dbac2bf0855fd0fda1f8f11eeb.tar.bz2
scummvm-rg350-0e645f88ae1586dbac2bf0855fd0fda1f8f11eeb.zip
renamed namespace ScummVM to Common
svn-id: r10544
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp12
-rw-r--r--scumm/actor.h16
-rw-r--r--scumm/boxes.cpp28
-rw-r--r--scumm/boxes.h8
-rw-r--r--scumm/camera.cpp6
-rw-r--r--scumm/charset.h2
-rw-r--r--scumm/dialogs.cpp6
-rw-r--r--scumm/dialogs.h4
-rw-r--r--scumm/gfx.cpp4
-rw-r--r--scumm/gfx.h10
-rw-r--r--scumm/help.h2
-rw-r--r--scumm/script_v2.cpp4
-rw-r--r--scumm/script_v5.cpp2
-rw-r--r--scumm/scumm.h18
-rw-r--r--scumm/smush/chunk.cpp2
-rw-r--r--scumm/verbs.cpp6
-rw-r--r--scumm/verbs.h2
17 files changed, 66 insertions, 66 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 0c7b4e5d94..e8b82103de 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -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)
diff --git a/scumm/actor.h b/scumm/actor.h
index 83a2ec2b31..23e1cf862b 100644
--- a/scumm/actor.h
+++ b/scumm/actor.h
@@ -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
diff --git a/scumm/boxes.cpp b/scumm/boxes.cpp
index 6d0222ccf4..b4b50613d8 100644
--- a/scumm/boxes.cpp
+++ b/scumm/boxes.cpp
@@ -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
diff --git a/scumm/boxes.h b/scumm/boxes.h
index 583c3cc889..e0ab671d5c 100644
--- a/scumm/boxes.h
+++ b/scumm/boxes.h
@@ -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
diff --git a/scumm/camera.cpp b/scumm/camera.cpp
index 46633343ba..ffa5a20389 100644
--- a/scumm/camera.cpp
+++ b/scumm/camera.cpp
@@ -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) {
diff --git a/scumm/charset.h b/scumm/charset.h
index e464ede692..dd0375c01c 100644
--- a/scumm/charset.h
+++ b/scumm/charset.h
@@ -30,7 +30,7 @@ struct VirtScreen;
class CharsetRenderer {
public:
- ScummVM::Rect _str;
+ Common::Rect _str;
int _nextLeft, _nextTop;
int _top;
diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp
index edfa8f5d41..63866b06df 100644
--- a/scumm/dialogs.cpp
+++ b/scumm/dialogs.cpp
@@ -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));
diff --git a/scumm/dialogs.h b/scumm/dialogs.h
index d0abd0c404..eb0e2eb14a 100644
--- a/scumm/dialogs.h
+++ b/scumm/dialogs.h
@@ -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;
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 32259e37d3..c0f8452e49 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -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);
}
diff --git a/scumm/gfx.h b/scumm/gfx.h
index a5ae063acf..ebc40fde90 100644
--- a/scumm/gfx.h
+++ b/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:
diff --git a/scumm/help.h b/scumm/help.h
index 37836580ca..72d658fc01 100644
--- a/scumm/help.h
+++ b/scumm/help.h
@@ -26,7 +26,7 @@
class ScummHelp {
protected:
- typedef ScummVM::String String;
+ typedef Common::String String;
public:
static int numPages(byte gameId);
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 6b688bfdf9..34e08be9bc 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -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;
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index a9634a48a5..abe0111fd8 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -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);
diff --git a/scumm/scumm.h b/scumm/scumm.h
index fbc2346c94..47d91fd9ed 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -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);
diff --git a/scumm/smush/chunk.cpp b/scumm/smush/chunk.cpp
index d55629ef56..39cde19048 100644
--- a/scumm/smush/chunk.cpp
+++ b/scumm/smush/chunk.cpp
@@ -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) :
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp
index 13a4e1c014..992b3e5817 100644
--- a/scumm/verbs.cpp
+++ b/scumm/verbs.cpp
@@ -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;
diff --git a/scumm/verbs.h b/scumm/verbs.h
index fd4decb82d..1cbaa2d459 100644
--- a/scumm/verbs.h
+++ b/scumm/verbs.h
@@ -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;