diff options
author | scnorton <scnorton@biociphers.org> | 2017-09-17 15:05:23 -0400 |
---|---|---|
committer | scnorton <scnorton@biociphers.org> | 2017-09-17 15:05:23 -0400 |
commit | a9d3949c915a6ccb58f0fe6b58af18ae34a60974 (patch) | |
tree | 4fb00416409ab6c2856be333f49e8d15ae98fc3e | |
parent | 8d34e9c3970d23832bb5500358fe4a2e250c5124 (diff) |
More an_walk_any_2_macro memes (again)
-rwxr-xr-x | asm/field_map_obj.s | 177 | ||||
-rwxr-xr-x | src/field_map_obj.c | 11 |
2 files changed, 11 insertions, 177 deletions
diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 5e0e3de0d..6ebef8976 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,183 +5,6 @@ .text - thumb_func_start sub_8096200 -sub_8096200: @ 8096200 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r3, 24 - bl npc_apply_direction - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl sub_80929FC - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl npc_apply_anim_looping - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8096200 - - thumb_func_start sub_8096230 -sub_8096230: @ 8096230 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - movs r3, 0x1 - bl sub_8096200 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096250 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096230 - - thumb_func_start sub_8096250 -sub_8096250: @ 8096250 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08096262 - movs r0, 0 - b _08096268 -_08096262: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08096268: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096250 - - thumb_func_start sub_8096270 -sub_8096270: @ 8096270 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - movs r3, 0x1 - bl sub_8096200 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096290 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096270 - - thumb_func_start sub_8096290 -sub_8096290: @ 8096290 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _080962A2 - movs r0, 0 - b _080962A8 -_080962A2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080962A8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096290 - - thumb_func_start sub_80962B0 -sub_80962B0: @ 80962B0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - movs r3, 0x1 - bl sub_8096200 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80962D0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80962B0 - - thumb_func_start sub_80962D0 -sub_80962D0: @ 80962D0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _080962E2 - movs r0, 0 - b _080962E8 -_080962E2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080962E8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80962D0 - - thumb_func_start sub_80962F0 -sub_80962F0: @ 80962F0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - movs r3, 0x1 - bl sub_8096200 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096310 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80962F0 - - thumb_func_start sub_8096310 -sub_8096310: @ 8096310 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08096322 - movs r0, 0 - b _08096328 -_08096322: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08096328: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096310 - thumb_func_start sub_8096330 sub_8096330: @ 8096330 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index b5f92645d..9769c6a03 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4950,3 +4950,14 @@ an_walk_any_2_macro(sub_8096100, sub_80960C8, npc_obj_ministep_stop_on_arrival, an_walk_any_2_macro(sub_8096140, sub_80960C8, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 1) an_walk_any_2_macro(sub_8096180, sub_80960C8, npc_obj_ministep_stop_on_arrival, DIR_WEST, 1) an_walk_any_2_macro(sub_80961C0, sub_80960C8, npc_obj_ministep_stop_on_arrival, DIR_EAST, 1) + +void sub_8096200(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 speed) +{ + npc_apply_direction(mapObject, sprite, direction, speed); + npc_apply_anim_looping(mapObject, sprite, sub_80929FC(mapObject->mapobj_unk_18)); +} + +an_walk_any_2_macro(sub_8096230, sub_8096200, npc_obj_ministep_stop_on_arrival, DIR_SOUTH, 1) +an_walk_any_2_macro(sub_8096270, sub_8096200, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 1) +an_walk_any_2_macro(sub_80962B0, sub_8096200, npc_obj_ministep_stop_on_arrival, DIR_WEST, 1) +an_walk_any_2_macro(sub_80962F0, sub_8096200, npc_obj_ministep_stop_on_arrival, DIR_EAST, 1) |