aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2012-05-20 11:37:33 +1000
committerPaul Gilbert2012-05-20 11:37:33 +1000
commit333c30b8c7f6781605f517f2a7150f78a77556fc (patch)
tree7c1d63e5f729b451a1eb0e2b9237967c45249480 /engines
parent10b0451776249c4ffe27e319da4e8898a9ddb488 (diff)
downloadscummvm-rg350-333c30b8c7f6781605f517f2a7150f78a77556fc.tar.gz
scummvm-rg350-333c30b8c7f6781605f517f2a7150f78a77556fc.tar.bz2
scummvm-rg350-333c30b8c7f6781605f517f2a7150f78a77556fc.zip
TONY: Removed unused drive & folder defines and code
Diffstat (limited to 'engines')
-rw-r--r--engines/tony/adv.h8
-rw-r--r--engines/tony/globals.h3
-rw-r--r--engines/tony/window.cpp61
-rw-r--r--engines/tony/window.h10
4 files changed, 4 insertions, 78 deletions
diff --git a/engines/tony/adv.h b/engines/tony/adv.h
index 90a9c245b5..93359688f6 100644
--- a/engines/tony/adv.h
+++ b/engines/tony/adv.h
@@ -48,14 +48,6 @@ namespace Tony {
#define RM_SKIPY ((RM_BBY - RM_SY) / 2)
#define RM_SKIPX 0
-// Name lengths
-// FIXME: Some of these can likely be removed when refactoring is completed
-#define MAX_DRIVE 10
-#define MAX_DIR 255
-#define MAX_PATH 255
-#define MAX_FNAME 100
-#define MAX_EXT 10
-
// Tony's actions
enum RMTonyAction {
TA_GOTO = 0,
diff --git a/engines/tony/globals.h b/engines/tony/globals.h
index 1c2835cf40..9115b22ccc 100644
--- a/engines/tony/globals.h
+++ b/engines/tony/globals.h
@@ -44,6 +44,9 @@ namespace Tony {
#define T_MAREMETA 7
+#define MAX_PATH 255
+
+
struct CharacterStruct {
uint32 code;
RMItem *item;
diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp
index 58d0bba2ba..26dbaf88fc 100644
--- a/engines/tony/window.cpp
+++ b/engines/tony/window.cpp
@@ -195,69 +195,8 @@ void RMWindow::plotLines(const byte *lpBuf, const Common::Point &center, int x,
* RMSnapshot Methods
\****************************************************************************/
-char RMSnapshot::bufDrive[MAX_DRIVE];
-char RMSnapshot::bufDir[MAX_DIR];
-char RMSnapshot::bufName[MAX_FNAME];
-char RMSnapshot::bufExt[MAX_EXT];
-char RMSnapshot::filename[512];
byte RMSnapshot::rgb[RM_SX * RM_SY * 3];
-bool RMSnapshot::GetFreeSnapName(char *fn) {
-#ifdef REFACTOR_ME
- int i, j, k;
- uint32 h;
-
- theGame.GetDataDirectory(RMGame::DD_SHOTS, fn);
- _splitpath(fn, bufDrive, bufDir, NULL, NULL);
-
- for (i = 1; i < 10; i++) {
- wsprintf(bufName, "rm%d00", i);
- _makepath(fn, bufDrive, bufDir, bufName, ".bmp");
- h = CreateFile(fn, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if (h == CORO_INVALID_PID_VALUE)
- break;
- CloseHandle(h);
- }
-
- i--;
-
- for (j = 1; j < 10; j++) {
- wsprintf(bufName, "rm%d%d0", i, j);
- _makepath(fn, bufDrive, bufDir, bufName, ".bmp");
- h = CreateFile(fn, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if (h == CORO_INVALID_PID_VALUE)
- break;
- CloseHandle(h);
- }
-
- j--;
-
- for (k = 0; k < 10; k++) {
- wsprintf(bufName, "rm%d%d%d", i, j, k);
- _makepath(fn, bufDrive, bufDir, bufName, ".bmp");
- h = CreateFile(fn, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if (h == CORO_INVALID_PID_VALUE)
- break;
- CloseHandle(h);
- }
-
- if (k == 10) {
- k = 0;
- j++;
- if (j == 10) {
- j = 0;
- i++;
- if (i == 10)
- return false;
- }
-
- wsprintf(bufName, "rm%d%d%d", i, j, k);
- _makepath(fn, bufDrive, bufDir, bufName, ".bmp");
- }
-#endif
- return true;
-}
-
void RMSnapshot::GrabScreenshot(byte *lpBuf, int dezoom, uint16 *lpDestBuf) {
uint16 *src = (uint16 *)lpBuf;
diff --git a/engines/tony/window.h b/engines/tony/window.h
index ea26df3920..9483f693ab 100644
--- a/engines/tony/window.h
+++ b/engines/tony/window.h
@@ -41,16 +41,8 @@ struct DDSURFACEDESC {
class RMSnapshot {
private:
- // Buffer used to create a path
- static char bufDrive[MAX_DRIVE], bufDir[MAX_DIR], bufName[MAX_FNAME], bufExt[MAX_EXT];
- static char filename[512];
-
- // Buffer used to convert a RGB
+ // Buffer used to convert to RGB
static byte rgb[RM_SX * RM_SY * 3];
-
-private:
- bool GetFreeSnapName(char *fn);
-
public:
// Take a screenshot
void GrabScreenshot(byte *lpBuf, int dezoom = 1, uint16 *lpDestBuf = NULL);