Exemplo n.º 1
0
/**
 * @brief Open a cinematic file and store status to a structure
 * @sa CIN_CloseCinematic
 */
void CIN_OpenCinematic (cinematic_t* cin, const char* fileName)
{
	char name[MAX_OSPATH];
	int status = 1;

	Com_StripExtension(fileName, name, sizeof(name));

	/* If already playing a cinematic, stop it */
	CIN_CloseCinematic(cin);

	if (FS_CheckFile("%s.roq", name) >= 0)
		status = CIN_ROQ_OpenCinematic(cin, va("%s.roq", name));
	else if (FS_CheckFile("%s.ogm", name) >= 0)
		status = CIN_OGM_OpenCinematic(cin, va("%s.ogm", name));

	if (status != 0) {
		Com_Printf("Could not load cinematic '%s'\n", name);
		cin->status = CIN_STATUS_INVALID;
	}
}
Exemplo n.º 2
0
/**
 * @sa CL_Frame
 */
void CIN_RunCinematic (cinematic_t* cin)
{
	assert(cin->status != CIN_STATUS_NONE);

	/* Decode chunks until the desired frame is reached */
	if (cin->cinematicType == CINEMATIC_TYPE_ROQ && CIN_ROQ_RunCinematic(cin))
		return;
	else if (cin->cinematicType == CINEMATIC_TYPE_OGM && CIN_OGM_RunCinematic(cin))
		return;

	/* If we get here, the cinematic has either finished or failed */
	if (cin->replay) {
		char name[MAX_QPATH];
		Q_strncpyz(name, cin->name, sizeof(name));
		CIN_OpenCinematic(cin, name);
		cin->replay = true;
	} else {
		CIN_CloseCinematic(cin);
	}
}
Exemplo n.º 3
0
void uiVideoNode::onWindowClosed (uiNode_t *node)
{
	/* If playing a cinematic, stop it */
	CIN_CloseCinematic(&(EXTRADATA(node).cin));
}
Exemplo n.º 4
0
static void UI_VideoNodeClose (uiNode_t *node)
{
	/* If playing a cinematic, stop it */
	CIN_CloseCinematic(&(EXTRADATA(node).cin));
}