MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / FrameMovie

Function FrameMovie

Descent3/cinematics.cpp:132–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132bool FrameMovie(tCinematic *mve, int x, int y, bool sequence) {
133 if (!Cinematic_lib_init || mve == NULL)
134 return false;
135
136 int bm_handle;
137 intptr_t hNewMovie = mve_SequenceFrame(mve->mvehandle, mve->filehandle, sequence, &bm_handle);
138 if (hNewMovie != -1) {
139 // we must have looped, we have a new handle
140 mve->mvehandle = hNewMovie;
141 }
142
143 // do chunk conversion and blt if absolutely necessary.
144 if (bm_handle > -1) {
145 if (x == -1) {
146 x = (Cinematic_w - bm_w(bm_handle, 0)) / 2;
147 }
148
149 if (y == -1) {
150 y = (Cinematic_h - bm_h(bm_handle, 0)) / 2;
151 }
152
153 rend_SetAlphaType(AT_ALWAYS);
154 rend_CopyBitmapToFramebuffer(bm_handle, x, y);
155 }
156
157 return (hNewMovie != -1);
158}
159
160void EndMovie(tCinematic *mve) {
161 if (mve == NULL || !Cinematic_lib_init)

Callers 2

RenderMovieFunction · 0.85
MenuSceneFunction · 0.85

Calls 5

mve_SequenceFrameFunction · 0.85
bm_wFunction · 0.85
bm_hFunction · 0.85
rend_SetAlphaTypeFunction · 0.50

Tested by

no test coverage detected