Skip to content

Commit

Permalink
Rename symbols and files according to Time/Darkness prototype strings (
Browse files Browse the repository at this point in the history
…#236)

Sync symbol names from pret/pmd-sky#52

All symbols of known decompiled functions were renamed according
to strings found in the Time/Darkness prototypes. Functions with
unknown exact names were named to be consistent in context.
  • Loading branch information
ElectricGeorge authored Dec 29, 2023
1 parent b270a0a commit d6150d7
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 79 deletions.
1 change: 1 addition & 0 deletions CREDITS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ other parts of the project, feel free to add yourself to this file!
- tech-ticks
- Rhokin
- ShadyGamerX
- ElectricGeorge
- The rest of the contributors to Project Pokémon's technical documentation
for the NDS Mystery Dungeon games, which can be found here:
https://projectpokemon.org/home/docs/mystery-dungeon-nds/
Expand Down
4 changes: 2 additions & 2 deletions headers/data/arm9.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ extern enum overlay_group_id LOADED_OVERLAY_GROUP_0;
extern enum overlay_group_id LOADED_OVERLAY_GROUP_1;
extern enum overlay_group_id LOADED_OVERLAY_GROUP_2;
extern bool DEBUG_IS_INITIALIZED;
extern struct pack_file_opened* PACK_FILES_OPENED;
extern const char* PACK_FILE_PATHS_TABLE[6];
extern struct pack_file_opened* DIRECTORY_FILES_EXTRACTED;
extern const char* DIRECTORY_FILE_TABLE[6];
extern struct item* BAG_ITEMS_PTR_MIRROR;
extern void* ITEM_DATA_TABLE_PTRS[3];
extern struct move_data_table* MOVE_DATA_TABLE_PTR;
Expand Down
68 changes: 35 additions & 33 deletions headers/functions/arm9.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,48 +88,50 @@ bool GetHeldButtons(int controller, undefined* btn_ptr);
bool GetPressedButtons(int controller, undefined* btn_ptr);
bool GetReleasedStylus(undefined* stylus_ptr);
void KeyWaitInit(void);
void DataTransferInit(void);
void DataTransferStop(void);
void FileInitVeneer(struct file_stream* file);
void FileOpen(struct file_stream* file, const char* filepath);
void FileRom_InitDataTransfer(void);
void FileRom_StopDataTransfer(void);
void FileRom_Veneer_FileInit(struct file_stream* file);
void FileRom_HandleOpen(struct file_stream* file, const char* filepath);
uint32_t FileGetSize(struct file_stream* file);
uint32_t FileRead(struct file_stream* file, void* buf, uint32_t size);
void FileSeek(struct file_stream* file, int offset, int whence);
uint32_t FileRom_HandleRead(struct file_stream* file, void* buf, uint32_t size);
void FileRom_HandleSeek(struct file_stream* file, int offset, int whence);
void FileClose(struct file_stream* file);
void UnloadFile(void* ptr);
void LoadFileFromRom(struct iovec* iov, const char* filepath, uint32_t flags);
void UpdateFadeStatus(struct screen_fade* fstruct, int param_2, int duration);
bool HandleFades(struct screen_fade* fstruct);
int GetFadeStatus(struct screen_fade* fstruct);
void InitDebug(void);
void InitDebugFlag(void);
bool GetDebugFlag(enum debug_flag flag);
void SetDebugFlag(enum debug_flag flag, bool val);
void InitDebugStripped6(void);
void Debug_Init(void);
void Debug_InitDebugFlag(void);
bool Debug_GetDebugFlag(enum debug_flag flag);
void Debug_SetDebugFlag(enum debug_flag flag, bool val);
void Debug_Stripped6(void);
int AppendProgPos(char* str, struct prog_pos_info* prog_pos, const char* msg);
void InitDebugStripped5(void);
void DebugPrintTrace(const char* msg, struct prog_pos_info* prog_pos);
void Debug_Stripped5(void);
void Debug_PrintTrace(const char* msg, struct prog_pos_info* prog_pos);
void DebugDisplay(const char* fmt, ...);
void DebugPrint0(const char* fmt, ...);
void InitDebugLogFlag(void);
bool GetDebugLogFlag(enum debug_log_flag flag);
void SetDebugLogFlag(enum debug_log_flag flag, bool val);
void DebugPrint(uint8_t level, const char* fmt, ...);
void InitDebugStripped4(void);
void InitDebugStripped3(void);
void InitDebugStripped2(void);
void InitDebugStripped1(void);
void FatalError(struct prog_pos_info prog_pos, const char* fmt, ...);
void OpenAllPackFiles(void);
uint32_t GetFileLengthInPackWithPackNb(enum pack_file_id pack_id, uint32_t file_index);
uint32_t LoadFileInPackWithPackId(enum pack_file_id pack_id, uint32_t file_index,
void* output_buffer);
void AllocAndLoadFileInPack(enum pack_file_id pack_id, uint32_t file_index,
struct pack_alloc_and_load_result* output, uint32_t malloc_flags);
void OpenPackFile(struct pack_file_opened* pack_file, const char* file_name);
uint32_t GetFileLengthInPack(struct pack_file_opened* pack_file, uint32_t file_index);
uint32_t LoadFileInPack(struct pack_file_opened* pack_file, void* output_buffer,
uint32_t file_index);
void Debug_Print0(const char* fmt, ...);
void Debug_InitLogFlag(void);
bool Debug_GetLogFlag(enum debug_log_flag flag);
void Debug_SetLogFlag(enum debug_log_flag flag, bool val);
void Debug_Print(uint8_t level, const char* fmt, ...);
void Debug_Stripped4(void);
void Debug_Stripped3(void);
void Debug_Stripped2(void);
void Debug_Stripped1(void);
void Debug_FatalError(struct prog_pos_info prog_pos, const char* fmt, ...);
void DirectoryFileMngr_ExtractAllDirectoryFiles(void);
uint32_t DirectoryFileMngr_GetDirectoryFileSize(enum pack_file_id pack_id, uint32_t file_index);
uint32_t DirectoryFileMngr_LoadDirectoryFile(enum pack_file_id pack_id, uint32_t file_index,
void* output_buffer);
void DirectoryFileMngr_OpenDirectoryFile(enum pack_file_id pack_id, uint32_t file_index,
struct pack_alloc_and_load_result* output,
uint32_t malloc_flags);
void DirectoryFile_ExtractDirectoryFile(struct pack_file_opened* pack_file, const char* file_name);
uint32_t DirectoryFile_GetDirectoryFileSize(struct pack_file_opened* pack_file,
uint32_t file_index);
uint32_t DirectoryFile_LoadDirectoryFile(struct pack_file_opened* pack_file, void* output_buffer,
uint32_t file_index);
void GetDungeonResultMsg(union damage_source damage_source_or_result, char* buffer, int buffer_size,
undefined* param_4);
union damage_source GetDamageSource(enum move_id, enum item_id);
Expand Down
2 changes: 1 addition & 1 deletion headers/types/common/file_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct pack_file_opened {
};
ASSERT_SIZE(struct pack_file_opened, 84);

// Data to return result of the AllocAndLoadFileInPack function
// Data to return result of the DirectoryFileMngr_OpenDirectoryFile function
struct pack_alloc_and_load_result {
void* data;
uint32_t length;
Expand Down
Loading

0 comments on commit d6150d7

Please sign in to comment.