22 #ifndef TITANIC_VIDEO_SURFACE_H 23 #define TITANIC_VIDEO_SURFACE_H 25 #include "common/scummsys.h" 26 #include "common/array.h" 27 #include "graphics/managed_surface.h" 28 #include "titanic/support/font.h" 29 #include "titanic/support/direct_draw.h" 30 #include "titanic/support/movie.h" 31 #include "titanic/support/movie_range_info.h" 32 #include "titanic/support/rect.h" 33 #include "titanic/support/transparency_surface.h" 34 #include "titanic/core/list.h" 35 #include "titanic/core/resource_key.h" 47 static byte _palette1[32][32];
48 static byte _palette2[32][32];
53 static void setupPalette(byte palette[32][32], byte val);
59 setupPalette(_palette1, 0xff);
66 const Rect *subRect =
nullptr,
const Point *destPos =
nullptr);
80 static int _videoSurfaceCounter;
86 DisposeAfterUse::Flag _freeTransparencySurface;
96 TransparencyMode _transparencyMode;
143 virtual bool lock() = 0;
148 virtual void unlock() = 0;
178 virtual void recreate(
int width,
int height,
int bpp = 16) = 0;
183 virtual void resize(
int width,
int height,
int bpp = 16) = 0;
214 virtual void clear() = 0;
232 virtual void playMovie(uint startFrame, uint endFrame, uint initialFrame, uint flags,
CGameObject *obj) = 0;
262 virtual void flipVertically(
bool needsLock =
true) = 0;
272 virtual bool load() = 0;
319 return _transparencySurface ? &_transparencySurface->
rawSurface() :
nullptr;
349 void copyPixel(uint16 *destP,
const uint16 *srcP, byte alpha,
390 bool lock()
override;
425 void recreate(
int width,
int height,
int bpp = 16)
override;
430 void resize(
int width,
int height,
int bpp = 16)
override;
460 void clear()
override;
478 void playMovie(uint startFrame, uint endFrame, uint initialFrame, uint flags,
CGameObject *obj)
override;
508 void flipVertically(
bool needsLock =
true)
override;
518 bool load()
override;
Definition: managed_surface.h:51
Definition: resource_key.h:30
virtual void loadTarga(const CResourceKey &key)=0
virtual void stopMovie()=0
void blitFrom(const Point &destPos, CVideoSurface *src, const Rect *srcRect=nullptr)
Definition: direct_draw_surface.h:45
virtual void shiftColors()=0
Graphics::ManagedSurface * getRawSurface()
Definition: video_surface.h:332
virtual void addMovieEvent(int eventId, CGameObject *obj)=0
virtual void loadJPEG(const CResourceKey &key)=0
virtual bool hasSurface()=0
void load(SimpleFile *file) override
Definition: simple_file.h:49
Definition: movie_range_info.h:76
virtual void transPixelate()=0
virtual int getPixelDepth()=0
Definition: screen_manager.h:49
virtual void resize(int width, int height, int bpp=16)=0
Definition: image_decoders.h:33
Definition: game_object.h:79
Definition: image_decoders.h:41
virtual void loadMovie(const CResourceKey &key, bool destroyFlag=false)=0
void * getPixels()
Definition: managed_surface.h:269
const Surface & rawSurface() const
Definition: managed_surface.h:193
void load(SimpleFile *file) override
Definition: video_surface.h:109
virtual bool loadIfReady()=0
static void setup()
Definition: video_surface.h:58
virtual void setMovieFrameRate(double rate)=0
uint getTransparencyColor()
void copyPixel(uint16 *destP, const uint16 *srcP, byte alpha, const Graphics::PixelFormat &srcFormat, bool isAlpha)
virtual const CMovieRangeInfoList * getMovieRangeInfo() const =0
Definition: video_surface.h:353
virtual uint16 * getBasePtr(int x, int y)=0
void setTransparencySurface(Graphics::ManagedSurface *surface)
Definition: video_surface.h:313
virtual int freeSurface()
Definition: video_surface.h:293
virtual void recreate(int width, int height, int bpp=16)=0
Definition: video_surface.h:43
const Graphics::Surface * getTransparencySurface() const
Definition: video_surface.h:318
virtual void loadResource(const CResourceKey &key)=0
virtual void setPixel(const Point &pt, uint pixel)=0
virtual void detachSurface()=0
uint16 * getPixels()
Definition: video_surface.h:326
virtual void playMovie(uint flags, CGameObject *obj)=0
virtual void setMovieFrame(uint frameNumber)=0
virtual uint16 getPixel(const Common::Point &pt)=0
void setSurface(CScreenManager *screenManager, DirectDrawSurface *surface)
virtual int getHeight()=0
virtual Graphics::ManagedSurface * dupMovieTransparency() const =0