1 /* 2 This file is part of Yabause. 3 4 Yabause is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation; either version 2 of the License, or 7 (at your option) any later version. 8 9 Yabause is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with Yabause; if not, write to the Free Software 16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19 #ifndef MOVIE_H 20 #define MOVIE_H 21 22 #include "core.h" 23 24 #define Stopped 1 25 #define Recording 2 26 #define Playback 3 27 28 #define RunNormal 0 29 #define Paused 1 30 #define NeedAdvance 2 31 32 void DoMovie(void); 33 34 struct MovieStruct 35 { 36 int Status; 37 FILE *fp; 38 int ReadOnly; 39 int Rerecords; 40 int Size; 41 int Frames; 42 const char* filename; 43 }; 44 45 extern struct MovieStruct Movie; 46 47 struct MovieBufferStruct 48 { 49 int size; 50 char* data; 51 }; 52 53 struct MovieBufferStruct ReadMovieIntoABuffer(FILE* fp); 54 55 void MovieLoadState(void); 56 57 void SaveMovieInState(FILE* fp, IOCheck_struct check); 58 void ReadMovieInState(FILE* fp); 59 60 void TestWrite(struct MovieBufferStruct tempbuffer); 61 62 void MovieToggleReadOnly(void); 63 64 void TruncateMovie(struct MovieStruct Movie); 65 66 void DoFrameAdvance(void); 67 68 int SaveMovie(const char *filename); 69 int PlayMovie(const char *filename); 70 void StopMovie(void); 71 72 const char *MakeMovieStateName(const char *filename); 73 74 void MovieReadState(FILE* fp); 75 76 void PauseOrUnpause(void); 77 78 int IsMovieLoaded(void); 79 80 extern int framecounter; 81 extern int LagFrameFlag; 82 extern int lagframecounter; 83 extern char MovieStatus[40]; 84 extern char InputDisplayString[40]; 85 extern int FrameAdvanceVariable; 86 #endif 87