View Single Post
Old July 1st, 2010 (6:31 PM).
Diegoisawesome's Avatar
Diegoisawesome Diegoisawesome is offline
Oh god the bees
  • Silver Tier
Join Date: Dec 2007
Location: :noitacoL
Age: 20
Gender: Male
Nature: Naive
Posts: 1,039
Originally Posted by shiny quagsire View Post
I'm using JPAN's hacked engine, and I was wondering how I could turn his random water battle, to use the tree data? Here is the code he made:
.align 2

/*Special 0x98 will start a random water battle, such as those in the sea.
Sister to the previous function, will start a water battle anywhere there is 
a water pokemon data.*/

Special_98: push {r4-r7, lr}
        mov r7, r8
        push {r7}
        sub SP, SP, #0x8
        ldr r0, water_data
        lsl r4, r0, #0x18
        lsr r4, r4, #0x18
        ldr r1, wild_generator2
        bx r1
.hword 0x0000
water_data: .word 0x22000410 /*the lake tile data*/
wild_generator2: .word 0x0806cbe5
Actually, you don't need to do that. there's already a built-in special for that, although I don't know what it is.
If you find it, please tell me, and I'll try to get it into my scripting tutorial.

My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
The Secret Sauce: Triple-Layer Tiles
Reply With Quote