rodecomp/Source/Utility/Math/AffineMatrix.h
ragnarok-clanker d7862ef5c4 Decompile 9 functions in Source/Utility/Math/Vector3d.h, Source/Utility/Math/AffineMatrix.h, ...
Batch #1843 by ragnarok-clanker: 1 byte-identical, 8 confirmed by peer review.

- fn_02024 ClientRadians: logic confirmed by peer review
- fn_17668 WorldScene::GetGameActorByAID: logic confirmed by peer review
- fn_21057 CRenderObject::GetTargetPos: logic confirmed by peer review
- fn_17667 WorldScene::GetGameActorByAidIncludeMe: logic confirmed by peer review
- fn_21290 CGameMode::NotifyItemBounds: logic confirmed by peer review
- fn_03089 CEffect::Slot25: logic confirmed by peer review
- fn_08405 CellWorldPosition: logic confirmed by peer review
- fn_19762 EffectPrimitiveSlot::EffectPrimitiveSlot: byte-identical (already on main)
- fn_19865 DrawEffectPrimitive15: logic confirmed by peer review

Peer-reviewed-by: Yommy, eAthena, ragnarok-clanker
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-28 22:49:51 +00:00

47 lines
1.3 KiB
C

#ifndef RAGNAROK_SOURCE_UTILITY_MATH_AFFINEMATRIX_H
#define RAGNAROK_SOURCE_UTILITY_MATH_AFFINEMATRIX_H
#include <cstddef>
extern const float g_identityMatrix[12];
extern float g_radTable[722];
extern float g_sinTable[722];
extern float g_cosTable[722];
void CreateTrigonometricTable();
float ClientSin(float radians);
float ClientCos(float radians);
float ClientRadians(int degrees);
float ClientSine(int degrees);
float ClientCosine(int degrees);
float SquareRoot(float value);
struct AffineMatrix {
/* 0000 */ float values[12];
void Identity();
int IsIdentity() const;
const float* SetAxisRotation(const float* axis, float radians);
void SetXRotation(float radians);
void SetYRotation(float radians);
void SetZRotation(float radians);
void RotateX(float radians);
void RotateY(float radians);
void RotateZ(float radians);
void SetTranslation(float x, float y, float z);
void SetScale(float x, float y, float z);
void Scale(float x, float y, float z);
void Translate(const float* position);
void Compose(const AffineMatrix& first, const AffineMatrix& second);
void Inverse(const AffineMatrix& source);
void LookAt(const float* origin, const float* target, const float* up);
};
static_assert(sizeof(AffineMatrix) == 48);
#if defined(_WIN32) && !defined(_WIN64)
static_assert(offsetof(AffineMatrix, values) == 0x0000);
#endif
#endif