Raw video button no longer a dummy.

This commit is contained in:
n-a-c-h
2005-04-18 01:41:02 +00:00
parent dc0ed870d3
commit 0ada6aa867
3 changed files with 55 additions and 2 deletions

View File

@@ -106,7 +106,7 @@ EXTSYM JoyMaxX209,JoyMinY209,JoyMaxY209,GetCoords,GetCoords3,MultiTap,SFXEnable
EXTSYM RestoreSystemVars,GUIBIFIL,GUIHQ2X,GUIHQ3X,GUIHQ4X,firstsaveinc,nssdip1
EXTSYM nssdip2,nssdip3,nssdip4,nssdip5,nssdip6,SkipMovie,MovieStop,MoviePlay
EXTSYM MovieRecord,MovieInsertChapter,MovieSeekAhead,MovieSeekBehind
EXTSYM ResetDuringMovie
EXTSYM ResetDuringMovie,MovieDumpRaw
%ifdef __LINUX__
EXTSYM numlockptr

View File

@@ -632,6 +632,24 @@ ProcessMouseButtons:
popad
ret
.noNextChap
cmp byte[GUICBHold],32 ; append movie
jne .noAppend
mov byte[GUICBHold],0
mov byte[GUIQuit],2
pushad
;call MovieAppend
popad
ret
.noAppend
cmp byte[GUICBHold],34 ; dump raw
jne .noDumpRaw
mov byte[GUICBHold],0
mov byte[GUIQuit],2
pushad
call MovieDumpRaw
popad
ret
.noDumpRaw
cmp byte[GUICBHold],40
je near SetAllKeys
cmp byte[GUICBHold],50

View File

@@ -1603,14 +1603,16 @@ static void raw_video_close()
}
}
static void raw_video_open(const char *filename)
static bool raw_video_open(const char *filename)
{
memset(&raw_vid, 0, sizeof(raw_vid));
raw_vid.fp = fopen(filename, "wb");
if (!(raw_vid.frame_buffer = (unsigned int *)malloc(RAW_PIXEL_FRAME_SIZE*RAW_BUFFER_FRAMES)))
{
raw_video_close();
return(false);
}
return(true);
}
#define PIXEL (vidbuffer[(i*288) + j + 16])
@@ -1749,6 +1751,8 @@ bool MovieWaiting = false;
enum MovieStatus { MOVIE_OFF = 0, MOVIE_PLAYBACK, MOVIE_RECORD, MOVIE_OLD_PLAY };
#define SetMovieMode(mode) (MovieProcessing = (unsigned char)mode)
bool RawDumpInProgress = false;
extern bool SRAMState, SloMo50;
bool PrevSRAMState;
extern unsigned char ComboCounter, MovieRecordWinVal, AllocatedRewindStates;
@@ -1979,12 +1983,23 @@ void Replay()
Msgptr = sub;
MessageOn = MovieSub_GetDuration();
}
if (RawDumpInProgress)
{
raw_video_write_frame();
}
}
else
{
if (zmv_frames_replayed())
{
Msgptr = "MOVIE FINISHED.";
if (RawDumpInProgress)
{
raw_video_close();
RawDumpInProgress = false;
}
}
else
{
@@ -2038,6 +2053,11 @@ void MovieStop()
case MOVIE_PLAYBACK:
zmv_replay_finished();
MovieSub_Close();
if (RawDumpInProgress)
{
raw_video_close();
RawDumpInProgress = false;
}
MessageOn = 0;
break;
@@ -2187,3 +2207,18 @@ void GetMovieFrameStr()
break;
}
}
void MovieDumpRaw()
{
switch (MovieProcessing)
{
case MOVIE_OFF:
MoviePlay();
SRAMChdir();
RawDumpInProgress = raw_video_open("rawvideo.bin");
asm_call(ChangetoLOADdir);
break;
}
}