[Scummvm-cvs-logs] CVS: scummvm/queen defs.h,1.36,1.37 display.h,1.25,1.26 logic.cpp,1.127,1.128 logic.h,1.83,1.84
Gregory Montoir
cyx at users.sourceforge.net
Thu Dec 11 02:26:01 CET 2003
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv31653/queen
Modified Files:
defs.h display.h logic.cpp logic.h
Log Message:
cleanup
Index: defs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/defs.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- defs.h 11 Dec 2003 10:03:35 -0000 1.36
+++ defs.h 11 Dec 2003 10:24:27 -0000 1.37
@@ -61,7 +61,7 @@
enum {
INK_BG_PANEL = 226,
INK_JOURNAL = 248,
- INK_MAP7 = 243,
+ INK_PINNACLE_ROOM = 243,
INK_CMD_SELECT = 255,
INK_CMD_NORMAL = 225,
INK_CMD_LOCK = 234,
@@ -72,11 +72,6 @@
enum {
- ZONE_ROOM = 0,
- ZONE_PANEL = 1
-};
-
-enum {
ITEM_NONE = 0,
ITEM_BAT = 1,
ITEM_JOURNAL,
@@ -277,14 +272,6 @@
HEBREW = 'H',
ITALIAN = 'I',
SPANISH = 'S'
-};
-
-
-enum JoeWalkMode {
- JWM_NORMAL = 0,
- JWM_MOVE = 1,
- JWM_EXECUTE = 2,
- JWM_SPEAK = 3
};
Index: display.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/display.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- display.h 3 Dec 2003 14:09:37 -0000 1.25
+++ display.h 11 Dec 2003 10:24:27 -0000 1.26
@@ -126,7 +126,7 @@
SCREEN_W = 320,
SCREEN_H = 200,
PANEL_W = 320,
- PANEL_H = 50
+ PANEL_H = 50
};
TextRenderer _textRenderer;
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- logic.cpp 11 Dec 2003 10:03:35 -0000 1.127
+++ logic.cpp 11 Dec 2003 10:24:27 -0000 1.128
@@ -65,7 +65,6 @@
Logic::Logic(Resource *theResource, Graphics *graphics, Display *theDisplay, Input *input, Sound *sound)
: _resource(theResource), _graphics(graphics), _display(theDisplay),
_input(input), _sound(sound) {
- _jas = _resource->loadFile("QUEEN.JAS", 20);
_joe.x = _joe.y = 0;
_joe.scale = 100;
_walk = new Walk(this, _graphics);
@@ -77,15 +76,20 @@
}
Logic::~Logic() {
- delete[] _jas;
delete _walk;
delete _cmd;
delete _dbg;
}
void Logic::initialise() {
+
int16 i, j;
- uint8 *ptr = _jas;
+
+
+ // Step 1 : read queen.jas file and 'unserialize' some arrays
+
+ uint8 *jas = _resource->loadFile("QUEEN.JAS", 20);
+ uint8 *ptr = jas;
_numRooms = READ_BE_UINT16(ptr); ptr += 2;
_numNames = READ_BE_UINT16(ptr); ptr += 2;
@@ -218,6 +222,11 @@
if(memcmp(ptr, _resource->JASVersion(), 5) != 0) {
warning("Unexpected queen.jas file format");
}
+
+ delete[] jas;
+
+
+ // Step 2 : read queen2.jas and grab all description texts
_objDescription = new char*[_numDescriptions + 1];
_objDescription[0] = 0;
@@ -264,6 +273,9 @@
for (i = 1; i <= _numAFile; i++)
_aFile[i] = _resource->getJAS2Line();
+
+ // Step 3 : initialise game state / variables
+
_cmd->clear(false);
_scene = 0;
memset(_gameState, 0, sizeof(_gameState));
@@ -2210,7 +2222,7 @@
_entryObj = objData->entryObj;
char textCmd[CmdText::MAX_COMMAND_LEN];
sprintf(textCmd, "%s %s", Verb(VERB_WALK_TO).name(), _objName[objData->name]);
- _graphics->textCurrentColor(INK_MAP7);
+ _graphics->textCurrentColor(INK_PINNACLE_ROOM);
_graphics->textSetCentered(5, textCmd);
}
prevObj = curObj;
Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- logic.h 11 Dec 2003 10:03:35 -0000 1.83
+++ logic.h 11 Dec 2003 10:24:27 -0000 1.84
@@ -37,6 +37,18 @@
RDM_FADE_JOE_XY = 3 // display Joe at the current X, Y coords
};
+enum {
+ ZONE_ROOM = 0,
+ ZONE_PANEL = 1
+};
+
+enum JoeWalkMode {
+ JWM_NORMAL = 0,
+ JWM_MOVE = 1,
+ JWM_EXECUTE = 2,
+ JWM_SPEAK = 3
+};
+
struct ZoneSlot {
bool valid;
Box box;
@@ -305,9 +317,6 @@
protected:
void initialise();
-
- //! Contents of queen.jas file
- uint8 *_jas;
uint16 _currentRoom;
uint16 _oldRoom;
More information about the Scummvm-git-logs
mailing list