Compiling Hengband: "fatal error: util.h: No such file or directory"
Collapse
X
-
-
Hm, the loose cursor blipping around the subwindows is more pronounced in live, I suppose just standing out more due to the latency. It's something I reported to them, but they don't play in Curses over there due to language support--I think--so it doesn't sound like Curses-specific bugs will be a priority for them. https://github.com/hengband/hengband/issues/2014 I tried comparing the cursor-handling bits I could spot in their main-gcu.cpp with Angband's main-gcu.c, buuut it was just "Greek" with minor variations to my non-coder self.
EDIT: Hah that's funny, Google Translate could handle it on the fly but not from a direct link, I guess. The original is https://github.com/hengband/hengband/pull/2024/filesLast edited by smbhax; January 28, 2022, 23:40.Comment
-
(And so it appears that they do have a team member who knows their way around Curses, which is awesome. Since Hourier said in their Discord developers channel that only Becky42 maintains main-g(c)u, I take it Discord Becky42 = Habu1010 on GitHub.)Comment
-
I remember having fixed cursor issues in other variants, it was a small one liner iirc but I don't remember which version it came from.
Anyway I'm working my way up fixing the curses frontend in ancestral versions, angband 2.8.3 is done, next up is zangband 2.2.8. I'll have to stop at a version of hengband prior to their C++ rewrite but maybe one of their devs will be able to check what I've done and take it from there.Comment
-
I remember having fixed cursor issues in other variants, it was a small one liner iirc but I don't remember which version it came from.
Anyway I'm working my way up fixing the curses frontend in ancestral versions, angband 2.8.3 is done, next up is zangband 2.2.8. I'll have to stop at a version of hengband prior to their C++ rewrite but maybe one of their devs will be able to check what I've done and take it from there.
I'm attaching my hacked main-gcu.cpp to this post. Here's a screenshot running in Cygwin (click thumbnail for the full size 1080p screen)--that map size you see there, 130x42 I think, is as big as it gets, even if you run with no subwindows:
The game also no longer assumes four subwindows from launch, instead requiring the usual command line parameters (like "-- -n4" or "-- -right 40x25,* -bottom *x7").
I don't know C *or* C++ so there are probably all kinds of horrible things going on here...but it compiles and runs, and *seems* to work in extremely limited testing. Maybe some person who actually knows things can work out what I've screwed up to prevent the map window from using the full area.
EDIT: As I found later in this thread, this actually is showing the viewport at full size; it happened to look smaller size because the "Yeek cave" beginner dungeon levels I was using for testing were smaller than the viewport size. ; ) So, this version **is** full screen, with -nN and PosChengband-style subwindow support, native Hengband colors, and habu's cursor fix.Attached FilesLast edited by smbhax; February 5, 2022, 05:49.Comment
-
Second attempt at it: this time I used Angband's main-gcu.c as the base and pasted in stuff from habu1010's main-gcu.cpp as necessary to clear compile errors. Had to remove some Angband mouse and advanced key handling stuff for which Hengband doesn't have support elsewhere--ditto with Angband's colors over Hengband's basic 16.
Dark colors come out slightly brighter in this version (my first version and regular Hengband are slightly dimmer to the same degree by comparison to it), I suppose because more of Angband's color handling got in this time. There's very little Hengband code and the file is 25% smaller than my first version...but the map rendering is still stuck at 130x42 max for some reason.
With this Angbandy-er version, the brightness level of the darker colors now just about matches the colors in Hengband's graphical Windows client, actually. But the dark colors as rendered by the Hengband color-handling GCU code are much more accurate to the actual RGB values in the color table in term/gameterm.cpp. (And easier on the eyes...so I'm going to stick with my version 1 over this more Angband-ified version 2.)
I went looking for map size limits in other files, didn't find anything but of course I don't know what I'm looking for.Attached FilesLast edited by smbhax; January 30, 2022, 11:24.Comment
-
Oh. Okay, I think these are actually showing the full size possible--it's just that that's the maximum dimensions of those "Yeek cave" dungeon floors; the map view wouldn't seem "small" except for how Hengband fills in the space with those gray "x" marks where you haven't cast Detect Traps (you can turn that off in an option).
In the wilderness, the map sizes are a bit bigger:
That's just the full extent of the pre-rendered map tile.
These are also the sizes you see if you maximize your main window in Hengband's Windows graphical client.
So anyway, I guess either of those two versions of main-gcu.cpp actually do the trick: the first is more RGB-color-table-accurate, keeps the colors of current GCU Hengband, and more Hengband code; the second is more current Angband code, with weirdly brightened dark colors--approximately matching how they come out in Hengband's Windows graphical client, as it happens. I'm no coder so they are probably doing horrible things somehow somewhere, but they seem to compile and run okay for me in Cygwin (with the --disable-japanese configure option; haven't tested them without that), at least.Last edited by smbhax; January 30, 2022, 12:45.Comment
-
Just to vent; it never even occurred to me that I could simply walk into main-gcu on 3.0.0 and I spent some time yesterday bashing my head against 2.2.1r2 and that was weird. I was able to completely remove the code that divided the terminal into subwindows there and the terminal was still being divided into subwindows, it was maddening.
Also don't feel bad about just copy pasting bits of code, that's all I do, it's how the "-- -right 40x25,* -bottom *x7" syntax got into angband in the first place (I copy-pasted from poschengband)Comment
-
Just to vent; it never even occurred to me that I could simply walk into main-gcu on 3.0.0 and I spent some time yesterday bashing my head against 2.2.1r2 and that was weird. I was able to completely remove the code that divided the terminal into subwindows there and the terminal was still being divided into subwindows, it was maddening.
Also don't feel bad about just copy pasting bits of code, that's all I do, it's how the "-- -right 40x25,* -bottom *x7" syntax got into angband in the first place (I copy-pasted from poschengband)
Good to know about those subwindow size parameters, they do seem like a bit of alien code. ^_^
Good luck with it! I can't say it was easy exactly, but going from Hengband to Angband I just copied in the stuff that seemed like it had to do with subwindows, then walked it back as compile errors came up. Going from Angband to Hengband got a little more intense, particularly when everything compiled except for a conversion or something error about
Code:t->text_hook = Term_text_gcu;
Code:static errr Term_text_gcu(int x, int y, int n, int a, const wchar_t *s)
Code:static errr Term_text_gcu(int x, int y, int n, byte a, concptr s)
Comment
-
yeah both variants have gone their own separate ways... a LONG way, since 2.8.1 which is why I assumed it wouldn't be this easy. Z 2.2.8 was actually more like angband 2.8.3 than it was like angband 2.8.1, which was a relief since I couldn't fix 2.8.1 (I tried). When I fix variants I usually try to find the earliest version of V which has the feature I want and copying from there, since 4.x is so different. I managed z 2.2.8 by reference to z 2.5.2.
Anyway I'm going to take a crack at heng 3.0.0 myself just because I want to do it myself. But you can still take credit for being the first.Comment
-
Yeah you'll probably be able to keep some things I had to throw out. : ) I'm just kicking myself for missing the "One does not simply WALK into main-gcu" joke. ^_^Comment
-
Okay so the bigscreen fix itself was incredibly simple, I only had too parse a -b arg and add an if else with a handful of extra lines of code, but I went large and also included the poschengband subwindow layout so it looks scarier than it is
Comment
-
Okay so the bigscreen fix itself was incredibly simple, I only had too parse a -b arg and add an if else with a handful of extra lines of code, but I went large and also included the poschengband subwindow layout so it looks scarier than it is
https://github.com/hengband/hengband/pull/2037Comment
-
The "-- -o" to use the old subwindow layout won't be too confusing with the older "-o" option for "use original keyset," I suppose?Comment
Comment