openMSX
Renderer.hh
Go to the documentation of this file.
1 #ifndef RENDERER_HH
2 #define RENDERER_HH
3 
4 #include "VRAMObserver.hh"
5 #include "openmsx.hh"
6 #include <cstdint>
7 
8 namespace openmsx {
9 
10 class PostProcessor;
11 class DisplayMode;
12 class RawFrame;
13 
22 class Renderer : public VRAMObserver
23 {
24 public:
25  virtual ~Renderer() = default;
26 
28  virtual PostProcessor* getPostProcessor() const = 0;
29 
32  virtual void reInit() = 0;
33 
39  virtual void frameStart(EmuTime::param time) = 0;
40 
45  virtual void frameEnd(EmuTime::param time) = 0;
46 
51  virtual void updateTransparency(bool enabled, EmuTime::param time) = 0;
52 
57  virtual void updateSuperimposing(const RawFrame* videoSource,
58  EmuTime::param time) = 0;
59 
64  virtual void updateForegroundColor(int color, EmuTime::param time) = 0;
65 
70  virtual void updateBackgroundColor(int color, EmuTime::param time) = 0;
71 
76  virtual void updateBlinkForegroundColor(int color, EmuTime::param time) = 0;
77 
82  virtual void updateBlinkBackgroundColor(int color, EmuTime::param time) = 0;
83 
88  virtual void updateBlinkState(bool enabled, EmuTime::param time) = 0;
89 
97  virtual void updatePalette(int index, int grb, EmuTime::param time) = 0;
98 
103  virtual void updateVerticalScroll(int scroll, EmuTime::param time) = 0;
104 
110  virtual void updateHorizontalScrollLow(byte scroll, EmuTime::param time) = 0;
111 
117  virtual void updateHorizontalScrollHigh(byte scroll, EmuTime::param time) = 0;
118 
124  virtual void updateBorderMask(bool masked, EmuTime::param time) = 0;
125 
131  virtual void updateMultiPage(bool multiPage, EmuTime::param time) = 0;
132 
140  virtual void updateHorizontalAdjust(int adjust, EmuTime::param time) = 0;
141 
148  virtual void updateDisplayEnabled(bool enabled, EmuTime::param time) = 0;
149 
154  virtual void updateDisplayMode(DisplayMode mode, EmuTime::param time) = 0;
155 
160  virtual void updateNameBase(int addr, EmuTime::param time) = 0;
161 
166  virtual void updatePatternBase(int addr, EmuTime::param time) = 0;
167 
172  virtual void updateColorBase(int addr, EmuTime::param time) = 0;
173 
178  virtual void updateSpritesEnabled(bool enabled, EmuTime::param time) = 0;
179 
184  static const uint16_t GRAPHIC7_SPRITE_PALETTE[16];
185 
186 protected:
187  Renderer() = default;
188 };
189 
190 } // namespace openmsx
191 
192 #endif
openmsx.hh
openmsx::Renderer::getPostProcessor
virtual PostProcessor * getPostProcessor() const =0
See VDP::getPostProcessor.
openmsx::Renderer::updateBlinkState
virtual void updateBlinkState(bool enabled, EmuTime::param time)=0
Informs the renderer of a VDP blinking state change.
openmsx::Renderer::frameEnd
virtual void frameEnd(EmuTime::param time)=0
Signals the end of a frame.
openmsx::Renderer::updateSuperimposing
virtual void updateSuperimposing(const RawFrame *videoSource, EmuTime::param time)=0
Informs the renderer of a VDP superimposing change.
openmsx::Renderer::updateMultiPage
virtual void updateMultiPage(bool multiPage, EmuTime::param time)=0
Informs the renderer of a horizontal scroll change: the multi page setting has changed.
openmsx::Renderer::updateColorBase
virtual void updateColorBase(int addr, EmuTime::param time)=0
Informs the renderer of a color table base address change.
openmsx::Renderer::updateHorizontalScrollLow
virtual void updateHorizontalScrollLow(byte scroll, EmuTime::param time)=0
Informs the renderer of a horizontal scroll change: the lower scroll value has changed.
openmsx::Renderer::Renderer
Renderer()=default
openmsx::Renderer::frameStart
virtual void frameStart(EmuTime::param time)=0
Signals the start of a new frame.
openmsx::Renderer::updateForegroundColor
virtual void updateForegroundColor(int color, EmuTime::param time)=0
Informs the renderer of a VDP foreground color change.
openmsx::Renderer::reInit
virtual void reInit()=0
Reinitialise Renderer state.
openmsx::Renderer::updateSpritesEnabled
virtual void updateSpritesEnabled(bool enabled, EmuTime::param time)=0
Informs the renderer of a VDP sprites enabled change.
openmsx::Renderer
Abstract base class for Renderers.
Definition: Renderer.hh:23
openmsx::Renderer::updateDisplayEnabled
virtual void updateDisplayEnabled(bool enabled, EmuTime::param time)=0
Informs the renderer of a VDP display enabled change.
openmsx::Renderer::updateBorderMask
virtual void updateBorderMask(bool masked, EmuTime::param time)=0
Informs the renderer of a horizontal scroll change: the border mask has been enabled/disabled.
openmsx::DisplayMode
Represents a VDP display mode.
Definition: DisplayMode.hh:16
openmsx::VRAMObserver
Interface that can be registered at VRAMWindow, to be called when the contents of the VRAM inside tha...
Definition: VRAMObserver.hh:11
openmsx::Renderer::updateDisplayMode
virtual void updateDisplayMode(DisplayMode mode, EmuTime::param time)=0
Informs the renderer of a VDP display mode change.
openmsx::Renderer::~Renderer
virtual ~Renderer()=default
openmsx::Renderer::updateBlinkForegroundColor
virtual void updateBlinkForegroundColor(int color, EmuTime::param time)=0
Informs the renderer of a VDP blink foreground color change.
openmsx::Renderer::updateTransparency
virtual void updateTransparency(bool enabled, EmuTime::param time)=0
Informs the renderer of a VDP transparency enable/disable change.
openmsx::Renderer::updateNameBase
virtual void updateNameBase(int addr, EmuTime::param time)=0
Informs the renderer of a name table base address change.
openmsx::PostProcessor
Abstract base class for post processors.
Definition: PostProcessor.hh:30
openmsx::Renderer::updateBackgroundColor
virtual void updateBackgroundColor(int color, EmuTime::param time)=0
Informs the renderer of a VDP background color change.
openmsx::Renderer::updatePalette
virtual void updatePalette(int index, int grb, EmuTime::param time)=0
Informs the renderer of a VDP palette change.
openmsx::Renderer::updateHorizontalScrollHigh
virtual void updateHorizontalScrollHigh(byte scroll, EmuTime::param time)=0
Informs the renderer of a horizontal scroll change: the higher scroll value has changed.
openmsx::RawFrame
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:26
openmsx::Renderer::updateHorizontalAdjust
virtual void updateHorizontalAdjust(int adjust, EmuTime::param time)=0
Informs the renderer of a horizontal adjust change.
openmsx::Renderer::GRAPHIC7_SPRITE_PALETTE
static const uint16_t GRAPHIC7_SPRITE_PALETTE[16]
Sprite palette in Graphic 7 mode.
Definition: Renderer.hh:184
openmsx::Renderer::updatePatternBase
virtual void updatePatternBase(int addr, EmuTime::param time)=0
Informs the renderer of a pattern table base address change.
openmsx::Renderer::updateBlinkBackgroundColor
virtual void updateBlinkBackgroundColor(int color, EmuTime::param time)=0
Informs the renderer of a VDP blink background color change.
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
VRAMObserver.hh
openmsx::Renderer::updateVerticalScroll
virtual void updateVerticalScroll(int scroll, EmuTime::param time)=0
Informs the renderer of a vertical scroll change.