Misc. clean up

Format and update README
This commit is contained in:
intns 2021-10-14 05:12:08 +01:00
parent 2a4857cfe9
commit 7c3d668f48
16 changed files with 98 additions and 53 deletions

View File

@ -39,6 +39,7 @@ This list is not absolute and may become outdated as the project progresses. In
- sysCommonU/tagparams.cpp
- plugProjectKandoU/gameSoundEvent.cpp
- plugProjectKandoU/pelletConfig.cpp
- plugProjectKandoU/aiConstants.cpp
- plugProjectHikinoU/PSCreatureMgr.cpp
### WIP

View File

@ -1,7 +1,7 @@
#ifndef _APPTHREAD_H
#define _APPTHREAD_H
#include "JSystem/JKRThread.h"
#include "JSystem/JKR/JKRThread.h"
struct AppThread : public JKRThread {
AppThread(unsigned long, int, int);

24
include/Dolphin/gx.h Normal file
View File

@ -0,0 +1,24 @@
#ifndef _DOLPHIN_GX_H
#define _DOLPHIN_GX_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif // ifdef __cplusplus
void GXSetZMode(uint, uint, uint);
void GXSetBlendMode(uint, uint, uint, uint);
void GXSetNumTexGens(uint);
void GXSetNumChans(uint);
void GXSetNumTevStages(uint);
void GXSetTevOrder(uint, uint, uint, int);
void GXSetTevOp(int, int);
void GXSetTevSwapMode(int, uint, uint);
void GXSetTevSwapModeTable(int, uint, uint, uint, uint);
#ifdef __cplusplus
};
#endif // ifdef __cplusplus
#endif

View File

@ -8,7 +8,7 @@ extern "C" {
#endif // ifdef __cplusplus
void OSReport(const char*, ...);
void OSPanic(const char*, int, const char*, ...);
void OSPanic(const char* file, int line, const char* message, ...);
#define OSError(...) OSPanic(__FILE__, __LINE__, __VA_ARGS__)
// TODO

View File

@ -4,16 +4,16 @@
#include "PrimTagParm.h"
namespace Game {
struct AIConstants : public TagParameters {
AIConstants();
virtual ~AIConstants();
struct AIConstants : public TagParameters {
AIConstants();
virtual ~AIConstants();
PrimTagParm<f32> m_gravity; // _1C
PrimTagParm<s32> m_dopeCount; // _2C
PrimTagParm<s32> m_debt; // _3C
PrimTagParm<f32> m_cameraAngle; // _4C
// _5C
};
}
PrimTagParm<f32> m_gravity; // _1C
PrimTagParm<s32> m_dopeCount; // _2C
PrimTagParm<s32> m_debt; // _3C
PrimTagParm<f32> m_cameraAngle; // _4C
// _5C
};
} // namespace Game
#endif

View File

@ -1,7 +1,7 @@
#ifndef _JSYSTEM_JKRARCHIVE_H
#define _JSYSTEM_JKRARCHIVE_H
#include "JSystem/JKRHeap.h"
#include "JSystem/JKR/JKRHeap.h"
#include "types.h"
struct JKRArchive {

View File

@ -0,0 +1,20 @@
#ifndef _JSYSTEM_JKRDECOMP_H
#define _JSYSTEM_JKRDECOMP_H
#include "types.h"
struct JKRDecomp {
JKRDecomp(long);
~JKRDecomp();
void checkCompressed(u8*);
void create(long);
void decode(u8*, u8*, ulong, ulong);
void decodeSZP(u8*, u8*, ulong, ulong);
void decodeSZS(u8*, u8*, ulong, ulong);
void orderSync(u8*, u8*, ulong, ulong);
void run();
void sendCommand(struct JKRDecompCommand*);
};
#endif

View File

@ -5,7 +5,7 @@
#include "types.h"
struct JUTException {
static void panic_f(char const*, int, char const*, ...);
static void panic_f(char const* file, int line, char const* msg, ...);
static u32* sConsole;
static u32* sErrorManager;

8
include/THP/THPDraw.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef _THP_THPDRAW_H
#define _THP_THPDRAW_H
#include "types.h"
void THPGXRestore(void);
#endif

View File

@ -33,20 +33,20 @@ struct Stream {
u32 _04; // _004
int m_position; // _008
int m_isTextMode; // _00C
int _10; // _010
u8 m_buffer[1024]; // _014
int m_tabCount; // _414
int _10; // _010
u8 m_buffer[1024]; // _014
int m_tabCount; // _414
};
struct RamStream : Stream {
RamStream(void*, int);
void set(uchar*, int);
void read(void*, int);
void write(void*, int);
bool eof();
RamStream(void*, int);
void set(uchar*, int);
void read(void*, int);
void write(void*, int);
bool eof();
void* _418; // _418
int bounds; // _41C
void* _418; // _418
int bounds; // _41C
};
#endif

View File

@ -6,9 +6,9 @@
* Size: 0000B4
*/
void* JKRDvdRipper::loadToMainRAM(const char*, unsigned char*, JKRExpandSwitch,
unsigned long, JKRHeap*,
JKRDvdRipper::EAllocDirection, unsigned long,
int*, unsigned long*)
unsigned long, JKRHeap*,
JKRDvdRipper::EAllocDirection, unsigned long,
int*, unsigned long*)
{
/*
.loc_0x0:
@ -70,9 +70,9 @@ void* JKRDvdRipper::loadToMainRAM(const char*, unsigned char*, JKRExpandSwitch,
* Size: 0000B4
*/
void* JKRDvdRipper::loadToMainRAM(long, unsigned char*, JKRExpandSwitch,
unsigned long, JKRHeap*,
JKRDvdRipper::EAllocDirection, unsigned long,
int*, unsigned long*)
unsigned long, JKRHeap*,
JKRDvdRipper::EAllocDirection, unsigned long,
int*, unsigned long*)
{
/*
.loc_0x0:
@ -136,9 +136,9 @@ void* JKRDvdRipper::loadToMainRAM(long, unsigned char*, JKRExpandSwitch,
* Size: 0004AC
*/
void* JKRDvdRipper::loadToMainRAM(JKRDvdFile*, unsigned char*, JKRExpandSwitch,
unsigned long, JKRHeap*,
JKRDvdRipper::EAllocDirection, unsigned long,
int*, unsigned long*)
unsigned long, JKRHeap*,
JKRDvdRipper::EAllocDirection, unsigned long,
int*, unsigned long*)
{
/*
.loc_0x0:
@ -542,8 +542,8 @@ void* JKRDvdRipper::loadToMainRAM(JKRDvdFile*, unsigned char*, JKRExpandSwitch,
* Size: 0000F4
*/
void* JKRDvdRipper::loadToMainRAMAsync(const char*, unsigned char*,
JKRExpandSwitch, unsigned long, JKRHeap*,
unsigned long*)
JKRExpandSwitch, unsigned long, JKRHeap*,
unsigned long*)
{
// UNUSED FUNCTION
}
@ -554,7 +554,7 @@ void* JKRDvdRipper::loadToMainRAMAsync(const char*, unsigned char*,
* Size: 0000F4
*/
void* JKRDvdRipper::loadToMainRAMAsync(long, unsigned char*, JKRExpandSwitch,
unsigned long, JKRHeap*, unsigned long*)
unsigned long, JKRHeap*, unsigned long*)
{
// UNUSED FUNCTION
}
@ -565,8 +565,8 @@ void* JKRDvdRipper::loadToMainRAMAsync(long, unsigned char*, JKRExpandSwitch,
* Size: 0001EC
*/
void* JKRDvdRipper::loadToMainRAMAsync(JKRDvdFile*, unsigned char*,
JKRExpandSwitch, unsigned long, JKRHeap*,
unsigned long*)
JKRExpandSwitch, unsigned long, JKRHeap*,
unsigned long*)
{
// UNUSED FUNCTION
}

View File

@ -1,13 +1,5 @@
#include "types.h"
extern void GXSetZMode(uint,uint,uint);
extern void GXSetBlendMode(uint,uint,uint,uint);
extern void GXSetNumTexGens(uint);
extern void GXSetNumChans(uint);
extern void GXSetNumTevStages(uint);
extern void GXSetTevOrder(uint,uint,uint,int);
extern void GXSetTevOp(int,int);
extern void GXSetTevSwapMode(int,uint,uint);
extern void GXSetTevSwapModeTable(int,uint,uint,uint,uint);
#include "THP/THPDraw.h"
#include "Dolphin/gx.h"
/*
* --INFO--
@ -31,15 +23,15 @@ void THPGXRestore(void)
GXSetTevSwapModeTable(1, 0, 0, 0, 3);
GXSetTevSwapModeTable(2, 1, 1, 1, 3);
GXSetTevSwapModeTable(3, 2, 2, 2, 3);
return;
}
//
///*
// * --INFO--
// * Address: 8044D79C
// * Size: 0004C0
// */
//void THPGXYuv2RgbSetup(void)
// void THPGXYuv2RgbSetup(void)
//{
///*
//.loc_0x0:
@ -355,7 +347,7 @@ void THPGXRestore(void)
// * Address: 8044DC5C
// * Size: 0001DC
// */
//void THPGXYuv2RgbDraw(void)
// void THPGXYuv2RgbDraw(void)
//{
///*
//.loc_0x0:

View File

@ -1,7 +1,7 @@
#include "System.h"
#include "Dolphin/os.h"
#include "jsystem/JKRHeap.h"
#include "jsystem/JUTException.h"
#include "JSystem/JKR/JKRHeap.h"
#include "JSystem/JUTException.h"
extern char gStrSystem_CPP[11]; // system.cpp