From f945448c7ba3884cded68314a13aa2132603121d Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Thu, 17 Jan 2013 09:50:10 +0000 Subject: NEVERHOOD: Change graphic resource draw method to get a Surface instead of separate pixels/pitch - Merge SpriteResource::load and load2 --- engines/neverhood/resource.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'engines/neverhood/resource.h') diff --git a/engines/neverhood/resource.h b/engines/neverhood/resource.h index c6f63bf92d..e2609b6fd2 100644 --- a/engines/neverhood/resource.h +++ b/engines/neverhood/resource.h @@ -46,9 +46,8 @@ class SpriteResource { public: SpriteResource(NeverhoodEngine *vm); ~SpriteResource(); - void draw(byte *dest, int destPitch, bool flipX, bool flipY); - bool load(uint32 fileHash); - bool load2(uint32 fileHash); + void draw(Graphics::Surface *destSurface, bool flipX, bool flipY); + bool load(uint32 fileHash, bool doLoadPosition = false); void unload(); const NDimensions& getDimensions() { return _dimensions; } NPoint& getPosition() { return _position; } @@ -90,7 +89,7 @@ class AnimResource { public: AnimResource(NeverhoodEngine *vm); ~AnimResource(); - void draw(uint frameIndex, byte *dest, int destPitch, bool flipX, bool flipY); + void draw(uint frameIndex, Graphics::Surface *destSurface, bool flipX, bool flipY); bool load(uint32 fileHash); void unload(); void clear(); @@ -120,7 +119,7 @@ public: void load(uint32 fileHash); void unload(); NDrawRect& getRect(); - void draw(int frameNum, byte *dest, int destPitch); + void draw(int frameNum, Graphics::Surface *destSurface); int getCursorNum() const { return _cursorNum; } void setCursorNum(int cursorNum) { _cursorNum = cursorNum; } protected: -- cgit v1.2.3