2022-10-02 12:19:01 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2023-11-18 21:11:52 +00:00
|
|
|
#ifndef IMAGE_NEO_H
|
|
|
|
#define IMAGE_NEO_H
|
2022-10-02 12:19:01 +00:00
|
|
|
|
|
|
|
#include "image/image_decoder.h"
|
|
|
|
|
2023-11-18 21:11:52 +00:00
|
|
|
/**
|
|
|
|
* @defgroup image_neo Neochrome decoder
|
|
|
|
* @ingroup image
|
|
|
|
*
|
|
|
|
* @brief Atari-ST Neochrome decoder based on NEOLoad by Jason "Joefish" Railton
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Used in engines:
|
|
|
|
* - Freescape
|
|
|
|
* @{
|
|
|
|
*/
|
2022-10-02 12:19:01 +00:00
|
|
|
|
2022-10-26 19:57:23 +00:00
|
|
|
namespace Common {
|
2022-10-02 12:19:01 +00:00
|
|
|
class SeekableReadStream;
|
|
|
|
}
|
|
|
|
|
2023-11-18 21:11:52 +00:00
|
|
|
namespace Image {
|
2022-10-02 12:19:01 +00:00
|
|
|
|
2022-11-06 20:04:40 +00:00
|
|
|
class NeoDecoder : public Image::ImageDecoder {
|
2022-10-02 12:19:01 +00:00
|
|
|
public:
|
2022-10-02 20:46:59 +00:00
|
|
|
NeoDecoder(byte *palette = nullptr);
|
2022-10-02 12:19:01 +00:00
|
|
|
virtual ~NeoDecoder();
|
|
|
|
|
|
|
|
// ImageDecoder API
|
|
|
|
void destroy();
|
|
|
|
virtual bool loadStream(Common::SeekableReadStream &stream);
|
|
|
|
virtual const Graphics::Surface *getSurface() const { return _surface; }
|
|
|
|
const byte *getPalette() const { return _palette; }
|
|
|
|
uint16 getPaletteColorCount() const { return _paletteColorCount; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
Graphics::Surface *_surface;
|
2022-10-02 20:46:59 +00:00
|
|
|
bool _paletteDestroy;
|
2022-10-02 12:19:01 +00:00
|
|
|
byte *_palette;
|
|
|
|
uint16 _paletteColorCount;
|
|
|
|
};
|
2023-11-18 21:11:52 +00:00
|
|
|
} // End of namespace Image
|
2022-10-02 12:19:01 +00:00
|
|
|
|
2023-11-18 21:11:52 +00:00
|
|
|
#endif // IMAGE_NEO_H
|