Commit Graph

11006 Commits

Author SHA1 Message Date
Adam Powers
dc1c85faa4 more friendly javascript arguments 2020-10-04 14:04:56 -07:00
Adam Powers
ac4649e63f add globals, constants, and helpers 2020-10-04 14:03:04 -07:00
Adam Powers
5462072ceb bump version for minor improvements 2020-09-12 12:49:10 -07:00
Adam Powers
1c23434de6 update docs 2020-09-12 12:48:28 -07:00
Adam Powers
176f553b6e remove stray debug message 2020-09-12 12:48:13 -07:00
Adam Powers
d2fdc6f582 add new exports, cleaner debugging options 2020-09-12 12:40:04 -07:00
Adam Powers
6fcb7c3db3 fix ignored files 2020-09-12 12:35:01 -07:00
Adam Powers
34e4b1fae9 js test code 2020-09-12 12:34:45 -07:00
Adam Powers
c602ecc5a2 default is a permenant inventory window 2020-09-12 12:27:29 -07:00
Adam Powers
4e38d8f329 fix reentry and types, enhance debugging, delinting 2020-09-12 12:27:04 -07:00
Adam Powers
233c683912 add keywords 2020-09-12 12:24:12 -07:00
Adam Powers
fc2e6b0b6d initial commit 2020-09-12 12:24:06 -07:00
Adam Powers
c36b948b21 add helpers and constants 2020-09-12 12:23:13 -07:00
Adam Powers
2e7e0c2325 change package name 2020-09-06 23:19:22 -07:00
Adam Powers
7b46e3d12c update lib tests 2020-09-06 17:35:03 -07:00
Adam Powers
96cf11ad71 fix JS event loop blocking 2020-09-06 17:32:08 -07:00
Adam Powers
045a5879f1 npm doesn't allow 'hack' in package names 2020-09-02 07:42:29 -07:00
Adam Powers
a8373f2224 move package to npm organization 2020-09-02 07:28:01 -07:00
Adam Powers
caaa9b0588 remove stray printfs 2020-09-02 07:27:29 -07:00
Adam Powers
490b260454 remove stray console.log 2020-09-01 13:11:09 -07:00
Adam Powers
0c8e4e555e complete API documentation 2020-08-30 12:09:42 -07:00
Adam Powers
b0e77f7729 initial npm package 2020-08-30 12:00:39 -07:00
Adam Powers
356e7432e7 ignore libnethack build files 2020-08-30 12:00:12 -07:00
Adam Powers
ffa5e319af ignore libnethack dev files 2020-08-30 11:59:23 -07:00
Adam Powers
efae5590e5 completed shim graphics callbacks 2020-08-30 11:01:34 -07:00
Adam Powers
4ffb8c9ce3 fix naming 2020-08-30 10:46:55 -07:00
Adam Powers
85108bf7ef add build section, fix naming 2020-08-30 10:45:54 -07:00
Adam Powers
42f948018d initial helpers 2020-08-30 10:31:17 -07:00
Adam Powers
ca9d1c5b97 update build notes 2020-08-30 10:30:03 -07:00
Adam Powers
863f914337 added void functions 2020-08-29 15:50:42 -07:00
Adam Powers
14084dc50c fix arg order 2020-08-29 14:48:22 -07:00
Adam Powers
4ef48ca49a fix syntax errors for libnethack.a 2020-08-29 14:48:02 -07:00
Adam Powers
22bc4ecfc0 initial docs 2020-08-29 11:10:52 -07:00
Adam Powers
1a70f77b2a more sensible arg order for callback 2020-08-29 11:10:09 -07:00
Adam Powers
e04b17911a delinting 2020-08-29 10:27:51 -07:00
Adam Powers
97a14eebbe functional shim graphics 2020-08-29 10:26:58 -07:00
Adam Powers
c9f5bb9ac4 replace -DWASM with compiler internal __EMSCRIPTEN__ 2020-08-27 22:15:12 -07:00
Adam Powers
18254eb291 make system cleanup 2020-08-27 21:38:21 -07:00
Adam Powers
e5604d575f fix undefined symbol in nhlib 2020-08-27 21:37:16 -07:00
Adam Powers
d3bbf02d2e fix 'spotless' bug noticed during cross-compile 2020-08-27 21:12:51 -07:00
Adam Powers
1aa053d1d8 initial libnethack 2020-08-26 19:22:00 -07:00
Adam Powers
5939773971 initial shim graphics 2020-08-26 19:17:40 -07:00
PatR
c062822a7c Qt tombstone bugs
Infrastructure bits:  Qt tombstone uses a short buffer; make sure that
the plname value fits instead of relying on snprintf() to truncate it.
A warning about gold, if any, was iffy but this should guarantee no
reason for future complaint.  Year was safe but a compiler sensitive
to buffer overflows wouldn't know that.

Actual bugs:  Qt used money in inventory for gold amount on tombstone;
that overlooks gold in containers and will be 0 by tombstone stage if
bones get saved.  Year was recalculated from current date+time instead
of using the value that gets passed in--blindly flagging that variable
as UNUSED was a mistake.
2020-08-20 16:56:50 -07:00
nhmall
61b86b8838 Merge branch 'NetHack-3.7' 2020-08-20 11:20:26 -04:00
nhmall
e191e6bc8f build warning fix on g++ >= 9 and Qt
../win/Qt/qt_menu.cpp: In member function ‘virtual void nethack_qt_::NetHackQtTextWindow::UseRIP(int, time_t)’:
../win/Qt/qt_menu.cpp:680:54: warning: ‘%s’ directive output may be truncated writing up to 31 bytes into a region of size 17 [-Wformat-truncation=]
  680 |     snprintf(rip_line[NAME_LINE], STONE_LINE_LEN+1, "%s", g.plname);
      |                                                      ^~   ~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from ../win/Qt/qt_menu.cpp:8:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin_snprintf’ output between 1 and 32 bytes into a destination of size 17
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~../win/Qt/qt_menu.cpp: In member function ‘virtual void nethack_qt_::NetHackQtTextWindow::UseRIP(int, time_t)’:
../win/Qt/qt_menu.cpp:680:54: warning: ‘%s’ directive output may be truncated writing up to 31 bytes into a region of size 17 [-Wformat-truncation=]
  680 |     snprintf(rip_line[NAME_LINE], STONE_LINE_LEN+1, "%s", g.plname);
      |                                                      ^~   ~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from ../win/Qt/qt_menu.cpp:8:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin_snprintf’ output between 1 and 32 bytes into a destination of size 17
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-08-20 11:18:32 -04:00
nhmall
4620bfccbf grammar bit 2020-08-20 09:50:07 -04:00
nhmall
d86dd4bb1b comment out what appears to be an obsolete bit in windows Makefile.gcc 2020-08-18 10:36:15 -04:00
nhmall
960f5d82b9 mirror recent make depends update in some other Makefiles 2020-08-18 10:26:24 -04:00
PatR
ae4c180cf6 Qt without tiles
Qt is capable of using an ascii map, and does so on the rogue level.
So failing to load tiles doesn't need to quit; it can continue in
text mode.

Not extensively tested.  This disables the paper doll when the ascii
map is forced (either via options settings or due to tiles loading
failure, but not when simply on the rogue level) rather than trying
to display it with object class characters.
2020-08-17 16:42:24 -07:00
PatR
0438dfe5a3 Qt install dependencies
Playground setup:  Qt does not use external files pet_mark.xbm and
pilemark.xbm, it has pixmaps for those compiled in via qt_xpms.h.
Presumably because the pet mark heart has two sizes there.
2020-08-17 15:53:18 -07:00