Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old July 27, 2016, 17:12   #21
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,817
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by t4nk View Post
What My 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 )
Well to me it looks like a solid start - some of the refactoring/rewriting, as you note, is sorely necessary - I've been avoiding untangling ui-target.c for years. And the term redesign looks a lot more compact than its predecessor. Keep going
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Old July 27, 2016, 17:27   #22
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,015
Donated: $40
Pete Mack is on a distinguished road
@t4nk--
is some of this on GitHub?
Pete Mack is offline   Reply With Quote
Old July 28, 2016, 07:08   #23
t4nk
Adept
 
Join Date: May 2016
Posts: 246
t4nk is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
If you think angband's code is archaic, then take a look at poschengband.
Actually, I don't think it's TOO archaic. Some parts of it are (ui-object.c mentions Koeneke), but not even most of it. And the difference between more modern code (like, your stuff - assuming it's the same Pete Mack 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 at 09:44.
t4nk is offline   Reply With Quote
Old July 28, 2016, 16:51   #24
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,015
Donated: $40
Pete Mack is on a distinguished road
Thanks. I'll keep an eye on it. Looks like you haven't pushed any changes yet.
Pete Mack is offline   Reply With Quote
Old July 29, 2016, 11:18   #25
t4nk
Adept
 
Join Date: May 2016
Posts: 246
t4nk is on a distinguished road
What? I pushed tons of commits already!
t4nk is offline   Reply With Quote
Old July 29, 2016, 11:21   #26
Carnivean
Swordsman
 
Join Date: Sep 2013
Posts: 473
Carnivean is on a distinguished road
Quote:
Originally Posted by t4nk View Post
(like, your stuff - assuming it's the same Pete Mack
It's the same one.
Carnivean is offline   Reply With Quote
Old July 29, 2016, 12:08   #27
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,449
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by t4nk View Post
What? I pushed tons of commits already!
Wow, yeah, I haven't been watching - 120 commits ahead. I should read some of them
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old July 29, 2016, 13:48   #28
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,015
Donated: $40
Pete Mack is on a distinguished road
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.)

Quote:
Originally Posted by t4nk View Post
What? I pushed tons of commits already!
Pete Mack is offline   Reply With Quote
Old July 29, 2016, 14:16   #29
t4nk
Adept
 
Join Date: May 2016
Posts: 246
t4nk is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
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.)
There are numerous advantages in doing it this way, that's why all programming languages that have real strings (that is, not C) do it like that... what's really broken is C-style "strings"! I think I only have it in ui2-object.c, though? That's just a small optimization... since everything in there depends on max_len anyway (so changing these strings after building the object list is totally not recommended )
Besides, they ARE null terminated!

Last edited by t4nk; July 29, 2016 at 17:13.
t4nk is offline   Reply With Quote
Old July 31, 2016, 14:37   #30
t4nk
Adept
 
Join Date: May 2016
Posts: 246
t4nk is on a distinguished road
...... . ...!!! TILE/GLYPH PICKER I'll just nuke this garbage. Tile picker won't work anyway.
t4nk 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 20:04
Any benefit to eating when full? Ingwe Ingweron Vanilla 2 September 27, 2014 00:04
Fightless the full-casting mage fizzix AAR 65 July 27, 2010 08:11
Identification Reform Susramanian Vanilla 36 March 8, 2010 19:23
Help with diving (warning: long) bebo Vanilla 6 January 22, 2009 02:23


All times are GMT +1. The time now is 17:45.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.