mirror of https://github.com/pret/pokeemerald.git
Document size field of unknown struct
This commit is contained in:
parent
a32f631fe6
commit
7f1827767c
|
@ -126,9 +126,9 @@ struct Unknown_806F160_Struct
|
|||
u32 field_0_0:4;
|
||||
u32 field_0_1:4;
|
||||
u32 field_1:8;
|
||||
u32 magic:8;
|
||||
u32 field_3_0:4;
|
||||
u32 field_3_1:4;
|
||||
u16 magic:8;
|
||||
u32 size:4;
|
||||
u16 field_3_1:4;
|
||||
void *bytes;
|
||||
u8 **byteArrays;
|
||||
struct SpriteTemplate *templates;
|
||||
|
|
|
@ -5453,8 +5453,8 @@ static void PrintSearchParameterText(u8 taskId)
|
|||
const struct SearchOptionText *texts = sSearchOptions[gTasks[taskId].tMenuItem].texts;
|
||||
const u16 *cursorPos = &gTasks[taskId].data[sSearchOptions[gTasks[taskId].tMenuItem].taskDataCursorPos];
|
||||
const u16 *scrollOffset = &gTasks[taskId].data[sSearchOptions[gTasks[taskId].tMenuItem].taskDataScrollOffset];
|
||||
u16 i;
|
||||
u16 j;
|
||||
|
||||
u16 i, j;
|
||||
|
||||
ClearSearchParameterBoxText();
|
||||
|
||||
|
@ -5543,8 +5543,7 @@ static bool8 SearchParamCantScrollUp(u8 taskId)
|
|||
|
||||
if (lastOption > MAX_SEARCH_PARAM_CURSOR_POS && *scrollOffset != 0)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool8 SearchParamCantScrollDown(u8 taskId)
|
||||
|
@ -5555,8 +5554,7 @@ static bool8 SearchParamCantScrollDown(u8 taskId)
|
|||
|
||||
if (lastOption > MAX_SEARCH_PARAM_CURSOR_POS && *scrollOffset < lastOption - MAX_SEARCH_PARAM_CURSOR_POS)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define sTaskId data[0]
|
||||
|
|
|
@ -6858,7 +6858,7 @@ struct Unknown_806F160_Struct *sub_806F2AC(u8 id, u8 arg1)
|
|||
structPtr->field_0_0 = 7;
|
||||
structPtr->field_0_1 = 7;
|
||||
structPtr->field_1 = 4;
|
||||
structPtr->field_3_0 = 1;
|
||||
structPtr->size = 1;
|
||||
structPtr->field_3_1 = 2;
|
||||
break;
|
||||
case 0:
|
||||
|
@ -6866,12 +6866,12 @@ struct Unknown_806F160_Struct *sub_806F2AC(u8 id, u8 arg1)
|
|||
structPtr->field_0_0 = 4;
|
||||
structPtr->field_0_1 = 4;
|
||||
structPtr->field_1 = 4;
|
||||
structPtr->field_3_0 = 1;
|
||||
structPtr->size = 1;
|
||||
structPtr->field_3_1 = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
structPtr->bytes = AllocZeroed(structPtr->field_3_0 * 0x800 * 4 * structPtr->field_0_0);
|
||||
structPtr->bytes = AllocZeroed(structPtr->size * 0x800 * 4 * structPtr->field_0_0);
|
||||
structPtr->byteArrays = AllocZeroed(structPtr->field_0_0 * 32);
|
||||
if (structPtr->bytes == NULL || structPtr->byteArrays == NULL)
|
||||
{
|
||||
|
@ -6880,7 +6880,7 @@ struct Unknown_806F160_Struct *sub_806F2AC(u8 id, u8 arg1)
|
|||
else
|
||||
{
|
||||
for (i = 0; i < structPtr->field_0_0; i++)
|
||||
structPtr->byteArrays[i] = structPtr->bytes + (structPtr->field_3_0 * (i << 0xD));
|
||||
structPtr->byteArrays[i] = structPtr->bytes + (structPtr->size * (i << 0xD));
|
||||
}
|
||||
|
||||
structPtr->templates = AllocZeroed(sizeof(struct SpriteTemplate) * structPtr->field_0_0);
|
||||
|
@ -6899,8 +6899,8 @@ struct Unknown_806F160_Struct *sub_806F2AC(u8 id, u8 arg1)
|
|||
case 2:
|
||||
sub_806F1FC(structPtr);
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
case 0:
|
||||
default:
|
||||
sub_806F160(structPtr);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue