diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2021-06-23 17:35:37 -0500 |
---|---|---|
committer | Seth Barberee <seth.barberee@gmail.com> | 2021-06-23 17:35:37 -0500 |
commit | d1685379681008d41f78fa4a6ae17ace5ee2dbfa (patch) | |
tree | 22645f079beea40333e7e822f055c063781ef806 /src/code_8090208.c | |
parent | f1fdcc2b0ade13ad1a4cc7360eac70f27396d26a (diff) |
Finish out game options and FatalError
Some data cleanup as well. Thanks pika for the noreturn tip for
FatalError.
Diffstat (limited to 'src/code_8090208.c')
-rw-r--r-- | src/code_8090208.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/code_8090208.c b/src/code_8090208.c new file mode 100644 index 0000000..b64b551 --- /dev/null +++ b/src/code_8090208.c @@ -0,0 +1,36 @@ +#include "global.h" +#include "dungeon.h" + +extern const char gUnknown_8108F10[]; +extern const char gUnknown_8108F18[]; +extern const char gUnknown_8108F2C[]; + +void ExpandPlaceholdersBuffer(u8 *buffer, const char *text, ...); + + +struct unkDungeonStruct +{ + u8 index; + u8 floor; +}; + +void sub_8090208(u8 *buffer, struct unkDungeonStruct *dungeonLocation) +{ + ExpandPlaceholdersBuffer(buffer, gUnknown_8108F10, gDungeonNames[dungeonLocation->index].name1); // #cD%s#r (normal floor print (no B) +} + +void PrintDungeonLocationtoBuffer(u8 *buffer, struct unkDungeonStruct *dungeonLocation) +{ + if(gDungeons[dungeonLocation->index].stairDirection != 0){ + ExpandPlaceholdersBuffer(buffer, gUnknown_8108F18, gDungeonNames[dungeonLocation->index].name1, dungeonLocation->floor); //_F + } + else + { + ExpandPlaceholdersBuffer(buffer, gUnknown_8108F2C, gDungeonNames[dungeonLocation->index].name1, dungeonLocation->floor); // B _F + } +} + +void CopyDungeonName1toBuffer(u8 *buffer, struct unkDungeonStruct *dungeonLocation) +{ + strncpy(buffer, gDungeonNames[dungeonLocation->index].name1, 0x50); +} |