22 #ifndef M4_GRAPHICS_GR_SERIES_H 23 #define M4_GRAPHICS_GR_SERIES_H 25 #include "m4/m4_types.h" 26 #include "m4/wscript/ws_machine.h" 30 constexpr uint32 SERIES_FORWARD = 0;
31 constexpr uint32 SERIES_PINGPONG = 1;
32 constexpr uint32 SERIES_BACKWARD = 2;
33 constexpr uint32 SERIES_RANDOM = 4;
34 constexpr uint32 SERIES_NO_TOSS = 8;
35 constexpr uint32 SERIES_STICK = 16;
36 constexpr uint32 SERIES_LOOP_TRIGGER = 32;
37 constexpr uint32 SERIES_LOAD_PALETTE = 64;
38 constexpr uint32 SERIES_HORZ_FLIP = 128;
41 constexpr uint32 FORWARD = 0;
42 constexpr uint32 PINGPONG = 1;
43 constexpr uint32 BACKWARD = 2;
44 constexpr uint32 STICK = 4;
45 constexpr uint32 NO_TOSS = 8;
48 HASH_SERIES_PLAY_MACHINE = 0,
49 HASH_SERIES_SHOW_MACHINE = 1,
52 HASH_STREAM_MACHINE = 6
62 void play(
const char *seriesName,
frac16 layer, uint32 flags = 0,
63 int16 triggerNum = -1, int32 frameRate = 6, int32 loopCount = 0, int32 s = 100,
64 int32 x = 0, int32 y = 0, int32 firstFrame = 0, int32 lastFrame = -1);
65 void show(
const char *seriesName,
frac16 layer, uint32 flags = 0,
66 int16 triggerNum = -1, int32 duration = -1, int32 index = 0, int32 s = 100,
67 int32 x = 0, int32 y = 0);
68 void show(
const char *series1,
const char *series2,
int layer);
69 void show_index2(
const char *series1,
const char *series2,
int layer,
int index1,
int index2);
72 operator bool()
const {
73 return _series !=
nullptr;
76 machine *&operator[](uint idx) {
77 return (idx == 0) ? _series : _seriesS;
81 return _series->myAnim8->myRegs;
84 static void series_play(
const char *seriesName,
frac16 layer, uint32 flags = 0,
85 int16 triggerNum = -1, int32 frameRate = 6, int32 loopCount = 0, int32 s = 100,
86 int32 x = 0, int32 y = 0, int32 firstFrame = 0, int32 lastFrame = -1);
87 static void series_show(
const char *seriesName,
frac16 layer, uint32 flags = 0,
88 int16 triggerNum = -1, int32 duration = -1, int32 index = 0, int32 s = 100,
89 int32 x = 0, int32 y = 0);
92 int32 series_load(
const char *seriesName, int32 assetIndex = -1,
RGB8 *myPal =
nullptr);
93 void series_unload(int32 assetIndex);
94 bool series_draw_sprite(int32 spriteHash, int32 index,
Buffer *destBuff, int32 x, int32 y);
96 bool series_show_frame(int32 spriteHash, int32 index,
Buffer *destBuff, int32 x, int32 y);
97 machine *series_place_sprite(
const char *seriesName, int32 index, int32 x, int32 y, int32 s, int32 layer);
98 machine *series_show_sprite(
const char *seriesName, int32 index, int32 layer);
100 machine *series_play(
const char *seriesName,
frac16 layer, uint32 flags = 0,
101 int16 triggerNum = -1, int32 frameRate = 6, int32 loopCount = 0, int32 s = 100,
102 int32 x = 0, int32 y = 0, int32 firstFrame = 0, int32 lastFrame = -1);
103 machine *series_simple_play(
const char *seriesName,
frac16 layer,
bool stickWhenDone);
105 machine *series_show(
const char *seriesName,
frac16 layer, uint32 flags = 0,
106 int16 triggerNum = -1, int32 duration = -1, int32 index = 0, int32 s = 100,
107 int32 x = 0, int32 y = 0);
109 machine *series_ranged_play(
const char *seriesName, int32 loopCount, uint32 flags,
110 int32 firstFrame, int32 lastFrame, int32 s, uint32 layer,
111 int32 frameRate, int32 trigger = -1,
bool stick_when_done =
false);
112 machine *series_ranged_play_xy(
const char *seriesName,
int loopCount,
int flags,
113 int firstFrame,
int lastFrame,
int x,
int y,
int s,
int layer,
114 int frameRate,
int trigger = -1,
bool stick_when_done =
false);
115 machine *series_plain_play(
const char *seriesName, int32 loopCount, uint32 flags,
116 int32 s, int32 layer, int32 frameRate, int32 trigger = -1,
bool stickWhenDone =
false);
117 machine *series_play_xy(
const char *seriesName,
int loopCount,
int flags,
118 int x,
int y,
int scale,
int layer,
int frameRate,
int trigger);
120 machine *series_stream(
const char *seriesName, int32 frameRate, int32 layer, int32 trigger);
121 bool series_stream_break_on_frame(
machine *m, int32 frameNum, int32 trigger);
122 void series_set_frame_rate(
machine *m, int32 newFrameRate);
Definition: ws_machine.h:153
Definition: gr_series.h:58
intptr frac16
Definition: m4_types.h:46
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
Definition: m4_types.h:88
Definition: m4_types.h:67
Definition: database.h:28