rodecomp/Source/Contents/Camera/CameraState.h
ragnarok-clanker a47d20f8be Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.

Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
2026-10-25 07:42:41 +00:00

48 lines
1.1 KiB
C

#ifndef RAGNAROK_SOURCE_CONTENTS_CAMERA_CAMERASTATE_H
#define RAGNAROK_SOURCE_CONTENTS_CAMERA_CAMERASTATE_H
struct ServiceOptions;
struct CameraState {
float target[3];
float pitch;
float yaw;
float distance;
float desiredTarget[3];
float desiredPitch;
float desiredYaw;
float desiredDistance;
void Reset();
void AddDistance(float delta);
void AddPitch(float delta);
void AddYaw(float delta);
void Smooth(
const ServiceOptions& options, const float& rendererScale, const float& projectionScale, const float& baseDistance, struct CameraProjectionOutputs& output
);
};
struct CameraProjectionOutputs {
float& tangent;
float& cotangent;
float& scaleY;
float& scaleX;
};
struct CameraShake {
float horizontal;
float distance;
float pitch;
unsigned unknown_0010;
int enabled;
unsigned start;
unsigned duration;
void Apply(CameraState& camera, int& frameLatch);
void Start(int enabled, unsigned duration, float horizontal, float distance, float pitch);
void SetAmplitudes(float horizontal, float distance, float pitch);
};
static_assert(sizeof(CameraState) == 48);
#endif