|
wavelength 1.0.0
|
One of the avatars the game can draw at a time, lent to the AvatarPartSet that shows. More...
#include <avatar.h>
Classes | |
| class | Anim |
| The position in one of the anims of the avatar entry of the "db" section. More... | |
Public Member Functions | |
| Avatar (int nIndex) | |
| Build an avatar and its part models. | |
| ~Avatar () | |
| Delete the part models. | |
| void | SetPose (const char *pszPose, bool bImmediate) |
| Change the pose, and with it the model of the instrument. | |
| void | SetBaseAnim (const char *pszAnim, bool bOneShot, bool bImmediate) |
| Change the body animation. | |
| void | Reset () |
| Return to the idle animation with no pose. | |
| AvatarPart * | GetPart (int nPart) |
| Report the model of a part. | |
| void | Draw (const Rect *pScreenRect) |
| Pose the part models at sTime and draw them with the shared camera. | |
| void | CatchGem (int nKey, int bRestartPose) |
| React to a gem the player of the avatar caught. | |
| void | SetUser (AvatarPartSet *pUser) |
| Set mUser. | |
| int | GetIndex () const |
| AvatarPartSet * | GetUser () |
Static Public Member Functions | |
| static void | Init () |
| Read the avatar entry of the "db" section, load the base model, and build the avatars. | |
| static void | Terminate () |
| Delete the avatars and the loader of the base model. | |
| static int | NumAvatars () |
| Report the number of avatars. | |
| static Avatar * | GetAvatar (int nIndex) |
| Report an avatar. | |
| static void | Poll (float fTime) |
| Advance every avatar to a time. | |
| static void | DrawCamera () |
| Draw the shared camera alone, and restore the current camera and environment. | |
| static void | GetDepthRange (float *pfNear, float *pfFar) |
| Report the depth range the shared camera draws into. | |
| static void | SetDepthRange (float fNear, float fFar) |
| Set the depth range the shared camera draws into. | |
| static void | SetViewAngles (float fTilt, float fTurn) |
| Turn the avatars in front of the shared camera. | |
| static void | SetFreqSize (int nFreqSize, bool bSnap) |
| Choose the camera for a size of the avatar display. | |
| static bool | IsShown () |
| Report whether the avatar display is shown at all. | |
| static void | SetCamera (const char *pszCam) |
| Blend the shared camera to one of the cams, unless it already heads there. | |
| static void | SnapCamera (const char *pszCam) |
| Move the shared camera to one of the cams at once, with no blend. | |
| static const char * | GetNone () |
| static RndTex * | GetTargetTex () |
Static Public Attributes | |
| static constexpr float | kNever = 1.0e7f |
| The time a blend that never started or already ended records. | |
One of the avatars the game can draw at a time, lent to the AvatarPartSet that shows.
The RTTI includes the name. The object is 0x84 bytes. The num_avatars of the avatar entry of the "db" section sets the number of avatars, and every avatar shares one camera. An avatar plays a body animation, blended from the one it replaces, and a pose that also selects the model of its instrument.
|
explicit |
Build an avatar and its part models.
| nIndex | The index of the avatar, which selects its files. |
| Avatar::~Avatar | ( | ) |
Delete the part models.
|
static |
Read the avatar entry of the "db" section, load the base model, and build the avatars.
|
static |
Delete the avatars and the loader of the base model.
sAvatars retains its size, with every avatar released.
|
static |
Report the number of avatars.
|
static |
Report an avatar.
| nIndex | The index. |
|
static |
Advance every avatar to a time.
The routine builds the instrument model of at most one avatar a call, and moves the shared camera while it blends between two of the cams. The name is inferred.
| fTime | The time in milliseconds. |
|
static |
Draw the shared camera alone, and restore the current camera and environment.
The name is inferred.
|
static |
Report the depth range the shared camera draws into.
The name is inferred.
| pfNear | Receives the near end of the range. |
| pfFar | Receives the far end of the range. |
|
static |
Set the depth range the shared camera draws into.
The name is inferred.
| fNear | The near end of the range. |
| fFar | The far end of the range. |
|
static |
Turn the avatars in front of the shared camera.
The name is inferred.
| fTilt | The angle about the horizontal axis, in radians. |
| fTurn | The angle about the vertical axis, in radians. |
|
static |
Choose the camera for a size of the avatar display.
The small display takes game_far, and the large and hidden ones take game_close. The name is inferred.
| nFreqSize | The size, one of GameOptions::FreqSize. |
| bSnap | Whether to move the camera at once rather than blend. |
|
static |
Report whether the avatar display is shown at all.
The name is inferred.
|
static |
Blend the shared camera to one of the cams, unless it already heads there.
The name is inferred. When the camera already heads there, the PAL build also makes it the camera the blend starts from.
| pszCam | The camera, such as f_maker or bust. |
|
static |
Move the shared camera to one of the cams at once, with no blend.
The name is inferred.
| pszCam | The camera, such as bust. |
| void Avatar::SetPose | ( | const char * | pszPose, |
| bool | bImmediate ) |
Change the pose, and with it the model of the instrument.
While a one-shot body animation plays, the pose is only queued. The name is inferred.
| pszPose | The pose, or fm_none to follow the body animation. |
| bImmediate | Whether to change at once rather than blend. |
| void Avatar::SetBaseAnim | ( | const char * | pszAnim, |
| bool | bOneShot, | ||
| bool | bImmediate ) |
Change the body animation.
The name is inferred.
| pszAnim | The animation. |
| bOneShot | Whether the animation plays once and then gives way to the one it replaced. |
| bImmediate | Whether to change at once rather than blend. |
| void Avatar::Reset | ( | ) |
Return to the idle animation with no pose.
The name is inferred.
| AvatarPart * Avatar::GetPart | ( | int | nPart | ) |
Report the model of a part.
| nPart | One of AvatarPartSet::Part. |
| void Avatar::Draw | ( | const Rect * | pScreenRect | ) |
Pose the part models at sTime and draw them with the shared camera.
The name is inferred.
| pScreenRect | The part of the screen to draw, or null for the target texture of the camera. |
| void Avatar::CatchGem | ( | int | nKey, |
| int | bRestartPose ) |
React to a gem the player of the avatar caught.
The name is inferred.
| nKey | The key of the frame range of the pose. |
| bRestartPose | Whether the pose restarts. |
| void Avatar::SetUser | ( | AvatarPartSet * | pUser | ) |
Set mUser.
| pUser | The set that borrows the avatar, or null. |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
staticconstexpr |
The time a blend that never started or already ended records.