Everything I make is always F2U & F2E, whether it’s included here or not.
Portraits
I used Blade’s skin & hair colours and Lenh & Obsidian Daddy’s blinking FE6 frames for pretty much everything here.
OCs
Splices I made for (mostly dead) hacks.
Alts
Alternative versions of some portraits from the section above.
→
→
→
→
CCC
Splices based on FE characters made for the CCC. The earlier ones were my first splices ever.
Music
Everything here was modified from midis ripped from other games using VGMTrans/FEBuilder. I know nothing about music theory.
All .s files are available here!
The older ones (aka the Apollo Justice tracks) were made for FEBuilder’s version of NIMAP2 and might not work properly with buildfiles from my testing (and I’m too lazy to fix it now).
Ace Attorney Investigations: Miles Edgeworth - Shi-Long Lang ~ Speak Up, Pup!
Ace Attorney Investigations: Miles Edgeworth - Kay Faraday ~ The Great Truth Burglar
Ace Attorney Investigations: Miles Edgeworth - Calisto Yew ~ Let Me Laugh at the Cool
Ace Attorney Investigations: Miles Edgeworth - Solution! ~ Splendid Deduction
Ace Attorney Investigations: Miles Edgeworth - Pursuit ~ Lying Coldly
Ace Attorney Investigations: Miles Edgeworth - ‘‘Turnabout Airlines’’ (intro)
Ace Attorney Investigations: Miles Edgeworth - Yatagarasu ~ The Gentleman Thief Who Dances in the Black Night
Ace Attorney Investigations: Miles Edgeworth - Logic ~ The Way to the Truth
Ace Attorney Investigations: Miles Edgeworth - Crisis of Fate
Apollo Justice: Ace Attorney - Detention Center ~ Tragicomical Meeting
Apollo Justice: Ace Attorney - Confess the Truth 2007
Phoenix Wright: Ace Attorney - Trials and Tribulations - Courtroom Lounge ~ Unending Prelude
FE7 - What Comes from Darkness
C
Most of the stuff I make is extremely specific to my hacks, but here is some stuff which could be useful outside of them as well.
Dynamic Choice Menu ASMC
(this example uses additional custom events to convert the unit’s inventory into choices, but that’s the intended use of this ASMC anyway)
This command displays a choice menu using the text entries stored in slots s1-s7, as a 0 terminated list (if none of the slots are 0, it will display all 7). It returns the index of the selected choice in slot C, with the first option being index 1.
Ideally, you’d write additional custom ASMCs to store the relevant text entries in memory slots, as showcased in the example gif. However, it could also be useful if you want to display a bunch of different choice menus without creating a new table for each one.
Lastly, the included defines also fade in the screen & prevent skipping before calling the function to prevent errors.
.c
// This implementation is cursed. You have been warned.
#include "../Shared/Global.h"
#include "event.h"
#include "bmusailment.h"
#include "soundwrapper.h"
#include "bm.h"
#include "global.h"
#include "event.h"
#include "eventinfo.h"
#include "EAstdlib.h"
#include "uimenu.h"
#include "fontgrp.h"
#include "hardware.h"
#include "uiutils.h"
#include "bmitem.h"
#include "bmbattle.h"
#define SplitMenuMenuItemEntry(index) \
{\
.name = (const char *)0x8205958,\
.nameMsgId = 0xC15, /* Go with Eirika to Rausten. */\
.overrideId = 0,\
.color = TEXT_COLOR_SYSTEM_WHITE,\
.isAvailable = MenuAlwaysEnabled,\
.onDraw = SplitMenuDrawItem,\
.onSelected = SplitMenuReturn##index,\
}
#define MAX_SPLIT_MENU_OPTIONS 7
extern struct ProcCmd sProc_Menu[];
extern struct ProcCmd sProc_MenuItem[];
static int SplitMenuDrawItem(struct MenuProc* menu, struct MenuItemProc* menu_item);
// Make sure to add more such functions & extend SplitMenuMenuItemDefs when increasing MAX_SPLIT_MENU_OPTIONS!
static u8 SplitMenuReturn1(struct MenuProc* menu, struct MenuItemProc* menu_item) { SetEventSlotC(0x1); return MENU_ACT_CLEAR | MENU_ACT_SND6A | MENU_ACT_END | MENU_ACT_SKIPCURSOR; }
static u8 SplitMenuReturn2(struct MenuProc* menu, struct MenuItemProc* menu_item) { SetEventSlotC(0x2); return MENU_ACT_CLEAR | MENU_ACT_SND6A | MENU_ACT_END | MENU_ACT_SKIPCURSOR; }
static u8 SplitMenuReturn3(struct MenuProc* menu, struct MenuItemProc* menu_item) { SetEventSlotC(0x3); return MENU_ACT_CLEAR | MENU_ACT_SND6A | MENU_ACT_END | MENU_ACT_SKIPCURSOR; }
static u8 SplitMenuReturn4(struct MenuProc* menu, struct MenuItemProc* menu_item) { SetEventSlotC(0x4); return MENU_ACT_CLEAR | MENU_ACT_SND6A | MENU_ACT_END | MENU_ACT_SKIPCURSOR; }
static u8 SplitMenuReturn5(struct MenuProc* menu, struct MenuItemProc* menu_item) { SetEventSlotC(0x5); return MENU_ACT_CLEAR | MENU_ACT_SND6A | MENU_ACT_END | MENU_ACT_SKIPCURSOR; }
static u8 SplitMenuReturn6(struct MenuProc* menu, struct MenuItemProc* menu_item) { SetEventSlotC(0x6); return MENU_ACT_CLEAR | MENU_ACT_SND6A | MENU_ACT_END | MENU_ACT_SKIPCURSOR; }
static u8 SplitMenuReturn7(struct MenuProc* menu, struct MenuItemProc* menu_item) { SetEventSlotC(0x7); return MENU_ACT_CLEAR | MENU_ACT_SND6A | MENU_ACT_END | MENU_ACT_SKIPCURSOR; }
const struct MenuItemDef SplitMenuMenuItemDefs[MAX_SPLIT_MENU_OPTIONS + 1][MAX_SPLIT_MENU_OPTIONS + 1] =
{
{
// Do not use!!!
{ 0 }
},
{
SplitMenuMenuItemEntry(1),
{ 0 }
},
{
SplitMenuMenuItemEntry(1),
SplitMenuMenuItemEntry(2),
{ 0 }
},
{
SplitMenuMenuItemEntry(1),
SplitMenuMenuItemEntry(2),
SplitMenuMenuItemEntry(3),
{ 0 }
},
{
SplitMenuMenuItemEntry(1),
SplitMenuMenuItemEntry(2),
SplitMenuMenuItemEntry(3),
SplitMenuMenuItemEntry(4),
{ 0 }
},
{
SplitMenuMenuItemEntry(1),
SplitMenuMenuItemEntry(2),
SplitMenuMenuItemEntry(3),
SplitMenuMenuItemEntry(4),
SplitMenuMenuItemEntry(5),
{ 0 }
},
{
SplitMenuMenuItemEntry(1),
SplitMenuMenuItemEntry(2),
SplitMenuMenuItemEntry(3),
SplitMenuMenuItemEntry(4),
SplitMenuMenuItemEntry(5),
SplitMenuMenuItemEntry(6),
{ 0 }
},
{
SplitMenuMenuItemEntry(1),
SplitMenuMenuItemEntry(2),
SplitMenuMenuItemEntry(3),
SplitMenuMenuItemEntry(4),
SplitMenuMenuItemEntry(5),
SplitMenuMenuItemEntry(6),
SplitMenuMenuItemEntry(7),
{ 0 }
}
};
const struct MenuDef SplitMenuMenuDefs[MAX_SPLIT_MENU_OPTIONS + 1] =
{
{
.rect = {6, 9, 18, 0},
.style = 1,
.menuItems = SplitMenuMenuItemDefs[0],
},
{
.rect = {6, 8, 18, 0},
.style = 1,
.menuItems = SplitMenuMenuItemDefs[1],
},
{
.rect = {6, 7, 18, 0},
.style = 1,
.menuItems = SplitMenuMenuItemDefs[2],
},
{
.rect = {6, 6, 18, 0},
.style = 1,
.menuItems = SplitMenuMenuItemDefs[3],
},
{
.rect = {6, 5, 18, 0},
.style = 1,
.menuItems = SplitMenuMenuItemDefs[4],
},
{
.rect = {6, 4, 18, 0},
.style = 1,
.menuItems = SplitMenuMenuItemDefs[5],
},
{
.rect = {6, 3, 18, 0},
.style = 1,
.menuItems = SplitMenuMenuItemDefs[6],
},
{
.rect = {6, 2, 18, 0},
.style = 1,
.menuItems = SplitMenuMenuItemDefs[7],
}
};
static int SplitMenuDrawItem(struct MenuProc* menu, struct MenuItemProc* menu_item)
{
const char *str = GetStringFromIndex((int)(menu_item->proc_name));
Text_SetParams(&menu_item->text, 0, TEXT_COLOR_SYSTEM_WHITE);
Text_DrawString(&menu_item->text, str);
PutText(
&menu_item->text,
TILEMAP_LOCATED(gBG0TilemapBuffer, menu_item->xTile + 1, menu_item->yTile)
);
ResetText();
return 0;
}
void ShowSplitMenuEventInternal(struct EventEngineProc * proc)
{
int options[MAX_SPLIT_MENU_OPTIONS];
int i = 0, count = 0;
for (i = 0; i < MAX_SPLIT_MENU_OPTIONS && (options[i] = gEventSlots[i + 1]) != 0; i++);
count = i;
ClearBg0Bg1();
SetDispEnable(1, 1, 1, 1, 1);
SetTextFont(0);
InitSystemTextFont();
LoadUiFrameGraphics();
struct MenuProc* menuProc = StartMenu(&SplitMenuMenuDefs[count], proc);
for (i = 0; i < count; i++)
{
menuProc->menuItems[i]->proc_name = (void*)options[i];
}
}
.lyn.event
ALIGN 4
PUSH
ORG CURRENTOFFSET+$115;ShowSplitMenuEventInternal:
POP
WORD $2007B510 $F0004B03 $2017F8EF $BC02BC10 $46C04708 $800D1F9 $2006B510 $F0004B03 $2017F8E3 $BC02BC10 $46C04708 $800D1F9 $2005B510 $F0004B03 $2017F8D7 $BC02BC10 $46C04708 $800D1F9 $2004B510 $F0004B03 $2017F8CB $BC02BC10 $46C04708 $800D1F9 $2003B510 $F0004B03 $2017F8BF $BC02BC10 $46C04708 $800D1F9 $2002B510 $F0004B03 $2017F8B3 $BC02BC10 $46C04708 $800D1F9 $2001B510 $F0004B03 $2017F8A7 $BC02BC10 $46C04708 $800D1F9 $CB570 $4B136908 $F89AF000 $60025 $22003534 $21000028 $F0004B0F $31F891 $4B0E0028 $F88CF000 $5EE1232C $5EA3222A $33010149 $4B0A18C9 $280049 $4B0918C9 $F87EF000 $F0004B08 $2000F87B $BC02BC70 $46C04708 $800A241 $8003E69 $8004005 $2022CA8 $8003E71 $8003C95 $46C6B5F0 $B088B500 $4680AD01 $2300002E $1F4927 $9C3301 $C604590A $D0262A00 $D1F62B07 $F0004B23 $211FF855 $78534A22 $430B438B $70532000 $F0004B20 $4B20F84B $F848F000 $F0004B1F $4641F845 $4B1F481E $F840F000 $6B431904 $3004CD04 $42A0611A $B008D1F9 $46B8BC80 $BC01BCF0 $4B114700 $F830F000 $4A10211F $438B7853 $7053430B $4B0E2000 $F826F000 $F0004B0D $4B0DF823 $F820F000 $4B0E00F8 $8019C0 $464118C0 $F0004B0A $BCF817 $D1D32F00 $46C0E7D9 $30004B8 $804E885 $3003080 $8003D39 $80043A9 $804EB69
POIN CURRENTOFFSET+268
WORD $804EBC9
POIN CURRENTOFFSET+8
WORD $46C04718
ALIGN 4
PUSH
ORG CURRENTOFFSET+$0;SplitMenuMenuDefs:
ORG CURRENTOFFSET+$120;SplitMenuMenuItemDefs:
POP
WORD $120906 $1
POIN CURRENTOFFSET+280
WORD $0 $0 $0 $0 $0 $0 $120806 $1
POIN CURRENTOFFSET+532
WORD $0 $0 $0 $0 $0 $0 $120706 $1
POIN CURRENTOFFSET+784
WORD $0 $0 $0 $0 $0 $0 $120606 $1
POIN CURRENTOFFSET+1036
WORD $0 $0 $0 $0 $0 $0 $120506 $1
POIN CURRENTOFFSET+1288
WORD $0 $0 $0 $0 $0 $0 $120406 $1
POIN CURRENTOFFSET+1540
WORD $0 $0 $0 $0 $0 $0 $120306 $1
POIN CURRENTOFFSET+1792
WORD $0 $0 $0 $0 $0 $0 $120206 $1
POIN CURRENTOFFSET+2044
WORD $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-915
POIN CURRENTOFFSET-943
WORD $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-1203
POIN CURRENTOFFSET-1231
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-1239
POIN CURRENTOFFSET-1291
WORD $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-1491
POIN CURRENTOFFSET-1519
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-1527
POIN CURRENTOFFSET-1579
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-1563
POIN CURRENTOFFSET-1639
WORD $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-1779
POIN CURRENTOFFSET-1807
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-1815
POIN CURRENTOFFSET-1867
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-1851
POIN CURRENTOFFSET-1927
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-1887
POIN CURRENTOFFSET-1987
WORD $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2067
POIN CURRENTOFFSET-2095
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2103
POIN CURRENTOFFSET-2155
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2139
POIN CURRENTOFFSET-2215
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2175
POIN CURRENTOFFSET-2275
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2211
POIN CURRENTOFFSET-2335
WORD $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2355
POIN CURRENTOFFSET-2383
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2391
POIN CURRENTOFFSET-2443
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2427
POIN CURRENTOFFSET-2503
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2463
POIN CURRENTOFFSET-2563
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2499
POIN CURRENTOFFSET-2623
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2535
POIN CURRENTOFFSET-2683
WORD $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2643
POIN CURRENTOFFSET-2671
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2679
POIN CURRENTOFFSET-2731
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2715
POIN CURRENTOFFSET-2791
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2751
POIN CURRENTOFFSET-2851
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2787
POIN CURRENTOFFSET-2911
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2823
POIN CURRENTOFFSET-2971
WORD $0 $0 $0 $8205958 $C15 $0 $804F449
POIN CURRENTOFFSET-2859
POIN CURRENTOFFSET-3031
WORD $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0
Defines
// Params: s1-s7, representing text IDs, terminated by 0.
#define ShowSplitMenuEvent "EVBIT_MODIFY 3; FADU 255; ASMC ShowSplitMenuEventInternal; EVBIT_MODIFY 0;"
#define ShowSplitMenuEvent1Option(Option1) "EVBIT_MODIFY 3; FADU 255; SVAL 1 Option1; SVAL 2 0 ; ASMC ShowSplitMenuEventInternal; EVBIT_MODIFY 0;"
#define ShowSplitMenuEvent2Options(Option1, Option2) "EVBIT_MODIFY 3; FADU 255; SVAL 1 Option1; SVAL 2 Option2; SVAL 3 0 ; ASMC ShowSplitMenuEventInternal; EVBIT_MODIFY 0;"
#define ShowSplitMenuEvent3Options(Option1, Option2, Option3) "EVBIT_MODIFY 3; FADU 255; SVAL 1 Option1; SVAL 2 Option2; SVAL 3 Option3; SVAL 4 0 ; ASMC ShowSplitMenuEventInternal; EVBIT_MODIFY 0;"
#define ShowSplitMenuEvent4Options(Option1, Option2, Option3, Option4) "EVBIT_MODIFY 3; FADU 255; SVAL 1 Option1; SVAL 2 Option2; SVAL 3 Option3; SVAL 4 Option4; SVAL 5 0 ; ASMC ShowSplitMenuEventInternal; EVBIT_MODIFY 0;"
#define ShowSplitMenuEvent5Options(Option1, Option2, Option3, Option4, Option5) "EVBIT_MODIFY 3; FADU 255; SVAL 1 Option1; SVAL 2 Option2; SVAL 3 Option3; SVAL 4 Option4; SVAL 5 Option5; SVAL 6 0 ; ASMC ShowSplitMenuEventInternal; EVBIT_MODIFY 0;"
#define ShowSplitMenuEvent6Options(Option1, Option2, Option3, Option4, Option5, Option6) "EVBIT_MODIFY 3; FADU 255; SVAL 1 Option1; SVAL 2 Option2; SVAL 3 Option3; SVAL 4 Option4; SVAL 5 Option5; SVAL 6 Option6; SVAL 7 0 ; ASMC ShowSplitMenuEventInternal; EVBIT_MODIFY 0;"
#define ShowSplitMenuEvent7Options(Option1, Option2, Option3, Option4, Option5, Option6, Option7) "EVBIT_MODIFY 3; FADU 255; SVAL 1 Option1; SVAL 2 Option2; SVAL 3 Option3; SVAL 4 Option4; SVAL 5 Option5; SVAL 6 Option6; SVAL 7 Option7; ASMC ShowSplitMenuEventInternal; EVBIT_MODIFY 0;"
Expand CG text box
Turns this:
Into this:
.c
void sub_800E290(struct EventEngineProc * proc, u16 stringIndex, u32 flags)
{
flags |= 0x0400;
if (proc->evStateBits & EV_STATE_0020)
flags |= 0x0040;
if (proc->evStateBits & EV_STATE_0040)
flags |= 0x2000 | 0x0800 | 0x0020;
SetWinEnable(FALSE, FALSE, FALSE);
LoadObjUIGfx();
InitTalk(0x80, 0, 1);
BG_EnableSyncByMask(BG0_SYNC_BIT);
StartCgText(
0, 0x12, 0x1A, 4, stringIndex, OBJ_VRAM0 + 0x1000, -1,
NULL // parent proc
);
SetCgTextFlags(flags);
}
.lyn.event
PUSH
ORG $e290
ALIGN 4
WORD $46C04778 $E59FC000 $E12FFF1C
POIN sub_800E290
POP
ALIGN 4
PUSH
ORG CURRENTOFFSET+$1;sub_800E290:
POP
WORD $8F83B530 $14000D $69AB085 $2280D42E $431400D2 $D501065B $431C4B16 $4A16231F $400B7851 $4B157053 $F834F000 $21002201 $4B132080 $F82EF000 $4B122001 $F82AF000 $93032300 $93023B01 $221A4B0F $93012112 $23049500 $4D0D2000 $F81DF000 $4B0C0020 $F818F000 $BC30B005 $4700BC01 $D22288 $E7CF4314 $2820 $3003080 $8015681 $800680D $8001FAD $6011000 $808F129 $808E9D9 $47284718
Check if unit has item with durability ASMC
Title. Pretty useless for most hacks, but can be useful alongside durability-based items. Also includes a version which doesn’t check durability for convenience.
.c
void HasItem(void)
{
struct Unit* unit = GetUnitFromCharId(gEventSlots[1] & 0xFF);
int item = gEventSlots[2] & 0xFF;
int i = 0;
int result = 0;
for (i = 0; i < 5; i++)
{
if ((unit->items[i] & 0xFF) == item)
{
result = 1;
break;
}
}
gEventSlots[0xC] = result;
}
void HasItemWithDurability(void)
{
struct Unit* unit = GetUnitFromCharId(gEventSlots[1] & 0xFF);
int item = gEventSlots[2] & 0xFFFF;
int i = 0;
int result = 0;
for (i = 0; i < 5; i++)
{
if ((unit->items[i] & 0xFFFF) == item)
{
result = 1;
break;
}
}
gEventSlots[0xC] = result;
}
.lyn.event
ALIGN 4
PUSH
ORG CURRENTOFFSET+$1;HasItem:
ORG CURRENTOFFSET+$3c;HasItemWithDurability:
POP
WORD $4C0CB570 $79204B0C $F834F000 $21FF0003 $331E7A25 $881A3028 $42AA400A $3302D007 $D1F84283 $63232300 $BC01BC70 $23014700 $46C0E7F9 $30004B8 $801829D $4C0BB510 $79204B0B $F816F000 $89210003 $3028331E $428A881A $3302D007 $D1F94283 $63232300 $BC01BC10 $23014700 $46C0E7F9 $30004B8 $801829D $46C04718
Defines
#define HasItemCheck(Unit, Item) "SVAL 1 Unit; SVAL 2 Item; ASMC HasItem"
#define HasItemWithDurabilityCheck(Unit, Item) "SVAL 1 Unit; SVAL 2 Item; ASMC HasItemWithDurability"