End of Turn

From Final Fantasy Hacktics Wiki
Revision as of 22:50, 17 February 2012 by Choto (talk | contribs) (Created page with " End of Turn 00183c6c: 000410c0 sll r2,r4,0x03 r2 = r4* 8? 00183c70: 00441023 subu r2,r2,r4 r2 = r2 - r4 00183c74: 00021180 sll r2,r2,0x06 r2 * 00183c78: 3c038019 lui ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
End of Turn
00183c6c: 000410c0 sll r2,r4,0x03		r2 = r4* 8?
00183c70: 00441023 subu r2,r2,r4		r2 = r2 - r4
00183c74: 00021180 sll r2,r2,0x06		r2 * 
00183c78: 3c038019 lui r3,0x8019		
00183c7c: 246308cc addiu r3,r3,0x08cc		Unit Data pointer?
00183c80: 00433821 addu r7,r2,r3		r7=unit data pointer
00183c84: 3c018019 lui r1,0x8019		
00183c88: 00220821 addu r1,r1,r2
00183c8c: 902308cd lbu r3,0x08cd(r1)		?
00183c90: 340200ff ori r2,r0,0x00ff		r2 = ff
00183c94: 1062001c beq r3,r2,0x00183d08		skip routine if equal
00183c98: 34020001 ori r2,r0,0x0001		r2 = 01
00183c9c: 90e20186 lbu r2,0x0186(r7)		Load Characters turn
00183ca0: 00000000 nop
00183ca4: 10400018 beq r2,r0,0x00183d08		Skip routine if turn over
00183ca8: 34020001 ori r2,r0,0x0001
00183cac: 90e60039 lbu r6,0x0039(r7)		Load CT?
00183cb0: 90e3005c lbu r3,0x005c(r7)		load status
00183cb4: 90e50187 lbu r5,0x0187(r7)		Load movement taken
00183cb8: 90e40188 lbu r4,0x0188(r7)		Load action taken
00183cbc: 30620008 andi r2,r3,0x0008		Don't move check
00183cc0: 00a22825 or r5,r5,r2			r5 = 1 if no movement allowed
00183cc4: 30630004 andi r3,r3,0x0004		r3 = 1 if don't act status
00183cc8: 90e20058 lbu r2,0x0058(r7)		load performing check?
00183ccc: 00641825 or r3,r3,r4			r3 = 1 if don't act or action taken
00183cd0: 30420001 andi r2,r2,0x0001		r2 = 1 if performing?
00183cd4: 14a00002 bne r5,r0,0x00183ce0		branch if movement taken?
00183cd8: 00621825 or r3,r3,r2			r3 = 1 if don't act, action taken, or performing
00183cdc: 24c60014 addiu r6,r6,0x0014		Award 20 CT?
00183ce0: 14600003 bne r3,r0,0x00183cf0		Branch if action taken?
00183ce4: 30c2ffff andi r2,r6,0xffff		
00183ce8: 24c60014 addiu r6,r6,0x0014		Award 20 CT?
00183cec: 30c2ffff andi r2,r6,0xffff
00183cf0: 2c42003d sltiu r2,r2,0x003d		If CT < 61?
00183cf4: 14400002 bne r2,r0,0x00183d00		branch if ct = 0
00183cf8: 34020001 ori r2,r0,0x0001		r2 = 01?
00183cfc: 3406003c ori r6,r0,0x003c		r6 = 01?
00183d00: a0e60039 sb r6,0x0039(r7)		store r6 as CT
00183d04: a0e00186 sb r0,0x0186(r7)		store store turn over
00183d08: 03e00008 jr r31
00183d0c: 00000000 nop