Fixes with generated files in map_header_util

This commit is contained in:
Estellar
2025-01-29 22:19:32 -03:00
parent b1388c6b99
commit 8d09ab0765
3 changed files with 6 additions and 8 deletions

View File

@@ -1,10 +1,12 @@
#ifndef POKEPLATINUM_MAP_HEADER_UTIL_H
#define POKEPLATINUM_MAP_HEADER_UTIL_H
#include "generated/map_headers.h"
#include "message.h"
#include "strbuf.h"
u32 MapHeader_LoadString(MessageLoader *msgLoader, u32 entryID, Strbuf *strbuf);
void MapHeader_LoadName(int headerID, u32 heapID, Strbuf *strbuf);
void MapHeader_LoadName(enum MapHeader headerID, u32 heapID, Strbuf *strbuf);
#endif // POKEPLATINUM_MAP_HEADER_UTIL_H

View File

@@ -1,10 +1,8 @@
#include "map_header_util.h"
#include <nitro.h>
#include <string.h>
#include "field/field_system_sub2_t.h"
#include "text/pl_msg.naix"
#include "generated/text_banks.h"
#include "font.h"
#include "map_header.h"
@@ -19,12 +17,12 @@ u32 MapHeader_LoadString(MessageLoader *msgLoader, u32 entryID, Strbuf *strbuf)
return width;
}
void MapHeader_LoadName(int headerID, u32 heapID, Strbuf *strbuf)
void MapHeader_LoadName(enum MapHeader headerID, u32 heapID, Strbuf *strbuf)
{
u32 mapLabelTextID;
MessageLoader *msgLoader;
msgLoader = MessageLoader_Init(MESSAGE_LOADER_NARC_HANDLE, NARC_INDEX_MSGDATA__PL_MSG, message_bank_location_names, heapID);
msgLoader = MessageLoader_Init(MESSAGE_LOADER_NARC_HANDLE, NARC_INDEX_MSGDATA__PL_MSG, TEXT_BANK_LOCATION_NAMES, heapID);
mapLabelTextID = MapHeader_GetMapLabelTextID(headerID);
MapHeader_LoadString(msgLoader, mapLabelTextID, strbuf); // It should be MessageLoader_GetStrbuf()

View File

@@ -30,8 +30,6 @@
#include "unk_0200F174.h"
#include "unk_02039C80.h"
void MapHeader_LoadName(const int param0, const u32 param1, Strbuf *param2);
typedef struct {
int unk_00;
int unk_04;