ObjectHost.h file
Namespaces
- namespace Jazz2
- Root namespace of Jazz² Resurrection.
- namespace Jazz2::Scripting
- Scripting-related classes, compiled only if
WITH_ANGELSCRIPT. - namespace Jazz2::Scripting::Legacy
- Legacy JJ2+ definitions.
Classes
- struct Jazz2::Scripting::Legacy::PresetAnimation
- Animations the template of the objects of an event has in JJ2+ before a script changes them.
- class Jazz2::Scripting::Legacy::ScriptSceneryObject
- Destructible scenery as an object of the game, for a level script that drives it.
- class Jazz2::Scripting::Legacy::ScriptEventObject
- Object of an event the game has no object of (EventType::
PassthroughEvent). - class Jazz2::Scripting::Legacy::ScriptObjectHost
- Drives an object of the game by a behavior of a level script, as JJ2+ does with the objects whose template (
jjObjectPresets) has a behavior of the script.
Functions
-
auto FindPresetAnimation(std::
uint8_t eventId) -> const PresetAnimation* - Returns the animations of the template of the objects of an event in JJ2+,
nullptrif it has none. -
void EmitObjectLight(const jjOBJ& obj,
Vector2f pos,
std::
int32_t gameTick, SmallVectorImpl<LightEmitter>& lights) - Adds the light a
jjOBJhas by itslightTypeandlightat a position of the level. - auto DoesObjectTouch(LevelScriptLoader* levelScripts, const jjOBJ& obj, const AABBf& box) -> bool
- Returns
trueif the pixels of the frame ajjOBJshows overlap a rectangle of the level. - auto DoesObjectTouchPlayer(LevelScriptLoader* levelScripts, const jjOBJ& obj, Actors::Player& player, bool wholeFrame = false) -> bool
- Returns
trueif a player touches the frame of ajjOBJby the pixels of its own frame, as JJ2+ collides them (measured). - auto GetSolidObjectBox(LevelScriptLoader* levelScripts, const jjOBJ& obj, AABBf& box) -> bool
- Returns the box a
jjOBJis solid by while its behavior callsjjOBJ::beSolid(),falseif it shows no frame. - auto GetLegacyPlayerBox(Actors::ActorBase& player) -> AABBf
- Returns the box a player touches objects by in JJ2+ when its frame isn't known (measured on a pole).