Users browsing this thread: 1 Guest(s)
Item Menu BG1 Layer Positioning

#1
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
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
  Find
Quote  

#2
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
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.
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • GrayShadows (11-11-2017)

#3
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
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
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite