d_kankyo_wether / d_eye_hl (#178)

* d_eye_hl / d_kankyo_wether wip

* more d_kankyo_wether + format

* remove asm

* some d_kankyo wip

* fix dccs vtable

* some m_Do_graphic / d_meter2_draw work
This commit is contained in:
TakaRikka
2022-01-25 12:24:14 -08:00
committed by GitHub
parent 6f4d068f1d
commit 612f26c132
241 changed files with 3715 additions and 9755 deletions
+16
View File
@@ -994,6 +994,22 @@ inline void GXPosition1x16(u16 x) {
GFX_FIFO(u16) = x;
}
inline void GXPosition3s8(s8 x, s8 y, s8 z) {
GFX_FIFO(s8) = x;
GFX_FIFO(s8) = y;
GFX_FIFO(s8) = z;
}
inline void GXPosition2s8(s8 x, s8 y) {
GFX_FIFO(s8) = x;
GFX_FIFO(s8) = y;
}
inline void GXTexCoord2s8(s8 x, s8 y) {
GFX_FIFO(s8) = x;
GFX_FIFO(s8) = y;
}
inline void GXEnd() {}
};
+1 -1
View File
@@ -9,7 +9,7 @@ typedef float Mtx[3][4];
typedef float Mtx33[3][3];
typedef float Mtx23[2][3];
typedef f32 (*MtxP)[4];
typedef const f32 (*CMtxP)[4]; //Change name later?
typedef const f32 (*CMtxP)[4]; // Change name later?
extern "C" {
void PSMTXIdentity(Mtx matrix);
+19
View File
@@ -263,6 +263,25 @@ inline void OSf32tou8(f32* f, u8* out) {
*out = __OSf32tou8(*f);
}
inline void OSInitFastCast(void) {
// clang-format off
asm {
li r3, 4
oris r3, r3, 4
mtspr 0x392, r3
li r3, 5
oris r3, r3, 5
mtspr 0x393, r3
li r3, 6
oris r3, r3, 6
mtspr 0x394, r3
li r3, 7
oris r3, r3, 7
mtspr 0x395, r3
}
// clang-format on
}
}; // extern "C"
void OSSwitchFiberEx(u32, u32, u32, u32, u32, u32);
+4 -4
View File
@@ -8,12 +8,12 @@ struct OSSectionInfo {
u32 mSize;
};
struct OSModuleInfo {
struct OSModuleInfo {
u32 mId;
OSModuleInfo* mNext;
OSModuleInfo* mPrev;
u32 mNumSections;
struct { //Needed to get an assert correct; very likely bigger
struct { // Needed to get an assert correct; very likely bigger
u32 sectionInfoOffset;
} info;
u32 mModuleNameOffset;
@@ -28,7 +28,7 @@ struct OSModuleInfo {
u8 mUnresolvedSection;
u8 mBssSection;
u32 (*prolog)();
void(*epilog)();
void (*epilog)();
u32 mUnresolvedFuncOffset;
u32 mModuleAlignment;
u32 mBssAlignment;
@@ -36,7 +36,7 @@ struct OSModuleInfo {
};
extern "C" BOOL OSLink(OSModuleInfo*);
extern "C" BOOL OSLinkFixed(OSModuleInfo*,u32);
extern "C" BOOL OSLinkFixed(OSModuleInfo*, u32);
extern "C" BOOL OSUnlink(OSModuleInfo*);
#endif /* OSLINK_H */
+10 -10
View File
@@ -16,16 +16,16 @@ typedef enum PADMask {
} PADMask;
typedef struct PADStatus {
u16 button;
s8 stick_x;
s8 stick_y;
s8 substick_x;
s8 substick_y;
u8 trigger_left;
u8 trigger_right;
u8 analog_a;
u8 analog_b;
s8 error;
/* 0x0 */ u16 button;
/* 0x2 */ s8 stick_x;
/* 0x3 */ s8 stick_y;
/* 0x4 */ s8 substick_x;
/* 0x5 */ s8 substick_y;
/* 0x6 */ u8 trigger_left;
/* 0x7 */ u8 trigger_right;
/* 0x8 */ u8 analog_a;
/* 0x9 */ u8 analog_b;
/* 0xA */ s8 error;
} PADStatus;
extern "C" {