22 #if !defined(SCUMM_SMUSH_PLAYER_RA2_H) && defined(ENABLE_SCUMM_7_8) 23 #define SCUMM_SMUSH_PLAYER_RA2_H 25 #include "scumm/smush/smush_player.h" 29 class SmushPlayerRebel2 :
public SmushPlayer {
31 SmushPlayerRebel2(ScummEngine_v7 *scumm, IMuseDigital *imuseDigital, Insane *insane);
32 ~SmushPlayerRebel2()
override;
33 bool ra2PromoteCurrentFrameToHiRes(
int scrollX,
int scrollY);
34 bool ra2PromoteHandler7PerspectiveToHiRes(
int perspectiveX,
int perspectiveY,
int viewShift);
37 void initGamePlayerFields()
override;
38 void destroyGamePlayerFields()
override;
39 void initGameVideoState()
override;
40 void releaseGameVideoState()
override;
41 bool shouldPreserveFrameBuffer()
const override {
return true; }
45 bool handleGameTextRendering(
const char *str,
int fontId,
int color,
int pos_x,
int pos_y,
int left,
int top,
int width,
int height, TextStyleFlags flg)
override;
46 bool shouldAlwaysShowSubtitles()
const override {
return true; }
47 SmushFont *getGameFont(
int font)
override;
48 void adjustGamePalette()
override;
49 bool shouldLoadAnimHeaderPalette()
const override;
50 bool handleGameAnimHeader(byte *headerContent)
override;
51 bool handleGameSetupStrings()
override;
52 void handleGameParseNextFrame()
override;
53 bool shouldRouteAllIACTs()
const override {
return true; }
54 bool handleGameFrameBufferSelect(
int codec,
int width,
int height)
override;
55 bool handleGameDimensionOverride(
int codec,
int width,
int height)
override;
56 int handleGameFrameObjectPitch(
int pitch)
override;
57 bool handleGameAdjustCoords(
int codec,
int &left,
int &top,
int &width,
int &height,
int pitch,
int *srcSkipY)
override;
58 bool handleGameCodecDecode(
int codec,
const uint8 *src,
int left,
int top,
int width,
int height,
int pitch,
int dataSize, uint8 param = 0, uint16 parm2 = 0)
override;
59 bool handleGameStoreFrame()
override;
60 void handleGameFrameObjectPre(
int codec,
int left,
int top,
int width,
int height,
int dataSize)
override;
61 void handleGameFrameObjectPost(
int codec,
const byte *data, int32 dataSize,
int left,
int top,
int width,
int height)
override;
62 void handleGameFrameStart()
override;
65 void handleGameProcessAudio(int16 feedSize)
override;
66 bool isInsaneGame()
const override {
return true; }
71 void ra2HandleTextResource(
const char *str,
int fontId,
int color,
72 int pos_x,
int pos_y,
int left,
int top,
73 int width,
int height, TextStyleFlags flg);
74 void ra2PrepareFrameObjectSurface(
int left,
int top,
int width,
int height);
75 bool ra2SelectFrameBuffer(
int codec,
int width,
int height);
76 bool ra2EnsureLowResVideoBuffer();
77 void ra2ClearCurrentTarget();
78 bool ra2IsHighResMode()
const;
79 bool ra2DecodePlacedDeltaCodec(
int codec,
const uint8 *src,
int left,
int top,
80 int width,
int height,
int pitch,
int dataSize);
81 bool ra2DecodeCodec(
int codec,
const uint8 *src,
int left,
int top,
82 int width,
int height,
int pitch,
int dataSize);
84 void ra2StoreFobjData(
int codec,
const byte *data, int32 dataSize,
85 int left,
int top,
int width,
int height);
87 void ra2InitAudioTrackSizes();
89 void ra2FeedAudio(uint8 *srcBuf,
int groupId,
int volume,
int pan, int16 flags);
92 int32 _loadBufferSize;
93 int32 _loadBufferOffset;
94 int32 _loadReadOffset;
95 int16 _lastLoadChunkIdx;
97 int _ra2FrameSourceSkipX;
98 int _ra2FrameSourceSkipY;
99 int _ra2FrameObjectOriginalWidth;
100 int _ra2FrameObjectOriginalHeight;
101 int _ra2FrameObjectSurfaceWidth;
102 int _ra2FrameObjectSurfaceHeight;
103 int _ra2DeltaBlocksWidth;
104 int _ra2DeltaBlocksHeight;
105 int _ra2DeltaGlyphsWidth;
106 int _ra2DeltaGlyphsHeight;
107 byte *_ra2LowResVideoBuffer;
108 int _ra2LowResVideoBufferSize;
109 bool _ra2NativeFrameNeedsClear;
110 bool _ra2UsingGameplaySurface;
111 bool _ra2PendingAnimHeaderPalette;
112 byte _ra2Codec45Palette[0x300];
113 byte _ra2Codec45Lookup[0x8000];
114 byte _ra2SkipRemapTable[256];
115 bool _ra2SkipRemapValid;