mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
cleanup
svn-id: r11579
This commit is contained in:
parent
507a7057c1
commit
577ea51c10
15
queen/defs.h
15
queen/defs.h
@ -61,7 +61,7 @@ enum Direction {
|
||||
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,
|
||||
@ -71,11 +71,6 @@ enum {
|
||||
};
|
||||
|
||||
|
||||
enum {
|
||||
ZONE_ROOM = 0,
|
||||
ZONE_PANEL = 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ITEM_NONE = 0,
|
||||
ITEM_BAT = 1,
|
||||
@ -280,14 +275,6 @@ enum Language {
|
||||
};
|
||||
|
||||
|
||||
enum JoeWalkMode {
|
||||
JWM_NORMAL = 0,
|
||||
JWM_MOVE = 1,
|
||||
JWM_EXECUTE = 2,
|
||||
JWM_SPEAK = 3
|
||||
};
|
||||
|
||||
|
||||
} // End of namespace Queen
|
||||
|
||||
#endif
|
||||
|
@ -126,7 +126,7 @@ private:
|
||||
SCREEN_W = 320,
|
||||
SCREEN_H = 200,
|
||||
PANEL_W = 320,
|
||||
PANEL_H = 50
|
||||
PANEL_H = 50
|
||||
};
|
||||
|
||||
TextRenderer _textRenderer;
|
||||
|
@ -65,7 +65,6 @@ Common::RandomSource Logic::randomizer;
|
||||
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(Resource *theResource, Graphics *graphics, Display *theDisplay, Inp
|
||||
}
|
||||
|
||||
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 @@ void Logic::initialise() {
|
||||
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 @@ void Logic::initialise() {
|
||||
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 @@ void Logic::handlePinnacleRoom() {
|
||||
_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;
|
||||
|
@ -37,6 +37,18 @@ enum RoomDisplayMode {
|
||||
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;
|
||||
@ -306,9 +318,6 @@ protected:
|
||||
|
||||
void initialise();
|
||||
|
||||
//! Contents of queen.jas file
|
||||
uint8 *_jas;
|
||||
|
||||
uint16 _currentRoom;
|
||||
uint16 _oldRoom;
|
||||
uint16 _newRoom;
|
||||
|
Loading…
Reference in New Issue
Block a user