Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed. Find out how you can help in the Recruitment section.
Started by Orkney, January 10, 2021, 04:01:49 pm
001891d0: 3402007f ori r2,r0,0x007f 001891d4: 3c038019 lui r3,0x8019 001891d8: 8c632d90 lw r3,0x2d90(r3) r3 = target current action data pointer001891dc: 00000000 nop 001891e0: a0620013 sb r2,0x0013(r3) Set target CT to -127. 001891e4: 3c038019 lui r3,0x8019 001891e8: 8c632d90 lw r3,0x2d90(r3) 001891ec: 34020001 ori r2,r0,0x0001 001891f0: a0620025 sb r2,0x0025(r3)
Quote from: Glain on January 11, 2021, 09:19:21 amIt's just redundant.This happens a lot in the vanilla code, where it's like the compiler generated code to do one thing (in this case, set the action's CT), then generated code to do another thing (set the action's type), and just mashed them together without taking into account that it could have just reused the value in r3 instead of reloading the action pointer.(Vanilla code isn't going to branch into the middle of the routine, and the only branches inside the routine skip to the end of the routine, so those two bits of code will always be run in sequence.)
Quote from: Glain on January 12, 2021, 09:24:27 am2. Generally speaking, it's absolutely not safe, and it should be assumed that a crash would result. This will usually corrupt the stack pointer and saved register values, unless you've accounted for that. It can be made to work in very specialized cases with the right (hacky) setup.
00186d00: 3c028019 lui r2,0x8019 00186d04: 904238fa lbu r2,0x38fa(r2) 00186d08: 3c038019 lui r3,0x8019 00186d0c: 8c632d90 lw r3,0x2d90(r3) 00186d10: 34420080 ori r2,r2,0x0080 00186d14: a0620016 sb r2,0x0016(r3) ; Store Y as 0x80 + Br decrement (boost)00186d18: 3c038019 lui r3,0x8019 00186d1c: 8c632d90 lw r3,0x2d90(r3) 00186d20: 34020001 ori r2,r0,0x0001 00186d24: 03e00008 jr r31 00186d28: a0620025 sb r2,0x0025(r3) ; Store attack type as Psuedo-Status
00186d2c: 3c028019 lui r2,0x8019 00186d30: 904238fa lbu r2,0x38fa(r2) 00186d34: 3c038019 lui r3,0x8019 00186d38: 8c632d90 lw r3,0x2d90(r3) 00186d3c: 34420080 ori r2,r2,0x0080 00186d40: a0620012 sb r2,0x0012(r3) Store Y as 0x80 + SP decrement (boost)00186d44: 3c038019 lui r3,0x8019 00186d48: 8c632d90 lw r3,0x2d90(r3) 00186d4c: 34020001 ori r2,r0,0x0001 00186d50: 03e00008 jr r31 00186d54: a0620025 sb r2,0x0025(r3) Store attack type as Pseudo-Status
Quote from: Glain on January 12, 2021, 06:00:40 pmThey're two separate routines that happen to be placed next to each other. They both have a closing jr (at 0x186d24 and 0x186d50, respectively). Neither one has a nop, but what's the relevance of that? They are referenced in the formula pointer table, of course...
Quote from: Glain on January 12, 2021, 06:00:40 pm1. I'm unaware of unknown skill bytes. If you wanted to consolidate the routines into one by, say, providing the action offset as an argument, it looks like you could save some space. It doesn't seem like anything amazing though, unless there are a bunch more routines like this.
Quote from: Glain on January 12, 2021, 06:00:40 pm2. Are you asking if the AI would use Cheer Up? I haven't tested that, although I can't say I remember enemy mediators using Praise very often...
Page created in 0.025 seconds with 24 queries.