Random Process, gives a number between 0-7fff

From Final Fantasy Hacktics Wiki
Revision as of 04:54, 17 February 2012 by Choto (talk | contribs) (Created page with " Random Process (gives a number between 0-7FFF) 0018eea0: 3c028019 lui r2,0x8019 0018eea4: 8c42f5fc lw r2,-0x0a04(r2) Load ? (maybe dealing with displayed damage?) 0018eea...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Random Process (gives a number between 0-7FFF)
0018eea0: 3c028019 lui r2,0x8019
0018eea4: 8c42f5fc lw r2,-0x0a04(r2)		Load ? (maybe dealing with displayed damage?)
0018eea8: 27bdffe8 addiu r29,r29,0xffe8
0018eeac: 14400005 bne r2,r0,0x0018eec4		Branch if only displaying damage (not actually attacking)
0018eeb0: afbf0010 sw r31,0x0010(r29)
0018eeb4: 0c0088c3 jal 0x0002230c		? (gives a result of 0-7FFF?)
0018eeb8: 00000000 nop
0018eebc: 08063bb2 j 0x0018eec8
0018eec0: 00000000 nop
0018eec4: 34024000 ori r2,r0,0x4000		Random = 4000 (for displayed damage, to show "average")
0018eec8: 8fbf0010 lw r31,0x0010(r29)
0018eecc: 27bd0018 addiu r29,r29,0x0018
0018eed0: 03e00008 jr r31
0018eed4: 00000000 nop