diff options
| author | Cameron Cawley | 2019-06-23 22:37:15 +0100 | 
|---|---|---|
| committer | Le Philousophe | 2019-06-23 23:37:15 +0200 | 
| commit | 3cca7f938f604c42e3540c423c52650c61a41888 (patch) | |
| tree | 859fce6f38e1b3a82d63400e926fb431a9b7c15d | |
| parent | a1fef1fe9ba4c4c6a10af100453b7b3e516acfee (diff) | |
| download | scummvm-rg350-3cca7f938f604c42e3540c423c52650c61a41888.tar.gz scummvm-rg350-3cca7f938f604c42e3540c423c52650c61a41888.tar.bz2 scummvm-rg350-3cca7f938f604c42e3540c423c52650c61a41888.zip  | |
CRYOMNI3D: Fix warnings (#1699)
| -rw-r--r-- | engines/cryomni3d/dialogs_manager.h | 2 | ||||
| -rw-r--r-- | engines/cryomni3d/font_manager.h | 2 | ||||
| -rw-r--r-- | engines/cryomni3d/objects.h | 8 | ||||
| -rw-r--r-- | engines/cryomni3d/versailles/documentation.cpp | 2 | ||||
| -rw-r--r-- | engines/cryomni3d/versailles/logic.cpp | 116 | ||||
| -rw-r--r-- | engines/cryomni3d/versailles/menus.cpp | 4 | ||||
| -rw-r--r-- | engines/cryomni3d/versailles/toolbar.cpp | 2 | 
7 files changed, 111 insertions, 25 deletions
diff --git a/engines/cryomni3d/dialogs_manager.h b/engines/cryomni3d/dialogs_manager.h index 7a3eefbe7b..11b88b95e4 100644 --- a/engines/cryomni3d/dialogs_manager.h +++ b/engines/cryomni3d/dialogs_manager.h @@ -48,7 +48,7 @@ public:  		_ignoreNoEndOfConversation(false) { }  	virtual ~DialogsManager(); -	void init(uint size, const Common::String &endOfConversationText) { _dialogsVariables.resize(size); _endOfConversationText = endOfConversationText; } +	void init(uint arraySize, const Common::String &endOfConversationText) { _dialogsVariables.resize(arraySize); _endOfConversationText = endOfConversationText; }  	void loadGTO(const Common::String >oFile);  	void setupVariable(uint id, const Common::String &variable) { _dialogsVariables[id] = DialogVariable(variable, 'N'); } diff --git a/engines/cryomni3d/font_manager.h b/engines/cryomni3d/font_manager.h index 0ac4fe35ff..dd347ec19e 100644 --- a/engines/cryomni3d/font_manager.h +++ b/engines/cryomni3d/font_manager.h @@ -90,7 +90,7 @@ private:  	};  	struct Font { -		static const int kCharactersCount = 223; +		static const uint kCharactersCount = 223;  		uint16 maxHeight;  		byte comment[32]; diff --git a/engines/cryomni3d/objects.h b/engines/cryomni3d/objects.h index d680b6a728..806a745368 100644 --- a/engines/cryomni3d/objects.h +++ b/engines/cryomni3d/objects.h @@ -38,10 +38,10 @@ public:  	Object() : _valid(false), _idCA(-1), _idCl(-1), _idSA(-1), _idSl(-1), _idOBJ(-1),  		_viewCallback(nullptr) {} -	Object(const Sprites &sprites, uint idCA, uint idOBJ) : _idCA(idCA), -		_idCl(sprites.calculateSpriteId(idCA, 1)), _idSA(sprites.calculateSpriteId(idCA, 2)), -		_idSl(sprites.calculateSpriteId(idCA, 3)), -		_valid(true), _idOBJ(idOBJ), _viewCallback(nullptr) {} +	Object(const Sprites &sprites, uint id_CA, uint id_OBJ) : _idCA(id_CA), +		_idCl(sprites.calculateSpriteId(id_CA, 1)), _idSA(sprites.calculateSpriteId(id_CA, 2)), +		_idSl(sprites.calculateSpriteId(id_CA, 3)), +		_valid(true), _idOBJ(id_OBJ), _viewCallback(nullptr) {}  	~Object() { delete _viewCallback; } diff --git a/engines/cryomni3d/versailles/documentation.cpp b/engines/cryomni3d/versailles/documentation.cpp index a33e992962..4122b44f33 100644 --- a/engines/cryomni3d/versailles/documentation.cpp +++ b/engines/cryomni3d/versailles/documentation.cpp @@ -108,7 +108,7 @@ void Versailles_Documentation::init(const Sprites *sprites, FontManager *fontMan  	RecordInfo record;  	char *currentPos = allDocs; -	char *lastRecordName; +	char *lastRecordName = nullptr;  	bool first = true;  	while (true) { diff --git a/engines/cryomni3d/versailles/logic.cpp b/engines/cryomni3d/versailles/logic.cpp index 48c919b2b3..6ce21bc1a2 100644 --- a/engines/cryomni3d/versailles/logic.cpp +++ b/engines/cryomni3d/versailles/logic.cpp @@ -3010,26 +3010,110 @@ bool CryOmni3DEngine_Versailles::handleBomb(ZonFixedImage *fimg) {  }  const char *CryOmni3DEngine_Versailles::kBombPassword = "JEMENVAISMAISLETATDEMEURERATOUJOURS"; -// We use brace elision here because it's dumped from the EXE  const uint16 CryOmni3DEngine_Versailles::kBombLettersPos[2][kBombPasswordMaxLength][2] = {  	{ -		26, 91, 84, 89, 141, 89, 202, 88, 261, 87, 322, 86, 384, 85, 448, 84, -		512, 83, 576, 83, 26, 175, 84, 175, 142, 174, 202, 174, 260, 174, 322, -		174, 384, 173, 448, 173, 512, 173, 576, 172, 26, 261, 84, 261, 141, -		261, 202, 261, 261, 262, 322, 262, 383, 262, 447, 263, 512, 263, 576, -		263, 26, 344, 84, 345, 142, 346, 202, 347, 260, 348, 322, 349, 384, -		350, 448, 351, 512, 352, 576, 352 +		{26, 91}, +		{84, 89}, +		{141, 89}, +		{202, 88}, +		{261, 87}, +		{322, 86}, +		{384, 85}, +		{448, 84}, +		{512, 83}, +		{576, 83}, +		{26, 175}, +		{84, 175}, +		{142, 174}, +		{202, 174}, +		{260, 174}, +		{322, 174}, +		{384, 173}, +		{448, 173}, +		{512, 173}, +		{576, 172}, +		{26, 261}, +		{84, 261}, +		{141, 261}, +		{202, 261}, +		{261, 262}, +		{322, 262}, +		{383, 262}, +		{447, 263}, +		{512, 263}, +		{576, 263}, +		{26, 344}, +		{84, 345}, +		{142, 346}, +		{202, 347}, +		{260, 348}, +		{322, 349}, +		{384, 350}, +		{448, 351}, +		{512, 352}, +		{576, 352}  	},  	{ -		42, 26, 100, 24, 155, 22, 214, 19, 271, 18, 330, 15, 389, 14, 451, 11, -		515, 8, 576, 6, 45, 102, 100, 102, 156, 101, 215, 100, 272, 99, 331, -		98, 391, 97, 453, 96, 515, 94, 578, 94, 44, 184, 101, 184, 157, 184, -		215, 183, 272, 183, 331, 183, 391, 182, 453, 182, 515, 182, 577, 181, -		44, 267, 101, 267, 157, 267, 215, 268, 272, 268, 331, 268, 390, 269, -		453, 269, 515, 269, 578, 269, 45, 348, 101, 349, 156, 349, 215, 351, -		271, 351, 331, 351, 391, 353, 453, 354, 515, 355, 577, 356, 44, 434, -		101, 435, 156, 436, 215, 437, 272, 437, 331, 437, 391, 439, 453, 440, -		515, 441, 578, 442 +		{42, 26}, +		{100, 24}, +		{155, 22}, +		{214, 19}, +		{271, 18}, +		{330, 15}, +		{389, 14}, +		{451, 11}, +		{515, 8}, +		{576, 6}, +		{45, 102}, +		{100, 102}, +		{156, 101}, +		{215, 100}, +		{272, 99}, +		{331, 98}, +		{391, 97}, +		{453, 96}, +		{515, 94}, +		{578, 94}, +		{44, 184}, +		{101, 184}, +		{157, 184}, +		{215, 183}, +		{272, 183}, +		{331, 183}, +		{391, 182}, +		{453, 182}, +		{515, 182}, +		{577, 181}, +		{44, 267}, +		{101, 267}, +		{157, 267}, +		{215, 268}, +		{272, 268}, +		{331, 268}, +		{390, 269}, +		{453, 269}, +		{515, 269}, +		{578, 269}, +		{45, 348}, +		{101, 349}, +		{156, 349}, +		{215, 351}, +		{271, 351}, +		{331, 351}, +		{391, 353}, +		{453, 354}, +		{515, 355}, +		{577, 356}, +		{44, 434}, +		{101, 435}, +		{156, 436}, +		{215, 437}, +		{272, 437}, +		{331, 437}, +		{391, 439}, +		{453, 440}, +		{515, 441}, +		{578, 442}  	},  }; diff --git a/engines/cryomni3d/versailles/menus.cpp b/engines/cryomni3d/versailles/menus.cpp index 6ce02f6a12..fcc8235df0 100644 --- a/engines/cryomni3d/versailles/menus.cpp +++ b/engines/cryomni3d/versailles/menus.cpp @@ -99,9 +99,9 @@ uint CryOmni3DEngine_Versailles::displayOptions() {  	showMouse(true);  	uint hoveredBox = -1; -	uint selectedBox; +	uint selectedBox = -1;  	int selectedMsg = 0; -	uint volumeBox; +	uint volumeBox = -1;  	bool resetScreen = true;  	bool forceEvents = true; diff --git a/engines/cryomni3d/versailles/toolbar.cpp b/engines/cryomni3d/versailles/toolbar.cpp index d302dce905..d372755af1 100644 --- a/engines/cryomni3d/versailles/toolbar.cpp +++ b/engines/cryomni3d/versailles/toolbar.cpp @@ -121,6 +121,8 @@ void Toolbar::updateZones() {  		_inventoryOffset = 0;  		_zones[10].secondary = true;  		_zones[11].secondary = true; +		inventoryIt = _inventory->end(); +		inventorySelectedIt = _inventory->end();  	} else {  		_inventoryMaxOffset = 0;  		// Find an object in inventory after the 8 first  | 
