diff --git a/src/common/FBSurfaceSDL2.cxx b/src/common/FBSurfaceSDL2.cxx index ec1046693..b7b8f5d60 100644 --- a/src/common/FBSurfaceSDL2.cxx +++ b/src/common/FBSurfaceSDL2.cxx @@ -129,7 +129,7 @@ void FBSurfaceSDL2::translateCoords(Int32& x, Int32& y) const } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void FBSurfaceSDL2::update() +void FBSurfaceSDL2::render() { if(mySurfaceIsDirty) { diff --git a/src/common/FBSurfaceSDL2.hxx b/src/common/FBSurfaceSDL2.hxx index f3aad72fd..28c45bf23 100644 --- a/src/common/FBSurfaceSDL2.hxx +++ b/src/common/FBSurfaceSDL2.hxx @@ -24,8 +24,9 @@ #include "FrameBufferSDL2.hxx" /** - A surface suitable for SDL Render2D API, used for various UI dialogs. - This class extends FrameBuffer::FBSurface. + A surface suitable for SDL Render2D API, making use of hardware + acceleration behind the scenes. This class extends + FrameBuffer::FBSurface. @author Stephen Anthony */ @@ -37,9 +38,8 @@ class FBSurfaceSDL2 : public FBSurface FBSurfaceSDL2(FrameBufferSDL2& buffer, uInt32 width, uInt32 height); virtual ~FBSurfaceSDL2(); - // Normal surfaces need all drawing primitives - // Only some of them use SDL-specific code; the rest are defined - // in the parent FBSurface class + // Most of the surface drawing primitives are defined in FBSurface; + // the ones defined here use SDL-specific code // void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, uInt32 color); void drawSurface(const FBSurface* surface, uInt32 x, uInt32 y); @@ -51,7 +51,7 @@ class FBSurfaceSDL2 : public FBSurface void setWidth(uInt32 w); void setHeight(uInt32 h); void translateCoords(Int32& x, Int32& y) const; - void update(); + void render(); void invalidate(); void free(); void reload(); diff --git a/src/common/FBSurfaceTIA.cxx b/src/common/FBSurfaceTIA.cxx index ce893937d..1b59eb89e 100644 --- a/src/common/FBSurfaceTIA.cxx +++ b/src/common/FBSurfaceTIA.cxx @@ -89,7 +89,7 @@ void FBSurfaceTIA::translateCoords(Int32& x, Int32& y) const } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void FBSurfaceTIA::update() +void FBSurfaceTIA::render() { // Copy the mediasource framebuffer to the RGB texture // In hardware rendering mode, it's faster to just assume that the screen diff --git a/src/common/FBSurfaceTIA.hxx b/src/common/FBSurfaceTIA.hxx index f3ac3dfb2..cf66af468 100644 --- a/src/common/FBSurfaceTIA.hxx +++ b/src/common/FBSurfaceTIA.hxx @@ -46,7 +46,7 @@ class FBSurfaceTIA : public FBSurface uInt32 getWidth() const { return mySrcR.w; } uInt32 getHeight() const { return mySrcR.h; } void translateCoords(Int32& x, Int32& y) const; - void update(); + void render(); void invalidate(); void free(); void reload(); diff --git a/src/common/FrameBufferSDL2.cxx b/src/common/FrameBufferSDL2.cxx index 8336c346e..ec7d4a829 100644 --- a/src/common/FrameBufferSDL2.cxx +++ b/src/common/FrameBufferSDL2.cxx @@ -257,7 +257,7 @@ bool FrameBufferSDL2::fullScreen() const void FrameBufferSDL2::drawTIA(bool fullRedraw) { // The TIA surface takes all responsibility for drawing - myTiaSurface->update(); + myTiaSurface->render(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/FBSurface.cxx b/src/emucore/FBSurface.cxx index 9d7d876bb..ad223f94d 100644 --- a/src/emucore/FBSurface.cxx +++ b/src/emucore/FBSurface.cxx @@ -26,6 +26,8 @@ FBSurface::FBSurface(const uInt32* palette) myPitch(0), myPalette(palette) { + // NOTE: myPixels and myPitch will be set in child classes that inherit + // from this class } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/FBSurface.hxx b/src/emucore/FBSurface.hxx index 9bae57dee..6e36e8539 100644 --- a/src/emucore/FBSurface.hxx +++ b/src/emucore/FBSurface.hxx @@ -64,20 +64,20 @@ class FBSurface /** This method should be called to draw a horizontal line. - @param x The first x coordinate - @param y The y coordinate - @param x2 The second x coordinate - @param color The color of the line + @param x The first x coordinate + @param y The y coordinate + @param x2 The second x coordinate + @param color The color of the line */ virtual void hLine(uInt32 x, uInt32 y, uInt32 x2, uInt32 color); /** This method should be called to draw a vertical line. - @param x The x coordinate - @param y The first y coordinate - @param y2 The second y coordinate - @param color The color of the line + @param x The x coordinate + @param y The first y coordinate + @param y2 The second y coordinate + @param color The color of the line */ virtual void vLine(uInt32 x, uInt32 y, uInt32 y2, uInt32 color); @@ -88,7 +88,7 @@ class FBSurface @param y The y coordinate @param w The width of the area @param h The height of the area - @param color + @param color The fill color of the rectangle */ virtual void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, uInt32 color) { } @@ -111,7 +111,7 @@ class FBSurface @param bitmap The data to draw @param x The x coordinate @param y The y coordinate - @param color The color of the character + @param color The color of the bitmap @param h The height of the data image */ virtual void drawBitmap(uInt32* bitmap, uInt32 x, uInt32 y, uInt32 color, @@ -187,7 +187,7 @@ class FBSurface /** This method should be called to draw the surface to the screen. */ - virtual void update() { } + virtual void render() { } /** This method should be called to reset the surface to empty diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index 24b86d216..ac653cbae 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -298,7 +298,7 @@ void FrameBuffer::update() info.BankSwitch, 1, 15, myStatsMsg.w, myStatsMsg.color, kTextAlignLeft); myStatsMsg.surface->addDirtyRect(0, 0, 0, 0); // force a full draw myStatsMsg.surface->setPos(myImageRect.x() + 1, myImageRect.y() + 1); - myStatsMsg.surface->update(); + myStatsMsg.surface->render(); } break; // S_EMULATE } @@ -499,7 +499,7 @@ inline void FrameBuffer::drawMessage() else { myMsg.surface->addDirtyRect(0, 0, 0, 0); - myMsg.surface->update(); + myMsg.surface->render(); } } diff --git a/src/gui/ContextMenu.cxx b/src/gui/ContextMenu.cxx index 9b323bca7..ada05a8aa 100644 --- a/src/gui/ContextMenu.cxx +++ b/src/gui/ContextMenu.cxx @@ -595,5 +595,5 @@ void ContextMenu::drawDialog() } // Commit surface changes to screen - s.update(); + s.render(); } diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index b0c13d923..d1ff1db72 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -315,7 +315,7 @@ void Dialog::drawDialog() } // Commit surface changes to screen - s.update(); + s.render(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/macosx/SettingsMACOSX.hxx b/src/macosx/SettingsMACOSX.hxx index 8f3e9b6a1..3448c3006 100644 --- a/src/macosx/SettingsMACOSX.hxx +++ b/src/macosx/SettingsMACOSX.hxx @@ -18,7 +18,7 @@ //============================================================================ #ifndef SETTINGS_MAC_OSX_HXX -#define SETTINGS_MAX_OSX_HXX +#define SETTINGS_MAC_OSX_HXX class OSystem;