22 #include "backends/base-backend.h" 23 #include <graphics/surface.h> 24 #include <graphics/paletteman.h> 25 #include <ronin/soundcommon.h> 26 #include "backends/timer/default/default-timer.h" 27 #include "backends/audiocd/default/default-audiocd.h" 28 #include "backends/fs/fs-factory.h" 29 #include "audio/mixer_intern.h" 30 #include "common/language.h" 31 #include "common/platform.h" 32 #ifdef DYNAMIC_MODULES 33 #include "backends/plugins/dynamic-plugin.h" 37 #define SOUND_BUFFER_SHIFT 3 42 virtual int key(
int k, byte &shiftFlags) = 0;
43 virtual void mouse(
int x,
int y) = 0;
46 inline Interactive::~Interactive() { }
52 static void dc_init_hardware();
61 bool isPlaying()
const override;
64 bool play(
int track,
int numLoops,
int startFrame,
int duration,
bool onlyEmulate =
false,
72 #ifdef DYNAMIC_MODULES 73 ,
public FilePluginProvider
80 virtual void initBackend();
86 void setFeatureState(
Feature f,
bool enable);
89 bool getFeatureState(
Feature f);
95 void setPalette(
const byte *colors, uint start, uint num);
96 void grabPalette(byte *colors, uint start, uint num)
const;
114 void copyRectToScreen(
const void *buf,
int pitch,
int x,
int y,
int w,
int h);
117 virtual void unlockScreen();
123 bool showMouse(
bool visible);
126 void warpMouse(
int x,
int y);
129 void setMouseCursor(
const void *buf, uint w, uint h,
int hotspot_x,
int hotspot_y, uint32 keycolor,
bool dontScale,
const Graphics::PixelFormat *format,
const byte *mask);
132 void setCursorPalette(
const byte *colors, uint start, uint num);
135 void setShakePos(
int shake_x_pos,
int shake_y_pos);
138 uint32 getMillis(
bool skipRecord =
false);
141 void delayMillis(uint msecs);
144 void getTimeAndDate(
TimeDate &td,
bool skipRecord =
false)
const;
154 int16 getOverlayHeight();
155 int16 getOverlayWidth();
157 void showOverlay(
bool inGUI);
161 void copyRectToOverlay(
const void *buf,
int pitch,
int x,
int y,
int w,
int h);
175 void mouseToSoftKbd(
int x,
int y,
int &rx,
int &ry)
const;
187 int _ms_cur_x, _ms_cur_y, _ms_cur_w, _ms_cur_h, _ms_old_x, _ms_old_y;
188 int _ms_hotspot_x, _ms_hotspot_y, _ms_visible, _devpoll, _last_screen_refresh;
189 int _current_shake_x_pos, _current_shake_y_pos, _screen_w, _screen_h;
190 int _overlay_x, _overlay_y;
191 unsigned char *_ms_buf;
193 bool _overlay_visible, _overlay_dirty, _screen_dirty;
194 int _screen_buffer, _overlay_buffer, _mouse_buffer;
195 bool _aspect_stretch, _softkbd_on, _enable_cursor_palette;
196 bool _overlay_in_gui;
197 float _overlay_fade, _xscale, _yscale, _top_offset;
200 unsigned char *screen;
201 unsigned short *mouse;
202 unsigned short *overlay;
203 void *screen_tx[NUM_BUFFERS];
204 void *mouse_tx[NUM_BUFFERS];
205 void *ovl_tx[NUM_BUFFERS];
206 unsigned short palette[256], cursor_palette[256];
209 int _screenFormat, _mouseFormat;
211 int temp_sound_buffer[RING_BUFFER_SAMPLES>>SOUND_BUFFER_SHIFT];
216 void updateScreenTextures(
void);
217 void updateScreenPolygons(
void);
218 void maybeRefreshScreen(
void);
219 void drawMouse(
int xdraw,
int ydraw,
int w,
int h,
220 unsigned char *buf,
bool visible);
233 #ifdef DYNAMIC_MODULES 243 const char *pluginCustomDirectory;
248 extern int handleInput(
struct mapledev *pad,
249 int &mouse_x,
int &mouse_y,
252 #ifdef DYNAMIC_MODULES
virtual Graphics::PixelFormat getOverlayFormat() const
Definition: dc.h:162
Definition: fs-factory.h:31
Definition: default-audiocd.h:35
PaletteManager * getPaletteManager()
Definition: dc.h:92
Feature
Definition: system.h:403
Definition: plugins.h:145
Definition: mixer_intern.h:58
SoundType
Definition: mixer.h:62
Definition: base-backend.h:44
Definition: savefile.h:142
int16 getWidth()
Definition: dc.h:110
bool isOverlayVisible() const
Definition: dc.h:156
Audio::Mixer * getMixer()
Definition: dc.h:172
Definition: paletteman.h:47
Definition: abstract-fs.h:41
int16 getHeight()
Definition: dc.h:109
Language
Definition: language.h:45