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/events.h" 31 #include "common/language.h" 32 #include "common/platform.h" 33 #ifdef DYNAMIC_MODULES 34 #include "backends/plugins/dynamic-plugin.h" 38 #define SOUND_BUFFER_SHIFT 3 43 virtual int key(
int k, byte &shiftFlags) = 0;
44 virtual void mouse(
int x,
int y) = 0;
47 inline Interactive::~Interactive() { }
53 static void dc_init_hardware();
62 bool isPlaying()
const override;
65 bool play(
int track,
int numLoops,
int startFrame,
int duration,
bool onlyEmulate =
false,
73 #ifdef DYNAMIC_MODULES 74 ,
public FilePluginProvider
81 virtual void initBackend();
87 void setFeatureState(
Feature f,
bool enable);
90 bool getFeatureState(
Feature f);
96 void setPalette(
const byte *colors, uint start, uint num);
97 void grabPalette(byte *colors, uint start, uint num)
const;
115 void copyRectToScreen(
const void *buf,
int pitch,
int x,
int y,
int w,
int h);
118 virtual void unlockScreen();
124 bool showMouse(
bool visible);
127 void warpMouse(
int x,
int y);
130 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);
133 void setCursorPalette(
const byte *colors, uint start, uint num);
136 void setShakePos(
int shake_x_pos,
int shake_y_pos);
139 uint32 getMillis(
bool skipRecord =
false);
142 void delayMillis(uint msecs);
145 void getTimeAndDate(
TimeDate &td,
bool skipRecord =
false)
const;
155 int16 getOverlayHeight()
const;
156 int16 getOverlayWidth()
const;
158 void showOverlay(
bool inGUI);
162 void copyRectToOverlay(
const void *buf,
int pitch,
int x,
int y,
int w,
int h);
176 void mouseToSoftKbd(
int x,
int y,
int &rx,
int &ry)
const;
188 int _ms_cur_x, _ms_cur_y, _ms_cur_w, _ms_cur_h, _ms_old_x, _ms_old_y;
189 int _ms_hotspot_x, _ms_hotspot_y, _ms_visible, _devpoll, _last_screen_refresh;
190 int _current_shake_x_pos, _current_shake_y_pos, _screen_w, _screen_h;
191 int _overlay_x, _overlay_y;
192 unsigned char *_ms_buf;
194 bool _overlay_visible, _overlay_dirty, _screen_dirty;
195 int _screen_buffer, _overlay_buffer, _mouse_buffer;
196 bool _aspect_stretch, _softkbd_on, _enable_cursor_palette;
197 bool _overlay_in_gui;
198 float _overlay_fade, _xscale, _yscale, _top_offset;
201 unsigned char *screen;
202 unsigned short *mouse;
203 unsigned short *overlay;
204 void *screen_tx[NUM_BUFFERS];
205 void *mouse_tx[NUM_BUFFERS];
206 void *ovl_tx[NUM_BUFFERS];
207 unsigned short palette[256], cursor_palette[256];
210 int _screenFormat, _mouseFormat;
212 int temp_sound_buffer[RING_BUFFER_SAMPLES>>SOUND_BUFFER_SHIFT];
217 void updateScreenTextures(
void);
218 void updateScreenPolygons(
void);
219 void maybeRefreshScreen(
void);
220 void drawMouse(
int xdraw,
int ydraw,
int w,
int h,
221 unsigned char *buf,
bool visible);
234 #ifdef DYNAMIC_MODULES 244 const char *pluginCustomDirectory;
249 extern int handleInput(
struct mapledev *pad,
250 int &mouse_x,
int &mouse_y,
253 #ifdef DYNAMIC_MODULES
virtual Graphics::PixelFormat getOverlayFormat() const
Definition: dc.h:163
Definition: fs-factory.h:31
Definition: default-audiocd.h:35
PaletteManager * getPaletteManager()
Definition: dc.h:93
Feature
Definition: system.h:411
Definition: plugins.h:145
Definition: mixer_intern.h:58
SoundType
Definition: mixer.h:73
Definition: base-backend.h:31
Definition: savefile.h:142
int16 getWidth()
Definition: dc.h:111
bool isOverlayVisible() const
Definition: dc.h:157
Audio::Mixer * getMixer()
Definition: dc.h:173
Definition: paletteman.h:47
Definition: abstract-fs.h:41
int16 getHeight()
Definition: dc.h:110
Language
Definition: language.h:45