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 void unpause()
override;
34 bool ra2PromoteCurrentFrameToHiRes(
int scrollX,
int scrollY);
35 bool ra2PromoteHandler7PerspectiveToHiRes(
int perspectiveX,
int perspectiveY,
int viewShift);
36 bool isPlayingLoadBuffer()
const {
return _loadContinuationStream !=
nullptr; }
39 void initGamePlayerFields()
override;
40 void destroyGamePlayerFields()
override;
41 void initGameVideoState()
override;
42 void releaseGameVideoState()
override;
43 bool shouldPreserveFrameBuffer()
const override {
return true; }
47 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;
48 bool shouldAlwaysShowSubtitles()
const override {
return true; }
49 SmushFont *getGameFont(
int font)
override;
50 void adjustGamePalette()
override;
51 bool shouldLoadAnimHeaderPalette()
const override;
52 bool handleGameAnimHeader(byte *headerContent)
override;
53 bool handleGameSetupStrings()
override;
54 void handleGameParseNextFrame()
override;
55 bool shouldRouteAllIACTs()
const override {
return true; }
56 bool handleGameFrameBufferSelect(
int codec,
int width,
int height)
override;
57 bool handleGameDimensionOverride(
int codec,
int width,
int height)
override;
58 int handleGameFrameObjectPitch(
int pitch)
override;
59 bool handleGameAdjustCoords(
int codec,
int &left,
int &top,
int &width,
int &height,
int pitch,
int *srcSkipY)
override;
60 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;
61 bool handleGameStoreFrame()
override;
62 void handleGameFrameObjectPre(
int codec,
int left,
int top,
int width,
int height,
int dataSize)
override;
63 void handleGameFrameObjectPost(
int codec,
const byte *data, int32 dataSize,
int left,
int top,
int width,
int height)
override;
64 void handleGameFrameStart()
override;
67 void handleGameProcessAudio(int16 feedSize)
override;
68 bool isInsaneGame()
const override {
return true; }
73 void ra2StartLoadPlayback();
74 void ra2HandleTextResource(
const char *str,
int fontId,
int color,
75 int pos_x,
int pos_y,
int left,
int top,
76 int width,
int height, TextStyleFlags flg);
77 void ra2PrepareFrameObjectSurface(
int left,
int top,
int width,
int height);
78 bool ra2SelectFrameBuffer(
int codec,
int width,
int height);
79 bool ra2EnsureLowResVideoBuffer();
80 void ra2ClearCurrentTarget();
81 bool ra2IsHighResMode()
const;
82 bool ra2DecodePlacedDeltaCodec(
int codec,
const uint8 *src,
int left,
int top,
83 int width,
int height,
int pitch,
int dataSize);
84 bool ra2DecodeCodec(
int codec,
const uint8 *src,
int left,
int top,
85 int width,
int height,
int pitch,
int dataSize);
87 void ra2StoreFobjData(
int codec,
const byte *data, int32 dataSize,
88 int left,
int top,
int width,
int height);
90 void ra2InitAudioTrackSizes();
92 void ra2FeedAudio(uint8 *srcBuf,
int groupId,
int volume,
int pan, int16 flags);
95 int32 _loadBufferSize;
96 int32 _loadBufferOffset;
97 int32 _loadReadOffset;
98 int16 _lastLoadChunkIdx;
100 bool _loadPlaybackPending;
102 uint32 _loadContinuationSize;
103 int32 _loadContinuationFrameCount;
104 int _ra2FrameSourceSkipX;
105 int _ra2FrameSourceSkipY;
106 int _ra2FrameObjectOriginalWidth;
107 int _ra2FrameObjectOriginalHeight;
108 int _ra2FrameObjectSurfaceWidth;
109 int _ra2FrameObjectSurfaceHeight;
110 int _ra2SpecialBufferWidth;
111 int _ra2SpecialBufferHeight;
112 int _ra2DeltaBlocksWidth;
113 int _ra2DeltaBlocksHeight;
114 int _ra2DeltaGlyphsWidth;
115 int _ra2DeltaGlyphsHeight;
116 byte *_ra2LowResVideoBuffer;
117 int _ra2LowResVideoBufferSize;
118 bool _ra2NativeFrameNeedsClear;
119 bool _ra2UsingGameplaySurface;
120 bool _ra2PendingAnimHeaderPalette;
121 byte _ra2Codec45Palette[0x300];
122 byte _ra2Codec45Lookup[0x8000];
123 byte _ra2SkipRemapTable[256];
124 bool _ra2SkipRemapValid;