Skip to content

Commit

Permalink
ZVISION: Introduce pixel formats for resources (555) and screen (565)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegr committed Dec 24, 2014
1 parent de2c9ed commit 1bc9b13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions engines/zvision/zvision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ ZVision::ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc)
: Engine(syst),
_gameDescription(gameDesc),
_pixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0), /*RGB 565*/
_resourcePixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0), /* RGB 555 */
_screenPixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0), /* RGB 565 */
_desiredFrameTime(33), /* ~30 fps */
_clock(_system),
_scriptManager(nullptr),
Expand Down Expand Up @@ -182,17 +184,17 @@ void ZVision::initialize() {
} else if (_gameDescription->gameId == GID_NEMESIS)
_searchManager->loadZix("NEMESIS.ZIX");

initGraphics(WINDOW_WIDTH, WINDOW_HEIGHT, true, &_pixelFormat);
initGraphics(WINDOW_WIDTH, WINDOW_HEIGHT, true, &_screenPixelFormat);

// Register random source
_rnd = new Common::RandomSource("zvision");

// Create managers
_scriptManager = new ScriptManager(this);
_renderManager = new RenderManager(this, WINDOW_WIDTH, WINDOW_HEIGHT, _workingWindow, _pixelFormat);
_renderManager = new RenderManager(this, WINDOW_WIDTH, WINDOW_HEIGHT, _workingWindow, _screenPixelFormat);
_saveManager = new SaveManager(this);
_stringManager = new StringManager(this);
_cursorManager = new CursorManager(this, &_pixelFormat);
_cursorManager = new CursorManager(this, &_screenPixelFormat);
_textRenderer = new TextRenderer(this);
_midiManager = new MidiManager();

Expand Down
2 changes: 2 additions & 0 deletions engines/zvision/zvision.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ class ZVision : public Engine {
*/
Common::Rect _workingWindow;
const Graphics::PixelFormat _pixelFormat;
const Graphics::PixelFormat _resourcePixelFormat;
const Graphics::PixelFormat _screenPixelFormat;

private:
enum {
Expand Down

0 comments on commit 1bc9b13

Please sign in to comment.