What we really need to do is to separate the 'cave' grid from the 'term' grid, thus allowing the size of the cave grids to be independent of the term grids. But we also need to account for drawing menus using text. My thought is fairly simple:
- Have the main term windows (i.e. angband_term[0]) grid be sized to the font - this is used for all text operations including menus
- Define a new term windows (struct term cave_term) which all attr/char for the cave are draw into
- Have angband tell the front end where the 'cave term' gets mapped relative to the main term - for example, an 80x25 main window and a cave term mapped from (10,1) to (79, 23) give one row of text at the top, one row of text at the bottom, and 9 columns of text on the left.
- Have the front end use Term_resize() to specify the size (in text grids) of the angband_term[0] term (and other terms)
- Add a new cave_term_resize() function to specify the size of the cave view in graphical tile sizes (or text sizes if we are in text mode)
Now, the front-end simply renders the cave term first, then the main term over the top - so menus will appear over the main cave. I think the front end changes will be fairly minimal.
My big problem is, figuring out how the cave drawing code fits in - I'm trying to figure out how to make the cave draw to a term other than angband_term[0] - any help would be appreciated
- Have the main term windows (i.e. angband_term[0]) grid be sized to the font - this is used for all text operations including menus
- Define a new term windows (struct term cave_term) which all attr/char for the cave are draw into
- Have angband tell the front end where the 'cave term' gets mapped relative to the main term - for example, an 80x25 main window and a cave term mapped from (10,1) to (79, 23) give one row of text at the top, one row of text at the bottom, and 9 columns of text on the left.
- Have the front end use Term_resize() to specify the size (in text grids) of the angband_term[0] term (and other terms)
- Add a new cave_term_resize() function to specify the size of the cave view in graphical tile sizes (or text sizes if we are in text mode)
Now, the front-end simply renders the cave term first, then the main term over the top - so menus will appear over the main cave. I think the front end changes will be fairly minimal.
My big problem is, figuring out how the cave drawing code fits in - I'm trying to figure out how to make the cave draw to a term other than angband_term[0] - any help would be appreciated
Comment