mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 17:34:20 +01:00
sub_808D438
This commit is contained in:
parent
f677873d07
commit
a08f11cab3
@ -5,17 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_808D438
|
||||
sub_808D438: @ 808D438
|
||||
push {lr}
|
||||
bl strange_npc_table_clear
|
||||
bl npcs_clear_ids_and_state
|
||||
bl ClearPlayerAvatarInfo
|
||||
bl sub_808D450
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_808D438
|
||||
|
||||
thumb_func_start sub_808D450
|
||||
sub_808D450: @ 808D450
|
||||
push {r4-r6,lr}
|
||||
|
@ -9,4 +9,6 @@ extern struct MapObject gUnknown_02037350[16];
|
||||
|
||||
// Exported ROM declarations
|
||||
|
||||
void sub_808D438(void);
|
||||
|
||||
#endif //POKEEMERALD_FIELD_MAP_OBJ_H
|
||||
|
10
include/field_player_avatar.h
Normal file
10
include/field_player_avatar.h
Normal file
@ -0,0 +1,10 @@
|
||||
//
|
||||
// Created by Scott Norton on 9/6/17.
|
||||
//
|
||||
|
||||
#ifndef POKEEMERALD_FIELD_PLAYER_AVATAR_H
|
||||
#define POKEEMERALD_FIELD_PLAYER_AVATAR_H
|
||||
|
||||
void ClearPlayerAvatarInfo(void);
|
||||
|
||||
#endif //POKEEMERALD_FIELD_PLAYER_AVATAR_H
|
7
include/rom4.h
Normal file
7
include/rom4.h
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
#ifndef POKEEMERALD_ROM4_H
|
||||
#define POKEEMERALD_ROM4_H
|
||||
|
||||
void strange_npc_table_clear(void);
|
||||
|
||||
#endif //POKEEMERALD_ROM4_H
|
@ -1,6 +1,9 @@
|
||||
// Includes
|
||||
|
||||
#include "global.h"
|
||||
#include "sprite.h"
|
||||
#include "rom4.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "field_map_obj.h"
|
||||
|
||||
// Static struct declarations
|
||||
@ -9,11 +12,13 @@
|
||||
|
||||
// Static ROM declarations
|
||||
|
||||
void sub_808D450(void);
|
||||
|
||||
// ROM data
|
||||
|
||||
// Code
|
||||
|
||||
void npc_clear_ids_and_state(struct MapObject *mapObject)
|
||||
/*static*/ void npc_clear_ids_and_state(struct MapObject *mapObject)
|
||||
{
|
||||
memset(mapObject, 0, sizeof(struct MapObject));
|
||||
mapObject->localId = 0xFF;
|
||||
@ -22,7 +27,7 @@ void npc_clear_ids_and_state(struct MapObject *mapObject)
|
||||
mapObject->mapobj_unk_1C = -1;
|
||||
}
|
||||
|
||||
void npcs_clear_ids_and_state(void)
|
||||
static void npcs_clear_ids_and_state(void)
|
||||
{
|
||||
u8 i;
|
||||
for (i = 0; i < ARRAY_COUNT(gUnknown_02037350); i ++)
|
||||
@ -30,3 +35,11 @@ void npcs_clear_ids_and_state(void)
|
||||
npc_clear_ids_and_state(&gUnknown_02037350[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_808D438(void)
|
||||
{
|
||||
strange_npc_table_clear();
|
||||
npcs_clear_ids_and_state();
|
||||
ClearPlayerAvatarInfo();
|
||||
sub_808D450();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user