resolved SetWindowTemplateFields

This commit is contained in:
jiangzhengwenjz
2019-07-10 03:19:28 +08:00
parent 05371e5875
commit bcf27c2de1
6 changed files with 16 additions and 131 deletions
+3 -4
View File
@@ -80,11 +80,10 @@ void PrintCoinsString(u32 coinAmount)
void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y)
{
struct WindowTemplate template, template2;
struct WindowTemplate template;
SetWindowTemplateFields(&template, 0, x + 1, y + 1, 8, 3, 0xF, 0x20);
template2 = template; // again, why...
sCoinsWindowId = AddWindow(&template2);
template = SetWindowTemplateFields(0, x + 1, y + 1, 8, 3, 0xF, 0x20);
sCoinsWindowId = AddWindow(&template);
FillWindowPixelBuffer(sCoinsWindowId, 0);
PutWindowTilemap(sCoinsWindowId);
TextWindow_SetStdFrame0_WithPal(sCoinsWindowId, 0x21D, 0xD0);