2018-02-15 22:05:56 +01:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-03-08 21:25:55 +01:00
|
|
|
#ifndef MUTATIONOFJB_GAME_H
|
|
|
|
#define MUTATIONOFJB_GAME_H
|
|
|
|
|
2018-02-15 22:05:56 +01:00
|
|
|
#include "common/scummsys.h"
|
2018-03-08 21:25:55 +01:00
|
|
|
#include "mutationofjb/inventory.h"
|
2018-02-15 22:05:56 +01:00
|
|
|
|
2018-02-22 23:47:16 +01:00
|
|
|
namespace Common {
|
2018-02-15 22:05:56 +01:00
|
|
|
class ReadStream;
|
|
|
|
}
|
|
|
|
|
2018-02-22 23:47:16 +01:00
|
|
|
namespace MutationOfJB {
|
2018-02-15 22:05:56 +01:00
|
|
|
|
|
|
|
static const uint8 MAX_STR_LENGTH = 0x14;
|
|
|
|
|
|
|
|
struct Door {
|
2018-03-09 21:24:02 +01:00
|
|
|
/*
|
|
|
|
Door name.
|
|
|
|
Can be empty - deactivates door completely.
|
|
|
|
*/
|
2018-02-15 22:05:56 +01:00
|
|
|
char _name[MAX_STR_LENGTH + 1];
|
2018-03-09 21:24:02 +01:00
|
|
|
/*
|
|
|
|
Scene ID where the door leads.
|
|
|
|
Can be 0 - you can hover your mouse over it, but clicking it doesn't do anything (unless scripted).
|
|
|
|
*/
|
2018-02-15 22:05:56 +01:00
|
|
|
uint8 _destSceneId;
|
2018-03-09 21:24:02 +01:00
|
|
|
/* X coordinate for player's position after going through the door. */
|
2018-02-15 22:05:56 +01:00
|
|
|
uint16 _destX;
|
2018-03-09 21:24:02 +01:00
|
|
|
/* Y coordinate for player's position after going through the door. */
|
2018-02-15 22:05:56 +01:00
|
|
|
uint16 _destY;
|
2018-03-09 21:24:02 +01:00
|
|
|
/* X coordinate of the door rectangle. */
|
2018-02-15 22:05:56 +01:00
|
|
|
uint16 _x;
|
2018-03-09 21:24:02 +01:00
|
|
|
/* Y coordinate of the door rectangle. */
|
2018-02-15 22:05:56 +01:00
|
|
|
uint8 _y;
|
2018-03-09 21:24:02 +01:00
|
|
|
/* Width of the door rectangle. */
|
2018-02-15 22:05:56 +01:00
|
|
|
uint16 _width;
|
2018-03-09 21:24:02 +01:00
|
|
|
/* Height of the door rectangle. */
|
2018-02-15 22:05:56 +01:00
|
|
|
uint8 _height;
|
2018-03-09 21:24:02 +01:00
|
|
|
/* X coordinate for position towards player will walk after clicking the door. */
|
2018-02-15 22:05:56 +01:00
|
|
|
uint16 _walkToX;
|
2018-03-09 21:24:02 +01:00
|
|
|
/* Y coordinate for position towards player will walk after clicking the door. */
|
2018-02-15 22:05:56 +01:00
|
|
|
uint8 _walkToY;
|
2018-03-09 21:24:02 +01:00
|
|
|
/* Unknown for now - likely not even used. */
|
2018-02-15 22:05:56 +01:00
|
|
|
uint8 _SP;
|
|
|
|
|
|
|
|
bool loadFromStream(Common::ReadStream &stream);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Object {
|
|
|
|
uint8 _AC;
|
|
|
|
uint8 _FA;
|
|
|
|
uint8 _FR;
|
|
|
|
uint8 _NA;
|
|
|
|
uint8 _FS;
|
|
|
|
uint8 _unknown;
|
|
|
|
uint8 _CA;
|
|
|
|
uint16 _x;
|
|
|
|
uint8 _y;
|
|
|
|
uint16 _XL;
|
|
|
|
uint8 _YL;
|
|
|
|
uint16 _WX;
|
|
|
|
uint8 _WY;
|
|
|
|
uint8 _SP;
|
|
|
|
|
|
|
|
bool loadFromStream(Common::ReadStream &stream);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Static {
|
|
|
|
uint8 _active;
|
|
|
|
char _name[MAX_STR_LENGTH + 1];
|
|
|
|
uint16 _x;
|
|
|
|
uint8 _y;
|
|
|
|
uint16 _width;
|
|
|
|
uint8 _height;
|
|
|
|
uint16 _walkToX;
|
|
|
|
uint8 _walkToY;
|
|
|
|
uint8 _SP;
|
|
|
|
|
|
|
|
bool loadFromStream(Common::ReadStream &stream);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Bitmap {
|
2018-03-09 21:24:02 +01:00
|
|
|
uint8 _frame;
|
2018-02-15 22:05:56 +01:00
|
|
|
uint8 _isVisible;
|
|
|
|
uint16 _x1;
|
|
|
|
uint8 _y1;
|
|
|
|
uint16 _x2;
|
|
|
|
uint8 _y2;
|
|
|
|
|
|
|
|
bool loadFromStream(Common::ReadStream &stream);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2018-02-22 23:47:16 +01:00
|
|
|
struct Scene {
|
|
|
|
|
2018-02-26 23:52:13 +01:00
|
|
|
Door *getDoor(uint8 objectId);
|
2018-02-22 23:47:16 +01:00
|
|
|
Object *getObject(uint8 objectId);
|
2018-02-26 23:52:13 +01:00
|
|
|
Static *getStatic(uint8 staticId);
|
2018-02-22 23:47:16 +01:00
|
|
|
|
2018-02-15 22:05:56 +01:00
|
|
|
uint8 _startup;
|
|
|
|
uint8 _unknown001;
|
|
|
|
uint8 _unknown002;
|
|
|
|
uint8 _unknown003;
|
|
|
|
uint8 _DL;
|
|
|
|
|
|
|
|
uint8 _noDoors;
|
|
|
|
Door _doors[5];
|
|
|
|
|
|
|
|
uint8 _noObjects;
|
|
|
|
Object _objects[9];
|
|
|
|
|
|
|
|
uint8 _noStatics;
|
|
|
|
Static _statics[15];
|
|
|
|
|
|
|
|
Bitmap _bitmaps[10];
|
|
|
|
|
2018-03-09 21:24:02 +01:00
|
|
|
uint16 _obstacleY1;
|
2018-02-15 22:05:56 +01:00
|
|
|
uint8 _palRotStart;
|
|
|
|
uint8 _palRotEnd;
|
|
|
|
uint8 _palRotPeriod;
|
|
|
|
uint8 _unknown38A[80];
|
|
|
|
|
|
|
|
bool loadFromStream(Common::ReadStream &stream);
|
|
|
|
};
|
|
|
|
|
2018-03-09 22:42:20 +01:00
|
|
|
struct GameData {
|
2018-02-22 23:47:16 +01:00
|
|
|
public:
|
2018-02-15 22:05:56 +01:00
|
|
|
GameData();
|
2018-02-22 23:47:16 +01:00
|
|
|
Scene *getScene(uint8 sceneId);
|
|
|
|
|
|
|
|
bool loadFromStream(Common::ReadStream &stream);
|
2018-02-15 22:05:56 +01:00
|
|
|
|
|
|
|
uint8 _currentScene;
|
2018-03-08 21:25:55 +01:00
|
|
|
Inventory _inventory;
|
2018-03-11 20:12:57 +01:00
|
|
|
Common::String _currentAPK;
|
2018-02-22 23:47:16 +01:00
|
|
|
private:
|
|
|
|
Scene _scenes[45];
|
2018-02-15 22:05:56 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2018-03-08 21:25:55 +01:00
|
|
|
|
|
|
|
#endif
|