Skip to content

Commit

Permalink
Merge pull request #603 from fingolfin/fix-warnings
Browse files Browse the repository at this point in the history
Fix some warnings
  • Loading branch information
wjp committed Jul 20, 2015
2 parents 500877d + fad3b42 commit e1dd57e
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 41 deletions.
20 changes: 10 additions & 10 deletions engines/access/resources.cpp
Expand Up @@ -64,17 +64,17 @@ const int RMOUSE[10][2] = {
{ 142, 177 }, { 178, 212 }, { 213, 248 }, { 249, 283 }, { 284, 318 }
};

const char *const LOOK_MESSAGE = "LOOKING THERE REVEALS NOTHING OF INTEREST.";
const char *const GET_MESSAGE = "YOU CAN'T TAKE THAT.";
const char *const OPEN_MESSAGE = "THAT DOESN'T OPEN.";
const char *const MOVE_MESSAGE = "THAT WON'T MOVE.";
const char *const USE_MESSAGE = "THAT DOESN'T SEEM TO WORK.";
const char *const GO_MESSAGE = "YOU CAN'T CLIMB THAT.";
const char *const HELP_MESSAGE = "THIS OBJECT REQUIRES NO HINTS";
const char *const TALK_MESSAGE = "THERE SEEMS TO BE NO RESPONSE.";
const char *const GENERAL_MESSAGES[] = {
LOOK_MESSAGE, OPEN_MESSAGE, MOVE_MESSAGE, GET_MESSAGE, USE_MESSAGE,
GO_MESSAGE, TALK_MESSAGE, HELP_MESSAGE, HELP_MESSAGE, USE_MESSAGE
"LOOKING THERE REVEALS NOTHING OF INTEREST.", // LOOK_MESSAGE
"THAT DOESN'T OPEN.", // OPEN_MESSAGE
"THAT WON'T MOVE." // MOVE_MESSAGE
"YOU CAN'T TAKE THAT.", // GET_MESSAGE
"THAT DOESN'T SEEM TO WORK.", // USE_MESSAGE
"YOU CAN'T CLIMB THAT.", // GO_MESSAGE
"THERE SEEMS TO BE NO RESPONSE.", // TALK_MESSAGE
"THIS OBJECT REQUIRES NO HINTS", // HELP_MESSAGE
"THIS OBJECT REQUIRES NO HINTS", // HELP_MESSAGE
"THAT DOESN'T SEEM TO WORK.", // USE_MESSAGE
};

const int INVCOORDS[][4] = {
Expand Down
5 changes: 5 additions & 0 deletions engines/agi/graphics.cpp
Expand Up @@ -72,6 +72,7 @@ static const uint8 egaPalette[16 * 3] = {
* from Donald Duck's Playground (1986) to Manhunter II (1989).
* 16 RGB colors. 3 bits per color component.
*/
#if 0
static const uint8 atariStAgiPalette[16 * 3] = {
0x0, 0x0, 0x0,
0x0, 0x0, 0x7,
Expand All @@ -90,6 +91,7 @@ static const uint8 atariStAgiPalette[16 * 3] = {
0x7, 0x7, 0x4,
0x7, 0x7, 0x7
};
#endif

/**
* Second generation Apple IIGS AGI palette.
Expand All @@ -109,6 +111,8 @@ static const uint8 atariStAgiPalette[16 * 3] = {
* 3.001 (Black Cauldron v1.0O 1989-02-24 (CE))
* 3.003 (Gold Rush! v1.0M 1989-02-28 (CE))
*/
#if 0
// FIXME: Identical to amigaAgiPaletteV2
static const uint8 appleIIgsAgiPaletteV2[16 * 3] = {
0x0, 0x0, 0x0,
0x0, 0x0, 0xF,
Expand All @@ -127,6 +131,7 @@ static const uint8 appleIIgsAgiPaletteV2[16 * 3] = {
0xE, 0xE, 0x0,
0xF, 0xF, 0xF
};
#endif

/**
* First generation Amiga & Apple IIGS AGI palette.
Expand Down
3 changes: 0 additions & 3 deletions engines/agos/drivers/accolade/adlib.cpp
Expand Up @@ -171,9 +171,6 @@ class MidiDriver_Accolade_AdLib : public MidiDriver {

bool _isOpen;

// points to a MIDI channel for each of the new voice channels
byte _voiceChannelMapping[AGOS_ADLIB_VOICES_COUNT];

// stores information about all FM voice channels
ChannelEntry _channels[AGOS_ADLIB_VOICES_COUNT];

Expand Down
2 changes: 1 addition & 1 deletion engines/gob/sound/adlib.cpp
Expand Up @@ -115,7 +115,7 @@ const uint16 AdLib::kHihatParams [kParamCount] = {
0, 1, 0, 15, 11, 0, 7, 5, 0, 0, 0, 0, 0, 0 };


AdLib::AdLib(Audio::Mixer &mixer, int callbackFreq) : _mixer(&mixer), _opl(0),
AdLib::AdLib(int callbackFreq) : _opl(0),
_toPoll(0), _repCount(0), _first(true), _playing(false), _ended(true), _volume(0) {

initFreqs();
Expand Down
5 changes: 1 addition & 4 deletions engines/gob/sound/adlib.h
Expand Up @@ -37,7 +37,7 @@ namespace Gob {
/** Base class for a player of an AdLib music format. */
class AdLib {
public:
AdLib(Audio::Mixer &mixer, int callbackFrequency);
AdLib(int callbackFrequency);
virtual ~AdLib();

bool isPlaying() const; ///< Are we currently playing?
Expand Down Expand Up @@ -225,15 +225,12 @@ class AdLib {
static const uint16 kHihatParams [kParamCount];


Audio::Mixer *_mixer;
OPL::OPL *_opl;

Common::Mutex _mutex;

int _volume;

uint32 _rate;

uint32 _toPoll;

int32 _repCount;
Expand Down
2 changes: 1 addition & 1 deletion engines/gob/sound/adlplayer.cpp
Expand Up @@ -28,7 +28,7 @@

namespace Gob {

ADLPlayer::ADLPlayer(Audio::Mixer &mixer) : AdLib(mixer, 1000),
ADLPlayer::ADLPlayer() : AdLib(1000),
_songData(0), _songDataSize(0), _playPos(0) {

}
Expand Down
2 changes: 1 addition & 1 deletion engines/gob/sound/adlplayer.h
Expand Up @@ -36,7 +36,7 @@ namespace Gob {
/** A player for Coktel Vision's ADL music format. */
class ADLPlayer : public AdLib {
public:
ADLPlayer(Audio::Mixer &mixer);
ADLPlayer();
~ADLPlayer();

bool load(Common::SeekableReadStream &adl);
Expand Down
2 changes: 1 addition & 1 deletion engines/gob/sound/musplayer.cpp
Expand Up @@ -27,7 +27,7 @@

namespace Gob {

MUSPlayer::MUSPlayer(Audio::Mixer &mixer) : AdLib(mixer, 60),
MUSPlayer::MUSPlayer() : AdLib(60),
_songData(0), _songDataSize(0), _playPos(0), _songID(0) {

}
Expand Down
2 changes: 1 addition & 1 deletion engines/gob/sound/musplayer.h
Expand Up @@ -40,7 +40,7 @@ namespace Gob {
*/
class MUSPlayer : public AdLib {
public:
MUSPlayer(Audio::Mixer &mixer);
MUSPlayer();
~MUSPlayer();

/** Load the instruments (.SND or .TBR) */
Expand Down
8 changes: 4 additions & 4 deletions engines/gob/sound/sound.cpp
Expand Up @@ -234,7 +234,7 @@ bool Sound::adlibLoadADL(const char *fileName) {
return false;

if (!_adlPlayer)
_adlPlayer = new ADLPlayer(*_vm->_mixer);
_adlPlayer = new ADLPlayer();

debugC(1, kDebugSound, "AdLib: Loading ADL data (\"%s\")", fileName);

Expand All @@ -256,7 +256,7 @@ bool Sound::adlibLoadADL(byte *data, uint32 size, int index) {
return false;

if (!_adlPlayer)
_adlPlayer = new ADLPlayer(*_vm->_mixer);
_adlPlayer = new ADLPlayer();

debugC(1, kDebugSound, "AdLib: Loading ADL data (%d)", index);

Expand Down Expand Up @@ -749,7 +749,7 @@ void Sound::createMDYPlayer() {
delete _adlPlayer;
_adlPlayer = 0;

_mdyPlayer = new MUSPlayer(*_vm->_mixer);
_mdyPlayer = new MUSPlayer();
}

void Sound::createADLPlayer() {
Expand All @@ -759,7 +759,7 @@ void Sound::createADLPlayer() {
delete _mdyPlayer;
_mdyPlayer= 0;

_adlPlayer = new ADLPlayer(*_vm->_mixer);
_adlPlayer = new ADLPlayer();
}

} // End of namespace Gob
5 changes: 3 additions & 2 deletions engines/scumm/players/player_ad.cpp
Expand Up @@ -27,6 +27,7 @@
#include "scumm/saveload.h"

#include "audio/fmopl.h"
#include "audio/mixer.h"

#include "common/textconsole.h"
#include "common/config-manager.h"
Expand All @@ -35,8 +36,8 @@ namespace Scumm {

#define AD_CALLBACK_FREQUENCY 472

Player_AD::Player_AD(ScummEngine *scumm, Audio::Mixer *mixer)
: _vm(scumm), _mixer(mixer) {
Player_AD::Player_AD(ScummEngine *scumm)
: _vm(scumm) {
_opl2 = OPL::Config::create();
if (!_opl2->init()) {
error("Could not initialize OPL2 emulator");
Expand Down
4 changes: 1 addition & 3 deletions engines/scumm/players/player_ad.h
Expand Up @@ -26,7 +26,6 @@
#include "scumm/music.h"

#include "audio/audiostream.h"
#include "audio/mixer.h"

#include "common/mutex.h"

Expand All @@ -43,7 +42,7 @@ class ScummEngine;
*/
class Player_AD : public MusicEngine {
public:
Player_AD(ScummEngine *scumm, Audio::Mixer *mixer);
Player_AD(ScummEngine *scumm);
virtual ~Player_AD();

// MusicEngine API
Expand All @@ -62,7 +61,6 @@ class Player_AD : public MusicEngine {
private:
ScummEngine *const _vm;
Common::Mutex _mutex;
Audio::Mixer *const _mixer;

void setupVolume();
int _musicVolume;
Expand Down
2 changes: 1 addition & 1 deletion engines/scumm/scumm.cpp
Expand Up @@ -1905,7 +1905,7 @@ void ScummEngine::setupMusic(int midi) {
// EGA/VGA. However, we support multi MIDI for that game and we cannot
// support this with the Player_AD code at the moment. The reason here
// is that multi MIDI is supported internally by our iMuse output.
_musicEngine = new Player_AD(this, _mixer);
_musicEngine = new Player_AD(this);
} else if (_game.version >= 3 && _game.heversion <= 62) {
MidiDriver *nativeMidiDriver = 0;
MidiDriver *adlibMidiDriver = 0;
Expand Down
6 changes: 3 additions & 3 deletions engines/sherlock/scalpel/scalpel_fixed_text.cpp
Expand Up @@ -264,7 +264,7 @@ static const char *const fixedTextDE_ActionPick[] = {
"Diese Blumen geh\224ren Penny",
"Sie ist doch viel zu jung f\201r Dich!",
"Ich denke, Du stehst mehr auf M\204dchen ?",
"Staatseigentum - Nur für den Dienstgebrauch !"
"Staatseigentum - Nur f\201r den Dienstgebrauch !"
};

static const char *const fixedTextES_ActionPick[] = {
Expand All @@ -291,8 +291,8 @@ static const char *const fixedTextDE_ActionUse[] = {
"Nein, das geht wirklich nicht",
"Tja keinerlei Wirkung",
"Da kommst du nicht dran",
"Na gut, die Tür sieht jetzt gr\224\341er aus. Zufrieden?",
"Türen sind Nichtraucher!"
"Na gut, die T\201r sieht jetzt gr\224\341er aus. Zufrieden?",
"T\201ren sind Nichtraucher!"
};

static const char *const fixedTextES_ActionUse[] = {
Expand Down
1 change: 0 additions & 1 deletion engines/zvision/scripting/actions.h
Expand Up @@ -269,7 +269,6 @@ class ActionPlayPreloadAnimation : public ResultAction {
bool execute();

private:
uint32 _animationKey;
uint32 _controlKey;
uint32 _x1;
uint32 _y1;
Expand Down
1 change: 0 additions & 1 deletion engines/zvision/scripting/controls/input_control.cpp
Expand Up @@ -43,7 +43,6 @@ InputControl::InputControl(ZVision *engine, uint32 key, Common::SeekableReadStre
_nextTabstop(0),
_focused(false),
_textChanged(false),
_cursorOffset(0),
_enterPressed(false),
_readOnly(false),
_txtWidth(0),
Expand Down
3 changes: 0 additions & 3 deletions engines/zvision/scripting/controls/input_control.h
Expand Up @@ -51,15 +51,12 @@ class InputControl : public Control {

Common::String _currentInputText;
bool _textChanged;
uint _cursorOffset;
bool _enterPressed;
bool _readOnly;

int16 _txtWidth;
int16 _maxTxtWidth;
Video::VideoDecoder *_animation;
int32 _frameDelay;
int16 _frame;

public:
void focus() {
Expand Down
1 change: 0 additions & 1 deletion image/codecs/cinepak.h
Expand Up @@ -91,7 +91,6 @@ class CinepakDecoder : public Codec {

byte *_ditherPalette;
bool _dirtyPalette;
byte *_rgbLookup;
byte *_colorMap;
DitherType _ditherType;

Expand Down

0 comments on commit e1dd57e

Please sign in to comment.