[Scummvm-cvs-logs] CVS: scummvm resource.h,NONE,1.1 object.h,NONE,1.1 verbs.cpp,1.29,1.30 sys.cpp,1.16,1.17 scummvm.cpp,1.181,1.182 scumm.h,1.185,1.186 script_v2.cpp,1.75,1.76 script.cpp,1.65,1.66 saveload.h,1.2,1.3 saveload.cpp,1.56,1.57 resource.cpp,1.98,1.99 readme.txt,1.71,1.72 object.cpp,1.79,1.80 insane.cpp,1.47,1.48 init.cpp,1.13,1.14 gfx.cpp,1.101,1.102 gameDetector.cpp,1.75,1.76 debug.cpp,1.31,1.32 config-file.cpp,1.11,1.12 actor.cpp,1.94,1.95
Max Horn
fingolfin at users.sourceforge.net
Tue Jul 16 14:04:03 CEST 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/v3 resource_v3.cpp,1.9,1.10
- Next message: [Scummvm-cvs-logs] CVS: scummvm system.h,1.23,1.24 sdl_gl.cpp,1.2,1.3 sdl.cpp,1.132,1.133 scummvm.cpp,1.182,1.183 newgui.cpp,1.20,1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv16056
Modified Files:
verbs.cpp sys.cpp scummvm.cpp scumm.h script_v2.cpp script.cpp
saveload.h saveload.cpp resource.cpp readme.txt object.cpp
insane.cpp init.cpp gfx.cpp gameDetector.cpp debug.cpp
config-file.cpp actor.cpp
Added Files:
resource.h object.h
Log Message:
biiig checkin: removed more stuff from scumm.h; added new headers resource.h and object.h
--- NEW FILE: resource.h ---
/* ScummVM - Scumm Interpreter
* Copyright (C) 2002 The ScummVM project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: /cvsroot/scummvm/scummvm/resource.h,v 1.1 2002/07/16 21:03:13 fingolfin Exp $
*/
#ifndef RESOURCE_H
#define RESOURCE_H
#if !defined(__GNUC__)
#pragma START_PACK_STRUCTS
#endif
struct ResHdr {
uint32 tag, size;
} GCC_PACK;
#if !defined(__GNUC__)
#pragma END_PACK_STRUCTS
#endif
#define RES_DATA(x) (((byte*)x) + sizeof(ResHdr))
#define RES_SIZE(x) (READ_BE_UINT32_UNALIGNED(&((ResHdr* )x)->size))
enum {
OF_OWNER_MASK = 0x0F,
OF_STATE_MASK = 0xF0,
OF_STATE_SHL = 4
};
enum {
RF_LOCK = 0x80,
RF_USAGE = 0x7F,
RF_USAGE_MAX = RF_USAGE
};
byte *findResource(uint32 tag, byte *searchin, int index);
byte *findResourceSmall(uint32 tag, byte *searchin, int index);
byte *findResource(uint32 tag, byte *searchin);
byte *findResourceSmall(uint32 tag, byte *searchin);
#endif
--- NEW FILE: object.h ---
/* ScummVM - Scumm Interpreter
* Copyright (C) 2002 The ScummVM project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: /cvsroot/scummvm/scummvm/object.h,v 1.1 2002/07/16 21:03:13 fingolfin Exp $
*/
#ifndef OBJECT_H
#define OBJECT_H
#if !defined(__GNUC__)
#pragma START_PACK_STRUCTS
#endif
struct RoomHeader {
union {
struct {
uint32 version;
uint16 width, height;
uint16 numObjects;
} GCC_PACK v7;
struct {
uint16 width, height;
uint16 numObjects;
} GCC_PACK old;
} GCC_PACK;
} GCC_PACK;
struct CodeHeader {
union {
struct {
uint16 obj_id;
byte x, y, w, h;
byte flags;
byte parent;
int16 walk_x;
int16 walk_y;
byte actordir;
} GCC_PACK v5;
struct {
uint16 obj_id;
int16 x, y;
uint16 w, h;
byte flags, parent;
uint16 unk1;
uint16 unk2;
byte actordir;
} GCC_PACK v6;
struct {
uint32 version;
uint16 obj_id;
byte parent;
byte parentstate;
} GCC_PACK v7;
} GCC_PACK;
} GCC_PACK;
struct ImageHeader { /* file format */
union {
struct {
uint16 obj_id;
uint16 unk[5];
uint16 width;
uint16 height;
uint16 unk_2;
struct {
int16 x, y;
} GCC_PACK hotspot[15];
} GCC_PACK old;
struct {
uint32 version;
uint16 obj_id;
uint16 unk[1];
int16 x_pos, y_pos;
uint16 width, height;
byte unk2[3];
byte actordir;
uint16 unk_2;
struct {
int16 x, y;
} GCC_PACK hotspot[15];
} GCC_PACK v7;
} GCC_PACK;
} GCC_PACK;
#if !defined(__GNUC__)
#pragma END_PACK_STRUCTS
#endif
struct FindObjectInRoom {
CodeHeader *cdhd;
byte *obcd;
ImageHeader *imhd;
byte *obim;
byte *roomptr;
};
enum FindObjectWhat {
foCodeHeader = 1,
foImageHeader = 2,
foCheckAlreadyLoaded = 4
};
#endif
Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/verbs.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- verbs.cpp 7 Jul 2002 20:21:42 -0000 1.29
+++ verbs.cpp 16 Jul 2002 21:03:13 -0000 1.30
@@ -22,6 +22,8 @@
#include "stdafx.h"
#include "scumm.h"
+#include "object.h"
+#include "resource.h"
void Scumm::redrawVerbs()
{
Index: sys.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sys.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- sys.cpp 7 Jul 2002 20:25:22 -0000 1.16
+++ sys.cpp 16 Jul 2002 21:03:13 -0000 1.17
@@ -201,17 +201,6 @@
return (b << 16) | a;
}
-char *Scumm::Strdup(const char *s)
-{
- if (s) {
- int l = strlen(s) + 1;
- char *r = (char *)malloc(l);
- memcpy(r, s, l);
- return r;
- }
- return NULL;
-}
-
bool Scumm::checkFixedDisk()
{
return true;
@@ -221,11 +210,14 @@
#ifdef NEED_STRDUP
char *strdup(const char *s)
{
- int len = strlen(s) + 1;
- char *d = (char *)malloc(len);
- if (d)
- memcpy(d, s, len);
- return d;
+ if (s) {
+ int len = strlen(s) + 1;
+ char *d = (char *)malloc(len);
+ if (d)
+ memcpy(d, s, len);
+ return d;
+ }
+ return NULL;
}
#endif /* NEED_STRDUP */
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -d -r1.181 -r1.182
--- scummvm.cpp 16 Jul 2002 18:51:27 -0000 1.181
+++ scummvm.cpp 16 Jul 2002 21:03:13 -0000 1.182
@@ -24,11 +24,13 @@
#include "scumm.h"
#include "sound/mididrv.h"
#include "sound/imuse.h"
+#include "actor.h"
+#include "gameDetector.h"
#include "gui.h"
+#include "newgui.h"
+#include "object.h"
+#include "resource.h"
#include "string.h"
-#include "gameDetector.h"
-#include "actor.h"
-#include"newgui.h"
int autosave(int interval) /* Not in class to prevent being bound */
{
@@ -78,7 +80,7 @@
setupCursor();
/* Allocate and initilise actors */
- actor = new Actor[MAX_ACTORS];
+ _actors = new Actor[MAX_ACTORS];
for (i = 1, a = getFirstActor(); ++a, i < NUM_ACTORS; i++) {
a->number = i;
a->initActorClass(this);
@@ -260,9 +262,7 @@
_vars[VAR_MI1_TIMER] += 6;
}
}
- } else if (_features & GF_OLD256)
-
- {
+ } else if (_features & GF_OLD256) {
if(tempMusic == 3) {
tempMusic = 0;
@@ -1027,7 +1027,7 @@
Actor *Scumm::derefActor(int id)
{
- return &actor[id];
+ return &_actors[id];
}
Actor *Scumm::derefActorSafe(int id, const char *errmsg)
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -d -r1.185 -r1.186
--- scumm.h 16 Jul 2002 18:51:27 -0000 1.185
+++ scumm.h 16 Jul 2002 21:03:13 -0000 1.186
@@ -41,6 +41,7 @@
class Actor;
struct ScummDebugger;
struct Serializer;
+struct FindObjectInRoom;
typedef void (Scumm::*OpcodeProc)();
@@ -66,13 +67,6 @@
KEY_SET_OPTIONS = 3456 // WinCE
};
-/* Script status type (slot.status) */
-enum {
- ssDead = 0,
- ssPaused = 1,
- ssRunning = 2
-};
-
struct ScummPoint {
int x, y;
};
@@ -81,97 +75,6 @@
uint32 size;
};
-#if !defined(__GNUC__)
- #pragma START_PACK_STRUCTS
-#endif
-
-struct ResHdr {
- uint32 tag, size;
-} GCC_PACK;
-
-#define RES_DATA(x) (((byte*)x) + sizeof(ResHdr))
-#define RES_SIZE(x) ( READ_BE_UINT32_UNALIGNED(&((ResHdr*)x)->size) )
-
-
-struct RoomHeader {
- union {
- struct {
- uint32 version;
- uint16 width, height;
- uint16 numObjects;
- } GCC_PACK v7;
- struct {
- uint16 width, height;
- uint16 numObjects;
- } GCC_PACK old;
- } GCC_PACK;
-} GCC_PACK;
-
-struct CodeHeader {
- union {
- struct {
- uint16 obj_id;
- byte x, y, w, h;
- byte flags;
- byte parent;
- int16 walk_x;
- int16 walk_y;
- byte actordir;
- } GCC_PACK v5;
-
- struct {
- uint16 obj_id;
- int16 x, y;
- uint16 w, h;
- byte flags, parent;
- uint16 unk1;
- uint16 unk2;
- byte actordir;
- } GCC_PACK v6;
-
- struct {
- uint32 version;
- uint16 obj_id;
- byte parent;
- byte parentstate;
- } GCC_PACK v7;
-
- } GCC_PACK;
-} GCC_PACK;
-
-struct ImageHeader { /* file format */
- union {
- struct {
- uint16 obj_id;
- uint16 unk[5];
- uint16 width;
- uint16 height;
- uint16 unk_2;
- struct {
- int16 x, y;
- } GCC_PACK hotspot[15];
- } GCC_PACK old;
-
- struct {
- uint32 version;
- uint16 obj_id;
- uint16 unk[1];
- int16 x_pos, y_pos;
- uint16 width, height;
- byte unk2[3];
- byte actordir;
- uint16 unk_2;
- struct {
- int16 x, y;
- } GCC_PACK hotspot[15];
- } GCC_PACK v7;
- } GCC_PACK;
-} GCC_PACK;
-
-#if !defined(__GNUC__)
- #pragma END_PACK_STRUCTS
-#endif
-
struct VerbSlot {
int16 x, y;
int16 right, bottom;
@@ -221,16 +124,6 @@
uint8 slot;
};
-enum {
- sleByte = 1,
- sleUint8 = 1,
- sleInt8 = 1,
- sleInt16 = 2,
- sleUint16 = 3,
- sleInt32 = 4,
- sleUint32 = 5
-};
-
enum ResTypes {
rtFirst = 1,
rtRoom = 1,
@@ -263,25 +156,12 @@
};
enum {
- OF_OWNER_MASK = 0x0F,
- OF_STATE_MASK = 0xF0,
-
- OF_STATE_SHL = 4
-};
-
-enum {
MBS_LEFT_CLICK = 0x8000,
MBS_RIGHT_CLICK = 0x4000,
MBS_MOUSE_MASK = (MBS_LEFT_CLICK | MBS_RIGHT_CLICK),
MBS_MAX_KEY = 0x0200
};
-enum {
- RF_LOCK = 0x80,
- RF_USAGE = 0x7F,
- RF_USAGE_MAX = RF_USAGE
-};
-
#define _maxRooms res.num[rtRoom]
#define _maxScripts res.num[rtScript]
#define _maxCostumes res.num[rtCostume]
@@ -443,7 +323,6 @@
#include "gfx.h"
#include "boxes.h"
-#include "smush.h"
class Scumm {
public:
@@ -540,7 +419,7 @@
/* Core class/array definitions */
Gdi gdi;
- Actor *actor; // Has MAX_ACTORS elements, see init.cpp
+ Actor *_actors; // Has MAX_ACTORS elements, see init.cpp
uint16 *_inventory;
byte *_arrays;
@@ -750,19 +629,6 @@
/* Should be in Object class */
byte OF_OWNER_ROOM;
- struct FindObjectInRoom {
- CodeHeader *cdhd;
- byte *obcd;
- ImageHeader *imhd;
- byte *obim;
- byte *roomptr;
- };
-
- enum FindObjectWhat {
- foCodeHeader = 1,
- foImageHeader = 2,
- foCheckAlreadyLoaded = 4
- };
int getInventorySlot();
void SamInventoryHack(int obj); // FIXME: Sam and Max hack
int findInventory(int owner, int index);
@@ -918,7 +784,7 @@
/* Should be in Actor class */
Actor *derefActor(int id);
Actor *derefActorSafe(int id, const char *errmsg);
- Actor *getFirstActor() {return actor;}
+ Actor *getFirstActor() { return _actors; }
void putActor(Actor *a, int x, int y, byte room);
void showActors();
@@ -1186,8 +1052,6 @@
uint fileReadWordLE(void *handle);
uint fileReadWordBE(void *handle);
- static char *Strdup(const char *);
-
/* Version 5 script opcodes */
void o5_actorFollowCamera();
void o5_actorFromPos();
@@ -1621,11 +1485,8 @@
void printScripts();
};
-extern const uint32 IMxx_tags[];
-extern const byte default_scale_table[768];
extern uint16 _debugLevel;
-void outputdisplay2(Scumm *s, int disp);
extern const byte revBitMask[8];
//void blitToScreen(Scumm *s, byte *src, int x, int y, int w, int h);
@@ -1639,11 +1500,5 @@
void CDECL debug(int level, const char *s, ...);
void checkHeap();
void blit(byte *dst, byte *src, int w, int h);
-byte *findResource(uint32 tag, byte *searchin, int index);
-byte *findResourceSmall(uint32 tag, byte *searchin, int index);
-byte *findResource(uint32 tag, byte *searchin);
-byte *findResourceSmall(uint32 tag, byte *searchin);
-void setWindowName(Scumm *s);
-uint16 newTag2Old(uint32 oldTag);
#endif
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- script_v2.cpp 16 Jul 2002 18:51:27 -0000 1.75
+++ script_v2.cpp 16 Jul 2002 21:03:13 -0000 1.76
@@ -24,6 +24,7 @@
#include "stdafx.h"
#include "scumm.h"
#include "actor.h"
+#include "smush.h"
#include "sound/mididrv.h"
#include "sound/imuse.h"
@@ -1398,7 +1399,7 @@
void Scumm::o6_putActorAtObject()
{
- int room, obj, x, y, dir;
+ int room, obj, x, y;
Actor *a;
obj = popRoomAndObj(&room);
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- script.cpp 16 Jul 2002 18:51:27 -0000 1.65
+++ script.cpp 16 Jul 2002 21:03:13 -0000 1.66
@@ -23,6 +23,15 @@
#include "stdafx.h"
#include "scumm.h"
#include "actor.h"
+#include "resource.h"
+
+/* Script status type (slot.status) */
+enum {
+ ssDead = 0,
+ ssPaused = 1,
+ ssRunning = 2
+};
+
/* Start executing script 'script' with parameters 'a' and 'b' */
void Scumm::runScript(int script, int a, int b, int16 *lvarptr)
Index: saveload.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saveload.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- saveload.h 4 Jul 2002 10:05:40 -0000 1.2
+++ saveload.h 16 Jul 2002 21:03:13 -0000 1.3
@@ -22,6 +22,16 @@
#ifndef SAVELOAD_H
#define SAVELOAD_H
+enum {
+ sleByte = 1,
+ sleUint8 = 1,
+ sleInt8 = 1,
+ sleInt16 = 2,
+ sleUint16 = 3,
+ sleInt32 = 4,
+ sleUint32 = 5
+};
+
struct SaveLoadEntry {
uint32 offs;
uint8 type;
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saveload.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- saveload.cpp 16 Jul 2002 15:25:22 -0000 1.56
+++ saveload.cpp 16 Jul 2002 21:03:13 -0000 1.57
@@ -26,6 +26,7 @@
#include "sound/imuse.h"
#include "actor.h"
#include "config-file.h"
+#include "resource.h"
#include "saveload.h"
struct SaveGameHeader {
@@ -622,7 +623,7 @@
else
s->saveLoadEntries(this, mainEntriesV8);
- s->saveLoadArrayOf(actor, NUM_ACTORS, sizeof(actor[0]), actorEntries);
+ s->saveLoadArrayOf(_actors, NUM_ACTORS, sizeof(_actors[0]), actorEntries);
if (_current_version < VER_V9)
s->saveLoadArrayOf(vm.slot, 25, sizeof(vm.slot[0]), scriptSlotEntries);
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/resource.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- resource.cpp 10 Jul 2002 16:38:38 -0000 1.98
+++ resource.cpp 16 Jul 2002 21:03:13 -0000 1.99
@@ -22,7 +22,13 @@
#include "stdafx.h"
#include "scumm.h"
+#include "resource.h"
+
#include <stdio.h>
+
+
+uint16 newTag2Old(uint32 oldTag);
+
/* Open a room */
void Scumm::openRoom(int room)
Index: readme.txt
===================================================================
RCS file: /cvsroot/scummvm/scummvm/readme.txt,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- readme.txt 16 Jul 2002 18:34:56 -0000 1.71
+++ readme.txt 16 Jul 2002 21:03:14 -0000 1.72
@@ -482,7 +482,7 @@
[scummvm]
gfx_mode=supereagle
fullscreen=true
- savepath=C:\saves\
+ savepath=C:\saves\
[tentacle]
path=C:\tentacle\
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/object.cpp,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- object.cpp 16 Jul 2002 18:51:27 -0000 1.79
+++ object.cpp 16 Jul 2002 21:03:14 -0000 1.80
@@ -23,6 +23,8 @@
#include "stdafx.h"
#include "scumm.h"
#include "actor.h"
+#include "object.h"
+#include "resource.h"
bool Scumm::getClass(int obj, int cls)
{
@@ -807,7 +809,7 @@
if (findWhat & foCheckAlreadyLoaded && getObjectIndex(id) != -1) {
fo->obcd = obcdptr = getOBCDFromObject(id);
assert((byte *)obcdptr > (byte *)256);
- fo->obim = obimptr = obcdptr + READ_BE_UINT32_UNALIGNED(&((ResHdr *)obcdptr)->size);
+ fo->obim = obimptr = obcdptr + RES_SIZE(obcdptr);
fo->cdhd = (CodeHeader *)findResourceData(MKID('CDHD'), obcdptr);
fo->imhd = (ImageHeader *)findResourceData(MKID('IMHD'), obimptr);
return;
Index: insane.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/insane.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- insane.cpp 15 Jul 2002 21:56:30 -0000 1.47
+++ insane.cpp 16 Jul 2002 21:03:14 -0000 1.48
@@ -23,9 +23,9 @@
#define NEED_SDL_HEADERS
#endif
-
#include "stdafx.h"
#include "scumm.h"
+#include "smush.h"
//#define SWAP2(a) ((((a)>>24)&0xFF) | (((a)>>8)&0xFF00) | (((a)<<8)&0xFF0000) | (((a)<<24)&0xFF000000))
#define MAX_STREAMER 10
Index: init.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/init.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- init.cpp 8 Jul 2002 00:10:11 -0000 1.13
+++ init.cpp 16 Jul 2002 21:03:14 -0000 1.14
@@ -30,6 +30,6 @@
}
Scumm::~Scumm (void) {
- delete [] actor;
+ delete [] _actors;
delete _newgui;
}
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.cpp,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- gfx.cpp 16 Jul 2002 14:13:52 -0000 1.101
+++ gfx.cpp 16 Jul 2002 21:03:14 -0000 1.102
@@ -21,8 +21,9 @@
#include "stdafx.h"
#include "scumm.h"
-#include "gui.h"
#include "actor.h"
+#include "gui.h"
+#include "resource.h"
void Scumm::getGraphicsPerformance()
{
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- gameDetector.cpp 9 Jul 2002 13:30:10 -0000 1.75
+++ gameDetector.cpp 16 Jul 2002 21:03:14 -0000 1.76
@@ -109,7 +109,7 @@
_noSubtitles = false;
if ((val = scummcfg->get("path")))
- _gameDataPath = Scumm::Strdup(val);
+ _gameDataPath = strdup(val);
if ((val = scummcfg->get("sfx_volume")))
_sfx_volume = atoi(val);
@@ -459,9 +459,9 @@
if (_gameText == NULL) {
char buf[256];
sprintf(buf, "Unknown game: \"%s\"", _exe_name);
- return Scumm::Strdup(buf);
+ return strdup(buf);
}
- return Scumm::Strdup(_gameText);
+ return strdup(_gameText);
}
int GameDetector::detectMain(int argc, char **argv)
@@ -541,7 +541,7 @@
if (!_gameDataPath) {
warning("No path was provided. Assuming the data files are in the current directory");
- _gameDataPath = Scumm::Strdup("");
+ _gameDataPath = strdup("");
} else if (_gameDataPath[strlen(_gameDataPath)-1] != '/'
#ifdef __MORPHOS__
&& _gameDataPath[strlen(_gameDataPath)-1] != ':'
Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/debug.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- debug.cpp 7 Jul 2002 20:25:23 -0000 1.31
+++ debug.cpp 16 Jul 2002 21:03:14 -0000 1.32
@@ -102,7 +102,7 @@
printf("Current room: %d [%d]\n", _s->_currentRoom, _s->_roomResource);
} else {
int room = atoi(_parameters);
- _s->actor[_s->_vars[_s->VAR_EGO]].room = room;
+ _s->_actors[_s->_vars[_s->VAR_EGO]].room = room;
_s->startScene(room, 0, 0);
_s->_fullRedraw = 1;
}
@@ -286,7 +286,7 @@
printf("+--+----+--------+----+---+-----+---+---+--+-----+-----+---+---+\n");
for (i = 1; i < _s->NUM_ACTORS; i++) {
if (act == -1 || act == i) {
- a = &_s->actor[i];
+ a = &_s->_actors[i];
if (a->visible)
printf("|%2d|%4d|%3d %3d|%4d|%3d|%5d|%3d|%3d|%2d|%5d|%5d|%3d|%3d|\n",
i, a->room, a->x, a->y, a->elevation, a->costume, a->width,
Index: config-file.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/config-file.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- config-file.cpp 7 Jul 2002 20:32:26 -0000 1.11
+++ config-file.cpp 16 Jul 2002 21:03:14 -0000 1.12
@@ -68,7 +68,7 @@
int nkeys;
};
-hashconfig::hashconfig (const char *dom):domain(dom ? Scumm::Strdup(dom) : 0),
+hashconfig::hashconfig (const char *dom):domain(dom ? strdup(dom) : 0),
keys(0), values(0), nkeys(0)
{
}
@@ -102,15 +102,15 @@
for (i = 0; i < nkeys; i++) {
if (!strcmp(key, keys[i])) {
xfree(values[i]);
- return values[i] = value ? Scumm::Strdup(value) : 0;
+ return values[i] = value ? strdup(value) : 0;
}
}
nkeys++;
keys = (char **)realloc(keys, nkeys * sizeof(char *));
values = (char **)realloc(values, nkeys * sizeof(char *));
- keys[nkeys - 1] = Scumm::Strdup(key);
- return values[nkeys - 1] = value ? Scumm::Strdup(value) : 0;
+ keys[nkeys - 1] = strdup(key);
+ return values[nkeys - 1] = value ? strdup(value) : 0;
}
const char *hashconfig::getdomain() const
@@ -138,7 +138,7 @@
void hashconfig::rename(const char *d)
{
xfree(domain);
- domain = d ? Scumm::Strdup(d) : 0;
+ domain = d ? strdup(d) : 0;
}
void hashconfig::merge(const hashconfig *h)
@@ -153,7 +153,7 @@
// The config-class itself.
Config::Config (const char *cfg, const char *d)
-: filename(Scumm::Strdup(cfg)), domain(d ? Scumm::Strdup(d) : 0), hash(0), ndomains(0), willwrite(false)
+: filename(strdup(cfg)), domain(d ? strdup(d) : 0), hash(0), ndomains(0), willwrite(false)
{
FILE *cfg_file;
char t[MAXLINELEN];
@@ -279,7 +279,7 @@
{
int i;
xfree(domain);
- domain = d ? Scumm::Strdup(d) : 0;
+ domain = d ? strdup(d) : 0;
for (i = 0; i < ndomains; i++) {
if (hash[i]->is_domain(domain))
@@ -346,7 +346,7 @@
void Config::change_filename(const char *f)
{
xfree(filename);
- filename = f ? Scumm::Strdup(f) : 0;
+ filename = f ? strdup(f) : 0;
}
void Config::merge_config(const Config *c)
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/actor.cpp,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- actor.cpp 16 Jul 2002 18:51:26 -0000 1.94
+++ actor.cpp 16 Jul 2002 21:03:14 -0000 1.95
@@ -25,6 +25,7 @@
#include "actor.h"
#include "akos.h"
#include "costume.h"
+#include "resource.h"
#include <math.h>
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/v3 resource_v3.cpp,1.9,1.10
- Next message: [Scummvm-cvs-logs] CVS: scummvm system.h,1.23,1.24 sdl_gl.cpp,1.2,1.3 sdl.cpp,1.132,1.133 scummvm.cpp,1.182,1.183 newgui.cpp,1.20,1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list