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:
@@ -92,6 +92,7 @@ Introduction (void)
|
|||||||
LoadMasterShipList ();
|
LoadMasterShipList ();
|
||||||
FlushInput ();
|
FlushInput ();
|
||||||
InitGameKernel ();
|
InitGameKernel ();
|
||||||
|
|
||||||
while ((GetTimeCounter () <= TimeOut) &&
|
while ((GetTimeCounter () <= TimeOut) &&
|
||||||
!(GLOBAL (CurrentActivity) & CHECK_ABORT))
|
!(GLOBAL (CurrentActivity) & CHECK_ABORT))
|
||||||
{
|
{
|
||||||
@@ -132,10 +133,7 @@ Introduction (void)
|
|||||||
|
|
||||||
if (InputState == 0)
|
if (InputState == 0)
|
||||||
{
|
{
|
||||||
static BOOLEAN play_intro = TRUE;
|
DoFMV ("slides/intro/intro.duk", NULL, TRUE);
|
||||||
|
|
||||||
DoFMV (play_intro ? "intro" : "drumall", NULL, TRUE);
|
|
||||||
play_intro = !play_intro;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,7 +145,7 @@ Victory (void)
|
|||||||
xform_buf[0] = FadeAllToBlack;
|
xform_buf[0] = FadeAllToBlack;
|
||||||
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)xform_buf, ONE_SECOND / 2));
|
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)xform_buf, ONE_SECOND / 2));
|
||||||
|
|
||||||
DoFMV ("victory", NULL, TRUE);
|
DoFMV ("slides/ending/victory.duk", NULL, TRUE);
|
||||||
|
|
||||||
xform_buf[0] = FadeAllToBlack;
|
xform_buf[0] = FadeAllToBlack;
|
||||||
XFormColorMap ((COLORMAPPTR)xform_buf, 0);
|
XFormColorMap ((COLORMAPPTR)xform_buf, 0);
|
||||||
|
|||||||
@@ -30,12 +30,13 @@ void LoadMasterShipList (void);
|
|||||||
void
|
void
|
||||||
DoFMV (char *name, char *loopname, BOOLEAN uninit)
|
DoFMV (char *name, char *loopname, BOOLEAN uninit)
|
||||||
{
|
{
|
||||||
MEM_HANDLE vidref = 0;
|
VIDEO_REF VidRef;
|
||||||
VidPlay (vidref, loopname, uninit);
|
|
||||||
while(VidPlaying ())
|
VidRef = LoadVideoFile (name);
|
||||||
;
|
VidPlay (VidRef, loopname, uninit);
|
||||||
|
VidDoInput ();
|
||||||
VidStop ();
|
VidStop ();
|
||||||
(void) name;
|
DestroyVideo (VidRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* //Already defined in fmv.c
|
/* //Already defined in fmv.c
|
||||||
|
|||||||
@@ -883,14 +883,14 @@ while (--ac > 0)
|
|||||||
}
|
}
|
||||||
#endif //DEBUG_PSYTRON || CREATE_JOURNAL
|
#endif //DEBUG_PSYTRON || CREATE_JOURNAL
|
||||||
|
|
||||||
Logo ();
|
|
||||||
|
|
||||||
if (LoadKernel (0,0))
|
if (LoadKernel (0,0))
|
||||||
{
|
{
|
||||||
extern BOOLEAN StartGame (void);
|
extern BOOLEAN StartGame (void);
|
||||||
|
|
||||||
fprintf (stderr, "We've loaded the Kernel\n");
|
fprintf (stderr, "We've loaded the Kernel\n");
|
||||||
|
|
||||||
|
Logo ();
|
||||||
|
|
||||||
// OpenJournal ();
|
// OpenJournal ();
|
||||||
while (StartGame ())
|
while (StartGame ())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ extern void StopVid (void);
|
|||||||
extern void PlayVid (MEM_HANDLE VidRef, BOOLEAN Continuous);
|
extern void PlayVid (MEM_HANDLE VidRef, BOOLEAN Continuous);
|
||||||
extern MEM_HANDLE LoadVidFile (PSTR pStr);
|
extern MEM_HANDLE LoadVidFile (PSTR pStr);
|
||||||
extern MEM_HANDLE LoadVidInstance (DWORD res);
|
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 BOOLEAN DestroyVid (MEM_HANDLE VidRef);
|
||||||
|
|
||||||
extern DRAWABLE CreatePixmapRegion (FRAME Frame, PPOINT pOrg, SIZE width,
|
extern DRAWABLE CreatePixmapRegion (FRAME Frame, PPOINT pOrg, SIZE width,
|
||||||
|
|||||||
Reference in New Issue
Block a user