diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/main.h | 18 | ||||
-rw-r--r-- | include/poke_overlay.h | 15 | ||||
-rw-r--r-- | include/pokemon.h | 3 | ||||
-rw-r--r-- | include/script.h | 14 | ||||
-rw-r--r-- | include/string_util.h | 25 | ||||
-rw-r--r-- | include/structs.h | 2 |
6 files changed, 75 insertions, 2 deletions
diff --git a/include/main.h b/include/main.h index 92456092..ff710655 100644 --- a/include/main.h +++ b/include/main.h @@ -51,7 +51,7 @@ struct Unk21C48B8 s32 unk20; s32 unk24; s32 unk28; - s32 unk2C; + u32 unk2C; s32 unk30; s32 unk34; s32 unk38; @@ -68,6 +68,7 @@ struct UnkStruct_021C4918 { u8 unk6; u8 unk7; u8 unk8; + u8 padding[3]; }; extern struct UnkStruct_021C4918 gUnk021C4918; @@ -75,4 +76,19 @@ extern struct UnkStruct_021C4918 gUnk021C4918; extern struct Unk2106FA0 gBacklightTop; extern struct Unk2106FA0 gBacklightTop_2; // same as the first one, it's referenced twice in the constant pool... +void NitroMain(void); + +extern struct Unk21C48B8 gUnknown21C48B8; + +void FUN_02000DF4(void); +void FUN_02000E0C(void); +void FUN_02000E7C(FSOverlayID id, struct Unk21DBE18 * arg1); +void FUN_02000E9C(void); +void FUN_02000EC8(u32 parameter); +void FUN_02000EE8(void); +void DoSoftReset(u32 parameter); +void FUN_02000F4C(u32 arg0, u32 arg1); +void InitializeMainRNG(void); +void FUN_02000FE8(void); + #endif //GUARD_MAIN_H diff --git a/include/poke_overlay.h b/include/poke_overlay.h index 5ee9073a..400f600e 100644 --- a/include/poke_overlay.h +++ b/include/poke_overlay.h @@ -7,7 +7,20 @@ #define OVERLAY_LOAD_ITCM 1 #define OVERLAY_LOAD_DTCM 2 +struct LoadedOverlay { + FSOverlayID id; + BOOL active; +}; + +void FreeOverlayAllocation(struct LoadedOverlay * loaded); void UnloadOverlayByID(FSOverlayID id); -BOOL HandleLoadOverlay(FSOverlayID id, int a1); +s32 GetOverlayLoadDestination(FSOverlayID id); +BOOL HandleLoadOverlay(FSOverlayID id, s32 a1); +BOOL CanOverlayBeLoaded(FSOverlayID id); +struct LoadedOverlay* GetLoadedOverlaysInRegion(s32 a0); +BOOL GetOverlayRamBounds(FSOverlayID id, void ** start, void ** end); +BOOL LoadOverlayNormal(MIProcessor target, FSOverlayID id); +BOOL LoadOverlayNoInit(MIProcessor target, FSOverlayID id); +BOOL LoadOverlayNoInitAsync(MIProcessor target, FSOverlayID id); #endif //GUARD_POKE_OVERLAY_H diff --git a/include/pokemon.h b/include/pokemon.h index a350d1a1..8886c47c 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -112,6 +112,7 @@ typedef struct { u8 friendship; u8 ability; u8 circleMarking:1, triangleMarking:1, squareMarking:1, heartMarking:1, starMarking:1, diamondMarking:1; + u8 padding; OriginLanguage originLanguage; u8 hpEV; u8 atkEV; @@ -179,9 +180,11 @@ typedef struct { u8 pokerus; u8 pokeball; u8 flags; + u8 padding[3]; EncounterType encounterType; u8 HGSS_Pokeball; u8 HGSS_Performance; + u8 padding2[2]; } PokemonDataBlockD; typedef union { diff --git a/include/script.h b/include/script.h index 2ecc8e28..0a69f7dd 100644 --- a/include/script.h +++ b/include/script.h @@ -1,6 +1,8 @@ #ifndef _SCRIPT_H_
#define _SCRIPT_H_
+#include "global.h"
+
struct ScriptContext;
typedef u8 (*ScrCmdFunc)(struct ScriptContext *);
@@ -22,6 +24,18 @@ struct ScriptContext #define ScriptReadByte(ctx) (*(ctx->scriptPtr++))
+void InitScriptContext(struct ScriptContext *ctx, void *cmdTable, void *cmdTableEnd);
+u8 SetupBytecodeScript(struct ScriptContext *ctx, const u8 *ptr);
+void SetupNativeScript(struct ScriptContext *ctx, u8 (*ptr)(struct ScriptContext *));
+void StopScript(struct ScriptContext *ctx);
+void FUN_02038B6C(struct ScriptContext *ctx, s32 r1);
+u8 RunScriptCommand(struct ScriptContext *ctx);
+u8 ScriptPush(struct ScriptContext *ctx, const u8 *ptr);
+const u8 *ScriptPop(struct ScriptContext *ctx);
+void ScriptJump(struct ScriptContext *ctx, const u8 *ptr);
+u8 ScriptCall(struct ScriptContext *ctx, const u8 *ptr);
+void ScriptReturn(struct ScriptContext *ctx);
u16 ScriptReadHalfword(struct ScriptContext *ctx);
+u32 ScriptReadWord(struct ScriptContext *ctx);
#endif // _SCRIPT_H_
diff --git a/include/string_util.h b/include/string_util.h new file mode 100644 index 00000000..53d4e5f4 --- /dev/null +++ b/include/string_util.h @@ -0,0 +1,25 @@ +// +// Created by red031000 on 2020-05-24. +// + +#ifndef POKEDIAMOND_STRING_UTIL_H +#define POKEDIAMOND_STRING_UTIL_H + +#include "global.h" + +enum PrintingMode { + NORMAL, + PAD_SPACE, + PAD_ZEROES +}; + +void StringCopy(u16 *dest, const u16 *src); +u16 *StringCopyN(u16 *dest, const u16 *src, u32 num); +u32 StringLength(const u16 *s); +BOOL StringNotEqual(const u16 *s1, const u16 *s2); +BOOL StringNotEqualN(const u16 *s1, const u16 *s2, u32 num); +u16 *StringFill(u16 *dest, u16 value, u32 num); +u16 *StringFillEOS(u16 *dest, u32 num); +u16 *ConvertUIntToDecimalString(u16 *dest, u32 value, enum PrintingMode mode, u32 n); + +#endif //POKEDIAMOND_STRING_UTIL_H diff --git a/include/structs.h b/include/structs.h index 8c9657be..fbcf6e0c 100644 --- a/include/structs.h +++ b/include/structs.h @@ -17,11 +17,13 @@ struct UnkStruct_021C59C8_Sub20224 { struct UnkStruct_021C59C8_Sub_20464 { u8 unk_0; + u8 padding[3]; int unk_4; int unk_8; u8 unk_C; u8 unk_D; u8 unk_E; + u8 padding2; }; struct UnkStruct_021C59C8 { |