Froosty

The_Learner

Age 21
Male
Somewhere in this world.
Seen June 29th, 2019
Posted May 26th, 2018
543 posts
4.9 Years
DIFFERENT PALS FOR THE MALE AND FEMALE BAG [FR]
Thanks to KDS for helping me fix the error. :)
Insert this code:
Spoiler:

/* at 108340 put 00 48 00 47 (insert loc of this routine +1) */

.text
.align 2
.thumb

main:
ldr r0, =(0x0300500C)
ldr r0, [r0]
ldrb r0, [r0, #0x8]
cmp r0, #0x0
bne female
ldr r0, male_pal
b pal_load_maybe

female:
ldr r0, female_pal
b pal_load_maybe

pal_load_maybe:
ldr r1, handling_something
bl call_via_r1
ldr r1, return_loc
bx r1

call_via_r1:
bx r1

.align 2
male_pal: .word 0x08XXXXXX
female_pal: .word 0x08YYYYYY
handling_something: .word 0x0800ec28|1
return_loc: .word 0x08108352|1

XXXXXX is the pointer to AA AA AA 08 64 00
YYYYYY is the pointer to BB BB BB 08 64 00

where,
AA AA AA 08 is pointer to compressed male bag pallete
BB BB BB 08 is pointer to compressed female bag pallete


example:
Spoiler:
I insreted compressed pals at 900000 and 900030 and the routine at 800000,
so have a look at my rom data.

NOTE: you dont need to leave spaces between bytes, I did that just to make it easier to understand