Jazz2::Actors namespace

Implementation of all objects.

Jazz2::Actors::Player and Jazz2::Actors::ActorBase carry the movement model. Its non-Reforged half is measured against the original game rather than tuned by feel — see Non-Reforged movement accuracy for every constant, where it came from, and where the two still differ.

Namespaces

namespace Collectibles
Collectibles.
namespace Enemies
Enemies.
namespace Bosses
Enemy bosses.
namespace Environment
Environmental objects.
namespace Lighting
Lighting effects.
namespace Multiplayer
Multiplayer-related objects, compiled only if WITH_MULTIPLAYER.
namespace Solid
Solid objects.
namespace Weapons
Weapons.

Classes

struct ActorActivationDetails
Description how to initialize an actor.
class ActorBase
Base class of an object.
struct EventParamsReader
Typed accessor over the raw event activation parameter buffer.
struct EventParamsWriter
Writes typed values into a packed event parameter buffer.
class Explosion
Explosion effects.
class IActorUpdateOverride
Takes over the per-frame update of an object.
class Player
Represents a controllable player.
class PlayerCorpse
Represents a dead corpse of a player.
class SolidObjectBase
Base class of a (pushable) solid object.

Enums

enum class ActorState { None = 0x00, IsCreatedFromEventMap = 0x01, IsFromGenerator = 0x02, Illuminated = 0x04, Async = 0x08, InstantiationFlags = IsCreatedFromEventMap | IsFromGenerator | Illuminated | Async, Initialized = 0x0100, IsInvulnerable = 0x0200, CanJump = 0x0400, CanBeFrozen = 0x0800, IsFacingLeft = 0x1000, KeepsMomentumWhenFrozen = 0x2000, PreserveOnRollback = 0x4000, CollideWithTileset = 0x10000, CollideWithOtherActors = 0x20000, CollideWithSolidObjects = 0x40000, ForceDisableCollisions = 0x80000, IsDirty = 0x100000, IsDestroyed = 0x200000, ApplyGravitation = 0x400000, IsSolidObject = 0x800000, SkipPerPixelCollisions = 0x1000000, CollideWithTilesetReduced = 0x2000000, CollideWithSolidObjectsBelow = 0x4000000, ExcludeSimilar = 0x8000000, CollideWithSuspendTiles = 0x10000000, CollideWithTilesetLegacy = 0x20000000 }
Flags that modify behaviour of ActorBase.
enum class MoveType { Absolute = 0x00, Relative = 0x01, Force = 0x02 }
Move type.
enum class ActorRendererType { Default, Outline, WhiteMask, PartialWhiteMask, FrozenMask }
Actor renderer type.
enum class ParticleDebrisEffect { Unknown, Standard, StandardInWater, Dissolve, Frozen, Fire, Lightning }
Effect type of ActorBase::CreateParticleDebrisOnPerish().

Enum documentation

enum class Jazz2::Actors::ActorState

Flags that modify behaviour of ActorBase.

Mixes instantiation hints, per-instance state and collision options. Supports a bitwise combination of its member values.

Enumerators
None

IsCreatedFromEventMap

Actor is created from event map, this flag is used automatically by event system.

IsFromGenerator

Actor is created by generator, this flag is used automatically by event system.

Illuminated

Actor should be illuminated.

Async

Actor should be created asynchronously, not to block main thread.

InstantiationFlags

Mask of all instantiation flags that can be used in ActorActivationDetails.

Initialized

This flag is set automatically after call to ActorBase::OnActivatedAsync().

IsInvulnerable

Actor is invulnerable.

CanJump

Actor is standing on the ground and can jump.

CanBeFrozen

Actor can be frozen.

IsFacingLeft

Actor is facing left.

KeepsMomentumWhenFrozen

Actor keeps sliding while frozen instead of stopping dead.

PreserveOnRollback

Actor should be preserved when state is rolled back to checkpoint.

CollideWithTileset

Collide with tiles.

CollideWithOtherActors

Collide with other non-solid actors, ActorBase::OnHandleCollision() will be called for each collision.

CollideWithSolidObjects

Collide with solid objects.

ForceDisableCollisions

Don't add object to collision tree at all (cannot be changed during object lifetime).

IsDirty

Check collisions at the end of current frame, should be used if position or size changed.

IsDestroyed

Remove object at the end of current frame.

ApplyGravitation

Apply gravitation.

IsSolidObject

Marks object as solid, so other objects with CollideWithSolidObjects will collide with it.

SkipPerPixelCollisions

Check collisions only with hitbox.

CollideWithTilesetReduced

Don't use full hitbox for collisions with tiles, also exclude upper part of hitbox when falling down.

CollideWithSolidObjectsBelow

Collide with other solid object only if it's above center of the other hitbox.

ExcludeSimilar

Ignore solid collisions against similar objects that have this flag.

CollideWithSuspendTiles

Tiles players hang from (vines, hooks) are solid to it as well.

CollideWithTilesetLegacy

Original player's tile collision - reduced hitbox, caught by its head, lifted only straight up, only its feet find the floor.

enum class Jazz2::Actors::MoveType

Move type.

How ActorBase::MoveInstantly() interprets the target position. Supports a bitwise combination of its member values.

Enumerators
Absolute

Move to absolute position

Relative

Move to relative position

Force

Ignore all collision checks

enum class Jazz2::Actors::ActorRendererType

Actor renderer type.

Visual mode of ActorBase::ActorRenderer, e.g. an outline, a hit flash or the frozen effect.

Enumerators
Default

Default rendering

Outline

Draw outline around the sprite

WhiteMask

Draw all non-transparent pixels as white

PartialWhiteMask

Draw all non-transparent pixels as boosted shades of gray

FrozenMask

Apply frozen effect to the sprite

enum class Jazz2::Actors::ParticleDebrisEffect

Effect type of ActorBase::CreateParticleDebrisOnPerish().

Selects the debris an actor leaves behind when it perishes.

Enumerators
Unknown

Unspecified

Standard

Standard

StandardInWater

Standard (in water)

Dissolve

Dissolve (for ghosts)

Frozen

Frozen (for breaking the ice)

Fire

Fire (for toasting)

Lightning

Lightning (for electrocuting)