mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-23 13:09:44 +00:00
2244619e83
PSX : https://decomp.me/scratch/P02IW PSP: https://decomp.me/scratch/LURHt (not a full match) This was the largest function that hadn't been decompiled, A few things I've noticed: - I had to update `func_us_801D2424` to take `Point32*`s instead of `Entity*`s, making me think that Entity position is probably a Point32 - Point32 probably uses `f32`s instead of `s32`s - `self + 3` is referenced a lot and seems to use a separate extension struct. I named it `ET_UnkPlatelordPlus3` - I made `ET_PlateLord` `unk88` and `unk9C` a separate inlined struct because they are often passed as an argument to other functions.
76 lines
1.3 KiB
C
76 lines
1.3 KiB
C
#ifndef TYPES_H
|
|
#define TYPES_H
|
|
|
|
#ifndef VERSION_PC
|
|
typedef char int8_t;
|
|
typedef short int16_t;
|
|
typedef int int32_t;
|
|
typedef long long int64_t;
|
|
typedef unsigned char uint8_t;
|
|
typedef unsigned short uint16_t;
|
|
typedef unsigned int uint32_t;
|
|
typedef unsigned long long uint64_t;
|
|
typedef unsigned char u_char;
|
|
typedef unsigned short u_short;
|
|
typedef unsigned long u_long;
|
|
typedef unsigned int size_t;
|
|
#else
|
|
#include <sys/types.h>
|
|
#endif
|
|
|
|
#ifdef _MSC_VER
|
|
typedef unsigned char u_char;
|
|
typedef unsigned short u_short;
|
|
typedef unsigned long long u_long;
|
|
#endif
|
|
|
|
typedef signed char s8;
|
|
typedef signed short s16;
|
|
typedef signed int s32;
|
|
typedef signed long long s64;
|
|
typedef unsigned char u8;
|
|
typedef unsigned short u16;
|
|
typedef unsigned int u32;
|
|
typedef unsigned long long u64;
|
|
|
|
typedef signed char byte;
|
|
#ifndef __cplusplus
|
|
typedef enum { false, true } bool;
|
|
#endif
|
|
|
|
#ifndef NULL
|
|
#define NULL (0)
|
|
#endif
|
|
|
|
typedef union {
|
|
s32 val;
|
|
struct {
|
|
s16 lo;
|
|
s16 hi;
|
|
} i;
|
|
} f32;
|
|
|
|
typedef struct {
|
|
/* 0x0 */ s16 x;
|
|
/* 0x2 */ s16 y;
|
|
} Point16; // size = 0x4
|
|
|
|
typedef struct {
|
|
/* 0x0 */ s32 x;
|
|
/* 0x4 */ s32 y;
|
|
} Point32; // size = 0x8
|
|
|
|
typedef struct {
|
|
u8 u;
|
|
u8 v;
|
|
} uvPair;
|
|
|
|
typedef struct {
|
|
u8 r;
|
|
u8 g;
|
|
u8 b;
|
|
u8 pad; // could be an A for RGBA but unused so unknown
|
|
} rgb_set;
|
|
|
|
#endif
|