More documentation

This commit is contained in:
DizzyEggg
2025-06-08 10:34:03 +02:00
parent ab2394c4a4
commit 6494775ecc
11 changed files with 74 additions and 44 deletions

View File

@@ -2,6 +2,7 @@
#define GUARD_DUNGEON_MAPPARAM_H
#include "dungeon.h"
#include "structs/str_packed_pokemon_data.h"
struct DungeonMapParam1
{
@@ -16,7 +17,7 @@ struct DungeonMapParam2
struct DungeonMapParam1 **unk0;
FloorProperties *unk4;
u16 **unk8;
UnkDungeonGlobal_unk1CD98 **unkC;
PackedPokemonData **unkC;
u16 **unk10;
};

View File

@@ -10,6 +10,7 @@
#include "structs/str_traps.h"
#include "structs/str_dungeon_location.h"
#include "structs/str_dungeon_mail_seed.h"
#include "structs/str_packed_pokemon_data.h"
#define DUNGEON_MAX_SIZE_X 56
#define DUNGEON_MAX_SIZE_Y 32
@@ -161,13 +162,6 @@ typedef struct ItemSpawns
s16 itemValues[NUMBER_OF_ITEM_IDS];
} ItemSpawns;
// size: R=0x8 | B=0x6
typedef struct UnkDungeonGlobal_unk1CD98
{
u16 unk0; // species and level
s16 unk2[2];
} UnkDungeonGlobal_unk1CD98;
struct unkStruct_Dungeon134_sub
{
u8 unk134;
@@ -402,7 +396,7 @@ typedef struct Dungeon
EntityInfo unk69C[MAX_TEAM_MEMBERS];
EntityInfo unkEBC[DUNGEON_MAX_WILD_POKEMON_BODY_SIZE];
/* 0x2F3C */ unkDungeon2F3C unk2F3C[64];
/* 0x343C */ UnkDungeonGlobal_unk1CD98 unk343C[32];
/* 0x343C */ PackedPokemonData unk343C[32];
u8 fill353C[0x363c-0x353c];
/* 0x363C */ u8 expYieldRankings[MONSTER_MAX];
/* 0x37E4 */ s32 unk37E4;
@@ -486,7 +480,7 @@ typedef struct Dungeon
/* 0x1C574 */ FloorProperties floorProperties;
/* 0x1C590 */ ItemSpawns itemSpawns[ITEM_SPAWN_TYPES_COUNT];
u16 unk1CD70[20];
UnkDungeonGlobal_unk1CD98 unk1CD98[32];
PackedPokemonData unk1CD98[32];
UnkDungeonGlobal_unk1CE98_sub unk1CE98; // TODO: not sure how large this is
u8 unk1CEC8;
/* 0x1CECC */ DungeonMusicPlayer musPlayer;

View File

@@ -0,0 +1,15 @@
#ifndef GUARD_STR_PACKED_POKEMON_DATA_H
#define GUARD_STR_PACKED_POKEMON_DATA_H
#define PACKED_BITS_SPECIES 0x1FF
#define PACKED_BITS_LEVEL 0x7F
#define PACKED_BITS_LEVEL_SHIFT 9
// size: R=0x8 | B=0x6
typedef struct PackedPokemonData
{
u16 bits; // species first 9 bits, level last 7 bits
s16 unk2[2];
} PackedPokemonData;
#endif // GUARD_STR_PACKED_POKEMON_DATA_H