Added video player and .duk video decoder;

Code will attempt playing intro and victory movies
(video playback support phase 2)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1250 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2003-09-20 01:17:21 +00:00
parent 4031518aa5
commit fc49c38865
4 changed files with 13 additions and 14 deletions
+3 -5
View File
@@ -92,6 +92,7 @@ Introduction (void)
LoadMasterShipList ();
FlushInput ();
InitGameKernel ();
while ((GetTimeCounter () <= TimeOut) &&
!(GLOBAL (CurrentActivity) & CHECK_ABORT))
{
@@ -132,10 +133,7 @@ Introduction (void)
if (InputState == 0)
{
static BOOLEAN play_intro = TRUE;
DoFMV (play_intro ? "intro" : "drumall", NULL, TRUE);
play_intro = !play_intro;
DoFMV ("slides/intro/intro.duk", NULL, TRUE);
}
}
@@ -147,7 +145,7 @@ Victory (void)
xform_buf[0] = FadeAllToBlack;
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)xform_buf, ONE_SECOND / 2));
DoFMV ("victory", NULL, TRUE);
DoFMV ("slides/ending/victory.duk", NULL, TRUE);
xform_buf[0] = FadeAllToBlack;
XFormColorMap ((COLORMAPPTR)xform_buf, 0);
+7 -6
View File
@@ -30,12 +30,13 @@ void LoadMasterShipList (void);
void
DoFMV (char *name, char *loopname, BOOLEAN uninit)
{
MEM_HANDLE vidref = 0;
VidPlay (vidref, loopname, uninit);
while(VidPlaying ())
;
VidStop();
(void) name;
VIDEO_REF VidRef;
VidRef = LoadVideoFile (name);
VidPlay (VidRef, loopname, uninit);
VidDoInput ();
VidStop ();
DestroyVideo (VidRef);
}
/* //Already defined in fmv.c
+2 -2
View File
@@ -883,14 +883,14 @@ while (--ac > 0)
}
#endif //DEBUG_PSYTRON || CREATE_JOURNAL
Logo ();
if (LoadKernel (0,0))
{
extern BOOLEAN StartGame (void);
fprintf (stderr, "We've loaded the Kernel\n");
Logo ();
// OpenJournal ();
while (StartGame ())
{
+1 -1
View File
@@ -207,7 +207,7 @@ extern void StopVid (void);
extern void PlayVid (MEM_HANDLE VidRef, BOOLEAN Continuous);
extern MEM_HANDLE LoadVidFile (PSTR pStr);
extern MEM_HANDLE LoadVidInstance (DWORD res);
extern MEM_HANDLE VidPlaying (void);
//extern MEM_HANDLE VidPlaying (void); // superseeded by VIDEO_REF version
extern BOOLEAN DestroyVid (MEM_HANDLE VidRef);
extern DRAWABLE CreatePixmapRegion (FRAME Frame, PPOINT pOrg, SIZE width,