mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
sub_80E9108
This commit is contained in:
parent
0b0926f127
commit
1f5378c6d1
@ -5,81 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80E90C8
|
||||
sub_80E90C8: @ 80E90C8
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
ldr r0, =gPlayerAvatar
|
||||
ldrb r1, [r0, 0x5]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
ldr r1, =gMapObjects
|
||||
adds r0, r1
|
||||
movs r1, 0x2
|
||||
bl FieldObjectTurn
|
||||
bl sub_80ABDFC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _080E90F8
|
||||
bl EnableBothScriptContexts
|
||||
adds r0, r4, 0
|
||||
bl DestroyTask
|
||||
_080E90F8:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80E90C8
|
||||
|
||||
thumb_func_start sub_80E9108
|
||||
sub_80E9108: @ 80E9108
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
bl ScriptContext2_Enable
|
||||
bl HideMapNamePopUpWindow
|
||||
mov r4, sp
|
||||
adds r4, 0x2
|
||||
movs r2, 0x88
|
||||
lsls r2, 2
|
||||
mov r0, sp
|
||||
adds r1, r4, 0
|
||||
bl sub_80E8CB0
|
||||
mov r1, sp
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
adds r0, 0x7
|
||||
strh r0, [r1]
|
||||
ldrh r0, [r4]
|
||||
adds r0, 0x7
|
||||
strh r0, [r4]
|
||||
mov r0, sp
|
||||
movs r1, 0
|
||||
ldrsh r0, [r0, r1]
|
||||
movs r2, 0
|
||||
ldrsh r1, [r4, r2]
|
||||
movs r2, 0xE2
|
||||
lsls r2, 4
|
||||
bl MapGridSetMetatileIdAt
|
||||
mov r0, sp
|
||||
movs r1, 0
|
||||
ldrsh r0, [r0, r1]
|
||||
movs r2, 0
|
||||
ldrsh r1, [r4, r2]
|
||||
bl CurrentMapDrawMetatileAt
|
||||
bl pal_fill_black
|
||||
ldr r0, =sub_80E90C8
|
||||
movs r1, 0
|
||||
bl CreateTask
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80E9108
|
||||
|
||||
thumb_func_start sub_80E916C
|
||||
sub_80E916C: @ 80E916C
|
||||
push {r4-r6,lr}
|
||||
|
11
include/map_name_popup.h
Normal file
11
include/map_name_popup.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef GUARD_MAP_NAME_POPUP_H
|
||||
#define GUARD_MAP_NAME_POPUP_H
|
||||
|
||||
// Exported type declarations
|
||||
|
||||
// Exported RAM declarations
|
||||
|
||||
// Exported ROM declarations
|
||||
void HideMapNamePopUpWindow(void);
|
||||
|
||||
#endif //GUARD_MAP_NAME_POPUP_H
|
@ -5,17 +5,20 @@
|
||||
#include "palette.h"
|
||||
#include "list_menu.h"
|
||||
#include "map_constants.h"
|
||||
#include "decoration.h"
|
||||
#include "decoration_inventory.h"
|
||||
#include "overworld.h"
|
||||
#include "fieldmap.h"
|
||||
#include "field_camera.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "field_screen.h"
|
||||
#include "field_weather.h"
|
||||
#include "field_map_obj.h"
|
||||
#include "map_name_popup.h"
|
||||
#include "text.h"
|
||||
#include "string_util.h"
|
||||
#include "script.h"
|
||||
#include "event_data.h"
|
||||
#include "decoration.h"
|
||||
#include "decoration_inventory.h"
|
||||
#include "secret_base.h"
|
||||
|
||||
// Static type declarations
|
||||
@ -303,3 +306,29 @@ bool8 sub_80E909C(void)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_80E90C8(u8 taskId)
|
||||
{
|
||||
FieldObjectTurn(&gMapObjects[gPlayerAvatar.mapObjectId], DIR_NORTH);
|
||||
if (sub_80ABDFC() == TRUE)
|
||||
{
|
||||
EnableBothScriptContexts();
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80E9108(void)
|
||||
{
|
||||
s16 x;
|
||||
s16 y;
|
||||
|
||||
ScriptContext2_Enable();
|
||||
HideMapNamePopUpWindow();
|
||||
sub_80E8CB0(&x, &y, 0x220);
|
||||
x += 7;
|
||||
y += 7;
|
||||
MapGridSetMetatileIdAt(x, y, 0x220 | 0xC00);
|
||||
CurrentMapDrawMetatileAt(x, y);
|
||||
pal_fill_black();
|
||||
CreateTask(sub_80E90C8, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user