Some API comment fixes, and renamed FBSurface::update() to render(),

to more clearly indicate its intent.  It looks like
FBSurface::drawSurface() is essentially the same thing, and will
probably be removed.

Fixed header issue in OSX code, that wasn't detected until moving
to Xcode 5.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2881 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2014-05-02 15:58:57 +00:00
parent 3914b15e9b
commit bf283001ee
11 changed files with 28 additions and 26 deletions

View File

@ -129,7 +129,7 @@ void FBSurfaceSDL2::translateCoords(Int32& x, Int32& y) const
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurfaceSDL2::update()
void FBSurfaceSDL2::render()
{
if(mySurfaceIsDirty)
{

View File

@ -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();

View File

@ -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

View File

@ -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();

View File

@ -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();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -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
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -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

View File

@ -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();
}
}

View File

@ -595,5 +595,5 @@ void ContextMenu::drawDialog()
}
// Commit surface changes to screen
s.update();
s.render();
}

View File

@ -315,7 +315,7 @@ void Dialog::drawDialog()
}
// Commit surface changes to screen
s.update();
s.render();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -18,7 +18,7 @@
//============================================================================
#ifndef SETTINGS_MAC_OSX_HXX
#define SETTINGS_MAX_OSX_HXX
#define SETTINGS_MAC_OSX_HXX
class OSystem;