Decompile more of easy_chat.c

This commit is contained in:
Marcus Huderle 2019-02-24 10:04:40 -06:00 committed by huderlem
parent 7995cf5b61
commit bb508ade64
3 changed files with 679 additions and 1918 deletions

File diff suppressed because it is too large Load Diff

View File

@ -443,7 +443,9 @@ gUnknown_08597E48:: @ 8597E48
spr_template 0x0002, 0x0002, gUnknown_08597E10, gUnknown_08597E28, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_08597E60:: @ 8597E60
.byte 0x10, 0x6f, 0xc4, 0x00, 0x10, 0x4e, 0x82, 0xa0, 0x10, 0x50, 0x86, 0xaa
.byte 0x10, 0x6f, 0xc4, 0x00
.byte 0x10, 0x4e, 0x82, 0xa0
.byte 0x10, 0x50, 0x86, 0xaa
.align 2
gUnknown_08597E6C:: @ 8597E6C

View File

@ -3,10 +3,12 @@
#include "global.h"
#include "alloc.h"
#include "bg.h"
#include "decompress.h"
#include "dewford_trend.h"
#include "dynamic_placeholder_text_util.h"
#include "easy_chat.h"
#include "event_data.h"
#include "event_object_movement.h"
#include "field_weather.h"
#include "gpu_regs.h"
#include "graphics.h"
@ -22,6 +24,7 @@
#include "task.h"
#include "text_window.h"
#include "window.h"
#include "constants/event_objects.h"
#include "constants/flags.h"
#include "constants/songs.h"
@ -82,20 +85,23 @@ struct Unk203A11C
u8 unk6;
u8 unk7;
s8 unk8;
u8 filler9[0x1];
u8 unk9;
u8 unkA;
u8 unkB[0xC1];
u8 unkCC[0x20C];
int unk2D8;
int unk2DC;
int unk2E0;
int unk2E4;
int unk2E8;
int unk2EC;
int unk2F0;
int unk2F4;
int unk2F8;
int unk2FC;
u8 unkCC[0x202];
u16 unk2CE;
int unk2D0;
int unk2D4;
struct Sprite *unk2D8;
struct Sprite *unk2DC;
struct Sprite *unk2E0;
struct Sprite *unk2E4;
struct Sprite *unk2E8;
struct Sprite *unk2EC;
struct Sprite *unk2F0;
struct Sprite *unk2F4;
struct Sprite *unk2F8;
struct Sprite *unk2FC;
u16 unk300[BG_SCREEN_SIZE / 2];
u16 unkB00[BG_SCREEN_SIZE / 2];
};
@ -202,12 +208,12 @@ static void sub_811CFCC(void);
static void sub_811D0BC(void);
static void sub_811D2C8(void);
static void sub_811D684(void);
void sub_811DE90(void);
void sub_811DEC4(void);
void sub_811DE5C(u8, u8, u8, u8);
void sub_811E5D4(void);
void sub_811E720(void);
void sub_811E828(void);
static void sub_811DE90(void);
static void sub_811DEC4(void);
static void sub_811DE5C(u8, u8, u8, u8);
static void sub_811E5D4(void);
static void sub_811E720(void);
static void sub_811E828(void);
static bool8 sub_811C2D4(void);
static bool8 sub_811C30C(void);
static bool8 sub_811C3E4(void);
@ -237,51 +243,56 @@ static bool8 sub_811CD94(void);
static bool8 sub_811CDD4(void);
static bool8 sub_811CE14(void);
static bool8 sub_811CE54(void);
void sub_811DF60(u8, u8);
int sub_811E920(int);
void sub_811DF90(void);
static void sub_811DF60(u8, u8);
static int sub_811E920(int);
static void sub_811DF90(void);
static void sub_811D104(u8);
static void sub_811D214(u8);
void sub_811DFB0(void);
static void sub_811DFB0(void);
static void sub_811D6D4(void);
static void sub_811D9CC(int);
void sub_811E3AC(void);
bool8 sub_811E418(void);
void sub_811DFC8(void);
void sub_811E6E0(int);
static void sub_811E3AC(void);
static bool8 sub_811E418(void);
static void sub_811DFC8(void);
static void sub_811E6E0(int);
static bool8 sub_811DAA4(void);
void sub_811E64C(void);
void sub_811E050(void);
void sub_811E4AC(void);
void sub_811E6B0(void);
void sub_811E55C(void);
bool8 sub_811E4D0(void);
bool8 sub_811E5B8(void);
void sub_811E578(void);
void sub_811E088(void);
void sub_811DDAC(s16, u8);
bool8 sub_811DE10(void);
static void sub_811E64C(void);
static void sub_811E050(void);
static void sub_811E4AC(void);
static void sub_811E6B0(void);
static void sub_811E55C(void);
static bool8 sub_811E4D0(void);
static bool8 sub_811E5B8(void);
static void sub_811E578(void);
static void sub_811E088(void);
static void sub_811DDAC(s16, u8);
static bool8 sub_811DE10(void);
static void sub_811D9B4(void);
static void sub_811D698(u32);
void sub_811E288(void);
void sub_811E794(void);
void sub_811E380(void);
void sub_811E7F8(void);
void sub_811E30C(void);
static void sub_811E288(void);
static void sub_811E794(void);
static void sub_811E380(void);
static void sub_811E7F8(void);
static void sub_811E30C(void);
static void sub_811D7A4(void);
static void sub_811D7C8(void);
int sub_811DE48(void);
static int sub_811DE48(void);
static void sub_811D7EC(void);
static void sub_811D830(void);
void sub_811D058(u8, u8, const u8 *, u8, u8, u8, u8, u8, u8);
void sub_811DD84(void);
static void sub_811DD84(void);
static void sub_811D6F4(void);
static void sub_811D758(void);
static void sub_811D794(void);
const u8 *sub_811F424(u8);
static void sub_811D864(u8, u8);
static void sub_811D950(u8, u8);
void sub_811DADC(u8);
static void sub_811DADC(u8);
static void sub_811DC28(int, int, int, int);
static void sub_811E0EC(s8, s8);
static void sub_811E1A4(s8, s8);
static void sub_811E2DC(struct Sprite *);
static void sub_811E34C(u8, u8);
u8 *CopyEasyChatWordPadded(u8 *, u16, u16);
extern const struct {
@ -304,6 +315,17 @@ extern const u16 gUnknown_08597C24[];
extern const struct WindowTemplate gUnknown_08597C84;
extern const u8 gUnknown_08597C8C[4];
extern const u8 *const gUnknown_08597C90[4];
extern const struct SpriteSheet gUnknown_08597CA0[];
extern const struct SpritePalette gUnknown_08597CC0[];
extern const struct CompressedSpriteSheet gUnknown_08597CE8[];
extern const struct SpriteTemplate gUnknown_08597D18;
extern const struct SpriteTemplate gUnknown_08597D68;
extern const struct SpriteTemplate gUnknown_08597DF0;
extern const struct SpriteTemplate gUnknown_08597DD0;
extern const struct SpriteTemplate gUnknown_08597E48;
extern const struct SpriteTemplate gUnknown_08597E30;
extern const u8 gUnknown_08597D08[];
extern const u8 gUnknown_08597E60[][4];
void sub_811A20C(u8 kind, u16 *words, MainCallback callback, u8 sizeParam)
{
@ -3228,16 +3250,16 @@ static bool8 sub_811CE94(void)
return FALSE;
gUnknown_0203A11C->unk0 = 0;
gUnknown_0203A11C->unk2D8 = 0;
gUnknown_0203A11C->unk2DC = 0;
gUnknown_0203A11C->unk2E0 = 0;
gUnknown_0203A11C->unk2E4 = 0;
gUnknown_0203A11C->unk2E8 = 0;
gUnknown_0203A11C->unk2EC = 0;
gUnknown_0203A11C->unk2F0 = 0;
gUnknown_0203A11C->unk2F4 = 0;
gUnknown_0203A11C->unk2F8 = 0;
gUnknown_0203A11C->unk2FC = 0;
gUnknown_0203A11C->unk2D8 = NULL;
gUnknown_0203A11C->unk2DC = NULL;
gUnknown_0203A11C->unk2E0 = NULL;
gUnknown_0203A11C->unk2E4 = NULL;
gUnknown_0203A11C->unk2E8 = NULL;
gUnknown_0203A11C->unk2EC = NULL;
gUnknown_0203A11C->unk2F0 = NULL;
gUnknown_0203A11C->unk2F4 = NULL;
gUnknown_0203A11C->unk2F8 = NULL;
gUnknown_0203A11C->unk2FC = NULL;
gUnknown_0203A11C->unkA = sub_811BC70();
return TRUE;
}
@ -3752,3 +3774,602 @@ static bool8 sub_811DAA4(void)
var1 = gUnknown_0203A11C->unk7;
return (var0 ^ var1) > 0;
}
static void sub_811DADC(u8 arg0)
{
FillBgTilemapBufferRect_Palette0(1, 0, 0, 10, 30, 10);
switch (arg0)
{
case 0:
break;
case 1:
sub_811DC28(11, 14, 3, 2);
break;
case 2:
sub_811DC28(9, 14, 7, 2);
break;
case 3:
sub_811DC28(7, 14, 11, 2);
break;
case 4:
sub_811DC28(5, 14, 15, 2);
break;
case 5:
sub_811DC28(3, 14, 19, 2);
break;
case 6:
sub_811DC28(1, 14, 23, 2);
break;
case 11:
sub_811DC28(1, 10, 24, 10);
break;
case 12:
sub_811DC28(1, 10, 25, 10);
break;
case 13:
sub_811DC28(1, 10, 26, 10);
break;
case 14:
sub_811DC28(1, 10, 27, 10);
break;
case 15:
sub_811DC28(1, 10, 28, 10);
break;
case 16:
sub_811DC28(1, 10, 29, 10);
break;
case 17:
sub_811DC28(0, 10, 30, 10);
break;
case 10:
case 18:
sub_811DC28(1, 10, 23, 10);
break;
case 9:
case 19:
sub_811DC28(1, 11, 23, 8);
break;
case 8:
case 20:
sub_811DC28(1, 12, 23, 6);
break;
case 7:
case 21:
sub_811DC28(1, 13, 23, 4);
break;
case 22:
sub_811DC28(1, 14, 23, 2);
break;
}
CopyBgTilemapBufferToVram(1);
}
static void sub_811DC28(int left, int top, int width, int height)
{
u16 *tilemap;
int right;
int bottom;
int x, y;
tilemap = gUnknown_0203A11C->unk300;
right = left + width - 1;
bottom = top + height - 1;
x = left;
y = top;
tilemap[y * 32 + x] = 0x4001;
x++;
for (; x < right; x++)
tilemap[y * 32 + x] = 0x4002;
tilemap[y * 32 + x] = 0x4003;
y++;
for (; y < bottom; y++)
{
tilemap[y * 32 + left] = 0x4005;
x = left + 1;
for (; x < right; x++)
tilemap[y * 32 + x] = 0x4000;
tilemap[y * 32 + x] = 0x4007;
}
tilemap[y * 32 + left] = 0x4009;
x = left + 1;
for (; x < right; x++)
tilemap[y * 32 + x] = 0x400A;
tilemap[y * 32 + x] = 0x400B;
sub_811DE5C((left + 1) * 8, (top + 1) * 8, (width - 2) * 8, (height - 2) * 8);
}
static void sub_811DD84(void)
{
ChangeBgY(2, 0x800, 0);
gUnknown_0203A11C->unk2CE = 0;
}
static void sub_811DDAC(s16 arg0, u8 arg1)
{
int bgY;
s16 var0;
bgY = GetBgY(2);
gUnknown_0203A11C->unk2CE += arg0;
var0 = arg0 * 16;
bgY += var0 << 8;
if (arg1)
{
gUnknown_0203A11C->unk2D0 = bgY;
gUnknown_0203A11C->unk2D4 = arg1 * 256;
if (var0 < 0)
gUnknown_0203A11C->unk2D4 = -gUnknown_0203A11C->unk2D4;
}
else
{
ChangeBgY(2, bgY, 0);
}
}
static bool8 sub_811DE10(void)
{
int bgY;
bgY = GetBgY(2);
if (bgY == gUnknown_0203A11C->unk2D0)
{
return FALSE;
}
else
{
ChangeBgY(2, gUnknown_0203A11C->unk2D4, 1);
return TRUE;
}
}
static int sub_811DE48(void)
{
return gUnknown_0203A11C->unk2CE;
}
static void sub_811DE5C(u8 left, u8 top, u8 width, u8 height)
{
u16 horizontalDimensions = WIN_RANGE(left, left + width);
u16 verticalDimensions = WIN_RANGE(top, top + height);
SetGpuReg(REG_OFFSET_WIN0H, horizontalDimensions);
SetGpuReg(REG_OFFSET_WIN0V, verticalDimensions);
}
static void sub_811DE90(void)
{
u32 i;
LoadSpriteSheets(gUnknown_08597CA0);
LoadSpritePalettes(gUnknown_08597CC0);
for (i = 0; i < 4; i++)
LoadCompressedSpriteSheet(&gUnknown_08597CE8[i]);
}
static void sub_811DEC4(void)
{
u8 var0 = sub_811BA68();
int x = gUnknown_08597C30[var0].unk0_0 * 8 + 13;
int y = gUnknown_08597C30[var0].unk0_5 * 8 + 8;
u8 spriteId = CreateSprite(&gUnknown_08597D18, x, y, 2);
gUnknown_0203A11C->unk2D8 = &gSprites[spriteId];
gSprites[spriteId].data[1] = 1;
}
void sub_811DF28(struct Sprite *sprite)
{
if (sprite->data[1])
{
if (++sprite->data[0] > 2)
{
sprite->data[0] = 0;
if (++sprite->pos2.x > 0)
sprite->pos2.x = -6;
}
}
}
static void sub_811DF60(u8 x, u8 y)
{
gUnknown_0203A11C->unk2D8->pos1.x = x;
gUnknown_0203A11C->unk2D8->pos1.y = y;
gUnknown_0203A11C->unk2D8->pos2.x = 0;
gUnknown_0203A11C->unk2D8->data[0] = 0;
}
static void sub_811DF90(void)
{
gUnknown_0203A11C->unk2D8->data[0] = 0;
gUnknown_0203A11C->unk2D8->data[1] = 0;
gUnknown_0203A11C->unk2D8->pos2.x = 0;
}
static void sub_811DFB0(void)
{
gUnknown_0203A11C->unk2D8->data[1] = 1;
}
static void sub_811DFC8(void)
{
u8 spriteId = CreateSprite(&gUnknown_08597D68, 0, 0, 3);
gUnknown_0203A11C->unk2DC = &gSprites[spriteId];
gUnknown_0203A11C->unk2DC->pos2.x = 32;
spriteId = CreateSprite(&gUnknown_08597D68, 0, 0, 3);
gUnknown_0203A11C->unk2E0 = &gSprites[spriteId];
gUnknown_0203A11C->unk2E0->pos2.x = -32;
gUnknown_0203A11C->unk2DC->hFlip = 1;
sub_811E088();
}
static void sub_811E050(void)
{
DestroySprite(gUnknown_0203A11C->unk2DC);
gUnknown_0203A11C->unk2DC = NULL;
DestroySprite(gUnknown_0203A11C->unk2E0);
gUnknown_0203A11C->unk2E0 = NULL;
}
static void sub_811E088(void)
{
u8 var0;
u8 var1;
if (gUnknown_0203A11C->unk2DC && gUnknown_0203A11C->unk2E0)
{
sub_811BB9C(&var0, &var1);
if (!sub_811BBB0())
sub_811E0EC(var0, var1);
else
sub_811E1A4(var0, var1);
}
}
static void sub_811E0EC(s8 arg0, s8 arg1)
{
if (arg0 != -1)
{
StartSpriteAnim(gUnknown_0203A11C->unk2DC, 0);
gUnknown_0203A11C->unk2DC->pos1.x = arg0 * 84 + 58;
gUnknown_0203A11C->unk2DC->pos1.y = arg1 * 16 + 96;
StartSpriteAnim(gUnknown_0203A11C->unk2E0, 0);
gUnknown_0203A11C->unk2E0->pos1.x = arg0 * 84 + 58;
gUnknown_0203A11C->unk2E0->pos1.y = arg1 * 16 + 96;
}
else
{
StartSpriteAnim(gUnknown_0203A11C->unk2DC, 1);
gUnknown_0203A11C->unk2DC->pos1.x = 216;
gUnknown_0203A11C->unk2DC->pos1.y = arg1 * 16 + 112;
StartSpriteAnim(gUnknown_0203A11C->unk2E0, 1);
gUnknown_0203A11C->unk2E0->pos1.x = 216;
gUnknown_0203A11C->unk2E0->pos1.y = arg1 * 16 + 112;
}
}
static void sub_811E1A4(s8 arg0, s8 arg1)
{
int anim;
int x, y;
if (arg0 != -1)
{
y = arg1 * 16 + 96;
x = 32;
if (arg0 == 6 && arg1 == 0)
{
x = 158;
anim = 2;
}
else
{
x += gUnknown_08597D08[(u8)arg0 < 7 ? arg0 : 0];
anim = 3;
}
StartSpriteAnim(gUnknown_0203A11C->unk2DC, anim);
gUnknown_0203A11C->unk2DC->pos1.x = x;
gUnknown_0203A11C->unk2DC->pos1.y = y;
StartSpriteAnim(gUnknown_0203A11C->unk2E0, anim);
gUnknown_0203A11C->unk2E0->pos1.x = x;
gUnknown_0203A11C->unk2E0->pos1.y = y;
}
else
{
StartSpriteAnim(gUnknown_0203A11C->unk2DC, 1);
gUnknown_0203A11C->unk2DC->pos1.x = 216;
gUnknown_0203A11C->unk2DC->pos1.y = arg1 * 16 + 112;
StartSpriteAnim(gUnknown_0203A11C->unk2E0, 1);
gUnknown_0203A11C->unk2E0->pos1.x = 216;
gUnknown_0203A11C->unk2E0->pos1.y = arg1 * 16 + 112;
}
}
static void sub_811E288(void)
{
u8 spriteId = CreateSprite(&gUnknown_08597D18, 0, 0, 4);
gUnknown_0203A11C->unk2E4 = &gSprites[spriteId];
gUnknown_0203A11C->unk2E4->callback = sub_811E2DC;
gUnknown_0203A11C->unk2E4->oam.priority = 2;
sub_811E30C();
}
static void sub_811E2DC(struct Sprite *sprite)
{
if (++sprite->data[0] > 2)
{
sprite->data[0] = 0;
if (++sprite->pos2.x > 0)
sprite->pos2.x = -6;
}
}
static void sub_811E30C(void)
{
s8 var0, var1, x, y;
sub_811BBC8(&var0, &var1);
x = var0 * 13;
x = x * 8 + 28;
y = var1 * 16 + 96;
sub_811E34C(x, y);
}
static void sub_811E34C(u8 x, u8 y)
{
if (gUnknown_0203A11C->unk2E4)
{
gUnknown_0203A11C->unk2E4->pos1.x = x;
gUnknown_0203A11C->unk2E4->pos1.y = y;
gUnknown_0203A11C->unk2E4->pos2.x = 0;
gUnknown_0203A11C->unk2E4->data[0] = 0;
}
}
static void sub_811E380(void)
{
if (gUnknown_0203A11C->unk2E4)
{
DestroySprite(gUnknown_0203A11C->unk2E4);
gUnknown_0203A11C->unk2E4 = NULL;
}
}
static void sub_811E3AC(void)
{
u8 spriteId = CreateSprite(&gUnknown_08597DF0, 208, 128, 6);
gUnknown_0203A11C->unk2E8 = &gSprites[spriteId];
gUnknown_0203A11C->unk2E8->pos2.x = -64;
spriteId = CreateSprite(&gUnknown_08597DD0, 208, 80, 5);
gUnknown_0203A11C->unk2EC = &gSprites[spriteId];
gUnknown_0203A11C->unk9 = 0;
}
static bool8 sub_811E418(void)
{
switch (gUnknown_0203A11C->unk9)
{
default:
return FALSE;
case 0:
gUnknown_0203A11C->unk2E8->pos2.x += 8;
if (gUnknown_0203A11C->unk2E8->pos2.x >= 0)
{
gUnknown_0203A11C->unk2E8->pos2.x = 0;
if (!sub_811BBB0())
StartSpriteAnim(gUnknown_0203A11C->unk2EC, 1);
else
StartSpriteAnim(gUnknown_0203A11C->unk2EC, 2);
gUnknown_0203A11C->unk9++;
}
break;
case 1:
if (gUnknown_0203A11C->unk2EC->animEnded)
{
gUnknown_0203A11C->unk9 = 2;
return FALSE;
}
}
return TRUE;
}
static void sub_811E4AC(void)
{
gUnknown_0203A11C->unk9 = 0;
StartSpriteAnim(gUnknown_0203A11C->unk2EC, 3);
}
static bool8 sub_811E4D0(void)
{
switch (gUnknown_0203A11C->unk9)
{
default:
return FALSE;
case 0:
if (gUnknown_0203A11C->unk2EC->animEnded)
gUnknown_0203A11C->unk9 = 1;
break;
case 1:
gUnknown_0203A11C->unk2E8->pos2.x -= 8;
if (gUnknown_0203A11C->unk2E8->pos2.x <= -64)
{
DestroySprite(gUnknown_0203A11C->unk2EC);
DestroySprite(gUnknown_0203A11C->unk2E8);
gUnknown_0203A11C->unk2EC = NULL;
gUnknown_0203A11C->unk2E8 = NULL;
gUnknown_0203A11C->unk9++;
return FALSE;
}
}
return TRUE;
}
static void sub_811E55C(void)
{
StartSpriteAnim(gUnknown_0203A11C->unk2EC, 4);
}
static void sub_811E578(void)
{
if (!sub_811BBB0())
StartSpriteAnim(gUnknown_0203A11C->unk2EC, 1);
else
StartSpriteAnim(gUnknown_0203A11C->unk2EC, 2);
}
static bool8 sub_811E5B8(void)
{
return !gUnknown_0203A11C->unk2EC->animEnded;
}
static void sub_811E5D4(void)
{
u8 spriteId = CreateSprite(&gUnknown_08597E48, 96, 80, 0);
if (spriteId != MAX_SPRITES)
gUnknown_0203A11C->unk2F0 = &gSprites[spriteId];
spriteId = CreateSprite(&gUnknown_08597E48, 96, 156, 0);
if (spriteId != MAX_SPRITES)
{
gUnknown_0203A11C->unk2F4 = &gSprites[spriteId];
gUnknown_0203A11C->unk2F4->vFlip = 1;
}
sub_811E6B0();
}
static void sub_811E64C(void)
{
gUnknown_0203A11C->unk2F0->invisible = !sub_811BBF8();
gUnknown_0203A11C->unk2F4->invisible = !sub_811BC2C();
}
static void sub_811E6B0(void)
{
gUnknown_0203A11C->unk2F0->invisible = 1;
gUnknown_0203A11C->unk2F4->invisible = 1;
}
static void sub_811E6E0(int arg0)
{
if (!arg0)
{
gUnknown_0203A11C->unk2F0->pos1.x = 96;
gUnknown_0203A11C->unk2F4->pos1.x = 96;
}
else
{
gUnknown_0203A11C->unk2F0->pos1.x = 120;
gUnknown_0203A11C->unk2F4->pos1.x = 120;
}
}
static void sub_811E720(void)
{
u8 spriteId = CreateSprite(&gUnknown_08597E30, 220, 84, 1);
if (spriteId != MAX_SPRITES)
gUnknown_0203A11C->unk2F8 = &gSprites[spriteId];
spriteId = CreateSprite(&gUnknown_08597E30, 220, 156, 1);
if (spriteId != MAX_SPRITES)
{
gUnknown_0203A11C->unk2FC = &gSprites[spriteId];
StartSpriteAnim(gUnknown_0203A11C->unk2FC, 1);
}
sub_811E7F8();
}
static void sub_811E794(void)
{
gUnknown_0203A11C->unk2F8->invisible = !sub_811BBF8();
gUnknown_0203A11C->unk2FC->invisible = !sub_811BC2C();
}
static void sub_811E7F8(void)
{
gUnknown_0203A11C->unk2F8->invisible = 1;
gUnknown_0203A11C->unk2FC->invisible = 1;
}
static void sub_811E828(void)
{
int graphicsId;
u8 spriteId;
switch (sub_811BCBC())
{
case 0:
graphicsId = EVENT_OBJ_GFX_REPORTER_M;
break;
case 1:
graphicsId = EVENT_OBJ_GFX_REPORTER_F;
break;
case 2:
graphicsId = EVENT_OBJ_GFX_BOY_1;
break;
default:
return;
}
if (sub_811BA68() != 4)
return;
spriteId = AddPseudoEventObject(graphicsId, SpriteCallbackDummy, 76, 40, 0);
if (spriteId != MAX_SPRITES)
{
gSprites[spriteId].oam.priority = 0;
StartSpriteAnim(&gSprites[spriteId], 2);
}
spriteId = AddPseudoEventObject(
gSaveBlock2Ptr->playerGender == MALE ? EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL : EVENT_OBJ_GFX_RIVAL_MAY_NORMAL,
SpriteCallbackDummy,
52,
40,
0);
if (spriteId != MAX_SPRITES)
{
gSprites[spriteId].oam.priority = 0;
StartSpriteAnim(&gSprites[spriteId], 3);
}
}
int sub_811E8E4(void)
{
u8 var0 = sub_811BA68();
switch (gUnknown_08597C30[var0].unk3)
{
case 1:
return 1;
case 2:
return 2;
case 0:
return 0;
default:
return 3;
}
}
static int sub_811E920(int arg0)
{
int var0 = sub_811E8E4();
if (var0 < 3)
return gUnknown_08597E60[var0][arg0] + 4;
else
return 0;
}