FF6 Hacking
Item Menu BG1 Layer Positioning - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: Item Menu BG1 Layer Positioning (/thread-3565.html)



Item Menu BG1 Layer Positioning - GrayShadows - 11-11-2017

I've been fiddling with the item menu specifically (and the field menu generally) for a while now, and one of the things I'm looking at is adjusting the sizes of the windows. I've been able to position everything the way I'd like -- the Item and Use/Arrange/Rare windows are half the height now, rather than having the extra line of negative space on top, the description window is moved up into the freed space and the main window is expanded up a line to where the description window was. The cursor positioning is updated for both the options at the top and the main window.

What I can't figure out is how to update where the actual inventory gets drawn. I know it's on BG1, and looking at NS's optimised C3, I can see where the write-row gets updated and such, but I'm at a loss for how it determines where to position the first write-row on the screen. I've looked at the coding for both Item and Equip, because Equip only has nine rows rather than ten and thus starts a line lower, but the code is actually really similar, with no indication of any kind of absolute positioning that I can see.

I know that most of us haven't really delved into graphics a whole lot yet, and it's definitely something I'm learning as I go along, but does anyone even know which part of the code I should start looking at? Is it even possible to draw on BG1 higher on the screen? I mean, I'd assume it would have to be...


RE: Item Menu BG1 Layer Positioning - madsiur - 11-11-2017

I'm not sure if I understand correctly the question but top BG1 write row is fetched from $49 (see $C383F7) then stored in $E6 and used in draw inventory (see $C37F88). Make a search for $49 and instead of STZ $49 (init at row 1) store #$01 in $49 (see $C31AE2). I hope this somewhat help..

Edit: There's also the BG1 V-Shift table at $C37EE7 but while the data is likely positioning I don't know its format.


RE: Item Menu BG1 Layer Positioning - GrayShadows - 11-11-2017

Hmm, from looking at the code, I'd assumed that $49/$E6 was used to index which of the rows we were working on, not the positioning, but I'll start fiddling with that, thanks. I'll take a look at the v-shift table, too... Actually, you might be onto something there, as the Item v-shift table has 30 rows, and the Gear menu v-shift table has 27 -- 3*10 and 3*9, 10 and 9 being the number of rows-on-screen for each of those menus.

It's a start, at least. :D Thank you, I think I needed the push to get my brain out of its rut.