Fix namebox bug when reloading the map mid-script (#8073)
This commit is contained in:
parent
9717c53afa
commit
44dc720260
@ -9,6 +9,7 @@ extern const u8 *const gSpeakerNamesTable[];
|
||||
|
||||
void TrySpawnNamebox(u32 tileNum);
|
||||
u32 GetNameboxWindowId(void);
|
||||
void ResetNameboxData(void);
|
||||
void DestroyNamebox(void);
|
||||
void FillNamebox(void);
|
||||
void DrawNamebox(u32 windowId, u32 tileNum, bool32 copyToVram);
|
||||
|
||||
@ -94,6 +94,12 @@ u32 GetNameboxWindowId(void)
|
||||
return sNameboxWindowId;
|
||||
}
|
||||
|
||||
void ResetNameboxData(void)
|
||||
{
|
||||
sNameboxWindowId = WINDOW_NONE;
|
||||
gSpeakerName = NULL;
|
||||
}
|
||||
|
||||
void DestroyNamebox(void)
|
||||
{
|
||||
if (sNameboxWindowId == WINDOW_NONE)
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
#include "decompress.h"
|
||||
#include "dma3.h"
|
||||
#include "event_data.h"
|
||||
#include "field_name_box.h"
|
||||
#include "field_weather.h"
|
||||
#include "graphics.h"
|
||||
#include "main.h"
|
||||
@ -146,6 +147,7 @@ static const struct MenuInfoIcon sMenuInfoIcons[] =
|
||||
|
||||
void InitStandardTextBoxWindows(void)
|
||||
{
|
||||
ResetNameboxData();
|
||||
InitWindows(sStandardTextBox_WindowTemplates);
|
||||
sStartMenuWindowId = WINDOW_NONE;
|
||||
sMapNamePopupWindowId = WINDOW_NONE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user