Image Loading Setup (0xfdcf0)
Jump to navigation
Jump to search
# ROUTINE: Image loading setup? (0xfdcf0) # This routine is an analog to Image loading setup (0x14a834) in BATTLE.BIN. # Parameters: # r4 = (destPtr) Destination pointer # r5 = (baseLoadLocation) Pointer to array of halfwords [X Location, Y Location] # r6 = (baseScreenLocation) Pointer to array of halfwords [X Location, Y Location] # r7 = (loadParameters) Pointer to array of halfwords (2-byte values): [X Load Location, Y Load Location, Image Width, Image Height, X Screen Location Offset, Y Screen Location Offset] 800fdcf0: 27bdffd8 addiu r29,r29,-0x0028 800fdcf4: afb10014 sw r17,0x0014(r29) 800fdcf8: 00808821 addu r17,r4,r0 800fdcfc: afb20018 sw r18,0x0018(r29) 800fdd00: 00a09021 addu r18,r5,r0 800fdd04: afb3001c sw r19,0x001c(r29) 800fdd08: 00c09821 addu r19,r6,r0 800fdd0c: afb00010 sw r16,0x0010(r29) 800fdd10: afbf0020 sw r31,0x0020(r29) 800fdd14: 92220007 lbu r2,0x0007(r17) 800fdd18: 34030064 ori r3,r0,0x0064 800fdd1c: 3042007c andi r2,r2,0x007c 800fdd20: 14430021 bne r2,r3,0x800fdda8 800fdd24: 00e08021 addu r16,r7,r0 800fdd28: 86020000 lh r2,0x0000(r16) 800fdd2c: 00000000 nop 800fdd30: 04400012 bltz r2,0x800fdd7c 800fdd34: 00000000 nop 800fdd38: 96420000 lhu r2,0x0000(r18) 800fdd3c: 92030000 lbu r3,0x0000(r16) 800fdd40: 3042003f andi r2,r2,0x003f 800fdd44: 00021080 sll r2,r2,0x02 800fdd48: 00431021 addu r2,r2,r3 800fdd4c: a222000c sb r2,0x000c(r17) 800fdd50: 92420002 lbu r2,0x0002(r18) 800fdd54: 92030002 lbu r3,0x0002(r16) 800fdd58: 00000000 nop 800fdd5c: 00431021 addu r2,r2,r3 800fdd60: a222000d sb r2,0x000d(r17) 800fdd64: 96020004 lhu r2,0x0004(r16) 800fdd68: 00000000 nop 800fdd6c: a6220010 sh r2,0x0010(r17) 800fdd70: 96020006 lhu r2,0x0006(r16) 800fdd74: 00000000 nop 800fdd78: a6220012 sh r2,0x0012(r17) 800fdd7c: 96620000 lhu r2,0x0000(r19) 800fdd80: 96030008 lhu r3,0x0008(r16) 800fdd84: 00000000 nop 800fdd88: 00431021 addu r2,r2,r3 800fdd8c: a6220008 sh r2,0x0008(r17) 800fdd90: 96620002 lhu r2,0x0002(r19) 800fdd94: 9603000a lhu r3,0x000a(r16) 800fdd98: 00000000 nop 800fdd9c: 00431021 addu r2,r2,r3 800fdda0: 0803f7c6 j 0x800fdf18 800fdda4: a622000a sh r2,0x000a(r17) 800fdda8: 86020000 lh r2,0x0000(r16) 800fddac: 00000000 nop 800fddb0: 0440002d bltz r2,0x800fde68 800fddb4: 00002021 addu r4,r0,r0 800fddb8: 00002821 addu r5,r0,r0 800fddbc: 96470002 lhu r7,0x0002(r18) 800fddc0: 86460000 lh r6,0x0000(r18) 800fddc4: 0c008e63 jal 0x8002398c P00 GetTpage 800fddc8: 30e70f00 andi r7,r7,0x0f00 800fddcc: a6220016 sh r2,0x0016(r17) 800fddd0: 92020000 lbu r2,0x0000(r16) 800fddd4: 00000000 nop 800fddd8: a222000c sb r2,0x000c(r17) 800fdddc: 92420002 lbu r2,0x0002(r18) 800fdde0: 92030002 lbu r3,0x0002(r16) 800fdde4: 00000000 nop 800fdde8: 00431021 addu r2,r2,r3 800fddec: a222000d sb r2,0x000d(r17) 800fddf0: 92020000 lbu r2,0x0000(r16) 800fddf4: 92030004 lbu r3,0x0004(r16) 800fddf8: 00000000 nop 800fddfc: 00431021 addu r2,r2,r3 800fde00: a2220014 sb r2,0x0014(r17) 800fde04: 92420002 lbu r2,0x0002(r18) 800fde08: 92030002 lbu r3,0x0002(r16) 800fde0c: 00000000 nop 800fde10: 00431021 addu r2,r2,r3 800fde14: a2220015 sb r2,0x0015(r17) 800fde18: 92020000 lbu r2,0x0000(r16) 800fde1c: 00000000 nop 800fde20: a222001c sb r2,0x001c(r17) 800fde24: 92420002 lbu r2,0x0002(r18) 800fde28: 92030002 lbu r3,0x0002(r16) 800fde2c: 92040006 lbu r4,0x0006(r16) 800fde30: 00431021 addu r2,r2,r3 800fde34: 00441021 addu r2,r2,r4 800fde38: a222001d sb r2,0x001d(r17) 800fde3c: 92020000 lbu r2,0x0000(r16) 800fde40: 92030004 lbu r3,0x0004(r16) 800fde44: 00000000 nop 800fde48: 00431021 addu r2,r2,r3 800fde4c: a2220024 sb r2,0x0024(r17) 800fde50: 92420002 lbu r2,0x0002(r18) 800fde54: 92030002 lbu r3,0x0002(r16) 800fde58: 92040006 lbu r4,0x0006(r16) 800fde5c: 00431021 addu r2,r2,r3 800fde60: 00441021 addu r2,r2,r4 800fde64: a2220025 sb r2,0x0025(r17) 800fde68: 96620000 lhu r2,0x0000(r19) 800fde6c: 96030008 lhu r3,0x0008(r16) 800fde70: 00000000 nop 800fde74: 00431021 addu r2,r2,r3 800fde78: a6220008 sh r2,0x0008(r17) 800fde7c: 96620002 lhu r2,0x0002(r19) 800fde80: 9603000a lhu r3,0x000a(r16) 800fde84: 00000000 nop 800fde88: 00431021 addu r2,r2,r3 800fde8c: a622000a sh r2,0x000a(r17) 800fde90: 96620000 lhu r2,0x0000(r19) 800fde94: 96030008 lhu r3,0x0008(r16) 800fde98: 96040004 lhu r4,0x0004(r16) 800fde9c: 00431021 addu r2,r2,r3 800fdea0: 00441021 addu r2,r2,r4 800fdea4: a6220010 sh r2,0x0010(r17) 800fdea8: 96620002 lhu r2,0x0002(r19) 800fdeac: 9603000a lhu r3,0x000a(r16) 800fdeb0: 00000000 nop 800fdeb4: 00431021 addu r2,r2,r3 800fdeb8: a6220012 sh r2,0x0012(r17) 800fdebc: 96620000 lhu r2,0x0000(r19) 800fdec0: 96030008 lhu r3,0x0008(r16) 800fdec4: 00000000 nop 800fdec8: 00431021 addu r2,r2,r3 800fdecc: a6220018 sh r2,0x0018(r17) 800fded0: 96620002 lhu r2,0x0002(r19) 800fded4: 9603000a lhu r3,0x000a(r16) 800fded8: 96040006 lhu r4,0x0006(r16) 800fdedc: 00431021 addu r2,r2,r3 800fdee0: 00441021 addu r2,r2,r4 800fdee4: a622001a sh r2,0x001a(r17) 800fdee8: 96620000 lhu r2,0x0000(r19) 800fdeec: 96030008 lhu r3,0x0008(r16) 800fdef0: 96040004 lhu r4,0x0004(r16) 800fdef4: 00431021 addu r2,r2,r3 800fdef8: 00441021 addu r2,r2,r4 800fdefc: a6220020 sh r2,0x0020(r17) 800fdf00: 96620002 lhu r2,0x0002(r19) 800fdf04: 9603000a lhu r3,0x000a(r16) 800fdf08: 96040006 lhu r4,0x0006(r16) 800fdf0c: 00431021 addu r2,r2,r3 800fdf10: 00441021 addu r2,r2,r4 800fdf14: a6220022 sh r2,0x0022(r17) 800fdf18: 8fbf0020 lw r31,0x0020(r29) 800fdf1c: 8fb3001c lw r19,0x001c(r29) 800fdf20: 8fb20018 lw r18,0x0018(r29) 800fdf24: 8fb10014 lw r17,0x0014(r29) 800fdf28: 8fb00010 lw r16,0x0010(r29) 800fdf2c: 27bd0028 addiu r29,r29,0x0028 800fdf30: 03e00008 jr r31 800fdf34: 00000000 nop