22 #ifndef TITANIC_SCREEN_MANAGER_H 23 #define TITANIC_SCREEN_MANAGER_H 25 #include "common/scummsys.h" 26 #include "common/array.h" 27 #include "titanic/support/direct_draw.h" 28 #include "titanic/support/font.h" 29 #include "titanic/input_handler.h" 30 #include "titanic/support/mouse_cursor.h" 31 #include "titanic/support/text_cursor.h" 32 #include "titanic/support/video_surface.h" 33 #include "titanic/core/resource_key.h" 44 SURFACE_BACKBUFFER = -1
50 struct VideoSurfaceEntry {
66 Rect _frontSurfaceBounds;
79 virtual void setWindowHandle(
int v);
80 virtual bool resetWindowHandle(
int v);
85 virtual void setMode(
int width,
int height,
int bpp, uint numBackSurfaces,
bool flag2) = 0;
115 virtual void fillRect(SurfaceNum surfaceNum,
Rect *rect, byte r, byte g, byte b) = 0;
121 const Rect *srcRect =
nullptr) = 0;
149 const Rect &clipRect,
const CString &str,
int maxWidth) = 0;
178 virtual void frameRect(SurfaceNum surfaceNum,
const Rect &rect, byte r, byte g, byte b) = 0;
245 void destroyFrontAndBackBuffers();
269 void setMode(
int width,
int height,
int bpp, uint numBackSurfaces,
bool flag2)
override;
295 return _frontRenderSurface;
302 void fillRect(SurfaceNum surfaceNum,
Rect *rect, byte r, byte g, byte b)
override;
308 const Rect *srcRect =
nullptr)
override;
336 const Rect &clipRect,
const CString &str,
int lineWidth = 0)
override;
365 void frameRect(SurfaceNum surfaceNum,
const Rect &rect, byte r, byte g, byte b)
override;
Definition: resource_key.h:30
virtual void showCursor()=0
virtual void blitFrom(SurfaceNum surfaceNum, CVideoSurface *src, const Point *destPos=nullptr, const Rect *srcRect=nullptr)=0
virtual void resizeSurface(CVideoSurface *surface, int width, int height, int bpp=16)=0
virtual CVideoSurface * createSurface(int w, int h, int bpp=16)=0
void setSurfaceBounds(SurfaceNum surfaceNum, const Rect &r)
CVideoSurface * getFrontRenderSurface() const override
Definition: screen_manager.h:294
Definition: direct_draw_surface.h:45
virtual void waitForVSync()
Definition: screen_manager.h:210
virtual void setMode(int width, int height, int bpp, uint numBackSurfaces, bool flag2)=0
int setFontNumber(int fontNumber)
virtual int getFontHeight() const =0
virtual CVideoSurface * getSurface(SurfaceNum surfaceNum) const =0
virtual void hideCursor()=0
Definition: screen_manager.h:49
virtual void setFontColor(byte r, byte g, byte b)=0
virtual int stringWidth(const CString &str)=0
virtual void frameRect(SurfaceNum surfaceNum, const Rect &rect, byte r, byte g, byte b)=0
virtual int writeString(int surfaceNum, const Rect &destRect, int yOffset, const CString &str, CTextCursor *textCursor)=0
virtual void clearSurface(SurfaceNum surfaceNum, Rect *_bounds)=0
Definition: text_cursor.h:33
Definition: direct_draw.h:59
Definition: mouse_cursor.h:54
virtual int getTextBounds(const CString &str, int maxWidth, Point *sizeOut=nullptr) const =0
virtual CVideoSurface * lockSurface(SurfaceNum surfaceNum)=0
static CScreenManager * setCurrent()
Definition: screen_manager.h:238
virtual void fillRect(SurfaceNum surfaceNum, Rect *rect, byte r, byte g, byte b)=0
Definition: video_surface.h:43
virtual Point getScreenTopLeft()
Definition: screen_manager.h:204
virtual CVideoSurface * getFrontRenderSurface() const =0
virtual void drawCursors()=0
virtual void unlockSurface(CVideoSurface *surface)=0