mirror of https://github.com/stella-emu/stella.git
Rearranged some code and restructured some classes, cleaning up the
interfaces and hopefully shortening recompile times (a lot of headers are no longer unnecessarily pulled in). Added an abstraction around SDL_Surfaces (GUI::Surface class) to reduce dependencies on SDL to the core code. Software mode now has some support for showing snapshots in RomInfoWidget. Currently, it's restricted to 16-bit mode, and doesn't yet scale the images vertically. Have I ever mentioned how much I hate software rendering :( git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1364 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
352954e633
commit
16956287ed
|
@ -13,9 +13,10 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: BankRomCheat.cxx,v 1.3 2007-01-01 18:04:39 stephena Exp $
|
// $Id: BankRomCheat.cxx,v 1.4 2007-09-03 18:37:19 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
#include "Console.hxx"
|
||||||
#include "BankRomCheat.hxx"
|
#include "BankRomCheat.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: CheatCodeDialog.cxx,v 1.15 2007-08-17 16:12:50 stephena Exp $
|
// $Id: CheatCodeDialog.cxx,v 1.16 2007-09-03 18:37:19 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -21,20 +21,19 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "Props.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "DialogContainer.hxx"
|
|
||||||
#include "CheatCodeDialog.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "CheckListWidget.hxx"
|
|
||||||
#include "CheatManager.hxx"
|
|
||||||
#include "InputTextDialog.hxx"
|
|
||||||
#include "StringList.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "CheatManager.hxx"
|
||||||
|
#include "CheckListWidget.hxx"
|
||||||
|
#include "DialogContainer.hxx"
|
||||||
|
#include "Dialog.hxx"
|
||||||
|
#include "InputTextDialog.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "Props.hxx"
|
||||||
|
#include "StringList.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
|
#include "CheatCodeDialog.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CheatCodeDialog::CheatCodeDialog(OSystem* osystem, DialogContainer* parent,
|
CheatCodeDialog::CheatCodeDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
|
|
@ -13,13 +13,15 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: CheatManager.cxx,v 1.14 2007-07-19 16:21:39 stephena Exp $
|
// $Id: CheatManager.cxx,v 1.15 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
|
#include "Console.hxx"
|
||||||
#include "Cheat.hxx"
|
#include "Cheat.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
#include "CheetahCheat.hxx"
|
#include "CheetahCheat.hxx"
|
||||||
#include "BankRomCheat.hxx"
|
#include "BankRomCheat.hxx"
|
||||||
#include "RamCheat.hxx"
|
#include "RamCheat.hxx"
|
||||||
|
|
|
@ -13,9 +13,10 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: CheetahCheat.cxx,v 1.3 2007-01-01 18:04:39 stephena Exp $
|
// $Id: CheetahCheat.cxx,v 1.4 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
#include "Console.hxx"
|
||||||
#include "CheetahCheat.hxx"
|
#include "CheetahCheat.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,9 +13,10 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: RamCheat.cxx,v 1.4 2007-01-01 18:04:39 stephena Exp $
|
// $Id: RamCheat.cxx,v 1.5 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
#include "Console.hxx"
|
||||||
#include "System.hxx"
|
#include "System.hxx"
|
||||||
#include "CheatManager.hxx"
|
#include "CheatManager.hxx"
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferGL.cxx,v 1.89 2007-09-01 23:31:18 stephena Exp $
|
// $Id: FrameBufferGL.cxx,v 1.90 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifdef DISPLAY_OPENGL
|
#ifdef DISPLAY_OPENGL
|
||||||
|
@ -22,14 +22,16 @@
|
||||||
#include <SDL_syswm.h>
|
#include <SDL_syswm.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
#include "Console.hxx"
|
#include "Console.hxx"
|
||||||
#include "FrameBuffer.hxx"
|
|
||||||
#include "FrameBufferGL.hxx"
|
|
||||||
#include "MediaSrc.hxx"
|
|
||||||
#include "Settings.hxx"
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "Font.hxx"
|
#include "Font.hxx"
|
||||||
#include "GuiUtils.hxx"
|
#include "MediaSrc.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
#include "Surface.hxx"
|
||||||
|
|
||||||
|
#include "FrameBufferGL.hxx"
|
||||||
|
|
||||||
// There's probably a cleaner way of doing this
|
// There's probably a cleaner way of doing this
|
||||||
// These values come from SDL_video.c
|
// These values come from SDL_video.c
|
||||||
|
@ -219,7 +221,7 @@ bool FrameBufferGL::initSubsystem(VideoMode mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
string FrameBufferGL::about()
|
string FrameBufferGL::about() const
|
||||||
{
|
{
|
||||||
string extensions;
|
string extensions;
|
||||||
if(myHaveTexRectEXT) extensions += "GL_TEXTURE_RECTANGLE_ARB ";
|
if(myHaveTexRectEXT) extensions += "GL_TEXTURE_RECTANGLE_ARB ";
|
||||||
|
@ -454,7 +456,7 @@ void FrameBufferGL::postFrameUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FrameBufferGL::scanline(uInt32 row, uInt8* data)
|
void FrameBufferGL::scanline(uInt32 row, uInt8* data) const
|
||||||
{
|
{
|
||||||
// Invert the row, since OpenGL rows start at the bottom
|
// Invert the row, since OpenGL rows start at the bottom
|
||||||
// of the framebuffer
|
// of the framebuffer
|
||||||
|
@ -515,8 +517,7 @@ void FrameBufferGL::vLine(uInt32 x, uInt32 y, uInt32 y2, int color)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FrameBufferGL::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
|
void FrameBufferGL::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, int color)
|
||||||
int color)
|
|
||||||
{
|
{
|
||||||
// Fill the rectangle
|
// Fill the rectangle
|
||||||
SDL_Rect tmp;
|
SDL_Rect tmp;
|
||||||
|
@ -578,28 +579,30 @@ void FrameBufferGL::drawBitmap(uInt32* bitmap, Int32 tx, Int32 ty,
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FrameBufferGL::drawSurface(SDL_Surface* surface, Int32 x, Int32 y)
|
void FrameBufferGL::drawSurface(const GUI::Surface* surface, Int32 x, Int32 y)
|
||||||
{
|
{
|
||||||
SDL_Rect clip;
|
SDL_Rect clip;
|
||||||
clip.x = x;
|
clip.x = x;
|
||||||
clip.y = y;
|
clip.y = y;
|
||||||
|
|
||||||
SDL_BlitSurface(surface, 0, myTexture, &clip);
|
SDL_BlitSurface(surface->myData, 0, myTexture, &clip);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FrameBufferGL::convertToSurface(SDL_Surface* surface, int row,
|
void FrameBufferGL::bytesToSurface(GUI::Surface* surface, int row,
|
||||||
uInt8* data, int rowsize) const
|
uInt8* data) const
|
||||||
{
|
{
|
||||||
uInt16* pixels = (uInt16*) surface->pixels;
|
SDL_Surface* s = surface->myData;
|
||||||
pixels += (row * surface->pitch/2);
|
uInt16* pixels = (uInt16*) s->pixels;
|
||||||
|
pixels += (row * s->pitch/2);
|
||||||
|
|
||||||
|
int rowsize = surface->getWidth() * 3;
|
||||||
for(int c = 0; c < rowsize; c += 3)
|
for(int c = 0; c < rowsize; c += 3)
|
||||||
*pixels++ = SDL_MapRGB(surface->format, data[c], data[c+1], data[c+2]);
|
*pixels++ = SDL_MapRGB(s->format, data[c], data[c+1], data[c+2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FrameBufferGL::translateCoords(Int32& x, Int32& y)
|
void FrameBufferGL::translateCoords(Int32& x, Int32& y) const
|
||||||
{
|
{
|
||||||
// Wow, what a mess :)
|
// Wow, what a mess :)
|
||||||
x = (Int32) ((x - myImageDim.x) / myWidthScaleFactor);
|
x = (Int32) ((x - myImageDim.x) / myWidthScaleFactor);
|
||||||
|
@ -722,14 +725,14 @@ bool FrameBufferGL::createTextures()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
SDL_Surface* FrameBufferGL::cloneSurface(int width, int height)
|
GUI::Surface* FrameBufferGL::createSurface(int width, int height) const
|
||||||
{
|
{
|
||||||
SDL_PixelFormat* fmt = myTexture->format;
|
SDL_PixelFormat* fmt = myTexture->format;
|
||||||
SDL_Surface* surface =
|
SDL_Surface* data =
|
||||||
SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 16,
|
SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 16,
|
||||||
fmt->Rmask, fmt->Gmask, fmt->Bmask, fmt->Amask);
|
fmt->Rmask, fmt->Gmask, fmt->Bmask, fmt->Amask);
|
||||||
|
|
||||||
return surface;
|
return data ? new GUI::Surface(width, height, data) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferGL.hxx,v 1.46 2007-09-01 23:31:18 stephena Exp $
|
// $Id: FrameBufferGL.hxx,v 1.47 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef FRAMEBUFFER_GL_HXX
|
#ifndef FRAMEBUFFER_GL_HXX
|
||||||
|
@ -29,14 +29,13 @@ class OSystem;
|
||||||
class GUI::Font;
|
class GUI::Font;
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "FrameBuffer.hxx"
|
#include "FrameBuffer.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This class implements an SDL OpenGL framebuffer.
|
This class implements an SDL OpenGL framebuffer.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: FrameBufferGL.hxx,v 1.46 2007-09-01 23:31:18 stephena Exp $
|
@version $Id: FrameBufferGL.hxx,v 1.47 2007-09-03 18:37:22 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class FrameBufferGL : public FrameBuffer
|
class FrameBufferGL : public FrameBuffer
|
||||||
{
|
{
|
||||||
|
@ -67,46 +66,46 @@ class FrameBufferGL : public FrameBuffer
|
||||||
This method is called to initialize OpenGL video mode.
|
This method is called to initialize OpenGL video mode.
|
||||||
Return false if any operation fails, otherwise return true.
|
Return false if any operation fails, otherwise return true.
|
||||||
*/
|
*/
|
||||||
virtual bool initSubsystem(VideoMode mode);
|
bool initSubsystem(VideoMode mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to query the type of the FrameBuffer.
|
This method is called to query the type of the FrameBuffer.
|
||||||
*/
|
*/
|
||||||
virtual BufferType type() { return kGLBuffer; }
|
BufferType type() const { return kGLBuffer; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to provide information about the FrameBuffer.
|
This method is called to provide information about the FrameBuffer.
|
||||||
*/
|
*/
|
||||||
virtual string about();
|
string about() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to change to the given video mode.
|
This method is called to change to the given video mode.
|
||||||
|
|
||||||
@param mode The mode to use for rendering the mediasource
|
@param mode The mode to use for rendering the mediasource
|
||||||
*/
|
*/
|
||||||
virtual bool setVidMode(VideoMode mode);
|
bool setVidMode(VideoMode mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Switches between the two filtering options in OpenGL.
|
Switches between the two filtering options in OpenGL.
|
||||||
Currently, these are GL_NEAREST and GL_LINEAR.
|
Currently, these are GL_NEAREST and GL_LINEAR.
|
||||||
*/
|
*/
|
||||||
virtual void toggleFilter();
|
void toggleFilter();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called anytime the MediaSource needs to be redrawn
|
This method should be called anytime the MediaSource needs to be redrawn
|
||||||
to the screen.
|
to the screen.
|
||||||
*/
|
*/
|
||||||
virtual void drawMediaSource();
|
void drawMediaSource();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called before any drawing is done (per-frame).
|
This method is called before any drawing is done (per-frame).
|
||||||
*/
|
*/
|
||||||
virtual void preFrameUpdate();
|
void preFrameUpdate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called after any drawing is done (per-frame).
|
This method is called after any drawing is done (per-frame).
|
||||||
*/
|
*/
|
||||||
virtual void postFrameUpdate();
|
void postFrameUpdate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to get the specified scanline data.
|
This method is called to get the specified scanline data.
|
||||||
|
@ -114,7 +113,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param row The row we are looking for
|
@param row The row we are looking for
|
||||||
@param data The actual pixel data (in bytes)
|
@param data The actual pixel data (in bytes)
|
||||||
*/
|
*/
|
||||||
virtual void scanline(uInt32 row, uInt8* data);
|
void scanline(uInt32 row, uInt8* data) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to map a given r,g,b triple to the screen palette.
|
This method is called to map a given r,g,b triple to the screen palette.
|
||||||
|
@ -123,7 +122,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param g The green component of the color.
|
@param g The green component of the color.
|
||||||
@param b The blue component of the color.
|
@param b The blue component of the color.
|
||||||
*/
|
*/
|
||||||
virtual Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b)
|
Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b) const
|
||||||
{ return SDL_MapRGB(myTexture->format, r, g, b); }
|
{ return SDL_MapRGB(myTexture->format, r, g, b); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -133,7 +132,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param width The requested width of the new surface.
|
@param width The requested width of the new surface.
|
||||||
@param height The requested height of the new surface.
|
@param height The requested height of the new surface.
|
||||||
*/
|
*/
|
||||||
virtual SDL_Surface* cloneSurface(int width, int height);
|
GUI::Surface* createSurface(int width, int height) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to draw a horizontal line.
|
This method is called to draw a horizontal line.
|
||||||
|
@ -143,7 +142,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param x2 The second x coordinate
|
@param x2 The second x coordinate
|
||||||
@param color The color of the line
|
@param color The color of the line
|
||||||
*/
|
*/
|
||||||
virtual void hLine(uInt32 x, uInt32 y, uInt32 x2, int color);
|
void hLine(uInt32 x, uInt32 y, uInt32 x2, int color);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to draw a vertical line.
|
This method is called to draw a vertical line.
|
||||||
|
@ -153,7 +152,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param y2 The second y coordinate
|
@param y2 The second y coordinate
|
||||||
@param color The color of the line
|
@param color The color of the line
|
||||||
*/
|
*/
|
||||||
virtual void vLine(uInt32 x, uInt32 y, uInt32 y2, int color);
|
void vLine(uInt32 x, uInt32 y, uInt32 y2, int color);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to draw a filled rectangle.
|
This method is called to draw a filled rectangle.
|
||||||
|
@ -164,8 +163,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param h The height of the area
|
@param h The height of the area
|
||||||
@param color The color of the area
|
@param color The color of the area
|
||||||
*/
|
*/
|
||||||
virtual void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
|
void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, int color);
|
||||||
int color);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to draw the specified character.
|
This method is called to draw the specified character.
|
||||||
|
@ -176,8 +174,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param y The y coordinate
|
@param y The y coordinate
|
||||||
@param color The color of the character
|
@param color The color of the character
|
||||||
*/
|
*/
|
||||||
virtual void drawChar(const GUI::Font* font, uInt8 c, uInt32 x, uInt32 y,
|
void drawChar(const GUI::Font* font, uInt8 c, uInt32 x, uInt32 y, int color);
|
||||||
int color);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to draw the bitmap image.
|
This method is called to draw the bitmap image.
|
||||||
|
@ -188,8 +185,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param color The color of the character
|
@param color The color of the character
|
||||||
@param h The height of the data image
|
@param h The height of the data image
|
||||||
*/
|
*/
|
||||||
virtual void drawBitmap(uInt32* bitmap, Int32 x, Int32 y, int color,
|
void drawBitmap(uInt32* bitmap, Int32 x, Int32 y, int color, Int32 h = 8);
|
||||||
Int32 h = 8);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called to draw an SDL surface.
|
This method should be called to draw an SDL surface.
|
||||||
|
@ -198,7 +194,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param x The x coordinate
|
@param x The x coordinate
|
||||||
@param y The y coordinate
|
@param y The y coordinate
|
||||||
*/
|
*/
|
||||||
virtual void drawSurface(SDL_Surface* surface, Int32 x, Int32 y);
|
void drawSurface(const GUI::Surface* surface, Int32 x, Int32 y);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called to convert and copy a given row of RGB
|
This method should be called to convert and copy a given row of RGB
|
||||||
|
@ -207,10 +203,8 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param surface The data to draw
|
@param surface The data to draw
|
||||||
@param row The row of the surface the data should be placed in
|
@param row The row of the surface the data should be placed in
|
||||||
@param data The data in uInt8 R/G/B format
|
@param data The data in uInt8 R/G/B format
|
||||||
@param rowsize The number of R/G/B triples in a data row
|
|
||||||
*/
|
*/
|
||||||
virtual void convertToSurface(SDL_Surface* surface, int row,
|
void bytesToSurface(GUI::Surface* surface, int row, uInt8* data) const;
|
||||||
uInt8* data, int rowsize) const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method translates the given coordinates to their
|
This method translates the given coordinates to their
|
||||||
|
@ -219,7 +213,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param x X coordinate to translate
|
@param x X coordinate to translate
|
||||||
@param y Y coordinate to translate
|
@param y Y coordinate to translate
|
||||||
*/
|
*/
|
||||||
inline virtual void translateCoords(Int32& x, Int32& y);
|
void translateCoords(Int32& x, Int32& y) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method adds a dirty rectangle
|
This method adds a dirty rectangle
|
||||||
|
@ -230,12 +224,12 @@ class FrameBufferGL : public FrameBuffer
|
||||||
@param w The width of the area
|
@param w The width of the area
|
||||||
@param h The height of the area
|
@param h The height of the area
|
||||||
*/
|
*/
|
||||||
virtual void addDirtyRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h);
|
void addDirtyRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Enable/disable phosphor effect.
|
Enable/disable phosphor effect.
|
||||||
*/
|
*/
|
||||||
virtual void enablePhosphor(bool enable, int blend);
|
void enablePhosphor(bool enable, int blend);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool createTextures();
|
bool createTextures();
|
||||||
|
|
|
@ -13,19 +13,22 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferSoft.cxx,v 1.72 2007-09-01 23:31:18 stephena Exp $
|
// $Id: FrameBufferSoft.cxx,v 1.73 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
#include "Console.hxx"
|
#include "Console.hxx"
|
||||||
#include "MediaSrc.hxx"
|
|
||||||
#include "Settings.hxx"
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "Font.hxx"
|
#include "Font.hxx"
|
||||||
#include "GuiUtils.hxx"
|
#include "MediaSrc.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
#include "RectList.hxx"
|
#include "RectList.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
#include "Surface.hxx"
|
||||||
|
|
||||||
#include "FrameBufferSoft.hxx"
|
#include "FrameBufferSoft.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -63,7 +66,7 @@ bool FrameBufferSoft::initSubsystem(VideoMode mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
string FrameBufferSoft::about()
|
string FrameBufferSoft::about() const
|
||||||
{
|
{
|
||||||
ostringstream buf;
|
ostringstream buf;
|
||||||
|
|
||||||
|
@ -399,7 +402,7 @@ cerr << "FrameBufferSoft::postFrameUpdate()" << endl
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FrameBufferSoft::scanline(uInt32 row, uInt8* data)
|
void FrameBufferSoft::scanline(uInt32 row, uInt8* data) const
|
||||||
{
|
{
|
||||||
// Make sure no pixels are being modified
|
// Make sure no pixels are being modified
|
||||||
SDL_LockSurface(myScreen);
|
SDL_LockSurface(myScreen);
|
||||||
|
@ -480,8 +483,7 @@ void FrameBufferSoft::vLine(uInt32 x, uInt32 y, uInt32 y2, int color)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FrameBufferSoft::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
|
void FrameBufferSoft::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, int color)
|
||||||
int color)
|
|
||||||
{
|
{
|
||||||
SDL_Rect tmp;
|
SDL_Rect tmp;
|
||||||
|
|
||||||
|
@ -636,23 +638,46 @@ void FrameBufferSoft::drawBitmap(uInt32* bitmap, Int32 xorig, Int32 yorig,
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FrameBufferSoft::drawSurface(SDL_Surface* surface, Int32 x, Int32 y)
|
void FrameBufferSoft::drawSurface(const GUI::Surface* surface, Int32 x, Int32 y)
|
||||||
{
|
{
|
||||||
SDL_Rect clip;
|
SDL_Rect clip;
|
||||||
clip.x = x;
|
clip.x = x * myZoomLevel + myImageDim.x;
|
||||||
clip.y = y;
|
clip.y = y * myZoomLevel + myImageDim.y;
|
||||||
|
|
||||||
SDL_BlitSurface(surface, 0, myScreen, &clip);
|
SDL_BlitSurface(surface->myData, 0, myScreen, &clip);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FrameBufferSoft::convertToSurface(SDL_Surface* surface, int row,
|
void FrameBufferSoft::bytesToSurface(GUI::Surface* surface, int row,
|
||||||
uInt8* data, int rowsize) const
|
uInt8* data) const
|
||||||
{
|
{
|
||||||
|
SDL_Surface* s = surface->myData;
|
||||||
|
int rowsize = s->w * 3;
|
||||||
|
|
||||||
|
switch(myBytesPerPixel)
|
||||||
|
{
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
uInt16* pixels = (uInt16*) s->pixels;
|
||||||
|
pixels += (row * s->pitch/2);
|
||||||
|
|
||||||
|
for(int c = 0; c < rowsize/myZoomLevel; c += 3)
|
||||||
|
{
|
||||||
|
uInt32 pixel = SDL_MapRGB(s->format, data[c], data[c+1], data[c+2]);
|
||||||
|
uInt32 xstride = myZoomLevel;
|
||||||
|
while(xstride--)
|
||||||
|
*pixels++ = pixel;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FrameBufferSoft::translateCoords(Int32& x, Int32& y)
|
void FrameBufferSoft::translateCoords(Int32& x, Int32& y) const
|
||||||
{
|
{
|
||||||
x = (x - myImageDim.x) / myZoomLevel;
|
x = (x - myImageDim.x) / myZoomLevel;
|
||||||
y = (y - myImageDim.y) / myZoomLevel;
|
y = (y - myImageDim.y) / myZoomLevel;
|
||||||
|
@ -727,12 +752,12 @@ void FrameBufferSoft::stateChanged(EventHandler::State state)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
SDL_Surface* FrameBufferSoft::cloneSurface(int width, int height)
|
GUI::Surface* FrameBufferSoft::createSurface(int width, int height) const
|
||||||
{
|
{
|
||||||
SDL_Surface* surface =
|
SDL_Surface* data =
|
||||||
SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, myBytesPerPixel << 3,
|
SDL_CreateRGBSurface(SDL_SWSURFACE, width*myZoomLevel, height*myZoomLevel,
|
||||||
myFormat->Rmask, myFormat->Gmask, myFormat->Bmask,
|
myBytesPerPixel << 3, myFormat->Rmask, myFormat->Gmask,
|
||||||
myFormat->Amask);
|
myFormat->Bmask, myFormat->Amask);
|
||||||
|
|
||||||
return surface;
|
return data ? new GUI::Surface(width, height, data) : NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferSoft.hxx,v 1.47 2007-09-01 23:31:18 stephena Exp $
|
// $Id: FrameBufferSoft.hxx,v 1.48 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef FRAMEBUFFER_SOFT_HXX
|
#ifndef FRAMEBUFFER_SOFT_HXX
|
||||||
|
@ -33,7 +33,7 @@ class RectList;
|
||||||
This class implements an SDL software framebuffer.
|
This class implements an SDL software framebuffer.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: FrameBufferSoft.hxx,v 1.47 2007-09-01 23:31:18 stephena Exp $
|
@version $Id: FrameBufferSoft.hxx,v 1.48 2007-09-03 18:37:22 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class FrameBufferSoft : public FrameBuffer
|
class FrameBufferSoft : public FrameBuffer
|
||||||
{
|
{
|
||||||
|
@ -55,46 +55,46 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
This method is called to initialize software video mode.
|
This method is called to initialize software video mode.
|
||||||
Return false if any operation fails, otherwise return true.
|
Return false if any operation fails, otherwise return true.
|
||||||
*/
|
*/
|
||||||
virtual bool initSubsystem(VideoMode mode);
|
bool initSubsystem(VideoMode mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to query the type of the FrameBuffer.
|
This method is called to query the type of the FrameBuffer.
|
||||||
*/
|
*/
|
||||||
virtual BufferType type() { return kSoftBuffer; }
|
BufferType type() const { return kSoftBuffer; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to provide information about the FrameBuffer.
|
This method is called to provide information about the FrameBuffer.
|
||||||
*/
|
*/
|
||||||
virtual string about();
|
string about() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to change to the given videomode type.
|
This method is called to change to the given videomode type.
|
||||||
|
|
||||||
@param mode The video mode to use for rendering the mediasource
|
@param mode The video mode to use for rendering the mediasource
|
||||||
*/
|
*/
|
||||||
virtual bool setVidMode(VideoMode mode);
|
bool setVidMode(VideoMode mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Switches between the filtering options in software mode.
|
Switches between the filtering options in software mode.
|
||||||
Currently, none exist.
|
Currently, none exist.
|
||||||
*/
|
*/
|
||||||
virtual void toggleFilter();
|
void toggleFilter();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called anytime the MediaSource needs to be redrawn
|
This method should be called anytime the MediaSource needs to be redrawn
|
||||||
to the screen.
|
to the screen.
|
||||||
*/
|
*/
|
||||||
virtual void drawMediaSource();
|
void drawMediaSource();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called before any drawing is done (per-frame).
|
This method is called before any drawing is done (per-frame).
|
||||||
*/
|
*/
|
||||||
virtual void preFrameUpdate();
|
void preFrameUpdate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called after any drawing is done (per-frame).
|
This method is called after any drawing is done (per-frame).
|
||||||
*/
|
*/
|
||||||
virtual void postFrameUpdate();
|
void postFrameUpdate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to get the specified scanline data.
|
This method is called to get the specified scanline data.
|
||||||
|
@ -102,7 +102,7 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param row The row we are looking for
|
@param row The row we are looking for
|
||||||
@param data The actual pixel data (in bytes)
|
@param data The actual pixel data (in bytes)
|
||||||
*/
|
*/
|
||||||
virtual void scanline(uInt32 row, uInt8* data);
|
void scanline(uInt32 row, uInt8* data) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to map a given r,g,b triple to the screen palette.
|
This method is called to map a given r,g,b triple to the screen palette.
|
||||||
|
@ -111,7 +111,7 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param g The green component of the color.
|
@param g The green component of the color.
|
||||||
@param b The blue component of the color.
|
@param b The blue component of the color.
|
||||||
*/
|
*/
|
||||||
virtual Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b)
|
Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b) const
|
||||||
{ return SDL_MapRGB(myScreen->format, r, g, b); }
|
{ return SDL_MapRGB(myScreen->format, r, g, b); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -121,7 +121,7 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param width The requested width of the new surface.
|
@param width The requested width of the new surface.
|
||||||
@param height The requested height of the new surface.
|
@param height The requested height of the new surface.
|
||||||
*/
|
*/
|
||||||
virtual SDL_Surface* cloneSurface(int width, int height);
|
GUI::Surface* createSurface(int width, int height) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to draw a horizontal line.
|
This method is called to draw a horizontal line.
|
||||||
|
@ -131,7 +131,7 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param x2 The second x coordinate
|
@param x2 The second x coordinate
|
||||||
@param color The color of the line
|
@param color The color of the line
|
||||||
*/
|
*/
|
||||||
virtual void hLine(uInt32 x, uInt32 y, uInt32 x2, int color);
|
void hLine(uInt32 x, uInt32 y, uInt32 x2, int color);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to draw a vertical line.
|
This method is called to draw a vertical line.
|
||||||
|
@ -141,7 +141,7 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param y2 The second y coordinate
|
@param y2 The second y coordinate
|
||||||
@param color The color of the line
|
@param color The color of the line
|
||||||
*/
|
*/
|
||||||
virtual void vLine(uInt32 x, uInt32 y, uInt32 y2, int color);
|
void vLine(uInt32 x, uInt32 y, uInt32 y2, int color);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to draw a filled rectangle.
|
This method is called to draw a filled rectangle.
|
||||||
|
@ -152,8 +152,7 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param h The height of the area
|
@param h The height of the area
|
||||||
@param color The color of the area
|
@param color The color of the area
|
||||||
*/
|
*/
|
||||||
virtual void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
|
void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, int color);
|
||||||
int color);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to draw the specified character.
|
This method is called to draw the specified character.
|
||||||
|
@ -164,8 +163,7 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param y The y coordinate
|
@param y The y coordinate
|
||||||
@param color The color of the character
|
@param color The color of the character
|
||||||
*/
|
*/
|
||||||
virtual void drawChar(const GUI::Font* font, uInt8 c, uInt32 x, uInt32 y,
|
void drawChar(const GUI::Font* font, uInt8 c, uInt32 x, uInt32 y, int color);
|
||||||
int color);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to draw the bitmap image.
|
This method is called to draw the bitmap image.
|
||||||
|
@ -176,8 +174,7 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param color The color of the character
|
@param color The color of the character
|
||||||
@param h The height of the data image
|
@param h The height of the data image
|
||||||
*/
|
*/
|
||||||
virtual void drawBitmap(uInt32* bitmap, Int32 x, Int32 y, int color,
|
void drawBitmap(uInt32* bitmap, Int32 x, Int32 y, int color, Int32 h = 8);
|
||||||
Int32 h = 8);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called to draw an SDL surface.
|
This method should be called to draw an SDL surface.
|
||||||
|
@ -186,7 +183,7 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param x The x coordinate
|
@param x The x coordinate
|
||||||
@param y The y coordinate
|
@param y The y coordinate
|
||||||
*/
|
*/
|
||||||
virtual void drawSurface(SDL_Surface* surface, Int32 x, Int32 y);
|
void drawSurface(const GUI::Surface* surface, Int32 x, Int32 y);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called to convert and copy a given row of RGB
|
This method should be called to convert and copy a given row of RGB
|
||||||
|
@ -195,10 +192,8 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param surface The data to draw
|
@param surface The data to draw
|
||||||
@param row The row of the surface the data should be placed in
|
@param row The row of the surface the data should be placed in
|
||||||
@param data The data in uInt8 R/G/B format
|
@param data The data in uInt8 R/G/B format
|
||||||
@param rowsize The number of R/G/B triples in a data row
|
|
||||||
*/
|
*/
|
||||||
virtual void convertToSurface(SDL_Surface* surface, int row,
|
void bytesToSurface(GUI::Surface* surface, int row, uInt8* data) const;
|
||||||
uInt8* data, int rowsize) const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method translates the given coordinates to their
|
This method translates the given coordinates to their
|
||||||
|
@ -207,7 +202,7 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param x X coordinate to translate
|
@param x X coordinate to translate
|
||||||
@param y Y coordinate to translate
|
@param y Y coordinate to translate
|
||||||
*/
|
*/
|
||||||
virtual void translateCoords(Int32& x, Int32& y);
|
void translateCoords(Int32& x, Int32& y) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method adds a dirty rectangle
|
This method adds a dirty rectangle
|
||||||
|
@ -218,17 +213,17 @@ class FrameBufferSoft : public FrameBuffer
|
||||||
@param w The width of the area
|
@param w The width of the area
|
||||||
@param h The height of the area
|
@param h The height of the area
|
||||||
*/
|
*/
|
||||||
virtual void addDirtyRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h);
|
void addDirtyRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Enable/disable phosphor effect.
|
Enable/disable phosphor effect.
|
||||||
*/
|
*/
|
||||||
virtual void enablePhosphor(bool enable, int blend);
|
void enablePhosphor(bool enable, int blend);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Informs the Framebuffer of a change in EventHandler state.
|
Informs the Framebuffer of a change in EventHandler state.
|
||||||
*/
|
*/
|
||||||
virtual void stateChanged(EventHandler::State state);
|
void stateChanged(EventHandler::State state);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int myZoomLevel;
|
int myZoomLevel;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: mainSDL.cxx,v 1.75 2007-08-25 23:57:35 stephena Exp $
|
// $Id: mainSDL.cxx,v 1.76 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
@ -156,6 +156,15 @@ int main(int argc, char* argv[])
|
||||||
theOSystem->createLauncher();
|
theOSystem->createLauncher();
|
||||||
else if(theOSystem->createConsole(romfile))
|
else if(theOSystem->createConsole(romfile))
|
||||||
{
|
{
|
||||||
|
if(theOSystem->settings().getBool("takesnapshot"))
|
||||||
|
{
|
||||||
|
for(int i = 0; i < 60; ++i) theOSystem->frameBuffer().update();
|
||||||
|
theOSystem->console().system().reset();
|
||||||
|
theOSystem->eventHandler().takeSnapshot();
|
||||||
|
Cleanup();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if(theOSystem->settings().getBool("holdreset"))
|
if(theOSystem->settings().getBool("holdreset"))
|
||||||
theOSystem->eventHandler().handleEvent(Event::ConsoleReset, 1);
|
theOSystem->eventHandler().handleEvent(Event::ConsoleReset, 1);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Debugger.cxx,v 1.114 2007-08-15 17:43:51 stephena Exp $
|
// $Id: Debugger.cxx,v 1.115 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
#include "Version.hxx"
|
#include "Version.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "FrameBuffer.hxx"
|
#include "FrameBuffer.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
#include "DebuggerDialog.hxx"
|
#include "DebuggerDialog.hxx"
|
||||||
#include "DebuggerParser.hxx"
|
#include "DebuggerParser.hxx"
|
||||||
|
|
||||||
|
|
|
@ -13,19 +13,19 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: AudioWidget.cxx,v 1.5 2007-01-01 18:04:42 stephena Exp $
|
// $Id: AudioWidget.cxx,v 1.6 2007-09-03 18:37:22 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "DataGridWidget.hxx"
|
||||||
#include "FrameBuffer.hxx"
|
#include "FrameBuffer.hxx"
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "GuiObject.hxx"
|
#include "GuiObject.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
#include "TIADebug.hxx"
|
#include "TIADebug.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "DataGridWidget.hxx"
|
|
||||||
#include "AudioWidget.hxx"
|
#include "AudioWidget.hxx"
|
||||||
|
|
||||||
// ID's for the various widgets
|
// ID's for the various widgets
|
||||||
|
|
|
@ -13,18 +13,19 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: ColorWidget.cxx,v 1.6 2007-01-01 18:04:43 stephena Exp $
|
// $Id: ColorWidget.cxx,v 1.7 2007-09-03 18:37:22 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "FrameBuffer.hxx"
|
|
||||||
#include "Command.hxx"
|
|
||||||
#include "GuiObject.hxx"
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
|
#include "Command.hxx"
|
||||||
|
#include "FrameBuffer.hxx"
|
||||||
|
#include "GuiObject.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
|
||||||
#include "ColorWidget.hxx"
|
#include "ColorWidget.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: ContextMenu.hxx,v 1.5 2007-01-01 18:04:43 stephena Exp $
|
// $Id: ContextMenu.hxx,v 1.6 2007-09-03 18:37:22 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -22,12 +22,12 @@
|
||||||
#ifndef CONTEXT_MENU_HXX
|
#ifndef CONTEXT_MENU_HXX
|
||||||
#define CONTEXT_MENU_HXX
|
#define CONTEXT_MENU_HXX
|
||||||
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "Command.hxx"
|
|
||||||
#include "Array.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "Array.hxx"
|
||||||
|
#include "Command.hxx"
|
||||||
|
#include "Dialog.hxx"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
kCMenuItemSelectedCmd = 'CMsl'
|
kCMenuItemSelectedCmd = 'CMsl'
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: CpuWidget.cxx,v 1.8 2007-01-01 18:04:43 stephena Exp $
|
// $Id: CpuWidget.cxx,v 1.9 2007-09-03 18:37:22 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -22,7 +22,6 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "GuiObject.hxx"
|
#include "GuiObject.hxx"
|
||||||
#include "Debugger.hxx"
|
#include "Debugger.hxx"
|
||||||
#include "CpuDebug.hxx"
|
#include "CpuDebug.hxx"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: RamWidget.cxx,v 1.12 2007-08-17 16:12:50 stephena Exp $
|
// $Id: RamWidget.cxx,v 1.13 2007-09-03 18:37:22 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "DataGridWidget.hxx"
|
||||||
|
#include "EditTextWidget.hxx"
|
||||||
#include "FrameBuffer.hxx"
|
#include "FrameBuffer.hxx"
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "GuiObject.hxx"
|
#include "GuiObject.hxx"
|
||||||
#include "InputTextDialog.hxx"
|
#include "InputTextDialog.hxx"
|
||||||
#include "Widget.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "EditTextWidget.hxx"
|
|
||||||
#include "DataGridWidget.hxx"
|
|
||||||
#include "RamDebug.hxx"
|
#include "RamDebug.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
#include "RamWidget.hxx"
|
#include "RamWidget.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,23 +13,23 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: TiaWidget.cxx,v 1.7 2007-01-01 18:04:44 stephena Exp $
|
// $Id: TiaWidget.cxx,v 1.8 2007-09-03 18:37:22 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "FrameBuffer.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "GuiObject.hxx"
|
|
||||||
#include "TIADebug.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "EditTextWidget.hxx"
|
|
||||||
#include "DataGridWidget.hxx"
|
|
||||||
#include "ColorWidget.hxx"
|
#include "ColorWidget.hxx"
|
||||||
|
#include "DataGridWidget.hxx"
|
||||||
|
#include "EditTextWidget.hxx"
|
||||||
|
#include "FrameBuffer.hxx"
|
||||||
|
#include "GuiObject.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "TIADebug.hxx"
|
||||||
#include "ToggleBitWidget.hxx"
|
#include "ToggleBitWidget.hxx"
|
||||||
#include "TogglePixelWidget.hxx"
|
#include "TogglePixelWidget.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
#include "TiaWidget.hxx"
|
#include "TiaWidget.hxx"
|
||||||
|
|
||||||
// ID's for the various widgets
|
// ID's for the various widgets
|
||||||
|
|
|
@ -13,13 +13,14 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: TiaZoomWidget.cxx,v 1.13 2007-08-15 17:43:51 stephena Exp $
|
// $Id: TiaZoomWidget.cxx,v 1.14 2007-09-03 18:37:22 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
|
#include "Console.hxx"
|
||||||
#include "FrameBuffer.hxx"
|
#include "FrameBuffer.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "GuiObject.hxx"
|
#include "GuiObject.hxx"
|
||||||
|
|
|
@ -14,34 +14,35 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: EventHandler.cxx,v 1.206 2007-08-15 19:14:49 stephena Exp $
|
// $Id: EventHandler.cxx,v 1.207 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#include "FSNode.hxx"
|
|
||||||
#include "Event.hxx"
|
|
||||||
#include "EventHandler.hxx"
|
|
||||||
#include "EventStreamer.hxx"
|
|
||||||
#include "FSNode.hxx"
|
|
||||||
#include "Settings.hxx"
|
|
||||||
#include "System.hxx"
|
|
||||||
#include "FrameBuffer.hxx"
|
|
||||||
#include "Sound.hxx"
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "DialogContainer.hxx"
|
|
||||||
#include "Menu.hxx"
|
|
||||||
#include "CommandMenu.hxx"
|
|
||||||
#include "Launcher.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "Deserializer.hxx"
|
|
||||||
#include "Serializer.hxx"
|
|
||||||
#include "PropsSet.hxx"
|
|
||||||
#include "Snapshot.hxx"
|
|
||||||
#include "ScrollBarWidget.hxx"
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "CommandMenu.hxx"
|
||||||
|
#include "Console.hxx"
|
||||||
|
#include "Deserializer.hxx"
|
||||||
|
#include "DialogContainer.hxx"
|
||||||
|
#include "Event.hxx"
|
||||||
|
#include "EventStreamer.hxx"
|
||||||
|
#include "FrameBuffer.hxx"
|
||||||
|
#include "FSNode.hxx"
|
||||||
|
#include "Launcher.hxx"
|
||||||
|
#include "Menu.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "PropsSet.hxx"
|
||||||
|
#include "ScrollBarWidget.hxx"
|
||||||
|
#include "Serializer.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
#include "Snapshot.hxx"
|
||||||
|
#include "Sound.hxx"
|
||||||
|
#include "System.hxx"
|
||||||
|
|
||||||
|
#include "EventHandler.hxx"
|
||||||
|
|
||||||
#ifdef CHEATCODE_SUPPORT
|
#ifdef CHEATCODE_SUPPORT
|
||||||
#include "CheatManager.hxx"
|
#include "CheatManager.hxx"
|
||||||
#endif
|
#endif
|
||||||
|
@ -995,6 +996,14 @@ void EventHandler::handleJoyHatEvent(int stick, int hat, int value)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void EventHandler::handleResizeEvent()
|
||||||
|
{
|
||||||
|
// For now, only the overlay cares about resize events
|
||||||
|
if(myOverlay != NULL)
|
||||||
|
myOverlay->handleResizeEvent();
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void EventHandler::handleEvent(Event::Type event, int state)
|
void EventHandler::handleEvent(Event::Type event, int state)
|
||||||
{
|
{
|
||||||
|
@ -2121,7 +2130,8 @@ void EventHandler::takeSnapshot()
|
||||||
if(sspath.length() > 0)
|
if(sspath.length() > 0)
|
||||||
if(sspath.substr(sspath.length()-1) != BSPF_PATH_SEPARATOR)
|
if(sspath.substr(sspath.length()-1) != BSPF_PATH_SEPARATOR)
|
||||||
sspath += BSPF_PATH_SEPARATOR;
|
sspath += BSPF_PATH_SEPARATOR;
|
||||||
sspath += myOSystem->console().properties().get(Cartridge_Name);
|
sspath += myOSystem->console().properties().get(Cartridge_Name) + "." +
|
||||||
|
myOSystem->console().properties().get(Cartridge_MD5);
|
||||||
|
|
||||||
// Check whether we want multiple snapshots created
|
// Check whether we want multiple snapshots created
|
||||||
if(!myOSystem->settings().getBool("sssingle"))
|
if(!myOSystem->settings().getBool("sssingle"))
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: EventHandler.hxx,v 1.102 2007-02-22 02:15:46 stephena Exp $
|
// $Id: EventHandler.hxx,v 1.103 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef EVENTHANDLER_HXX
|
#ifndef EVENTHANDLER_HXX
|
||||||
|
@ -21,19 +21,19 @@
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#include "bspf.hxx"
|
|
||||||
#include "Event.hxx"
|
|
||||||
#include "Array.hxx"
|
|
||||||
#include "Control.hxx"
|
|
||||||
#include "StringList.hxx"
|
|
||||||
#include "Serializer.hxx"
|
|
||||||
|
|
||||||
class Console;
|
class Console;
|
||||||
class OSystem;
|
class OSystem;
|
||||||
class DialogContainer;
|
class DialogContainer;
|
||||||
class EventMappingWidget;
|
class EventMappingWidget;
|
||||||
class EventStreamer;
|
class EventStreamer;
|
||||||
|
|
||||||
|
#include "Array.hxx"
|
||||||
|
#include "Event.hxx"
|
||||||
|
#include "Control.hxx"
|
||||||
|
#include "StringList.hxx"
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
|
||||||
enum MouseButton {
|
enum MouseButton {
|
||||||
EVENT_LBUTTONDOWN,
|
EVENT_LBUTTONDOWN,
|
||||||
EVENT_LBUTTONUP,
|
EVENT_LBUTTONUP,
|
||||||
|
@ -62,7 +62,7 @@ enum EventMode {
|
||||||
mapping can take place.
|
mapping can take place.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: EventHandler.hxx,v 1.102 2007-02-22 02:15:46 stephena Exp $
|
@version $Id: EventHandler.hxx,v 1.103 2007-09-03 18:37:22 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class EventHandler
|
class EventHandler
|
||||||
{
|
{
|
||||||
|
@ -253,6 +253,12 @@ class EventHandler
|
||||||
void leaveMenuMode();
|
void leaveMenuMode();
|
||||||
bool enterDebugMode();
|
bool enterDebugMode();
|
||||||
void leaveDebugMode();
|
void leaveDebugMode();
|
||||||
|
void takeSnapshot();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Send a resize event to the handler.
|
||||||
|
*/
|
||||||
|
void handleResizeEvent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Send an event directly to the event handler.
|
Send an event directly to the event handler.
|
||||||
|
@ -451,7 +457,6 @@ class EventHandler
|
||||||
void saveState();
|
void saveState();
|
||||||
void changeState(bool show = true);
|
void changeState(bool show = true);
|
||||||
void loadState();
|
void loadState();
|
||||||
void takeSnapshot();
|
|
||||||
void setEventState(State state);
|
void setEventState(State state);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -13,16 +13,17 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: EventStreamer.cxx,v 1.8 2007-01-01 18:04:48 stephena Exp $
|
// $Id: EventStreamer.cxx,v 1.9 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "Console.hxx"
|
||||||
#include "Event.hxx"
|
|
||||||
#include "EventHandler.hxx"
|
#include "EventHandler.hxx"
|
||||||
#include "EventStreamer.hxx"
|
#include "Event.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
#include "System.hxx"
|
#include "System.hxx"
|
||||||
|
#include "EventStreamer.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
EventStreamer::EventStreamer(OSystem* osystem)
|
EventStreamer::EventStreamer(OSystem* osystem)
|
||||||
|
|
|
@ -13,15 +13,14 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FSNode.cxx,v 1.10 2007-07-31 15:46:20 stephena Exp $
|
// $Id: FSNode.cxx,v 1.11 2007-09-03 18:37:22 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "FSNode.hxx"
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "GuiUtils.hxx"
|
#include "FSNode.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FSList::sort()
|
void FSList::sort()
|
||||||
|
|
|
@ -13,24 +13,25 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBuffer.cxx,v 1.123 2007-08-16 16:42:46 stephena Exp $
|
// $Id: FrameBuffer.cxx,v 1.124 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "Console.hxx"
|
|
||||||
#include "Event.hxx"
|
|
||||||
#include "EventHandler.hxx"
|
|
||||||
#include "Settings.hxx"
|
|
||||||
#include "MediaSrc.hxx"
|
|
||||||
#include "FrameBuffer.hxx"
|
|
||||||
#include "Font.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "Menu.hxx"
|
|
||||||
#include "CommandMenu.hxx"
|
#include "CommandMenu.hxx"
|
||||||
|
#include "Console.hxx"
|
||||||
|
#include "EventHandler.hxx"
|
||||||
|
#include "Event.hxx"
|
||||||
|
#include "Font.hxx"
|
||||||
#include "Launcher.hxx"
|
#include "Launcher.hxx"
|
||||||
|
#include "MediaSrc.hxx"
|
||||||
|
#include "Menu.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
|
||||||
|
#include "FrameBuffer.hxx"
|
||||||
|
|
||||||
#ifdef DEBUGGER_SUPPORT
|
#ifdef DEBUGGER_SUPPORT
|
||||||
#include "Debugger.hxx"
|
#include "Debugger.hxx"
|
||||||
|
@ -390,7 +391,8 @@ bool FrameBuffer::changeVidMode(int direction)
|
||||||
if(!setVidMode(newmode))
|
if(!setVidMode(newmode))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
myOSystem->eventHandler().refreshDisplay();
|
myOSystem->eventHandler().handleResizeEvent();
|
||||||
|
myOSystem->eventHandler().refreshDisplay(true);
|
||||||
setCursorState();
|
setCursorState();
|
||||||
showMessage(newmode.name);
|
showMessage(newmode.name);
|
||||||
|
|
||||||
|
@ -470,7 +472,7 @@ void FrameBuffer::grabMouse(bool grab)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool FrameBuffer::fullScreen()
|
bool FrameBuffer::fullScreen() const
|
||||||
{
|
{
|
||||||
#ifdef WINDOWED_SUPPORT
|
#ifdef WINDOWED_SUPPORT
|
||||||
return myOSystem->settings().getBool("fullscreen");
|
return myOSystem->settings().getBool("fullscreen");
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBuffer.hxx,v 1.91 2007-09-01 23:31:18 stephena Exp $
|
// $Id: FrameBuffer.hxx,v 1.92 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef FRAMEBUFFER_HXX
|
#ifndef FRAMEBUFFER_HXX
|
||||||
|
@ -21,18 +21,19 @@
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#include "bspf.hxx"
|
|
||||||
#include "Array.hxx"
|
|
||||||
#include "Event.hxx"
|
|
||||||
#include "EventHandler.hxx"
|
|
||||||
#include "MediaSrc.hxx"
|
|
||||||
#include "Font.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "VideoModeList.hxx"
|
|
||||||
|
|
||||||
class OSystem;
|
class OSystem;
|
||||||
class Console;
|
class Console;
|
||||||
|
|
||||||
|
namespace GUI {
|
||||||
|
class Font;
|
||||||
|
class Surface;
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "EventHandler.hxx"
|
||||||
|
#include "VideoModeList.hxx"
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
|
||||||
// Text alignment modes for drawString()
|
// Text alignment modes for drawString()
|
||||||
enum TextAlignment {
|
enum TextAlignment {
|
||||||
kTextAlignLeft,
|
kTextAlignLeft,
|
||||||
|
@ -100,7 +101,7 @@ enum {
|
||||||
All GUI elements (ala ScummVM) are drawn here as well.
|
All GUI elements (ala ScummVM) are drawn here as well.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: FrameBuffer.hxx,v 1.91 2007-09-01 23:31:18 stephena Exp $
|
@version $Id: FrameBuffer.hxx,v 1.92 2007-09-03 18:37:22 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class FrameBuffer
|
class FrameBuffer
|
||||||
{
|
{
|
||||||
|
@ -228,7 +229,7 @@ class FrameBuffer
|
||||||
/**
|
/**
|
||||||
Answers if the display is currently in fullscreen mode.
|
Answers if the display is currently in fullscreen mode.
|
||||||
*/
|
*/
|
||||||
bool fullScreen();
|
bool fullScreen() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set the title for the main SDL window.
|
Set the title for the main SDL window.
|
||||||
|
@ -310,7 +311,7 @@ class FrameBuffer
|
||||||
@param row The row we are looking for
|
@param row The row we are looking for
|
||||||
@param data The actual pixel data (in bytes)
|
@param data The actual pixel data (in bytes)
|
||||||
*/
|
*/
|
||||||
virtual void scanline(uInt32 row, uInt8* data) = 0;
|
virtual void scanline(uInt32 row, uInt8* data) const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called to draw a horizontal line.
|
This method should be called to draw a horizontal line.
|
||||||
|
@ -375,7 +376,7 @@ class FrameBuffer
|
||||||
@param x The x coordinate
|
@param x The x coordinate
|
||||||
@param y The y coordinate
|
@param y The y coordinate
|
||||||
*/
|
*/
|
||||||
virtual void drawSurface(SDL_Surface* surface, Int32 x, Int32 y) = 0;
|
virtual void drawSurface(const GUI::Surface* surface, Int32 x, Int32 y) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called to convert and copy a given row of RGB
|
This method should be called to convert and copy a given row of RGB
|
||||||
|
@ -384,10 +385,9 @@ class FrameBuffer
|
||||||
@param surface The data to draw
|
@param surface The data to draw
|
||||||
@param row The row of the surface the data should be placed in
|
@param row The row of the surface the data should be placed in
|
||||||
@param data The data in uInt8 R/G/B format
|
@param data The data in uInt8 R/G/B format
|
||||||
@param rowsize The number of R/G/B triples in a data row
|
|
||||||
*/
|
*/
|
||||||
virtual void convertToSurface(SDL_Surface* surface, int row,
|
virtual void bytesToSurface(GUI::Surface* surface, int row,
|
||||||
uInt8* data, int rowsize) const = 0;
|
uInt8* data) const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called to translate the given coordinates
|
This method should be called to translate the given coordinates
|
||||||
|
@ -396,7 +396,7 @@ class FrameBuffer
|
||||||
@param x X coordinate to translate
|
@param x X coordinate to translate
|
||||||
@param y Y coordinate to translate
|
@param y Y coordinate to translate
|
||||||
*/
|
*/
|
||||||
virtual void translateCoords(Int32& x, Int32& y) = 0;
|
virtual void translateCoords(Int32& x, Int32& y) const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called to add a dirty rectangle
|
This method should be called to add a dirty rectangle
|
||||||
|
@ -421,7 +421,7 @@ class FrameBuffer
|
||||||
@param g The green component of the color.
|
@param g The green component of the color.
|
||||||
@param b The blue component of the color.
|
@param b The blue component of the color.
|
||||||
*/
|
*/
|
||||||
virtual Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b) = 0;
|
virtual Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b) const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to create a surface compatible with the one
|
This method is called to create a surface compatible with the one
|
||||||
|
@ -430,12 +430,12 @@ class FrameBuffer
|
||||||
@param width The requested width of the new surface.
|
@param width The requested width of the new surface.
|
||||||
@param height The requested height of the new surface.
|
@param height The requested height of the new surface.
|
||||||
*/
|
*/
|
||||||
virtual SDL_Surface* cloneSurface(int width, int height) = 0;
|
virtual GUI::Surface* createSurface(int width, int height) const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to query the type of the FrameBuffer.
|
This method is called to query the type of the FrameBuffer.
|
||||||
*/
|
*/
|
||||||
virtual BufferType type() = 0;
|
virtual BufferType type() const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
|
@ -475,9 +475,7 @@ class FrameBuffer
|
||||||
/**
|
/**
|
||||||
This method is called to provide information about the FrameBuffer.
|
This method is called to provide information about the FrameBuffer.
|
||||||
*/
|
*/
|
||||||
virtual string about() = 0;
|
virtual string about() const = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// The parent system for the framebuffer
|
// The parent system for the framebuffer
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: MediaFactory.cxx,v 1.8 2007-07-19 16:21:39 stephena Exp $
|
// $Id: MediaFactory.cxx,v 1.9 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
#include "MediaFactory.hxx"
|
#include "MediaFactory.hxx"
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
|
||||||
#include "FrameBuffer.hxx"
|
#include "FrameBuffer.hxx"
|
||||||
#ifdef DISPLAY_OPENGL
|
#ifdef DISPLAY_OPENGL
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: OSystem.cxx,v 1.109 2007-09-01 23:31:18 stephena Exp $
|
// $Id: OSystem.cxx,v 1.110 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -46,6 +46,7 @@
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
|
#include "Console.hxx"
|
||||||
|
|
||||||
#define MAX_ROM_SIZE 512 * 1024
|
#define MAX_ROM_SIZE 512 * 1024
|
||||||
|
|
||||||
|
@ -290,6 +291,9 @@ bool OSystem::createFrameBuffer(bool showmessage)
|
||||||
// Setup the SDL joysticks (must be done after FrameBuffer is created)
|
// Setup the SDL joysticks (must be done after FrameBuffer is created)
|
||||||
if(changeBuffer) myEventHandler->setupJoysticks();
|
if(changeBuffer) myEventHandler->setupJoysticks();
|
||||||
|
|
||||||
|
// Let the system know that we've possibly resized the display
|
||||||
|
if(changeBuffer) myEventHandler->handleResizeEvent();
|
||||||
|
|
||||||
// Update the UI palette
|
// Update the UI palette
|
||||||
setUIPalette();
|
setUIPalette();
|
||||||
|
|
||||||
|
|
|
@ -13,30 +13,32 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: OSystem.hxx,v 1.56 2007-09-01 23:31:18 stephena Exp $
|
// $Id: OSystem.hxx,v 1.57 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef OSYSTEM_HXX
|
#ifndef OSYSTEM_HXX
|
||||||
#define OSYSTEM_HXX
|
#define OSYSTEM_HXX
|
||||||
|
|
||||||
class PropertiesSet;
|
class Cartridge;
|
||||||
|
|
||||||
class Menu;
|
|
||||||
class CommandMenu;
|
|
||||||
class Launcher;
|
|
||||||
class Debugger;
|
|
||||||
class CheatManager;
|
class CheatManager;
|
||||||
|
class CommandMenu;
|
||||||
|
class Console;
|
||||||
|
class Debugger;
|
||||||
|
class Launcher;
|
||||||
|
class Menu;
|
||||||
|
class Properties;
|
||||||
|
class PropertiesSet;
|
||||||
|
class Settings;
|
||||||
|
class Sound;
|
||||||
class VideoDialog;
|
class VideoDialog;
|
||||||
|
|
||||||
|
namespace GUI {
|
||||||
|
class Font;
|
||||||
|
}
|
||||||
|
|
||||||
#include "Array.hxx"
|
#include "Array.hxx"
|
||||||
#include "EventHandler.hxx"
|
#include "EventHandler.hxx"
|
||||||
#include "FrameBuffer.hxx"
|
#include "FrameBuffer.hxx"
|
||||||
#include "Sound.hxx"
|
|
||||||
#include "Settings.hxx"
|
|
||||||
#include "Console.hxx"
|
|
||||||
#include "Font.hxx"
|
|
||||||
#include "StringList.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
struct Resolution {
|
struct Resolution {
|
||||||
|
@ -52,7 +54,7 @@ typedef Common::Array<Resolution> ResolutionList;
|
||||||
other objects belong.
|
other objects belong.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: OSystem.hxx,v 1.56 2007-09-01 23:31:18 stephena Exp $
|
@version $Id: OSystem.hxx,v 1.57 2007-09-03 18:37:22 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class OSystem
|
class OSystem
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,14 +13,14 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Props.cxx,v 1.20 2007-02-06 23:34:33 stephena Exp $
|
// $Id: Props.cxx,v 1.21 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "GuiUtils.hxx"
|
#include "bspf.hxx"
|
||||||
#include "Props.hxx"
|
#include "Props.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,18 +13,20 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: PropsSet.cxx,v 1.34 2007-07-31 15:46:20 stephena Exp $
|
// $Id: PropsSet.cxx,v 1.35 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "DefProps.hxx"
|
|
||||||
#include "Props.hxx"
|
|
||||||
#include "PropsSet.hxx"
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "DefProps.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "Props.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
|
||||||
|
#include "PropsSet.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
PropertiesSet::PropertiesSet(OSystem* osystem)
|
PropertiesSet::PropertiesSet(OSystem* osystem)
|
||||||
: myOSystem(osystem),
|
: myOSystem(osystem),
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Settings.cxx,v 1.126 2007-09-01 23:31:18 stephena Exp $
|
// $Id: Settings.cxx,v 1.127 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -21,9 +21,11 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "Version.hxx"
|
#include "Version.hxx"
|
||||||
#include "bspf.hxx"
|
|
||||||
#include "Settings.hxx"
|
#include "Settings.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -166,7 +168,7 @@ string Settings::loadCommandLine(int argc, char** argv)
|
||||||
|
|
||||||
// Take care of arguments without an option
|
// Take care of arguments without an option
|
||||||
if(key == "rominfo" || key == "debug" || key == "holdreset" ||
|
if(key == "rominfo" || key == "debug" || key == "holdreset" ||
|
||||||
key == "holdselect" || key == "holdbutton0")
|
key == "holdselect" || key == "holdbutton0" || key == "takesnapshot")
|
||||||
{
|
{
|
||||||
setExternal(key, "true");
|
setExternal(key, "true");
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -13,24 +13,25 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: TIA.cxx,v 1.79 2007-02-06 23:34:33 stephena Exp $
|
// $Id: TIA.cxx,v 1.80 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
#include "Console.hxx"
|
#include "Console.hxx"
|
||||||
#include "Control.hxx"
|
#include "Control.hxx"
|
||||||
#include "M6502.hxx"
|
|
||||||
#include "System.hxx"
|
|
||||||
#include "TIA.hxx"
|
|
||||||
#include "Serializer.hxx"
|
|
||||||
#include "Deserializer.hxx"
|
#include "Deserializer.hxx"
|
||||||
|
#include "M6502.hxx"
|
||||||
|
#include "Serializer.hxx"
|
||||||
#include "Settings.hxx"
|
#include "Settings.hxx"
|
||||||
#include "Sound.hxx"
|
#include "Sound.hxx"
|
||||||
#include "GuiUtils.hxx"
|
#include "System.hxx"
|
||||||
|
|
||||||
|
#include "TIA.hxx"
|
||||||
|
|
||||||
#define HBLANK 68
|
#define HBLANK 68
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: bspf.hxx,v 1.17 2007-07-31 15:46:21 stephena Exp $
|
// $Id: bspf.hxx,v 1.18 2007-09-03 18:37:22 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef BSPF_HXX
|
#ifndef BSPF_HXX
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
that need to be defined for different operating systems.
|
that need to be defined for different operating systems.
|
||||||
|
|
||||||
@author Bradford W. Mott
|
@author Bradford W. Mott
|
||||||
@version $Id: bspf.hxx,v 1.17 2007-07-31 15:46:21 stephena Exp $
|
@version $Id: bspf.hxx,v 1.18 2007-09-03 18:37:22 stephena Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Types for 8-bit signed and unsigned integers
|
// Types for 8-bit signed and unsigned integers
|
||||||
|
@ -88,6 +88,8 @@ template<typename T> inline T BSPF_abs (T x) { return (x>=0) ? x : -x; }
|
||||||
template<typename T> inline T BSPF_min (T a, T b) { return (a<b) ? a : b; }
|
template<typename T> inline T BSPF_min (T a, T b) { return (a<b) ? a : b; }
|
||||||
template<typename T> inline T BSPF_max (T a, T b) { return (a>b) ? a : b; }
|
template<typename T> inline T BSPF_max (T a, T b) { return (a>b) ? a : b; }
|
||||||
|
|
||||||
|
static const string EmptyString("");
|
||||||
|
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferGP2X.cxx,v 1.22 2007-06-20 16:33:22 stephena Exp $
|
// $Id: FrameBufferGP2X.cxx,v 1.23 2007-09-03 18:37:23 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
@ -22,7 +22,6 @@
|
||||||
#include "MediaSrc.hxx"
|
#include "MediaSrc.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "Font.hxx"
|
#include "Font.hxx"
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "FrameBufferGP2X.hxx"
|
#include "FrameBufferGP2X.hxx"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,17 +13,17 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: AboutDialog.cxx,v 1.21 2007-08-15 17:43:51 stephena Exp $
|
// $Id: AboutDialog.cxx,v 1.22 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
#include "GuiUtils.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "Version.hxx"
|
#include "Version.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
#include "AboutDialog.hxx"
|
#include "AboutDialog.hxx"
|
||||||
|
|
||||||
#define ADD_ATEXT(d) do { dsc[i] = d; i++; } while(0)
|
#define ADD_ATEXT(d) do { dsc[i] = d; i++; } while(0)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: AboutDialog.hxx,v 1.6 2007-01-01 18:04:51 stephena Exp $
|
// $Id: AboutDialog.hxx,v 1.7 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -30,8 +30,6 @@ class CommandSender;
|
||||||
class ButtonWidget;
|
class ButtonWidget;
|
||||||
class StaticTextWidget;
|
class StaticTextWidget;
|
||||||
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
|
|
||||||
|
|
||||||
class AboutDialog : public Dialog
|
class AboutDialog : public Dialog
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: AudioDialog.cxx,v 1.24 2007-01-01 18:04:52 stephena Exp $
|
// $Id: AudioDialog.cxx,v 1.25 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -21,19 +21,20 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "Sound.hxx"
|
|
||||||
#include "Settings.hxx"
|
|
||||||
#include "Menu.hxx"
|
|
||||||
#include "Control.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "PopUpWidget.hxx"
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "AudioDialog.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "Console.hxx"
|
||||||
|
#include "Control.hxx"
|
||||||
|
#include "Dialog.hxx"
|
||||||
|
#include "Menu.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "PopUpWidget.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
#include "Sound.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
|
#include "AudioDialog.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
AudioDialog::AudioDialog(OSystem* osystem, DialogContainer* parent,
|
AudioDialog::AudioDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
const GUI::Font& font, int x, int y, int w, int h)
|
const GUI::Font& font, int x, int y, int w, int h)
|
||||||
|
|
|
@ -13,24 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: BrowserDialog.cxx,v 1.27 2007-07-20 13:31:10 stephena Exp $
|
// $Id: BrowserDialog.cxx,v 1.28 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "FSNode.hxx"
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "StringListWidget.hxx"
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "GuiObject.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "GameList.hxx"
|
|
||||||
#include "BrowserDialog.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "Dialog.hxx"
|
||||||
|
#include "FSNode.hxx"
|
||||||
|
#include "GameList.hxx"
|
||||||
|
#include "GuiObject.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "StringListWidget.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
|
#include "BrowserDialog.hxx"
|
||||||
|
|
||||||
/* We want to use this as a general directory selector at some point... possible uses
|
/* We want to use this as a general directory selector at some point... possible uses
|
||||||
* - to select the data dir for a game
|
* - to select the data dir for a game
|
||||||
* - to select the place where save games are stored
|
* - to select the place where save games are stored
|
||||||
|
|
|
@ -13,18 +13,19 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: CommandDialog.cxx,v 1.15 2007-02-22 02:15:46 stephena Exp $
|
// $Id: CommandDialog.cxx,v 1.16 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "Console.hxx"
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "DialogContainer.hxx"
|
#include "DialogContainer.hxx"
|
||||||
|
#include "Dialog.hxx"
|
||||||
|
#include "EventHandler.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "CommandDialog.hxx"
|
#include "CommandDialog.hxx"
|
||||||
#include "EventHandler.hxx"
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CommandDialog::CommandDialog(OSystem* osystem, DialogContainer* parent)
|
CommandDialog::CommandDialog(OSystem* osystem, DialogContainer* parent)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: DialogContainer.cxx,v 1.37 2007-07-31 15:46:21 stephena Exp $
|
// $Id: DialogContainer.cxx,v 1.38 2007-09-03 18:37:23 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
|
@ -324,6 +324,15 @@ void DialogContainer::handleJoyHatEvent(int stick, int hat, int value)
|
||||||
activeDialog->handleJoyHat(stick, hat, value);
|
activeDialog->handleJoyHat(stick, hat, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void DialogContainer::handleResizeEvent()
|
||||||
|
{
|
||||||
|
// Send resize events to all dialogs
|
||||||
|
// It's up to a specific dialog to actually listen
|
||||||
|
for(int i = 0; i < myDialogStack.size(); i++)
|
||||||
|
myDialogStack[i]->handleCommand(NULL, kResizeCmd, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void DialogContainer::reset()
|
void DialogContainer::reset()
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: DialogContainer.hxx,v 1.22 2007-08-10 18:27:11 stephena Exp $
|
// $Id: DialogContainer.hxx,v 1.23 2007-09-03 18:37:23 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef DIALOG_CONTAINER_HXX
|
#ifndef DIALOG_CONTAINER_HXX
|
||||||
|
@ -36,7 +36,7 @@ class OSystem;
|
||||||
a stack, and handles their events.
|
a stack, and handles their events.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: DialogContainer.hxx,v 1.22 2007-08-10 18:27:11 stephena Exp $
|
@version $Id: DialogContainer.hxx,v 1.23 2007-09-03 18:37:23 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class DialogContainer
|
class DialogContainer
|
||||||
{
|
{
|
||||||
|
@ -118,6 +118,11 @@ class DialogContainer
|
||||||
*/
|
*/
|
||||||
void handleJoyHatEvent(int stick, int hat, int value);
|
void handleJoyHatEvent(int stick, int hat, int value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Handle a resize event.
|
||||||
|
*/
|
||||||
|
void handleResizeEvent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Draw the stack of menus.
|
Draw the stack of menus.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: EventMappingWidget.cxx,v 1.20 2007-08-06 20:16:51 stephena Exp $
|
// $Id: EventMappingWidget.cxx,v 1.21 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -21,16 +21,16 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "StringListWidget.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "Event.hxx"
|
|
||||||
#include "EventHandler.hxx"
|
|
||||||
#include "EventMappingWidget.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "EventHandler.hxx"
|
||||||
|
#include "Event.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "StringListWidget.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
|
#include "EventMappingWidget.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font,
|
EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font,
|
||||||
int x, int y, int w, int h,
|
int x, int y, int w, int h,
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FileSnapDialog.cxx,v 1.12 2007-08-22 13:55:40 stephena Exp $
|
// $Id: FileSnapDialog.cxx,v 1.13 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -21,11 +21,13 @@
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
#include "FSNode.hxx"
|
|
||||||
#include "DialogContainer.hxx"
|
|
||||||
#include "BrowserDialog.hxx"
|
#include "BrowserDialog.hxx"
|
||||||
|
#include "DialogContainer.hxx"
|
||||||
#include "EditTextWidget.hxx"
|
#include "EditTextWidget.hxx"
|
||||||
|
#include "FSNode.hxx"
|
||||||
#include "LauncherDialog.hxx"
|
#include "LauncherDialog.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
|
||||||
#include "FileSnapDialog.hxx"
|
#include "FileSnapDialog.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Font.hxx,v 1.7 2007-01-01 18:04:53 stephena Exp $
|
// $Id: Font.hxx,v 1.8 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -23,7 +23,6 @@
|
||||||
#define FONT_HXX
|
#define FONT_HXX
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
|
|
||||||
/* builtin C-based proportional/fixed font structure */
|
/* builtin C-based proportional/fixed font structure */
|
||||||
/* based on The Microwindows Project http://microwindows.org */
|
/* based on The Microwindows Project http://microwindows.org */
|
||||||
|
|
|
@ -13,21 +13,22 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: GameInfoDialog.cxx,v 1.39 2007-07-27 14:12:36 stephena Exp $
|
// $Id: GameInfoDialog.cxx,v 1.40 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "GuiUtils.hxx"
|
#include "Console.hxx"
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "Props.hxx"
|
|
||||||
#include "PropsSet.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
#include "EditTextWidget.hxx"
|
#include "EditTextWidget.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
#include "PopUpWidget.hxx"
|
#include "PopUpWidget.hxx"
|
||||||
|
#include "Props.hxx"
|
||||||
|
#include "PropsSet.hxx"
|
||||||
#include "TabWidget.hxx"
|
#include "TabWidget.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
#include "GameInfoDialog.hxx"
|
#include "GameInfoDialog.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: GameInfoDialog.hxx,v 1.22 2007-02-06 23:34:34 stephena Exp $
|
// $Id: GameInfoDialog.hxx,v 1.23 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -28,12 +28,12 @@ class EditTextWidget;
|
||||||
class PopUpWidget;
|
class PopUpWidget;
|
||||||
class StaticTextWidget;
|
class StaticTextWidget;
|
||||||
class TabWidget;
|
class TabWidget;
|
||||||
class Properties;
|
|
||||||
class SliderWidget;
|
class SliderWidget;
|
||||||
|
|
||||||
#include "Array.hxx"
|
#include "Array.hxx"
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
#include "Command.hxx"
|
#include "Command.hxx"
|
||||||
|
#include "Props.hxx"
|
||||||
|
|
||||||
class GameInfoDialog : public Dialog, public CommandSender
|
class GameInfoDialog : public Dialog, public CommandSender
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: GameList.cxx,v 1.13 2007-09-01 23:31:18 stephena Exp $
|
// $Id: GameList.cxx,v 1.14 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from KStella - Stella frontend
|
// Based on code from KStella - Stella frontend
|
||||||
// Copyright (C) 2003-2005 Stephen Anthony
|
// Copyright (C) 2003-2005 Stephen Anthony
|
||||||
|
@ -22,7 +22,6 @@
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "GameList.hxx"
|
#include "GameList.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: GuiObject.hxx,v 1.22 2007-01-01 18:04:53 stephena Exp $
|
// $Id: GuiObject.hxx,v 1.23 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -31,11 +31,30 @@ class Widget;
|
||||||
|
|
||||||
typedef Common::Array<Widget*> WidgetArray;
|
typedef Common::Array<Widget*> WidgetArray;
|
||||||
|
|
||||||
|
// The commands generated by various widgets
|
||||||
|
enum {
|
||||||
|
kOKCmd = 'OK ',
|
||||||
|
kCloseCmd = 'CLOS',
|
||||||
|
kNextCmd = 'NEXT',
|
||||||
|
kPrevCmd = 'PREV',
|
||||||
|
kEditCmd = 'EDIT',
|
||||||
|
kDefaultsCmd = 'DEFA',
|
||||||
|
kSetPositionCmd = 'SETP',
|
||||||
|
kTabChangedCmd = 'TBCH',
|
||||||
|
kCheckActionCmd = 'CBAC',
|
||||||
|
kRefreshAllCmd = 'REFA',
|
||||||
|
kResizeCmd = 'RESZ'
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
kScrollBarWidth = 9
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This is the base class for all GUI objects/widgets.
|
This is the base class for all GUI objects/widgets.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: GuiObject.hxx,v 1.22 2007-01-01 18:04:53 stephena Exp $
|
@version $Id: GuiObject.hxx,v 1.23 2007-09-03 18:37:23 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class GuiObject : public CommandReceiver
|
class GuiObject : public CommandReceiver
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,19 +13,19 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: HelpDialog.cxx,v 1.22 2007-02-06 23:34:34 stephena Exp $
|
// $Id: HelpDialog.cxx,v 1.23 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "Dialog.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "HelpDialog.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "HelpDialog.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
HelpDialog::HelpDialog(OSystem* osystem, DialogContainer* parent,
|
HelpDialog::HelpDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
|
|
@ -13,19 +13,22 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: InputDialog.cxx,v 1.25 2007-01-24 19:17:33 stephena Exp $
|
// $Id: InputDialog.cxx,v 1.26 2007-09-03 18:37:23 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "Array.hxx"
|
|
||||||
#include "TabWidget.hxx"
|
|
||||||
#include "EventMappingWidget.hxx"
|
|
||||||
#include "InputDialog.hxx"
|
|
||||||
#include "PopUpWidget.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "Array.hxx"
|
||||||
|
#include "EventMappingWidget.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "PopUpWidget.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
#include "TabWidget.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
|
#include "InputDialog.hxx"
|
||||||
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
InputDialog::InputDialog(OSystem* osystem, DialogContainer* parent,
|
InputDialog::InputDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
const GUI::Font& font, int x, int y, int w, int h)
|
const GUI::Font& font, int x, int y, int w, int h)
|
||||||
|
|
|
@ -13,21 +13,21 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: InputTextDialog.cxx,v 1.18 2007-08-17 16:12:50 stephena Exp $
|
// $Id: InputTextDialog.cxx,v 1.19 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "Dialog.hxx"
|
||||||
|
#include "EditTextWidget.hxx"
|
||||||
|
#include "GuiObject.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "EditTextWidget.hxx"
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "GuiObject.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "InputTextDialog.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "InputTextDialog.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
InputTextDialog::InputTextDialog(GuiObject* boss, const GUI::Font& font,
|
InputTextDialog::InputTextDialog(GuiObject* boss, const GUI::Font& font,
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: LauncherDialog.cxx,v 1.70 2007-09-01 23:31:18 stephena Exp $
|
// $Id: LauncherDialog.cxx,v 1.71 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -21,25 +21,26 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "FSNode.hxx"
|
|
||||||
#include "BrowserDialog.hxx"
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "Settings.hxx"
|
|
||||||
#include "PropsSet.hxx"
|
|
||||||
#include "Props.hxx"
|
|
||||||
#include "MD5.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "StringListWidget.hxx"
|
|
||||||
#include "RomInfoWidget.hxx"
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "DialogContainer.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "ProgressDialog.hxx"
|
|
||||||
#include "OptionsDialog.hxx"
|
|
||||||
#include "LauncherDialog.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "BrowserDialog.hxx"
|
||||||
|
#include "DialogContainer.hxx"
|
||||||
|
#include "Dialog.hxx"
|
||||||
|
#include "FSNode.hxx"
|
||||||
|
#include "GameList.hxx"
|
||||||
|
#include "MD5.hxx"
|
||||||
|
#include "OptionsDialog.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "ProgressDialog.hxx"
|
||||||
|
#include "Props.hxx"
|
||||||
|
#include "PropsSet.hxx"
|
||||||
|
#include "RomInfoWidget.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
#include "StringListWidget.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
|
#include "LauncherDialog.hxx"
|
||||||
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
|
LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
@ -101,6 +102,7 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
xpos += myList->getWidth() + 15;
|
xpos += myList->getWidth() + 15;
|
||||||
myRomInfoWidget = new RomInfoWidget(this, font, xpos, ypos,
|
myRomInfoWidget = new RomInfoWidget(this, font, xpos, ypos,
|
||||||
326, myList->getHeight());
|
326, myList->getHeight());
|
||||||
|
wid.push_back(myRomInfoWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add note textwidget to show any notes for the currently selected ROM
|
// Add note textwidget to show any notes for the currently selected ROM
|
||||||
|
@ -399,6 +401,35 @@ void LauncherDialog::createListCache()
|
||||||
out.close();
|
out.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void LauncherDialog::loadRomInfo()
|
||||||
|
{
|
||||||
|
int item = myList->getSelected();
|
||||||
|
if(item < 0) return;
|
||||||
|
|
||||||
|
if(myGameList->isDir(item))
|
||||||
|
{
|
||||||
|
if(myRomInfoFlag)
|
||||||
|
myRomInfoWidget->clearInfo();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure we have a valid md5 for this ROM
|
||||||
|
if(myGameList->md5(item) == "")
|
||||||
|
myGameList->setMd5(item, MD5FromFile(myGameList->path(item)));
|
||||||
|
|
||||||
|
// Get the properties for this entry
|
||||||
|
Properties props;
|
||||||
|
const string& md5 = myGameList->md5(item);
|
||||||
|
instance()->propSet().getMD5(md5, props);
|
||||||
|
|
||||||
|
if(!myBrowseModeFlag)
|
||||||
|
myNote->setLabel(props.get(Cartridge_Note));
|
||||||
|
|
||||||
|
if(myRomInfoFlag)
|
||||||
|
myRomInfoWidget->showInfo(props);
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
string LauncherDialog::MD5FromFile(const string& path)
|
string LauncherDialog::MD5FromFile(const string& path)
|
||||||
{
|
{
|
||||||
|
@ -417,14 +448,13 @@ string LauncherDialog::MD5FromFile(const string& path)
|
||||||
void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
|
void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
int data, int id)
|
int data, int id)
|
||||||
{
|
{
|
||||||
int item;
|
|
||||||
|
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case kStartCmd:
|
case kStartCmd:
|
||||||
case kListItemActivatedCmd:
|
case kListItemActivatedCmd:
|
||||||
case kListItemDoubleClickedCmd:
|
case kListItemDoubleClickedCmd:
|
||||||
item = myList->getSelected();
|
{
|
||||||
|
int item = myList->getSelected();
|
||||||
if(item >= 0)
|
if(item >= 0)
|
||||||
{
|
{
|
||||||
const string& rom = myGameList->path(item);
|
const string& rom = myGameList->path(item);
|
||||||
|
@ -449,46 +479,20 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case kOptionsCmd:
|
case kOptionsCmd:
|
||||||
parent()->addDialog(myOptions);
|
parent()->addDialog(myOptions);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kPrevDirCmd:
|
case kPrevDirCmd:
|
||||||
{
|
|
||||||
myCurrentNode = myCurrentNode.getParent();
|
myCurrentNode = myCurrentNode.getParent();
|
||||||
updateListing(!myBrowseModeFlag); // Force full update in non-browse mode
|
updateListing(!myBrowseModeFlag); // Force full update in non-browse mode
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case kListSelectionChangedCmd:
|
case kListSelectionChangedCmd:
|
||||||
{
|
loadRomInfo();
|
||||||
item = myList->getSelected();
|
|
||||||
if(item < 0) break;
|
|
||||||
|
|
||||||
if(myGameList->isDir(item))
|
|
||||||
{
|
|
||||||
if(myRomInfoFlag)
|
|
||||||
myRomInfoWidget->clearInfo();
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure we have a valid md5 for this ROM
|
|
||||||
if(myGameList->md5(item) == "")
|
|
||||||
myGameList->setMd5(item, MD5FromFile(myGameList->path(item)));
|
|
||||||
|
|
||||||
// Get the properties for this entry
|
|
||||||
Properties props;
|
|
||||||
const string& md5 = myGameList->md5(item);
|
|
||||||
instance()->propSet().getMD5(md5, props);
|
|
||||||
|
|
||||||
if(!myBrowseModeFlag)
|
|
||||||
myNote->setLabel(props.get(Cartridge_Note));
|
|
||||||
|
|
||||||
if(myRomInfoFlag)
|
|
||||||
myRomInfoWidget->showInfo(props);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case kQuitCmd:
|
case kQuitCmd:
|
||||||
close();
|
close();
|
||||||
|
@ -515,6 +519,12 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
updateListing(true);
|
updateListing(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kResizeCmd:
|
||||||
|
// Instead of figuring out how to resize the snapshot image,
|
||||||
|
// we just reload it
|
||||||
|
loadRomInfo();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Dialog::handleCommand(sender, cmd, data, 0);
|
Dialog::handleCommand(sender, cmd, data, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: LauncherDialog.hxx,v 1.27 2007-09-01 23:31:18 stephena Exp $
|
// $Id: LauncherDialog.hxx,v 1.28 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -31,10 +31,10 @@ class StringListWidget;
|
||||||
class ButtonWidget;
|
class ButtonWidget;
|
||||||
class RomInfoWidget;
|
class RomInfoWidget;
|
||||||
class OSystem;
|
class OSystem;
|
||||||
|
class GameList;
|
||||||
|
|
||||||
#include "FSNode.hxx"
|
#include "FSNode.hxx"
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
#include "GameList.hxx"
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
// These must be accessible from LauncherOptionsDialog
|
// These must be accessible from LauncherOptionsDialog
|
||||||
|
@ -81,6 +81,7 @@ class LauncherDialog : public Dialog
|
||||||
void loadListFromDisk();
|
void loadListFromDisk();
|
||||||
void loadListFromCache();
|
void loadListFromCache();
|
||||||
void createListCache();
|
void createListCache();
|
||||||
|
void loadRomInfo();
|
||||||
string MD5FromFile(const string& path);
|
string MD5FromFile(const string& path);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -13,20 +13,21 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: PopUpWidget.cxx,v 1.37 2007-08-12 23:05:12 stephena Exp $
|
// $Id: PopUpWidget.cxx,v 1.38 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "FrameBuffer.hxx"
|
|
||||||
#include "Stack.hxx"
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "DialogContainer.hxx"
|
#include "DialogContainer.hxx"
|
||||||
#include "GuiUtils.hxx"
|
#include "Dialog.hxx"
|
||||||
|
#include "FrameBuffer.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "Stack.hxx"
|
||||||
#include "StringListWidget.hxx"
|
#include "StringListWidget.hxx"
|
||||||
|
|
||||||
#include "PopUpWidget.hxx"
|
#include "PopUpWidget.hxx"
|
||||||
|
|
||||||
#define UP_DOWN_BOX_HEIGHT 10
|
#define UP_DOWN_BOX_HEIGHT 10
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: PopUpWidget.hxx,v 1.18 2007-06-21 12:27:00 stephena Exp $
|
// $Id: PopUpWidget.hxx,v 1.19 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -25,15 +25,14 @@
|
||||||
class GUIObject;
|
class GUIObject;
|
||||||
class PopUpDialog;
|
class PopUpDialog;
|
||||||
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "Command.hxx"
|
|
||||||
#include "Array.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "Array.hxx"
|
||||||
|
#include "Command.hxx"
|
||||||
|
#include "Dialog.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Popup or dropdown widget which, when clicked, "pop up" a list of items and
|
* Popup or dropdown widget which, when clicked, "pop up" a list of items and
|
||||||
* lets the user pick on of them.
|
* lets the user pick on of them.
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: ProgressDialog.cxx,v 1.9 2007-08-06 20:16:51 stephena Exp $
|
// $Id: ProgressDialog.cxx,v 1.10 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -24,7 +24,6 @@
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
#include "DialogContainer.hxx"
|
#include "DialogContainer.hxx"
|
||||||
#include "ProgressDialog.hxx"
|
#include "ProgressDialog.hxx"
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
|
|
@ -13,17 +13,16 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: RomInfoWidget.cxx,v 1.1 2007-09-01 23:31:18 stephena Exp $
|
// $Id: RomInfoWidget.cxx,v 1.2 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "FrameBuffer.hxx"
|
#include "FrameBuffer.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
#include "Surface.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
|
|
||||||
#include "RomInfoWidget.hxx"
|
#include "RomInfoWidget.hxx"
|
||||||
|
@ -44,6 +43,11 @@ RomInfoWidget::~RomInfoWidget()
|
||||||
clearInfo(false);
|
clearInfo(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void RomInfoWidget::loadConfig()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void RomInfoWidget::showInfo(const Properties& props)
|
void RomInfoWidget::showInfo(const Properties& props)
|
||||||
{
|
{
|
||||||
|
@ -58,7 +62,7 @@ void RomInfoWidget::showInfo(const Properties& props)
|
||||||
// 'tEXt' chucks from the PNG image
|
// 'tEXt' chucks from the PNG image
|
||||||
StringList textChucks;
|
StringList textChucks;
|
||||||
|
|
||||||
// Get all possible names representing a snapshot file for this rom
|
// Get a valid filename representing a snapshot file for this rom
|
||||||
const string& path = instance()->settings().getString("ssdir");
|
const string& path = instance()->settings().getString("ssdir");
|
||||||
const string& filename = instance()->getFilename(path, props, "png");
|
const string& filename = instance()->getFilename(path, props, "png");
|
||||||
|
|
||||||
|
@ -89,7 +93,7 @@ void RomInfoWidget::showInfo(const Properties& props)
|
||||||
int s_height = BSPF_min(250, height);
|
int s_height = BSPF_min(250, height);
|
||||||
|
|
||||||
FrameBuffer& fb = instance()->frameBuffer();
|
FrameBuffer& fb = instance()->frameBuffer();
|
||||||
mySurface = fb.cloneSurface(s_width, s_height);
|
mySurface = fb.createSurface(s_width, s_height);
|
||||||
if(!parseIDATChunk(fb, mySurface, width, height, data, size))
|
if(!parseIDATChunk(fb, mySurface, width, height, data, size))
|
||||||
throw "RomInfoWidget: IDAT processing failed";
|
throw "RomInfoWidget: IDAT processing failed";
|
||||||
}
|
}
|
||||||
|
@ -112,38 +116,34 @@ void RomInfoWidget::showInfo(const Properties& props)
|
||||||
}
|
}
|
||||||
// Now add some info for the message box below the image
|
// Now add some info for the message box below the image
|
||||||
myRomInfo.push_back("Name: " + props.get(Cartridge_Name));
|
myRomInfo.push_back("Name: " + props.get(Cartridge_Name));
|
||||||
myRomInfo.push_back("MD5: " + props.get(Cartridge_MD5));
|
|
||||||
myRomInfo.push_back("Manufacturer: " + props.get(Cartridge_Manufacturer));
|
myRomInfo.push_back("Manufacturer: " + props.get(Cartridge_Manufacturer));
|
||||||
myRomInfo.push_back("Model: " + props.get(Cartridge_ModelNo));
|
myRomInfo.push_back("Model: " + props.get(Cartridge_ModelNo));
|
||||||
myRomInfo.push_back("Rarity: " + props.get(Cartridge_Rarity));
|
myRomInfo.push_back("Rarity: " + props.get(Cartridge_Rarity));
|
||||||
myRomInfo.push_back("Note: " + props.get(Cartridge_Note));
|
myRomInfo.push_back("Note: " + props.get(Cartridge_Note));
|
||||||
|
myRomInfo.push_back("Controllers: " + props.get(Controller_Left) +
|
||||||
|
" (left), " + props.get(Controller_Right) + " (right)");
|
||||||
// TODO - add the PNG tEXt chunks
|
// TODO - add the PNG tEXt chunks
|
||||||
|
|
||||||
loadConfig();
|
setDirty(); draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void RomInfoWidget::clearInfo(bool redraw)
|
void RomInfoWidget::clearInfo(bool redraw)
|
||||||
{
|
{
|
||||||
if(mySurface) SDL_FreeSurface(mySurface);
|
if(mySurface)
|
||||||
|
delete mySurface;
|
||||||
mySurface = NULL;
|
mySurface = NULL;
|
||||||
myRomInfo.clear();
|
myRomInfo.clear();
|
||||||
|
|
||||||
if(redraw)
|
if(redraw)
|
||||||
loadConfig();
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void RomInfoWidget::loadConfig()
|
|
||||||
{
|
{
|
||||||
setDirty(); draw();
|
setDirty(); draw();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void RomInfoWidget::drawWidget(bool hilite)
|
void RomInfoWidget::drawWidget(bool hilite)
|
||||||
{
|
{
|
||||||
// cerr << "RomInfoWidget::drawWidget\n";
|
|
||||||
FrameBuffer& fb = instance()->frameBuffer();
|
FrameBuffer& fb = instance()->frameBuffer();
|
||||||
|
|
||||||
fb.fillRect(_x+2, _y+2, _w-4, _h-4, kWidColor);
|
fb.fillRect(_x+2, _y+2, _w-4, _h-4, kWidColor);
|
||||||
|
@ -152,8 +152,8 @@ void RomInfoWidget::drawWidget(bool hilite)
|
||||||
|
|
||||||
if(mySurface)
|
if(mySurface)
|
||||||
{
|
{
|
||||||
int x = (_w - mySurface->w) >> 1;
|
int x = (_w - mySurface->getWidth()) >> 1;
|
||||||
int y = (256 - mySurface->h) >> 1;
|
int y = (256 - mySurface->getHeight()) >> 1;
|
||||||
fb.drawSurface(mySurface, x + getAbsX(), y + getAbsY());
|
fb.drawSurface(mySurface, x + getAbsX(), y + getAbsY());
|
||||||
}
|
}
|
||||||
int xpos = _x + 5, ypos = _y + 256 + 5;
|
int xpos = _x + 5, ypos = _y + 256 + 5;
|
||||||
|
@ -213,7 +213,7 @@ bool RomInfoWidget::parseIHDR(int& width, int& height, uInt8* data, int size)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool RomInfoWidget::parseIDATChunk(const FrameBuffer& fb, SDL_Surface* surface,
|
bool RomInfoWidget::parseIDATChunk(const FrameBuffer& fb, GUI::Surface* surface,
|
||||||
int width, int height, uInt8* data, int size)
|
int width, int height, uInt8* data, int size)
|
||||||
{
|
{
|
||||||
// The entire decompressed image data
|
// The entire decompressed image data
|
||||||
|
@ -226,17 +226,16 @@ bool RomInfoWidget::parseIDATChunk(const FrameBuffer& fb, SDL_Surface* surface,
|
||||||
if(uncompress(buffer, &bufsize, data, size) == Z_OK)
|
if(uncompress(buffer, &bufsize, data, size) == Z_OK)
|
||||||
{
|
{
|
||||||
uInt8* buf_ptr = buffer;
|
uInt8* buf_ptr = buffer;
|
||||||
int i_pitch = width * 3; // bytes per line of the image
|
int pitch = width * 3; // bytes per line of the image
|
||||||
int rowbytes = surface->w * 3; // bytes per line of the surface
|
for(int row = 0; row < height; row++, buf_ptr += pitch)
|
||||||
for(int row = 0; row < height; row++, buf_ptr += i_pitch)
|
|
||||||
{
|
{
|
||||||
buf_ptr++; // skip past first byte (PNG filter type)
|
buf_ptr++; // skip past first byte (PNG filter type)
|
||||||
fb.convertToSurface(surface, row, buf_ptr, rowbytes);
|
fb.bytesToSurface(surface, row, buf_ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cerr << "error decompressing data\n";
|
cerr << "RomInfoWidget: error decompressing data\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,15 +13,16 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: RomInfoWidget.hxx,v 1.1 2007-09-01 23:31:18 stephena Exp $
|
// $Id: RomInfoWidget.hxx,v 1.2 2007-09-03 18:37:23 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef ROM_INFO_WIDGET_HXX
|
#ifndef ROM_INFO_WIDGET_HXX
|
||||||
#define ROM_INFO_WIDGET_HXX
|
#define ROM_INFO_WIDGET_HXX
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
class GUI::Surface;
|
||||||
|
|
||||||
#include "Props.hxx"
|
#include "Props.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "Command.hxx"
|
#include "Command.hxx"
|
||||||
|
@ -47,13 +48,13 @@ class RomInfoWidget : public Widget
|
||||||
static bool isValidPNGHeader(uInt8* header);
|
static bool isValidPNGHeader(uInt8* header);
|
||||||
static void readPNGChunk(ifstream& in, string& type, uInt8** data, int& size);
|
static void readPNGChunk(ifstream& in, string& type, uInt8** data, int& size);
|
||||||
static bool parseIHDR(int& width, int& height, uInt8* data, int size);
|
static bool parseIHDR(int& width, int& height, uInt8* data, int size);
|
||||||
static bool parseIDATChunk(const FrameBuffer& fb, SDL_Surface* surface,
|
static bool parseIDATChunk(const FrameBuffer& fb, GUI::Surface* surface,
|
||||||
int width, int height, uInt8* data, int size);
|
int width, int height, uInt8* data, int size);
|
||||||
static string parseTextChunk(uInt8* data, int size);
|
static string parseTextChunk(uInt8* data, int size);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Surface holding the scaled PNG image, ready for drawing by SDL_BlitSurface
|
// Surface holding the scaled PNG image
|
||||||
SDL_Surface* mySurface;
|
GUI::Surface* mySurface;
|
||||||
|
|
||||||
// Some ROM properties info, as well as 'tEXt' chunks from the PNG image
|
// Some ROM properties info, as well as 'tEXt' chunks from the PNG image
|
||||||
StringList myRomInfo;
|
StringList myRomInfo;
|
||||||
|
|
|
@ -13,41 +13,32 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: GuiUtils.hxx,v 1.27 2007-07-31 15:46:21 stephena Exp $
|
// $Id: Surface.cxx,v 1.1 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef UTILITIES_HXX
|
#include <SDL.h>
|
||||||
#define UTILITIES_HXX
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "Surface.hxx"
|
||||||
|
|
||||||
/**
|
namespace GUI {
|
||||||
A place to put GUI-related things that don't fit anywhere else.
|
|
||||||
Probably not very neat, but at least it works ...
|
|
||||||
|
|
||||||
@author Stephen Anthony
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
@version $Id: GuiUtils.hxx,v 1.27 2007-07-31 15:46:21 stephena Exp $
|
Surface::Surface(int width, int height, SDL_Surface* data)
|
||||||
*/
|
: myBaseWidth(width),
|
||||||
|
myBaseHeight(height),
|
||||||
|
myData(data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#define kScrollBarWidth 9
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
Surface::~Surface()
|
||||||
|
{
|
||||||
|
if(myData)
|
||||||
|
SDL_FreeSurface(myData);
|
||||||
|
myData = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// The commands generated by various widgets
|
} // namespace GUI
|
||||||
enum {
|
|
||||||
kOKCmd = 'OK ',
|
|
||||||
kCloseCmd = 'CLOS',
|
|
||||||
kNextCmd = 'NEXT',
|
|
||||||
kPrevCmd = 'PREV',
|
|
||||||
kEditCmd = 'EDIT',
|
|
||||||
kDefaultsCmd = 'DEFA',
|
|
||||||
kSetPositionCmd = 'SETP',
|
|
||||||
kTabChangedCmd = 'TBCH',
|
|
||||||
kCheckActionCmd = 'CBAC',
|
|
||||||
kRefreshAllCmd = 'REFA'
|
|
||||||
};
|
|
||||||
|
|
||||||
static const string EmptyString("");
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
//============================================================================
|
||||||
|
//
|
||||||
|
// SSSS tt lll lll
|
||||||
|
// SS SS tt ll ll
|
||||||
|
// SS tttttt eeee ll ll aaaa
|
||||||
|
// SSSS tt ee ee ll ll aa
|
||||||
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
||||||
|
// SS SS tt ee ll ll aa aa
|
||||||
|
// SSSS ttt eeeee llll llll aaaaa
|
||||||
|
//
|
||||||
|
// Copyright (c) 1995-2007 by Bradford W. Mott and the Stella team
|
||||||
|
//
|
||||||
|
// See the file "license" for information on usage and redistribution of
|
||||||
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
|
//
|
||||||
|
// $Id: Surface.hxx,v 1.1 2007-09-03 18:37:23 stephena Exp $
|
||||||
|
//============================================================================
|
||||||
|
|
||||||
|
#ifndef GUI_SURFACE_HXX
|
||||||
|
#define GUI_SURFACE_HXX
|
||||||
|
|
||||||
|
#include <SDL.h>
|
||||||
|
|
||||||
|
namespace GUI {
|
||||||
|
|
||||||
|
/**
|
||||||
|
This class is basically a thin wrapper around an SDL_Surface structure.
|
||||||
|
We do it this way so the SDL stuff won't be dragged into the depths of
|
||||||
|
the codebase.
|
||||||
|
|
||||||
|
@author Stephen Anthony
|
||||||
|
@version $Id: Surface.hxx,v 1.1 2007-09-03 18:37:23 stephena Exp $
|
||||||
|
*/
|
||||||
|
class Surface
|
||||||
|
{
|
||||||
|
friend class FrameBuffer;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Surface(int width, int height, SDL_Surface* surface);
|
||||||
|
virtual ~Surface();
|
||||||
|
|
||||||
|
int getWidth() const { return myBaseWidth; }
|
||||||
|
int getHeight() const { return myBaseHeight; }
|
||||||
|
|
||||||
|
public:
|
||||||
|
int myBaseWidth;
|
||||||
|
int myBaseHeight;
|
||||||
|
|
||||||
|
SDL_Surface* myData;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace GUI
|
||||||
|
|
||||||
|
#endif
|
|
@ -13,19 +13,20 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: TabWidget.cxx,v 1.29 2007-08-15 17:43:51 stephena Exp $
|
// $Id: TabWidget.cxx,v 1.30 2007-09-03 18:37:23 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "FrameBuffer.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "GuiObject.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
|
#include "FrameBuffer.hxx"
|
||||||
|
#include "GuiObject.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
#include "TabWidget.hxx"
|
#include "TabWidget.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: TabWidget.hxx,v 1.17 2007-01-23 14:57:14 knakos Exp $
|
// $Id: TabWidget.hxx,v 1.18 2007-09-03 18:37:24 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -22,12 +22,12 @@
|
||||||
#ifndef TAB_WIDGET_HXX
|
#ifndef TAB_WIDGET_HXX
|
||||||
#define TAB_WIDGET_HXX
|
#define TAB_WIDGET_HXX
|
||||||
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "Command.hxx"
|
|
||||||
#include "Array.hxx"
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "Array.hxx"
|
||||||
|
#include "Command.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
class TabWidget : public Widget, public CommandSender
|
class TabWidget : public Widget, public CommandSender
|
||||||
{
|
{
|
||||||
struct Tab {
|
struct Tab {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: UIDialog.cxx,v 1.7 2007-08-15 17:43:51 stephena Exp $
|
// $Id: UIDialog.cxx,v 1.8 2007-09-03 18:37:24 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -21,16 +21,16 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "Dialog.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
|
#include "PopUpWidget.hxx"
|
||||||
|
#include "ScrollBarWidget.hxx"
|
||||||
#include "Settings.hxx"
|
#include "Settings.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "PopUpWidget.hxx"
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "UIDialog.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "ScrollBarWidget.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "UIDialog.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent,
|
UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: VideoDialog.cxx,v 1.46 2007-08-21 17:58:25 stephena Exp $
|
// $Id: VideoDialog.cxx,v 1.47 2007-09-03 18:37:24 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -21,18 +21,18 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "Settings.hxx"
|
|
||||||
#include "Menu.hxx"
|
|
||||||
#include "Control.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "PopUpWidget.hxx"
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "VideoDialog.hxx"
|
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "Control.hxx"
|
||||||
|
#include "Dialog.hxx"
|
||||||
|
#include "Menu.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
#include "PopUpWidget.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
|
#include "VideoDialog.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
|
VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
const GUI::Font& font, int x, int y, int w, int h)
|
const GUI::Font& font, int x, int y, int w, int h)
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Widget.cxx,v 1.55 2007-08-15 17:43:51 stephena Exp $
|
// $Id: Widget.cxx,v 1.56 2007-09-03 18:37:24 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "FrameBuffer.hxx"
|
|
||||||
#include "Font.hxx"
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "DialogContainer.hxx"
|
|
||||||
#include "Command.hxx"
|
|
||||||
#include "GuiObject.hxx"
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "Widget.hxx"
|
#include "Command.hxx"
|
||||||
|
#include "DialogContainer.hxx"
|
||||||
|
#include "Dialog.hxx"
|
||||||
#include "EditableWidget.hxx"
|
#include "EditableWidget.hxx"
|
||||||
|
#include "Font.hxx"
|
||||||
|
#include "FrameBuffer.hxx"
|
||||||
|
#include "GuiObject.hxx"
|
||||||
|
#include "OSystem.hxx"
|
||||||
|
|
||||||
|
#include "Widget.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Widget::Widget(GuiObject* boss, const GUI::Font& font,
|
Widget::Widget(GuiObject* boss, const GUI::Font& font,
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Widget.hxx,v 1.57 2007-08-12 23:05:12 stephena Exp $
|
// $Id: Widget.hxx,v 1.58 2007-09-03 18:37:24 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -26,15 +26,15 @@ class Dialog;
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
#include "Array.hxx"
|
||||||
#include "Event.hxx"
|
#include "Event.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "Font.hxx"
|
||||||
#include "FrameBuffer.hxx"
|
#include "FrameBuffer.hxx"
|
||||||
#include "GuiObject.hxx"
|
#include "GuiObject.hxx"
|
||||||
#include "GuiUtils.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "Array.hxx"
|
|
||||||
#include "Rect.hxx"
|
#include "Rect.hxx"
|
||||||
#include "Font.hxx"
|
|
||||||
#include "bspf.hxx"
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
WIDGET_ENABLED = 1 << 0,
|
WIDGET_ENABLED = 1 << 0,
|
||||||
|
@ -87,7 +87,7 @@ enum {
|
||||||
This is the base class for all widgets.
|
This is the base class for all widgets.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: Widget.hxx,v 1.57 2007-08-12 23:05:12 stephena Exp $
|
@version $Id: Widget.hxx,v 1.58 2007-09-03 18:37:24 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class Widget : public GuiObject
|
class Widget : public GuiObject
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,6 +27,7 @@ MODULE_OBJS := \
|
||||||
src/gui/ProgressDialog.o \
|
src/gui/ProgressDialog.o \
|
||||||
src/gui/RomInfoWidget.o \
|
src/gui/RomInfoWidget.o \
|
||||||
src/gui/ScrollBarWidget.o \
|
src/gui/ScrollBarWidget.o \
|
||||||
|
src/gui/Surface.o \
|
||||||
src/gui/CheckListWidget.o \
|
src/gui/CheckListWidget.o \
|
||||||
src/gui/StringListWidget.o \
|
src/gui/StringListWidget.o \
|
||||||
src/gui/TabWidget.o \
|
src/gui/TabWidget.o \
|
||||||
|
|
|
@ -2852,15 +2852,6 @@
|
||||||
refType = 2;
|
refType = 2;
|
||||||
sourceTree = SOURCE_ROOT;
|
sourceTree = SOURCE_ROOT;
|
||||||
};
|
};
|
||||||
2DDBEAB7084578BF00812C11 = {
|
|
||||||
fileEncoding = 30;
|
|
||||||
isa = PBXFileReference;
|
|
||||||
lastKnownFileType = sourcecode.cpp.h;
|
|
||||||
name = GuiUtils.hxx;
|
|
||||||
path = ../gui/GuiUtils.hxx;
|
|
||||||
refType = 2;
|
|
||||||
sourceTree = SOURCE_ROOT;
|
|
||||||
};
|
|
||||||
2DDBEAB8084578BF00812C11 = {
|
2DDBEAB8084578BF00812C11 = {
|
||||||
fileEncoding = 30;
|
fileEncoding = 30;
|
||||||
isa = PBXFileReference;
|
isa = PBXFileReference;
|
||||||
|
|
|
@ -70,7 +70,6 @@
|
||||||
2D91740609BA90380026E9FF /* GameInfoDialog.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEAB3084578BF00812C11 /* GameInfoDialog.hxx */; };
|
2D91740609BA90380026E9FF /* GameInfoDialog.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEAB3084578BF00812C11 /* GameInfoDialog.hxx */; };
|
||||||
2D91740709BA90380026E9FF /* GameList.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEAB5084578BF00812C11 /* GameList.hxx */; };
|
2D91740709BA90380026E9FF /* GameList.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEAB5084578BF00812C11 /* GameList.hxx */; };
|
||||||
2D91740809BA90380026E9FF /* GuiObject.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEAB6084578BF00812C11 /* GuiObject.hxx */; };
|
2D91740809BA90380026E9FF /* GuiObject.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEAB6084578BF00812C11 /* GuiObject.hxx */; };
|
||||||
2D91740909BA90380026E9FF /* GuiUtils.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEAB7084578BF00812C11 /* GuiUtils.hxx */; };
|
|
||||||
2D91740A09BA90380026E9FF /* HelpDialog.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEAB9084578BF00812C11 /* HelpDialog.hxx */; };
|
2D91740A09BA90380026E9FF /* HelpDialog.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEAB9084578BF00812C11 /* HelpDialog.hxx */; };
|
||||||
2D91740B09BA90380026E9FF /* Launcher.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEABB084578BF00812C11 /* Launcher.hxx */; };
|
2D91740B09BA90380026E9FF /* Launcher.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEABB084578BF00812C11 /* Launcher.hxx */; };
|
||||||
2D91740C09BA90380026E9FF /* LauncherDialog.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEABD084578BF00812C11 /* LauncherDialog.hxx */; };
|
2D91740C09BA90380026E9FF /* LauncherDialog.hxx in Headers */ = {isa = PBXBuildFile; fileRef = 2DDBEABD084578BF00812C11 /* LauncherDialog.hxx */; };
|
||||||
|
@ -495,7 +494,6 @@
|
||||||
2DDBEAB4084578BF00812C11 /* GameList.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GameList.cxx; path = ../gui/GameList.cxx; sourceTree = SOURCE_ROOT; };
|
2DDBEAB4084578BF00812C11 /* GameList.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GameList.cxx; path = ../gui/GameList.cxx; sourceTree = SOURCE_ROOT; };
|
||||||
2DDBEAB5084578BF00812C11 /* GameList.hxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = GameList.hxx; path = ../gui/GameList.hxx; sourceTree = SOURCE_ROOT; };
|
2DDBEAB5084578BF00812C11 /* GameList.hxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = GameList.hxx; path = ../gui/GameList.hxx; sourceTree = SOURCE_ROOT; };
|
||||||
2DDBEAB6084578BF00812C11 /* GuiObject.hxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = GuiObject.hxx; path = ../gui/GuiObject.hxx; sourceTree = SOURCE_ROOT; };
|
2DDBEAB6084578BF00812C11 /* GuiObject.hxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = GuiObject.hxx; path = ../gui/GuiObject.hxx; sourceTree = SOURCE_ROOT; };
|
||||||
2DDBEAB7084578BF00812C11 /* GuiUtils.hxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = GuiUtils.hxx; path = ../gui/GuiUtils.hxx; sourceTree = SOURCE_ROOT; };
|
|
||||||
2DDBEAB8084578BF00812C11 /* HelpDialog.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = HelpDialog.cxx; path = ../gui/HelpDialog.cxx; sourceTree = SOURCE_ROOT; };
|
2DDBEAB8084578BF00812C11 /* HelpDialog.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = HelpDialog.cxx; path = ../gui/HelpDialog.cxx; sourceTree = SOURCE_ROOT; };
|
||||||
2DDBEAB9084578BF00812C11 /* HelpDialog.hxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = HelpDialog.hxx; path = ../gui/HelpDialog.hxx; sourceTree = SOURCE_ROOT; };
|
2DDBEAB9084578BF00812C11 /* HelpDialog.hxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = HelpDialog.hxx; path = ../gui/HelpDialog.hxx; sourceTree = SOURCE_ROOT; };
|
||||||
2DDBEABA084578BF00812C11 /* Launcher.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Launcher.cxx; path = ../gui/Launcher.cxx; sourceTree = SOURCE_ROOT; };
|
2DDBEABA084578BF00812C11 /* Launcher.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Launcher.cxx; path = ../gui/Launcher.cxx; sourceTree = SOURCE_ROOT; };
|
||||||
|
@ -1008,7 +1006,6 @@
|
||||||
2DDBEAB4084578BF00812C11 /* GameList.cxx */,
|
2DDBEAB4084578BF00812C11 /* GameList.cxx */,
|
||||||
2DDBEAB5084578BF00812C11 /* GameList.hxx */,
|
2DDBEAB5084578BF00812C11 /* GameList.hxx */,
|
||||||
2DDBEAB6084578BF00812C11 /* GuiObject.hxx */,
|
2DDBEAB6084578BF00812C11 /* GuiObject.hxx */,
|
||||||
2DDBEAB7084578BF00812C11 /* GuiUtils.hxx */,
|
|
||||||
2DDBEAB8084578BF00812C11 /* HelpDialog.cxx */,
|
2DDBEAB8084578BF00812C11 /* HelpDialog.cxx */,
|
||||||
2DDBEAB9084578BF00812C11 /* HelpDialog.hxx */,
|
2DDBEAB9084578BF00812C11 /* HelpDialog.hxx */,
|
||||||
2D05FF60096E269100A518FE /* InputDialog.cxx */,
|
2D05FF60096E269100A518FE /* InputDialog.cxx */,
|
||||||
|
@ -1172,7 +1169,6 @@
|
||||||
2D91740609BA90380026E9FF /* GameInfoDialog.hxx in Headers */,
|
2D91740609BA90380026E9FF /* GameInfoDialog.hxx in Headers */,
|
||||||
2D91740709BA90380026E9FF /* GameList.hxx in Headers */,
|
2D91740709BA90380026E9FF /* GameList.hxx in Headers */,
|
||||||
2D91740809BA90380026E9FF /* GuiObject.hxx in Headers */,
|
2D91740809BA90380026E9FF /* GuiObject.hxx in Headers */,
|
||||||
2D91740909BA90380026E9FF /* GuiUtils.hxx in Headers */,
|
|
||||||
2D91740A09BA90380026E9FF /* HelpDialog.hxx in Headers */,
|
2D91740A09BA90380026E9FF /* HelpDialog.hxx in Headers */,
|
||||||
2D91740B09BA90380026E9FF /* Launcher.hxx in Headers */,
|
2D91740B09BA90380026E9FF /* Launcher.hxx in Headers */,
|
||||||
2D91740C09BA90380026E9FF /* LauncherDialog.hxx in Headers */,
|
2D91740C09BA90380026E9FF /* LauncherDialog.hxx in Headers */,
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferD3D.cxx,v 1.1 2007-08-05 15:34:26 stephena Exp $
|
// $Id: FrameBufferD3D.cxx,v 1.2 2007-09-03 18:37:24 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifdef DISPLAY_D3D
|
#ifdef DISPLAY_D3D
|
||||||
|
@ -29,7 +29,6 @@
|
||||||
#include "Settings.hxx"
|
#include "Settings.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "Font.hxx"
|
#include "Font.hxx"
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
FrameBufferD3D::FrameBufferD3D(OSystem* osystem)
|
FrameBufferD3D::FrameBufferD3D(OSystem* osystem)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferD3D.hxx,v 1.1 2007-08-05 15:34:26 stephena Exp $
|
// $Id: FrameBufferD3D.hxx,v 1.2 2007-09-03 18:37:24 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef FRAMEBUFFER_D3D_HXX
|
#ifndef FRAMEBUFFER_D3D_HXX
|
||||||
|
@ -29,7 +29,6 @@
|
||||||
#include <d3dx9.h>
|
#include <d3dx9.h>
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "GuiUtils.hxx"
|
|
||||||
#include "FrameBuffer.hxx"
|
#include "FrameBuffer.hxx"
|
||||||
|
|
||||||
class OSystem;
|
class OSystem;
|
||||||
|
@ -39,7 +38,7 @@ class GUI::Font;
|
||||||
This class implements an SDL Direct3D framebuffer.
|
This class implements an SDL Direct3D framebuffer.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: FrameBufferD3D.hxx,v 1.1 2007-08-05 15:34:26 stephena Exp $
|
@version $Id: FrameBufferD3D.hxx,v 1.2 2007-09-03 18:37:24 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class FrameBufferD3D : public FrameBuffer
|
class FrameBufferD3D : public FrameBuffer
|
||||||
{
|
{
|
||||||
|
|
|
@ -1240,10 +1240,6 @@
|
||||||
RelativePath="..\gui\GuiObject.hxx"
|
RelativePath="..\gui\GuiObject.hxx"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\gui\GuiUtils.hxx"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\gui\HelpDialog.hxx"
|
RelativePath="..\gui\HelpDialog.hxx"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue