diff options
| author | erdgeist <> | 2003-05-13 12:05:12 +0000 |
|---|---|---|
| committer | erdgeist <> | 2003-05-13 12:05:12 +0000 |
| commit | 866f0ad8030ea2ceea22a4d61e6ff0006546c3fa (patch) | |
| tree | 54f3af1248bce246e1dd92b196b818271d21f2f6 /Movie.c | |
Here we go
Diffstat (limited to 'Movie.c')
| -rwxr-xr-x | Movie.c | 72 |
1 files changed, 72 insertions, 0 deletions
| @@ -0,0 +1,72 @@ | |||
| 1 | #include <time.h> | ||
| 2 | |||
| 3 | struct Frame; | ||
| 4 | struct Movie; | ||
| 5 | |||
| 6 | typedef struct Frame Frame; | ||
| 7 | typedef struct Movie Movie; | ||
| 8 | |||
| 9 | struct Frame { | ||
| 10 | unsigned long *framedata; | ||
| 11 | Frame *next; | ||
| 12 | }; | ||
| 13 | |||
| 14 | struct Movie { | ||
| 15 | Frame *Movie; | ||
| 16 | Movie *next; | ||
| 17 | int rate; | ||
| 18 | time_t starttime; | ||
| 19 | }; | ||
| 20 | |||
| 21 | static Movie *movie_list; | ||
| 22 | static Movie *current; | ||
| 23 | |||
| 24 | void Movie_init( int points ) { | ||
| 25 | movie_list = (Movie*)0; | ||
| 26 | current = (Movie*)0; | ||
| 27 | } | ||
| 28 | |||
| 29 | void Movie_destroy( void ) { | ||
| 30 | Movie *tmp = movie_list; | ||
| 31 | |||
| 32 | current = (Movie*)0; | ||
| 33 | while( tmp ) { | ||
| 34 | Movie *next = tmp->next; | ||
| 35 | Movie_unloadmovie( tmp ); | ||
| 36 | tmp = next; | ||
| 37 | } | ||
| 38 | } | ||
| 39 | |||
| 40 | Movie *Movie_loadmovie( char *filename ) { | ||
| 41 | |||
| 42 | } | ||
| 43 | |||
| 44 | void Movie_unloadmovie( Movie *movie ) { | ||
| 45 | Movie *tmp = movie_list; | ||
| 46 | if( current == movie ) | ||
| 47 | current = (Movie*)0; | ||
| 48 | |||
| 49 | while( tmp && ( tmp != movie )) | ||
| 50 | tmp = tmp->next; | ||
| 51 | |||
| 52 | if( tmp) { | ||
| 53 | |||
| 54 | free( tmp ); | ||
| 55 | } | ||
| 56 | } | ||
| 57 | |||
| 58 | void Movie_playmovie( Movie *movie, int rate ) { | ||
| 59 | |||
| 60 | } | ||
| 61 | |||
| 62 | void Movie_stamptime( void ) { | ||
| 63 | |||
| 64 | } | ||
| 65 | |||
| 66 | int Movie_checkframe( ) { | ||
| 67 | return 1; | ||
| 68 | } | ||
| 69 | |||
| 70 | unsigned long Movie_getpixelcolor( int x, int y, int z) { | ||
| 71 | |||
| 72 | } | ||
