| 130 | } |
| 131 | |
| 132 | bool 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 | |
| 160 | void EndMovie(tCinematic *mve) { |
| 161 | if (mve == NULL || !Cinematic_lib_init) |
no test coverage detected