22 #ifndef PLATFORM_3DS_H 23 #define PLATFORM_3DS_H 25 #define FORBIDDEN_SYMBOL_EXCEPTION_time_h 27 #include "backends/base-backend.h" 28 #include "graphics/paletteman.h" 29 #include "base/main.h" 30 #include "audio/mixer_intern.h" 31 #include "backends/graphics/graphics.h" 32 #include "backends/log/log.h" 33 #include "backends/platform/3ds/sprite.h" 34 #include "common/rect.h" 35 #include "common/queue.h" 36 #include "common/ustr.h" 37 #include "engines/engine.h" 39 #define TICKS_PER_MSEC 268123 63 kScreenTop = 0x10000002,
68 enum TransactionState {
70 kTransactionActive = 1,
71 kTransactionRollback = 2
76 bool formatChanged, modeChanged;
79 formatChanged =
false;
86 GPU_TEXCOLOR textureFormat;
87 uint32 textureTransferFlags;
92 GraphicsModeID gfxModeID;
107 volatile bool exiting;
108 volatile bool sleeping;
110 virtual void initBackend();
122 void registerDefaultSettings(
const Common::String &target)
const override;
124 void applyBackendSettings()
override;
126 virtual uint32 getMillis(
bool skipRecord =
false);
127 virtual void delayMillis(uint msecs);
128 virtual void getTimeAndDate(
TimeDate &td,
bool skipRecord =
false)
const;
137 virtual void fatalError();
146 void initSize(uint width, uint height,
150 bool setGraphicsMode(GraphicsModeID modeID);
152 void beginGFXTransaction();
156 float getScaleRatio()
const;
157 void setPalette(
const byte *colors, uint start, uint num);
158 void grabPalette(byte *colors, uint start, uint num)
const;
159 void copyRectToScreen(
const void *buf,
int pitch,
int x,
int y,
int w,
164 void setShakePos(
int shakeXOffset,
int shakeYOffset);
166 void clearFocusRectangle();
167 void showOverlay(
bool inGUI);
173 void copyRectToOverlay(
const void *buf,
int pitch,
int x,
int y,
int w,
175 virtual int16 getOverlayHeight();
176 virtual int16 getOverlayWidth();
180 bool showMouse(
bool visible);
181 void warpMouse(
int x,
int y);
182 void setMouseCursor(
const void *buf, uint w, uint h,
int hotspotX,
183 int hotspotY, uint32 keycolor,
bool dontScale =
false,
185 void setCursorPalette(
const byte *colors, uint start, uint num);
188 void transformPoint(touchPosition &point);
190 void clipPoint(touchPosition &point);
192 void setCursorDelta(
float deltaX,
float deltaY);
195 void updateMagnify();
196 void updateBacklight();
201 void init3DSGraphics();
202 void destroy3DSGraphics();
206 void destroyEvents();
208 void flushGameScreen();
219 u16 _gameWidth, _gameHeight;
220 u16 _gameTopX, _gameTopY;
221 u16 _gameBottomX, _gameBottomY;
227 GraphicsModeID _graphicsModeID;
228 TransactionState _transactionState;
235 byte _palette[3 * 256];
236 byte _cursorPalette[3 * 256];
237 uint32 _paletteMap[256];
240 bool _gameTextureDirty;
242 Sprite _gameBottomTexture;
246 bool _filteringEnabled;
249 kOSDMessageDuration = 800
251 uint32 _osdMessageEndTime;
253 int _screenShakeXOffset;
254 int _screenShakeYOffset;
255 bool _overlayVisible;
260 shaderProgram_s _program;
261 int _projectionLocation;
262 int _modelviewLocation;
263 C3D_Mtx _projectionTop;
264 C3D_Mtx _projectionBottom;
265 C3D_RenderTarget* _renderTargetTop;
266 C3D_RenderTarget* _renderTargetBottom;
271 C3D_Mtx _focusMatrix;
272 int _focusPosX, _focusPosY;
273 int _focusTargetPosX, _focusTargetPosY;
274 float _focusStepPosX, _focusStepPosY;
275 float _focusScaleX, _focusScaleY;
276 float _focusTargetScaleX, _focusTargetScaleY;
277 float _focusStepScaleX, _focusStepScaleY;
278 uint32 _focusClearTime;
288 bool _cursorPaletteEnabled;
290 bool _cursorScalable;
291 float _cursorScreenX, _cursorScreenY;
292 float _cursorOverlayX, _cursorOverlayY;
293 float _cursorDeltaX, _cursorDeltaY;
294 int _cursorHotspotX, _cursorHotspotY;
295 uint32 _cursorKeyColor;
298 MagnifyMode _magnifyMode;
300 u16 _magWidth, _magHeight;
301 u16 _magCenterX, _magCenterY;
virtual int getScreenChangeID() const
Definition: osystem.h:148
virtual PaletteManager * getPaletteManager()
Definition: osystem.h:135
Definition: osystem.h:102
Feature
Definition: system.h:403
Definition: atari-screen.h:60
int16 getWidth()
Definition: osystem.h:155
Definition: mixer_intern.h:58
bool isOverlayVisible() const
Definition: osystem.h:169
int16 getHeight()
Definition: osystem.h:154
TransactionError
Definition: system.h:1155
Definition: archive.h:312
Definition: keymapper-defaults.h:32
Definition: base-backend.h:44
Definition: paletteman.h:47