Difference between revisions of "001993a0 - 00199494"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
  001993a0: 3c07801a lui r7,0x801a
+
'''BATTLE.BIN''' :  - 001993a0_-_00199494
  001993a4: 24e7f3c4 addiu r7,r7,0xf3c4
+
Reset AI Table of Reachable Tile (8019f3c4 + 0xa74) and then enables only two tiles as reachable : Active Unit Tile and Tile from AI 0xcc4 Table
  001993a8: 00002821 addu r5,r0,r0
+
Variable at 0x8019f3c4 + 0xe2d is used as offset for both Table (potential scenarii ?)
 
+
------------------------------------------------------------------------------------------
  001993ac: 90e30e2d lbu r3,0x0e2d(r7) Load Action Decided?
+
Parameter : Nothing
  001993b0: 00052040 sll r4,r5,0x01
+
Return : Nothing
  001993b4: 000310c0 sll r2,r3,0x03
+
------------------------------------------------------------------------------------------
  001993b8: 00431021 addu r2,r2,r3
+
  001993a0: 3c07801a lui r7,0x801a             |
  001993bc: 000210c0 sll r2,r2,0x03
+
  001993a4: 24e7f3c4 addiu r7,r7,0xf3c4       |{{f/adr|0x8019f3c4}}
  001993c0: 00e21021 addu r2,r7,r2
+
  001993a8: 00002821 addu r5,r0,r0             |{{f/std|reset Y row counter}}
  001993c4: 00821021 addu r2,r4,r2
+
                                            {{f/bloop|LOOP}}
  001993c8: a4400a74 sh r0,0x0a74(r2)
+
  001993ac: 90e30e2d lbu r3,0x0e2d(r7)             |{{f/load|Load AI 0xe2d}} {{f/std|Offset for some Table (handle different scenarii ?)}}
  001993cc: 90e30e2d lbu r3,0x0e2d(r7) Load Action Decided?
+
  001993b0: 00052040 sll r4,r5,0x01               |{{f/std|This iteration halford offset}}
  001993d0: 24a50001 addiu r5,r5,0x0001
+
  001993b4: 000310c0 sll r2,r3,0x03               |
  001993d4: 000310c0 sll r2,r3,0x03
+
  001993b8: 00431021 addu r2,r2,r3                 |
  001993d8: 00431021 addu r2,r2,r3
+
  001993bc: 000210c0 sll r2,r2,0x03               |{{f/std|0xe2d * 0x48}}
  001993dc: 000210c0 sll r2,r2,0x03
+
  001993c0: 00e21021 addu r2,r7,r2                 |
  001993e0: 00e21021 addu r2,r7,r2
+
  001993c4: 00821021 addu r2,r4,r2                 |
  001993e4: 00822021 addu r4,r4,r2
+
  001993c8: a4400a74 sh r0,0x0a74(r2)             |{{f/store|Reset Y row Flags in AI 0xa74 Table}} {{f/std|All tiles set to unreachable state / 8019f3c4 + 0xa74}}
  001993e8: 28a20012 slti r2,r5,0x0012
+
  001993cc: 90e30e2d lbu r3,0x0e2d(r7)             |{{f/load|Load AI 0xe2d}}
  001993ec: 1440ffef bne r2,r0,0x001993ac Empty Target List
+
  001993d0: 24a50001 addiu r5,r5,0x0001           |{{f/std|Y row Counter + 1}}
  001993f0: a4800a98 sh r0,0x0a98(r4)
+
  001993d4: 000310c0 sll r2,r3,0x03               |
 
+
  001993d8: 00431021 addu r2,r2,r3                 |
  001993f4: 90e40e2d lbu r4,0x0e2d(r7) Load Action Decided?
+
  001993dc: 000210c0 sll r2,r2,0x03               |{{f/std|0xe2d * 0x48}}
  001993f8: 00000000 nop
+
  001993e0: 00e21021 addu r2,r7,r2                 |
  001993fc: 000418c0 sll r3,r4,0x03
+
  001993e4: 00822021 addu r4,r4,r2                 |
  00199400: 00641821 addu r3,r3,r4
+
  001993e8: 28a20012 slti r2,r5,0x0012             |
  00199404: 000318c0 sll r3,r3,0x03
+
  001993ec: 1440ffef bne r2,r0,0x001993ac     {{f/Cond|Reset all Flags in AI reachable Tiles table}} {{f/std|Table at 0x8019f3c4 + 0xa74}}
  00199408: 00671821 addu r3,r3,r7
+
  001993f0: a4800a98 sh r0,0x0a98(r4)             |{{f/store|Reset Y row Flags in AI 0xa74 high elevation Table}} {{f/std|All tiles set to unreachable state}}
  0019940c: 00042080 sll r4,r4,0x02
+
  001993f4: 90e40e2d lbu r4,0x0e2d(r7)         |{{f/load|Load AI 0xe2d}}
  00199410: 00e42021 addu r4,r7,r4
+
  001993f8: 00000000 nop                       |
  00199414: 90850cc5 lbu r5,0x0cc5(r4)
+
  001993fc: 000418c0 sll r3,r4,0x03           |
  00199418: 24630a74 addiu r3,r3,0x0a74
+
  00199400: 00641821 addu r3,r3,r4             |
  0019941c: 000510c0 sll r2,r5,0x03
+
  00199404: 000318c0 sll r3,r3,0x03           |{{f/std|0xe2d * 0x48}}
  00199420: 00451021 addu r2,r2,r5
+
  00199408: 00671821 addu r3,r3,r7             |{{f/std|part of pointer - 8019f3c4 + 0xe2d * 0x48}}
  00199424: 00021080 sll r2,r2,0x02
+
  0019940c: 00042080 sll r4,r4,0x02           |
  00199428: 90850cc6 lbu r5,0x0cc6(r4)
+
  00199410: 00e42021 addu r4,r7,r4             |{{f/adr|part of pointer - 8019f3c4 + 0xe2d * 0x04}}
  0019942c: 00431021 addu r2,r2,r3
+
  00199414: 90850cc5 lbu r5,0x0cc5(r4)         |{{f/load|Load this Entry Elevation Flag}} {{f/std|Always acting Unit ?}} {{f/std| 0x8019f3c4 + 0xcc4 + 0x01}}
  00199430: 00052840 sll r5,r5,0x01
+
  00199418: 24630a74 addiu r3,r3,0x0a74       |{{f/std|Part of pointer to this entry Reachable Tiles table}} {{f/std|8019f3c4 + 0xa74}}
  00199434: 00a22821 addu r5,r5,r2
+
  0019941c: 000510c0 sll r2,r5,0x03           |
  00199438: 90820cc4 lbu r2,0x0cc4(r4)
+
  00199420: 00451021 addu r2,r2,r5             |
  0019943c: 34068000 ori r6,r0,0x8000
+
  00199424: 00021080 sll r2,r2,0x02           |{{f/std|Elevation * 0x24}} {{f/std|Elevation Offset in 0xa74 Table}}
  00199440: 00461007 srav r2,r6,r2
+
  00199428: 90850cc6 lbu r5,0x0cc6(r4)         |{{f/load|Load this entry Y coordinates}} {{f/std| 0x8019f3c4 + 0xcc4 + 0x02}}
  00199444: a4a20000 sh r2,0x0000(r5)
+
  0019942c: 00431021 addu r2,r2,r3             |
  00199448: 90e20e2d lbu r2,0x0e2d(r7) Load Action Decided?
+
  00199430: 00052840 sll r5,r5,0x01           |{{f/std|Y Row offset (Halfword)}}
  0019944c: 90e40e31 lbu r4,0x0e31(r7) Acting Unit's Map Level
+
  00199434: 00a22821 addu r5,r5,r2             |{{f/adr|Part of pointer to This Entry Y Row halfword in AI reachable Tiles Table}} {{f/std|8019f3c4 + 0xa74}}
  00199450: 000218c0 sll r3,r2,0x03
+
  00199438: 90820cc4 lbu r2,0x0cc4(r4)         |{{f/load|Load this entry X coordinates}} {{f/std| 0x8019f3c4 + 0xcc4 }}
  00199454: 00621821 addu r3,r3,r2
+
  0019943c: 34068000 ori r6,r0,0x8000         |
  00199458: 000318c0 sll r3,r3,0x03
+
  00199440: 00461007 srav r2,r6,r2             |{{f/std|Bitmask for this entry Tile }}
  0019945c: 00671821 addu r3,r3,r7
+
  00199444: a4a20000 sh r2,0x0000(r5)         |{{f/store|Store This Entry Tile as reachable}}
  00199460: 24630a74 addiu r3,r3,0x0a74
+
  00199448: 90e20e2d lbu r2,0x0e2d(r7)         |{{f/load|Load AI 0xe2d}}
  00199464: 000410c0 sll r2,r4,0x03
+
  0019944c: 90e40e31 lbu r4,0x0e31(r7)         |{{f/load|Acting Unit Elevation}}
  00199468: 00441021 addu r2,r2,r4
+
  00199450: 000218c0 sll r3,r2,0x03           |
  0019946c: 00021080 sll r2,r2,0x02
+
  00199454: 00621821 addu r3,r3,r2             |
  00199470: 00431021 addu r2,r2,r3
+
  00199458: 000318c0 sll r3,r3,0x03           |{{f/std|0xe2d * 0x48}}
  00199474: 90e40e32 lbu r4,0x0e32(r7) Load Acting Unit's Y
+
  0019945c: 00671821 addu r3,r3,r7             |
  00199478: 90e30e30 lbu r3,0x0e30(r7) Load Acting Unit's X
+
  00199460: 24630a74 addiu r3,r3,0x0a74       |{{f/adr|Pointer to This 0xe2d AI reachable tile Table}}
  0019947c: 00042040 sll r4,r4,0x01
+
  00199464: 000410c0 sll r2,r4,0x03           |
  00199480: 00822021 addu r4,r4,r2
+
  00199468: 00441021 addu r2,r2,r4             |
  00199484: 94820000 lhu r2,0x0000(r4)
+
  0019946c: 00021080 sll r2,r2,0x02           |{{f/std|Elevation * 0x24}}
  00199488: 00663007 srav r6,r6,r3
+
  00199470: 00431021 addu r2,r2,r3             |{{f/std|Pointer + Elevation offset}}
  0019948c: 00461025 or r2,r2,r6
+
  00199474: 90e40e32 lbu r4,0x0e32(r7)         |{{f/load|Load Acting Unit's Y}}
  00199490: 03e00008 jr r31
+
  00199478: 90e30e30 lbu r3,0x0e30(r7)         |{{f/load|Load Acting Unit's X}}
  00199494: a4820000 sh r2,0x0000(r4) Save Self as Targeted Unit?
+
  0019947c: 00042040 sll r4,r4,0x01           |{{f/std|Y * 2}}
 +
  00199480: 00822021 addu r4,r4,r2             |{{f/std|Pointer + Y offset}}
 +
  00199484: 94820000 lhu r2,0x0000(r4)         |{{f/load|Load Flags for Acting Unit Y Row }}
 +
  00199488: 00663007 srav r6,r6,r3             |{{f/std|Bitmask For acting Unit Tile}}
 +
  0019948c: 00461025 or r2,r2,r6               |{{f/std|Enable Bitmask}}
 +
  00199490: 03e00008 jr r31                   |
 +
  00199494: a4820000 sh r2,0x0000(r4)         |{{f/store|Store Acting Unit Tile as reachable in AI Table 0xa74}}
 +
===Return locations===
 +
'''BATTLE.BIN'''
 +
  00196648: [[Map_movement_decision/data_setting]]
 +
  00198430: [[001982d8_-_001984e8]]
 +
  001990f8: [[0019905c_-_00199120]]

Latest revision as of 18:48, 17 June 2024

BATTLE.BIN :  - 001993a0_-_00199494
Reset AI Table of Reachable Tile (8019f3c4 + 0xa74) and then enables only two tiles as reachable : Active Unit Tile and Tile from AI 0xcc4 Table
Variable at 0x8019f3c4 + 0xe2d is used as offset for both Table (potential scenarii ?)
------------------------------------------------------------------------------------------
Parameter : Nothing
Return : Nothing
------------------------------------------------------------------------------------------
001993a0: 3c07801a lui r7,0x801a             |
001993a4: 24e7f3c4 addiu r7,r7,0xf3c4        |0x8019f3c4
001993a8: 00002821 addu r5,r0,r0             |reset Y row counter
                                            @LOOP
001993ac: 90e30e2d lbu r3,0x0e2d(r7)             |Load AI 0xe2d Offset for some Table (handle different scenarii ?)
001993b0: 00052040 sll r4,r5,0x01                |This iteration halford offset
001993b4: 000310c0 sll r2,r3,0x03                |
001993b8: 00431021 addu r2,r2,r3                 |
001993bc: 000210c0 sll r2,r2,0x03                |0xe2d * 0x48
001993c0: 00e21021 addu r2,r7,r2                 |
001993c4: 00821021 addu r2,r4,r2                 |
001993c8: a4400a74 sh r0,0x0a74(r2)              |Reset Y row Flags in AI 0xa74 Table All tiles set to unreachable state / 8019f3c4 + 0xa74
001993cc: 90e30e2d lbu r3,0x0e2d(r7)             |Load AI 0xe2d
001993d0: 24a50001 addiu r5,r5,0x0001            |Y row Counter + 1
001993d4: 000310c0 sll r2,r3,0x03                |
001993d8: 00431021 addu r2,r2,r3                 |
001993dc: 000210c0 sll r2,r2,0x03                |0xe2d * 0x48
001993e0: 00e21021 addu r2,r7,r2                 |
001993e4: 00822021 addu r4,r4,r2                 |
001993e8: 28a20012 slti r2,r5,0x0012             |
001993ec: 1440ffef bne r2,r0,0x001993ac      #Reset all Flags in AI reachable Tiles table Table at 0x8019f3c4 + 0xa74
001993f0: a4800a98 sh r0,0x0a98(r4)              |Reset Y row Flags in AI 0xa74 high elevation Table All tiles set to unreachable state
001993f4: 90e40e2d lbu r4,0x0e2d(r7)         |Load AI 0xe2d
001993f8: 00000000 nop                       |
001993fc: 000418c0 sll r3,r4,0x03            |
00199400: 00641821 addu r3,r3,r4             |
00199404: 000318c0 sll r3,r3,0x03            |0xe2d * 0x48
00199408: 00671821 addu r3,r3,r7             |part of pointer - 8019f3c4 + 0xe2d * 0x48
0019940c: 00042080 sll r4,r4,0x02            |
00199410: 00e42021 addu r4,r7,r4             |part of pointer - 8019f3c4 + 0xe2d * 0x04
00199414: 90850cc5 lbu r5,0x0cc5(r4)         |Load this Entry Elevation Flag Always acting Unit ?  0x8019f3c4 + 0xcc4 + 0x01
00199418: 24630a74 addiu r3,r3,0x0a74        |Part of pointer to this entry Reachable Tiles table 8019f3c4 + 0xa74
0019941c: 000510c0 sll r2,r5,0x03            |
00199420: 00451021 addu r2,r2,r5             |
00199424: 00021080 sll r2,r2,0x02            |Elevation * 0x24 Elevation Offset in 0xa74 Table
00199428: 90850cc6 lbu r5,0x0cc6(r4)         |Load this entry Y coordinates  0x8019f3c4 + 0xcc4 + 0x02
0019942c: 00431021 addu r2,r2,r3             |
00199430: 00052840 sll r5,r5,0x01            |Y Row offset (Halfword)
00199434: 00a22821 addu r5,r5,r2             |Part of pointer to This Entry Y Row halfword in AI reachable Tiles Table 8019f3c4 + 0xa74
00199438: 90820cc4 lbu r2,0x0cc4(r4)         |Load this entry X coordinates  0x8019f3c4 + 0xcc4 
0019943c: 34068000 ori r6,r0,0x8000          |
00199440: 00461007 srav r2,r6,r2             |Bitmask for this entry Tile 
00199444: a4a20000 sh r2,0x0000(r5)          |Store This Entry Tile as reachable
00199448: 90e20e2d lbu r2,0x0e2d(r7)         |Load AI 0xe2d
0019944c: 90e40e31 lbu r4,0x0e31(r7)         |Acting Unit Elevation
00199450: 000218c0 sll r3,r2,0x03            |
00199454: 00621821 addu r3,r3,r2             |
00199458: 000318c0 sll r3,r3,0x03            |0xe2d * 0x48
0019945c: 00671821 addu r3,r3,r7             |
00199460: 24630a74 addiu r3,r3,0x0a74        |Pointer to This 0xe2d AI reachable tile Table
00199464: 000410c0 sll r2,r4,0x03            |
00199468: 00441021 addu r2,r2,r4             |
0019946c: 00021080 sll r2,r2,0x02            |Elevation * 0x24
00199470: 00431021 addu r2,r2,r3             |Pointer + Elevation offset
00199474: 90e40e32 lbu r4,0x0e32(r7)         |Load Acting Unit's Y
00199478: 90e30e30 lbu r3,0x0e30(r7)         |Load Acting Unit's X
0019947c: 00042040 sll r4,r4,0x01            |Y * 2
00199480: 00822021 addu r4,r4,r2             |Pointer + Y offset
00199484: 94820000 lhu r2,0x0000(r4)         |Load Flags for Acting Unit Y Row 
00199488: 00663007 srav r6,r6,r3             |Bitmask For acting Unit Tile
0019948c: 00461025 or r2,r2,r6               |Enable Bitmask
00199490: 03e00008 jr r31                    |
00199494: a4820000 sh r2,0x0000(r4)          |Store Acting Unit Tile as reachable in AI Table 0xa74

Return locations

BATTLE.BIN
 00196648: Map_movement_decision/data_setting
 00198430: 001982d8_-_001984e8
 001990f8: 0019905c_-_00199120