diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-06-02 08:24:32 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-06-02 08:24:51 -0400 |
commit | 928687bdf61fa44aec66e36adae2ae9f241d7b48 (patch) | |
tree | e7bd8da317c7f5acc219a7d59193bee47943ddc8 | |
parent | 6e4c1d2c119122d3207c157f110053d9ab97b004 (diff) |
sub_80FF1B0 (thanks revo :lovechatot:)
-rwxr-xr-x | asm/decoration.s | 34 | ||||
-rw-r--r--[-rwxr-xr-x] | include/decoration.h | 1 | ||||
-rw-r--r-- | include/fieldmap.h | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | src/decoration.c | 22 | ||||
-rw-r--r-- | src/fieldmap.c | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | src/tv.c | 0 |
6 files changed, 23 insertions, 36 deletions
diff --git a/asm/decoration.s b/asm/decoration.s index e7f31dd53..f1fb5019c 100755 --- a/asm/decoration.s +++ b/asm/decoration.s @@ -8,40 +8,6 @@ .equiv ewram_1f000, 0x0201f000 - thumb_func_start sub_80FF1B0 -sub_80FF1B0: @ 80FF1B0 - push {lr} - lsls r0, 24 - lsrs r2, r0, 24 - lsls r1, 24 - lsrs r1, 24 - ldr r0, _080FF1D0 @ =0x0000ffff - cmp r2, 0x22 - beq _080FF1D8 - cmp r2, 0x26 - bne _080FF1E2 - ldr r0, _080FF1D4 @ =gUnknown_083EC97C - adds r0, r1, r0 - ldrb r0, [r0] - lsls r0, 28 - lsrs r0, 16 - b _080FF1E2 - .align 2, 0 -_080FF1D0: .4byte 0x0000ffff -_080FF1D4: .4byte gUnknown_083EC97C -_080FF1D8: - ldr r0, _080FF1E8 @ =gUnknown_083EC984 - adds r0, r1, r0 - ldrb r0, [r0] - lsls r0, 28 - lsrs r0, 16 -_080FF1E2: - pop {r1} - bx r1 - .align 2, 0 -_080FF1E8: .4byte gUnknown_083EC984 - thumb_func_end sub_80FF1B0 - thumb_func_start sub_80FF1EC sub_80FF1EC: @ 80FF1EC push {r4-r7,lr} diff --git a/include/decoration.h b/include/decoration.h index dffc28461..0951d514a 100755..100644 --- a/include/decoration.h +++ b/include/decoration.h @@ -168,7 +168,6 @@ extern u8 ewram[]; extern struct Decoration gDecorations[0x77]; extern void sub_80FF394(u16 unkr0, u16 unkr1, u16 unkr2); -extern Script gUnknown_0815F399; extern u8 *(gUnknown_020388D0[]); extern u8 gUnknown_020388D4; extern u8 gUnknown_020388D5; diff --git a/include/fieldmap.h b/include/fieldmap.h index 1aa99031d..0e6878929 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -7,5 +7,6 @@ struct MapHeader *mapconnection_get_mapheader(struct MapConnection *connection); int GetMapBorderIdAt(int x, int y); extern bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 y, u8 direction); int CanCameraMoveInDirection(int direction); +u32 GetBehaviorByMetatileId(u16 metatile); #endif diff --git a/src/decoration.c b/src/decoration.c index ba923d527..482b5922e 100755..100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -10,8 +10,12 @@ #include "palette.h" #include "field_player_avatar.h" #include "field_camera.h" +#include "fieldmap.h" +#include "metatile_behavior.h" #include "decoration.h" +extern Script gUnknown_0815F399; + void sub_80FE1DC(void) { sub_80FE2B4(); @@ -612,3 +616,21 @@ void sub_80FF160(u8 taskId) sub_80FE5AC(taskId); } } + +u16 sub_80FF1B0(u8 decoId, u8 a1) +{ + u16 retval; + retval = 0xffff; + + switch (decoId) + { + case DECOR_STAND: + retval = gUnknown_083EC97C[a1] << 12; + return retval; + case DECOR_SLIDE: + retval = gUnknown_083EC984[a1] << 12; + return retval; + default: + return retval; + } +} diff --git a/src/fieldmap.c b/src/fieldmap.c index 46b996e52..2ed2266f5 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -40,7 +40,6 @@ void fillSouthConnection(struct MapHeader *, struct MapHeader *, s32); void fillNorthConnection(struct MapHeader *, struct MapHeader *, s32); void fillWestConnection(struct MapHeader *, struct MapHeader *, s32); void fillEastConnection(struct MapHeader *, struct MapHeader *, s32); -u32 GetBehaviorByMetatileId(u16 metatile); struct MapConnection *sub_8056A64(u8 direction, int x, int y); bool8 sub_8056ABC(u8 direction, int x, int y, struct MapConnection *connection); bool8 sub_8056B20(int x, int src_width, int dest_width, int offset); |