wavelength 1.0.0
Loading...
Searching...
No Matches
RndMovie Class Reference

Animation that plays a movie file into a texture. More...

#include <rndmovie.h>

Inheritance diagram for RndMovie:
Collaboration diagram for RndMovie:

Public Member Functions

 RndMovie (const char *pszName)
 Construct a movie without a file or a texture.
 ~RndMovie () override
 Close the movie.
void * operator new (size_t nSize)
 Allocate a movie, billed to the class name.
void operator delete (void *pBlock)
 Release a movie.
void ListAnimObjects (std::list< RndObject * > &objects) override
 Add the texture to a list, then the objects of the children.
virtual void Open ()
 Take a reference on the texture.
virtual void Close ()
 Drop the reference on the texture.
void DumpText (PrnStream &stream) override
 Write a description of the movie and its base.
void Save (BinStream &stream) override
 Write the movie and its base.
void Replace (RndObject *pFrom, RndObject *pTo) override
 Replace the texture with another.
const char * ClassName () const override
 Report the class name.
void Copy (const RndObject *pSource, int nFlags) override
 Copy another movie and its base, closing the movie first and opening it after.
void Load (BinStream &stream) override
 Read what Save() wrote, or an earlier version of it, closing the movie first and opening it after.
const FilePath & GetFile () const
RndTex * GetTex () const
Public Member Functions inherited from RndAnimatable
 RndAnimatable ()
 Construct an animatable at frame 0 without children or filters.
 ~RndAnimatable () override
 Drop the references on the children and delete the filters.
virtual float EndFrame ()
 Report the frame at which the animation ends.
virtual int SetFrameSelf (float fFrame)
 Apply a filtered frame to this object alone.
RndAnimatable * Parent ()
 Find the animatable whose children include this one.
void SetFrame (float fFrame)
 Filter a frame, apply it, and pass the result on to the children.
float FilterFrame (float fValue)
 Run a frame through the filters.
float UnfilterFrame (float fValue)
 Run a filtered frame back through the filters, last first.
float ChildrenEndFrame ()
 Report the latest end frame of the children, unfiltered through this animatable.
bool AddAnim (RndAnimatable *pAnim)
 Append a child.
void RemoveAnim (RndAnimatable *pAnim)
 Remove a child.
void RemoveAllAnims ()
 Remove every child.
const std::list< Filter * > & GetFilters () const
float GetFrame () const
float GetFilteredFrame () const
const std::list< RndAnimatable * > & GetAnims () const
std::list< Filter * > & GetFilters ()
Public Member Functions inherited from RndObject
 RndObject (const char *pszName)
 Construct an object and register it under a name.
virtual ~RndObject ()
 Notify every referrer, then erase the registration.
void SetName (const char *pszName)
 Register the object under a different name.
void AddRef (RndObject *pReferrer)
 Register an object as a store of a pointer to this one.
void RemoveRef (RndObject *pReferrer)
 Drop the first registration AddRef() made for a referrer.
const char * GetName () const
const std::list< RndObject * > & GetRefs () const
int GetInternal () const
void SetInternal (int nInternal)

Static Public Member Functions

static RndObject * New (const char *pszName)
 Create a movie.
Static Public Member Functions inherited from RndAnimatable
static Filter * NewFilter (int nType)
 Create a filter stage of a type, with its parameters unset.
static void CollectChildren (std::list< RndObject * > &objects, RndAnimatable *pAnimatable)
 Append every animation descendant of an animatable, depth first, each before its descendants.

Static Public Attributes

static const char * sClassName
 The class name a .rnd file writes, Movie.
static int sRev
 The format version Save() writes and Load() accepts.
Static Public Attributes inherited from RndAnimatable
static int sRev
 The format version Save() writes and Load() accepts.
Static Public Attributes inherited from RndObject
static constexpr int kCopyChildLists = 0x200
 The bit of the Copy() flags that copies the child lists of the mix-ins.

Protected Attributes

FilePath mFile
RndTex * mTex
Protected Attributes inherited from RndAnimatable
std::list< RndAnimatable * > mAnims
std::list< Filter * > mFilters
float mFrame
float mFilteredFrame
Protected Attributes inherited from RndObject
std::list< RndObject * > mRefs
String mName

Additional Inherited Members

Public Types inherited from RndAnimatable
enum  FilterType {
  kFilterScaleOffset = 0 , kFilterMinMaxLoop = 1 , kFilterZeroOrder = 2 , kFilterFirstOrder = 3 ,
  kFilterSecondOrder = 4
}
 The type tags of the filters, as Save() writes them. More...
Protected Member Functions inherited from RndAnimatable
void ReleaseObjects ()
 Drop the references on the children without emptying the list, and delete the filters.
void AcquireAnimRefs ()
 Take a reference on every child.

Detailed Description

Animation that plays a movie file into a texture.

The RTTI includes the class name and records RndAnimatable as the one base. The platform subclass decodes the file. This class records the file and the texture only.

Constructor & Destructor Documentation

◆ RndMovie()

RndMovie::RndMovie ( const char * pszName)
explicit

Construct a movie without a file or a texture.

Parameters
pszNameThe registry key.
Ghidra address:
NTSC-U/C: 0x0023a728
Ghidra address:
PAL: 0x002432a8

◆ ~RndMovie()

RndMovie::~RndMovie ( )
override

Close the movie.

Ghidra address:
NTSC-U/C: 0x0023a9e8
Ghidra address:
PAL: 0x00243568

Member Function Documentation

◆ operator new()

void * RndMovie::operator new ( size_t nSize)
inline

Allocate a movie, billed to the class name.

Parameters
nSizeThe object size the compiler supplies.
Returns
The block.

◆ operator delete()

void RndMovie::operator delete ( void * pBlock)
inline

Release a movie.

Parameters
pBlockThe block.

◆ ListAnimObjects()

void RndMovie::ListAnimObjects ( std::list< RndObject * > & objects)
overridevirtual

Add the texture to a list, then the objects of the children.

Parameters
objectsThe list to add to.
Ghidra address:
NTSC-U/C: 0x0023b0c8
Ghidra address:
PAL: 0x00243c48

Reimplemented from RndAnimatable.

◆ Open()

virtual void RndMovie::Open ( )
virtual

Take a reference on the texture.

The platform subclass then prepares the texture for the file. The name is inferred.

Ghidra address:
NTSC-U/C: 0x0023ac40
Ghidra address:
PAL: 0x002437c0

Reimplemented in PsMovie.

◆ Close()

virtual void RndMovie::Close ( )
virtual

Drop the reference on the texture.

The platform subclass first releases what Open() prepared. The name is inferred.

Ghidra address:
NTSC-U/C: 0x0023ac70
Ghidra address:
PAL: 0x002437f0

Reimplemented in PsMovie.

◆ DumpText()

void RndMovie::DumpText ( PrnStream & stream)
overridevirtual

Write a description of the movie and its base.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x0023aca0
Ghidra address:
PAL: 0x00243820

Reimplemented from RndAnimatable.

◆ Save()

void RndMovie::Save ( BinStream & stream)
overridevirtual

Write the movie and its base.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x0023ad50
Ghidra address:
PAL: 0x002438d0

Reimplemented from RndAnimatable.

◆ Replace()

void RndMovie::Replace ( RndObject * pFrom,
RndObject * pTo )
overridevirtual

Replace the texture with another.

Parameters
pFromThe object being replaced.
pToThe replacement, or null.
Ghidra address:
NTSC-U/C: 0x0023b018
Ghidra address:
PAL: 0x00243b98

Reimplemented from RndAnimatable.

◆ ClassName()

const char * RndMovie::ClassName ( ) const
inlineoverridevirtual

Report the class name.

Returns
sClassName.
Ghidra address:
NTSC-U/C: 0x0038fa48
Ghidra address:
PAL: 0x003fe150

Implements RndObject.

◆ Copy()

void RndMovie::Copy ( const RndObject * pSource,
int nFlags )
overridevirtual

Copy another movie and its base, closing the movie first and opening it after.

Parameters
pSourceThe movie to copy from.
nFlagsThe set of fields to copy.
Ghidra address:
NTSC-U/C: 0x0023af50
Ghidra address:
PAL: 0x00243ad0

Reimplemented from RndAnimatable.

◆ Load()

void RndMovie::Load ( BinStream & stream)
overridevirtual

Read what Save() wrote, or an earlier version of it, closing the movie first and opening it after.

An early version does not include the texture, which is then unchanged.

Parameters
streamThe stream to read from.
Ghidra address:
NTSC-U/C: 0x0023ade8
Ghidra address:
PAL: 0x00243968

Reimplemented from RndAnimatable.

◆ New()

RndObject * RndMovie::New ( const char * pszName)
inlinestatic

Create a movie.

Parameters
pszNameThe registry key.
Returns
The movie.
Ghidra address:
NTSC-U/C: 0x0038fa58
Ghidra address:
PAL: 0x003fe160

◆ GetFile()

const FilePath & RndMovie::GetFile ( ) const
inline
Returns
The movie file.

◆ GetTex()

RndTex * RndMovie::GetTex ( ) const
inline
Returns
The texture the movie plays into.

Member Data Documentation

◆ sClassName

const char* RndMovie::sClassName
static

The class name a .rnd file writes, Movie.

Ghidra address:
NTSC-U/C: 0x003b0a28
Ghidra address:
PAL: 0x0042f8c0

◆ sRev

int RndMovie::sRev
static

The format version Save() writes and Load() accepts.

Ghidra address:
NTSC-U/C: 0x003b0a2c
Ghidra address:
PAL: 0x0042f8c4

◆ mFile

FilePath RndMovie::mFile
protected

The movie file.

◆ mTex

RndTex* RndMovie::mTex
protected

The texture the movie plays into.


The documentation for this class was generated from the following file: