Made ZMV output more verbose.

This commit is contained in:
n-a-c-h
2005-03-19 17:40:59 +00:00
parent d953110fc5
commit d9aa03b67e

View File

@@ -574,6 +574,11 @@ static void zmv_record_finish()
fclose(zmv_vars.fp); fclose(zmv_vars.fp);
} }
static size_t zmv_frames_recorded()
{
return(zmv_vars.header.frames);
}
/* /*
Open and replay ZMV Open and replay ZMV
@@ -866,6 +871,11 @@ static void zmv_replay_finished()
fclose(zmv_vars.fp); fclose(zmv_vars.fp);
} }
static size_t zmv_frames_replayed()
{
return(zmv_open_vars.frames_replayed);
}
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
@@ -915,7 +925,7 @@ static char *MovieSub_GetData()
{ {
char *i, *num; char *i, *num;
if (zmv_open_vars.frames_replayed > MovieSub.message_start + MovieSub.message_duration) if (zmv_frames_replayed() > MovieSub.message_start + MovieSub.message_duration)
{ {
MovieSub.message_duration = 0; MovieSub.message_duration = 0;
do do
@@ -930,7 +940,7 @@ static char *MovieSub_GetData()
if (!isdigit(*i)) { return(0); } if (!isdigit(*i)) { return(0); }
} }
MovieSub.message_start = atoi(num); MovieSub.message_start = atoi(num);
} while(MovieSub.message_start < zmv_open_vars.frames_replayed ); } while(MovieSub.message_start < zmv_frames_replayed());
if (!(num = strtok(0, ":"))) { return(0); } if (!(num = strtok(0, ":"))) { return(0); }
for (i = num; *i; i++) for (i = num; *i; i++)
{ {
@@ -943,7 +953,7 @@ static char *MovieSub_GetData()
MovieSub.message_duration = atoi(num); MovieSub.message_duration = atoi(num);
} }
if (zmv_open_vars.frames_replayed == MovieSub.message_start) if (zmv_frames_replayed() == MovieSub.message_start)
{ {
return(strtok(0, ":")); return(strtok(0, ":"));
} }
@@ -951,11 +961,6 @@ static char *MovieSub_GetData()
return(0); return(0);
} }
static size_t MovieSub_GetDuration()
{
return(MovieSub.message_duration);
}
static void MovieSub_ResetStream() static void MovieSub_ResetStream()
{ {
if (MovieSub.fp) if (MovieSub.fp)
@@ -966,6 +971,12 @@ static void MovieSub_ResetStream()
} }
} }
static size_t MovieSub_GetDuration()
{
return(MovieSub.message_duration);
}
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
@@ -1051,8 +1062,15 @@ void Replay()
} }
} }
else else
{
if (zmv_frames_replayed())
{ {
Msgptr = "MOVIE FINISHED."; Msgptr = "MOVIE FINISHED.";
}
else
{
Msgptr = "STATE LOADED.";
}
MessageOn = MsgCount; MessageOn = MsgCount;
MovieProcessing = 0; MovieProcessing = 0;
@@ -1081,7 +1099,14 @@ void MovieStop()
switch (MovieProcessing) switch (MovieProcessing)
{ {
case 1: zmv_replay_finished(); break; case 1: zmv_replay_finished(); break;
case 2: zmv_record_finish(); break; case 2:
zmv_record_finish();
if (!zmv_frames_recorded())
{
Msgptr = "STATE SAVED.";
MessageOn = MsgCount;
}
break;
} }
MovieProcessing = 0; MovieProcessing = 0;
} }
@@ -1115,10 +1140,13 @@ void MoviePlay()
memcpy(&fnamest[statefileloc-3], ".sub", 4); memcpy(&fnamest[statefileloc-3], ".sub", 4);
if (isdigit(CMovieExt)) { fnamest[statefileloc] = CMovieExt; } if (isdigit(CMovieExt)) { fnamest[statefileloc] = CMovieExt; }
MovieSub_Open(fnamest+1); MovieSub_Open(fnamest+1);
Msgptr = "MOVIE STARTED.";
MessageOn = MsgCount;
} }
else else
{ {
Msgptr = "MOVIE COULD NOT BE STARTED.";
MessageOn = MsgCount;
} }
memcpy (&fnamest[statefileloc-3], FileExt, 4); memcpy (&fnamest[statefileloc-3], FileExt, 4);
@@ -1149,6 +1177,8 @@ void MovieRecord()
{ {
zmv_create(fnamest+1); zmv_create(fnamest+1);
MovieProcessing = 2; MovieProcessing = 2;
Msgptr = "MOVIE RECORDING.";
MessageOn = MsgCount;
} }
else else
{ {