mirror of https://github.com/stella-emu/stella.git
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:
parent
3914b15e9b
commit
bf283001ee
|
@ -129,7 +129,7 @@ void FBSurfaceSDL2::translateCoords(Int32& x, Int32& y) const
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceSDL2::update()
|
||||
void FBSurfaceSDL2::render()
|
||||
{
|
||||
if(mySurfaceIsDirty)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -595,5 +595,5 @@ void ContextMenu::drawDialog()
|
|||
}
|
||||
|
||||
// Commit surface changes to screen
|
||||
s.update();
|
||||
s.render();
|
||||
}
|
||||
|
|
|
@ -315,7 +315,7 @@ void Dialog::drawDialog()
|
|||
}
|
||||
|
||||
// Commit surface changes to screen
|
||||
s.update();
|
||||
s.render();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
//============================================================================
|
||||
|
||||
#ifndef SETTINGS_MAC_OSX_HXX
|
||||
#define SETTINGS_MAX_OSX_HXX
|
||||
#define SETTINGS_MAC_OSX_HXX
|
||||
|
||||
class OSystem;
|
||||
|
||||
|
|
Loading…
Reference in New Issue