ViMode progress (#802)

* ViMode OK

* Fix variable name in regconvert tool

* ViMode: fix formatting

* Add nonmatching impl for ViMode_Configure, respond to PR

- Fixed struct field naming (unkXX -> unk_XX)
- ViMode_Configure args are not flags for top/left etc; seem to be for
    video mode
- Used @Random06457's implementation of `ViMode_LogPrint`

* Use plain LOG_ADDRESS in ViMode_LogPrint

* Incorporate PR feedback from Roman971
This commit is contained in:
Zach Banks
2021-05-03 21:49:09 -04:00
committed by GitHub
parent 278e471074
commit 7c77253eca
14 changed files with 359 additions and 794 deletions
+11 -8
View File
@@ -1438,14 +1438,17 @@ s32 func_800AB560(View* view);
s32 func_800AB944(View* view);
s32 func_800AB9EC(View* view, s32 arg1, Gfx** p);
s32 func_800ABE74(f32 eyeX, f32 eyeY, f32 eyeZ);
// ? func_800AC030(?);
// ? func_800AC2F4(?);
// ? func_800AC89C(?);
// ? func_800AC9A4(?);
void func_800ACA28(unk_80166528*);
void func_800ACA90(unk_80166528*);
// ? func_800ACA98(?);
void func_800ACAF8(unk_80166528*, Input*, GraphicsContext*);
void ViMode_LogPrint(OSViMode *viMode);
void ViMode_Configure(ViMode *viMode, u32 mode, u32 type,
u32 unk_70, u32 unk_74, u32 unk_78, u32 unk_7C,
s32 width, s32 height,
s32 unk_left, s32 unk_right, s32 unk_top, s32 unk_bottom);
void ViMode_Save(ViMode *viMode);
void ViMode_Load(ViMode *viMode);
void ViMode_Init(ViMode *viMode);
void ViMode_Destroy(ViMode *viMode);
void ViMode_ConfigureFeatures(ViMode *viMode, s32 viFeatures);
void ViMode_Update(ViMode *viMode, Input *input);
void func_800ACE70(struct_801664F0* this);
void func_800ACE90(struct_801664F0* this);
void func_800ACE98(struct_801664F0* this, Gfx** gfxp);
+8 -1
View File
@@ -15,8 +15,13 @@
#define OS_VI_GAMMA_DITHER 0x04
#define OS_VI_DIVOT 0x10
#define OS_VI_DITHER_FILTER 0x10000
#define OS_VI_UNK200 0x200
#define OS_VI_UNK1 0x1
#define OS_VI_UNK2 0x2
#define OS_VI_UNK40 0x40
#define OS_VI_UNK100 0x100
#define OS_VI_UNK200 0x200
#define OS_VI_UNK1000 0x1000
#define OS_VI_UNK2000 0x2000
typedef struct {
/* 0x00 */ u32 ctrl;
@@ -92,4 +97,6 @@ typedef struct {
#define OS_VI_PAL_HPN2 26
#define OS_VI_PAL_HPF2 27
#define OS_VI_UNK28 28
#endif
+15 -4
View File
@@ -1691,11 +1691,22 @@ typedef struct {
} JpegDecoderState; // size = 0x14
typedef struct {
/* 0x0000 */ OSViMode viMode;
/* 0x0050 */ char unk_50[0x30];
/* 0x0000 */ OSViMode customViMode;
/* 0x0050 */ s32 viHeight;
/* 0x0054 */ s32 viWidth;
/* 0x0058 */ s32 unk_58; // Right adjustment?
/* 0x005c */ s32 unk_5C; // Left adjustment?
/* 0x0060 */ s32 unk_60; // Bottom adjustment?
/* 0x0064 */ s32 unk_64; // Top adjustment?
/* 0x0068 */ s32 viModeBase; // enum: {0, 1, 2, 3}
/* 0x006c */ s32 viTvType;
/* 0x0070 */ u32 unk_70; // bool
/* 0x0074 */ u32 unk_74; // bool
/* 0x0078 */ u32 unk_78; // bool
/* 0x007c */ u32 unk_7C; // bool
/* 0x0080 */ u32 viFeatures;
/* 0x0084 */ char unk_84[4];
} unk_80166528;
/* 0x0084 */ u32 unk_84;
} ViMode;
// Vis...
typedef struct {