From 333fc71b8632a3f6fbf72462b73b1e241010b0c6 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Sat, 15 Oct 2022 09:05:58 -0400 Subject: [PATCH 01/22] Provide characters missing from Terminus fonts --- sys/msdos/fonts/makefont.lua | 116 +++++++++++++++----------- sys/msdos/fonts/nh-u16b.bdf | 68 +++++++++++++++ sys/msdos/fonts/nh-u16v.bdf | 68 +++++++++++++++ sys/msdos/fonts/nh-u18b.bdf | 74 ++++++++++++++++ sys/msdos/fonts/nh-u20b.bdf | 80 ++++++++++++++++++ sys/msdos/fonts/nh-u22b.bdf | 86 +++++++++++++++++++ sys/msdos/fonts/nh-u24b.bdf | 92 ++++++++++++++++++++ sys/msdos/fonts/nh-u28b.bdf | 104 +++++++++++++++++++++++ sys/msdos/fonts/nh-u32b.bdf | 116 ++++++++++++++++++++++++++ sys/unix/hints/include/cross-post.370 | 32 +++---- 10 files changed, 770 insertions(+), 66 deletions(-) create mode 100644 sys/msdos/fonts/nh-u16b.bdf create mode 100644 sys/msdos/fonts/nh-u16v.bdf create mode 100644 sys/msdos/fonts/nh-u18b.bdf create mode 100644 sys/msdos/fonts/nh-u20b.bdf create mode 100644 sys/msdos/fonts/nh-u22b.bdf create mode 100644 sys/msdos/fonts/nh-u24b.bdf create mode 100644 sys/msdos/fonts/nh-u28b.bdf create mode 100644 sys/msdos/fonts/nh-u32b.bdf diff --git a/sys/msdos/fonts/makefont.lua b/sys/msdos/fonts/makefont.lua index c953f6aae..78ec760dd 100755 --- a/sys/msdos/fonts/makefont.lua +++ b/sys/msdos/fonts/makefont.lua @@ -94,65 +94,81 @@ bwidth = nil glyph = nil bitmap = false -if arg[2] == nil or arg[3] ~= nil then - io.stderr:write("Usage: " .. arg[0] .. " \n") +if #arg < 2 then + io.stderr:write("Usage: " .. arg[0] .. " [...] \n") os.exit(1) end -fp = io.open(arg[1], "r") +for inp = 1, #arg-1 do -while true do - line = fp:read() - if (line == fail) then - break + fp = io.open(arg[inp], "r") + if fp == nil then + io.stderr:write("Could not open: " .. arg[inp] .. "\n") + os.exit(1) end - if start_with(line, 'FONTBOUNDINGBOX ') then - -- Width and height of a glyph - rec = split(line) - width = rec[2] - height = rec[3] - bwidth = math.floor((width + 7) / 8) - elseif start_with(line, 'STARTCHAR ') then - -- A glyph begins here - glyph = new_glyph(width, height) - elseif start_with(line, 'ENCODING ') then - -- This line provides the Unicode code point - rec = split(line) - glyph.code[#glyph.code+1] = tonumber(rec[2]) - elseif start_with(line, 'BITMAP') then - -- Bitmap data appears on following lines - bitmap = true - elseif start_with(line, 'ENDCHAR') then - -- End of bitmap data - -- Position will be according to IBM437 if the code point is in IBM437, - -- else matching any prior occurrence if the same glyph has appeared - -- before, else as a new glyph - pos = ibm437_rev[glyph.code[1]] or font_by_bytes[glyph.bytes] - if pos == nil then - pos = next_pos - next_pos = next_pos + 1 + + while true do + line = fp:read() + if (line == fail) then + break end - if font[pos] == nil then - font[pos] = glyph - font_by_bytes[glyph.bytes] = pos - else - for i = 1, #glyph.code do - font[pos].code[#font[pos].code+1] = glyph.code[i] + if start_with(line, 'FONTBOUNDINGBOX ') then + -- Width and height of a glyph + rec = split(line) + if inp == 1 then + -- First input file sets the dimensions + width = tonumber(rec[2]) + height = tonumber(rec[3]) + bwidth = math.floor((width + 7) / 8) + else + -- Any others must match, or an error results + if width ~= tonumber(rec[2]) or height ~= tonumber(rec[3]) then + io.stderr:write(arg[inp] .. " bounding box does not match that of " .. arg[1] .. "\n") + os.exit(1) + end + end + elseif start_with(line, 'STARTCHAR ') then + -- A glyph begins here + glyph = new_glyph(width, height) + elseif start_with(line, 'ENCODING ') then + -- This line provides the Unicode code point + rec = split(line) + glyph.code[#glyph.code+1] = tonumber(rec[2]) + elseif start_with(line, 'BITMAP') then + -- Bitmap data appears on following lines + bitmap = true + elseif start_with(line, 'ENDCHAR') then + -- End of bitmap data + -- Position will be according to IBM437 if the code point is in + -- IBM437, else matching any prior occurrence if the same glyph has + -- appeared before, else as a new glyph + pos = ibm437_rev[glyph.code[1]] or font_by_bytes[glyph.bytes] + if pos == nil then + pos = next_pos + next_pos = next_pos + 1 + end + if font[pos] == nil then + font[pos] = glyph + font_by_bytes[glyph.bytes] = pos + else + for i = 1, #glyph.code do + font[pos].code[#font[pos].code+1] = glyph.code[i] + end + end + font_by_code[glyph.code[1]] = pos + glyph = nil + bitmap = false + elseif bitmap then + -- Hex data after BITMAP and before ENDCHAR + for i = 1, bwidth do + byte = string.sub(line, i*2-1, i*2) + glyph.bytes = glyph.bytes .. string.char(tonumber(byte, 16)) end end - font_by_code[glyph.code[1]] = pos - glyph = nil - bitmap = false - elseif bitmap then - -- Hex data after BITMAP and before ENDCHAR - for i = 1, bwidth do - byte = string.sub(line, i*2-1, i*2) - glyph.bytes = glyph.bytes .. string.char(tonumber(byte, 16)) - end end -end -fp:close() + fp:close() +end -- The provided BDFs code positions 16 and 17 differently from what NetHack -- expects @@ -182,7 +198,7 @@ for i = 1, 256 do end end -outfile = io.open(arg[2], "wb") +outfile = io.open(arg[#arg], "wb") -- Write the PSF header outfile:write("\x72\xB5\x4A\x86") -- magic diff --git a/sys/msdos/fonts/nh-u16b.bdf b/sys/msdos/fonts/nh-u16b.bdf new file mode 100644 index 000000000..a4b9cb633 --- /dev/null +++ b/sys/msdos/fonts/nh-u16b.bdf @@ -0,0 +1,68 @@ +STARTFONT 2.1 +FONTBOUNDINGBOX 8 16 +STARTPROPERTIES 3 +NOTICE "Additional characters to use with ter-u16b.bdf" +COPYRIGHT "Copyright 2022 Ray Chason." +NOTICE "NetHack may be freely redistributed. See license for details." +ENDPROPERTIES +STARTCHAR tripletilde +ENCODING 8779 +BITMAP +00 +00 +00 +00 +32 +4C +00 +32 +4C +00 +32 +4C +00 +00 +00 +00 +ENDCHAR +STARTCHAR uppereighth +ENCODING 9620 +BITMAP +FF +FF +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR righteighth +ENCODING 9621 +BITMAP +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +ENDCHAR +ENDFONT diff --git a/sys/msdos/fonts/nh-u16v.bdf b/sys/msdos/fonts/nh-u16v.bdf new file mode 100644 index 000000000..7bd2669e0 --- /dev/null +++ b/sys/msdos/fonts/nh-u16v.bdf @@ -0,0 +1,68 @@ +STARTFONT 2.1 +FONTBOUNDINGBOX 8 16 +STARTPROPERTIES 3 +NOTICE "Additional characters to use with ter-u16v.bdf" +COPYRIGHT "Copyright 2022 Ray Chason." +NOTICE "NetHack may be freely redistributed. See license for details." +ENDPROPERTIES +STARTCHAR tripletilde +ENCODING 8779 +BITMAP +00 +00 +00 +00 +32 +4C +00 +32 +4C +00 +32 +4C +00 +00 +00 +00 +ENDCHAR +STARTCHAR uppereighth +ENCODING 9620 +BITMAP +FF +FF +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR righteighth +ENCODING 9621 +BITMAP +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +01 +ENDCHAR +ENDFONT diff --git a/sys/msdos/fonts/nh-u18b.bdf b/sys/msdos/fonts/nh-u18b.bdf new file mode 100644 index 000000000..11a4b1176 --- /dev/null +++ b/sys/msdos/fonts/nh-u18b.bdf @@ -0,0 +1,74 @@ +STARTFONT 2.1 +FONTBOUNDINGBOX 10 18 +STARTPROPERTIES 3 +NOTICE "Additional characters to use with ter-u18b.bdf" +COPYRIGHT "Copyright 2022 Ray Chason." +NOTICE "NetHack may be freely redistributed. See license for details." +ENDPROPERTIES +STARTCHAR tripletilde +ENCODING 8779 +BITMAP +0000 +0000 +0000 +3100 +4900 +4600 +0000 +3100 +4900 +4600 +0000 +3100 +4900 +4600 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR uppereighth +ENCODING 9620 +BITMAP +FFC0 +FFC0 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR righteighth +ENCODING 9621 +BITMAP +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +ENDCHAR +ENDFONT diff --git a/sys/msdos/fonts/nh-u20b.bdf b/sys/msdos/fonts/nh-u20b.bdf new file mode 100644 index 000000000..702269414 --- /dev/null +++ b/sys/msdos/fonts/nh-u20b.bdf @@ -0,0 +1,80 @@ +STARTFONT 2.1 +FONTBOUNDINGBOX 10 20 +STARTPROPERTIES 3 +NOTICE "Additional characters to use with ter-u20b.bdf" +COPYRIGHT "Copyright 2022 Ray Chason." +NOTICE "NetHack may be freely redistributed. See license for details." +ENDPROPERTIES +STARTCHAR tripletilde +ENCODING 8779 +BITMAP +0000 +0000 +0000 +0000 +3100 +4900 +4600 +0000 +3100 +4900 +4600 +0000 +3100 +4900 +4600 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR uppereighth +ENCODING 9620 +BITMAP +FFC0 +FFC0 +FFC0 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR righteighth +ENCODING 9621 +BITMAP +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +0040 +ENDCHAR +ENDFONT diff --git a/sys/msdos/fonts/nh-u22b.bdf b/sys/msdos/fonts/nh-u22b.bdf new file mode 100644 index 000000000..15de8d761 --- /dev/null +++ b/sys/msdos/fonts/nh-u22b.bdf @@ -0,0 +1,86 @@ +STARTFONT 2.1 +FONTBOUNDINGBOX 11 22 +STARTPROPERTIES 3 +NOTICE "Additional characters to use with ter-u22b.bdf" +COPYRIGHT "Copyright 2022 Ray Chason." +NOTICE "NetHack may be freely redistributed. See license for details." +ENDPROPERTIES +STARTCHAR tripletilde +ENCODING 8779 +BITMAP +0000 +0000 +0000 +0000 +0000 +3080 +4C80 +4300 +0000 +3080 +4C80 +4300 +0000 +3080 +4C80 +4300 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR uppereighth +ENCODING 9620 +BITMAP +FFE0 +FFE0 +FFE0 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR righteighth +ENCODING 9621 +BITMAP +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +0060 +ENDCHAR +ENDFONT diff --git a/sys/msdos/fonts/nh-u24b.bdf b/sys/msdos/fonts/nh-u24b.bdf new file mode 100644 index 000000000..bea34cc68 --- /dev/null +++ b/sys/msdos/fonts/nh-u24b.bdf @@ -0,0 +1,92 @@ +STARTFONT 2.1 +FONTBOUNDINGBOX 12 24 +STARTPROPERTIES 3 +NOTICE "Additional characters to use with ter-u24b.bdf" +COPYRIGHT "Copyright 2022 Ray Chason." +NOTICE "NetHack may be freely redistributed. See license for details." +ENDPROPERTIES +STARTCHAR tripletilde +ENCODING 8779 +BITMAP +0000 +0000 +0000 +0000 +0000 +0000 +3C60 +6660 +63C0 +0000 +3C60 +6660 +63C0 +0000 +3C60 +6660 +63C0 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR uppereighth +ENCODING 9620 +BITMAP +FFF0 +FFF0 +FFF0 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR righteighth +ENCODING 9621 +BITMAP +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +0030 +ENDCHAR +ENDFONT diff --git a/sys/msdos/fonts/nh-u28b.bdf b/sys/msdos/fonts/nh-u28b.bdf new file mode 100644 index 000000000..2b3954771 --- /dev/null +++ b/sys/msdos/fonts/nh-u28b.bdf @@ -0,0 +1,104 @@ +STARTFONT 2.1 +FONTBOUNDINGBOX 14 28 +STARTPROPERTIES 3 +NOTICE "Additional characters to use with ter-u28b.bdf" +COPYRIGHT "Copyright 2022 Ray Chason." +NOTICE "NetHack may be freely redistributed. See license for details." +ENDPROPERTIES +STARTCHAR tripletilde +ENCODING 8779 +BITMAP +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1C30 +3630 +6360 +61C0 +0000 +1C30 +3630 +6360 +61C0 +0000 +1C30 +3630 +6360 +61C0 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR uppereighth +ENCODING 9620 +BITMAP +FFFC +FFFC +FFFC +FFFC +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR righteighth +ENCODING 9621 +BITMAP +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +000C +ENDCHAR +ENDFONT diff --git a/sys/msdos/fonts/nh-u32b.bdf b/sys/msdos/fonts/nh-u32b.bdf new file mode 100644 index 000000000..e5cf7f2a8 --- /dev/null +++ b/sys/msdos/fonts/nh-u32b.bdf @@ -0,0 +1,116 @@ +STARTFONT 2.1 +FONTBOUNDINGBOX 16 32 +STARTPROPERTIES 3 +NOTICE "Additional characters to use with ter-u32b.bdf" +COPYRIGHT "Copyright 2022 Ray Chason." +NOTICE "NetHack may be freely redistributed. See license for details." +ENDPROPERTIES +STARTCHAR tripletilde +ENCODING 8779 +BITMAP +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +1F0C +3F9C +39FC +30F8 +0000 +0000 +1F0C +3F9C +39FC +30F8 +0000 +0000 +1F0C +3F9C +39FC +30F8 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR uppereighth +ENCODING 9620 +BITMAP +FFFF +FFFF +FFFF +FFFF +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR righteighth +ENCODING 9621 +BITMAP +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +0002 +ENDCHAR +ENDFONT diff --git a/sys/unix/hints/include/cross-post.370 b/sys/unix/hints/include/cross-post.370 index 693f7c9c4..4a1f9e109 100644 --- a/sys/unix/hints/include/cross-post.370 +++ b/sys/unix/hints/include/cross-post.370 @@ -25,22 +25,22 @@ $(TARGETPFX)exceptn.o : ../lib/djgpp/djgpp-patch/src/libc/go32/exceptn.S $(GAMEBIN) : $(HOBJ) $(LUACROSSLIB) $(TARGET_LINK) $(TARGET_LFLAGS) -o $(GAMEBIN) \ $(HOBJ) $(WINLIB) $(TARGET_LIBS) -$(FONTDIR)/ter-u16b.psf: $(FONTTOP)/ter-u16b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u16b.bdf $@ -$(FONTDIR)/ter-u16v.psf: $(FONTTOP)/ter-u16v.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u16v.bdf $@ -$(FONTDIR)/ter-u18b.psf: $(FONTTOP)/ter-u18b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u18b.bdf $@ -$(FONTDIR)/ter-u20b.psf: $(FONTTOP)/ter-u20b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u20b.bdf $@ -$(FONTDIR)/ter-u22b.psf: $(FONTTOP)/ter-u22b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u22b.bdf $@ -$(FONTDIR)/ter-u24b.psf: $(FONTTOP)/ter-u24b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u24b.bdf $@ -$(FONTDIR)/ter-u28b.psf: $(FONTTOP)/ter-u28b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u28b.bdf $@ -$(FONTDIR)/ter-u32b.psf: $(FONTTOP)/ter-u32b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u32b.bdf $@ +$(FONTDIR)/ter-u16b.psf: $(FONTTOP)/ter-u16b.bdf ../sys/msdos/fonts/nh-u16b.bdf $(FONTDIR)/makefont.lua $(LUABIN) + $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u16b.bdf ../sys/msdos/fonts/nh-u16b.bdf $@ +$(FONTDIR)/ter-u16v.psf: $(FONTTOP)/ter-u16v.bdf ../sys/msdos/fonts/nh-u16v.bdf $(FONTDIR)/makefont.lua $(LUABIN) + $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u16v.bdf ../sys/msdos/fonts/nh-u16v.bdf $@ +$(FONTDIR)/ter-u18b.psf: $(FONTTOP)/ter-u18b.bdf ../sys/msdos/fonts/nh-u18b.bdf $(FONTDIR)/makefont.lua $(LUABIN) + $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u18b.bdf ../sys/msdos/fonts/nh-u18b.bdf $@ +$(FONTDIR)/ter-u20b.psf: $(FONTTOP)/ter-u20b.bdf ../sys/msdos/fonts/nh-u20b.bdf $(FONTDIR)/makefont.lua $(LUABIN) + $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u20b.bdf ../sys/msdos/fonts/nh-u20b.bdf $@ +$(FONTDIR)/ter-u22b.psf: $(FONTTOP)/ter-u22b.bdf ../sys/msdos/fonts/nh-u22b.bdf $(FONTDIR)/makefont.lua $(LUABIN) + $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u22b.bdf ../sys/msdos/fonts/nh-u22b.bdf $@ +$(FONTDIR)/ter-u24b.psf: $(FONTTOP)/ter-u24b.bdf ../sys/msdos/fonts/nh-u24b.bdf $(FONTDIR)/makefont.lua $(LUABIN) + $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u24b.bdf ../sys/msdos/fonts/nh-u24b.bdf $@ +$(FONTDIR)/ter-u28b.psf: $(FONTTOP)/ter-u28b.bdf ../sys/msdos/fonts/nh-u28b.bdf $(FONTDIR)/makefont.lua $(LUABIN) + $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u28b.bdf ../sys/msdos/fonts/nh-u28b.bdf $@ +$(FONTDIR)/ter-u32b.psf: $(FONTTOP)/ter-u32b.bdf ../sys/msdos/fonts/nh-u32b.bdf $(FONTDIR)/makefont.lua $(LUABIN) + $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u32b.bdf ../sys/msdos/fonts/nh-u32b.bdf $@ # .PHONY: dodata dospkg dosfonts dosfonts: $(FONTTARGETS) From d4bb4758aa5f19512f57030ac94e8168b586e614 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 9 Oct 2022 10:39:50 -0400 Subject: [PATCH 02/22] transcribe dependencies from sys/unix/Makefile.src Transcribe the dependencies from sys/unix/Makefile.src to sys/msdos/Makefile.GCC and sys/windows/Makefile.nmake to bring them up to date. --- sys/msdos/Makefile.GCC | 131 +++++++++++++++++++++++-------------- sys/windows/Makefile.nmake | 116 ++++++++++++++++---------------- 2 files changed, 139 insertions(+), 108 deletions(-) diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index 61bdc0e83..92c4737fc 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -1079,28 +1079,28 @@ TARGET_CFLAGS=$(cflags) # config.h timestamp #$(CONFIG_H): ../include/config.h ../include/config1.h ../include/patchlevel.h \ -# ../include/tradstdc.h ../include/global.h ../include/coord.h \ -# ../include/vmsconf.h ../include/system.h ../include/nhlua.h \ -# ../include/unixconf.h ../include/pcconf.h ../include/micro.h \ -# ../include/windconf.h ../include/warnings.h \ -# ../include/fnamesiz.h +# ../include/tradstdc.h ../include/integer.h \ +# ../include/global.h ../include/coord.h ../include/vmsconf.h \ +# ../include/system.h ../include/nhlua.h ../include/unixconf.h \ +# ../include/pcconf.h ../include/micro.h ../include/windconf.h \ +# ../include/warnings.h ../include/fnamesiz.h # touch $(CONFIG_H) # hack.h timestamp #$(HACK_H): ../include/hack.h $(CONFIG_H) ../include/lint.h ../include/align.h \ -# ../include/dungeon.h ../include/sym.h ../include/defsym.h \ -# ../include/mkroom.h ../include/artilist.h \ +# ../include/dungeon.h ../include/wintype.h ../include/sym.h \ +# ../include/defsym.h ../include/mkroom.h ../include/artilist.h \ # ../include/objclass.h ../include/objects.h \ # ../include/youprop.h ../include/prop.h ../include/permonst.h \ # ../include/monattk.h ../include/monflag.h \ # ../include/monsters.h ../include/mondata.h \ -# ../include/wintype.h ../include/context.h ../include/rm.h \ -# ../include/botl.h ../include/rect.h ../include/region.h \ +# ../include/context.h ../include/rm.h ../include/botl.h \ +# ../include/rect.h ../include/region.h ../include/trap.h \ +# ../include/display.h ../include/vision.h ../include/color.h \ # ../include/decl.h ../include/quest.h ../include/spell.h \ -# ../include/color.h ../include/obj.h ../include/engrave.h \ -# ../include/you.h ../include/attrib.h ../include/monst.h \ -# ../include/mextra.h ../include/skills.h ../include/timeout.h \ -# ../include/trap.h ../include/flag.h ../include/vision.h \ -# ../include/display.h ../include/winprocs.h ../include/sys.h +# ../include/obj.h ../include/engrave.h ../include/you.h \ +# ../include/attrib.h ../include/monst.h ../include/mextra.h \ +# ../include/skills.h ../include/timeout.h ../include/flag.h \ +# ../include/winprocs.h ../include/sys.h # touch $(HACK_H) # $(TARGETPFX)pcmain.o: ../sys/share/pcmain.c $(HACK_H) ../include/dlb.h @@ -1197,7 +1197,7 @@ $(TARGETPFX)winval.o: ../win/X11/winval.c $(HACK_H) ../include/winX.h $(TARGETPFX)tile.o: tile.c $(HACK_H) $(TARGETPFX)winshim.o: ../win/shim/winshim.c $(HACK_H) $(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ ../win/shim/winshim.c -$(TARGETPFX)cppregex.o: ../sys/share/cppregex.cpp +$(TARGETPFX)cppregex.o: ../sys/share/cppregex.cpp $(CONFIG_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../sys/share/cppregex.cpp $(TARGETPFX)qt_bind.o: ../win/Qt/qt_bind.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_bind.h ../win/Qt/qt_main.h \ @@ -1207,35 +1207,37 @@ $(TARGETPFX)qt_bind.o: ../win/Qt/qt_bind.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_rip.h ../win/Qt/qt_msg.h ../win/Qt/qt_plsel.h \ ../win/Qt/qt_svsel.h ../win/Qt/qt_set.h ../win/Qt/qt_stat.h \ ../win/Qt/qt_icon.h ../win/Qt/qt_streq.h ../win/Qt/qt_line.h \ - ../win/Qt/qt_yndlg.h ../win/Qt/qt_str.h ../include/dlb.h + ../win/Qt/qt_yndlg.h ../win/Qt/qt_str.h ../include/dlb.h \ + $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_bind.cpp $(TARGETPFX)qt_click.o: ../win/Qt/qt_click.cpp $(HACK_H) ../win/Qt/qt_pre.h \ - ../win/Qt/qt_post.h ../win/Qt/qt_click.h + ../win/Qt/qt_post.h ../win/Qt/qt_click.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_click.cpp -$(TARGETPFX)qt_clust.o: ../win/Qt/qt_clust.cpp ../win/Qt/qt_clust.h +$(TARGETPFX)qt_clust.o: ../win/Qt/qt_clust.cpp ../win/Qt/qt_clust.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_clust.cpp $(TARGETPFX)qt_delay.o: ../win/Qt/qt_delay.cpp $(HACK_H) ../win/Qt/qt_pre.h \ - ../win/Qt/qt_post.h ../win/Qt/qt_delay.h + ../win/Qt/qt_post.h ../win/Qt/qt_delay.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_delay.cpp -$(TARGETPFX)qt_glyph.o: ../win/Qt/qt_glyph.cpp $(HACK_H) ../include/tile2x11.h \ - ../win/Qt/qt_pre.h ../win/Qt/qt_post.h ../win/Qt/qt_glyph.h \ - ../win/Qt/qt_bind.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \ - ../win/Qt/qt_set.h ../win/Qt/qt_inv.h ../win/Qt/qt_map.h \ - ../win/Qt/qt_win.h ../win/Qt/qt_clust.h ../win/Qt/qt_str.h +$(TARGETPFX)qt_glyph.o: ../win/Qt/qt_glyph.cpp $(HACK_H) \ + ../include/tile2x11.h ../win/Qt/qt_pre.h ../win/Qt/qt_post.h \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_bind.h ../win/Qt/qt_main.h \ + ../win/Qt/qt_kde0.h ../win/Qt/qt_set.h ../win/Qt/qt_inv.h \ + ../win/Qt/qt_map.h ../win/Qt/qt_win.h ../win/Qt/qt_clust.h \ + ../win/Qt/qt_str.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_glyph.cpp $(TARGETPFX)qt_icon.o: ../win/Qt/qt_icon.cpp $(HACK_H) ../win/Qt/qt_pre.h \ - ../win/Qt/qt_post.h ../win/Qt/qt_icon.h + ../win/Qt/qt_post.h ../win/Qt/qt_icon.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_icon.cpp $(TARGETPFX)qt_inv.o: ../win/Qt/qt_inv.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_inv.h ../win/Qt/qt_glyph.h \ ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_set.h \ - ../win/Qt/qt_bind.h + ../win/Qt/qt_bind.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_inv.cpp $(TARGETPFX)qt_key.o: ../win/Qt/qt_key.cpp $(HACK_H) ../win/Qt/qt_pre.h \ - ../win/Qt/qt_post.h ../win/Qt/qt_key.h + ../win/Qt/qt_post.h ../win/Qt/qt_key.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_key.cpp $(TARGETPFX)qt_line.o: ../win/Qt/qt_line.cpp $(HACK_H) ../win/Qt/qt_pre.h \ - ../win/Qt/qt_post.h ../win/Qt/qt_line.h + ../win/Qt/qt_post.h ../win/Qt/qt_line.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_line.cpp $(TARGETPFX)qt_main.o: ../win/Qt/qt_main.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \ @@ -1243,57 +1245,62 @@ $(TARGETPFX)qt_main.o: ../win/Qt/qt_main.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_inv.h ../win/Qt/qt_key.h ../win/Qt/qt_map.h \ ../win/Qt/qt_win.h ../win/Qt/qt_clust.h ../win/Qt/qt_msg.h \ ../win/Qt/qt_set.h ../win/Qt/qt_stat.h ../win/Qt/qt_icon.h \ - ../win/Qt/qt_str.h qt_kde0.moc + ../win/Qt/qt_str.h qt_kde0.moc $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_main.cpp $(TARGETPFX)qt_map.o: ../win/Qt/qt_map.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_map.h ../win/Qt/qt_win.h \ ../win/Qt/qt_clust.h qt_map.moc ../win/Qt/qt_click.h \ ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_bind.h \ - ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_str.h + ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_str.h \ + $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_map.cpp $(TARGETPFX)qt_menu.o: ../win/Qt/qt_menu.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_menu.h ../win/Qt/qt_win.h \ ../win/Qt/qt_rip.h qt_menu.moc ../win/Qt/qt_key.h \ ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_bind.h \ ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_streq.h \ - ../win/Qt/qt_line.h ../win/Qt/qt_str.h + ../win/Qt/qt_line.h ../win/Qt/qt_str.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_menu.cpp $(TARGETPFX)qt_msg.o: ../win/Qt/qt_msg.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_msg.h ../win/Qt/qt_win.h \ qt_msg.moc ../win/Qt/qt_map.h ../win/Qt/qt_clust.h \ ../win/Qt/qt_set.h ../win/Qt/qt_bind.h ../win/Qt/qt_main.h \ - ../win/Qt/qt_kde0.h ../win/Qt/qt_str.h + ../win/Qt/qt_kde0.h ../win/Qt/qt_str.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_msg.cpp $(TARGETPFX)qt_plsel.o: ../win/Qt/qt_plsel.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_plsel.h qt_plsel.moc \ ../win/Qt/qt_bind.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \ - ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h + ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h \ + $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_plsel.cpp $(TARGETPFX)qt_rip.o: ../win/Qt/qt_rip.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_rip.h ../win/Qt/qt_bind.h \ - ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_str.h + ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_str.h \ + $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_rip.cpp $(TARGETPFX)qt_set.o: ../win/Qt/qt_set.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_set.h ../win/Qt/qt_bind.h \ ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h qt_set.moc \ - ../win/Qt/qt_glyph.h ../win/Qt/qt_xcmd.h ../win/Qt/qt_str.h + ../win/Qt/qt_glyph.h ../win/Qt/qt_xcmd.h ../win/Qt/qt_str.h \ + $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_set.cpp $(TARGETPFX)qt_stat.o: ../win/Qt/qt_stat.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_stat.h ../win/Qt/qt_win.h \ ../win/Qt/qt_icon.h qt_stat.moc ../win/Qt/qt_set.h \ ../win/Qt/qt_bind.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \ - ../win/Qt/qt_str.h ../win/Qt/qt_xpms.h + ../win/Qt/qt_str.h ../win/Qt/qt_xpms.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_stat.cpp -$(TARGETPFX)qt_str.o: ../win/Qt/qt_str.cpp ../win/Qt/qt_str.h +$(TARGETPFX)qt_str.o: ../win/Qt/qt_str.cpp ../win/Qt/qt_str.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_str.cpp $(TARGETPFX)qt_streq.o: ../win/Qt/qt_streq.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_streq.h ../win/Qt/qt_line.h \ ../win/Qt/qt_str.h ../win/Qt/qt_set.h ../win/Qt/qt_bind.h \ - ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h + ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_streq.cpp $(TARGETPFX)qt_svsel.o: ../win/Qt/qt_svsel.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_svsel.h ../win/Qt/qt_bind.h \ - ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_str.h + ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_str.h \ + $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_svsel.cpp $(TARGETPFX)qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_win.h ../win/Qt/qt_bind.h \ @@ -1301,18 +1308,40 @@ $(TARGETPFX)qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h ../win/Qt/qt_key.h \ ../win/Qt/qt_icon.h ../win/Qt/qt_map.h ../win/Qt/qt_clust.h \ ../win/Qt/qt_menu.h ../win/Qt/qt_rip.h ../win/Qt/qt_msg.h \ - ../win/Qt/qt_set.h + ../win/Qt/qt_set.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_win.cpp $(TARGETPFX)qt_xcmd.o: ../win/Qt/qt_xcmd.cpp $(HACK_H) ../include/func_tab.h \ ../win/Qt/qt_pre.h ../win/Qt/qt_post.h ../win/Qt/qt_xcmd.h \ qt_xcmd.moc ../win/Qt/qt_key.h ../win/Qt/qt_bind.h \ ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_set.h \ - ../win/Qt/qt_str.h + ../win/Qt/qt_str.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_xcmd.cpp $(TARGETPFX)qt_yndlg.o: ../win/Qt/qt_yndlg.cpp $(HACK_H) ../win/Qt/qt_pre.h \ ../win/Qt/qt_post.h ../win/Qt/qt_yndlg.h qt_yndlg.moc \ - ../win/Qt/qt_key.h ../win/Qt/qt_str.h + ../win/Qt/qt_key.h ../win/Qt/qt_str.h $(QTn_H) $(TARGET_CXX) $(TARGET_CXXFLAGS) -c -o $@ ../win/Qt/qt_yndlg.cpp +qt_kde0.moc: ../win/Qt/qt_kde0.h $(QTn_H) + $(MOCPATH) -o $@ ../win/Qt/qt_kde0.h +qt_main.moc: ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h $(QTn_H) + $(MOCPATH) -o $@ ../win/Qt/qt_main.h +qt_map.moc: ../win/Qt/qt_map.h ../win/Qt/qt_win.h ../win/Qt/qt_clust.h $(QTn_H) + $(MOCPATH) -o $@ ../win/Qt/qt_map.h +qt_menu.moc: ../win/Qt/qt_menu.h ../win/Qt/qt_win.h ../win/Qt/qt_rip.h $(QTn_H) + $(MOCPATH) -o $@ ../win/Qt/qt_menu.h +qt_msg.moc: ../win/Qt/qt_msg.h ../win/Qt/qt_win.h $(QTn_H) + $(MOCPATH) -o $@ ../win/Qt/qt_msg.h +qt_plsel.moc: ../win/Qt/qt_plsel.h $(QTn_H) + $(MOCPATH) -o $@ ../win/Qt/qt_plsel.h +qt_set.moc: ../win/Qt/qt_set.h ../win/Qt/qt_bind.h ../win/Qt/qt_main.h \ + ../win/Qt/qt_kde0.h $(QTn_H) + $(MOCPATH) -o $@ ../win/Qt/qt_set.h +qt_stat.moc: ../win/Qt/qt_stat.h ../win/Qt/qt_win.h ../win/Qt/qt_icon.h \ + $(QTn_H) + $(MOCPATH) -o $@ ../win/Qt/qt_stat.h +qt_xcmd.moc: ../win/Qt/qt_xcmd.h $(QTn_H) + $(MOCPATH) -o $@ ../win/Qt/qt_xcmd.h +qt_yndlg.moc: ../win/Qt/qt_yndlg.h $(QTn_H) + $(MOCPATH) -o $@ ../win/Qt/qt_yndlg.h $(TARGETPFX)wc_chainin.o: ../win/chain/wc_chainin.c $(HACK_H) $(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ ../win/chain/wc_chainin.c $(TARGETPFX)wc_chainout.o: ../win/chain/wc_chainout.c $(HACK_H) @@ -1344,7 +1373,7 @@ $(TARGETPFX)dokick.o: dokick.c $(HACK_H) $(TARGETPFX)dothrow.o: dothrow.c $(HACK_H) $(TARGETPFX)drawing.o: drawing.c $(CONFIG_H) ../include/color.h \ ../include/rm.h ../include/objclass.h ../include/defsym.h \ - ../include/objects.h ../include/sym.h + ../include/objects.h ../include/wintype.h ../include/sym.h $(TARGETPFX)dungeon.o: dungeon.c $(HACK_H) ../include/dgn_file.h \ ../include/dlb.h $(TARGETPFX)eat.o: eat.c $(HACK_H) @@ -1369,11 +1398,12 @@ $(TARGETPFX)mcastu.o: mcastu.c $(HACK_H) $(TARGETPFX)mdlib.o: mdlib.c $(CONFIG_H) ../include/permonst.h \ ../include/align.h ../include/monattk.h ../include/monflag.h \ ../include/monsters.h ../include/objclass.h \ - ../include/defsym.h ../include/objects.h ../include/sym.h \ - ../include/artilist.h ../include/dungeon.h ../include/obj.h \ - ../include/monst.h ../include/mextra.h ../include/you.h \ - ../include/attrib.h ../include/prop.h ../include/skills.h \ - ../include/context.h ../include/flag.h ../include/dlb.h + ../include/defsym.h ../include/objects.h ../include/wintype.h \ + ../include/sym.h ../include/artilist.h ../include/dungeon.h \ + ../include/obj.h ../include/monst.h ../include/mextra.h \ + ../include/you.h ../include/attrib.h ../include/prop.h \ + ../include/skills.h ../include/context.h ../include/flag.h \ + ../include/dlb.h $(TARGETPFX)mhitm.o: mhitm.c $(HACK_H) ../include/artifact.h $(TARGETPFX)mhitu.o: mhitu.c $(HACK_H) ../include/artifact.h $(TARGETPFX)minion.o: minion.c $(HACK_H) @@ -1388,8 +1418,8 @@ $(TARGETPFX)monmove.o: monmove.c $(HACK_H) ../include/mfndpos.h \ ../include/artifact.h $(TARGETPFX)monst.o: monst.c $(CONFIG_H) ../include/permonst.h \ ../include/align.h ../include/monattk.h ../include/monflag.h \ - ../include/monsters.h ../include/sym.h ../include/defsym.h \ - ../include/color.h + ../include/monsters.h ../include/wintype.h ../include/sym.h \ + ../include/defsym.h ../include/color.h $(TARGETPFX)mplayer.o: mplayer.c $(HACK_H) $(TARGETPFX)mthrowu.o: mthrowu.c $(HACK_H) $(TARGETPFX)muse.o: muse.c $(HACK_H) @@ -1441,6 +1471,7 @@ $(TARGETPFX)topten.o: topten.c $(HACK_H) ../include/dlb.h $(TARGETPFX)track.o: track.c $(HACK_H) $(TARGETPFX)trap.o: trap.c $(HACK_H) $(TARGETPFX)u_init.o: u_init.c $(HACK_H) +$(TARGETPFX)utf8map.o: utf8map.c $(HACK_H) $(TARGETPFX)uhitm.o: uhitm.c $(HACK_H) $(TARGETPFX)vault.o: vault.c $(HACK_H) $(TARGETPFX)version.o: version.c $(HACK_H) ../include/dlb.h diff --git a/sys/windows/Makefile.nmake b/sys/windows/Makefile.nmake index caa260bdb..eafc158e8 100644 --- a/sys/windows/Makefile.nmake +++ b/sys/windows/Makefile.nmake @@ -1857,33 +1857,32 @@ TARGET_CFLAGS=$(cflagsBuild) TARGET_CXX=$(cc) TARGET_CXXFLAGS=$(cppflagsBuild) MOCPATH = moc.exe -# -# DO NOT DELETE THIS LINE OR CHANGE ANYTHING BEYOND IT + # config.h timestamp #$(CONFIG_H): $(INCL)\config.h $(INCL)\config1.h $(INCL)\patchlevel.h \ -# $(INCL)\tradstdc.h $(INCL)\global.h $(INCL)\coord.h \ -# $(INCL)\vmsconf.h $(INCL)\system.h $(INCL)\nhlua.h \ -# $(INCL)\unixconf.h $(INCL)\pcconf.h $(INCL)\micro.h \ -# $(INCL)\windconf.h $(INCL)\warnings.h \ -# $(INCL)\fnamesiz.h +# $(INCL)\tradstdc.h $(INCL)\integer.h \ +# $(INCL)\global.h $(INCL)\coord.h $(INCL)\vmsconf.h \ +# $(INCL)\system.h $(INCL)\nhlua.h $(INCL)\unixconf.h \ +# $(INCL)\pcconf.h $(INCL)\micro.h $(INCL)\windconf.h \ +# $(INCL)\warnings.h $(INCL)\fnamesiz.h # touch $(CONFIG_H) # hack.h timestamp #$(HACK_H): $(INCL)\hack.h $(CONFIG_H) $(INCL)\lint.h $(INCL)\align.h \ -# $(INCL)\dungeon.h $(INCL)\sym.h $(INCL)\defsym.h \ -# $(INCL)\mkroom.h $(INCL)\artilist.h \ +# $(INCL)\dungeon.h $(INCL)\wintype.h $(INCL)\sym.h \ +# $(INCL)\defsym.h $(INCL)\mkroom.h $(INCL)\artilist.h \ # $(INCL)\objclass.h $(INCL)\objects.h \ # $(INCL)\youprop.h $(INCL)\prop.h $(INCL)\permonst.h \ # $(INCL)\monattk.h $(INCL)\monflag.h \ # $(INCL)\monsters.h $(INCL)\mondata.h \ -# $(INCL)\wintype.h $(INCL)\context.h $(INCL)\rm.h \ -# $(INCL)\botl.h $(INCL)\rect.h $(INCL)\region.h \ +# $(INCL)\context.h $(INCL)\rm.h $(INCL)\botl.h \ +# $(INCL)\rect.h $(INCL)\region.h $(INCL)\trap.h \ # $(INCL)\display.h $(INCL)\vision.h $(INCL)\color.h \ # $(INCL)\decl.h $(INCL)\quest.h $(INCL)\spell.h \ # $(INCL)\obj.h $(INCL)\engrave.h $(INCL)\you.h \ # $(INCL)\attrib.h $(INCL)\monst.h $(INCL)\mextra.h \ -# $(INCL)\skills.h $(INCL)\timeout.h $(INCL)\trap.h \ -# $(INCL)\flag.h $(INCL)\winprocs.h $(INCL)\sys.h +# $(INCL)\skills.h $(INCL)\timeout.h $(INCL)\flag.h \ +# $(INCL)\winprocs.h $(INCL)\sys.h # touch $(HACK_H) # $(TARGETPFX)pcmain.o: ..\sys\share\pcmain.c $(HACK_H) $(INCL)\dlb.h @@ -1950,7 +1949,7 @@ $(TARGETPFX)cursinvt.o: ..\win\curses\cursinvt.c $(HACK_H) \ #$(TARGETPFX)Window.o: ..\win\X11\Window.c $(INCL)\xwindowp.h \ # $(INCL)\xwindow.h $(CONFIG_H) $(INCL)\lint.h \ # $(INCL)\winX.h $(INCL)\color.h $(INCL)\wintype.h -# $(TARGET_CC) $(TARGET_CFLAGS) $(X11CFLAGS) -Fo$@ ..\win\X11\Window.c +## $(TARGET_CC) $(TARGET_CFLAGS) $(X11CFLAGS) -Fo$@ ..\win\X11\Window.c $(TARGETPFX)dialogs.o: ..\win\X11\dialogs.c $(CONFIG_H) $(INCL)\lint.h \ $(INCL)\winX.h $(INCL)\color.h $(INCL)\wintype.h # $(TARGET_CC) $(TARGET_CFLAGS) $(X11CFLAGS) -Fo$@ ..\win\X11\dialogs.c @@ -1980,8 +1979,8 @@ $(TARGETPFX)winval.o: ..\win\X11\winval.c $(HACK_H) $(INCL)\winX.h #$(TARGETPFX)tile.o: tile.c $(HACK_H) $(TARGETPFX)winshim.o: ..\win\shim\winshim.c $(HACK_H) # $(TARGET_CC) $(TARGET_CFLAGS) -Fo$@ ..\win\shim\winshim.c -#$(TARGETPFX)cppregex.o: ..\sys\share\cppregex.cpp -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\sys\share\cppregex.cpp +$(TARGETPFX)cppregex.o: ..\sys\share\cppregex.cpp $(CONFIG_H) + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\sys\share\cppregex.cpp $(TARGETPFX)qt_bind.o: ..\win\Qt\qt_bind.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_bind.h ..\win\Qt\qt_main.h \ ..\win\Qt\qt_kde0.h ..\win\Qt\qt_click.h ..\win\Qt\qt_delay.h \ @@ -1992,36 +1991,36 @@ $(TARGETPFX)qt_bind.o: ..\win\Qt\qt_bind.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_icon.h ..\win\Qt\qt_streq.h ..\win\Qt\qt_line.h \ ..\win\Qt\qt_yndlg.h ..\win\Qt\qt_str.h $(INCL)\dlb.h \ $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_bind.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_bind.cpp $(TARGETPFX)qt_click.o: ..\win\Qt\qt_click.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_click.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_click.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_click.cpp $(TARGETPFX)qt_clust.o: ..\win\Qt\qt_clust.cpp ..\win\Qt\qt_clust.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_clust.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_clust.cpp $(TARGETPFX)qt_delay.o: ..\win\Qt\qt_delay.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_delay.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_delay.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_delay.cpp $(TARGETPFX)qt_glyph.o: ..\win\Qt\qt_glyph.cpp $(HACK_H) \ $(INCL)\tile2x11.h ..\win\Qt\qt_pre.h ..\win\Qt\qt_post.h \ ..\win\Qt\qt_glyph.h ..\win\Qt\qt_bind.h ..\win\Qt\qt_main.h \ ..\win\Qt\qt_kde0.h ..\win\Qt\qt_set.h ..\win\Qt\qt_inv.h \ ..\win\Qt\qt_map.h ..\win\Qt\qt_win.h ..\win\Qt\qt_clust.h \ ..\win\Qt\qt_str.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_glyph.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_glyph.cpp $(TARGETPFX)qt_icon.o: ..\win\Qt\qt_icon.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_icon.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_icon.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_icon.cpp $(TARGETPFX)qt_inv.o: ..\win\Qt\qt_inv.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_inv.h ..\win\Qt\qt_glyph.h \ ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h ..\win\Qt\qt_set.h \ ..\win\Qt\qt_bind.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_inv.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_inv.cpp $(TARGETPFX)qt_key.o: ..\win\Qt\qt_key.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_key.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_key.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_key.cpp $(TARGETPFX)qt_line.o: ..\win\Qt\qt_line.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_line.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_line.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_line.cpp $(TARGETPFX)qt_main.o: ..\win\Qt\qt_main.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h \ qt_main.moc ..\win\Qt\qt_bind.h ..\win\Qt\qt_glyph.h \ @@ -2029,62 +2028,62 @@ $(TARGETPFX)qt_main.o: ..\win\Qt\qt_main.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_win.h ..\win\Qt\qt_clust.h ..\win\Qt\qt_msg.h \ ..\win\Qt\qt_set.h ..\win\Qt\qt_stat.h ..\win\Qt\qt_icon.h \ ..\win\Qt\qt_str.h qt_kde0.moc $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_main.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_main.cpp $(TARGETPFX)qt_map.o: ..\win\Qt\qt_map.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_map.h ..\win\Qt\qt_win.h \ ..\win\Qt\qt_clust.h qt_map.moc ..\win\Qt\qt_click.h \ ..\win\Qt\qt_glyph.h ..\win\Qt\qt_set.h ..\win\Qt\qt_bind.h \ ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h ..\win\Qt\qt_str.h \ $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_map.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_map.cpp $(TARGETPFX)qt_menu.o: ..\win\Qt\qt_menu.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_menu.h ..\win\Qt\qt_win.h \ ..\win\Qt\qt_rip.h qt_menu.moc ..\win\Qt\qt_key.h \ ..\win\Qt\qt_glyph.h ..\win\Qt\qt_set.h ..\win\Qt\qt_bind.h \ ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h ..\win\Qt\qt_streq.h \ ..\win\Qt\qt_line.h ..\win\Qt\qt_str.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_menu.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_menu.cpp $(TARGETPFX)qt_msg.o: ..\win\Qt\qt_msg.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_msg.h ..\win\Qt\qt_win.h \ qt_msg.moc ..\win\Qt\qt_map.h ..\win\Qt\qt_clust.h \ ..\win\Qt\qt_set.h ..\win\Qt\qt_bind.h ..\win\Qt\qt_main.h \ ..\win\Qt\qt_kde0.h ..\win\Qt\qt_str.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_msg.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_msg.cpp $(TARGETPFX)qt_plsel.o: ..\win\Qt\qt_plsel.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_plsel.h qt_plsel.moc \ ..\win\Qt\qt_bind.h ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h \ ..\win\Qt\qt_glyph.h ..\win\Qt\qt_set.h ..\win\Qt\qt_str.h \ $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_plsel.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_plsel.cpp $(TARGETPFX)qt_rip.o: ..\win\Qt\qt_rip.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_rip.h ..\win\Qt\qt_bind.h \ ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h ..\win\Qt\qt_str.h \ $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_rip.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_rip.cpp $(TARGETPFX)qt_set.o: ..\win\Qt\qt_set.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_set.h ..\win\Qt\qt_bind.h \ ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h qt_set.moc \ ..\win\Qt\qt_glyph.h ..\win\Qt\qt_xcmd.h ..\win\Qt\qt_str.h \ $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_set.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_set.cpp $(TARGETPFX)qt_stat.o: ..\win\Qt\qt_stat.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_stat.h ..\win\Qt\qt_win.h \ ..\win\Qt\qt_icon.h qt_stat.moc ..\win\Qt\qt_set.h \ ..\win\Qt\qt_bind.h ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h \ ..\win\Qt\qt_str.h ..\win\Qt\qt_xpms.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_stat.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_stat.cpp $(TARGETPFX)qt_str.o: ..\win\Qt\qt_str.cpp ..\win\Qt\qt_str.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_str.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_str.cpp $(TARGETPFX)qt_streq.o: ..\win\Qt\qt_streq.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_streq.h ..\win\Qt\qt_line.h \ ..\win\Qt\qt_str.h ..\win\Qt\qt_set.h ..\win\Qt\qt_bind.h \ ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_streq.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_streq.cpp $(TARGETPFX)qt_svsel.o: ..\win\Qt\qt_svsel.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_svsel.h ..\win\Qt\qt_bind.h \ ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h ..\win\Qt\qt_str.h \ $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_svsel.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_svsel.cpp $(TARGETPFX)qt_win.o: ..\win\Qt\qt_win.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_win.h ..\win\Qt\qt_bind.h \ ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h ..\win\Qt\qt_click.h \ @@ -2092,39 +2091,39 @@ $(TARGETPFX)qt_win.o: ..\win\Qt\qt_win.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_icon.h ..\win\Qt\qt_map.h ..\win\Qt\qt_clust.h \ ..\win\Qt\qt_menu.h ..\win\Qt\qt_rip.h ..\win\Qt\qt_msg.h \ ..\win\Qt\qt_set.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_win.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_win.cpp $(TARGETPFX)qt_xcmd.o: ..\win\Qt\qt_xcmd.cpp $(HACK_H) $(INCL)\func_tab.h \ ..\win\Qt\qt_pre.h ..\win\Qt\qt_post.h ..\win\Qt\qt_xcmd.h \ qt_xcmd.moc ..\win\Qt\qt_key.h ..\win\Qt\qt_bind.h \ ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h ..\win\Qt\qt_set.h \ ..\win\Qt\qt_str.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_xcmd.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_xcmd.cpp $(TARGETPFX)qt_yndlg.o: ..\win\Qt\qt_yndlg.cpp $(HACK_H) ..\win\Qt\qt_pre.h \ ..\win\Qt\qt_post.h ..\win\Qt\qt_yndlg.h qt_yndlg.moc \ ..\win\Qt\qt_key.h ..\win\Qt\qt_str.h $(QTn_H) -# $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_yndlg.cpp + $(TARGET_CXX) $(TARGET_CXXFLAGS) -Fo$@ ..\win\Qt\qt_yndlg.cpp qt_kde0.moc: ..\win\Qt\qt_kde0.h $(QTn_H) - $(MOCPATH) ..\win\Qt\qt_kde0.h + $(MOCPATH) ..\win\Qt\qt_kde0.h qt_main.moc: ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h $(QTn_H) - $(MOCPATH) ..\win\Qt\qt_main.h + $(MOCPATH) ..\win\Qt\qt_main.h qt_map.moc: ..\win\Qt\qt_map.h ..\win\Qt\qt_win.h ..\win\Qt\qt_clust.h $(QTn_H) - $(MOCPATH) ..\win\Qt\qt_map.h + $(MOCPATH) ..\win\Qt\qt_map.h qt_menu.moc: ..\win\Qt\qt_menu.h ..\win\Qt\qt_win.h ..\win\Qt\qt_rip.h $(QTn_H) - $(MOCPATH) ..\win\Qt\qt_menu.h + $(MOCPATH) ..\win\Qt\qt_menu.h qt_msg.moc: ..\win\Qt\qt_msg.h ..\win\Qt\qt_win.h $(QTn_H) - $(MOCPATH) ..\win\Qt\qt_msg.h + $(MOCPATH) ..\win\Qt\qt_msg.h qt_plsel.moc: ..\win\Qt\qt_plsel.h $(QTn_H) - $(MOCPATH) ..\win\Qt\qt_plsel.h + $(MOCPATH) ..\win\Qt\qt_plsel.h qt_set.moc: ..\win\Qt\qt_set.h ..\win\Qt\qt_bind.h ..\win\Qt\qt_main.h \ ..\win\Qt\qt_kde0.h $(QTn_H) - $(MOCPATH) ..\win\Qt\qt_set.h + $(MOCPATH) ..\win\Qt\qt_set.h qt_stat.moc: ..\win\Qt\qt_stat.h ..\win\Qt\qt_win.h ..\win\Qt\qt_icon.h \ $(QTn_H) - $(MOCPATH) ..\win\Qt\qt_stat.h + $(MOCPATH) ..\win\Qt\qt_stat.h qt_xcmd.moc: ..\win\Qt\qt_xcmd.h $(QTn_H) - $(MOCPATH) ..\win\Qt\qt_xcmd.h + $(MOCPATH) ..\win\Qt\qt_xcmd.h qt_yndlg.moc: ..\win\Qt\qt_yndlg.h $(QTn_H) - $(MOCPATH) ..\win\Qt\qt_yndlg.h + $(MOCPATH) ..\win\Qt\qt_yndlg.h $(TARGETPFX)wc_chainin.o: ..\win\chain\wc_chainin.c $(HACK_H) # $(TARGET_CC) $(TARGET_CFLAGS) -Fo$@ ..\win\chain\wc_chainin.c $(TARGETPFX)wc_chainout.o: ..\win\chain\wc_chainout.c $(HACK_H) @@ -2156,7 +2155,7 @@ $(TARGETPFX)dokick.o: dokick.c $(HACK_H) $(TARGETPFX)dothrow.o: dothrow.c $(HACK_H) $(TARGETPFX)drawing.o: drawing.c $(CONFIG_H) $(INCL)\color.h \ $(INCL)\rm.h $(INCL)\objclass.h $(INCL)\defsym.h \ - $(INCL)\objects.h $(INCL)\sym.h + $(INCL)\objects.h $(INCL)\wintype.h $(INCL)\sym.h $(TARGETPFX)dungeon.o: dungeon.c $(HACK_H) $(INCL)\dgn_file.h \ $(INCL)\dlb.h $(TARGETPFX)eat.o: eat.c $(HACK_H) @@ -2181,11 +2180,12 @@ $(TARGETPFX)mcastu.o: mcastu.c $(HACK_H) $(TARGETPFX)mdlib.o: mdlib.c $(CONFIG_H) $(INCL)\permonst.h \ $(INCL)\align.h $(INCL)\monattk.h $(INCL)\monflag.h \ $(INCL)\monsters.h $(INCL)\objclass.h \ - $(INCL)\defsym.h $(INCL)\objects.h $(INCL)\sym.h \ - $(INCL)\artilist.h $(INCL)\dungeon.h $(INCL)\obj.h \ - $(INCL)\monst.h $(INCL)\mextra.h $(INCL)\you.h \ - $(INCL)\attrib.h $(INCL)\prop.h $(INCL)\skills.h \ - $(INCL)\context.h $(INCL)\flag.h $(INCL)\dlb.h + $(INCL)\defsym.h $(INCL)\objects.h $(INCL)\wintype.h \ + $(INCL)\sym.h $(INCL)\artilist.h $(INCL)\dungeon.h \ + $(INCL)\obj.h $(INCL)\monst.h $(INCL)\mextra.h \ + $(INCL)\you.h $(INCL)\attrib.h $(INCL)\prop.h \ + $(INCL)\skills.h $(INCL)\context.h $(INCL)\flag.h \ + $(INCL)\dlb.h $(TARGETPFX)mhitm.o: mhitm.c $(HACK_H) $(INCL)\artifact.h $(TARGETPFX)mhitu.o: mhitu.c $(HACK_H) $(INCL)\artifact.h $(TARGETPFX)minion.o: minion.c $(HACK_H) @@ -2200,8 +2200,8 @@ $(TARGETPFX)monmove.o: monmove.c $(HACK_H) $(INCL)\mfndpos.h \ $(INCL)\artifact.h $(TARGETPFX)monst.o: monst.c $(CONFIG_H) $(INCL)\permonst.h \ $(INCL)\align.h $(INCL)\monattk.h $(INCL)\monflag.h \ - $(INCL)\monsters.h $(INCL)\sym.h $(INCL)\defsym.h \ - $(INCL)\color.h + $(INCL)\monsters.h $(INCL)\wintype.h $(INCL)\sym.h \ + $(INCL)\defsym.h $(INCL)\color.h $(TARGETPFX)mplayer.o: mplayer.c $(HACK_H) $(TARGETPFX)mthrowu.o: mthrowu.c $(HACK_H) $(TARGETPFX)muse.o: muse.c $(HACK_H) @@ -2254,8 +2254,8 @@ $(TARGETPFX)topten.o: topten.c $(HACK_H) $(INCL)\dlb.h $(TARGETPFX)track.o: track.c $(HACK_H) $(TARGETPFX)trap.o: trap.c $(HACK_H) $(TARGETPFX)u_init.o: u_init.c $(HACK_H) -$(TARGETPFX)uhitm.o: uhitm.c $(HACK_H) $(TARGETPFX)utf8map.o: utf8map.c $(HACK_H) +$(TARGETPFX)uhitm.o: uhitm.c $(HACK_H) $(TARGETPFX)vault.o: vault.c $(HACK_H) $(TARGETPFX)version.o: version.c $(HACK_H) $(INCL)\dlb.h $(TARGETPFX)vision.o: vision.c $(HACK_H) From 2f00f8d55f7cecbd15a536f3b8a388dd2012c98b Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Sun, 9 Oct 2022 10:24:08 -0400 Subject: [PATCH 03/22] This is cron-daily v1-May-8-2022. 000files updated: Files --- Files | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Files b/Files index 781b0ec61..5617ed2fc 100644 --- a/Files +++ b/Files @@ -271,12 +271,13 @@ README.md libtest.c run.sh sys/msdos: (files for MSDOS version) Install.dos Makefile.GCC exceptn.S.patch -fetch-cross-compiler.sh msdos.c msdoshlp.txt -nhlua.h pckeys.c pctiles.c -pctiles.h pcvideo.h portio.h -setup.bat sysconf tile2bin.c -vesa.h video.c vidtxt.c -vidvesa.c vidvga.c +fetch-cross-compiler.sh font.c font.h +msdos.c msdoshlp.txt nhlua.h +pckeys.c pctiles.c pctiles.h +pcvideo.h portio.h setup.bat +sysconf tile2bin.c vesa.h +video.c vidtxt.c vidvesa.c +vidvga.c (files for running MSDOS binary under Windows) nhico.uu nhpif.uu From fd8c9c39786d3844791a423dd5177d0f2619f220 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 9 Oct 2022 16:57:06 -0700 Subject: [PATCH 04/22] more PR #892 - strength lose due to poison Refine pull request #802 by entrez. Applying damage within a loop could potentially damage the hero multiple times, maybe using up an amulet of life saving and then killing hero anyway, or causing rehumanization and taking further HP from normal form, or both, causing rehumanization and then using up amulet of life saving. Accumulate the damage in the loop and then apply it as a unit. --- src/attrib.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/attrib.c b/src/attrib.c index 7684c057c..0db15de8a 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -192,6 +192,7 @@ adjattrib( return TRUE; } +/* strength gain */ void gainstr(struct obj *otmp, int incr, boolean givemsg) { @@ -209,30 +210,35 @@ gainstr(struct obj *otmp, int incr, boolean givemsg) givemsg ? -1 : 1); } -/* may kill you; cause may be poison or monster like 'a' */ +/* strength loss, may kill you; cause may be poison or monster like 'a' */ void losestr(int num, const char *knam, schar k_format) { int uhpmin = minuhpmax(1), olduhpmax = u.uhpmax; - int ustr = ABASE(A_STR) - num; - - /* in case HP loss kills the hero once Str hits the minimum */ - if (!knam || !*knam) { - knam = "terminal frailty"; - k_format = KILLED_BY; - } + int ustr = ABASE(A_STR) - num, amt, dmg; + dmg = 0; while (ustr < ATTRMIN(A_STR)) { ++ustr; --num; - losehp(6, knam, k_format); + amt = rn1(4, 3); /* (0..(4-1))+3 => 3..6; used to use flat 6 here */ + dmg += amt; if (Upolyd) { - u.mhmax -= 6; + u.mhmax -= min(amt, u.mhmax - 1); } else { - setuhpmax(u.uhpmax - 6); + setuhpmax(u.uhpmax - amt); } g.context.botl = TRUE; } + if (dmg) { + /* in case damage is fatal and caller didn't supply killer reason */ + if (!knam || !*knam) { + knam = "terminal frailty"; + k_format = KILLED_BY; + } + losehp(dmg, knam, k_format); + } + if (u.uhpmax < uhpmin) { setuhpmax(min(olduhpmax, uhpmin)); if (!Drain_resistance) From d0ad02b616835092eb91e7fd564ce80cb8474da9 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 10 Oct 2022 16:46:33 -0700 Subject: [PATCH 05/22] PR #892 - one more try... Try again to make losestr() do what's intended. If it would take strength below 3, it takes away HP and max HP instead. If hero is poly'd, those come from the hero-as-monst values. If hero was poly'd but isn't any more, hero-as-monst died and rehumanized as previous self; leave max HP alone. If hero wasn't poly'd, take HP and max HP from their usual values, but don't take max HP below the threshold of minimum max HP (experience level times 1). The old check for max HP going below minimum can't happen anymore, unless hero was below that threshold already (which shouldn't happen; if it does somehow, don't punish hero further). If this still isn't right, I'll throw up my hands and my lunch. --- src/attrib.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/attrib.c b/src/attrib.c index 0db15de8a..5b20419af 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -223,27 +223,38 @@ losestr(int num, const char *knam, schar k_format) --num; amt = rn1(4, 3); /* (0..(4-1))+3 => 3..6; used to use flat 6 here */ dmg += amt; - if (Upolyd) { - u.mhmax -= min(amt, u.mhmax - 1); - } else { - setuhpmax(u.uhpmax - amt); - } - g.context.botl = TRUE; } if (dmg) { + boolean waspolyd = Upolyd; + /* in case damage is fatal and caller didn't supply killer reason */ if (!knam || !*knam) { knam = "terminal frailty"; k_format = KILLED_BY; } losehp(dmg, knam, k_format); - } - if (u.uhpmax < uhpmin) { + if (Upolyd) { + /* if still polymorhed, reduce you-as-monst maxHP; never below 1 */ + u.mhmax -= min(dmg, u.mhmax - 1); + } else if (waspolyd) { + ; /* rehumanization was triggered; don't reduce no-polyd HP */ + } else { + /* not polymorphed; reduce max HP, but not below below uhpmin */ + if (u.uhpmax > uhpmin) + setuhpmax(max(u.uhpmax - dmg, uhpmin)); + } + g.context.botl = TRUE; + } +#if 0 /* only possible if uhpmax was already less than uhpmin */ + if (!Upolyd && u.uhpmax < uhpmin) { setuhpmax(min(olduhpmax, uhpmin)); if (!Drain_resistance) losexp(NULL); /* won't be fatal when no 'drainer' is supplied */ } +#else + nhUse(olduhpmax); +#endif (void) adjattrib(A_STR, -num, 1); } From 96e933f9741a526fd953258e1f33b7f474ed0aea Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 11 Oct 2022 14:49:14 -0700 Subject: [PATCH 06/22] PR #862 - try XLII When strength loss is so big as to cause HP damage, but reduce strength if the damage causes hero to revert to normal form. There's no point in adjusting strength before rehumanization and not fair to do so afterward. Also, validate strength and its intended adjustment before doing anything else. (Just paranoia; there's no reason to suspect that any bad data ever gets passed in.) --- src/attrib.c | 19 ++++++++++++------- src/mcastu.c | 35 +++++++++++++++++++++-------------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/attrib.c b/src/attrib.c index 5b20419af..23747bf59 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -216,7 +216,12 @@ losestr(int num, const char *knam, schar k_format) { int uhpmin = minuhpmax(1), olduhpmax = u.uhpmax; int ustr = ABASE(A_STR) - num, amt, dmg; + boolean waspolyd = Upolyd; + if (num <= 0 || ABASE(A_STR) < ATTRMIN(A_STR)) { + impossible("losestr: %d - %d", ABASE(A_STR), num); + return; + } dmg = 0; while (ustr < ATTRMIN(A_STR)) { ++ustr; @@ -225,8 +230,6 @@ losestr(int num, const char *knam, schar k_format) dmg += amt; } if (dmg) { - boolean waspolyd = Upolyd; - /* in case damage is fatal and caller didn't supply killer reason */ if (!knam || !*knam) { knam = "terminal frailty"; @@ -237,10 +240,9 @@ losestr(int num, const char *knam, schar k_format) if (Upolyd) { /* if still polymorhed, reduce you-as-monst maxHP; never below 1 */ u.mhmax -= min(dmg, u.mhmax - 1); - } else if (waspolyd) { - ; /* rehumanization was triggered; don't reduce no-polyd HP */ - } else { - /* not polymorphed; reduce max HP, but not below below uhpmin */ + } else if (!waspolyd) { + /* not polymorphed now and didn't rehumanize when taking damage; + reduce max HP, but not below below uhpmin */ if (u.uhpmax > uhpmin) setuhpmax(max(u.uhpmax - dmg, uhpmin)); } @@ -255,7 +257,10 @@ losestr(int num, const char *knam, schar k_format) #else nhUse(olduhpmax); #endif - (void) adjattrib(A_STR, -num, 1); + /* 'num' chould have been reduced to 0 in the minimum strength loop; + '(Upolyd || !waspolyd)' is True unless damage caused rehumanization */ + if (num > 0 && (Upolyd || !waspolyd)) + (void) adjattrib(A_STR, -num, 1); } /* combined strength loss and damage from some poisons */ diff --git a/src/mcastu.c b/src/mcastu.c index d8dc1c9e4..fa8097484 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -42,8 +42,7 @@ static int m_cure_self(struct monst *, int); static void cast_wizard_spell(struct monst *, int, int); static void cast_cleric_spell(struct monst *, int, int); static boolean is_undirected_spell(unsigned int, int); -static boolean -spell_would_be_useless(struct monst *, unsigned int, int); +static boolean spell_would_be_useless(struct monst *, unsigned int, int); /* feedback when frustrated monster couldn't cast a spell */ static void @@ -173,10 +172,11 @@ choose_clerical_spell(int spellnum) * 0: unsuccessful spell */ int -castmu(register struct monst *mtmp, - register struct attack *mattk, - boolean thinks_it_foundyou, - boolean foundyou) +castmu( + register struct monst *mtmp, /* caster */ + register struct attack *mattk, /* caster's current attack */ + boolean thinks_it_foundyou, /* might be mistaken if displaced */ + boolean foundyou) /* knows hero's precise location */ { int dmg, ml = mtmp->m_lev; int ret; @@ -347,6 +347,7 @@ m_cure_self(struct monst *mtmp, int dmg) void touch_of_death(void) { + static const char touchodeath[] = "touch of death"; int dmg = 50 + d(8, 6); int drain = dmg / 2; @@ -354,15 +355,18 @@ touch_of_death(void) if (drain >= u.uhpmax) { g.killer.format = KILLED_BY_AN; - Strcpy(g.killer.name, "touch of death"); + Strcpy(g.killer.name, touchodeath); done(DIED); } else { u.uhpmax -= drain; - losehp(dmg, "touch of death", KILLED_BY_AN); + losehp(dmg, touchodeath, KILLED_BY_AN); } } -/* monster wizard and cleric spellcasting functions */ +/* + * Monster wizard and cleric spellcasting functions. + */ + /* If dmg is zero, then the monster is not casting at you. If the monster is intentionally not casting at you, we have previously @@ -463,6 +467,8 @@ cast_wizard_spell(struct monst *mtmp, int dmg, int spellnum) } else { You("suddenly feel weaker!"); dmg = mtmp->m_lev - 6; + if (dmg < 1) /* paranoia since only chosen when m_lev is high */ + dmg = 1; if (Half_spell_damage) dmg = (dmg + 1) / 2; losestr(rnd(dmg), (const char *) 0, 0); @@ -615,7 +621,8 @@ cast_cleric_spell(struct monst *mtmp, int dmg, int spellnum) if (!enexto(&bypos, mtmp->mux, mtmp->muy, mtmp->data)) break; if ((pm = mkclass(let, 0)) != 0 - && (mtmp2 = makemon(pm, bypos.x, bypos.y, MM_ANGRY|MM_NOMSG)) != 0) { + && (mtmp2 = makemon(pm, bypos.x, bypos.y, MM_ANGRY | MM_NOMSG)) + != 0) { success = TRUE; mtmp2->msleeping = mtmp2->mpeaceful = mtmp2->mtame = 0; set_malign(mtmp2); @@ -678,6 +685,7 @@ cast_cleric_spell(struct monst *mtmp, int dmg, int spellnum) /* note: resists_blnd() doesn't apply here */ if (!Blinded) { int num_eyes = eyecount(g.youmonst.data); + pline("Scales cover your %s!", (num_eyes == 1) ? body_part(EYE) : makeplural(body_part(EYE))); @@ -694,17 +702,16 @@ cast_cleric_spell(struct monst *mtmp, int dmg, int spellnum) monstseesu(M_SEEN_MAGR); if (g.multi >= 0) You("stiffen briefly."); - nomul(-1); - g.multi_reason = "paralyzed by a monster"; + dmg = 1; /* to produce nomul(-1), not actual damage */ } else { if (g.multi >= 0) You("are frozen in place!"); dmg = 4 + (int) mtmp->m_lev; if (Half_spell_damage) dmg = (dmg + 1) / 2; - nomul(-dmg); - g.multi_reason = "paralyzed by a monster"; } + nomul(-dmg); + g.multi_reason = "paralyzed by a monster"; g.nomovemsg = 0; dmg = 0; break; From 82476afdd6da4cae9cf07a5b3309bce3dba22ecc Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 12 Oct 2022 02:05:32 -0700 Subject: [PATCH 07/22] more github issue #679 - orc strength Handle alternate values for hero poly'd into a 'strongmonst' form more thoroughly by propagating max values other than 18/100 to the attribute manipulation routines. ATTRMAX(A_STR), which used to be a relatively simple expression, now contains a function call. Along the way, change the races[] terminator's value for 'mnum' from 0 (giant ant) to NON_PM. --- include/attrib.h | 6 ++-- include/extern.h | 4 ++- src/polyself.c | 79 +++++++++++++++++++++++++++++++++--------------- src/role.c | 51 ++++++++++++++++++------------- 4 files changed, 90 insertions(+), 50 deletions(-) diff --git a/include/attrib.h b/include/attrib.h index b3a5d82e7..17671f464 100644 --- a/include/attrib.h +++ b/include/attrib.h @@ -40,10 +40,8 @@ struct attribs { schar a[A_MAX]; }; -#define ATTRMAX(x) \ - ((x == A_STR && Upolyd && strongmonst(g.youmonst.data)) \ - ? STR18(100) \ - : g.urace.attrmax[x]) +#define ATTRMAX(x) \ + ((x == A_STR && Upolyd) ? uasmon_maxStr() : g.urace.attrmax[x]) #define ATTRMIN(x) (g.urace.attrmin[x]) #endif /* ATTRIB_H */ diff --git a/include/extern.h b/include/extern.h index 85c0afd09..815bf6a4e 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2152,6 +2152,7 @@ extern void change_sex(void); extern void livelog_newform(boolean, int, int); extern void polyself(int); extern int polymon(int); +extern schar uasmon_maxStr(void); extern void rehumanize(void); extern int dobreathe(void); extern int dospit(void); @@ -2398,14 +2399,15 @@ extern void rigid_role_checks(void); extern boolean setrolefilter(const char *); extern boolean gotrolefilter(void); extern void clearrolefilter(void); -extern char *build_plselection_prompt(char *, int, int, int, int, int); extern char *root_plselection_prompt(char *, int, int, int, int, int); +extern char *build_plselection_prompt(char *, int, int, int, int, int); extern void plnamesuffix(void); extern void role_selection_prolog(int, winid); extern void role_menu_extra(int, winid, boolean); extern void role_init(void); extern const char *Hello(struct monst *); extern const char *Goodbye(void); +extern const struct Race *character_race(short); /* ### rumors.c ### */ diff --git a/src/polyself.c b/src/polyself.c index be2ddcbcd..e8c2ee35b 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -683,7 +683,7 @@ polymon(int mntmp) char buf[BUFSZ]; boolean sticky = sticks(g.youmonst.data) && u.ustuck && !u.uswallow, was_blind = !!Blind, dochange = FALSE; - int mlvl; + int mlvl, newMaxStr; if (g.mvitals[mntmp].mvflags & G_GENOD) { /* allow G_EXTINCT */ You_feel("rather %s-ish.", @@ -760,33 +760,16 @@ polymon(int mntmp) /* New stats for monster, to last only as long as polymorphed. * Currently only strength gets changed. */ - if (strongmonst(&mons[mntmp]) && !is_elf(&mons[mntmp])) { - /* ettins, titans and minotaurs don't pass the is_giant() test; - giant mummies and giant zombies do but we throttle those; - Lord Surtur and Cyclops pass the test but can't be poly'd into */ - boolean live_H = is_giant(&mons[mntmp]) && !is_undead(&mons[mntmp]); - int newStr = live_H ? STR19(19) : STR18(100); - - /* hero orcs are limited to 18/50 for maximum strength, so treat - hero poly'd into an orc the same; goblins, orc shamans, and orc - zombies don't have strongmonst() attribute so won't get here; - hobgoblins and orc mummies do get here and are limited to 18/50 - like normal orcs; however, Uruk-hai retain 18/100 strength; - hero gnomes are also limited to 18/50; hero elves are limited to - 18/00 so we treat strongmonst elves (elf-noble, elven monarch) - as if they're not (in 'if' above, so they don't get here) */ - if ((is_orc(&mons[mntmp]) - && !strstri(pmname(&mons[mntmp], NEUTRAL), "Uruk")) - || is_gnome(&mons[mntmp])) - newStr = STR18(50); - - ABASE(A_STR) = AMAX(A_STR) = newStr; + newMaxStr = uasmon_maxStr(); + if (strongmonst(&mons[mntmp])) { + ABASE(A_STR) = AMAX(A_STR) = (schar) newMaxStr; } else { /* not a strongmonst(); if hero has exceptional strength, remove it (note: removal is temporary until returning to original form); we don't attempt to enforce lower maximum for wimpy forms; - we do avoid boosting current strength to 18 if presently less */ - AMAX(A_STR) = 18; /* same as STR18(0) */ + unlike for strongmonst, current strength does not get set to max */ + AMAX(A_STR) = (schar) newMaxStr; + /* make sure current is not higher than max (strip exceptional Str) */ if (ABASE(A_STR) > AMAX(A_STR)) ABASE(A_STR) = AMAX(A_STR); } @@ -981,6 +964,54 @@ polymon(int mntmp) return 1; } +/* determine hero's temporary strength value used while polymorphed; + hero poly'd into M2_STRONG monster usually gets 18/100 strength but + there are exceptions; non-M2_STRONG get maximum strength set to 18 */ +schar +uasmon_maxStr(void) +{ + const struct Race *R; + int newMaxStr; + int mndx = u.umonnum; + struct permonst *ptr = &mons[mndx]; + + if (is_orc(ptr)) { + if (mndx != PM_URUK_HAI) + mndx = PM_ORC; + } else if (is_elf(ptr)) { + mndx = PM_ELF; + } else if (is_dwarf(ptr)) { + mndx = PM_DWARF; + } else if (is_gnome(ptr)) { + mndx = PM_GNOME; +#if 0 /* use the mons[] value for humans */ + } else if (is_human(ptr)) { + mndx = PM_HUMAN; +#endif + } + R = character_race(mndx); + + if (strongmonst(ptr)) { + /* ettins, titans and minotaurs don't pass the is_giant() test; + giant mummies and giant zombies do but we throttle those */ + boolean live_H = is_giant(ptr) && !is_undead(ptr); + + /* hero orcs are limited to 18/50 for maximum strength, so treat + hero poly'd into an orc the same; goblins, orc shamans, and orc + zombies don't have strongmonst() attribute so won't get here; + hobgoblins and orc mummies do get here and are limited to 18/50 + like normal orcs; however, Uruk-hai retain 18/100 strength; + hero gnomes are also limited to 18/50; hero elves are limited + to 18/00 regardless of whether they're strongmonst, but the two + strongmonst types (monarchs and nobles) have current strength + set to 18 [by polymon()], the others don't */ + newMaxStr = R ? R->attrmax[A_STR] : live_H ? STR19(19) : STR18(100); + } else { + newMaxStr = R ? R->attrmax[A_STR] : 18; /* 18 is same as STR18(0) */ + } + return (schar) newMaxStr; +} + /* dropx() jacket for break_armor() */ static void dropp(struct obj *obj) diff --git a/src/role.c b/src/role.c index a83e45706..613f83c49 100644 --- a/src/role.c +++ b/src/role.c @@ -676,7 +676,7 @@ const struct Race races[] = { { 1, 0, 1, 0, 1, 0 } /* Energy */ }, /* Array terminator */ - { 0, 0, 0, 0 } + { 0, 0, 0, 0, { 0, 0 }, NON_PM } }; /* Table of all genders */ @@ -1697,11 +1697,10 @@ role_selection_prolog(int which, winid where) : !*g.plname ? not_yet : g.plname); putstr(where, 0, buf); Sprintf(buf, "%12s ", "role:"); - Strcat(buf, (which == RS_ROLE) ? choosing : (r == ROLE_NONE) - ? not_yet - : (r == ROLE_RANDOM) - ? rand_choice - : roles[r].name.m); + Strcat(buf, (which == RS_ROLE) ? choosing + : (r == ROLE_NONE) ? not_yet + : (r == ROLE_RANDOM) ? rand_choice + : roles[r].name.m); if (r >= 0 && roles[r].name.f) { /* distinct female name [caveman/cavewoman, priest/priestess] */ if (gend == 1) @@ -1713,25 +1712,22 @@ role_selection_prolog(int which, winid where) } putstr(where, 0, buf); Sprintf(buf, "%12s ", "race:"); - Strcat(buf, (which == RS_RACE) ? choosing : (c == ROLE_NONE) - ? not_yet - : (c == ROLE_RANDOM) - ? rand_choice - : races[c].noun); + Strcat(buf, (which == RS_RACE) ? choosing + : (c == ROLE_NONE) ? not_yet + : (c == ROLE_RANDOM) ? rand_choice + : races[c].noun); putstr(where, 0, buf); Sprintf(buf, "%12s ", "gender:"); - Strcat(buf, (which == RS_GENDER) ? choosing : (gend == ROLE_NONE) - ? not_yet - : (gend == ROLE_RANDOM) - ? rand_choice - : genders[gend].adj); + Strcat(buf, (which == RS_GENDER) ? choosing + : (gend == ROLE_NONE) ? not_yet + : (gend == ROLE_RANDOM) ? rand_choice + : genders[gend].adj); putstr(where, 0, buf); Sprintf(buf, "%12s ", "alignment:"); - Strcat(buf, (which == RS_ALGNMNT) ? choosing : (a == ROLE_NONE) - ? not_yet - : (a == ROLE_RANDOM) - ? rand_choice - : aligns[a].adj); + Strcat(buf, (which == RS_ALGNMNT) ? choosing + : (a == ROLE_NONE) ? not_yet + : (a == ROLE_RANDOM) ? rand_choice + : aligns[a].adj); putstr(where, 0, buf); } @@ -2078,4 +2074,17 @@ Goodbye(void) } } +/* if pmindex is any player race (not necessarily the hero's), + return a pointer to the races[] entry for it */ +const struct Race * +character_race(short pmindex) +{ + const struct Race *r; + + for (r = races; r->mnum >= LOW_PM; ++r) + if (r->mnum == pmindex) + return r; + return (const struct Race *) NULL; +} + /* role.c */ From fc0c1e121a21c892bc0e2ead1a81c419a2875fa8 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 12 Oct 2022 02:19:38 -0700 Subject: [PATCH 08/22] couple of reformatting bits Some reformatting done while working on ATTRMAX(). --- src/attrib.c | 11 ++++++----- src/insight.c | 8 +++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/attrib.c b/src/attrib.c index 23747bf59..1151a88d9 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -308,11 +308,12 @@ poisontell(int typ, /* which attribute */ /* called when an attack or trap has poisoned hero (used to be in mon.c) */ void -poisoned(const char *reason, /* controls what messages we display */ - int typ, - const char *pkiller, /* for score+log file if fatal */ - int fatal, /* if fatal is 0, limit damage to adjattrib */ - boolean thrown_weapon) /* thrown weapons are less deadly */ +poisoned( + const char *reason, /* controls what messages we display */ + int typ, + const char *pkiller, /* for score+log file if fatal */ + int fatal, /* if fatal is 0, limit damage to adjattrib */ + boolean thrown_weapon) /* thrown weapons are less deadly */ { int i, loss, kprefix = KILLED_BY_AN; boolean blast = !strcmp(reason, "blast"); diff --git a/src/insight.c b/src/insight.c index cdc4ec412..d7958b576 100644 --- a/src/insight.c +++ b/src/insight.c @@ -260,14 +260,16 @@ cause_known( /* format a characteristic value, accommodating Strength's strangeness */ static char * -attrval(int attrindx, int attrvalue, - char resultbuf[]) /* should be at least [7] to hold "18/100\0" */ +attrval( + int attrindx, + int attrvalue, + char resultbuf[]) /* should be at least [7] to hold "18/100\0" */ { if (attrindx != A_STR || attrvalue <= 18) Sprintf(resultbuf, "%d", attrvalue); else if (attrvalue > STR18(100)) /* 19 to 25 */ Sprintf(resultbuf, "%d", attrvalue - 100); - else /* simplify "18/ **" to be "18/100" */ + else /* simplify "18/\**" to be "18/100" */ Sprintf(resultbuf, "18/%02d", attrvalue - 18); return resultbuf; } From 433d9913356cc5ea46b1265ec5baf96f06bd5c00 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 12 Oct 2022 12:24:59 -0400 Subject: [PATCH 09/22] MinGW build update --- sys/windows/Makefile.mingw32 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/windows/Makefile.mingw32 b/sys/windows/Makefile.mingw32 index 63ffe2637..9070ae6fe 100644 --- a/sys/windows/Makefile.mingw32 +++ b/sys/windows/Makefile.mingw32 @@ -727,7 +727,7 @@ COREOBJS = $(addsuffix .o, allmain alloc apply artifact attrib ball bones botl c teleport timeout topten track trap u_init uhitm utf8map vault version vision \ weapon were wield windmain windows windsys wizard worm worn write zap) -CFLAGSW = $(CFLAGS) $(COMMONDEF) $(DLBFLG) -DTILES -D_WINDOWS -DMSWIN_GRAPHICS -DSAFEPROCS -DNOTTYGRPHICS +CFLAGSW = $(CFLAGS) $(COMMONDEF) $(DLBFLG) -DTILES -D_WINDOWS -DMSWIN_GRAPHICS -DSAFEPROCS -DNOTTYGRAPHICS ONHW = $(O)nethackw NHWONLY = $(addsuffix .o, mhaskyn mhdlg mhfont mhinput mhmain mhmap mhmenu \ From 05f8ed0649ae573f9f220a4f77a513aef049e630 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 12 Oct 2022 13:47:12 -0700 Subject: [PATCH 10/22] monk strength Add a stack of 2 tins of spinach near the leader on the monk quest start level and another stack of 2 blessed tins of spinach at a random spot on the monk quest locate level, to compensate for the inability to gain strength from giant corpses if they adhere to vegan or vegetarian conduct. paxed supplied the 'tinplace' magic. 4 tins of spinach aren't nearly enough to get to 18/100, but by uncursing the first pair, if necessary, and waiting until strength is at least 18, they can be eaten to add 4..40 (average 22) points of exceptional strength. (Players choosing either of those conducts for other roles or foodless for any role are on their own as far as boosting Str goes, same as before.) The special level loader needed to be modified to handle tins of spinach. It now accepts "spinach" as a fake monster type for an object of type "tin". Also added support for empty tins since it involved the same code, and use of fake monster type "empty" with object type "egg" to be able to create generic (unhatchable) eggs. (Wishing for "egg" produces those by default but it also accepts explicit "empty egg" by coincidence.) --- dat/Mon-loca.lua | 8 ++++++++ dat/Mon-strt.lua | 3 +++ doc/fixes3-7-0.txt | 1 + src/sp_lev.c | 18 ++++++++++++++---- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/dat/Mon-loca.lua b/dat/Mon-loca.lua index 75ea76ec9..598b364eb 100644 --- a/dat/Mon-loca.lua +++ b/dat/Mon-loca.lua @@ -57,6 +57,14 @@ des.object() des.object() des.object() des.object() +-- since vegetarian monks shouldn't eat giant corpses, give a chance for +-- Str boost that isn't throttled by exercise restrictions; +-- make a modest effort (Elbereth only) to prevent xorns from eating the tins +local tinplace = selection.negate():filter_mapchar('.') +local tinloc = tinplace:rndcoord(0) +des.object({ id="tin", coord=tinloc, quantity=2, buc="blessed", + montype="spinach" }) +des.engraving({ coord=tinloc, type="burn", text="Elbereth" }) -- Random traps des.trap() des.trap() diff --git a/dat/Mon-strt.lua b/dat/Mon-strt.lua index 287e19887..ffbfec4e2 100644 --- a/dat/Mon-strt.lua +++ b/dat/Mon-strt.lua @@ -101,3 +101,6 @@ end for i = 1, 4 do des.monster("xorn", spacelocs:rndcoord(1)) end +-- next to leader, so possibly tricky to pick up if not ready for quest yet; +-- there's no protection against a xorn eating these tins; BUC state is random +des.object({ id="tin", coord = {29, 9}, quantity=2, montype="spinach" }) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 6f437f347..bea0aa0bc 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1856,6 +1856,7 @@ rudimentary key rebinding in game options experimental #saveoptions command to allow saving configuration settings mouse buttons can be bound to extended commands hero poly'd into purple worm can gain intrinsics from digesting whole monster +add some tins of spinach to monk's quest (vegan => no Str from giant corpses) Platform- and/or Interface-Specific New Features diff --git a/src/sp_lev.c b/src/sp_lev.c index 73411d4fc..191a50c99 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -3551,12 +3551,22 @@ lspo_object(lua_State *L) || tmpobj.id == CORPSE || tmpobj.id == TIN || tmpobj.id == FIGURINE) { struct permonst *pm = NULL; + boolean nonpmobj = FALSE; int i; char *montype = get_table_str_opt(L, "montype", NULL); if (montype) { - if (strlen(montype) == 1 - && def_char_to_monclass(*montype) != MAXMCLASSES) { + if ((tmpobj.id == TIN && (!strcmpi(montype, "spinach") + /* id="tin",montype="empty" produces an empty tin */ + || !strcmpi(montype, "empty"))) + /* id="egg",montype="empty" produces a generic, unhatchable + egg rather than an "empty egg" */ + || (tmpobj.id == EGG && !strcmpi(montype, "empty"))) { + tmpobj.corpsenm = NON_PM; + tmpobj.spe = !strcmpi(montype, "spinach") ? 1 : 0; + nonpmobj = TRUE; + } else if (strlen(montype) == 1 + && def_char_to_monclass(*montype) != MAXMCLASSES) { pm = mkclass(def_char_to_monclass(*montype), G_NOGEN | G_IGNORE); } else { @@ -3573,7 +3583,7 @@ lspo_object(lua_State *L) free((genericptr_t) montype); if (pm) tmpobj.corpsenm = monsndx(pm); - else + else if (!nonpmobj) nhl_error(L, "Unknown montype"); } if (tmpobj.id == STATUE || tmpobj.id == CORPSE) { @@ -3588,7 +3598,7 @@ lspo_object(lua_State *L) tmpobj.spe = lflags; } else if (tmpobj.id == EGG) { tmpobj.spe = get_table_boolean_opt(L, "laid_by_you", 0) ? 1 : 0; - } else { + } else if (!nonpmobj) { /* tmpobj.spe is already set for nonpmobj */ tmpobj.spe = 0; } } From 69ed0332589562a89c3d7cdbddf43fc9fd550da8 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Wed, 5 Oct 2022 22:19:52 -0400 Subject: [PATCH 11/22] Make #attributes gold line match #showgold The #showgold command now mentions (known) gold socked away in containers in your inventory as of 706b1a9. Since the gold info in the attributes display and dumplog matches the output of #showgold otherwise, update it to do the same thing. Also refactored doprgold a bit to be a little more compact, as opposed to enumerating all the different combinations of gold/no gold in open inventory/containers. This eliminated some string constants that were broken up into multiple constants/lines (like "line 1 " "line 2"), which NetHack code style seems to prefer to avoid. --- src/insight.c | 21 ++++++++++++++------- src/invent.c | 29 +++++++++++++++-------------- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/src/insight.c b/src/insight.c index d7958b576..52ce6269b 100644 --- a/src/insight.c +++ b/src/insight.c @@ -718,18 +718,25 @@ basics_enlightenment(int mode UNUSED, int final) (u.uac < 0) ? "best" : "worst"); enl_msg("Your armor class ", "is ", "was ", buf, ""); - /* gold; similar to doprgold(#seegold) but without shop billing info; - same amount as shown on status line which ignores container contents */ + /* gold; similar to doprgold (#showgold) but without shop billing info; + includes container contents, unlike status line but like doprgold */ { - static const char Your_wallet[] = "Your wallet "; - long umoney = money_cnt(g.invent); + long umoney = money_cnt(g.invent), hmoney = hidden_gold(final); if (!umoney) { - enl_msg(Your_wallet, "is ", "was ", "empty", ""); + Sprintf(buf, " Your wallet %s empty", !final ? "is" : "was"); } else { - Sprintf(buf, "%ld %s", umoney, currency(umoney)); - enl_msg(Your_wallet, "contains ", "contained ", buf, ""); + Sprintf(buf, " Your wallet contain%s %ld %s", !final ? "s" : "ed", + umoney, currency(umoney)); } + if (hmoney) { + Sprintf(eos(buf), + ", %s you %s %ld %s stashed away in your pack", + umoney ? "and" : "but", !final ? "have" : "had", + hmoney, umoney ? "more" : currency(hmoney)); + } + Strcat(buf, "."); + enlght_out(buf); } if (flags.pickup) { diff --git a/src/invent.c b/src/invent.c index ff93efa26..01794c024 100644 --- a/src/invent.c +++ b/src/invent.c @@ -4496,20 +4496,21 @@ doprgold(void) long hmoney = hidden_gold(FALSE); if (Verbose(1, doprgold)) { - if (!umoney && !hmoney) - Your("wallet is empty."); - else if (umoney && !hmoney) - Your("wallet contains %ld %s.", umoney, currency(umoney)); - else if (!umoney && hmoney) - Your("wallet is empty, but there %s %ld %s stashed away in " - "your pack.", - (hmoney == 1) ? "is" : "are", - hmoney, currency(hmoney)); - else if (umoney && hmoney) - Your("wallet contains %ld %s, and there %s %ld more stashed " - "away in your pack.", umoney, currency(umoney), - (hmoney == 1) ? "is" : "are", - hmoney); + char buf[BUFSZ]; + + if (!umoney) { + Strcpy(buf, "Your wallet is empty"); + } else { + Sprintf(buf, "Your wallet contains %ld %s", + umoney, currency(umoney)); + } + if (hmoney) { + Sprintf(eos(buf), + ", %s you have %ld %s stashed away in your pack", + umoney ? "and" : "but", hmoney, + umoney ? "more" : currency(hmoney)); + } + pline("%s.", buf); } else { long total = umoney + hmoney; if (total) From 555196d334034d91c66150b1c98fe942fe400bb2 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Wed, 5 Oct 2022 23:01:07 -0400 Subject: [PATCH 12/22] Move stashed gold in #attributes to its own line The line got a lot longer than most other #attributes lines when the hero had gold both in open inventory and in stashed containers, so break it up into two lines (using the same approach as the pantheon info in the first section). Maybe this isn't necessary but it does make it stand out less. --- src/insight.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/insight.c b/src/insight.c index 52ce6269b..9ed83db57 100644 --- a/src/insight.c +++ b/src/insight.c @@ -729,14 +729,15 @@ basics_enlightenment(int mode UNUSED, int final) Sprintf(buf, " Your wallet contain%s %ld %s", !final ? "s" : "ed", umoney, currency(umoney)); } - if (hmoney) { - Sprintf(eos(buf), - ", %s you %s %ld %s stashed away in your pack", - umoney ? "and" : "but", !final ? "have" : "had", - hmoney, umoney ? "more" : currency(hmoney)); - } - Strcat(buf, "."); + Strcat(buf, hmoney ? "," : "."); enlght_out(buf); + + if (hmoney) { + Sprintf(buf, "%ld %s stashed away in your pack", + hmoney, umoney ? "more" : currency(hmoney)); + enl_msg(umoney ? "and you " : "but you ", "have ", "had ", buf, + ""); + } } if (flags.pickup) { From 4c98ba493bb7eaa7c556c4b720a7b6df7ea74d0e Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Fri, 7 Oct 2022 12:39:18 -0400 Subject: [PATCH 13/22] Remove explicit 'none' opt from autounlock handler The autounlock handler included an explicit 'none' option, a choice that gave it a different UX from similar existing compound option handlers (e.g. paranoid_confirm or pickup_types), which set 'none' simply by deselecting all options. It didn't make the menu any easier to use (at least in my experience), since in order to go from some combination of options to 'none', you'd have to deselect everything anyway (which on its own was enough to set 'none', so there was no reason to explicitly select it after doing so). Make the autounlock handler work like other compound option handlers, such that deselecting all options is the way to set 'none', and there is no explicit 'none' option included in the list. --- src/options.c | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/src/options.c b/src/options.c index 435586e0e..83895b8f1 100644 --- a/src/options.c +++ b/src/options.c @@ -193,7 +193,6 @@ static NEARDATA const char *msgwind[][3] = { /* 'msg_window' settings */ #endif /* autounlock settings */ static NEARDATA const char *unlocktypes[][2] = { - { "none", "" }, { "untrap", "(might fail)" }, { "apply-key", "" }, { "kick", "(doors only)" }, @@ -782,8 +781,10 @@ optfn_autounlock( op = trimspaces(op); /* might have trailing space after * plus sign removal */ } - for (i = 0; i < SIZE(unlocktypes); ++i) - if (!strncmpi(op, unlocktypes[i][0], Strlen(op)) + if (str_start_is("none", op, TRUE)) + negated = TRUE; + for (i = 0; i < SIZE(unlocktypes); ++i) { + if (str_start_is(unlocktypes[i][0], op, TRUE) /* fuzzymatch() doesn't match leading substrings but this allows "apply_key" and "applykey" to match "apply-key"; "apply key" too if part of foo+bar */ @@ -810,6 +811,7 @@ optfn_autounlock( return optn_silenterr; } } + } op = nxt; } if (negated && newflags != 0) { @@ -832,13 +834,13 @@ optfn_autounlock( *opts = '\0'; if (flags.autounlock & AUTOUNLOCK_UNTRAP) - Sprintf(eos(opts), "%s%s", p, unlocktypes[1][0]), p = plus; + Sprintf(eos(opts), "%s%s", p, unlocktypes[0][0]), p = plus; if (flags.autounlock & AUTOUNLOCK_APPLY_KEY) - Sprintf(eos(opts), "%s%s", p, unlocktypes[2][0]), p = plus; + Sprintf(eos(opts), "%s%s", p, unlocktypes[1][0]), p = plus; if (flags.autounlock & AUTOUNLOCK_KICK) - Sprintf(eos(opts), "%s%s", p, unlocktypes[3][0]), p = plus; + Sprintf(eos(opts), "%s%s", p, unlocktypes[2][0]), p = plus; if (flags.autounlock & AUTOUNLOCK_FORCE) - Sprintf(eos(opts), "%s%s", p, unlocktypes[4][0]); /*no more p*/ + Sprintf(eos(opts), "%s%s", p, unlocktypes[3][0]); /*no more p*/ } return optn_ok; } @@ -4856,38 +4858,21 @@ handler_autounlock(int optidx) for (i = 0; i < SIZE(unlocktypes); ++i) { Sprintf(buf, "%-10.10s%c%.40s", unlocktypes[i][0], sep, unlocktypes[i][1]); - presel = !i ? !flags.autounlock : (flags.autounlock & (1 << (i - 1))); + presel = (flags.autounlock & (1 << i)); any.a_int = i + 1; add_menu(tmpwin, &nul_glyphinfo, &any, *unlocktypes[i][0], 0, ATR_NONE, clr, buf, - ((presel ? MENU_ITEMFLAGS_SELECTED : MENU_ITEMFLAGS_NONE) - | (!i ? MENU_ITEMFLAGS_SKIPINVERT : 0))); + (presel ? MENU_ITEMFLAGS_SELECTED : MENU_ITEMFLAGS_NONE)); } Sprintf(buf, "Select '%.20s' actions:", optname); end_menu(tmpwin, buf); n = select_menu(tmpwin, PICK_ANY, &window_pick); if (n > 0) { - int k; - boolean wasnone = !flags.autounlock; - unsigned newflags = 0, noflags = 0; + unsigned newflags = 0; - for (i = 0; i < n; ++i) { - k = window_pick[i].item.a_int - 1; - if (k) - newflags |= (1 << (k - 1)); - else - noflags = 1; - } - /* wasnone: 'none' is preselected; - !wasnone: don't force it to be unselected */ - if (newflags && noflags && !wasnone) { - config_error_add( - "Invalid value combination for \"%s\": 'none' with some", - optname); - res = optn_silenterr; - } else { - flags.autounlock = newflags; - } + for (i = 0; i < n; ++i) + newflags |= (1 << (window_pick[i].item.a_int - 1)); + flags.autounlock = newflags; free((genericptr_t) window_pick); } else if (n == 0) { /* nothing was picked but menu wasn't cancelled */ /* something that was preselected got unselected, leaving nothing; From 7b9cfe028359957b954d3fa9034e4cb31bc15580 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Fri, 7 Oct 2022 13:18:14 -0400 Subject: [PATCH 14/22] Fix: error handling for invalid autounlock value Because the existing error was the default case in a switch/case statement only reachable if the option matched one of the expected ones in the list, it wasn't actually reachable: something totally out of left-field wouldn't match one of the expected options so never hit the switch, and something that did match one of the expected options would by definition have a first character handled by one of the cases in the switch/case. Do it a slightly different way that should successfully raise an unexpected value error for 'OPTIONS=autounlock:foobar'. I didn't remove the default case entirely, because it could still catch an error if some new value is added to unlocktypes[] without a corresponding case being added to the switch statement. --- src/options.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/options.c b/src/options.c index 83895b8f1..30efd23e2 100644 --- a/src/options.c +++ b/src/options.c @@ -775,6 +775,7 @@ optfn_autounlock( newflags = 0; sep = index(op, '+') ? '+' : ' '; while (op) { + boolean matched = FALSE; op = trimspaces(op); /* might have leading space */ if ((nxt = index(op, sep)) != 0) { *nxt++ = '\0'; @@ -782,13 +783,14 @@ optfn_autounlock( * plus sign removal */ } if (str_start_is("none", op, TRUE)) - negated = TRUE; - for (i = 0; i < SIZE(unlocktypes); ++i) { + negated = TRUE, matched = TRUE; + for (i = 0; i < SIZE(unlocktypes) && !matched; ++i) { if (str_start_is(unlocktypes[i][0], op, TRUE) /* fuzzymatch() doesn't match leading substrings but this allows "apply_key" and "applykey" to match "apply-key"; "apply key" too if part of foo+bar */ || fuzzymatch(op, unlocktypes[i][0], " -_", TRUE)) { + matched = TRUE; switch (*op) { case 'n': negated = TRUE; @@ -806,12 +808,16 @@ optfn_autounlock( newflags |= AUTOUNLOCK_FORCE; break; default: - config_error_add("Invalid value for \"%s\": \"%s\"", - allopt[optidx].name, op); - return optn_silenterr; + matched = FALSE; + break; } } } + if (!matched) { + config_error_add("Invalid value for \"%s\": \"%s\"", + allopt[optidx].name, op); + return optn_silenterr; + } op = nxt; } if (negated && newflags != 0) { From de2c9a42af42370bd188e18ff0cf3dd6cda616b3 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 13 Oct 2022 11:54:11 -0700 Subject: [PATCH 15/22] more PR #897 - autounlock For the 'autounlock option', "none" is gone from the set of choices so case 'n' can't happen anymore. --- src/options.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/options.c b/src/options.c index 30efd23e2..a75ba3115 100644 --- a/src/options.c +++ b/src/options.c @@ -792,9 +792,6 @@ optfn_autounlock( || fuzzymatch(op, unlocktypes[i][0], " -_", TRUE)) { matched = TRUE; switch (*op) { - case 'n': - negated = TRUE; - break; case 'u': newflags |= AUTOUNLOCK_UNTRAP; break; From cb33b9ecc86cb16965cd90ccc7ce157094c2ff29 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 13 Oct 2022 13:19:58 -0700 Subject: [PATCH 16/22] \#saveoptions fix I hadn't ever used #saveoptions before and when I checked to see whether the autounlock:none changes were being handled properly, I discovered that options set via 'm O' weren't being handled at all. This includes some miscellaneous reformatting of things noticed while tracking down the problem. --- doc/fixes3-7-0.txt | 2 ++ src/files.c | 9 ++++++--- src/options.c | 14 +++++++++----- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index bea0aa0bc..f9c08a7ee 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1410,6 +1410,8 @@ tipping contents of one container directly into another allowed transferring prevent random traps from being created inside the shops in the tourist quest if hero's steed got hit by knockback effect, impossible "no monster to remove" would occur (plus more warnings if 'sanity_check' was On) +the #saveoptions command included options changed via doset_simple() but not + ones changed via full doset() curses: 'msg_window' option wasn't functional for curses unless the binary also included tty support diff --git a/src/files.c b/src/files.c index 205cca5e6..7642c3a8e 100644 --- a/src/files.c +++ b/src/files.c @@ -2000,11 +2000,13 @@ do_write_config_file(void) wait_synch(); pline("Some settings are not saved!"); wait_synch(); - pline("All manual customization and comments are removed from the file!"); + pline( + "All manual customization and comments are removed from the file!"); wait_synch(); } #define overwrite_prompt "Overwrite config file %.*s?" - Sprintf(tmp, overwrite_prompt, (int)(BUFSZ - sizeof overwrite_prompt - 2), configfile); + Sprintf(tmp, overwrite_prompt, + (int) (BUFSZ - sizeof overwrite_prompt - 2), configfile); #undef overwrite_prompt if (!paranoid_query(TRUE, tmp)) return ECMD_OK; @@ -2021,7 +2023,8 @@ do_write_config_file(void) fclose(fp); strbuf_empty(&buf); if (wrote != len) - pline("An error occurred, wrote only partial data (%lu/%lu).", wrote, len); + pline("An error occurred, wrote only partial data (%lu/%lu).", + wrote, len); } return ECMD_OK; } diff --git a/src/options.c b/src/options.c index a75ba3115..ab5a4b2b5 100644 --- a/src/options.c +++ b/src/options.c @@ -4879,8 +4879,8 @@ handler_autounlock(int optidx) free((genericptr_t) window_pick); } else if (n == 0) { /* nothing was picked but menu wasn't cancelled */ /* something that was preselected got unselected, leaving nothing; - treat that as picking 'none' (even though 'none' might be what - got unselected) */ + treat that as picking 'none' (even though 'none' is no longer + among the choices) */ flags.autounlock = 0; } destroy_nhwindow(tmpwin); @@ -5703,8 +5703,8 @@ handler_verbose(int optidx) flags.verbose = !flags.verbose; } else { Sprintf(buf, - "Set verbose_suppressor[%d] (%ld) to what new decimal value ?", - j, verbosity_suppressions[j]); + "Set verbose_suppressor[%d] (%ld) to what new decimal value ?", + j, verbosity_suppressions[j]); abuf[0] = '\0'; getlin(buf, abuf); if (abuf[0] == '\033') @@ -8330,6 +8330,9 @@ doset(void) /* changing options via menu by Per Liboriussen */ reslt = (*allopt[k].optfn)(allopt[k].idx, do_handler, FALSE, empty_optstr, empty_optstr); + /* if player eventually saves options, include this one */ + if (reslt == optn_ok) + opt_set_in_config[k] = TRUE; } else { char abuf[BUFSZ]; @@ -8992,7 +8995,8 @@ all_options_strbuf(strbuf_t *sbuf) - verbose */ buf2 = get_option_value(name, TRUE); if (buf2) { - Sprintf(tmp, "OPTIONS=%s:%s\n", name, buf2); + Snprintf(tmp, sizeof tmp - 1, "OPTIONS=%s:%s", name, buf2); + Strcat(tmp, "\n"); /* guaranteed to fit */ strbuf_append(sbuf, tmp); } break; From 0848ae7d83629fbb4e8290def8c59d1f8c59b124 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 13 Oct 2022 14:03:52 -0700 Subject: [PATCH 17/22] more #saveoptions Force windowtype to be the first option written to new RC file since its value can affect how other options are processed. (Only saved if comes from existing RC file, not command line.) doset() lists a few compound options before the rest too. Combine the two sets of want- to-be-first and move the handling for that to optlist.h where the only cost is that the options are no longer in alphabetical order. --- include/optlist.h | 61 +++++++++++++++++++++++++++++++---------------- src/options.c | 12 ---------- 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/include/optlist.h b/include/optlist.h index b12e10875..215c1ded9 100644 --- a/include/optlist.h +++ b/include/optlist.h @@ -93,11 +93,44 @@ static int optfn_##a(int, int, boolean, char *, char *); /* C:nm, ln, opt_*, setwhere?, negateok?, valok?, dupok?, hndlr? Alias, desc */ /* P:pfx, ln, opt_*, setwhere?, negateok?, valok?, dupok?, hndlr? Alias, desc*/ - NHOPTB(acoustics, Advanced, 0, opt_out, set_in_game, - On, Yes, No, No, NoAlias, &flags.acoustics) + /* + * Most of the options are in alphabetical order; a few are forced + * to the top of list so that doset() will list them first and + * all_options_str() with gather then first to write to the top of + * a new RC file by #saveoptions. + * + * windowtype comes first because its value can affect how wc_ and + * wc2_ options are processed; playmode (for players who can't or + * don't know how to specify a command line) and name (ditto, more + * or less) come next; then role, race, gender, align. Those will + * be at the top of the file for #saveoptions constructed RC file. + */ + NHOPTC(windowtype, Advanced, WINTYPELEN, opt_in, set_gameview, + No, Yes, No, No, NoAlias, + "windowing system to use (should be specified first)") + NHOPTC(playmode, Advanced, 8, opt_in, set_gameview, + No, Yes, No, No, NoAlias, + "normal play, non-scoring explore mode, or debug mode") + NHOPTC(name, Advanced, PL_NSIZ, opt_in, set_gameview, + No, Yes, No, No, NoAlias, + "your character's name (e.g., name:Merlin-W)") + NHOPTC(role, Advanced, PL_CSIZ, opt_in, set_gameview, + No, Yes, No, No, "character", + "your starting role (e.g., Barbarian, Valkyrie)") + NHOPTC(race, Advanced, PL_CSIZ, opt_in, set_gameview, + No, Yes, No, No, NoAlias, + "your starting race (e.g., Human, Elf)") + NHOPTC(gender, Advanced, 8, opt_in, set_gameview, + No, Yes, No, No, NoAlias, + "your starting gender (male or female)") NHOPTC(align, Advanced, 8, opt_in, set_gameview, No, Yes, No, No, NoAlias, "your starting alignment (lawful, neutral, or chaotic)") + /* end of special ordering; remainder of entries are in alphabetical order + */ + NHOPTB(acoustics, Advanced, 0, opt_out, set_in_game, + On, Yes, No, No, NoAlias, &flags.acoustics) + /* NHOPTC(align) -- moved to top */ NHOPTC(align_message, Advanced, 20, opt_in, set_gameview, Yes, Yes, No, Yes, NoAlias, "message window alignment") NHOPTC(align_status, Advanced, 20, opt_in, set_gameview, @@ -236,9 +269,7 @@ static int optfn_##a(int, int, boolean, char *, char *); No, Yes, No, No, NoAlias, "name of a fruit you enjoy eating") NHOPTB(fullscreen, Advanced, 0, opt_in, set_in_config, Off, Yes, No, No, NoAlias, &iflags.wc2_fullscreen) - NHOPTC(gender, Advanced, 8, opt_in, set_gameview, - No, Yes, No, No, NoAlias, - "your starting gender (male or female)") + /* NHOPTC(gender) -- moved to top */ NHOPTC(glyph, Advanced, 40, opt_in, set_in_game, No, Yes, Yes, No, NoAlias, "set representation of a glyph to a unicode value and color") @@ -383,9 +414,7 @@ static int optfn_##a(int, int, boolean, char *, char *); NHOPTC(msghistory, Advanced, 5, opt_in, set_gameview, Yes, Yes, No, No, NoAlias, "number of top line messages to save") - NHOPTC(name, Advanced, PL_NSIZ, opt_in, set_gameview, - No, Yes, No, No, NoAlias, - "your character's name (e.g., name:Merlin-W)") + /* NHOPTC(name) -- moved to top */ #ifdef NEWS NHOPTB(news, Advanced, 0, opt_in, set_in_config, Off, Yes, No, No, NoAlias, &iflags.news) @@ -442,9 +471,7 @@ static int optfn_##a(int, int, boolean, char *, char *); NHOPTC(player_selection, Advanced, 12, opt_in, set_gameview, No, Yes, No, No, NoAlias, "choose character via dialog or prompts") - NHOPTC(playmode, Advanced, 8, opt_in, set_gameview, - No, Yes, No, No, NoAlias, - "normal play, non-scoring explore mode, or debug mode") + /* NHOPTC(playmode) -- moved to top */ NHOPTB(popup_dialog, Advanced, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias, &iflags.wc_popup_dialog) NHOPTB(preload_tiles, Advanced, 0, opt_out, set_in_config, /* MSDOS only */ @@ -453,9 +480,7 @@ static int optfn_##a(int, int, boolean, char *, char *); Off, Yes, No, No, NoAlias, &flags.pushweapon) NHOPTB(quick_farsight, Advanced, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias, &flags.quick_farsight) - NHOPTC(race, Advanced, PL_CSIZ, opt_in, set_gameview, - No, Yes, No, No, NoAlias, - "your starting race (e.g., Human, Elf)") + /* NHOPTC(race) -- moved to top */ #ifdef MICRO NHOPTB(rawio, Advanced, 0, opt_in, set_in_config, Off, Yes, No, No, NoAlias, &iflags.rawio) @@ -468,9 +493,7 @@ static int optfn_##a(int, int, boolean, char *, char *); NHOPTC(roguesymset, Advanced, 70, opt_in, set_in_game, No, Yes, No, Yes, NoAlias, "load a set of rogue display symbols from symbols file") - NHOPTC(role, Advanced, PL_CSIZ, opt_in, set_gameview, - No, Yes, No, No, "character", - "your starting role (e.g., Barbarian, Valkyrie)") + /* NHOPTC(role) -- moved to top */ NHOPTC(runmode, Advanced, sizeof "teleport", opt_in, set_in_game, Yes, Yes, No, Yes, NoAlias, "display frequency when `running' or `travelling'") @@ -650,9 +673,7 @@ static int optfn_##a(int, int, boolean, char *, char *); NHOPTC(windowcolors, Advanced, 80, opt_in, set_gameview, No, Yes, No, No, NoAlias, "the foreground/background colors of windows") - NHOPTC(windowtype, Advanced, WINTYPELEN, opt_in, set_gameview, - No, Yes, No, No, NoAlias, - "windowing system to use (should be specified first)") + /* NHOPTC(windowtype) -- moved to top */ NHOPTB(wizmgender, Advanced, 0, opt_in, set_wizonly, Off, Yes, No, No, NoAlias, &iflags.wizmgender) NHOPTB(wizweight, Advanced, 0, opt_in, set_wizonly, diff --git a/src/options.c b/src/options.c index ab5a4b2b5..ca3cff25b 100644 --- a/src/options.c +++ b/src/options.c @@ -8240,23 +8240,11 @@ doset(void) /* changing options via menu by Per Liboriussen */ "Compounds (selecting will prompt for new value):", MENU_ITEMFLAGS_NONE); - /* deliberately put playmode, name, role+race+gender+align first */ - doset_add_menu(tmpwin, "playmode", fmtstr_doset, opt_playmode, 0); - doset_add_menu(tmpwin, "name", fmtstr_doset, opt_name, 0); - doset_add_menu(tmpwin, "role", fmtstr_doset, opt_role, 0); - doset_add_menu(tmpwin, "race", fmtstr_doset, opt_race, 0); - doset_add_menu(tmpwin, "gender", fmtstr_doset, opt_gender, 0); - doset_add_menu(tmpwin, "align", fmtstr_doset, opt_align, 0); - for (pass = startpass; pass <= endpass; pass++) for (i = 0; (name = allopt[i].name) != 0; i++) { if (allopt[i].opttyp != CompOpt) continue; if ((int) allopt[i].setwhere == pass) { - if (!strcmp(name, "playmode") || !strcmp(name, "name") - || !strcmp(name, "role") || !strcmp(name, "race") - || !strcmp(name, "gender") || !strcmp(name, "align")) - continue; if ((is_wc_option(name) && !wc_supported(name)) || (is_wc2_option(name) && !wc2_supported(name))) continue; From b7d46980cef6fb349cc940c61007ec922f7fe8f3 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 14 Oct 2022 12:42:12 -0700 Subject: [PATCH 18/22] rename #wizcheckmdifficulty to #wizmondiff Shorten the name of the recently added debug command that validates monster difficulty values. 'wizcheckmdifficulty' was 19 characters long, the next longest is 14 ('wiztelekinesis'). The extra width messed up the Qt interface's extended command selection dialog when wizard mode commands are included. It sizes the button for every command to fit the longest name; the increase in size from 14 to 19 made the button grid become too big for the screen. Add monsters' base difficulty level to the #wizmondiff output. Add #wizmondiff and #wizdispmacros to 'wizhelp'. --- dat/wizhelp | 8 ++++-- src/cmd.c | 82 +++++++++++++++++++++++++++++++++++------------------ 2 files changed, 60 insertions(+), 30 deletions(-) diff --git a/dat/wizhelp b/dat/wizhelp index c3638a366..3bdea8cfb 100644 --- a/dat/wizhelp +++ b/dat/wizhelp @@ -1,6 +1,6 @@ Debug-Mode Quick Reference: -^E == detect secret doors and traps +^E == detect secret doors and traps nearby ^F == map level; reveals traps and secret corridors but not secret doors ^G == create monster by name or class ^I == identify items in pack @@ -13,7 +13,7 @@ Debug-Mode Quick Reference: escalates impossible warnings to panic #levelchange == set hero's experience level #lightsources == show mobile light sources -#migratemons == show migrating monsters; optionally create some +#migratemons == show migrating monsters; [Opt] potentially create some #panic == panic test (warning: current game will be terminated) #polyself == polymorph self #stats == show memory statistics @@ -23,12 +23,14 @@ Debug-Mode Quick Reference: #vision == show vision array #wizborn == show monster birth/death/geno/extinct stats #wizcast == cast any spell +#wizdispmacros == [Opt] check internal display classifications #wizfliplevel == transpose the current dungeon level #wizintrinsic == set selected intrinsic timeouts #wizkill == remove monster(s) from play #wizloaddes == load and execute a special level description lua script #wizloadlua == load and execute a lua script #wizmakemap == recreate the current dungeon level +#wizmondiff == [Opt] check for discrepancies in monster difficulty ratings #wizrumorcheck == validate rumor indexing; also show first, second, and last random engravings, epitaphs, and hallucinatory monsters #wizseenv == show map locations' seen vectors @@ -45,3 +47,5 @@ debug_overwrite_stairs monpolycontrol == prompt for new form whenever any monster changes shape sanity_check == evaluate monsters, objects, and map prior to each turn wizweight == augment object descriptions with their objects' weight + +[Opt] = conditionally available depending upon build-time settings diff --git a/src/cmd.c b/src/cmd.c index 8b92bb33f..cf7a29632 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -17,7 +17,7 @@ #endif #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || defined(DEBUG) static int wiz_display_macros(void); -static int wiz_check_mdifficulty(void); +static int wiz_mon_diff(void); #endif #ifdef DUMB /* stuff commented out in extern.h, but needed here */ @@ -2757,8 +2757,6 @@ struct ext_func_tab extcmdlist[] = { { C('e'), "wizdetect", "reveal hidden things within a small radius", wiz_detect, IFBURIED | WIZMODECMD, NULL }, #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || defined(DEBUG) - { '\0', "wizcheckmdifficulty", "validate the difficulty levels of monsters", - wiz_check_mdifficulty, IFBURIED | AUTOCOMPLETE | WIZMODECMD, NULL }, { '\0', "wizdispmacros", "validate the display macro ranges", wiz_display_macros, IFBURIED | AUTOCOMPLETE | WIZMODECMD, NULL }, #endif @@ -2783,6 +2781,10 @@ struct ext_func_tab extcmdlist[] = { wiz_makemap, IFBURIED | WIZMODECMD, NULL }, { C('f'), "wizmap", "map the level", wiz_map, IFBURIED | WIZMODECMD, NULL }, +#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || defined(DEBUG) + { '\0', "wizmondiff", "validate the difficulty ratings of monsters", + wiz_mon_diff, IFBURIED | AUTOCOMPLETE | WIZMODECMD, NULL }, +#endif { '\0', "wizrumorcheck", "verify rumor boundaries", wiz_rumor_check, IFBURIED | AUTOCOMPLETE | WIZMODECMD, NULL }, { '\0', "wizseenv", "show map locations' seen vectors", @@ -3695,8 +3697,12 @@ count_obj(struct obj *chain, long *total_count, long *total_size, DISABLE_WARNING_FORMAT_NONLITERAL /* RESTORE_WARNING follows show_wiz_stats */ static void -obj_chain(winid win, const char *src, struct obj *chain, boolean force, - long *total_count, long *total_size) +obj_chain( + winid win, + const char *src, + struct obj *chain, + boolean force, + long *total_count, long *total_size) { char buf[BUFSZ]; long count = 0L, size = 0L; @@ -3712,8 +3718,11 @@ obj_chain(winid win, const char *src, struct obj *chain, boolean force, } static void -mon_invent_chain(winid win, const char *src, struct monst *chain, - long *total_count, long *total_size) +mon_invent_chain( + winid win, + const char *src, + struct monst *chain, + long *total_count, long *total_size) { char buf[BUFSZ]; long count = 0, size = 0; @@ -3731,8 +3740,10 @@ mon_invent_chain(winid win, const char *src, struct monst *chain, } static void -contained_stats(winid win, const char *src, long *total_count, - long *total_size) +contained_stats( + winid win, + const char *src, + long *total_count, long *total_size) { char buf[BUFSZ]; long count = 0, size = 0; @@ -3785,8 +3796,12 @@ size_monst(struct monst *mtmp, boolean incl_wsegs) } static void -mon_chain(winid win, const char *src, struct monst *chain, - boolean force, long *total_count, long *total_size) +mon_chain( + winid win, + const char *src, + struct monst *chain, + boolean force, + long *total_count, long *total_size) { char buf[BUFSZ]; long count, size; @@ -3808,7 +3823,9 @@ mon_chain(winid win, const char *src, struct monst *chain, } static void -misc_stats(winid win, long *total_count, long *total_size) +misc_stats( + winid win, + long *total_count, long *total_size) { char buf[BUFSZ], hdrbuf[QBUFSZ]; long count, size; @@ -4010,6 +4027,8 @@ wiz_show_stats(void) return ECMD_OK; } +RESTORE_WARNING_FORMAT_NONLITERAL + #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || defined(DEBUG) /* the #wizdispmacros command * Verify that some display macros are returning sane values */ @@ -4031,9 +4050,8 @@ wiz_display_macros(void) if (test == no_glyph) { if (!trouble++) putstr(win, 0, display_issues); - Sprintf(buf, - "glyph_is_cmap() / glyph_to_cmap(glyph=%d)" - " sync failure, returned NO_GLYPH (%d)", + Sprintf(buf, "glyph_is_cmap() / glyph_to_cmap(glyph=%d)" + " sync failure, returned NO_GLYPH (%d)", glyph, test); putstr(win, 0, buf); } @@ -4051,7 +4069,7 @@ wiz_display_macros(void) if (!trouble++) putstr(win, 0, display_issues); Sprintf(buf, "glyph_to_cmap(glyph=%d) returns %d" - " exceeds defsyms[%d] bounds (MAX_GLYPH = %d)", + " exceeds defsyms[%d] bounds (MAX_GLYPH = %d)", glyph, test, SIZE(defsyms), max_glyph); putstr(win, 0, buf); } @@ -4064,7 +4082,7 @@ wiz_display_macros(void) if (!trouble++) putstr(win, 0, display_issues); Sprintf(buf, "glyph_to_mon(glyph=%d) returns %d" - " exceeds mons[%d] bounds", + " exceeds mons[%d] bounds", glyph, test, NUMMONS); putstr(win, 0, buf); } @@ -4077,14 +4095,14 @@ wiz_display_macros(void) if (!trouble++) putstr(win, 0, display_issues); Sprintf(buf, "glyph_to_obj(glyph=%d) returns %d" - " exceeds objects[%d] bounds", + " exceeds objects[%d] bounds", glyph, test, NUM_OBJECTS); putstr(win, 0, buf); } } } if (!trouble) - putstr(win, 0, "No display macro issues detected"); + putstr(win, 0, "No display macro issues detected."); display_nhwindow(win, FALSE); destroy_nhwindow(win); return ECMD_OK; @@ -4092,15 +4110,22 @@ wiz_display_macros(void) #endif /* (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || defined(DEBUG) */ #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || defined(DEBUG) -/* the #wizcheckmdifficulty command */ +/* the #wizmondiff command */ static int -wiz_check_mdifficulty(void) +wiz_mon_diff(void) { + static const char window_title[] = "Review of monster difficulty ratings" + " [index:level]:"; char buf[BUFSZ]; winid win; int mhardcoded = 0, mcalculated = 0, trouble = 0, cnt = 0, mdiff = 0; + int mlev; struct permonst *ptr; - static const char *const window_title = "Review of monster difficulties:"; + + /* + * Possible extension: choose between showing discrepancies, + * showing all monsters, or monsters within a particular class. + */ win = create_nhwindow(NHW_TEXT); for (ptr = &mons[0]; ptr->mlet; ptr++, cnt++) { @@ -4110,23 +4135,24 @@ wiz_check_mdifficulty(void) if (mdiff) { if (!trouble++) putstr(win, 0, window_title); + mlev = (int) ptr->mlevel; + if (mlev > 50) /* hack for named demons */ + mlev = 50; Snprintf(buf, sizeof buf, - "%-18s [%4d]: calculated: %2d, hardcoded: %2d (%+d)", - ptr->pmnames[NEUTRAL], cnt, mcalculated, mhardcoded, - mdiff); + "%-18s [%3d:%2d]: calculated: %2d, hardcoded: %2d (%+d)", + ptr->pmnames[NEUTRAL], cnt, mlev, + mcalculated, mhardcoded, mdiff); putstr(win, 0, buf); } } if (!trouble) - putstr(win, 0, "No monster difficulty discrepencies were detected"); + putstr(win, 0, "No monster difficulty discrepencies were detected."); display_nhwindow(win, FALSE); destroy_nhwindow(win); return ECMD_OK; } #endif /* (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || defined(DEBUG) */ -RESTORE_WARNING_FORMAT_NONLITERAL - static void you_sanity_check(void) { From e13504649723fba897c270127acefa2da3c15ab0 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 14 Oct 2022 14:42:54 -0700 Subject: [PATCH 19/22] fix several monster difficulty ratings Fix most of the things pointed out by #wizmondiff. Weakening of placeholder 'elf' is due to recent removal of M2_STRONG for it as part of the "orc strongmonst" changes. I assume that the discrepancies for multiple quest leaders came about as part of the change that allows killing the leader as an alternate way to gain access to the lower levels of the quest, but didn't check. I don't know what's up with 'piranha' but just changed it to match generated value. '{freezing,flaming,shocking} sphere' still show up as discrepancies with hardcoded (mons[].difficulty) value higher than generated value. They got harder when their explosion was beefed up, so the formula to calculate difficulty ought to be updated to account for that. --- include/monsters.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/monsters.h b/include/monsters.h index a855fa4d9..df5851a31 100644 --- a/include/monsters.h +++ b/include/monsters.h @@ -2248,7 +2248,7 @@ SIZ(WT_ELF, 350, MS_HUMANOID, MZ_HUMAN), MR_SLEEP, MR_SLEEP, M1_HUMANOID | M1_OMNIVORE | M1_SEE_INVIS, M2_NOPOLY | M2_ELF | M2_COLLECT, - M3_INFRAVISION | M3_INFRAVISIBLE, 2, HI_DOMESTIC, ELF), + M3_INFRAVISION | M3_INFRAVISIBLE, 1, HI_DOMESTIC, ELF), MON("Woodland-elf", S_HUMAN, LVL(4, 12, 10, 10, -5), (G_GENO | G_SGROUP | 2), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, @@ -2735,7 +2735,7 @@ SIZ(60, 30, MS_SILENT, MZ_SMALL), 0, 0, M1_SWIM | M1_AMPHIBIOUS | M1_ANIMAL | M1_SLITHY | M1_NOLIMBS | M1_CARNIVORE | M1_OVIPAROUS | M1_NOTAKE, - M2_HOSTILE, 0, 6, CLR_RED, PIRANHA), + M2_HOSTILE, 0, 7, CLR_RED, PIRANHA), MON("shark", S_EEL, LVL(7, 12, 2, 0, 0), (G_GENO | G_NOGEN), A(ATTK(AT_BITE, AD_PHYS, 5, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), @@ -2948,7 +2948,7 @@ M1_TUNNEL | M1_NEEDPICK | M1_HUMANOID | M1_OMNIVORE, M2_NOPOLY | M2_HUMAN | M2_PNAME | M2_PEACEFUL | M2_STRONG | M2_MALE | M2_COLLECT | M2_MAGIC, - M3_CLOSE | M3_INFRAVISIBLE, 22, HI_LORD, LORD_CARNARVON), + M3_CLOSE | M3_INFRAVISIBLE, 24, HI_LORD, LORD_CARNARVON), MON("Pelias", S_HUMAN, LVL(20, 15, 0, 90, 0), (G_NOGEN | G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 4, 10), ATTK(AT_WEAP, AD_PHYS, 4, 10), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), @@ -2956,7 +2956,7 @@ M1_HUMANOID | M1_OMNIVORE, M2_NOPOLY | M2_HUMAN | M2_PNAME | M2_PEACEFUL | M2_STRONG | M2_MALE | M2_COLLECT | M2_MAGIC, - M3_CLOSE | M3_INFRAVISIBLE, 22, HI_LORD, PELIAS), + M3_CLOSE | M3_INFRAVISIBLE, 24, HI_LORD, PELIAS), MON("Shaman Karnov", S_HUMAN, LVL(20, 15, 0, 90, 20), (G_NOGEN | G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 4, 10), ATTK(AT_MAGC, AD_CLRC, 2, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), @@ -2964,7 +2964,7 @@ M1_HUMANOID | M1_OMNIVORE, M2_NOPOLY | M2_HUMAN | M2_PNAME | M2_PEACEFUL | M2_STRONG | M2_MALE | M2_COLLECT | M2_MAGIC, - M3_CLOSE | M3_INFRAVISIBLE, 22, HI_LORD, SHAMAN_KARNOV), + M3_CLOSE | M3_INFRAVISIBLE, 24, HI_LORD, SHAMAN_KARNOV), #if 0 /* OBSOLETE -- leaders for 3.1.x/3.2.x elf quest when elf was a role */ /* Two for elves - one of each sex. */ @@ -2996,7 +2996,7 @@ M1_HUMANOID | M1_OMNIVORE, M2_NOPOLY | M2_HUMAN | M2_PNAME | M2_PEACEFUL | M2_STRONG | M2_MALE | M2_COLLECT | M2_MAGIC, - M3_CLOSE | M3_INFRAVISIBLE, 22, HI_LORD, HIPPOCRATES), + M3_CLOSE | M3_INFRAVISIBLE, 26, HI_LORD, HIPPOCRATES), MON("King Arthur", S_HUMAN, LVL(20, 15, 0, 90, 20), (G_NOGEN | G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 4, 10), ATTK(AT_WEAP, AD_PHYS, 4, 10), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), @@ -3004,7 +3004,7 @@ M1_HUMANOID | M1_OMNIVORE, M2_NOPOLY | M2_HUMAN | M2_PNAME | M2_PEACEFUL | M2_STRONG | M2_MALE | M2_COLLECT | M2_MAGIC, - M3_CLOSE | M3_INFRAVISIBLE, 23, HI_LORD, KING_ARTHUR), + M3_CLOSE | M3_INFRAVISIBLE, 24, HI_LORD, KING_ARTHUR), MON("Grand Master", S_HUMAN, LVL(25, 15, 0, 90, 0), (G_NOGEN | G_UNIQ), A(ATTK(AT_CLAW, AD_PHYS, 4, 10), ATTK(AT_KICK, AD_PHYS, 2, 8), ATTK(AT_MAGC, AD_CLRC, 2, 8), ATTK(AT_MAGC, AD_CLRC, 2, 8), NO_ATTK, @@ -3032,7 +3032,7 @@ M1_HUMANOID | M1_OMNIVORE | M1_SEE_INVIS | M1_SWIM | M1_AMPHIBIOUS, M2_NOPOLY | M2_HUMAN | M2_PNAME | M2_PEACEFUL | M2_STRONG | M2_MALE | M2_COLLECT | M2_MAGIC, - M3_CLOSE | M3_INFRAVISION | M3_INFRAVISIBLE, 22, HI_LORD, ORION), + M3_CLOSE | M3_INFRAVISION | M3_INFRAVISIBLE, 24, HI_LORD, ORION), /* Note: Master of Thieves is also the Tourist's nemesis. */ MON("Master of Thieves", S_HUMAN, LVL(20, 15, 0, 90, -20), @@ -3051,7 +3051,7 @@ M1_HUMANOID | M1_OMNIVORE, M2_NOPOLY | M2_HUMAN | M2_PNAME | M2_PEACEFUL | M2_STRONG | M2_MALE | M2_COLLECT | M2_MAGIC, - M3_CLOSE | M3_INFRAVISIBLE, 23, HI_LORD, LORD_SATO), + M3_CLOSE | M3_INFRAVISIBLE, 24, HI_LORD, LORD_SATO), MON("Twoflower", S_HUMAN, LVL(20, 15, 10, 90, 0), (G_NOGEN | G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 4, 10), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), @@ -3069,7 +3069,7 @@ M1_HUMANOID | M1_OMNIVORE, M2_NOPOLY | M2_HUMAN | M2_PEACEFUL | M2_STRONG | M2_FEMALE | M2_COLLECT | M2_MAGIC, - M3_CLOSE | M3_INFRAVISIBLE, 23, HI_LORD, NORN), + M3_CLOSE | M3_INFRAVISIBLE, 24, HI_LORD, NORN), MON("Neferet the Green", S_HUMAN, LVL(20, 15, 0, 90, 0), (G_NOGEN | G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 4, 10), ATTK(AT_MAGC, AD_SPEL, 2, 8), @@ -3078,7 +3078,7 @@ M1_HUMANOID | M1_OMNIVORE, M2_NOPOLY | M2_HUMAN | M2_FEMALE | M2_PNAME | M2_PEACEFUL | M2_STRONG | M2_COLLECT | M2_MAGIC, - M3_CLOSE | M3_INFRAVISIBLE, 23, CLR_GREEN, NEFERET_THE_GREEN), + M3_CLOSE | M3_INFRAVISIBLE, 25, CLR_GREEN, NEFERET_THE_GREEN), /* * quest nemeses */ From 659f16070c8282146ae116d2d436f25840b552ae Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 15 Oct 2022 02:13:39 -0700 Subject: [PATCH 20/22] fix github issue #900 - "Elbereth" engravings Issue reported by vultur-cadens: Elbereth used to be effective in inhibiting monster movement when an object was present on the same spot, but since 3.6.0 it isn't. It only functions that way when the hero--or hero's displaced image--is present these days. So special levels that have been using engraved Elbereth to try to protect objects from monsters haven't been providing any useful protection. This makes Elbereth that's engraved during level creation work like it used to in 3.4.3 and earlier: when there's at least one object on the engraving's spot, monsters who are affected by Elbereth will be affected. [I'm fairly sure that that behavior started out unintentionally, as a side-effect of an optimization to only check for scroll of scare monster when there was at least one item present which is a necessary condition for such a scroll.] Old-style Elbereth includes Elbereth chosen as a random engraving during level creation in addition to engravings specified in special level definitions. Engravings by the player don't have the required attribute and player-engraved Elbereth behaves in the 3.6 way. This ought to be replaced by something more general. Perhaps a new engraving type not usable by the player? Fixes #900 --- include/engrave.h | 9 +++++++-- include/extern.h | 2 +- src/engrave.c | 25 ++++++++++++++++--------- src/monmove.c | 11 +++++++---- src/teleport.c | 8 +++++--- 5 files changed, 36 insertions(+), 19 deletions(-) diff --git a/include/engrave.h b/include/engrave.h index 6af923860..c09cc5eaa 100644 --- a/include/engrave.h +++ b/include/engrave.h @@ -20,10 +20,15 @@ struct engr { #define ENGR_BLOOD 5 #define HEADSTONE 6 #define N_ENGRAVE 6 + Bitfield(guardobjects, 1); /* if engr_txt is "Elbereth", it is effective + * against monsters when an object is present + * even when hero isn't (so behaves similarly + * to how Elbereth did in 3.4.3) */ + /* 7 free bits */ }; #define newengr(lth) \ - (struct engr *) alloc((unsigned)(lth) + sizeof(struct engr)) -#define dealloc_engr(engr) free((genericptr_t)(engr)) + (struct engr *) alloc((unsigned) (lth) + (unsigned) sizeof (struct engr)) +#define dealloc_engr(engr) free((genericptr_t) (engr)) #endif /* ENGRAVE_H */ diff --git a/include/extern.h b/include/extern.h index 815bf6a4e..d36dcad82 100644 --- a/include/extern.h +++ b/include/extern.h @@ -809,7 +809,7 @@ extern void cant_reach_floor(coordxy, coordxy, boolean, boolean); extern const char *surface(coordxy, coordxy); extern const char *ceiling(coordxy, coordxy); extern struct engr *engr_at(coordxy, coordxy); -extern boolean sengr_at(const char *, coordxy, coordxy, boolean); +extern struct engr *sengr_at(const char *, coordxy, coordxy, boolean); extern void u_wipe_engr(int); extern void wipe_engr_at(coordxy, coordxy, xint16, boolean); extern void read_engr_at(coordxy, coordxy); diff --git a/src/engrave.c b/src/engrave.c index a7dd57fb2..cae185878 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -271,16 +271,17 @@ engr_at(coordxy x, coordxy y) * If strict checking is requested, the word is only considered to be * present if it is intact and is the entire content of the engraving. */ -boolean +struct engr * sengr_at(const char *s, coordxy x, coordxy y, boolean strict) { - register struct engr *ep = engr_at(x, y); + struct engr *ep = engr_at(x, y); if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= g.moves) { - return (strict ? !strcmpi(ep->engr_txt, s) - : (strstri(ep->engr_txt, s) != 0)); + if (strict ? !strcmpi(ep->engr_txt, s) + : (strstri(ep->engr_txt, s) != 0)) + return ep; } - return FALSE; + return (struct engr *) NULL; } void @@ -395,16 +396,22 @@ make_engr_at(coordxy x, coordxy y, const char *s, long e_time, xint16 e_type) if ((ep = engr_at(x, y)) != 0) del_engr(ep); ep = newengr(smem); - (void) memset((genericptr_t)ep, 0, smem + sizeof(struct engr)); + (void) memset((genericptr_t) ep, 0, smem + sizeof (struct engr)); ep->nxt_engr = head_engr; head_engr = ep; ep->engr_x = x; ep->engr_y = y; ep->engr_txt = (char *) (ep + 1); Strcpy(ep->engr_txt, s); - /* engraving Elbereth shows wisdom */ - if (!g.in_mklev && !strcmp(s, "Elbereth")) - exercise(A_WIS, TRUE); + if (!strcmp(s, "Elbereth")) { + /* engraving "Elbereth": if done when making a level, it creates + an old-style Elbereth that deters monsters when any objects are + present; otherwise (done by the player), exercises wisdom */ + if (g.in_mklev) + ep->guardobjects = 1; + else + exercise(A_WIS, TRUE); + } ep->engr_time = e_time; ep->engr_type = e_type > 0 ? e_type : rnd(N_ENGRAVE - 1); ep->engr_lth = smem; diff --git a/src/monmove.c b/src/monmove.c index 51e91cc5e..c1398cd0f 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -167,8 +167,10 @@ dochugw( } boolean -onscary(coordxy x, coordxy y, struct monst* mtmp) +onscary(coordxy x, coordxy y, struct monst *mtmp) { + struct engr *ep; + /* creatures who are directly resistant to magical scaring: * humans aren't monsters * uniques have ascended their base monster instincts @@ -208,15 +210,16 @@ onscary(coordxy x, coordxy y, struct monst* mtmp) * Elbereth doesn't work in Gehennom, the Elemental Planes, or the * Astral Plane; the influence of the Valar only reaches so far. */ - return (sengr_at("Elbereth", x, y, TRUE) - && (u_at(x, y) || (Displaced && mtmp->mux == x && mtmp->muy == y)) + return ((ep = sengr_at("Elbereth", x, y, TRUE)) != 0 + && (u_at(x, y) + || (Displaced && mtmp->mux == x && mtmp->muy == y) + || (ep->guardobjects && vobj_at(x, y))) && !(mtmp->isshk || mtmp->isgd || !mtmp->mcansee || mtmp->mpeaceful || mtmp->data->mlet == S_HUMAN || mtmp->data == &mons[PM_MINOTAUR] || Inhell || In_endgame(&u.uz))); } - /* regenerate lost hit points */ void mon_regen(struct monst *mon, boolean digest_meal) diff --git a/src/teleport.c b/src/teleport.c index 8df35115f..97b34b318 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -40,7 +40,8 @@ noteleport_level(struct monst* mon) } /* this is an approximation of onscary() that doesn't use any 'struct monst' - fields aside from 'monst->data' */ + fields aside from 'monst->data'; used primarily for new monster creation + and monster teleport destination, not for ordinary monster movement */ static boolean goodpos_onscary( coordxy x, coordxy y, @@ -60,10 +61,11 @@ goodpos_onscary( /* engraved Elbereth doesn't work in Gehennom or the end-game */ if (Inhell || In_endgame(&u.uz)) return FALSE; - /* creatures who don't (or can't) fear a written Elbereth */ + /* creatures who don't (or can't) fear a written Elbereth and weren't + caught by the minions check */ if (mptr == &mons[PM_MINOTAUR] || !haseyes(mptr)) return FALSE; - return sengr_at("Elbereth", x, y, TRUE); + return sengr_at("Elbereth", x, y, TRUE) ? TRUE : FALSE; } /* From e4d83d71ce397de060a7f07f4271111e257689a3 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 15 Oct 2022 06:22:18 -0700 Subject: [PATCH 21/22] missing EDITLEVEL update The Elbereth fix changed 'struct engr' and should have included an increment to EDITLEVEL to invalidate old save and bones files. --- include/patchlevel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/patchlevel.h b/include/patchlevel.h index 2174c1ddf..3f39fe3be 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -17,7 +17,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 65 +#define EDITLEVEL 66 /* * Development status possibilities. From f70ad6598d3e948094b84a7703a3f343c3c41ec7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 15 Oct 2022 12:53:01 -0400 Subject: [PATCH 22/22] pull request #901 Also, makes some Makefile lines a little bit shorter --- sys/unix/hints/include/cross-post.370 | 48 +++++++++++++-------------- sys/unix/hints/include/cross-pre.370 | 10 +++--- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/sys/unix/hints/include/cross-post.370 b/sys/unix/hints/include/cross-post.370 index 4a1f9e109..b2f92f5c3 100644 --- a/sys/unix/hints/include/cross-post.370 +++ b/sys/unix/hints/include/cross-post.370 @@ -25,22 +25,22 @@ $(TARGETPFX)exceptn.o : ../lib/djgpp/djgpp-patch/src/libc/go32/exceptn.S $(GAMEBIN) : $(HOBJ) $(LUACROSSLIB) $(TARGET_LINK) $(TARGET_LFLAGS) -o $(GAMEBIN) \ $(HOBJ) $(WINLIB) $(TARGET_LIBS) -$(FONTDIR)/ter-u16b.psf: $(FONTTOP)/ter-u16b.bdf ../sys/msdos/fonts/nh-u16b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u16b.bdf ../sys/msdos/fonts/nh-u16b.bdf $@ -$(FONTDIR)/ter-u16v.psf: $(FONTTOP)/ter-u16v.bdf ../sys/msdos/fonts/nh-u16v.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u16v.bdf ../sys/msdos/fonts/nh-u16v.bdf $@ -$(FONTDIR)/ter-u18b.psf: $(FONTTOP)/ter-u18b.bdf ../sys/msdos/fonts/nh-u18b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u18b.bdf ../sys/msdos/fonts/nh-u18b.bdf $@ -$(FONTDIR)/ter-u20b.psf: $(FONTTOP)/ter-u20b.bdf ../sys/msdos/fonts/nh-u20b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u20b.bdf ../sys/msdos/fonts/nh-u20b.bdf $@ -$(FONTDIR)/ter-u22b.psf: $(FONTTOP)/ter-u22b.bdf ../sys/msdos/fonts/nh-u22b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u22b.bdf ../sys/msdos/fonts/nh-u22b.bdf $@ -$(FONTDIR)/ter-u24b.psf: $(FONTTOP)/ter-u24b.bdf ../sys/msdos/fonts/nh-u24b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u24b.bdf ../sys/msdos/fonts/nh-u24b.bdf $@ -$(FONTDIR)/ter-u28b.psf: $(FONTTOP)/ter-u28b.bdf ../sys/msdos/fonts/nh-u28b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u28b.bdf ../sys/msdos/fonts/nh-u28b.bdf $@ -$(FONTDIR)/ter-u32b.psf: $(FONTTOP)/ter-u32b.bdf ../sys/msdos/fonts/nh-u32b.bdf $(FONTDIR)/makefont.lua $(LUABIN) - $(LUABIN) $(FONTDIR)/makefont.lua $(FONTTOP)/ter-u32b.bdf ../sys/msdos/fonts/nh-u32b.bdf $@ +$(DOSFONT)/ter-u16b.psf: $(FONTTOP)/ter-u16b.bdf $(DOSFONT)/nh-u16b.bdf $(DOSFONT)/makefont.lua $(LUABIN) + $(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u16b.bdf $(DOSFONT)/nh-u16b.bdf $@ +$(DOSFONT)/ter-u16v.psf: $(FONTTOP)/ter-u16v.bdf $(DOSFONT)/nh-u16v.bdf $(DOSFONT)/makefont.lua $(LUABIN) + $(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u16v.bdf $(DOSFONT)/nh-u16v.bdf $@ +$(DOSFONT)/ter-u18b.psf: $(FONTTOP)/ter-u18b.bdf $(DOSFONT)/nh-u18b.bdf $(DOSFONT)/makefont.lua $(LUABIN) + $(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u18b.bdf $(DOSFONT)/nh-u18b.bdf $@ +$(DOSFONT)/ter-u20b.psf: $(FONTTOP)/ter-u20b.bdf $(DOSFONT)/nh-u20b.bdf $(DOSFONT)/makefont.lua $(LUABIN) + $(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u20b.bdf $(DOSFONT)/nh-u20b.bdf $@ +$(DOSFONT)/ter-u22b.psf: $(FONTTOP)/ter-u22b.bdf $(DOSFONT)/nh-u22b.bdf $(DOSFONT)/makefont.lua $(LUABIN) + $(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u22b.bdf $(DOSFONT)/nh-u22b.bdf $@ +$(DOSFONT)/ter-u24b.psf: $(FONTTOP)/ter-u24b.bdf $(DOSFONT)/nh-u24b.bdf $(DOSFONT)/makefont.lua $(LUABIN) + $(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u24b.bdf $(DOSFONT)/nh-u24b.bdf $@ +$(DOSFONT)/ter-u28b.psf: $(FONTTOP)/ter-u28b.bdf $(DOSFONT)/nh-u28b.bdf $(DOSFONT)/makefont.lua $(LUABIN) + $(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u28b.bdf $(DOSFONT)/nh-u28b.bdf $@ +$(DOSFONT)/ter-u32b.psf: $(FONTTOP)/ter-u32b.bdf $(DOSFONT)/nh-u32b.bdf $(DOSFONT)/makefont.lua $(LUABIN) + $(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u32b.bdf $(DOSFONT)/nh-u32b.bdf $@ # .PHONY: dodata dospkg dosfonts dosfonts: $(FONTTARGETS) @@ -56,14 +56,14 @@ dospkg: dodata dosfonts $(GAMEBIN) $(TARGETPFX)recover.exe ../dat/nhtiles.bmp cp ../sys/share/NetHack.cnf $(TARGETPFX)pkg/NETHACK.CNF cp ../sys/msdos/sysconf $(TARGETPFX)pkg/SYSCONF cp ../doc/nethack.txt $(TARGETPFX)pkg/NETHACK.TXT - cp ../sys/msdos/fonts/ter-u16b.psf $(TARGETPFX)pkg/TER-U16B.PSF - cp ../sys/msdos/fonts/ter-u16v.psf $(TARGETPFX)pkg/TER-U16V.PSF - cp ../sys/msdos/fonts/ter-u18b.psf $(TARGETPFX)pkg/TER-U18B.PSF - cp ../sys/msdos/fonts/ter-u20b.psf $(TARGETPFX)pkg/TER-U20B.PSF - cp ../sys/msdos/fonts/ter-u22b.psf $(TARGETPFX)pkg/TER-U22B.PSF - cp ../sys/msdos/fonts/ter-u24b.psf $(TARGETPFX)pkg/TER-U24B.PSF - cp ../sys/msdos/fonts/ter-u28b.psf $(TARGETPFX)pkg/TER-U28B.PSF - cp ../sys/msdos/fonts/ter-u32b.psf $(TARGETPFX)pkg/TER-U32B.PSF + cp $(DOSFONT)/ter-u16b.psf $(TARGETPFX)pkg/TER-U16B.PSF + cp $(DOSFONT)/ter-u16v.psf $(TARGETPFX)pkg/TER-U16V.PSF + cp $(DOSFONT)/ter-u18b.psf $(TARGETPFX)pkg/TER-U18B.PSF + cp $(DOSFONT)/ter-u20b.psf $(TARGETPFX)pkg/TER-U20B.PSF + cp $(DOSFONT)/ter-u22b.psf $(TARGETPFX)pkg/TER-U22B.PSF + cp $(DOSFONT)/ter-u24b.psf $(TARGETPFX)pkg/TER-U24B.PSF + cp $(DOSFONT)/ter-u28b.psf $(TARGETPFX)pkg/TER-U28B.PSF + cp $(DOSFONT)/ter-u32b.psf $(TARGETPFX)pkg/TER-U32B.PSF cp ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE $(TARGETPFX)pkg/CWSDPMI.EXE -touch $(TARGETPFX)pkg/RECORD cd $(TARGETPFX)pkg ; zip -9 ../NH370DOS.ZIP * ; cd ../../.. diff --git a/sys/unix/hints/include/cross-pre.370 b/sys/unix/hints/include/cross-pre.370 index 5acfdef11..94d8cec14 100644 --- a/sys/unix/hints/include/cross-pre.370 +++ b/sys/unix/hints/include/cross-pre.370 @@ -166,11 +166,11 @@ PDC_TARGET_CFLAGS = $(MSDOS_TARGET_CFLAGS) -Wno-unused-parameter \ -Wno-missing-prototypes FONTVER = terminus-font-4.49.1 FONTTOP = ../lib/$(FONTVER) -FONTDIR = ../sys/msdos/fonts -FONTTARGETS = $(FONTDIR)/ter-u16b.psf $(FONTDIR)/ter-u16v.psf \ - $(FONTDIR)/ter-u18b.psf $(FONTDIR)/ter-u20b.psf \ - $(FONTDIR)/ter-u22b.psf $(FONTDIR)/ter-u24b.psf \ - $(FONTDIR)/ter-u28b.psf $(FONTDIR)/ter-u32b.psf +DOSFONT = ../sys/msdos/fonts +FONTTARGETS = $(DOSFONT)/ter-u16b.psf $(DOSFONT)/ter-u16v.psf \ + $(DOSFONT)/ter-u18b.psf $(DOSFONT)/ter-u20b.psf \ + $(DOSFONT)/ter-u22b.psf $(DOSFONT)/ter-u24b.psf \ + $(DOSFONT)/ter-u28b.psf $(DOSFONT)/ter-u32b.psf LUABIN = ../lib/lua-$(LUA_VERSION)/src/lua LUA_TARGET_CFLAGS = $(MSDOS_TARGET_CFLAGS) override TARGET_CFLAGS = $(MSDOS_TARGET_CFLAGS) -Wmissing-declarations \