Add files

This commit is contained in:
Cuyler36
2023-05-20 21:14:40 -04:00
parent d60a391a17
commit 29deabc35a
16 changed files with 465 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#ifndef JKRENUM_H
#define JKRENUM_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum JKRExpandSwitch {
EXPAND_SWITCH_DEFAULT, /* Do nothing? treated same as 2 */
EXPAND_SWITCH_DECOMPRESS, /* Check for compression and decompress */
EXPAND_SWITCH_NONE /* Do nothing */
} JKRExpandSwitch;
#ifdef __cplusplus
}
#endif
#endif
+20
View File
@@ -0,0 +1,20 @@
#ifndef MATH_H
#define MATH_H
#include "types.h"
#include "MSL_C/w_math.h"
#ifdef __cplusplus
extern "C" {
#endif
#define PI 3.14159265358979323846
#define F_PI ((f32)PI)
#define SQRTF(f) (__frsqrte(f))
#ifdef __cplusplus
}
#endif
#endif
+72
View File
@@ -0,0 +1,72 @@
#ifndef DOLPHIN_OSMODULE_H
#define DOLPHIN_OSMODULE_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSModuleInfo_s OSModuleInfo;
typedef struct OSModuleQueue_s {
OSModuleInfo* head;
OSModuleInfo* tail;
} OSModuleQueue;
typedef struct OSModuleLink_s {
OSModuleInfo* next;
OSModuleInfo* prev;
} OSModuleLink;
typedef struct OSModuleInfo_s {
u32 id;
OSModuleLink link;
u32 numSections;
u32 sectionInfoOfs;
u32 nameOfs;
u32 nameSize;
u32 version;
} OSModuleInfo;
typedef struct OSModuleHeader_s {
OSModuleInfo info;
u32 bssSize;
u32 relOfs;
u32 impOfs;
u32 impSize;
u8 prologSection;
u8 epilogSection;
u8 unresolvedSection;
u8 bssSection;
u32 prolog;
u32 epilog;
u32 unresolved;
/* OS_MODULE_VERSION >= 2 */
u32 align;
u32 bssAlign;
} OSModuleHeader;
typedef struct OSSectionInfo_s {
u32 offset;
u32 size;
} OSSectionInfo;
#define OSGetSectionInfo(module) \
((OSSectionInfo*) (((OSModuleInfo*) (module))->sectionInfoOfs))
#define OS_SECTIONINFO_EXEC 1
#define OS_SECTIONINFO_OFFSET(offset) ((offset) & ~OS_SECTIONINFO_EXEC)
void OSSetStringTable (const void* strTable);
BOOL OSLink(OSModuleInfo* module, void* bss);
BOOL OSUnlink(OSModuleInfo* module);
#ifdef __cplusplus
}
#endif
#endif
+25
View File
@@ -0,0 +1,25 @@
#ifndef OSRESET_H
#define OSRESET_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
#define OS_RESETCODE_RESTART 0x80000000
#define OS_RESET_RESTART 0
#define OS_RESET_HOTRESET 1 /* Soft reset */
#define OS_RESET_SHUTDOWN 2
u32 OSGetResetCode();
void OSResetSystem(int reset, u32 resetCode, BOOL forceMenu);
BOOL OSGetResetSwitchState();
void OSGetSaveRegion(void** start, void** end);
#ifdef __cplusplus
}
#endif
#endif
+28
View File
@@ -0,0 +1,28 @@
#ifndef DOLPHIN_PAD_H
#define DOLPHIN_PAD_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
#define PAD_BUTTON_LEFT 0x0001
#define PAD_BUTTON_RIGHT 0x0002
#define PAD_BUTTON_DOWN 0x0004
#define PAD_BUTTON_UP 0x0008
#define PAD_TRIGGER_Z 0x0010
#define PAD_TRIGGER_R 0x0020
#define PAD_TRIGGER_L 0x0040
#define PAD_BUTTON_A 0x0100
#define PAD_BUTTON_B 0x0200
#define PAD_BUTTON_X 0x0400
#define PAD_BUTTON_Y 0x0800
#define PAD_BUTTON_MENU 0x1000
#define PAD_BUTTON_START 0x1000
#ifdef __cplusplus
}
#endif
#endif
+16
View File
@@ -0,0 +1,16 @@
#ifndef GAME_H_H
#define GAME_H_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct game_s GAME;
#ifdef __cplusplus
}
#endif
#endif
+17
View File
@@ -0,0 +1,17 @@
#ifndef INITIAL_MENU_H
#define INITIAL_MENU_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
extern void initial_menu_init();
extern void initial_menu_cleanup();
#ifdef __cplusplus
}
#endif
#endif
+18
View File
@@ -0,0 +1,18 @@
#ifndef GAME64_H
#define GAME64_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
extern void Na_InitAudio(void (*fatal_callback)(), u8* load_addr, size_t load_size, u8* bootsound, size_t bootsound_size, BOOL cut_flag);
extern void Na_GameFrame();
extern u8 Na_CheckNeosBoot();
#ifdef __cplusplus
}
#endif
#endif
+16
View File
@@ -0,0 +1,16 @@
#ifndef CONTREADDATA_H
#define CONTREADDATA_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
extern u8 __osResetSwitchPressed;
#ifdef __cplusplus
}
#endif
#endif
+16
View File
@@ -0,0 +1,16 @@
#ifndef INITIALIZE_H
#define INITIALIZE_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
extern void __osInitialize_common();
#ifdef __cplusplus
}
#endif
#endif
+16
View File
@@ -0,0 +1,16 @@
#ifndef SHUTDOWN_H
#define SHUTDOWN_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
void osShutdownStart(int shutdown_type);
#ifdef __cplusplus
}
#endif
#endif
+18
View File
@@ -0,0 +1,18 @@
#ifndef NINTENDO_HI_0_H
#define NINTENDO_HI_0_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
#define NINTENDO_HI_0_SIZE 0x9900
#define NINTENDO_HI_0_AW_SIZE 0x66A0
extern u8 nintendo_hi_0[NINTENDO_HI_0_SIZE]; // This should be nintendo_hi_0.aw
#ifdef __cplusplus
}
#endif
#endif
+18
View File
@@ -0,0 +1,18 @@
#ifndef SYS_MATH_H
#define SYS_MATH_H
#include "types.h"
#include "MSL_C/math.h"
#ifdef __cplusplus
extern "C" {
#endif
extern s16 atans_table(f32 x, f32 y);
extern f32 atanf_table(f32 x, f32 y);
#ifdef __cplusplus
}
#endif
#endif