mirror of https://github.com/zeldaret/tmc.git
Add more nonmatch functions
This commit is contained in:
parent
85c903036a
commit
738fa00233
|
|
@ -1610,7 +1610,34 @@ void sub_08079BD8(Entity* this) {
|
|||
this->spritePriority.b0 = gPlayerEntity.spritePriority.b0;
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/playerUtils/sub_08079C30.inc", bool32 sub_08079C30(Entity* a))
|
||||
NONMATCH("asm/non_matching/playerUtils/sub_08079C30.inc", bool32 sub_08079C30(Entity* this)) {
|
||||
if ((gPlayerState.field_0x14 == 0) && ((gPlayerState.flags & PL_FLAGS2) == 0)) {
|
||||
if ((gPlayerState.flags & PL_MINISH) != 0) {
|
||||
return TRUE;
|
||||
}
|
||||
switch (gPlayerState.floor_type_last) {
|
||||
case 0xd:
|
||||
case 0x0e:
|
||||
case 0x0f:
|
||||
case 0x10:
|
||||
case 0x14:
|
||||
case 0x17:
|
||||
case 0x2a:
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (gPlayerState.floor_type == sub_08007DD6(GetRelativeCollisionTile(this, 0, -1), (u16*)gUnk_08007CAC)) {
|
||||
if (gPlayerState.floor_type == sub_08007DD6(GetRelativeCollisionTile(this, 2, 0), (u16*)gUnk_08007CAC)) {
|
||||
if (gPlayerState.floor_type ==
|
||||
sub_08007DD6(GetRelativeCollisionTile(this, -2, 0), (u16*)gUnk_08007CAC)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
bool32 sub_08079D48(void) {
|
||||
if (!sub_08079C30(&gPlayerEntity)) {
|
||||
|
|
|
|||
22
src/ui.c
22
src/ui.c
|
|
@ -442,7 +442,27 @@ void DrawKeys(void) {
|
|||
}
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/ui/CreateUIElement.inc", void CreateUIElement(u32 type, u32 type2))
|
||||
NONMATCH("asm/non_matching/ui/CreateUIElement.inc", void CreateUIElement(u32 type, u32 type2)) {
|
||||
u8 bVar1;
|
||||
u32 index;
|
||||
UIElement* element;
|
||||
UIElementDefinition* definition;
|
||||
|
||||
for (index = 0; index < MAX_UI_ELEMENTS; index++) {
|
||||
element = &gUnk_0200AF00.elements[index];
|
||||
if (element->used == 0) {
|
||||
definition = &gUIElementDefinitions[type];
|
||||
element->type = (u8)type;
|
||||
element->type2 = type2;
|
||||
element->frameIndex = 0xff;
|
||||
element->used = 1;
|
||||
element->unk_1a = definition->unk_4;
|
||||
element->buttonElementId = definition->buttonElementId;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
void sub_0801CAB8(UIElement* element, Frame* frame) {
|
||||
element->framePtr = frame;
|
||||
|
|
|
|||
Loading…
Reference in New Issue