
Textui reform (warning: long and full of C)
Collapse
X
-
...... . ...!!! TILE/GLYPH PICKERI'll just nuke this garbage. Tile picker won't work anyway.
-
)
Besides, they ARE null terminated!Last edited by t4nk; July 29, 2016, 17:13.Leave a comment:
-
My bad. I missed it in the scroll list for branches.
Question: what's the benefit to abandoning null-terminated strings, and adding the length field as a struct? (This was widely frowned upon, back in the day, because in the long run, it tended to break up the heap.)
Leave a comment:
-
-
-
Thanks. I'll keep an eye on it. Looks like you haven't pushed any changes yet.Leave a comment:
-
and takkaria's stuff) and old code (Harrison etc.) is huge... So far the worst parts were inkey(), ui-target.c (just too much spaghetti) and now ui-object.c. Other then that, I'm mostly removing unused things, renaming variables and reformating things the way I like it (just to entertain myself while I'm reading the code, no offence
)
The code is on github, https://github.com/t4nk074/angband - the "textui2" branch (see ui2-* files).Last edited by t4nk; July 28, 2016, 09:44.Leave a comment:
-
WhatMy method is extremely questionable. Initially I planned to leave the Term API more of less as it is, and just do some minimal updates to textui, to get it to work as quickly as possible. And, of course, I ended up redesigning ui-term.c entirely, and I'm rewriting huge parts of textui
So, naturally, when I'll finally manage to compile it, it just won't work, and then I'll have to fix it! We'll see. I simply can't resist the temptation. Right now I'm thinking what to do with ui-object.c... such a pile of nonsense... (btw, debo, I saw horrible things, but I still think inkey() is the worst
)
Leave a comment:
-
@t4nk--
If you think angband's code is archaic, then take a look at poschengband. That really does contain very much of the original code from angband v 2.7-2.8 from which it was forked. There is code in there that says "I borrowed the idea from v3.5 but rewrote it from scratch" on undocumented code with variable names like "o", "l", and "t". Very, very old school stuff.Leave a comment:
-
WhatMy method is extremely questionable. Initially I planned to leave the Term API more of less as it is, and just do some minimal updates to textui, to get it to work as quickly as possible. And, of course, I ended up redesigning ui-term.c entirely, and I'm rewriting huge parts of textui
So, naturally, when I'll finally manage to compile it, it just won't work, and then I'll have to fix it! We'll see. I simply can't resist the temptation. Right now I'm thinking what to do with ui-object.c... such a pile of nonsense... (btw, debo, I saw horrible things, but I still think inkey() is the worst
)
Originally posted by Pete MackYeah, but the basic problem remains: in text mode, only a relatively small number of colors can be distinguished by eye. It is not unique to angband. Boldface, italic, flickering is a better option in general here. Certainly there's room for a few more colors. But not 256, or even 64, let alone "millions". Now it's certainly reasonable to render graphics in many colors, but that is already done in most of the ports (X11 and gcu being the obvious exceptions.)Leave a comment:
-
Yeah, but the basic problem remains: in text mode, only a relatively small number of colors can be distinguished by eye. It is not unique to angband. Boldface, italic, flickering is a better option in general here. Certainly there's room for a few more colors. But not 256, or even 64, let alone "millions". Now it's certainly reasonable to render graphics in many colors, but that is already done in most of the ports (X11 and gcu being the obvious exceptions.)
Leave a comment:
-
-
With tiles and transparency, I think it would be good to be able to draw more than two tiles on a grid - so you can draw, e.g. the floor, a trap/an object, and a monster, one on top of the other. And like you say, it would be good to be able to apply tints of various kinds to the tiles. This could maybe remove the need to have 4 different tiles per terrain feature.
With regard to input, I guess it makes sense for keypresses to be global but mouse clicks are on particular sections of the screen. Maybe that means that mouseclicks get passed along in the ui_event struct with a pointer to the term they were triggered on.Leave a comment:
Leave a comment: