Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old November 3, 2016, 09:32   #101
t4nk
Swordsman
 
Join Date: May 2016
Posts: 330
t4nk is on a distinguished road
I got some results:
https://postimg.org/image/jrqb57qpf/
https://postimg.org/image/b0g46mwd7/

Exciting, right? Well, maybe not... after all, ncurses is obsolete crap Still, it displays something and can even be played a little!
I'll have to think what to do with overlapping terms (the ones created with Term_push_new()). Ncurses has some limited ability to draw borders, but, naturally, those take additional space, so it would increase minimal practical size of the screen to (80 + 2)x(24 + 2). Also, cursor handling has to be adjusted in textui2... perhaps some callback that is particular to ncurses (analogous to TERM_XTRA_SHAPE).
The ncurses branch is in "ui2-ncurses". Don't forget to include correct ncurses.h (widestring version - it probably lives in /usr/include/ncursesw or some such) and link with -lncursesw. I don't use panels (yet?), so libncursesw is the only dependency.
t4nk is offline   Reply With Quote
Old November 5, 2016, 09:01   #102
t4nk
Swordsman
 
Join Date: May 2016
Posts: 330
t4nk is on a distinguished road
Ncurses is kind of fun. Regrettably, its documentation is garbage. So I have to figure out how to do things mostly by experimenting. I can't even read its source for long, cause it's written in disgusting GNU style
Anyway, it (or, rather, uxterm) can draw some questionable looking borders:
https://postimg.org/image/9b4yjkx29/
https://postimg.org/image/r4ihxtjc7/
I also got the cursor working. I won't be using the panels library, since I have enough troubles with base ncurses already
So, the question. I don't want to do any term-choosing GUI for it. I'd rather hardcode everything... Which terms should it display? Perhaps two options - "minimal" (map, status line, sidebar, messages line - like "-b" in main-gcu.c) and "extended" (previous four + monster list + item list)? Or maybe environment variables, like X11 frontend does? Or Poschengband-style args? (probably not, I don't see any advantage of it over env vars). Or what?
t4nk is offline   Reply With Quote
Old November 5, 2016, 10:40   #103
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,849
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by t4nk View Post
So, the question. I don't want to do any term-choosing GUI for it. I'd rather hardcode everything... Which terms should it display? Perhaps two options - "minimal" (map, status line, sidebar, messages line - like "-b" in main-gcu.c) and "extended" (previous four + monster list + item list)? Or maybe environment variables, like X11 frontend does? Or Poschengband-style args? (probably not, I don't see any advantage of it over env vars). Or what?
Can you get it to read the Angband subwindow setup options, and then make a smart choice based on that?
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old November 5, 2016, 12:02   #104
t4nk
Swordsman
 
Join Date: May 2016
Posts: 330
t4nk is on a distinguished road
Quote:
Originally Posted by Nick View Post
Can you get it to read the Angband subwindow setup options, and then make a smart choice based on that?
Well, textui2 doesn't have any subwindow optons... that's not a problem on its own (that's just a bit of code, after all), the problem is the "smart" part
t4nk is offline   Reply With Quote
Old November 5, 2016, 13:20   #105
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,849
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by t4nk View Post
Well, textui2 doesn't have any subwindow options...
Right, of course, it's all new, that's kind of the point...

Actually I quite like the environment variables idea, if I still have any credibility left
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old November 5, 2016, 19:59   #106
t4nk
Swordsman
 
Join Date: May 2016
Posts: 330
t4nk is on a distinguished road
Quote:
Originally Posted by Nick View Post
Actually I quite like the environment variables idea, if I still have any credibility left
I guess I'll do that then, people who use this stuff are huge nerds anyway
t4nk is offline   Reply With Quote
Old November 5, 2016, 21:36   #107
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,849
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by t4nk View Post
I guess I'll do that then, people who use this stuff are huge nerds anyway
My reasoning precisely.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old November 6, 2016, 15:23   #108
t4nk
Swordsman
 
Join Date: May 2016
Posts: 330
t4nk is on a distinguished road
What a hack:
https://postimg.org/image/933pmqyil/
https://postimg.org/image/wmuzp0j5n/
solid_walls slow xterm down quite a lot, though... well, that's xterm's problem, isn't it?
t4nk is offline   Reply With Quote
Old November 6, 2016, 22:24   #109
t4nk
Swordsman
 
Join Date: May 2016
Posts: 330
t4nk is on a distinguished road
Quote:
Originally Posted by t4nk View Post
What a hack:
https://postimg.org/image/933pmqyil/
https://postimg.org/image/wmuzp0j5n/
solid_walls slow xterm down quite a lot, though... well, that's xterm's problem, isn't it?
actually, speed is ok. More interestingly, none of the terminals that I tried uses vsync!
t4nk is offline   Reply With Quote
Old November 6, 2016, 22:40   #110
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
Quote:
Originally Posted by t4nk View Post
actually, speed is ok. More interestingly, none of the terminals that I tried uses vsync!
I wouldn't worry too much about performance for ncurses; it's probably mostly for people who absolutely have to play via non-X11 SSH (or similar).
AnonymousHero 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
High element reform Nick Vanilla 49 December 12, 2015 21:04
Any benefit to eating when full? Ingwe Ingweron Vanilla 2 September 27, 2014 01:04
Fightless the full-casting mage fizzix AAR 65 July 27, 2010 09:11
Identification Reform Susramanian Vanilla 36 March 8, 2010 20:23
Help with diving (warning: long) bebo Vanilla 6 January 22, 2009 03:23


All times are GMT +1. The time now is 10:28.


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