Find Text Coordinates (WORLD.BIN)

From Final Fantasy Hacktics Wiki
Revision as of 02:04, 18 May 2018 by Glain (talk | contribs) (Created page with " # ROUTINE: FIND TEXT COORDINATES (WORLD.BIN) # Finds text coordinates (from center?). # Parameters: # r4 = (xCoordinate) (output variable) #...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
#   ROUTINE: FIND TEXT COORDINATES (WORLD.BIN)
#       Finds text coordinates (from center?).
#       Parameters:
#           r4 = (xCoordinate) (output variable)
#           r5 = (yCoordinate) (output variable)
#           r6 = (textEntry) Pointer to start of text entry
#       Returns:
#           (No return value), but *xCoordinate and *yCoordinate overwritten with resulting values

800e4668: 27bdffd0 addiu r29,r29,-0x0030
800e466c: afb40020 sw r20,0x0020(r29)
800e4670: 0080a021 addu r20,r4,r0
800e4674: afb50024 sw r21,0x0024(r29)
800e4678: 00a0a821 addu r21,r5,r0
800e467c: afb10014 sw r17,0x0014(r29)
800e4680: 00c08821 addu r17,r6,r0
800e4684: 00002021 addu r4,r0,r0
800e4688: afbf0028 sw r31,0x0028(r29)
800e468c: afb3001c sw r19,0x001c(r29)
800e4690: afb20018 sw r18,0x0018(r29)
800e4694: 0c0166bc jal 0x80059af0
800e4698: afb00010 sw r16,0x0010(r29)
800e469c: 00402821 addu r5,r2,r0
800e46a0: 340400fe ori r4,r0,0x00fe
800e46a4: 34030013 ori r3,r0,0x0013
800e46a8: 3c02801a lui r2,0x801a
800e46ac: 2442246b addiu r2,r2,0x246b

800e46b0: a0440000 sb r4,0x0000(r2)
800e46b4: 2463ffff addiu r3,r3,-0x0001
800e46b8: 0461fffd bgez r3,0x800e46b0
800e46bc: 2442ffff addiu r2,r2,-0x0001

800e46c0: 00001821 addu r3,r0,r0
800e46c4: 00a31021 addu r2,r5,r3

800e46c8: 904200be lbu r2,0x00be(r2)
800e46cc: 3c01801a lui r1,0x801a
800e46d0: 00230821 addu r1,r1,r3
800e46d4: a0222458 sb r2,0x2458(r1)
800e46d8: 24630001 addiu r3,r3,0x0001
800e46dc: 28620010 slti r2,r3,0x0010
800e46e0: 1440fff9 bne r2,r0,0x800e46c8
800e46e4: 00a31021 addu r2,r5,r3

800e46e8: 3c101f80 lui r16,0x1f80
800e46ec: 2413ffff addiu r19,r0,-0x0001
800e46f0: 3412ffff ori r18,r0,0xffff
800e46f4: 2402ffff addiu r2,r0,-0x0001
800e46f8: 3c011f80 lui r1,0x1f80
800e46fc: ac22001c sw r2,0x001c(r1)
800e4700: 3c028015 lui r2,0x8015
800e4704: 244231d8 addiu r2,r2,0x31d8
800e4708: 3c011f80 lui r1,0x1f80
800e470c: ac220024 sw r2,0x0024(r1)
800e4710: 3402ffff ori r2,r0,0xffff
800e4714: 3c011f80 lui r1,0x1f80
800e4718: ac200018 sw r0,0x0018(r1)
800e471c: 3c011f80 lui r1,0x1f80
800e4720: ac200004 sw r0,0x0004(r1)
800e4724: 3c011f80 lui r1,0x1f80
800e4728: ac200008 sw r0,0x0008(r1)
800e472c: 3c011f80 lui r1,0x1f80
800e4730: ac20000c sw r0,0x000c(r1)
800e4734: 3c011f80 lui r1,0x1f80
800e4738: ac220028 sw r2,0x0028(r1)
800e473c: 3c011f80 lui r1,0x1f80
800e4740: ac20002c sw r0,0x002c(r1)

800e4744: 92230000 lbu r3,0x0000(r17)
800e4748: 340200f8 ori r2,r0,0x00f8
800e474c: 10620005 beq r3,r2,0x800e4764
800e4750: ae030000 sw r3,0x0000(r16)
800e4754: 2462ff02 addiu r2,r3,-0x00fe
800e4758: 2c420002 sltiu r2,r2,0x0002
800e475c: 10400024 beq r2,r0,0x800e47f0
800e4760: 340200fa ori r2,r0,0x00fa
800e4764: 8e02000c lw r2,0x000c(r16)
800e4768: 8e030004 lw r3,0x0004(r16)
800e476c: 00021080 sll r2,r2,0x02
800e4770: 3c01801a lui r1,0x801a
800e4774: 00220821 addu r1,r1,r2
800e4778: ac23246c sw r3,0x246c(r1)
800e477c: 8e020008 lw r2,0x0008(r16)
800e4780: 8e030004 lw r3,0x0004(r16)
800e4784: 00000000 nop
800e4788: 0043102a slt r2,r2,r3
800e478c: 10400002 beq r2,r0,0x800e4798
800e4790: 00000000 nop
800e4794: ae030008 sw r3,0x0008(r16)
800e4798: 8e020000 lw r2,0x0000(r16)
800e479c: 00000000 nop
800e47a0: 2442ff02 addiu r2,r2,-0x00fe
800e47a4: 2c420002 sltiu r2,r2,0x0002
800e47a8: 1040000c beq r2,r0,0x800e47dc
800e47ac: 00000000 nop
800e47b0: 8e02001c lw r2,0x001c(r16)
800e47b4: 00000000 nop
800e47b8: 14530006 bne r2,r19,0x800e47d4
800e47bc: 00408821 addu r17,r2,r0
800e47c0: 8e02000c lw r2,0x000c(r16)
800e47c4: ae000004 sw r0,0x0004(r16)
800e47c8: 24420001 addiu r2,r2,0x0001
800e47cc: 080392b1 j 0x800e4ac4
800e47d0: ae02000c sw r2,0x000c(r16)
800e47d4: 080391d1 j 0x800e4744
800e47d8: ae13001c sw r19,0x001c(r16)
800e47dc: 8e02000c lw r2,0x000c(r16)
800e47e0: ae000004 sw r0,0x0004(r16)
800e47e4: 24420001 addiu r2,r2,0x0001
800e47e8: 08039255 j 0x800e4954
800e47ec: ae02000c sw r2,0x000c(r16)
800e47f0: 14620006 bne r3,r2,0x800e480c
800e47f4: 340200e8 ori r2,r0,0x00e8
800e47f8: 8e020004 lw r2,0x0004(r16)
800e47fc: 00000000 nop
800e4800: 24420004 addiu r2,r2,0x0004
800e4804: 08039255 j 0x800e4954
800e4808: ae020004 sw r2,0x0004(r16)
800e480c: 14620008 bne r3,r2,0x800e4830
800e4810: 340200e4 ori r2,r0,0x00e4
800e4814: 02002021 addu r4,r16,r0
800e4818: 0c0392fd jal 0x800e4bf4
800e481c: 02202821 addu r5,r17,r0
800e4820: 00408821 addu r17,r2,r0
800e4824: 92220000 lbu r2,0x0000(r17)
800e4828: 08039255 j 0x800e4954
800e482c: ae020028 sw r2,0x0028(r16)
800e4830: 1462001b bne r3,r2,0x800e48a0
800e4834: 340200e6 ori r2,r0,0x00e6
800e4838: 8e020024 lw r2,0x0024(r16)
800e483c: 8e030028 lw r3,0x0028(r16)
800e4840: 8c440000 lw r4,0x0000(r2)
800e4844: 1472000a bne r3,r18,0x800e4870
800e4848: ae040010 sw r4,0x0010(r16)
800e484c: 0c039bc5 jal 0x800e6f14
800e4850: 00000000 nop
800e4854: 00021840 sll r3,r2,0x01
800e4858: 00621821 addu r3,r3,r2
800e485c: 8e020004 lw r2,0x0004(r16)
800e4860: 00031840 sll r3,r3,0x01
800e4864: 00621821 addu r3,r3,r2
800e4868: 08039223 j 0x800e488c
800e486c: ae030004 sw r3,0x0004(r16)
800e4870: 00031040 sll r2,r3,0x01
800e4874: 00431021 addu r2,r2,r3
800e4878: 8e030004 lw r3,0x0004(r16)
800e487c: 00021040 sll r2,r2,0x01
800e4880: ae120028 sw r18,0x0028(r16)
800e4884: 00431021 addu r2,r2,r3
800e4888: ae020004 sw r2,0x0004(r16)
800e488c: 8e020024 lw r2,0x0024(r16)
800e4890: 00000000 nop
800e4894: 24420004 addiu r2,r2,0x0004
800e4898: 08039255 j 0x800e4954
800e489c: ae020024 sw r2,0x0024(r16)
800e48a0: 1462001e bne r3,r2,0x800e491c
800e48a4: 2462ff1e addiu r2,r3,-0x00e2
800e48a8: 02002021 addu r4,r16,r0
800e48ac: 0c0392fd jal 0x800e4bf4
800e48b0: 02202821 addu r5,r17,r0
800e48b4: 00408821 addu r17,r2,r0
800e48b8: 92220000 lbu r2,0x0000(r17)
800e48bc: 8e030028 lw r3,0x0028(r16)
800e48c0: 00021080 sll r2,r2,0x02
800e48c4: 3c018015 lui r1,0x8015
800e48c8: 00220821 addu r1,r1,r2
800e48cc: 8c2431d8 lw r4,0x31d8(r1)
800e48d0: 1472000a bne r3,r18,0x800e48fc
800e48d4: ae040010 sw r4,0x0010(r16)
800e48d8: 0c039bc5 jal 0x800e6f14
800e48dc: 00000000 nop
800e48e0: 00021840 sll r3,r2,0x01
800e48e4: 00621821 addu r3,r3,r2
800e48e8: 8e020004 lw r2,0x0004(r16)
800e48ec: 00031840 sll r3,r3,0x01
800e48f0: 00621821 addu r3,r3,r2
800e48f4: 08039255 j 0x800e4954
800e48f8: ae030004 sw r3,0x0004(r16)
800e48fc: 00031040 sll r2,r3,0x01
800e4900: 00431021 addu r2,r2,r3
800e4904: 8e030004 lw r3,0x0004(r16)
800e4908: 00021040 sll r2,r2,0x01
800e490c: ae120028 sw r18,0x0028(r16)
800e4910: 00431021 addu r2,r2,r3
800e4914: 08039255 j 0x800e4954
800e4918: ae020004 sw r2,0x0004(r16)
800e491c: 2c420002 sltiu r2,r2,0x0002
800e4920: 14400007 bne r2,r0,0x800e4940
800e4924: 02002021 addu r4,r16,r0
800e4928: 2462ff0b addiu r2,r3,-0x00f5
800e492c: 2c420002 sltiu r2,r2,0x0002
800e4930: 14400003 bne r2,r0,0x800e4940
800e4934: 340200ec ori r2,r0,0x00ec
800e4938: 14620006 bne r3,r2,0x800e4954
800e493c: 00000000 nop
800e4940: 0c0392fd jal 0x800e4bf4
800e4944: 02202821 addu r5,r17,r0
800e4948: 02002021 addu r4,r16,r0
800e494c: 080392ad j 0x800e4ab4
800e4950: 00402821 addu r5,r2,r0
800e4954: 8e020024 lw r2,0x0024(r16)
800e4958: 8e040000 lw r4,0x0000(r16)
800e495c: 8c450000 lw r5,0x0000(r2)
800e4960: 0c03907f jal 0x800e41fc
800e4964: 00000000 nop
800e4968: 10530014 beq r2,r19,0x800e49bc
800e496c: ae020010 sw r2,0x0010(r16)
800e4970: 8e030000 lw r3,0x0000(r16)
800e4974: 26220001 addiu r2,r17,0x0001
800e4978: ae02001c sw r2,0x001c(r16)
800e497c: 340200e0 ori r2,r0,0x00e0
800e4980: 14620005 bne r3,r2,0x800e4998
800e4984: 00000000 nop
800e4988: 3c11801a lui r17,0x801a
800e498c: 26312458 addiu r17,r17,0x2458
800e4990: 0803926a j 0x800e49a8
800e4994: 00000000 nop
800e4998: 8e040010 lw r4,0x0010(r16)
800e499c: 0c039bb7 jal 0x800e6edc
800e49a0: 00000000 nop
800e49a4: 00408821 addu r17,r2,r0
800e49a8: 8e020024 lw r2,0x0024(r16)
800e49ac: 00000000 nop
800e49b0: 24420004 addiu r2,r2,0x0004
800e49b4: 080391d1 j 0x800e4744
800e49b8: ae020024 sw r2,0x0024(r16)
800e49bc: 8e040000 lw r4,0x0000(r16)
800e49c0: 340200f0 ori r2,r0,0x00f0
800e49c4: 308300f0 andi r3,r4,0x00f0
800e49c8: 14620020 bne r3,r2,0x800e4a4c
800e49cc: 286200d0 slti r2,r3,0x00d0
800e49d0: 3082000f andi r2,r4,0x000f
800e49d4: 28420004 slti r2,r2,0x0004
800e49d8: 1040001b beq r2,r0,0x800e4a48
800e49dc: 26220003 addiu r2,r17,0x0003
800e49e0: ae02001c sw r2,0x001c(r16)
800e49e4: 92220000 lbu r2,0x0000(r17)
800e49e8: 00000000 nop
800e49ec: 30420003 andi r2,r2,0x0003
800e49f0: 000210c0 sll r2,r2,0x03
800e49f4: ae020014 sw r2,0x0014(r16)
800e49f8: 92220001 lbu r2,0x0001(r17)
800e49fc: 8e030014 lw r3,0x0014(r16)
800e4a00: 00021142 srl r2,r2,0x05
800e4a04: ae020018 sw r2,0x0018(r16)
800e4a08: 00431021 addu r2,r2,r3
800e4a0c: 24420004 addiu r2,r2,0x0004
800e4a10: ae020018 sw r2,0x0018(r16)
800e4a14: 92220001 lbu r2,0x0001(r17)
800e4a18: 00000000 nop
800e4a1c: 3042000f andi r2,r2,0x000f
800e4a20: 000219c0 sll r3,r2,0x07
800e4a24: 00621823 subu r3,r3,r2
800e4a28: 00031840 sll r3,r3,0x01
800e4a2c: ae030014 sw r3,0x0014(r16)
800e4a30: 92220002 lbu r2,0x0002(r17)
800e4a34: 00000000 nop
800e4a38: 00431021 addu r2,r2,r3
800e4a3c: 02228823 subu r17,r17,r2
800e4a40: 080391d1 j 0x800e4744
800e4a44: ae020014 sw r2,0x0014(r16)
800e4a48: 286200d0 slti r2,r3,0x00d0
800e4a4c: 14400007 bne r2,r0,0x800e4a6c
800e4a50: 340200d0 ori r2,r0,0x00d0
800e4a54: 14620003 bne r3,r2,0x800e4a64
800e4a58: 00000000 nop
800e4a5c: 080392ab j 0x800e4aac
800e4a60: ae04002c sw r4,0x002c(r16)
800e4a64: 080392ab j 0x800e4aac
800e4a68: ae00002c sw r0,0x002c(r16)
800e4a6c: 8e03002c lw r3,0x002c(r16)
800e4a70: 00000000 nop
800e4a74: 3063000f andi r3,r3,0x000f
800e4a78: 00031040 sll r2,r3,0x01
800e4a7c: 00431021 addu r2,r2,r3
800e4a80: 00021080 sll r2,r2,0x02
800e4a84: 00431021 addu r2,r2,r3
800e4a88: 00021100 sll r2,r2,0x04
800e4a8c: 00441021 addu r2,r2,r4
800e4a90: 3c018015 lui r1,0x8015
800e4a94: 00220821 addu r1,r1,r2
800e4a98: 902233e0 lbu r2,0x33e0(r1)
800e4a9c: 8e030004 lw r3,0x0004(r16)
800e4aa0: ae00002c sw r0,0x002c(r16)
800e4aa4: 00431021 addu r2,r2,r3
800e4aa8: ae020004 sw r2,0x0004(r16)
800e4aac: 02002021 addu r4,r16,r0
800e4ab0: 02202821 addu r5,r17,r0
800e4ab4: 0c0392fd jal 0x800e4bf4
800e4ab8: 00000000 nop
800e4abc: 080391d1 j 0x800e4744
800e4ac0: 00408821 addu r17,r2,r0

800e4ac4: 96020008 lhu r2,0x0008(r16)
800e4ac8: 00000000 nop
800e4acc: a6820000 sh r2,0x0000(r20)
800e4ad0: 9602000c lhu r2,0x000c(r16)
800e4ad4: 00000000 nop
800e4ad8: a6a20000 sh r2,0x0000(r21)
800e4adc: 8fbf0028 lw r31,0x0028(r29)
800e4ae0: 8fb50024 lw r21,0x0024(r29)
800e4ae4: 8fb40020 lw r20,0x0020(r29)
800e4ae8: 8fb3001c lw r19,0x001c(r29)
800e4aec: 8fb20018 lw r18,0x0018(r29)
800e4af0: 8fb10014 lw r17,0x0014(r29)
800e4af4: 8fb00010 lw r16,0x0010(r29)
800e4af8: 27bd0030 addiu r29,r29,0x0030
800e4afc: 03e00008 jr r31
800e4b00: 00000000 nop