GROOVIE: Clean initialization for few classes

This commit is contained in:
Eugene Sandulenko 2016-05-28 13:58:27 +02:00
parent f1f50b3a9d
commit 829e62a9fe
7 changed files with 11 additions and 6 deletions

View File

@ -30,6 +30,7 @@ CellGame::CellGame() {
_stack_index = _boardStackPtr = 0;
_flag4 = false;
_flag2 = false;
_flag1 = false;
_coeff3 = 0;
_moveCount = 0;

View File

@ -35,7 +35,7 @@ namespace Groovie {
// Cursor Manager
GrvCursorMan::GrvCursorMan(OSystem *system) :
_syst(system), _lastTime(0), _current(255), _cursor(NULL) {
_syst(system), _lastTime(0), _current(255), _cursor(NULL), _lastFrame(0) {
}
GrvCursorMan::~GrvCursorMan() {

View File

@ -44,7 +44,7 @@ private:
int _maxHeight, _maxWidth;
struct Glyph {
Glyph() : pixels(0) {}
Glyph() : pixels(0), width(0), height(0), julia(0) {}
~Glyph() { delete[] pixels; }
byte width;

View File

@ -31,7 +31,7 @@
namespace Groovie {
GraphicsMan::GraphicsMan(GroovieEngine *vm) :
_vm(vm), _changed(false), _fading(0) {
_vm(vm), _changed(false), _fading(0), _fadeStartTime(0) {
// Create the game surfaces
_foreground.create(640, 320, _vm->_pixelFormat);
_background.create(640, 320, _vm->_pixelFormat);

View File

@ -44,7 +44,8 @@ namespace Groovie {
MusicPlayer::MusicPlayer(GroovieEngine *vm) :
_vm(vm), _isPlaying(false), _backgroundFileRef(0), _gameVolume(100),
_prevCDtrack(0), _backgroundDelay(0) {
_prevCDtrack(0), _backgroundDelay(0), _fadingStartTime(0), _fadingStartVolume(0),
_fadingEndVolume(0), _fadingDuration(0), _userVolume(0) {
}
MusicPlayer::~MusicPlayer() {
@ -391,6 +392,8 @@ MusicPlayerXMI::MusicPlayerXMI(GroovieEngine *vm, const Common::String &gtlName)
bool milesAudioEnabled = true;
MidiParser::XMidiNewTimbreListProc newTimbreListProc = NULL;
_musicType = 0;
if (milesAudioEnabled) {
// 7th Guest uses FAT.AD/FAT.OPL/FAT.MT
// 11th Hour uses SAMPLE.AD/SAMPLE.OPL/SAMPLE.MT

View File

@ -141,7 +141,7 @@ private:
// Timbres
class Timbre {
public:
Timbre() : data(NULL) {}
Timbre() : data(NULL), patch(0), bank(0), size(0) {}
byte patch;
byte bank;
uint32 size;

View File

@ -29,7 +29,8 @@
namespace Groovie {
VideoPlayer::VideoPlayer(GroovieEngine *vm) :
_vm(vm), _syst(vm->_system), _file(NULL), _audioStream(NULL), _fps(0), _overrideSpeed(false) {
_vm(vm), _syst(vm->_system), _file(NULL), _audioStream(NULL), _fps(0), _overrideSpeed(false), _flags(0),
_begunPlaying(false), _millisBetweenFrames(0), _lastFrameTime(0) {
}
bool VideoPlayer::load(Common::SeekableReadStream *file, uint16 flags) {