2006-03-20 17:12:09 +00:00
|
|
|
/*
|
2014-06-01 17:55:23 +00:00
|
|
|
* Portions of this file are copyright Rebirth contributors and licensed as
|
|
|
|
* described in COPYING.txt.
|
|
|
|
* Portions of this file are copyright Parallax Software and licensed
|
|
|
|
* according to the Parallax license below.
|
|
|
|
* See COPYING.txt for license details.
|
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
|
|
|
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
|
|
|
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
|
|
|
|
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
|
|
|
|
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
|
|
|
|
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
|
|
|
|
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
|
|
|
|
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
|
|
|
|
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|
|
|
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Header for movie.c
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-05-14 02:23:13 +00:00
|
|
|
#pragma once
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2021-06-28 03:37:49 +00:00
|
|
|
#include <limits.h>
|
2014-10-29 03:01:18 +00:00
|
|
|
#include "d2x-rebirth/libmve/mvelib.h"
|
2021-06-28 03:37:49 +00:00
|
|
|
#include "dsx-ns.h"
|
|
|
|
|
|
|
|
namespace dsx {
|
2012-11-11 22:12:51 +00:00
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
#define MOVIE_ABORT_ON 1
|
|
|
|
#define MOVIE_ABORT_OFF 0
|
|
|
|
|
2021-01-17 22:23:23 +00:00
|
|
|
enum class movie_play_status : uint8_t
|
|
|
|
{
|
|
|
|
skipped, // movie wasn't present
|
2021-01-17 22:23:23 +00:00
|
|
|
started, // movie was present and started; it may or may not have completed
|
2021-01-17 22:23:23 +00:00
|
|
|
};
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2016-09-24 18:06:11 +00:00
|
|
|
#if DXX_USE_OGL
|
2015-05-14 02:23:13 +00:00
|
|
|
#define MOVIE_WIDTH (!GameArg.GfxSkipHiresMovie && grd_curscreen->get_screen_width() < 640 ? static_cast<uint16_t>(640) : grd_curscreen->get_screen_width())
|
|
|
|
#define MOVIE_HEIGHT (!GameArg.GfxSkipHiresMovie && grd_curscreen->get_screen_height() < 480 ? static_cast<uint16_t>(480) : grd_curscreen->get_screen_height())
|
2007-02-08 15:36:56 +00:00
|
|
|
#else
|
2015-05-14 02:23:13 +00:00
|
|
|
#define MOVIE_WIDTH static_cast<uint16_t>(!GameArg.GfxSkipHiresMovie? 640 : 320)
|
|
|
|
#define MOVIE_HEIGHT static_cast<uint16_t>(!GameArg.GfxSkipHiresMovie? 480 : 200)
|
2007-02-08 15:36:56 +00:00
|
|
|
#endif
|
|
|
|
|
2021-01-17 22:23:23 +00:00
|
|
|
movie_play_status PlayMovie(const char *subtitles, const char *filename, int allow_abort);
|
2014-10-29 03:01:18 +00:00
|
|
|
int InitRobotMovie(const char *filename, MVESTREAM_ptr_t &pMovie);
|
|
|
|
int RotateRobot(MVESTREAM_ptr_t &pMovie);
|
|
|
|
void DeInitRobotMovie(MVESTREAM_ptr_t &pMovie);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2021-06-28 03:37:49 +00:00
|
|
|
struct LoadedMovie
|
|
|
|
{
|
|
|
|
std::array<char, PATH_MAX> pathname;
|
|
|
|
LoadedMovie()
|
|
|
|
{
|
|
|
|
pathname[0] = 0;
|
|
|
|
}
|
|
|
|
~LoadedMovie();
|
|
|
|
};
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2021-06-28 03:37:49 +00:00
|
|
|
struct BuiltinMovies
|
|
|
|
{
|
|
|
|
std::array<LoadedMovie, 3> movies;
|
|
|
|
};
|
|
|
|
|
|
|
|
// find and initialize the movie libraries
|
|
|
|
std::unique_ptr<BuiltinMovies> init_movies();
|
|
|
|
std::unique_ptr<LoadedMovie> init_extra_robot_movie(const char *filename);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
extern int MovieHires; // specifies whether movies use low or high res
|
|
|
|
|
2021-06-28 03:37:49 +00:00
|
|
|
}
|