Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
137 lines
2.7 KiB
Plaintext
137 lines
2.7 KiB
Plaintext
#include "Content\\ShellScripts\\stddefs.h"
|
|
// This control created by brennanp 6.14.2000 ??Problems?? call x53796
|
|
//
|
|
// Parameters to pass into pane object
|
|
// string szMovie //The movie file name
|
|
// movie aviMovie //The movie path and file name
|
|
// int fRegion //Should this control have a region(toggle)
|
|
// int nHelpID //Rollover help text
|
|
// int nLoop //#Times to loop
|
|
// int nScaleX //Percentage to scale along X
|
|
// int nScaleY //Percentage to scale along Y
|
|
//
|
|
//How to Initialize the MoviePlayer object (When using defaults some line do not have to be included)
|
|
// object oMovie = s_MoviePlayer
|
|
// oMovie.location =
|
|
// oMovie.szMovie =
|
|
// oMovie.fRegion =
|
|
// oMovie.nHelpID =
|
|
// oMovie.nLoop =
|
|
// (d)oMovie.nScaleX =
|
|
// (d)oMovie.nScaleY =
|
|
// initialize(oMovie)
|
|
|
|
//These defines have to be used for the pane object to work
|
|
//#define nMSG_LOOP 10010
|
|
//#define nMSG_PLAY 10011
|
|
//#define nMSG_STOP 10012
|
|
//#define nMSG_MEDIAEND 10013
|
|
|
|
s_MoviePlayer
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
string szMovie
|
|
pane aviMovie //The movie file name
|
|
int fRegion
|
|
int nHelpID
|
|
int nLoop //#Times to loop
|
|
int fAutoStart = 1
|
|
|
|
int nScaleX = 100 //Percentage to scale along X
|
|
int nScaleY = 100 //Percentage to scale along Y
|
|
|
|
location = 0, 0, nZ_MOVIE
|
|
catchup = 0
|
|
framerate = 0
|
|
}
|
|
GUI_INIT
|
|
{
|
|
framerate = 0
|
|
aviMovie = szPATH_MOVIES szMovie
|
|
scale (aviMovie) = nScaleX, nScaleY
|
|
|
|
//
|
|
//If this Movie is supposed to have a region...
|
|
//
|
|
if (fRegion)
|
|
{
|
|
region = 0,0 to getwidth(aviMovie),getheight(aviMovie)
|
|
}
|
|
if (fAutoStart)
|
|
{
|
|
if (nLoop == 0)
|
|
{
|
|
mail (nMSG_LOOP, this)
|
|
}
|
|
else
|
|
{
|
|
mail (nMSG_PLAY, this)
|
|
}
|
|
}
|
|
}
|
|
|
|
REGION_ENTERED
|
|
{
|
|
oRollover.nHelpID = nHelpID
|
|
mail (nMSG_INPUT_RESID,oRollover)
|
|
}
|
|
|
|
REGION_EXITED
|
|
{
|
|
mail (nMSG_CLEARHELP,oRollover)
|
|
}
|
|
GUI_EXECUTE
|
|
{
|
|
if (status_stopped == getstatus(aviMovie))
|
|
{
|
|
// nLoop--
|
|
|
|
if (nLoop == 0)
|
|
{
|
|
mail (nMSG_PLAY, this)
|
|
}
|
|
else
|
|
{
|
|
framerate = 0
|
|
mail (nMSG_MEDIAEND, parent)
|
|
}
|
|
}
|
|
}
|
|
|
|
GUI_MAILBOX
|
|
{
|
|
switch (getmessage())
|
|
{
|
|
case nMSG_LOOP:
|
|
//
|
|
//Don't need GUI_EXECUTE checking when always looping
|
|
//
|
|
framerate = 0
|
|
activate(this)
|
|
loop aviMovie
|
|
break
|
|
|
|
case nMSG_PLAY:
|
|
//
|
|
//Call GUI_EXECUTE 10 times per second to check for movie end...
|
|
//
|
|
aviMovie = szPATH_MOVIES szMovie
|
|
//scale (aviMovie) = nScaleX, nScaleY
|
|
framerate = 10
|
|
play aviMovie
|
|
activate(this)
|
|
break
|
|
|
|
case nMSG_STOP:
|
|
framerate = 0
|
|
stop aviMovie
|
|
break
|
|
}
|
|
}
|
|
|
|
GUI_DRAW
|
|
{
|
|
render aviMovie, location
|
|
}
|
|
} |