mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
SHERLOCK: Fix some uninitialized values and unused variables
This commit is contained in:
parent
68c7c158e9
commit
9a58e485bf
@ -47,6 +47,8 @@ Inventory::Inventory(SherlockEngine *vm) : Common::Array<InventoryItem>(), _vm(v
|
||||
_invIndex = 0;
|
||||
_holdings = 0;
|
||||
_invMode = INVMODE_EXIT;
|
||||
for (int i = 0; i < 6; ++i)
|
||||
_invShapes[i] = nullptr;
|
||||
}
|
||||
|
||||
Inventory::~Inventory() {
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
namespace Sherlock {
|
||||
|
||||
MapPaths::MapPaths() {
|
||||
_numLocations = 0;
|
||||
}
|
||||
|
||||
void MapPaths::load(int numLocations, Common::SeekableReadStream &s) {
|
||||
_numLocations = numLocations;
|
||||
_paths.resize(_numLocations * _numLocations);
|
||||
|
@ -48,7 +48,10 @@ class MapPaths {
|
||||
private:
|
||||
int _numLocations;
|
||||
Common::Array< Common::Array<byte> > _paths;
|
||||
|
||||
public:
|
||||
MapPaths();
|
||||
|
||||
/**
|
||||
* Load the data for the paths between locations on the map
|
||||
*/
|
||||
|
@ -120,7 +120,6 @@ public:
|
||||
Common::Point _oldSize; // Image's old size
|
||||
Common::Point _goto; // Walk destination
|
||||
SpriteType _type; // Type of object
|
||||
int _pickup;
|
||||
Common::Point _noShapeSize; // Size of a NO_SHAPE
|
||||
int _status; // Status: open/closed, moved/not moved
|
||||
int8 _misc; // Miscellaneous use
|
||||
|
@ -106,16 +106,12 @@ Scene::Scene(SherlockEngine *vm) : _vm(vm) {
|
||||
_currentScene = -1;
|
||||
_goToScene = -1;
|
||||
_loadingSavedGame = false;
|
||||
_changes = false;
|
||||
_keyboardInput = 0;
|
||||
_walkedInScene = false;
|
||||
_version = 0;
|
||||
_lzwMode = false;
|
||||
_invGraphicItems = 0;
|
||||
_cAnimFramePause = 0;
|
||||
_restoreFlag = false;
|
||||
_invLookFlag = false;
|
||||
_lookHelp = false;
|
||||
_animating = 0;
|
||||
_doBgAnimDone = true;
|
||||
_tempFadeStyle = 0;
|
||||
@ -135,9 +131,6 @@ void Scene::selectScene() {
|
||||
// Reset fields
|
||||
ui._windowOpen = ui._infoFlag = false;
|
||||
ui._menuMode = STD_MODE;
|
||||
_keyboardInput = 0;
|
||||
_oldKey = _help = _oldHelp = 0;
|
||||
_oldTemp = _temp = 0;
|
||||
|
||||
// Free any previous scene
|
||||
freeScene();
|
||||
@ -424,7 +417,6 @@ bool Scene::loadScene(const Common::String &filename) {
|
||||
// Clear user interface area and draw controls
|
||||
ui.drawInterface();
|
||||
|
||||
_changes = false;
|
||||
checkSceneStatus();
|
||||
|
||||
if (!saves._justLoaded) {
|
||||
|
@ -110,7 +110,6 @@ class Scene {
|
||||
private:
|
||||
SherlockEngine *_vm;
|
||||
Common::String _rrmName;
|
||||
bool _lookHelp;
|
||||
bool _loadingSavedGame;
|
||||
|
||||
/**
|
||||
@ -158,12 +157,8 @@ private:
|
||||
public:
|
||||
int _currentScene;
|
||||
int _goToScene;
|
||||
bool _changes;
|
||||
bool _sceneStats[SCENES_COUNT][65];
|
||||
bool _savedStats[SCENES_COUNT][9];
|
||||
int _keyboardInput;
|
||||
int _oldKey, _help, _oldHelp;
|
||||
int _oldTemp, _temp;
|
||||
bool _walkedInScene;
|
||||
int _version;
|
||||
bool _lzwMode;
|
||||
@ -186,7 +181,6 @@ public:
|
||||
bool _doBgAnimDone;
|
||||
int _tempFadeStyle;
|
||||
int _cAnimFramePause;
|
||||
bool _invLookFlag;
|
||||
public:
|
||||
Scene(SherlockEngine *vm);
|
||||
~Scene();
|
||||
|
@ -143,7 +143,7 @@ int Settings::drawButtons(const Common::Point &pt, int _key) {
|
||||
|
||||
for (int idx = 0; idx < 12; ++idx) {
|
||||
if ((pt.x > SETUP_POINTS[idx][0] && pt.x < SETUP_POINTS[idx][2] && pt.y > SETUP_POINTS[idx][1]
|
||||
&& pt.y < (SETUP_POINTS[idx][1] + 10) && (events._presed || events._released))
|
||||
&& pt.y < (SETUP_POINTS[idx][1] + 10) && (events._pressed || events._released))
|
||||
|| (_key == SETUP_NAMES[idx][0])) {
|
||||
found = idx;
|
||||
color = COMMAND_HIGHLIGHTED;
|
||||
|
Loading…
Reference in New Issue
Block a user