aboutsummaryrefslogtreecommitdiff
path: root/engines/made/screen.h
diff options
context:
space:
mode:
authorBenjamin Haisch2008-05-14 09:54:15 +0000
committerBenjamin Haisch2008-05-14 09:54:15 +0000
commit0ec51de2721d7b670c997b7a3d1bc53f432d6e6b (patch)
tree3ec87d40623869be3adbb03d85039240f2312a26 /engines/made/screen.h
parent97855800b6592cf9c9bc2b010c13cdd07575f5e2 (diff)
downloadscummvm-rg350-0ec51de2721d7b670c997b7a3d1bc53f432d6e6b.tar.gz
scummvm-rg350-0ec51de2721d7b670c997b7a3d1bc53f432d6e6b.tar.bz2
scummvm-rg350-0ec51de2721d7b670c997b7a3d1bc53f432d6e6b.zip
- Added some visual effects (palette fading etc.)
- Moved Screen::getAnimFrameCount directly into o1_GETFRAMECOUNT - Renamed variables/cleanup svn-id: r32104
Diffstat (limited to 'engines/made/screen.h')
-rw-r--r--engines/made/screen.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/engines/made/screen.h b/engines/made/screen.h
index beacd0dfa5..910096cacd 100644
--- a/engines/made/screen.h
+++ b/engines/made/screen.h
@@ -33,6 +33,7 @@
#include "graphics/surface.h"
#include "made/resource.h"
+#include "made/screenfx.h"
namespace Made {
@@ -41,7 +42,7 @@ struct SpriteChannel {
int16 state;
int16 needRefresh;
uint16 index;
- int16 x, y;
+ int16 x, y, xofs, yofs;
int16 x1, y1, x2, y2;
uint32 area;
uint16 fontNum;
@@ -69,8 +70,8 @@ public:
void loadRGBPalette(byte *palRGB, int count = 256);
void setRGBPalette(byte *palRGB, int start = 0, int count = 256);
bool isPaletteLocked() { return _paletteLock; }
- void setScreenLock(bool lock) { _screenLock = lock; }
void setPaletteLock(bool lock) { _paletteLock = lock; }
+ void setScreenLock(bool lock) { _screenLock = lock; }
void setVisualEffectNum(int visualEffectNum) { _visualEffectNum = visualEffectNum; }
void setClipArea(uint16 x1, uint16 y1, uint16 x2, uint16 y2) {
@@ -119,6 +120,8 @@ public:
uint16 setChannelLocation(uint16 channelIndex, int16 x, int16 y);
uint16 setChannelContent(uint16 channelIndex, uint16 index);
void setChannelUseMask(uint16 channelIndex);
+ void setChannelOffsets(uint16 channelIndex, int16 xofs, int16 yofs);
+ void getChannelOffsets(uint16 channelIndex, int16 &xofs, int16 &yofs);
void drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask, int16 excludeStateMask);
void updateSprites();
void clearChannels();
@@ -139,14 +142,12 @@ public:
uint16 placeAnim(uint16 channelIndex, uint16 animIndex, int16 x, int16 y, int16 frameNum);
int16 setAnimFrame(uint16 channelIndex, int16 frameNum);
int16 getAnimFrame(uint16 channelIndex);
- // TODO: Move to script function
- int16 getAnimFrameCount(uint16 animIndex);
uint16 placeText(uint16 channelIndex, uint16 textObjectIndex, int16 x, int16 y, uint16 fontNum, int16 textColor, int16 outlineColor);
void show();
void flash(int count);
-
+
void setFont(int16 fontNum);
void printChar(uint c, int16 x, int16 y, byte color);
void printText(const char *text);
@@ -154,14 +155,21 @@ public:
void printObjectText(int16 objectIndex, int16 x, int16 y, int16 fontNum, int16 textColor, int16 outlineColor, const ClipInfo &clipInfo);
int16 getTextWidth(int16 fontNum, const char *text);
+ // Interface functions for the screen effects class
+ Graphics::Surface *lockScreen();
+ void unlockScreen();
+ void showWorkScreen();
+ void updateScreenAndWait(int delay);
+
protected:
MadeEngine *_vm;
+ ScreenEffects *_fx;
bool _screenLock;
bool _paletteLock;
byte _screenPalette[256 * 4];
- byte _palette[768], _newPalette[768], _fxPalette[768];
+ byte _palette[768], _newPalette[768];
int _paletteColorCount, _oldPaletteColorCount;
bool _paletteInitialized, _needPalette;
int16 _textColor;
@@ -177,8 +185,8 @@ protected:
int16 _clip, _exclude, _ground, _mask;
int _visualEffectNum;
- Graphics::Surface *_screen1, *_screen2, *_screenMask;
- ClipInfo _clipArea, _clipInfo1, _clipInfo2, _maskDrawCtx;
+ Graphics::Surface *_backgroundScreen, *_workScreen, *_screenMask;
+ ClipInfo _clipArea, _backgroundScreenDrawCtx, _workScreenDrawCtx, _maskDrawCtx;
ClipInfo _excludeClipArea[4];
bool _excludeClipAreaEnabled[4];