SUPERNOVA: Renames MSNImageDecoder to MSNImage

This commit is contained in:
Joseph-Eugene Winzer 2018-03-23 02:16:01 +01:00 committed by Thierry Crozat
parent b2dc8d5424
commit d963827dbb
5 changed files with 13 additions and 13 deletions

View File

@ -34,7 +34,7 @@
namespace Supernova {
MSNImageDecoder::MSNImageDecoder() {
MSNImage::MSNImage() {
_palette = nullptr;
_encodedImage = nullptr;
_filenumber = -1;
@ -43,11 +43,11 @@ MSNImageDecoder::MSNImageDecoder() {
_numClickFields = 0;
}
MSNImageDecoder::~MSNImageDecoder() {
MSNImage::~MSNImage() {
destroy();
}
bool MSNImageDecoder::init(int filenumber) {
bool MSNImage::init(int filenumber) {
Common::File file;
if (!file.open(Common::String::format("msn_data.%03d", filenumber))) {
warning("Image data file msn_data.%03d could not be read!", filenumber);
@ -60,7 +60,7 @@ bool MSNImageDecoder::init(int filenumber) {
return true;
}
bool MSNImageDecoder::loadFromEngineDataFile() {
bool MSNImage::loadFromEngineDataFile() {
Common::String name;
if (_filenumber == 1)
name = "IMG1";
@ -102,7 +102,7 @@ bool MSNImageDecoder::loadFromEngineDataFile() {
return false;
}
bool MSNImageDecoder::loadStream(Common::SeekableReadStream &stream) {
bool MSNImage::loadStream(Common::SeekableReadStream &stream) {
destroy();
uint size = 0;
@ -199,7 +199,7 @@ bool MSNImageDecoder::loadStream(Common::SeekableReadStream &stream) {
return true;
}
bool MSNImageDecoder::loadSections() {
bool MSNImage::loadSections() {
bool isNewspaper = _filenumber == 1 || _filenumber == 2;
int imageWidth = isNewspaper ? 640 : 320;
int imageHeight = isNewspaper ? 480 : 200;
@ -238,7 +238,7 @@ bool MSNImageDecoder::loadSections() {
return true;
}
void MSNImageDecoder::destroy() {
void MSNImage::destroy() {
if (_palette) {
delete[] _palette;
_palette = NULL;

View File

@ -36,10 +36,10 @@ struct Surface;
namespace Supernova {
class MSNImageDecoder : public Image::ImageDecoder {
class MSNImage : public Image::ImageDecoder {
public:
MSNImageDecoder();
virtual ~MSNImageDecoder();
MSNImage();
virtual ~MSNImage();
virtual void destroy();
virtual bool loadStream(Common::SeekableReadStream &stream);

View File

@ -741,7 +741,7 @@ void GameManager::processInput() {
(field == -1) && i < kMaxObject; i++) {
click = _currentRoom->getObject(i)->_click;
if (click != 255 && _vm->_currentImage) {
MSNImageDecoder::ClickField *clickField = _vm->_currentImage->_clickField;
MSNImage::ClickField *clickField = _vm->_currentImage->_clickField;
do {
if ((_mouseX >= clickField[click].x1) && (_mouseX <= clickField[click].x2) &&
(_mouseY >= clickField[click].y1) && (_mouseY <= clickField[click].y2))

View File

@ -312,7 +312,7 @@ bool SupernovaEngine::setCurrentImage(int filenumber) {
return true;
delete _currentImage;
_currentImage = new MSNImageDecoder();
_currentImage = new MSNImage();
if (!_currentImage->init(filenumber)) {
delete _currentImage;
_currentImage = NULL;

View File

@ -94,7 +94,7 @@ public:
Sound *_sound;
ResourceManager *_resMan;
ScreenBufferStack _screenBuffer;
MSNImageDecoder *_currentImage;
MSNImage *_currentImage;
int _screenWidth;
int _screenHeight;
bool _allowLoadGame;