2002-08-24 10:41:32 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2004-02-29 00:49:40 +00:00
|
|
|
* Copyright (C) 2001 Ludvig Strigeus
|
2005-01-01 16:09:25 +00:00
|
|
|
* Copyright (C) 2001-2005 The ScummVM project
|
2002-08-24 10:41:32 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* $Header$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SDL_COMMON_H
|
|
|
|
#define SDL_COMMON_H
|
|
|
|
|
2003-08-01 12:21:04 +00:00
|
|
|
#include "common/stdafx.h"
|
|
|
|
#include "common/scummsys.h"
|
2004-02-27 19:35:51 +00:00
|
|
|
#include "common/scaler.h"
|
2003-08-01 12:21:04 +00:00
|
|
|
#include "common/system.h"
|
2003-07-31 12:33:33 +00:00
|
|
|
#include "backends/intern.h"
|
2002-08-24 10:41:32 +00:00
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
|
2004-05-09 14:30:29 +00:00
|
|
|
#ifndef _WIN32_WCE
|
2004-03-13 14:19:15 +00:00
|
|
|
// Uncomment this to enable the 'on screen display' code.
|
|
|
|
#define USE_OSD 1
|
2004-05-09 14:30:29 +00:00
|
|
|
#endif
|
2004-03-13 14:19:15 +00:00
|
|
|
|
2005-04-09 13:31:47 +00:00
|
|
|
|
|
|
|
enum {
|
|
|
|
GFX_NORMAL = 0,
|
|
|
|
GFX_DOUBLESIZE = 1,
|
|
|
|
GFX_TRIPLESIZE = 2,
|
|
|
|
GFX_2XSAI = 3,
|
|
|
|
GFX_SUPER2XSAI = 4,
|
|
|
|
GFX_SUPEREAGLE = 5,
|
|
|
|
GFX_ADVMAME2X = 6,
|
|
|
|
GFX_ADVMAME3X = 7,
|
|
|
|
GFX_HQ2X = 8,
|
|
|
|
GFX_HQ3X = 9,
|
|
|
|
GFX_TV2X = 10,
|
|
|
|
GFX_DOTMATRIX = 11
|
|
|
|
};
|
|
|
|
|
2004-10-15 22:28:12 +00:00
|
|
|
static const int s_gfxModeSwitchTable[][4] = {
|
|
|
|
{ GFX_NORMAL, GFX_DOUBLESIZE, GFX_TRIPLESIZE, -1 },
|
|
|
|
{ GFX_NORMAL, GFX_ADVMAME2X, GFX_ADVMAME3X, -1 },
|
|
|
|
{ GFX_NORMAL, GFX_HQ2X, GFX_HQ3X, -1 },
|
|
|
|
{ GFX_NORMAL, GFX_2XSAI, -1, -1 },
|
|
|
|
{ GFX_NORMAL, GFX_SUPER2XSAI, -1, -1 },
|
|
|
|
{ GFX_NORMAL, GFX_SUPEREAGLE, -1, -1 },
|
|
|
|
{ GFX_NORMAL, GFX_TV2X, -1, -1 },
|
|
|
|
{ GFX_NORMAL, GFX_DOTMATRIX, -1, -1 }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-02-29 00:49:40 +00:00
|
|
|
class OSystem_SDL : public OSystem {
|
2002-08-24 10:41:32 +00:00
|
|
|
public:
|
2004-02-29 00:49:40 +00:00
|
|
|
OSystem_SDL();
|
|
|
|
virtual ~OSystem_SDL();
|
|
|
|
|
2004-11-23 21:30:38 +00:00
|
|
|
void beginGFXTransaction(void);
|
|
|
|
void endGFXTransaction(void);
|
|
|
|
|
2002-08-24 10:41:32 +00:00
|
|
|
// Set the size of the video bitmap.
|
|
|
|
// Typically, 320x200
|
2005-03-09 23:07:32 +00:00
|
|
|
virtual void initSize(uint w, uint h, int overlayScale); // overloaded by CE backend
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2003-07-02 15:08:46 +00:00
|
|
|
// Set colors of the palette
|
2004-02-28 12:58:13 +00:00
|
|
|
void setPalette(const byte *colors, uint start, uint num);
|
2003-07-02 15:08:46 +00:00
|
|
|
|
2002-08-24 10:41:32 +00:00
|
|
|
// Draw a bitmap to screen.
|
|
|
|
// The screen will not be updated to reflect the new bitmap
|
2004-03-28 16:30:50 +00:00
|
|
|
void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h);
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2004-11-13 04:33:33 +00:00
|
|
|
// Clear the screen
|
|
|
|
void clearScreen();
|
|
|
|
|
2002-08-24 10:41:32 +00:00
|
|
|
// Update the dirty areas of the screen
|
2004-02-28 12:58:13 +00:00
|
|
|
void updateScreen();
|
2002-08-24 10:41:32 +00:00
|
|
|
|
|
|
|
// Either show or hide the mouse cursor
|
2004-03-28 16:30:50 +00:00
|
|
|
bool showMouse(bool visible);
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2003-01-09 08:07:13 +00:00
|
|
|
// Warp the mouse cursor. Where set_mouse_pos() only informs the
|
|
|
|
// backend of the mouse cursor's current position, this function
|
|
|
|
// actually moves the cursor to the specified position.
|
2004-12-11 15:17:47 +00:00
|
|
|
virtual void warpMouse(int x, int y); // overloaded by CE backend
|
2003-03-06 18:30:44 +00:00
|
|
|
|
2002-08-24 10:41:32 +00:00
|
|
|
// Set the bitmap that's used when drawing the cursor.
|
2005-02-17 23:01:00 +00:00
|
|
|
void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor, int cursorTargetScale);
|
|
|
|
|
|
|
|
// Set colors of cursor palette
|
|
|
|
void setCursorPalette(const byte *colors, uint start, uint num);
|
2003-03-06 18:30:44 +00:00
|
|
|
|
2005-02-20 02:04:45 +00:00
|
|
|
// Disables or enables cursor palette
|
|
|
|
void disableCursorPalette(bool disable) { _cursorPaletteDisabled = disable; };
|
|
|
|
|
2002-08-24 10:41:32 +00:00
|
|
|
// Shaking is used in SCUMM. Set current shake position.
|
2004-09-28 20:19:37 +00:00
|
|
|
void setShakePos(int shake_pos);
|
2003-03-06 18:30:44 +00:00
|
|
|
|
2002-08-24 10:41:32 +00:00
|
|
|
// Get the number of milliseconds since the program was started.
|
2004-09-28 20:19:37 +00:00
|
|
|
uint32 getMillis();
|
2003-03-06 18:30:44 +00:00
|
|
|
|
2002-08-24 10:41:32 +00:00
|
|
|
// Delay for a specified amount of milliseconds
|
2004-09-28 20:19:37 +00:00
|
|
|
void delayMillis(uint msecs);
|
2003-03-06 18:30:44 +00:00
|
|
|
|
2002-08-24 10:41:32 +00:00
|
|
|
// Get the next event.
|
|
|
|
// Returns true if an event was retrieved.
|
2004-12-11 15:17:47 +00:00
|
|
|
virtual bool pollEvent(Event &event); // overloaded by CE backend
|
2003-03-06 18:30:44 +00:00
|
|
|
|
2002-08-24 10:41:32 +00:00
|
|
|
// Set function that generates samples
|
2004-12-11 15:17:47 +00:00
|
|
|
virtual bool setSoundCallback(SoundProc proc, void *param); // overloaded by CE backend
|
2003-06-09 01:19:25 +00:00
|
|
|
|
2004-02-24 22:39:42 +00:00
|
|
|
void clearSoundCallback();
|
2003-03-06 18:30:44 +00:00
|
|
|
|
2002-09-28 16:19:28 +00:00
|
|
|
// Poll CD status
|
2002-08-24 10:41:32 +00:00
|
|
|
// Returns true if cd audio is playing
|
2004-09-28 20:19:37 +00:00
|
|
|
bool pollCD();
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2002-09-28 16:19:28 +00:00
|
|
|
// Play CD audio track
|
2004-09-28 20:19:37 +00:00
|
|
|
void playCD(int track, int num_loops, int start_frame, int duration);
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2002-09-28 16:19:28 +00:00
|
|
|
// Stop CD audio track
|
2004-09-28 20:19:37 +00:00
|
|
|
void stopCD();
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2002-09-28 16:19:28 +00:00
|
|
|
// Update CD audio status
|
2004-09-28 20:19:37 +00:00
|
|
|
void updateCD();
|
2002-08-24 10:41:32 +00:00
|
|
|
|
|
|
|
// Quit
|
2004-12-11 15:17:47 +00:00
|
|
|
virtual void quit(); // overloaded by CE backend
|
2002-08-24 10:41:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Add a callback timer
|
2004-03-15 01:18:47 +00:00
|
|
|
void setTimerCallback(TimerProc callback, int timer);
|
2002-08-24 10:41:32 +00:00
|
|
|
|
|
|
|
// Mutex handling
|
2004-02-28 12:58:13 +00:00
|
|
|
MutexRef createMutex();
|
|
|
|
void lockMutex(MutexRef mutex);
|
|
|
|
void unlockMutex(MutexRef mutex);
|
|
|
|
void deleteMutex(MutexRef mutex);
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2002-12-13 17:27:28 +00:00
|
|
|
// Overlay
|
2004-03-28 16:30:50 +00:00
|
|
|
virtual void showOverlay();
|
|
|
|
virtual void hideOverlay();
|
|
|
|
virtual void clearOverlay();
|
|
|
|
virtual void grabOverlay(OverlayColor *buf, int pitch);
|
|
|
|
virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
|
2004-03-15 00:45:45 +00:00
|
|
|
virtual int16 getHeight();
|
|
|
|
virtual int16 getWidth();
|
2005-03-09 23:07:32 +00:00
|
|
|
virtual int16 getOverlayHeight() { return _overlayHeight; }
|
|
|
|
virtual int16 getOverlayWidth() { return _overlayWidth; }
|
2005-03-14 08:24:39 +00:00
|
|
|
virtual int screenToOverlayX(int x) { return x * _overlayScale; }
|
|
|
|
virtual int screenToOverlayY(int y) { return y * _overlayScale; }
|
|
|
|
virtual int overlayToScreenX(int x) { return x / _overlayScale; }
|
|
|
|
virtual int overlayToScreenY(int y) { return y / _overlayScale; }
|
2002-12-13 17:27:28 +00:00
|
|
|
|
2003-03-08 06:53:32 +00:00
|
|
|
// Methods that convert RGB to/from colors suitable for the overlay.
|
2004-03-13 14:19:15 +00:00
|
|
|
virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b);
|
|
|
|
virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b);
|
2002-12-13 17:27:28 +00:00
|
|
|
|
2004-02-24 22:39:42 +00:00
|
|
|
|
|
|
|
virtual const GraphicsMode *getSupportedGraphicsModes() const;
|
2004-03-15 00:45:45 +00:00
|
|
|
virtual int getDefaultGraphicsMode() const;
|
2004-02-24 22:39:42 +00:00
|
|
|
virtual bool setGraphicsMode(int mode);
|
|
|
|
virtual int getGraphicsMode() const;
|
|
|
|
|
|
|
|
virtual void setWindowCaption(const char *caption);
|
|
|
|
virtual bool openCD(int drive);
|
|
|
|
virtual int getOutputSampleRate() const;
|
|
|
|
|
|
|
|
virtual bool hasFeature(Feature f);
|
|
|
|
virtual void setFeatureState(Feature f, bool enable);
|
|
|
|
virtual bool getFeatureState(Feature f);
|
|
|
|
|
2004-03-28 20:31:18 +00:00
|
|
|
#ifdef USE_OSD
|
|
|
|
void displayMessageOnOSD(const char *msg);
|
|
|
|
#endif
|
|
|
|
|
2002-08-24 10:41:32 +00:00
|
|
|
protected:
|
2004-12-01 21:16:55 +00:00
|
|
|
void initIntern();
|
2003-05-14 19:44:41 +00:00
|
|
|
|
2004-03-13 14:19:15 +00:00
|
|
|
#ifdef USE_OSD
|
|
|
|
SDL_Surface *_osdSurface;
|
|
|
|
Uint8 _osdAlpha; // Transparency level of the OSD
|
|
|
|
uint32 _osdFadeStartTime; // When to start the fade out
|
|
|
|
enum {
|
|
|
|
kOSDFadeOutDelay = 2 * 1000, // Delay before the OSD is faded out (in milliseconds)
|
|
|
|
kOSDFadeOutDuration = 500, // Duration of the OSD fade out (in milliseconds)
|
|
|
|
kOSDColorKey = 1,
|
|
|
|
kOSDInitialAlpha = 80 // Initial alpha level, in percent
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2004-02-29 00:49:40 +00:00
|
|
|
// hardware screen
|
|
|
|
SDL_Surface *_hwscreen;
|
|
|
|
|
2002-09-28 16:19:28 +00:00
|
|
|
// unseen game screen
|
|
|
|
SDL_Surface *_screen;
|
|
|
|
int _screenWidth, _screenHeight;
|
|
|
|
|
2005-03-09 23:07:32 +00:00
|
|
|
// temporary screen (for scalers)
|
2002-12-13 17:21:23 +00:00
|
|
|
SDL_Surface *_tmpscreen;
|
2005-03-09 23:07:32 +00:00
|
|
|
SDL_Surface *_tmpscreen2;
|
|
|
|
|
|
|
|
// overlay
|
|
|
|
SDL_Surface *_overlayscreen;
|
|
|
|
int _overlayWidth, _overlayHeight;
|
|
|
|
int _overlayScale;
|
2002-12-13 17:21:23 +00:00
|
|
|
bool _overlayVisible;
|
|
|
|
|
2004-07-16 10:24:29 +00:00
|
|
|
// Audio
|
|
|
|
int _samplesPerSec;
|
|
|
|
|
2002-09-28 16:19:28 +00:00
|
|
|
// CD Audio
|
|
|
|
SDL_CD *_cdrom;
|
2004-12-01 21:16:55 +00:00
|
|
|
int _cdTrack, _cdNumLoops, _cdStartFrame, _cdDuration;
|
|
|
|
uint32 _cdEndTime, _cdStopTime;
|
2002-08-24 10:41:32 +00:00
|
|
|
|
|
|
|
enum {
|
|
|
|
DF_WANT_RECT_OPTIM = 1 << 0,
|
2003-10-04 23:49:04 +00:00
|
|
|
DF_UPDATE_EXPAND_1_PIXEL = 1 << 1
|
2002-08-24 10:41:32 +00:00
|
|
|
};
|
|
|
|
|
2004-11-23 21:30:38 +00:00
|
|
|
enum {
|
|
|
|
kTransactionNone = 0,
|
|
|
|
kTransactionCommit = 1,
|
|
|
|
kTransactionActive = 2
|
|
|
|
};
|
|
|
|
|
2004-12-30 14:48:21 +00:00
|
|
|
struct TransactionDetails {
|
2004-11-23 21:30:38 +00:00
|
|
|
int mode;
|
|
|
|
bool modeChanged;
|
|
|
|
int w;
|
|
|
|
int h;
|
2005-03-09 23:07:32 +00:00
|
|
|
int overlayScale;
|
|
|
|
bool sizeChanged;
|
2004-11-23 21:30:38 +00:00
|
|
|
bool fs;
|
|
|
|
bool fsChanged;
|
|
|
|
bool ar;
|
|
|
|
bool arChanged;
|
2005-02-22 01:29:27 +00:00
|
|
|
bool needHotswap;
|
|
|
|
bool needUpdatescreen;
|
|
|
|
bool needUnload;
|
|
|
|
bool needToggle;
|
2005-03-20 16:16:09 +00:00
|
|
|
bool normal1xScaler;
|
2004-12-30 14:48:21 +00:00
|
|
|
};
|
|
|
|
TransactionDetails _transactionDetails;
|
2004-11-23 21:30:38 +00:00
|
|
|
|
2004-12-01 21:16:55 +00:00
|
|
|
/** Force full redraw on next updateScreen */
|
|
|
|
bool _forceFull;
|
2004-10-15 22:28:12 +00:00
|
|
|
ScalerProc *_scalerProc;
|
2004-12-01 21:16:55 +00:00
|
|
|
int _scalerType;
|
2002-09-28 16:19:28 +00:00
|
|
|
int _scaleFactor;
|
2002-08-24 10:41:32 +00:00
|
|
|
int _mode;
|
2004-11-23 21:30:38 +00:00
|
|
|
int _transactionMode;
|
2004-12-01 21:16:55 +00:00
|
|
|
bool _fullscreen;
|
|
|
|
|
|
|
|
/** Current video mode flags (see DF_* constants) */
|
|
|
|
uint32 _modeFlags;
|
2003-09-06 20:21:54 +00:00
|
|
|
bool _modeChanged;
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2003-10-05 14:41:30 +00:00
|
|
|
/** True if aspect ratio correction is enabled. */
|
|
|
|
bool _adjustAspectRatio;
|
|
|
|
|
2002-08-24 10:41:32 +00:00
|
|
|
enum {
|
|
|
|
NUM_DIRTY_RECT = 100,
|
|
|
|
|
2002-12-25 12:53:47 +00:00
|
|
|
MAX_MOUSE_W = 80,
|
|
|
|
MAX_MOUSE_H = 80,
|
2002-08-24 10:41:32 +00:00
|
|
|
MAX_SCALING = 3
|
|
|
|
};
|
|
|
|
|
2004-12-01 21:16:55 +00:00
|
|
|
// Dirty rect management
|
|
|
|
SDL_Rect _dirtyRectList[NUM_DIRTY_RECT];
|
|
|
|
int _numDirtyRects;
|
|
|
|
uint32 *_dirtyChecksums;
|
|
|
|
bool _cksumValid;
|
|
|
|
int _cksumNum;
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2004-12-30 14:48:21 +00:00
|
|
|
// Keyboard mouse emulation. Disabled by fingolfin 2004-12-18.
|
|
|
|
// I am keeping the rest of the code in for now, since the joystick
|
|
|
|
// code (or rather, "hack") uses it, too.
|
2002-08-24 10:41:32 +00:00
|
|
|
struct KbdMouse {
|
|
|
|
int16 x, y, x_vel, y_vel, x_max, y_max, x_down_count, y_down_count;
|
|
|
|
uint32 last_time, delay_time, x_down_time, y_down_time;
|
2004-12-01 21:16:55 +00:00
|
|
|
};
|
2002-08-24 10:41:32 +00:00
|
|
|
|
|
|
|
struct MousePos {
|
2005-02-17 23:01:00 +00:00
|
|
|
int16 x, y, w, h, hW, hH;
|
|
|
|
MousePos() : x(0), y(0), w(0), h(0), hW(0), hH(0) {}
|
2002-08-24 10:41:32 +00:00
|
|
|
};
|
|
|
|
|
2003-09-14 12:52:38 +00:00
|
|
|
// mouse
|
2004-12-01 21:16:55 +00:00
|
|
|
KbdMouse _km;
|
2002-09-28 16:19:28 +00:00
|
|
|
bool _mouseVisible;
|
|
|
|
bool _mouseDrawn;
|
2004-05-05 02:32:46 +00:00
|
|
|
byte *_mouseData;
|
2005-02-17 23:01:00 +00:00
|
|
|
SDL_Rect _mouseBackup;
|
2002-11-13 14:38:49 +00:00
|
|
|
MousePos _mouseCurState;
|
2002-09-28 16:19:28 +00:00
|
|
|
int16 _mouseHotspotX;
|
|
|
|
int16 _mouseHotspotY;
|
2004-12-01 21:16:55 +00:00
|
|
|
byte _mouseKeyColor;
|
2005-02-17 23:01:00 +00:00
|
|
|
int _cursorTargetScale;
|
|
|
|
bool _cursorHasOwnPalette;
|
2005-02-20 02:04:45 +00:00
|
|
|
bool _cursorPaletteDisabled;
|
2005-02-17 23:01:00 +00:00
|
|
|
SDL_Surface *_mouseOrigSurface;
|
|
|
|
SDL_Surface *_mouseSurface;
|
|
|
|
enum {
|
|
|
|
kMouseColorKey = 1
|
|
|
|
};
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2003-09-14 12:52:38 +00:00
|
|
|
// joystick
|
|
|
|
SDL_Joystick *_joystick;
|
|
|
|
|
2002-09-28 16:19:28 +00:00
|
|
|
// Shake mode
|
|
|
|
int _currentShakePos;
|
|
|
|
int _newShakePos;
|
|
|
|
|
|
|
|
// Palette data
|
|
|
|
SDL_Color *_currentPalette;
|
|
|
|
uint _paletteDirtyStart, _paletteDirtyEnd;
|
2003-04-30 19:11:33 +00:00
|
|
|
|
2005-02-17 23:01:00 +00:00
|
|
|
// Cursor palette data
|
|
|
|
SDL_Color *_cursorPalette;
|
|
|
|
|
2004-02-28 12:58:13 +00:00
|
|
|
/**
|
|
|
|
* Mutex which prevents multiple threads from interfering with each other
|
|
|
|
* when accessing the screen.
|
|
|
|
*/
|
2003-07-05 15:17:46 +00:00
|
|
|
MutexRef _graphicsMutex;
|
2002-08-24 10:41:32 +00:00
|
|
|
|
|
|
|
|
2004-12-01 21:16:55 +00:00
|
|
|
void addDirtyRgnAuto(const byte *buf);
|
|
|
|
void makeChecksums(const byte *buf);
|
|
|
|
|
2005-02-17 23:01:00 +00:00
|
|
|
virtual void addDirtyRect(int x, int y, int w, int h, bool mouseRect = false); // overloaded by CE backend
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2004-12-11 15:17:47 +00:00
|
|
|
virtual void drawMouse(); // overloaded by CE backend
|
|
|
|
virtual void undrawMouse(); // overloaded by CE backend
|
2005-02-17 23:01:00 +00:00
|
|
|
void blitCursor();
|
2004-12-01 21:16:55 +00:00
|
|
|
|
2003-09-11 23:53:38 +00:00
|
|
|
/** Set the position of the virtual mouse cursor. */
|
2004-12-01 21:16:55 +00:00
|
|
|
void setMousePos(int x, int y);
|
2004-12-11 15:17:47 +00:00
|
|
|
virtual void fillMouseEvent(Event &event, int x, int y); // overloaded by CE backend
|
2004-02-24 22:39:42 +00:00
|
|
|
void toggleMouseGrab();
|
2003-09-11 23:53:38 +00:00
|
|
|
|
2004-12-11 15:17:47 +00:00
|
|
|
virtual void internUpdateScreen(); // overloaded by CE backend
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2004-12-11 15:17:47 +00:00
|
|
|
virtual void loadGFXMode(); // overloaded by CE backend
|
|
|
|
virtual void unloadGFXMode(); // overloaded by CE backend
|
|
|
|
virtual void hotswapGFXMode(); // overloaded by CE backend
|
2004-02-25 09:53:36 +00:00
|
|
|
|
2004-02-29 00:49:40 +00:00
|
|
|
void setFullscreenMode(bool enable);
|
2004-11-23 21:30:38 +00:00
|
|
|
void setAspectRatioCorrection(bool enable);
|
2002-08-24 10:41:32 +00:00
|
|
|
|
2004-12-11 15:17:47 +00:00
|
|
|
virtual bool saveScreenshot(const char *filename); // overloaded by CE backend
|
2003-09-14 12:52:38 +00:00
|
|
|
|
2004-12-01 21:16:55 +00:00
|
|
|
int effectiveScreenHeight() const { return (_adjustAspectRatio ? 240 : _screenHeight) * _scaleFactor; }
|
2003-08-22 07:40:40 +00:00
|
|
|
|
2004-12-01 21:16:55 +00:00
|
|
|
void setupIcon();
|
|
|
|
void handleKbdMouse();
|
2002-08-24 10:41:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|