1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Decompile speed_meter.c and add VIEWPORT_INIT macro (#127)

* Decompile speed_meter.c and add VIEWPORT_INIT macro

- speed_meter.c: OK
- Add VIEWPORT_INIT(viewport, by, rx, ty, lx) macro

* get rid of some magic numbers

* use early return instead of a big if block in SpeedMeter_DrawTimeEntries
This commit is contained in:
Random 2020-05-13 05:05:55 +02:00 committed by GitHub
parent 74a654ecae
commit 08d9fee6e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 249 additions and 749 deletions

View file

@ -1720,4 +1720,28 @@ typedef struct {
SkelAnime skelAnime;
} PSkinAwb; // size = 0x90
typedef struct {
/* 0x00 */ char unk_00[0x18];
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 y;
} SpeedMeter; // size = 0x20
typedef struct {
/* 0x00 */ s32 maxval;
/* 0x04 */ s32 val;
/* 0x08 */ u16 backColor;
/* 0x0A */ u16 foreColor;
/* 0x0C */ s32 ulx;
/* 0x10 */ s32 lrx;
/* 0x14 */ s32 uly;
/* 0x18 */ s32 lry;
} SpeedMeterAllocEntry; // size = 0x1C
typedef struct {
/* 0x00 */ OSTime* time;
/* 0x04 */ u8 x;
/* 0x05 */ u8 y;
/* 0x06 */ u16 color;
} SpeedMeterTimeEntry; // size = 0x08
#endif