Item Menu BG1 Layer Positioning
#1
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...
Current Project: FF6: Tensei | Discord ID: TristanGrayse
Reply
#2
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.
Reply
#3
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.
Current Project: FF6: Tensei | Discord ID: TristanGrayse
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Looking for patch that fix item loss when dying before using said item Warrax 4 3,558 08-03-2018, 09:49 AM
Last Post: Warrax
  Map Layer 2 got... weird fedorajoe 5 6,628 12-18-2016, 05:10 PM
Last Post: madsiur
  Item + Throw. Is it possible? Denis Colli 6 6,290 03-08-2016, 09:06 PM
Last Post: Denis Colli
  Layer 3 graphics sleepydude 2 3,019 06-26-2015, 01:45 PM
Last Post: sleepydude
  Can't be sold item tsushiy 8 7,379 02-18-2015, 09:39 PM
Last Post: Catone
  Item Arrange tsushiy 0 1,991 12-27-2014, 09:55 PM
Last Post: tsushiy
  Tile Layer Pro? FaulkFan 5 6,146 05-28-2014, 06:23 PM
Last Post: Xenovant
  Layer 3 Circle, and Exits??? Royaken 5 6,501 05-24-2014, 03:44 AM
Last Post: Gi Nattak

Forum Jump:


Users browsing this thread: 1 Guest(s)