Mercurial > vba-clojure
changeset 36:47a513ea3529
getting something now when recording movies
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 05 Mar 2012 14:47:45 -0600 |
parents | b82b18185103 |
children | 9eae224b8056 |
files | play-movie.sh src/common/movie.cpp |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/play-movie.sh Mon Mar 05 14:47:45 2012 -0600 1.3 @@ -0,0 +1,3 @@ 1.4 +/home/r/proj/vba-restore/build/artifacts/bin/VisualBAdvance \ 1.5 + --playmovie=/home/r/proj/vba-restore/build/movie.vba \ 1.6 + /home/r/proj/pokemonscape/roms/yellow.gbc
2.1 --- a/src/common/movie.cpp Mon Mar 05 14:26:45 2012 -0600 2.2 +++ b/src/common/movie.cpp Mon Mar 05 14:47:45 2012 -0600 2.3 @@ -54,7 +54,7 @@ 2.4 #endif 2.5 2.6 extern int emulating; // from system.cpp 2.7 -extern u16 currentButtons[4]; // from System.cpp 2.8 +extern u16 currentButtons[4]; // from SDL.cpp 2.9 extern u16 lastKeys; 2.10 2.11 SMovie Movie; 2.12 @@ -63,7 +63,7 @@ 2.13 // probably bad idea to have so many global variables, but I hate to recompile almost everything after editing VBA.h 2.14 bool autoConvertMovieWhenPlaying = false; 2.15 2.16 -static u16 initialInputs[4] = { 0 }; 2.17 +static u16 initialInputs[4] = { 0, 0, 0, 0 }; 2.18 2.19 static bool resetSignaled = false; 2.20 static bool resetSignaledLast = false; 2.21 @@ -1182,6 +1182,7 @@ 2.22 else if (Movie.state == MOVIE_STATE_RECORD) 2.23 { 2.24 printf("RLM: Movie_STATE_RECORD\n"); 2.25 + VBAMovieWrite(0,true); 2.26 // use first fseek? 2.27 //TODO: THis is the problem. 2.28 if (Movie.inputBuffer){ 2.29 @@ -1230,10 +1231,11 @@ 2.30 2.31 reserve_buffer_space((uint32)((Movie.inputBufferPtr - Movie.inputBuffer) + Movie.bytesPerFrame)); 2.32 2.33 - if (Movie.header.controllerFlags & MOVIE_CONTROLLER(i)) 2.34 + if (Movie.header.controllerFlags) 2.35 { 2.36 // get the current controller data 2.37 uint16 buttonData = currentButtons[i]; 2.38 + printf("RLM: currentButtons %i\n", currentButtons[0]); 2.39 2.40 // mask away the irrelevent bits 2.41 buttonData &= BUTTON_REGULAR_MASK | BUTTON_MOTION_MASK;