Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old October 14, 2022, 20:36   #1
smbhax
Swordsman
 
Join Date: Oct 2021
Location: WA
Posts: 322
smbhax is on a distinguished road
Should "Display player (compact)" subwindow include depth reading?

The "Display player (compact)" subwindow duplicates the main window's sidebar display, except for one thing: it doesn't show the current depth:



Should it?

Is there somewhere else in the UI that can be set to display the depth?

I'd hoped to be able to toggle the sidebar mode to Off and replace it with the subwindow--since in the SDL2 front end (and hm maybe in the standard Windows front end too, now that I look at it), for some reason if you want to maintain a proper 64x64 tile display you have to be using a multiple-of-8 font size in the main window (in the screenshot the subwindow's font is 10x20, while the main window's is 16x16)--but I don't think I can give up the depth display.
__________________
My Angband videos

Last edited by smbhax; October 14, 2022 at 20:43.
smbhax is offline   Reply With Quote
Old October 19, 2022, 04:39   #2
smbhax
Swordsman
 
Join Date: Oct 2021
Location: WA
Posts: 322
smbhax is on a distinguished road
The "player (compact)" subwindow doesn't show speed, either. To add the display lines it doesn't have vs the main window's sidebar, in ui-display.c, change line 2086 from

Code:
	prt_health(row, col);
to

Code:
	prt_health(row++, col);
and below it, add

Code:
    prt_speed_short(row++, col);
    prt_depth_short(row++, col);
    prt_title_short(row, col);
__________________
My Angband videos

Last edited by smbhax; October 19, 2022 at 04:59.
smbhax is offline   Reply With Quote
Old October 20, 2022, 19:46   #3
smbhax
Swordsman
 
Join Date: Oct 2021
Location: WA
Posts: 322
smbhax is on a distinguished road
I've been able to add the status bar stuff to the "compact" replacement sidebar by expanding the above list of additions there in ui-display.c; also, status lines can get out of date, and at least some seem to benefit from a blanking function to clear out prior readings; I don't know a graceful way to clear the variable length potentially multiple timed status effects, so I just added a dozen lines of blanking at the end for those (overkill? how many status effects could one have simultaneously?):

Code:
    prt("", row, col);
    prt_speed_short(row++, col);
    prt("", row, col);	
    prt_depth_short(row++, col);
    prt("", row, col);	
    prt_title_short(row++, col);
    {
        typedef size_t status_x(int xrow, int xcol);
        static status_x *xsbr[] = {prt_level_feeling, prt_light, prt_moves,
        prt_unignore, prt_recall, prt_descent, prt_state, prt_study,
        prt_dtrap, prt_terrain};
        unsigned int xsc;
        for (xsc = 0; xsc < N_ELEMENTS(xsbr); xsc++) {
            prt("", row, col);	
            xsbr[xsc](row++, col);
        }
    }
    {
        int xclr = 12;
        int xcc;
        xcc = xclr;
        while (xcc) {
            prt("", row++, col);
            xcc--;
        }
        row = row - xclr;
    }
    prt_tmd(row, col);
To get multiple timed status effects printing on separate lines, remove "+ len" from the end of line 1254, and insert a "row++;" line below line 1262.

The food meter is actually a timed status effect, and its syntax varies a bit depending on whether there are other timed status effects active; not familiar enough with the syntax formatting to be able to lock that down.

And then remove the display of the status line in the main window by commenting out lines 1311-1317.
__________________
My Angband videos

Last edited by smbhax; October 21, 2022 at 16:10.
smbhax is offline   Reply With Quote
Old October 20, 2022, 20:38   #4
smbhax
Swordsman
 
Join Date: Oct 2021
Location: WA
Posts: 322
smbhax is on a distinguished road
Oh, say, it IS drawing the map in the bottom row now that I removed the status stuff from it. The "Press ? for help" message while targeting clears that bottom map row again--and the row was only getting drawn back in in messy chunks over time by the map while moving around after leaving target mode, but adding

Code:
        Term_clear();
below line 1507 in ui-target.c corrects that and makes the map redraw there instantly as soon as target mode ends.



By moving the status stuff to the left bar (or subwindow) I've got myself another half tile or so of map display height.

I won't be too surprised if some other message I'm overlooking pops up over the map down there at some point though.

~~~~~~~~~~~~~

Getting all the status readouts to update as needed when moved to the subwindow required setting the subwindow to update on "statusline" events, not just player events--which meant adding the following after 2242:

Code:
			set_register_or_deregister(statusline_events,
						   N_ELEMENTS(statusline_events),
					           update_player_compact_subwindow,
						   angband_term[win_idx]);

~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~

So, summary of the changes to move the status bar to the compact subwindow:
Code:
ui-display.c
- 1254 rem "+ len"
- add below 1262:
            row++;
- comment 1311-1317 (status bar)
- add ++ to "row" in 2087, then the following:
    prt("", row, col);
    prt_speed_short(row++, col);
    prt("", row, col);	
    prt_depth_short(row++, col);
    prt("", row, col);	
    prt_title_short(row++, col);
    {
        typedef size_t status_x(int xrow, int xcol);
        static status_x *xsbr[] = {prt_level_feeling, prt_light, prt_moves,
        prt_unignore, prt_recall, prt_descent, prt_state, prt_study,
        prt_dtrap, prt_terrain};
        unsigned int xsc;
        for (xsc = 0; xsc < N_ELEMENTS(xsbr); xsc++) {
            prt("", row, col);	
            xsbr[xsc](row++, col);
        }
    }
    {
        int xclr = 12;
        int xcc;
        xcc = xclr;
        while (xcc) {
            prt("", row++, col);
            xcc--;
        }
        row = row - xclr;
    }
    prt_tmd(row, col);
- add after 2242:

			set_register_or_deregister(statusline_events,
						   N_ELEMENTS(statusline_events),
					           update_player_compact_subwindow,
						   angband_term[win_idx]);

ui-target.c
- add "        Term_clear();" below line 1507 (redraws map in help line after targeting)

- optional text tweaks--12 char limit to fit narrow sidebar
in
lib\gamedata\store.txt
lib\gamedata\terrain.txt
lib\help\symbols.txt
lib\tiles\adam-bolt\graf-new.prf
lib\tiles\gervais\graf-dvg.prf
lib\tiles\nomad\graf-nmd.prf
lib\tiles\old\graf-xxx.prf
lib\tiles\shockbolt\graf-shb-dark.prf
lib\tiles\shockbolt\graf-shb-light.prf
src\cave.c
src\ui-knowledge.c

change

down staircase to stairs down
General Store to Trading Post
pile of passable rubble to light rubble
__________________
My Angband videos

Last edited by smbhax; October 23, 2022 at 04:38.
smbhax is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Round" vs "Turn" and "Lightning" vs "Elec" smbhax Vanilla 1 May 16, 2022 00:55
Camelot Unchained ("DAoC 2"), player building video + intro JamesGoblin Idle chatter 2 December 22, 2016 15:04
Bug with "Turn" in the "Player History" dump bron Vanilla 3 January 17, 2014 16:35
3.5dev668-"[" see/aware monsters vs Display window Ingwe Ingweron Development 0 November 26, 2013 18:20
How do players of graphical tiled display use the "/" identify command? Hajo Vanilla 3 September 1, 2010 18:04


All times are GMT +1. The time now is 15:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.