Camera Zoom Related (0x6f678)

From Final Fantasy Hacktics Wiki
(Redirected from 0006f678 - 0006f7c0)
Jump to navigation Jump to search
#   ROUTINE: CAMERA ZOOM RELATED (0x6f678)
#   Deals with camera zoom?

8006f678: 3c038009 lui r3,0x8009
8006f67c: 8c6360cc lw r3,0x60cc(r3)             #   *0x800960cc
8006f680: 34020002 ori r2,r0,0x0002             #   2
8006f684: 1462001f bne r3,r2,0x8006f704         
8006f688: 34020004 ori r2,r0,0x0004             #   4
                                                #   if (*0x800960cc == 2) {
8006f68c: 3c038009 lui r3,0x8009
8006f690: 8c6360d0 lw r3,0x60d0(r3)             #       *0x800960d0
8006f694: 34020001 ori r2,r0,0x0001             #       1
8006f698: 14620018 bne r3,r2,0x8006f6fc         
8006f69c: 34020004 ori r2,r0,0x0004             #       4
                                                #       if (*0x800960d0 == 1) {
8006f6a0: 3c06800c lui r6,0x800c
8006f6a4: 24c67ca0 addiu r6,r6,0x7ca0           #           0x800c7ca0
8006f6a8: 8cc20000 lw r2,0x0000(r6)             #           *0x800c7ca0
8006f6ac: 3c05800c lui r5,0x800c
8006f6b0: 8ca57c64 lw r5,0x7c64(r5)             #           *0x800c7c64
8006f6b4: 00000000 nop
8006f6b8: 00451021 addu r2,r2,r5                #           *0x800c7ca0 + *0x800c7c64
8006f6bc: acc20000 sw r2,0x0000(r6)             #           *0x800c7ca0 = *0x800c7ca0 + *0x800c7c64
8006f6c0: 28421000 slti r2,r2,0x1000
8006f6c4: 3c03800c lui r3,0x800c
8006f6c8: 8c637ca4 lw r3,0x7ca4(r3)             #           *0x800c7ca4
8006f6cc: 3c04800c lui r4,0x800c
8006f6d0: 8c847ca8 lw r4,0x7ca8(r4)             #           *0x800c7ca8
8006f6d4: 00651821 addu r3,r3,r5                #           *0x800c7ca4 + *0x800c7c64
8006f6d8: 00852021 addu r4,r4,r5                #           *0x800c7ca8 + *0x800c7c64
8006f6dc: 3c01800c lui r1,0x800c
8006f6e0: ac237ca4 sw r3,0x7ca4(r1)             #           *0x800c7ca4 = *0x800c7ca4 + *0x800c7c64
8006f6e4: 3c01800c lui r1,0x800c
8006f6e8: ac247ca8 sw r4,0x7ca8(r1)             #           *0x800c7ca8 = *0x800c7ca8 + *0x800c7c64
8006f6ec: 1440002a bne r2,r0,0x8006f798         #           // (see if statements below)
8006f6f0: 28a20300 slti r2,r5,0x0300            #           condition = (*0x800c7c64 < 0x300)
8006f6f4: 0801bdde j 0x8006f778                 #           // (see if statements below)
8006f6f8: 34021000 ori r2,r0,0x1000             #           storeValue = 0x1000
                                                #       } else {
8006f6fc: 3c038009 lui r3,0x8009
8006f700: 8c6360cc lw r3,0x60cc(r3)             #           *0x800960cc
                                                #       }
                                                #   }
                                                #   if ((*0x800960cc != 2) or (*0x800c7ca0 >= 0x1000)) {
                                                #       if (*0x800960cc != 2) {
8006f704: 00000000 nop
8006f708: 1462002c bne r3,r2,0x8006f7bc         #           if (*0x800960cc != 4) return;
8006f70c: 00000000 nop
8006f710: 3c028009 lui r2,0x8009
8006f714: 8c4260d0 lw r2,0x60d0(r2)             #           *0x800960d0
8006f718: 00000000 nop
8006f71c: 14430027 bne r2,r3,0x8006f7bc         #           if (*0x800960d0 != *0x800960cc) return;
8006f720: 00000000 nop
8006f724: 3c06800c lui r6,0x800c
8006f728: 24c67ca0 addiu r6,r6,0x7ca0           #           0x800c7ca0
8006f72c: 8cc20000 lw r2,0x0000(r6)             #           *0x800c7ca0
8006f730: 3c05800c lui r5,0x800c
8006f734: 8ca57c64 lw r5,0x7c64(r5)             #           *0x800c7c64
8006f738: 00000000 nop
8006f73c: 00451023 subu r2,r2,r5                #           *0x800c7ca0 - *0x800c7c64
8006f740: acc20000 sw r2,0x0000(r6)             #           *0x800c7ca0 = *0x800c7ca0 - *0x800c7c64
8006f744: 28420c01 slti r2,r2,0x0c01              
8006f748: 3c03800c lui r3,0x800c
8006f74c: 8c637ca4 lw r3,0x7ca4(r3)             #           *0x800c7ca4
8006f750: 3c04800c lui r4,0x800c
8006f754: 8c847ca8 lw r4,0x7ca8(r4)             #           *0x800c7ca8
8006f758: 00651823 subu r3,r3,r5                #           *0x800c7ca4 - *0x800c7c64
8006f75c: 00852023 subu r4,r4,r5                #           *0x800c7ca8 - *0x800c7c64
8006f760: 3c01800c lui r1,0x800c
8006f764: ac237ca4 sw r3,0x7ca4(r1)             #           *0x800c7ca4 = *0x800c7ca4 - *0x800c7c64
8006f768: 3c01800c lui r1,0x800c
8006f76c: ac247ca8 sw r4,0x7ca8(r1)             #           *0x800c7ca8 = *0x800c7ca8 - *0x800c7c64
8006f770: 10400008 beq r2,r0,0x8006f794
8006f774: 34020c00 ori r2,r0,0x0c00             #           storeValue = 0xc00
                                                #       }
                                                #       if ((*0x800c7ca0 - *0x800c7c64) < 0xc01) {
8006f778: 3c018009 lui r1,0x8009
8006f77c: ac2060cc sw r0,0x60cc(r1)             #           *0x800960cc = 0
8006f780: 3c01800c lui r1,0x800c
8006f784: ac227ca8 sw r2,0x7ca8(r1)             #           *0x800c7ca8 = storeValue
8006f788: 3c01800c lui r1,0x800c
8006f78c: ac227ca4 sw r2,0x7ca4(r1)             #           *0x800c7ca4 = storeValue
8006f790: acc20000 sw r2,0x0000(r6)             #           *0x800c7ca0 = storeValue
                                                #       }
8006f794: 28a20300 slti r2,r5,0x0300            #       condition = (*0x800c7c64 < 0x300)
                                                #   }
8006f798: 10400008 beq r2,r0,0x8006f7bc         #   if (!condition) return;
8006f79c: 00000000 nop
8006f7a0: 3c028004 lui r2,0x8004
8006f7a4: 8c425980 lw r2,0x5980(r2)             #   *0x80045980
8006f7a8: 00000000 nop
8006f7ac: 00021080 sll r2,r2,0x02               #   (*0x80045980 * 4)
8006f7b0: 00451021 addu r2,r2,r5                #   (*0x80045980 * 4) + *0x800c7c64
8006f7b4: 3c01800c lui r1,0x800c
8006f7b8: ac227c64 sw r2,0x7c64(r1)             #   *0x800c7c64 = (*0x80045980 * 4) + *0x800c7c64
8006f7bc: 03e00008 jr r31
8006f7c0: 00000000 nop