That's an OpenedFile lol

This commit is contained in:
Kermalis
2023-08-27 22:56:09 -04:00
parent 34d1d0b9b2
commit 4784ab68b0
7 changed files with 36 additions and 37 deletions

View File

@@ -3,11 +3,11 @@
#include "sprite.h"
extern struct Dungeon_ax *sub_80687D0(s16);
/*struct Dungeon_ax *sub_80687D0(s16 species)
extern struct OpenedFile *sub_80687D0(s16);
/*struct OpenedFile *sub_80687D0(s16 species)
{
s32 species32 = species;
return gDungeon->sub17B44[species32];
return gDungeon->sprites[species32];
}*/
#endif // GUARD_CODE_805D8C8_H

View File

@@ -272,7 +272,7 @@ struct Entity
// gets assigned the current counter value as its spawn index.
/* 0x26 */ u16 spawnGenID;
/* 0x28*/ struct EntitySpriteInfo spriteInfo;
struct Dungeon_ax *unk64;
struct OpenedFile *unk64;
s16 unk68;
u8 unk6A;
u8 unk6B;

View File

@@ -1,9 +1,10 @@
#ifndef GUARD_DUNGEON_DATA_H
#define GUARD_DUNGEON_DATA_H
#include "global.h"
#include "constants/monster.h"
#include "dungeon_entity.h"
#include "global.h"
#include "file_system.h"
#include "map.h"
#include "position.h"
#include "sprite.h"
@@ -199,8 +200,8 @@ struct Dungeon
/* 0x17B38 */ u32 unk17B38;
/* 0x17B3C */ u32 unk17B3C;
u8 fill17B40[0x17B44 - 0x17B40];
struct Dungeon_ax *sub17B44[MONSTER_MAX]; // Assuming MONSTER_MAX since the highest value I've seen read is MONSTER_DECOY
u8 fill181E0[0x181E8 - 0x181E0];
/* 0x17B44 */ struct OpenedFile *sprites[MONSTER_MAX + 1];
u8 fill181E4[0x181E8 - 0x181E4];
/* 0x181E8 */ struct Position cameraPos;
/* 0x181EC */ struct Position cameraPosMirror;
/* 0x181F0 */ struct Position cameraPixelPos;

View File

@@ -1,35 +1,40 @@
#ifndef GUARD_FILE_SYSTEM_H
#define GUARD_FILE_SYSTEM_H
// size: 0x8
struct File
{
char *name;
u8 *data;
/* 0x0 */ char *name;
/* 0x4 */ u8 *data;
};
// size: 0x8
struct OpenedFile
{
struct File *file;
u8 *data;
/* 0x0 */ struct File *file;
/* 0x4 */ u8 *data;
};
// size: 0x10
struct FileArchive
{
char magic[8];
s32 count;
struct File *entries;
/* 0x0 */ char magic[8];
/* 0x8 */ s32 count;
/* 0xC */ struct File *entries;
};
// size: 0x8
struct SiroArchive
{
u32 magic;
u8 *data;
/* 0x0 */ u32 magic;
/* 0x4 */ u8 *data;
};
// size: 0x8
struct UnkFileStruct1
{
/* 0x0 */ u32 unk0;
/* 0x4 */ u32 unk4;
u32 unk0;
u32 unk4;
};
void InitFileSystem(void);

View File

@@ -65,7 +65,7 @@ struct EntitySpriteInfo
};
// size: ?
struct Dungeon_ax_Sub4
struct Dungeon_ax
{
u32 unk0;
u32 **unk4;
@@ -74,13 +74,6 @@ struct Dungeon_ax_Sub4
u32 unk10;
};
// size: ?
struct Dungeon_ax
{
u8 fill0[0x4 - 0x0];
struct Dungeon_ax_Sub4 *unk4;
};
void AddSprite(struct SpriteOAM *, s32, struct UnkSpriteMem *, struct unkStruct_2039DB0 *);
void BlinkSavingIcon(void);
void CopySpritesToOam(void);
@@ -90,9 +83,9 @@ void SetSavingIconCoords(struct Position *);
void sub_8004E8C(struct unkStruct_2039DB0 *);
void sub_8005180(void);
void sub_8005304(void);
void sub_80053AC(struct EntitySpriteInfo *, struct Dungeon_ax *, u32, u32, u32, u32, bool8);
void sub_80053D0(struct EntitySpriteInfo *, struct Dungeon_ax_Sub4 *, u32, u32, u32, u32, bool8);
void sub_800543C(struct EntitySpriteInfo *, struct Dungeon_ax *, u32, u32, u32, bool8);
void sub_80053AC(struct EntitySpriteInfo *, struct OpenedFile *, u32, u32, u32, u32, bool8);
void sub_80053D0(struct EntitySpriteInfo *, struct Dungeon_ax *, u32, u32, u32, u32, bool8);
void sub_800543C(struct EntitySpriteInfo *, struct OpenedFile *, u32, u32, u32, bool8);
void sub_80054BC(struct axPokemon *);
#endif // GUARD_SPRITE_H