sub_808E894
This commit is contained in:
@@ -5,27 +5,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_808E894
|
|
||||||
sub_808E894: @ 808E894
|
|
||||||
push {lr}
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r0, 16
|
|
||||||
bl FindFieldObjectPaletteIndexByTag
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r1, r0, 24
|
|
||||||
ldr r0, =0x000011ff
|
|
||||||
cmp r1, r0
|
|
||||||
beq _0808E8B2
|
|
||||||
lsls r0, r1, 3
|
|
||||||
ldr r1, =gUnknown_0850BBC8
|
|
||||||
adds r0, r1
|
|
||||||
bl sub_808E8F4
|
|
||||||
_0808E8B2:
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end sub_808E894
|
|
||||||
|
|
||||||
thumb_func_start sub_808E8C0
|
thumb_func_start sub_808E8C0
|
||||||
sub_808E8C0: @ 808E8C0
|
sub_808E8C0: @ 808E8C0
|
||||||
push {r4-r6,lr}
|
push {r4-r6,lr}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
//
|
||||||
|
// Created by Scott Norton on 9/8/17.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef POKEEMERALD_DATA3_H
|
||||||
|
#define POKEEMERALD_DATA3_H
|
||||||
|
|
||||||
|
extern const struct SpritePalette gUnknown_0850BBC8[];
|
||||||
|
|
||||||
|
#endif //POKEEMERALD_DATA3_H
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
#include "rom4.h"
|
#include "rom4.h"
|
||||||
|
#include "data3.h"
|
||||||
#include "berry.h"
|
#include "berry.h"
|
||||||
#include "field_player_avatar.h"
|
#include "field_player_avatar.h"
|
||||||
#include "event_data.h"
|
#include "event_data.h"
|
||||||
@@ -39,6 +40,8 @@ static void RemoveFieldObjectIfOutsideView(struct MapObject *);
|
|||||||
static void sub_808E1B8(u8, s16, s16);
|
static void sub_808E1B8(u8, s16, s16);
|
||||||
static void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8);
|
static void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8);
|
||||||
/*static*/ void sub_808E38C(struct MapObject *);
|
/*static*/ void sub_808E38C(struct MapObject *);
|
||||||
|
/*static*/ void sub_808E8F4(const struct SpritePalette *);
|
||||||
|
/*static*/ u16 FindFieldObjectPaletteIndexByTag(u16);
|
||||||
|
|
||||||
// ROM data
|
// ROM data
|
||||||
|
|
||||||
@@ -1111,3 +1114,14 @@ void gpu_pal_allocator_reset__manage_upper_four(void)
|
|||||||
FreeAllSpritePalettes();
|
FreeAllSpritePalettes();
|
||||||
gReservedSpritePaletteCount = 12;
|
gReservedSpritePaletteCount = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sub_808E894(u16 paletteTag)
|
||||||
|
{
|
||||||
|
u16 paletteSlot;
|
||||||
|
|
||||||
|
paletteSlot = (u8)FindFieldObjectPaletteIndexByTag(paletteTag);
|
||||||
|
if (paletteSlot != 0x11ff) // always true
|
||||||
|
{
|
||||||
|
sub_808E8F4(&gUnknown_0850BBC8[paletteSlot]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user