Skeli789 / Complete-Fire-Red-Upgrade

A complete upgrade for FireRed, including an upgraded Battle Engine.
576 stars 264 forks source link

PRE-BATTLE MUG #93

Open eMMe97 opened 2 years ago

eMMe97 commented 2 years ago

In the first routine the checks doesn't work. If the third byte is not 0x0, it will not "pretend" to be champion class and load as if it was a champion battle. I know a little about asm and have tried this change to your routine

.thumb .align 2

main: ldrb r5, [r4, #0x3] lsl r5, r5, #0x18 lsr r5, r5, #0x18 cmp r5, #0x0 bne normale mov r1, #0x28 mov r3, r1 mul r3, r2, r3 ldr r2, =(0x800fc00) ldr r5, =(0x09b4c18c+1) bx r5

normale: ldr r5, =(0x9b4c1f0+1) bx r5

.align 2

With this modification the function works perfectly.

SWHSmash commented 2 years ago

Can't confirm this now, but when this works flawless, maybe you can also create a pull request for this issue. :)