Modular lord split option
EA Installer: https://www.dropbox.com/s/3n9evh5tag0v2sn/MLS.rar?dl=0
How to use:
First off, you need to set the value of slot 0x9 to be a pointer to the data of the load split options:
SVAL 0x9 (SplitData+0x08000000)
then call the lord split asmc:
ASMC 0x864CD
What to put in SplitData:
SplitData:
BYTE 6 5 18 0 // first byte is x position, then y, then width, then height(height doesnt matter.)
WORD 1 //iirc, box mode?
POIN MenuTable //important part, we’re gonna get to it later
WORD 0 0 0 0 0 0 // routines to handle r/b presses
What to put in MenuTable:
#define MenuCommand(apsString, aprUsability, aprEffect) “POIN (apsString); WORD 0 0; POIN (aprUsability); WORD 0; POIN (aprEffect); WORD 0 0 0”
#define MenuCommandEnd “WORD 0 0 0 0 0 0 0 0 0”
MenuTable:
MenuCommand(PointerToString, UsabilityAsm+1, EffectAsm+1)
//add as many as you want
MenuCommandEnd
PointerToString: Points to a string of text that will be the name of the command. example:
PointerToString:
String(Go with ephraim to bad boat maps)
BYTE 0 // ends the text
UsabilityAsm: runs the asm pointed to here, if it returns true, the option will show, else it wont. 0x04F448 will always show the option.
EffectAsm: asm that will be ran when you choose the option.
Alright, I think that’s it. please tell me if i forgot anything.
How it works:
ORG 0x0864FC
BL(GetSplitOffset)
I ORG’d at the part of the lord split routine that loads the pointer to the route split option, and replaced that with a call to my function which loads the pointer in slot 0x9:
.thumb
.org 0x00
ldr r0, Slot9
ldr r0, [r0]
mov r1, r4
bx lr
.align 2, 0
Slot9:
.long 0x030004DC
It wasn’t really hard to make, but i thought it’d be nice if i shared it with you guys.