mirror of
https://github.com/zeldaret/ph
synced 2026-09-10 03:52:16 -04:00
Decomp ItemManager::GetUnk_09e_Divided
This commit is contained in:
@@ -296,7 +296,7 @@ public:
|
||||
// mUnk_098, mUnk_09e
|
||||
u8 GetUnk_098(u32 index) const;
|
||||
u16 GetUnk_09e(u32 index) const;
|
||||
u32 GetUnk_09e_Divided(u32 index) const; // gets mUnk_09e value divided by 2.54, rounded half up
|
||||
s32 GetUnk_09e_Divided(u32 index) const;
|
||||
void SetUnk_09e(u32 index, u16 value); // also increments the corresponding mUnk_098 value
|
||||
|
||||
// Item
|
||||
|
||||
+15
-9
@@ -3,25 +3,31 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
// 20.12 fixed point number
|
||||
typedef u32 p32;
|
||||
// Q20.12 fixed point number
|
||||
typedef u32 q20;
|
||||
|
||||
#define INT_TO_Q20(n) ((s32)((n) << 12))
|
||||
#define FLOAT_TO_Q20(n) ((s32)(((n) * 8192 + 1) / 2))
|
||||
|
||||
#define ROUND_Q20(n) (((s32) n + 0x800) >> 12)
|
||||
|
||||
typedef struct {
|
||||
/* 0 */ p32 x;
|
||||
/* 4 */ p32 y;
|
||||
/* 8 */ p32 z;
|
||||
/* 0 */ q20 x;
|
||||
/* 4 */ q20 y;
|
||||
/* 8 */ q20 z;
|
||||
/* c */
|
||||
} Vec3p;
|
||||
|
||||
typedef struct {
|
||||
/* 00 */ p32 x;
|
||||
/* 04 */ p32 y;
|
||||
/* 08 */ p32 z;
|
||||
/* 0c */ p32 w;
|
||||
/* 00 */ q20 x;
|
||||
/* 04 */ q20 y;
|
||||
/* 08 */ q20 z;
|
||||
/* 0c */ q20 w;
|
||||
/* 10 */
|
||||
} Vec4p;
|
||||
|
||||
extern "C" u32 FastDivide(u32 a, u32 b);
|
||||
extern "C" u32 Divide(u32 a, u32 b);
|
||||
extern "C" bool Approach(unk32 *src, unk32 dest, unk32 step);
|
||||
extern "C" bool Approach_thunk(unk32 *src, unk32 dest, unk32 step);
|
||||
extern "C" bool func_01ffec34(Vec4p *param1, Vec4p *param2);
|
||||
|
||||
Reference in New Issue
Block a user