From 0b484d51b838d740bbb1d6bc12c06c25d225c197 Mon Sep 17 00:00:00 2001 From: Peter Kohaut Date: Sat, 10 Feb 2018 20:34:28 +0100 Subject: BLADERUNNER: VK interface Code unification Removed few memory leaks --- engines/bladerunner/ui/esper.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'engines/bladerunner/ui/esper.h') diff --git a/engines/bladerunner/ui/esper.h b/engines/bladerunner/ui/esper.h index d63efa31bd..4a1c606498 100644 --- a/engines/bladerunner/ui/esper.h +++ b/engines/bladerunner/ui/esper.h @@ -26,9 +26,7 @@ #include "common/array.h" #include "common/rect.h" -namespace Graphics { -struct Surface; -} +#include "graphics/surface.h" namespace BladeRunner { @@ -96,11 +94,11 @@ class ESPER { UIImagePicker *_buttons; - Graphics::Surface *_photoData; - Graphics::Surface *_viewportData; + Graphics::Surface _surfacePhoto; + Graphics::Surface _surfaceViewport; - VQAPlayer *_vqaMainPlayer; - VQAPlayer *_vqaPhotoPlayer; + VQAPlayer *_vqaPlayerMain; + VQAPlayer *_vqaPlayerPhoto; int _vqaLastFrame; Shape *_shapeButton; @@ -190,7 +188,7 @@ public: void open(Graphics::Surface *surface); void close(); - bool isOpen(); + bool isOpen() const; void handleMouseUp(int x, int y, bool buttonLeft); void handleMouseDown(int x, int y, bool buttonLeft); @@ -242,6 +240,7 @@ private: void drawSelection(Graphics::Surface &surface, bool crosshair, int style); void drawVideoFrame(Graphics::Surface &surface); void drawTextCoords(Graphics::Surface &surface); + void drawMouse(Graphics::Surface &surface); void flashViewport(); @@ -250,7 +249,6 @@ private: void copyImageBlit(Graphics::Surface *src, Common::Rect srcRect, Graphics::Surface *dst, Common::Rect dstRect); void tickSound(); - void tickMouse(Graphics::Surface &surface); void tickScroll(); int findEmptyPhoto(); -- cgit v1.2.3