165 static void *
operator new(
size_t nSize);
174 static void operator delete(
void *pBlock);
363 int mTexturesMatched;
407 return new Movie(name);
A 256 entry colour table an ABitmap points at.
Definition apalette.h:31
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Reader that plays a chunked movie file into per-track handlers.
Definition amovieset.h:24
Animatable()
Construct an animatable with no children, no filters, and a zero frame.
Sink that the engine formats its diagnostic and failure text into.
Definition dbg.h:33
File name that the renderer resolves against a shared root directory.
Definition filepath.h:24
Animation that streams a compressed video file into a set of textures.
Definition movie.h:46
void SetFilename(const HxStr &name)
Set the file this movie plays, under FilePath::sRoot.
virtual const HxStr & ClassName() const
Report the class key a .rnd file writes for a movie.
static void ReadTrackTextures(Stream &stream, std::list< TrackTexture > &textures)
Read a track texture list from stream.
void SetTrackTexture(int nTrackId, Tex *pTex)
Play a track into a texture, replacing any texture the track played into before.
const HxStr & GetRelativeFilename() const
Return mFilename relative to FilePath::sRoot.
virtual void Save(Stream &stream)
Serialise the movie.
static void MasterTrackCallback(AMovieChunkHdr *pHeader, void *pPayload, void *pData)
The AMovieSet handler AttachTrack() installs, which passes the chunk to pData's OnChunk().
void RemoveTrackTexture(int nTrackId)
Drop the first entry of mTrackTextures that plays nTrackId, releasing its texture,...
Movie(const HxStr &name)
Construct a movie with no file, no track textures, and a cleared stream buffer.
virtual void Replace(Object *pFrom, Object *pTo)
Replace one object reference with another.
virtual void Copy(const Object *pSource, unsigned nFlags)
Copy another movie over this one.
void CloseMovieFile()
Release every track texture and destroy the stream reader.
virtual void SetFrameSelf(float flFrame)
Advance the movie to a frame.
void AttachTrack(int nTrackId)
Route one track's chunks to this movie.
void DetachTrack(int nTrackId)
Stop routing one track's chunks anywhere.
virtual void DumpText(Dbg &sink)
Write a description of this movie to sink.
virtual void Load(Stream &stream)
Read the movie record from stream.
virtual void Reopen()
Reopen the file this movie already names.
std::list< TrackTexture > mTrackTextures
Textures the file's tracks play into.
Definition movie.h:372
FilePath mFilename
File this movie plays, resolved against FilePath::sRoot.
Definition movie.h:354
Tex * FindTrackTexture(int nTrackId) const
Return the texture of the first entry of mTrackTextures that plays nTrackId.
void OpenMovieFile()
Open the file mFilename names and take a reference on every track texture.
void OnChunk(AMovieChunkHdr *pHeader, void *pPayload)
Draw one video chunk into the texture its track plays into.
virtual ~Movie()
Close the file and release every track texture.
Base of every object the renderer can load, resolve by name, and serialise.
Definition object.h:43
Byte stream that every renderer object serialises itself through.
Definition stream.h:31
Texture, as a bitmap path plus the load state of its mip levels.
Definition tex.h:43
The rendering engine.
Definition animhelper.h:3
HxStr g_movieClassName
Registered class name of Rnd::Movie, the string "Movie".
Object * CreateRegisteredMovie(const HxStr &name)
Allocate and construct a movie.
Manager TheManager
The renderer's object registry.
void RegisterMovieClass()
Register the "Movie" class with Rnd::Manager.
Definition movie.h:430
Movie * NewMovie(const HxStr &name)
Allocate and construct a movie, returning the Movie pointer itself.
Definition movie.h:405
Header of every chunk in a movie file, followed by mSize payload bytes.
Definition amoviechunkhdr.h:10
One video track of the file and the texture it plays into.
Definition movie.h:55
int mTrackId
Definition movie.h:56
Tex * mTex
Definition movie.h:57