Renders anything that needs to be rendered for the cinematic frame
| 1183 | |
| 1184 | // Renders anything that needs to be rendered for the cinematic frame |
| 1185 | void Cinematic_RenderFrame(void) { |
| 1186 | if (!Cinematic_inuse) { |
| 1187 | if (GameCinema.doing_end_transition) |
| 1188 | Cinematic_DoEndTransition(); |
| 1189 | return; |
| 1190 | } |
| 1191 | |
| 1192 | if (GetHUDMode() == HUD_LETTERBOX) { |
| 1193 | // clear letterbox areas |
| 1194 | Clear_screen = 4; |
| 1195 | } |
| 1196 | |
| 1197 | if (GameCinema.start_transition_type != GCTT_NONE) { |
| 1198 | Cinematic_DoStartTransition(); |
| 1199 | } |
| 1200 | |
| 1201 | if (GameCinema.flags & GCF_DOTRANSBEFORETEXT) { |
| 1202 | // some end transitions start early...process now |
| 1203 | if (GameCinema.doing_end_transition) |
| 1204 | Cinematic_DoEndTransition(); |
| 1205 | |
| 1206 | // see if we should be displaying text |
| 1207 | if (Gametime >= GameCinema.text_display_start && Gametime < GameCinema.text_display_stop) { |
| 1208 | // Display text |
| 1209 | Cinematic_DrawText(); |
| 1210 | } |
| 1211 | |
| 1212 | } else { |
| 1213 | // see if we should be displaying text |
| 1214 | if (Gametime >= GameCinema.text_display_start && Gametime < GameCinema.text_display_stop) { |
| 1215 | // Display text |
| 1216 | Cinematic_DrawText(); |
| 1217 | } |
| 1218 | |
| 1219 | // some end transitions start early...process now |
| 1220 | if (GameCinema.doing_end_transition) |
| 1221 | Cinematic_DoEndTransition(); |
| 1222 | } |
| 1223 | |
| 1224 | if (GameCinema.callback) |
| 1225 | (*GameCinema.callback)(GCCT_FRAME); |
| 1226 | } |
| 1227 | |
| 1228 | void Cinematic_DrawText(void) { |
| 1229 | int font_height = grfont_GetHeight(BIG_BRIEFING_FONT) + 2; |
no test coverage detected