[Announce] English Translation for Hengband Touhou Katteban v1.1.95
Collapse
X
-
How does the ladder determine winners? I see it's not properly marking winning dumps, despite them having '..You retired from the adventure' like in Hengband.Comment
-
Comment
-
-
Really struggling to compile this on ubuntu for a terminal; can BackwardsEric help?
More: Using makefile.std. Can't find the ja_jp.eucJP locale with ubuntu, only the ja_JP.utf8 one. iconv throws an error when I set -f as any of the available versions of EUCJP EUC-JP etc.Comment
-
I used makefile.bcc to compile on Win - that file should have all required source files. Unfortunately, I can't help with compiling for other platforms; all I can say is that it was forked off some early 2.x.x Hengband version - at very least, it has Cockatrice and Mind Worms.Comment
-
-
Did you want the text to be displayed in Japanese? It looks like you would get an English version by commenting out line 112 of makefile.std; that would avoid the locale issues. If you want Japanese and only have a ja_JP.utf8 locale, I'd suspect that's going to require some code surgery - probably easiest would be to insert an EUC to UTF-8 conversion in Term_text_gcu() since the rest of the code doesn't look like it's ready to use UTF-8. The modern Mac frontend for Hengband does something similar for Japanese text (an EUC-JP to UTF-32 conversion) but it leans on conversions built into macOS's NSString/CFString.Comment
-
Did you want the text to be displayed in Japanese? It looks like you would get an English version by commenting out line 112 of makefile.std; that would avoid the locale issues. If you want Japanese and only have a ja_JP.utf8 locale, I'd suspect that's going to require some code surgery - probably easiest would be to insert an EUC to UTF-8 conversion in Term_text_gcu() since the rest of the code doesn't look like it's ready to use UTF-8. The modern Mac frontend for Hengband does something similar for Japanese text (an EUC-JP to UTF-32 conversion) but it leans on conversions built into macOS's NSString/CFString.Comment
-
The readme for this version says you need to use the japanese locale to make it work.. appliccable to windows only or not I'm not sure. It would not compile when I commented that line out either; I don't think defines.h is being read because the compiler starts complaining that the things defined there are not defined; grep considers defines.h a binary file, perhaps this is related? I gather that multibyte encodings for text are at play. Presumably the compiler needs to understand the locale. I tried converting some complaining files like defines.h into UTF-8 and setting the japanese locale I did have in the makefile but the build still doesn't complete.Comment
-
This is what I did to get it to compile and link on Debian 11 with Debian's packaged version of gcc 10.2.1 as the compiler:
- Install the nkf package. Later steps will use the nkf utility to change the encoding of the Japanese characters in the source files to EUC-JP so they don't confuse the compiler.
- Apply the attached patch by running "git am -i path_to_file_with_patch_information" from within the directories for the Touhou Katteban source code. That sets up a compiler wrapper script (largely borrowed from Hengband 2 for converting the character encoding of .c files), modifies externs.h to avoid duplicate symbol errors from the linker, hacks main.c to avoid some linker errors and a runtime error at startup, and hacks makefile.std to update the list of needed source files, disable display of Japanese text, and use the wrapper script for compiling.
- Change the character encoding of defines.h by running this in the src directory: "mv defines.h defines.h.good; nkf -e defines.h.good > defines.h".
- Compile and link by running "make -f makefile.std" in the src directory.
The result of compiling and linking runs and gets to the character generation screen. I didn't keep running it to see if there were any issues lurking further on.Attached FilesComment
-
-
-
With those changes, this procedure,
- Edit src/makefile.std to comment out the "JP_OPT= ..." line.
- In a terminal window, change directories to the src directory and run "make -f makefile.std".
, worked to compile an English version on Debian 11. It does require access to the nkf utility, https://osdn.net/projects/nkf/ , in the path; on Debian or Ubuntu you can get that by installing the nkf package . I can work up a change to the README to document that if you like.Last edited by backwardsEric; June 13, 2022, 13:44. Reason: added note that it needs the nkf utilityComment
Comment