text: Simplify DynamicPlaceholderTextUtil_Reset

Signed-off-by:Arven
This commit is contained in:
AreaZeroArven 2023-01-07 13:03:50 -05:00 committed by GitHub
parent 6d6a876dbd
commit bce97562b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 10 deletions

View File

@ -7,17 +7,11 @@ static EWRAM_DATA const u8 *sStringPointers[8] = {};
void DynamicPlaceholderTextUtil_Reset(void)
{
const u8 **ptr;
u8 *fillval;
const u8 **ptr2;
ptr = sStringPointers;
fillval = NULL;
ptr2 = ptr + (ARRAY_COUNT(sStringPointers) - 1);
do
s32 i;
for (i = 0; i < (s32)ARRAY_COUNT(sStringPointers); i++)
{
*ptr2-- = fillval;
} while ((int)ptr2 >= (int)ptr);
sStringPointers[i] = NULL;
}
}
void DynamicPlaceholderTextUtil_SetPlaceholderPtr(u8 idx, const u8 *ptr)