| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | --- HISTORICAL COMMENTS FOLLOW --- |
| 19 | |
| 20 | * $Logfile: /DescentIII/main/cinematics.h $ |
| 21 | * $Revision: 7 $ |
| 22 | * $Date: 3/31/99 11:53a $ |
| 23 | * $Author: Samir $ |
| 24 | * |
| 25 | * D3 Cinematics interface with movie player |
| 26 | * |
| 27 | * $Log: /DescentIII/main/cinematics.h $ |
| 28 | * |
| 29 | * 7 3/31/99 11:53a Samir |
| 30 | * slow opengl code for movies. |
| 31 | * |
| 32 | * 6 3/17/99 4:18p Samir |
| 33 | * redid movie code. |
| 34 | * |
| 35 | * 5 2/04/98 12:12p Samir |
| 36 | * The movie frame interface now has an option to not advance to next |
| 37 | * frame. |
| 38 | * |
| 39 | * 4 2/03/98 6:42p Samir |
| 40 | * Movies in 3dfx mode. |
| 41 | * |
| 42 | * 3 9/19/97 2:34p Samir |
| 43 | * Added movie frame management support. |
| 44 | * |
| 45 | * 2 9/12/97 4:12p Samir |
| 46 | * first movie library |
| 47 | * |
| 48 | * $NoKeywords: $ |
| 49 | */ |
| 50 | |
| 51 | #ifndef CINEMATICS_H |
| 52 | #define CINEMATICS_H |
| 53 | |
| 54 | #include "renderer.h" |
| 55 | #include "bitmap.h" |
| 56 | |
| 57 | #include <cstdint> |
| 58 | #include <filesystem> |
| 59 | |
| 60 | // Movie Cinematic |
| 61 | struct tCinematic { |
| 62 | intptr_t mvehandle; |
| 63 | void *filehandle; |
| 64 | chunked_bitmap frame_chunk; // used internally, don't access. |
| 65 | }; |
| 66 | |
| 67 | bool InitCinematics(); |
| 68 | void SetMovieProperties(int x, int y, int w, int h, renderer_type type); |
| 69 | bool PlayMovie(const std::filesystem::path &moviename); |
| 70 | tCinematic *StartMovie(const char *moviename, bool looping = false); |
| 71 | bool FrameMovie(tCinematic *mve, int x, int y, bool sequence = true); |
| 72 | void EndMovie(tCinematic *mve); |
| 73 | |
| 74 | #endif |