isle-portable/extensions/include/extensions/common/charactercustomizer.h
Christian Semmler 3d7bbdf0ae
Add third person camera extension
Introduces a third person camera system with orbit camera, input handling
(mouse/keyboard/touch/gamepad), display actor cloning, and camera-relative
movement. Includes shared character utilities (animator, cloner, customizer)
and an IExtraAnimHandler interface for optional animation extensions.
Also includes generic base game fixes and extension system improvements.
2026-03-29 08:20:57 -07:00

50 lines
1.7 KiB
C++

#pragma once
#include "mxtypes.h"
#include <cstdint>
class LegoROI;
namespace Extensions
{
namespace Common
{
struct CustomizeState;
class CharacterCustomizer {
public:
static uint8_t ResolveActorInfoIndex(uint8_t p_displayActorIndex);
static bool SwitchColor(LegoROI* p_rootROI, uint8_t p_actorInfoIndex, CustomizeState& p_state, int p_partIndex);
static bool SwitchVariant(LegoROI* p_rootROI, uint8_t p_actorInfoIndex, CustomizeState& p_state);
static bool SwitchSound(CustomizeState& p_state);
static bool SwitchMove(CustomizeState& p_state);
static bool SwitchMood(CustomizeState& p_state);
static void ApplyFullState(LegoROI* p_rootROI, uint8_t p_actorInfoIndex, const CustomizeState& p_state);
static void ApplyChange(
LegoROI* p_rootROI,
uint8_t p_actorInfoIndex,
CustomizeState& p_state,
uint8_t p_changeType,
uint8_t p_partIndex
);
static int MapClickedPartIndex(const char* p_partName);
static void PlayClickSound(LegoROI* p_roi, const CustomizeState& p_state, bool p_basedOnMood);
static MxU32 PlayClickAnimation(LegoROI* p_roi, const CustomizeState& p_state);
static void StopClickAnimation(MxU32 p_objectId);
// Resolves the current actor's click to a change type and optional part index.
// Returns false if the click should be consumed with no effect (Pepper in act2/3, Brickster)
// or if the actor is unknown.
static bool ResolveClickChangeType(uint8_t& p_changeType, int& p_partIndex, LegoROI* p_clickedROI);
private:
static LegoROI* FindChildROI(LegoROI* p_rootROI, const char* p_name);
static void ApplyHatVariant(LegoROI* p_rootROI, uint8_t p_actorInfoIndex, const CustomizeState& p_state);
};
} // namespace Common
} // namespace Extensions