PARALLACTION: Add override keywords

This commit is contained in:
Bastien Bouclet 2020-02-09 12:05:31 +01:00
parent 29cf8e0b43
commit e303937592
19 changed files with 305 additions and 305 deletions

View File

@ -288,15 +288,15 @@ public:
_adlibTimerParam = NULL;
}
int open();
void close();
void send(uint32 b);
MidiChannel *allocateChannel();
MidiChannel *getPercussionChannel() { return &_channels[9]; }
bool isOpen() const { return _isOpen; }
uint32 getBaseTempo() { return 1000000 / OPL::OPL::kDefaultCallbackFrequency; }
int open() override;
void close() override;
void send(uint32 b) override;
MidiChannel *allocateChannel() override;
MidiChannel *getPercussionChannel() override { return &_channels[9]; }
bool isOpen() const override { return _isOpen; }
uint32 getBaseTempo() override { return 1000000 / OPL::OPL::kDefaultCallbackFrequency; }
virtual void setTimerCallback(void *timerParam, Common::TimerManager::TimerProc timerProc) {
void setTimerCallback(void *timerParam, Common::TimerManager::TimerProc timerProc) override {
_adlibTimerProc = timerProc;
_adlibTimerParam = timerParam;
}

View File

@ -108,7 +108,7 @@ class StringExtent_NS : public WrappedLineFormatter {
uint _width, _height;
protected:
virtual Common::String expand(const Common::String &token) {
Common::String expand(const Common::String &token) override {
if (token.compareToIgnoreCase("%p") == 0) {
return Common::String("/");
}
@ -116,7 +116,7 @@ protected:
return token;
}
virtual void setup() {
void setup() override {
_width = _height = 0;
_line.clear();
@ -124,14 +124,14 @@ protected:
_width = 0;
}
virtual void action() {
void action() override {
if (_lineWidth > _width) {
_width = _lineWidth;
}
_height = _lines * _font->height();
}
virtual void end() {
void end() override {
action();
}
@ -152,7 +152,7 @@ class StringWriter_NS : public WrappedLineFormatter {
Graphics::Surface *_surf;
protected:
virtual Common::String expand(const Common::String& token) {
Common::String expand(const Common::String& token) override {
if (token.compareToIgnoreCase("%p") == 0) {
Common::String t(_vm->_password);
for (int i = t.size(); i < 7; i++) {
@ -169,10 +169,10 @@ protected:
return token;
}
virtual void setup() {
void setup() override {
}
virtual void action() {
void action() override {
if (_line.empty()) {
return;
}
@ -184,7 +184,7 @@ protected:
_font->drawString(dst, _surf->w, _line.c_str());
}
virtual void end() {
void end() override {
action();
}
@ -265,14 +265,14 @@ class BalloonManager_ns : public BalloonManager {
public:
BalloonManager_ns(Parallaction_ns *vm, Font *font);
~BalloonManager_ns();
~BalloonManager_ns() override;
void reset();
int setLocationBalloon(const Common::String &text, bool endGame);
int setDialogueBalloon(const Common::String &text, uint16 winding, TextColor textColor);
int setSingleBalloon(const Common::String &text, uint16 x, uint16 y, uint16 winding, TextColor textColor);
void setBalloonText(uint id, const Common::String &text, TextColor textColor);
int hitTestDialogueBalloon(int x, int y);
void reset() override;
int setLocationBalloon(const Common::String &text, bool endGame) override;
int setDialogueBalloon(const Common::String &text, uint16 winding, TextColor textColor) override;
int setSingleBalloon(const Common::String &text, uint16 x, uint16 y, uint16 winding, TextColor textColor) override;
void setBalloonText(uint id, const Common::String &text, TextColor textColor) override;
int hitTestDialogueBalloon(int x, int y) override;
};
int16 BalloonManager_ns::_dialogueBalloonX[5] = { 80, 120, 150, 150, 150 };
@ -445,7 +445,7 @@ class StringExtent_BR : public WrappedLineFormatter {
uint _width, _height;
protected:
virtual void setup() {
void setup() override {
_width = _height = 0;
_line.clear();
@ -453,14 +453,14 @@ protected:
_width = 0;
}
virtual void action() {
void action() override {
if (_lineWidth > _width) {
_width = _lineWidth;
}
_height = _lines * _font->height();
}
virtual void end() {
void end() override {
action();
}
@ -486,10 +486,10 @@ protected:
}
virtual void setup() {
void setup() override {
}
virtual void action() {
void action() override {
if (_line.empty()) {
return;
}
@ -501,7 +501,7 @@ protected:
_font->drawString(dst, _surf->w, _line.c_str());
}
virtual void end() {
void end() override {
action();
}
@ -553,14 +553,14 @@ class BalloonManager_br : public BalloonManager {
public:
BalloonManager_br(Parallaction_br *vm, Font *font);
~BalloonManager_br();
~BalloonManager_br() override;
void reset();
int setLocationBalloon(const Common::String &text, bool endGame);
int setDialogueBalloon(const Common::String &text, uint16 winding, TextColor textColor);
int setSingleBalloon(const Common::String &text, uint16 x, uint16 y, uint16 winding, TextColor textColor);
void setBalloonText(uint id, const Common::String &text, TextColor textColor);
int hitTestDialogueBalloon(int x, int y);
void reset() override;
int setLocationBalloon(const Common::String &text, bool endGame) override;
int setDialogueBalloon(const Common::String &text, uint16 winding, TextColor textColor) override;
int setSingleBalloon(const Common::String &text, uint16 x, uint16 y, uint16 winding, TextColor textColor) override;
void setBalloonText(uint id, const Common::String &text, TextColor textColor) override;
int hitTestDialogueBalloon(int x, int y) override;
};

View File

@ -12,11 +12,11 @@ class Parallaction;
class Debugger : public GUI::Debugger {
public:
Debugger(Parallaction *vm);
virtual ~Debugger() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ
~Debugger() override {} // we need this for __SYMBIAN32__ archaic gcc/UIQ
private:
virtual void preEnter();
virtual void postEnter();
void preEnter() override;
void postEnter() override;
private:
Parallaction *_vm;

View File

@ -222,23 +222,23 @@ public:
_guiOptions = GUIO1(GUIO_NOLAUNCHLOAD);
}
virtual const char *getEngineId() const override {
const char *getEngineId() const override {
return "parallaction";
}
virtual const char *getName() const override {
const char *getName() const override {
return "Parallaction";
}
virtual const char *getOriginalCopyright() const override {
const char *getOriginalCopyright() const override {
return "Nippon Safes Inc. (C) Dynabyte";
}
virtual bool hasFeature(MetaEngineFeature f) const override;
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
virtual SaveStateList listSaves(const char *target) const override;
virtual int getMaximumSaveSlot() const override;
virtual void removeSaveState(const char *target, int slot) const override;
bool hasFeature(MetaEngineFeature f) const override;
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
SaveStateList listSaves(const char *target) const override;
int getMaximumSaveSlot() const override;
void removeSaveState(const char *target, int slot) const override;
};
bool ParallactionMetaEngine::hasFeature(MetaEngineFeature f) const {

View File

@ -437,7 +437,7 @@ public:
return testAnswerFlags(a);
}
virtual void addVisibleAnswers(Question *q) {
void addVisibleAnswers(Question *q) override {
_askPassword = false;
_numVisAnswers = 0;
for (int i = 0; i < NUM_ANSWERS && q->_answers[i]; i++) {
@ -458,7 +458,7 @@ public:
resetPassword();
}
virtual int16 selectAnswer() {
int16 selectAnswer() override {
int ans = NO_ANSWER_SELECTED;
if (_askPassword) {
ans = askPassword();
@ -494,7 +494,7 @@ public:
return testAnswerFlags(a);
}
virtual void addVisibleAnswers(Question *q) {
void addVisibleAnswers(Question *q) override {
_numVisAnswers = 0;
for (int i = 0; i < NUM_ANSWERS && q->_answers[i]; i++) {
Answer *a = q->_answers[i];
@ -507,7 +507,7 @@ public:
}
}
virtual int16 selectAnswer() {
int16 selectAnswer() override {
int16 ans = NO_ANSWER_SELECTED;
if (_numVisAnswers == 1) {
ans = selectAnswer1();

View File

@ -103,13 +103,13 @@ protected:
public:
Disk_ns(Parallaction *vm);
virtual ~Disk_ns();
~Disk_ns() override;
Common::String selectArchive(const Common::String &name);
void setLanguage(uint16 language);
Common::String selectArchive(const Common::String &name) override;
void setLanguage(uint16 language) override;
virtual Script* loadLocation(const char *name);
virtual Script* loadScript(const char* name);
Script* loadLocation(const char *name) override;
Script* loadScript(const char* name) override;
};
class DosDisk_ns : public Disk_ns {
@ -124,27 +124,27 @@ private:
protected:
Gfx *_gfx;
virtual Common::SeekableReadStream *tryOpenFile(const char* name);
virtual void decodeCnv(byte *data, uint16 numFrames, uint16 width, uint16 height, Common::SeekableReadStream *stream);
Common::SeekableReadStream *tryOpenFile(const char* name) override;
void decodeCnv(byte *data, uint16 numFrames, uint16 width, uint16 height, Common::SeekableReadStream *stream) override;
public:
DosDisk_ns(Parallaction *vm);
virtual ~DosDisk_ns();
~DosDisk_ns() override;
void init();
void init() override;
GfxObj* loadTalk(const char *name);
GfxObj* loadObjects(const char *name, uint8 part = 0);
Frames* loadPointer(const char *name);
GfxObj* loadHead(const char* name);
Font* loadFont(const char* name);
GfxObj* loadStatic(const char* name);
Frames* loadFrames(const char* name);
void loadSlide(BackgroundInfo& info, const char *filename);
void loadScenery(BackgroundInfo& info, const char* background, const char* mask, const char* path);
Table* loadTable(const char* name);
Common::SeekableReadStream* loadMusic(const char* name);
Common::SeekableReadStream* loadSound(const char* name);
GfxObj* loadTalk(const char *name) override;
GfxObj* loadObjects(const char *name, uint8 part = 0) override;
Frames* loadPointer(const char *name) override;
GfxObj* loadHead(const char* name) override;
Font* loadFont(const char* name) override;
GfxObj* loadStatic(const char* name) override;
Frames* loadFrames(const char* name) override;
void loadSlide(BackgroundInfo& info, const char *filename) override;
void loadScenery(BackgroundInfo& info, const char* background, const char* mask, const char* path) override;
Table* loadTable(const char* name) override;
Common::SeekableReadStream* loadMusic(const char* name) override;
Common::SeekableReadStream* loadSound(const char* name) override;
};
class AmigaDisk_ns : public Disk_ns {
@ -153,33 +153,33 @@ protected:
void patchFrame(byte *dst, byte *dlta, uint16 bytesPerPlane, uint16 height);
void unpackFrame(byte *dst, byte *src, uint16 planeSize);
void unpackBitmap(byte *dst, byte *src, uint16 numFrames, uint16 bytesPerPlane, uint16 height);
Common::SeekableReadStream *tryOpenFile(const char* name);
Common::SeekableReadStream *tryOpenFile(const char* name) override;
Font *createFont(const char *name, Common::SeekableReadStream &stream);
void loadMask_internal(BackgroundInfo& info, const char *name);
void loadPath_internal(BackgroundInfo& info, const char *name);
void loadBackground(BackgroundInfo& info, const char *name);
void buildMask(byte* buf);
virtual void decodeCnv(byte *data, uint16 numFrames, uint16 width, uint16 height, Common::SeekableReadStream *stream);
void decodeCnv(byte *data, uint16 numFrames, uint16 width, uint16 height, Common::SeekableReadStream *stream) override;
public:
AmigaDisk_ns(Parallaction *vm);
virtual ~AmigaDisk_ns();
~AmigaDisk_ns() override;
void init();
void init() override;
GfxObj* loadTalk(const char *name);
GfxObj* loadObjects(const char *name, uint8 part = 0);
Frames* loadPointer(const char *name);
GfxObj* loadHead(const char* name);
Font* loadFont(const char* name);
GfxObj* loadStatic(const char* name);
Frames* loadFrames(const char* name);
void loadSlide(BackgroundInfo& info, const char *filename);
void loadScenery(BackgroundInfo& info, const char* background, const char* mask, const char* path);
Table* loadTable(const char* name);
Common::SeekableReadStream* loadMusic(const char* name);
Common::SeekableReadStream* loadSound(const char* name);
GfxObj* loadTalk(const char *name) override;
GfxObj* loadObjects(const char *name, uint8 part = 0) override;
Frames* loadPointer(const char *name) override;
GfxObj* loadHead(const char* name) override;
Font* loadFont(const char* name) override;
GfxObj* loadStatic(const char* name) override;
Frames* loadFrames(const char* name) override;
void loadSlide(BackgroundInfo& info, const char *filename) override;
void loadScenery(BackgroundInfo& info, const char* background, const char* mask, const char* path) override;
Table* loadTable(const char* name) override;
Common::SeekableReadStream* loadMusic(const char* name) override;
Common::SeekableReadStream* loadSound(const char* name) override;
};
@ -201,7 +201,7 @@ protected:
public:
Disk_br(Parallaction *vm);
virtual ~Disk_br();
~Disk_br() override;
};
// for the moment DosDisk_br subclasses Disk. When Amiga support will
@ -218,26 +218,26 @@ protected:
public:
DosDisk_br(Parallaction *vm);
virtual void init();
void init() override;
Common::String selectArchive(const Common::String &name);
void setLanguage(uint16 language);
Script* loadLocation(const char *name);
Script* loadScript(const char* name);
GfxObj* loadTalk(const char *name);
GfxObj* loadObjects(const char *name, uint8 part = 0);
Frames* loadPointer(const char *name);
GfxObj* loadHead(const char* name);
Font* loadFont(const char* name);
GfxObj* loadStatic(const char* name);
Frames* loadFrames(const char* name);
void loadSlide(BackgroundInfo& info, const char *filename);
void loadScenery(BackgroundInfo& info, const char* name, const char* mask, const char* path);
Table* loadTable(const char* name);
Common::SeekableReadStream* loadMusic(const char* name);
Common::SeekableReadStream* loadSound(const char* name);
MaskBuffer *loadMask(const char *name, uint32 w, uint32 h);
PathBuffer *loadPath(const char *name, uint32 w, uint32 h);
Common::String selectArchive(const Common::String &name) override;
void setLanguage(uint16 language) override;
Script* loadLocation(const char *name) override;
Script* loadScript(const char* name) override;
GfxObj* loadTalk(const char *name) override;
GfxObj* loadObjects(const char *name, uint8 part = 0) override;
Frames* loadPointer(const char *name) override;
GfxObj* loadHead(const char* name) override;
Font* loadFont(const char* name) override;
GfxObj* loadStatic(const char* name) override;
Frames* loadFrames(const char* name) override;
void loadSlide(BackgroundInfo& info, const char *filename) override;
void loadScenery(BackgroundInfo& info, const char* name, const char* mask, const char* path) override;
Table* loadTable(const char* name) override;
Common::SeekableReadStream* loadMusic(const char* name) override;
Common::SeekableReadStream* loadSound(const char* name) override;
MaskBuffer *loadMask(const char *name, uint32 w, uint32 h) override;
PathBuffer *loadPath(const char *name, uint32 w, uint32 h) override;
};
class DosDemoDisk_br : public DosDisk_br {
@ -245,9 +245,9 @@ class DosDemoDisk_br : public DosDisk_br {
public:
DosDemoDisk_br(Parallaction *vm);
virtual void init();
void init() override;
Common::String selectArchive(const Common::String& name);
Common::String selectArchive(const Common::String& name) override;
};
class AmigaDisk_br : public DosDisk_br {
@ -261,19 +261,19 @@ protected:
public:
AmigaDisk_br(Parallaction *vm);
virtual void init();
void init() override;
Common::String selectArchive(const Common::String& name);
GfxObj* loadTalk(const char *name);
Font* loadFont(const char* name);
GfxObj* loadStatic(const char* name);
Frames* loadFrames(const char* name);
void loadSlide(BackgroundInfo& info, const char *filename);
void loadScenery(BackgroundInfo& info, const char* name, const char* mask, const char* path);
GfxObj* loadObjects(const char *name, uint8 part = 0);
Common::SeekableReadStream* loadMusic(const char* name);
Common::SeekableReadStream* loadSound(const char* name);
MaskBuffer *loadMask(const char *name, uint32 w, uint32 h);
Common::String selectArchive(const Common::String& name) override;
GfxObj* loadTalk(const char *name) override;
Font* loadFont(const char* name) override;
GfxObj* loadStatic(const char* name) override;
Frames* loadFrames(const char* name) override;
void loadSlide(BackgroundInfo& info, const char *filename) override;
void loadScenery(BackgroundInfo& info, const char* name, const char* mask, const char* path) override;
GfxObj* loadObjects(const char *name, uint8 part = 0) override;
Common::SeekableReadStream* loadMusic(const char* name) override;
Common::SeekableReadStream* loadSound(const char* name) override;
MaskBuffer *loadMask(const char *name, uint32 w, uint32 h) override;
};
} // namespace Parallaction

View File

@ -58,30 +58,30 @@ struct Sprites : public Frames {
_sprites = new Sprite[_num];
}
~Sprites() {
~Sprites() override {
delete[] _sprites;
}
uint16 getNum() {
uint16 getNum() override {
return _num;
}
byte* getData(uint16 index) {
byte* getData(uint16 index) override {
assert(index < _num);
return _sprites[index].packedData;
}
void getRect(uint16 index, Common::Rect &r) {
void getRect(uint16 index, Common::Rect &r) override {
assert(index < _num);
r.setWidth(_sprites[index].w);
r.setHeight(_sprites[index].h);
r.moveTo(_sprites[index].x, _sprites[index].y);
}
uint getRawSize(uint16 index) {
uint getRawSize(uint16 index) override {
assert(index < _num);
return _sprites[index].size;
}
uint getSize(uint16 index) {
uint getSize(uint16 index) override {
assert(index < _num);
return _sprites[index].w * _sprites[index].h;
}

View File

@ -72,12 +72,12 @@ class NSArchive : public Common::Archive {
public:
NSArchive(Common::SeekableReadStream *stream, Common::Platform platform, uint32 features);
~NSArchive();
~NSArchive() override;
Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const;
bool hasFile(const Common::String &name) const;
int listMembers(Common::ArchiveMemberList &list) const;
const Common::ArchiveMemberPtr getMember(const Common::String &name) const;
Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const override;
bool hasFile(const Common::String &name) const override;
int listMembers(Common::ArchiveMemberList &list) const override;
const Common::ArchiveMemberPtr getMember(const Common::String &name) const override;
};
@ -684,27 +684,27 @@ public:
_dispose = true;
}
~PowerPackerStream() {
~PowerPackerStream() override {
if (_dispose) delete _stream;
}
int32 size() const {
int32 size() const override {
return _stream->size();
}
int32 pos() const {
int32 pos() const override {
return _stream->pos();
}
bool eos() const {
bool eos() const override {
return _stream->eos();
}
bool seek(int32 offs, int whence = SEEK_SET) {
bool seek(int32 offs, int whence = SEEK_SET) override {
return _stream->seek(offs, whence);
}
uint32 read(void *dataPtr, uint32 dataSize) {
uint32 read(void *dataPtr, uint32 dataSize) override {
return _stream->read(dataPtr, dataSize);
}
};

View File

@ -74,14 +74,14 @@ public:
_bufPitch = 0;
}
~BraFont() {
~BraFont() override {
free(_widths);
free(_offsets);
free(_data);
}
uint32 getStringWidth(const char *s) {
uint32 getStringWidth(const char *s) override {
uint32 len = 0;
while (*s) {
@ -93,7 +93,7 @@ public:
return len;
}
uint16 height() {
uint16 height() override {
return (uint16)_height;
}
@ -122,7 +122,7 @@ public:
}
void drawString(byte* buffer, uint32 pitch, const char *s) {
void drawString(byte* buffer, uint32 pitch, const char *s) override {
if (s == NULL)
return;
@ -250,16 +250,16 @@ public:
}
// Frames implementation
uint16 getNum() {
uint16 getNum() override {
return _numGlyphs;
}
byte* getData(uint16 index) {
byte* getData(uint16 index) override {
assert(index < _numGlyphs);
return _data + (_height * _widths[index]) * index;
}
void getRect(uint16 index, Common::Rect &r) {
void getRect(uint16 index, Common::Rect &r) override {
assert(index < _numGlyphs);
r.left = 0;
r.top = 0;
@ -267,12 +267,12 @@ public:
r.setHeight(_height);
}
uint getRawSize(uint16 index) {
uint getRawSize(uint16 index) override {
assert(index < _numGlyphs);
return _widths[index] * _height;
}
uint getSize(uint16 index) {
uint getSize(uint16 index) override {
assert(index < _numGlyphs);
return _widths[index] * _height;
}
@ -292,7 +292,7 @@ protected:
protected:
virtual uint16 drawChar(char c) = 0;
virtual uint16 width(byte c) = 0;
virtual uint16 height() = 0;
uint16 height() override = 0;
byte mapChar(byte c) {
if (c == 0xA5) return 0x5F;
@ -307,7 +307,7 @@ public:
DosFont(Cnv *cnv) : _data(cnv), _pitch(cnv->_width), _cp(NULL), _bufPitch(0) {
}
~DosFont() {
~DosFont() override {
delete _data;
}
@ -315,7 +315,7 @@ public:
}
uint32 getStringWidth(const char *s) {
uint32 getStringWidth(const char *s) override {
uint32 len = 0;
while (*s) {
@ -327,7 +327,7 @@ public:
return len;
}
void drawString(byte* buffer, uint32 pitch, const char *s) {
void drawString(byte* buffer, uint32 pitch, const char *s) override {
if (s == NULL)
return;
@ -348,11 +348,11 @@ private:
static const byte _glyphWidths[126];
protected:
uint16 width(byte c) {
uint16 width(byte c) override {
return _glyphWidths[c];
}
uint16 height() {
uint16 height() override {
return _data->_height;
}
@ -361,7 +361,7 @@ public:
}
protected:
uint16 drawChar(char c) {
uint16 drawChar(char c) override {
byte *src = _data->getFramePtr(c);
byte *dst = _cp;
@ -405,15 +405,15 @@ protected:
uint16 _width;
protected:
uint16 width(byte c) {
uint16 width(byte c) override {
return _width;
}
uint16 height() {
uint16 height() override {
return _data->_height;
}
uint16 drawChar(char c) {
uint16 drawChar(char c) override {
byte *src = _data->getFramePtr(c);
byte *dst = _cp;
@ -486,16 +486,16 @@ protected:
uint16 getPixels(byte c);
uint16 getOffset(byte c);
uint16 width(byte c);
uint16 height();
uint16 height() override;
byte mapChar(byte c);
public:
AmigaFont(Common::SeekableReadStream &stream);
~AmigaFont();
~AmigaFont() override;
uint32 getStringWidth(const char *s);
void drawString(byte *buf, uint32 pitch, const char *s);
uint32 getStringWidth(const char *s) override;
void drawString(byte *buf, uint32 pitch, const char *s) override;

View File

@ -94,30 +94,30 @@ public:
SurfaceToFrames(Graphics::Surface *surf) : _surf(surf) {
}
~SurfaceToFrames() {
~SurfaceToFrames() override {
_surf->free();
delete _surf;
}
uint16 getNum() {
uint16 getNum() override {
return 1;
}
byte* getData(uint16 index) {
byte* getData(uint16 index) override {
assert(index == 0);
return (byte *)_surf->getBasePtr(0,0);
}
void getRect(uint16 index, Common::Rect &r) {
void getRect(uint16 index, Common::Rect &r) override {
assert(index == 0);
r.left = 0;
r.top = 0;
r.setWidth(_surf->w);
r.setHeight(_surf->h);
}
uint getRawSize(uint16 index) {
uint getRawSize(uint16 index) override {
assert(index == 0);
return getSize(index);
}
uint getSize(uint16 index) {
uint getSize(uint16 index) override {
assert(index == 0);
return _surf->w * _surf->h;
}
@ -143,7 +143,7 @@ public:
}
~Cnv() {
~Cnv() override {
if (_freeData)
delete[] _data;
}
@ -154,25 +154,25 @@ public:
return &_data[index * _width * _height];
}
uint16 getNum() {
uint16 getNum() override {
return _count;
}
byte *getData(uint16 index) {
byte *getData(uint16 index) override {
return getFramePtr(index);
}
void getRect(uint16 index, Common::Rect &r) {
void getRect(uint16 index, Common::Rect &r) override {
r.left = 0;
r.top = 0;
r.setWidth(_width);
r.setHeight(_height);
}
uint getRawSize(uint16 index) {
uint getRawSize(uint16 index) override {
assert(index < _count);
return getSize(index);
}
uint getSize(uint16 index) {
uint getSize(uint16 index) override {
assert(index < _count);
return _width * _height;
}

View File

@ -47,7 +47,7 @@ public:
_timeOut(0), _startTime(0), _fadeSteps(0) {
}
virtual MenuInputState* run() {
MenuInputState* run() override {
if (_fadeSteps > 0) {
pal.fadeTo(blackPal, 1);
_vm->_gfx->setPalette(pal);
@ -67,7 +67,7 @@ public:
return this;
}
virtual void enter() {
void enter() override {
_vm->_gfx->clearScreen();
_vm->showSlide(_slideName.c_str(), CENTER_LABEL_HORIZONTAL, CENTER_LABEL_VERTICAL);
_vm->_input->setMouseState(MOUSE_DISABLED);
@ -204,11 +204,11 @@ public:
_selection = 0;
}
~MainMenuInputState_BR() {
~MainMenuInputState_BR() override {
cleanup();
}
virtual MenuInputState* run() {
MenuInputState* run() override {
int event = _vm->_input->getLastButtonEvent();
if (!((event == kMouseLeftUp) && _selection >= 0)) {
redrawMenu();
@ -241,7 +241,7 @@ public:
return 0;
}
virtual void enter() {
void enter() override {
_vm->_gfx->clearScreen();
int x = 0, y = 0, i = 0;
if (_vm->getPlatform() == Common::kPlatformDOS) {
@ -388,13 +388,13 @@ public:
_sfxStatus = _mscStatus = 0;
}
~IngameMenuInputState_BR() {
~IngameMenuInputState_BR() override {
delete _menuObj;
delete _mscMenuObj;
delete _sfxMenuObj;
}
MenuInputState *run() {
MenuInputState *run() override {
if (_vm->_input->getLastButtonEvent() != kMouseLeftUp) {
return this;
}
@ -457,7 +457,7 @@ public:
return this;
}
void enter() {
void enter() override {
// TODO: find the right position of the menu object
_menuObjId = _vm->_gfx->setItem(_menuObj, 0, 0, 0);
_vm->_gfx->setItemFrame(_menuObjId, 0);
@ -509,11 +509,11 @@ public:
assert(_obj);
}
~QuitDialogInputState_BR() {
~QuitDialogInputState_BR() override {
delete _obj;
}
MenuInputState *run() {
MenuInputState *run() override {
uint16 key;
bool e = _vm->_input->getLastKeyDown(key);
if (!e) {
@ -537,7 +537,7 @@ public:
}
void enter() {
void enter() override {
// setPaletteEntry(1, 0, 0, 0); // text color
// setPaletteEntry(15, 255, 255, 255); // background color
int id = _vm->_gfx->setItem(_obj, _x, _y, 0);

View File

@ -47,7 +47,7 @@ public:
_timeOut(0), _startTime(0) {
}
virtual MenuInputState* run() {
MenuInputState* run() override {
uint32 curTime = _vm->_system->getMillis();
if (curTime - _startTime > _timeOut) {
return _helper->getState(_nextState);
@ -55,7 +55,7 @@ public:
return this;
}
virtual void enter() {
void enter() override {
_vm->_input->setMouseState(MOUSE_DISABLED);
_vm->showSlide(_slideName.c_str());
_startTime = _vm->_system->getMillis();
@ -152,7 +152,7 @@ public:
_allowChoice = true;
}
~ChooseLanguageInputState_NS() {
~ChooseLanguageInputState_NS() override {
destroyLabels();
}
@ -162,7 +162,7 @@ public:
_label = 0;
}
virtual MenuInputState* run() {
MenuInputState* run() override {
if (!_allowChoice) {
_vm->setInternLanguage(_language);
return _helper->getState(_nextState);
@ -188,7 +188,7 @@ public:
return this;
}
virtual void enter() {
void enter() override {
if (!_allowChoice) {
return;
}
@ -229,7 +229,7 @@ public:
_labels[1] = 0;
}
~SelectGameInputState_NS() {
~SelectGameInputState_NS() override {
destroyLabels();
}
@ -243,7 +243,7 @@ public:
}
virtual MenuInputState *run() {
MenuInputState *run() override {
int event = _vm->_input->getLastButtonEvent();
if (event == kMouseLeftUp) {
@ -268,7 +268,7 @@ public:
return this;
}
virtual void enter() {
void enter() override {
_vm->showSlide("restore");
_vm->_input->setMouseState(MOUSE_ENABLED_SHOW);
@ -301,14 +301,14 @@ class LoadGameInputState_NS : public MenuInputState {
public:
LoadGameInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("loadgame", helper), _vm(vm), _result(false) { }
virtual MenuInputState* run() {
MenuInputState* run() override {
if (!_result) {
_vm->scheduleLocationSwitch("fogne.dough");
}
return 0;
}
virtual void enter() {
void enter() override {
_result = _vm->_saveLoad->loadGame();
}
};
@ -329,11 +329,11 @@ public:
_labels[3] = 0;
}
~NewGameInputState_NS() {
~NewGameInputState_NS() override {
destroyLabels();
}
virtual MenuInputState* run() {
MenuInputState* run() override {
int event = _vm->_input->getLastButtonEvent();
if (event == kMouseLeftUp || event == kMouseRightUp) {
@ -366,7 +366,7 @@ public:
_labels[3] = 0;
}
virtual void enter() {
void enter() override {
_vm->changeBackground("test");
_vm->_input->setMouseState(MOUSE_ENABLED_HIDE);
@ -397,13 +397,13 @@ public:
StartDemoInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("startdemo", helper), _vm(vm) {
}
virtual MenuInputState* run() {
MenuInputState* run() override {
_vm->scheduleLocationSwitch("fognedemo.dough");
_vm->_input->setMouseState(MOUSE_ENABLED_SHOW);
return 0;
}
virtual void enter() {
void enter() override {
_vm->_input->setMouseState(MOUSE_DISABLED);
}
};
@ -504,7 +504,7 @@ public:
_codeTrueBlocks[8] = Common::Rect( 248, 58, 264, 82 );
}
~SelectCharacterInputState_NS() {
~SelectCharacterInputState_NS() override {
_block.free();
_emptySlots.free();
@ -598,7 +598,7 @@ public:
_vm->scheduleLocationSwitch(_charStartLocation[character]);
}
virtual MenuInputState* run() {
MenuInputState* run() override {
MenuInputState* nextState = this;
switch (_state) {
@ -626,7 +626,7 @@ public:
return nextState;
}
virtual void enter() {
void enter() override {
_vm->_soundManI->stopMusic();
_vm->showSlide("password");
@ -700,7 +700,7 @@ public:
_startTime = 0;
}
~ShowCreditsInputState_NS() {
~ShowCreditsInputState_NS() override {
destroyLabels();
}
@ -723,7 +723,7 @@ public:
}
virtual MenuInputState* run() {
MenuInputState* run() override {
if (_current == -1) {
_startTime = _vm->_system->getMillis();
_current = 0;
@ -748,7 +748,7 @@ public:
return this;
}
virtual void enter() {
void enter() override {
_current = -1;
_vm->_input->setMouseState(MOUSE_DISABLED);
}
@ -774,7 +774,7 @@ public:
_label = 0;
}
~EndIntroInputState_NS() {
~EndIntroInputState_NS() override {
destroyLabels();
}
@ -784,7 +784,7 @@ public:
_label = 0;
}
virtual MenuInputState* run() {
MenuInputState* run() override {
int event = _vm->_input->getLastButtonEvent();
if (event != kMouseLeftUp) {
@ -801,7 +801,7 @@ public:
return _helper->getState("selectcharacter");
}
virtual void enter() {
void enter() override {
_vm->_input->setMouseState(MOUSE_DISABLED);
if (!_isDemo) {
@ -857,7 +857,7 @@ public:
_labels[3] = 0;
}
virtual MenuInputState* run() {
MenuInputState* run() override {
int event = _vm->_input->getLastButtonEvent();
if (event != kMouseLeftUp) {
return this;
@ -873,7 +873,7 @@ public:
return _helper->getState("selectcharacter");
}
virtual void enter() {
void enter() override {
bool completed[3];
_vm->_saveLoad->getGamePartProgress(completed, 3);
_allPartsComplete = (completed[0] && completed[1] && completed[2]);

View File

@ -474,7 +474,7 @@ public:
Common::String _scriptName;
Animation();
virtual ~Animation();
~Animation() override;
uint16 getFrameNum() const;
byte* getFrameData() const;
@ -491,11 +491,11 @@ public:
void forceXYZF(int16 x, int16 y, int16 z, int16 f);
// getters/setters used by scripts
int16 getX() { return _left; }
void setX(int16 value) { _left = value; }
int16 getX() override { return _left; }
void setX(int16 value) override { _left = value; }
int16 getY() { return _top; }
void setY(int16 value) { _top = value; }
int16 getY() override { return _top; }
void setY(int16 value) override { _top = value; }
int16 getZ() { return _z; }
void setZ(int16 value) { _z = value; }
@ -539,7 +539,7 @@ class FixedTable : public Table {
public:
FixedTable(uint32 size, uint32 fixed);
void clear();
void clear() override;
};
Table* createTableFromStream(uint32 size, Common::SeekableReadStream *stream);

View File

@ -258,12 +258,12 @@ private:
public:
Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gameDesc);
~Parallaction();
~Parallaction() override;
// Engine APIs
virtual Common::Error init();
virtual Common::Error go() = 0;
virtual Common::Error run() override {
Common::Error run() override {
Common::Error err;
err = init();
if (err.getCode() != Common::kNoError)
@ -271,9 +271,9 @@ public:
return go();
}
virtual bool hasFeature(EngineFeature f) const override;
virtual void pauseEngineIntern(bool pause) override;
virtual GUI::Debugger *getDebugger() override;
bool hasFeature(EngineFeature f) const override;
void pauseEngineIntern(bool pause) override;
GUI::Debugger *getDebugger() override;
// info
int32 _screenWidth;
@ -397,11 +397,11 @@ class Parallaction_ns : public Parallaction {
public:
Parallaction_ns(OSystem* syst, const PARALLACTIONGameDescription *gameDesc);
~Parallaction_ns();
~Parallaction_ns() override;
// Engine APIs
virtual Common::Error init();
virtual Common::Error go();
Common::Error init() override;
Common::Error go() override;
SoundMan_ns* _soundManI;
@ -410,16 +410,16 @@ public:
public:
virtual void parseLocation(const char *filename);
virtual void changeLocation();
virtual void changeCharacter(const char *name);
virtual void callFunction(uint index, void* parm);
virtual void runPendingZones();
virtual void cleanupGame();
virtual void updateWalkers();
virtual void scheduleWalk(int16 x, int16 y, bool fromUser);
virtual DialogueManager *createDialogueManager(ZonePtr z);
virtual bool processGameEvent(int event);
void parseLocation(const char *filename) override;
void changeLocation() override;
void changeCharacter(const char *name) override;
void callFunction(uint index, void* parm) override;
void runPendingZones() override;
void cleanupGame() override;
void updateWalkers() override;
void scheduleWalk(int16 x, int16 y, bool fromUser) override;
DialogueManager *createDialogueManager(ZonePtr z) override;
bool processGameEvent(int event) override;
void changeBackground(const char *background, const char *mask = 0, const char *path = 0);
@ -509,22 +509,22 @@ class Parallaction_br : public Parallaction {
public:
Parallaction_br(OSystem* syst, const PARALLACTIONGameDescription *gameDesc);
~Parallaction_br();
~Parallaction_br() override;
virtual Common::Error init();
virtual Common::Error go();
Common::Error init() override;
Common::Error go() override;
public:
virtual void parseLocation(const char* name);
virtual void changeLocation();
virtual void changeCharacter(const char *name);
virtual void callFunction(uint index, void* parm);
virtual void runPendingZones();
virtual void cleanupGame();
virtual void updateWalkers();
virtual void scheduleWalk(int16 x, int16 y, bool fromUser);
virtual DialogueManager *createDialogueManager(ZonePtr z);
virtual bool processGameEvent(int event);
void parseLocation(const char* name) override;
void changeLocation() override;
void changeCharacter(const char *name) override;
void callFunction(uint index, void* parm) override;
void runPendingZones() override;
void cleanupGame() override;
void updateWalkers() override;
void scheduleWalk(int16 x, int16 y, bool fromUser) override;
DialogueManager *createDialogueManager(ZonePtr z) override;
bool processGameEvent(int event) override;
void setupSubtitles(const char *s, const char *s2, int y);
void clearSubtitles();

View File

@ -291,25 +291,25 @@ protected:
DECLARE_UNQUALIFIED_ANIM_PARSER(moveto);
DECLARE_UNQUALIFIED_ANIM_PARSER(endanimation);
virtual void parseZoneTypeBlock(ZonePtr z);
void parseZoneTypeBlock(ZonePtr z) override;
public:
virtual void parsePathData(ZonePtr z);
virtual void parseGetData(ZonePtr z);
virtual void parseDoorData(ZonePtr z);
virtual void parseHearData(ZonePtr z);
virtual void parseNoneData(ZonePtr z);
void parseGetData(ZonePtr z) override;
void parseDoorData(ZonePtr z) override;
void parseHearData(ZonePtr z) override;
void parseNoneData(ZonePtr z) override;
protected:
void parseAnswerCounter(Answer *answer);
virtual Answer *parseAnswer();
Answer *parseAnswer() override;
public:
LocationParser_br(Parallaction_br *vm) : LocationParser_ns((Parallaction_ns*)vm), _vm(vm),
_audioCommandsNames(0), _out(0) {
}
virtual void init();
void init() override;
virtual ~LocationParser_br() {
~LocationParser_br() override {
delete _audioCommandsNames;
}
@ -402,14 +402,14 @@ protected:
void beginIfStatement();
void endIfStatement();
virtual void parseRValue(ScriptVar &var, const char *str);
void parseRValue(ScriptVar &var, const char *str) override;
public:
ProgramParser_br(Parallaction_br *vm) : ProgramParser_ns((Parallaction_ns*)vm), _vm(vm), _openIfStatement(0) {
}
virtual void init();
virtual void parse(Script *script, ProgramPtr program);
void init() override;
void parse(Script *script, ProgramPtr program) override;
};
} // End of namespace Parallaction

View File

@ -57,29 +57,29 @@ class SaveLoad_ns : public SaveLoad {
Parallaction_ns *_vm;
protected:
void renameOldSavefiles();
virtual void doLoadGame(uint16 slot);
virtual void doSaveGame(uint16 slot, const char* name);
void renameOldSavefiles() override;
void doLoadGame(uint16 slot) override;
void doSaveGame(uint16 slot, const char* name) override;
public:
SaveLoad_ns(Parallaction_ns *vm, Common::SaveFileManager *saveFileMan) : SaveLoad(saveFileMan, "nippon"), _vm(vm) { }
virtual bool saveGame();
bool saveGame() override;
virtual void getGamePartProgress(bool *complete, int size);
virtual void setPartComplete(const char *part);
void getGamePartProgress(bool *complete, int size) override;
void setPartComplete(const char *part) override;
};
class SaveLoad_br : public SaveLoad {
// Parallaction_br *_vm;
virtual void doLoadGame(uint16 slot);
virtual void doSaveGame(uint16 slot, const char* name);
void doLoadGame(uint16 slot) override;
void doSaveGame(uint16 slot, const char* name) override;
public:
SaveLoad_br(Parallaction_br *vm, Common::SaveFileManager *saveFileMan) : SaveLoad(saveFileMan, "bra") { }
virtual void getGamePartProgress(bool *complete, int size);
virtual void setPartComplete(const char *part);
void getGamePartProgress(bool *complete, int size) override;
void setPartComplete(const char *part) override;
};
} // namespace Parallaction

View File

@ -112,7 +112,7 @@ protected:
public:
SoundMan_ns(Parallaction_ns *vm);
virtual ~SoundMan_ns() {}
~SoundMan_ns() override {}
virtual void playSfx(const char *filename, uint channel, bool looping, int volume = -1) { }
virtual void stopSfx(uint channel) { }
@ -123,7 +123,7 @@ public:
virtual void playCharacterMusic(const char *character) = 0;
virtual void playLocationMusic(const char *location) = 0;
virtual void pause(bool p) { }
virtual void execute(int command, const char *parm);
void execute(int command, const char *parm) override;
void setMusicVolume(int value);
};
@ -139,14 +139,14 @@ class DosSoundMan_ns : public SoundMan_ns {
public:
DosSoundMan_ns(Parallaction_ns *vm);
~DosSoundMan_ns();
void playMusic();
void stopMusic();
~DosSoundMan_ns() override;
void playMusic() override;
void stopMusic() override;
void playCharacterMusic(const char *character);
void playLocationMusic(const char *location);
void playCharacterMusic(const char *character) override;
void playLocationMusic(const char *location) override;
void pause(bool p);
void pause(bool p) override;
};
#define NUM_SFX_CHANNELS 4
@ -165,20 +165,20 @@ class AmigaSoundMan_ns : public SoundMan_ns {
public:
AmigaSoundMan_ns(Parallaction_ns *vm);
~AmigaSoundMan_ns();
void playMusic();
void stopMusic();
~AmigaSoundMan_ns() override;
void playMusic() override;
void stopMusic() override;
void playSfx(const char *filename, uint channel, bool looping, int volume);
void stopSfx(uint channel);
void playSfx(const char *filename, uint channel, bool looping, int volume) override;
void stopSfx(uint channel) override;
void playCharacterMusic(const char *character);
void playLocationMusic(const char *location);
void playCharacterMusic(const char *character) override;
void playLocationMusic(const char *location) override;
};
class DummySoundMan : public SoundManImpl {
public:
void execute(int command, const char *parm) { }
void execute(int command, const char *parm) override { }
};
class SoundMan_br : public SoundManImpl {
@ -204,13 +204,13 @@ protected:
public:
SoundMan_br(Parallaction_br *vm);
~SoundMan_br();
~SoundMan_br() override;
virtual void playSfx(const char *filename, uint channel, bool looping, int volume = -1) { }
void stopSfx(uint channel);
void stopAllSfx();
virtual void execute(int command, const char *parm);
void execute(int command, const char *parm) override;
void setMusicFile(const char *parm);
void enableSfx(bool enable);
@ -227,13 +227,13 @@ class DosSoundMan_br : public SoundMan_br {
public:
DosSoundMan_br(Parallaction_br *vm);
~DosSoundMan_br();
~DosSoundMan_br() override;
void playMusic();
void stopMusic();
void pause(bool p);
void playMusic() override;
void stopMusic() override;
void pause(bool p) override;
void playSfx(const char *filename, uint channel, bool looping, int volume);
void playSfx(const char *filename, uint channel, bool looping, int volume) override;
};
class AmigaSoundMan_br : public SoundMan_br {
@ -245,13 +245,13 @@ class AmigaSoundMan_br : public SoundMan_br {
public:
AmigaSoundMan_br(Parallaction_br *vm);
~AmigaSoundMan_br();
~AmigaSoundMan_br() override;
void playMusic();
void stopMusic();
void pause(bool p);
void playMusic() override;
void stopMusic() override;
void pause(bool p) override;
void playSfx(const char *filename, uint channel, bool looping, int volume);
void playSfx(const char *filename, uint channel, bool looping, int volume) override;
};
} // namespace Parallaction

View File

@ -70,8 +70,8 @@ namespace Parallaction {
class MidiParser_MSC : public MidiParser {
protected:
virtual void parseNextEvent(EventInfo &info);
virtual bool loadMusic(byte *data, uint32 size);
void parseNextEvent(EventInfo &info) override;
bool loadMusic(byte *data, uint32 size) override;
uint8 read1(byte *&data) {
return *data++;
@ -207,12 +207,12 @@ public:
void play(Common::SeekableReadStream *stream);
virtual void pause(bool p);
virtual void pause() { assert(0); } // overridden
virtual void setVolume(int volume);
virtual void onTimer();
void pause() override { assert(0); } // overridden
void setVolume(int volume) override;
void onTimer() override;
// MidiDriver_BASE interface
virtual void send(uint32 b);
void send(uint32 b) override;
private:

View File

@ -43,8 +43,8 @@ public:
void play(Common::SeekableReadStream *stream);
void pause(bool p);
virtual void pause() { assert(0); } // overridden
virtual void onTimer();
void pause() override { assert(0); } // overridden
void onTimer() override;
private:
bool _paused;