nhmall
660534389e
a warning bout lc_error
...
lev_comp.l(310) : warning C4013: 'lc_error' undefined; assuming extern returning int
2015-04-05 09:26:01 -04:00
Pasi Kallinen
68a39aeab4
Fix GCC warnings caused by new lev_comp
2015-04-03 17:40:54 +03:00
Pasi Kallinen
c8e781c418
Add menucolors
...
-Add a boolean option menucolors to toggle menu color
-Add MENUCOLOR -config file option
TODO:
-Better support for win32
-Support more windowports
-Update Guidebook
-Allow changing menucolor lines in-game
2015-04-02 20:16:25 +03:00
Pasi Kallinen
323b8b4038
Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource into paxed-new_lev_comp
...
Conflicts:
src/trap.c
sys/winnt/Makefile.msc
2015-04-01 16:09:53 +03:00
keni
8ee2d5976e
NHDT substitution version 2.
...
Re-run nhgitset.pl to install.
"perldoc DEVEL/hooksdir/nhsub" for details. General docs still to come.
Quick notes:
- "git nhsub" lets you apply substitutions to a file without involving any
version control.
- When doing nhadd/nhcommit, the working directory WILL reflect the results
of the substitutions.
Let's see what this breaks.
2015-03-31 09:50:02 -04:00
Pasi Kallinen
0a9248c7f1
Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource into paxed-new_lev_comp
...
Conflicts:
doc/fixes35.0
include/extern.h
include/ntconf.h
include/obj.h
include/patchlevel.h
src/dig.c
src/do.c
src/files.c
src/fountain.c
src/mklev.c
src/objnam.c
src/options.c
src/potion.c
src/rumors.c
src/save.c
src/topten.c
src/trap.c
src/wield.c
sys/share/pcmain.c
sys/unix/unixmain.c
sys/winnt/Makefile.msc
util/lev_main.c
util/makedefs.c
2015-03-24 19:46:38 +02:00
Pasi Kallinen
8785f73b7f
Use the correct declaration macro
2015-03-24 19:28:27 +02:00
nhmall
b1547c4770
include header file <ctype.h> in lev_main.c
...
options.c depends on ctype.h and uses tolower()
so no sense getting into a discussion about
use of _that_
2015-03-24 19:26:01 +02:00
nhmall
c4009b781c
Actually use the new routines in lev_main
2015-03-24 19:25:54 +02:00
nhmall
f9d22e02cd
lev_main's own internal case-insensitive compare
...
TEST SUITE
int case_insensitive_comp(const char *, const char *);
/* define your built-in compiler library variation here */
/* #define BUILTIN(a,b) strcasecmp(a,b) */
/* #define BUILTIN(a,b) stricmp(a,b) */
int main(int argc, char *argv[])
{
const char *t1 = "NetHack";
const char *t2 = "nethack";
const char *t3 = "Fred";
const char *t4 = "Barney lived next door";
/* try the results with built-in strcmpi first */
printf("builtin:\tcompare <%s> to <%s>, result %d.\n",
t1, t2, BUILTIN(t1,t2));
printf("builtin:\tcompare <%s> to <%s>, result %d.\n",
t3, t4, BUILTIN(t3,t4));
/* try the results with case_insensitive_comp 2nd */
printf("ours:\tcompare <%s> to <%s>, result %d.\n",
t1, t2, case_insensitive_comp(t1,t2));
printf("ours:\tcompare <%s> to <%s>, result %d.\n",
t3, t4, case_insensitive_comp(t3,t4));
}
int
case_insensitive_comp(s1, s2)
const char *s1;
const char *s2;
{
unsigned char u1, u2;
for ( ; ; s1++, s2++) {
u1 = tolower((unsigned char) *s1);
u2 = tolower((unsigned char) *s2);
if ((u1 == '\0') || (u1 != u2)) {
break;
}
}
return u1-u2;
}
======================== END TEST SUITE ===========================
2015-03-24 19:25:45 +02:00
nhmall
c49dbcc5b3
include this also
2015-03-24 19:16:29 +02:00
nhmall
4c2df285b4
an easy fix for strcmpi and we move on
...
Here in branch paxed-new_lev_comp-B (branched
from paxed-new_lev_comp) is a simple fix
for the strcmpi issue.
The bottom section of lev_main.c has a bunch
of forced linkages to names from NetHack etc.
#ifdef STRICT_REF_DEF
bunch of stuff
#endif
This change to lev_main should make everything
work for those that don't supply a compiler
library version of strcmpi()
With this patch, those people can just
add a -DSTRICT_REF_DEF to their compile line
for lev_main.c.
This would close the issue in a simple way,
and doesn't require linking in anything new to
the level compiler, or modifying any port's Makefiles etc.
2015-03-24 19:06:01 +02:00
Pasi Kallinen
debdf7ca48
Move some hard-coded string arrays into data files.
...
Random epitaphs, engravings and hallucinatory monsters now
live in text data files.
2015-03-18 22:05:10 +02:00
Pasi Kallinen
56699486a0
Catch up with post-343 lev_comp changes
...
- Iced pools vs. iced moats
- allow making map outer edges nonpasswall & nondiggable,
so eg. xorns cannot be teleported there
2015-03-17 18:57:39 +02:00
Pasi Kallinen
c9d5bb9d68
Fix some level flags, sokoban premapping
2015-03-17 18:52:53 +02:00
Pasi Kallinen
47bb9abace
New level compiler: code changes
2015-03-17 18:52:42 +02:00
keni
c5bc6a5268
Manually fix botched NHDT-Branch expansions.
2015-03-17 18:46:55 +02:00
Pasi Kallinen
d67ffd179a
Remove useless dungeon.def mangling
2015-03-17 18:46:54 +02:00
Pasi Kallinen
56279a9950
Add new parameters to makedefs: --debug and --make
...
"makedefs --debug --make q" is equivalent to "makedefs -q" with
DEBUG defined.
2015-03-17 18:46:52 +02:00
Sean Hunt
07da4a740e
Fix some warnings on the unconditionals branch.
2015-03-17 18:46:48 +02:00
Sean Hunt
fb46fed99d
Make EXP_ON_BOTL unconditional.
2015-03-17 18:46:44 +02:00
Sean Hunt
f27d319e68
Make REDO unconditional.
2015-03-17 18:46:41 +02:00
Sean Hunt
3481ec6589
Make AUTOPICKUP_EXCEPTIONS unconditional.
2015-03-17 18:46:37 +02:00
Sean Hunt
8798197d85
Make BARGETHROUGH unconditional.
2015-03-17 18:46:35 +02:00
Sean Hunt
dcc2f8ba93
Make SEDUCE unconditional.
2015-03-17 18:46:32 +02:00
Sean Hunt
05f7a63728
Make GOLDOBJ unconditional.
2015-03-17 18:46:23 +02:00
Sean Hunt
cc7ab4a2da
Make WIZARD unconditional.
2015-03-17 18:46:17 +02:00
Sean Hunt
eca41ae060
Make DUNGEON_OVERVIEW unconditional.
2015-03-17 18:46:12 +02:00
Sean Hunt
ffd201495c
Make REINCARNATION unconditional.
...
There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
2015-03-17 18:46:08 +02:00
Sean Hunt
bb647dc33c
Make TOURIST unconditional.
2015-03-17 18:46:01 +02:00
Sean Hunt
44ca9fc16a
Make SINKS unconditional.
2015-03-17 18:45:58 +02:00
Sean Hunt
161070ce56
Make KOPS unconditional.
2015-03-17 18:45:56 +02:00
Sean Hunt
9759f5bf6d
Make STEED unconditional.
2015-03-17 18:45:49 +02:00
Sean Hunt
aba6ecb7b3
Make ELBERETH unconditional.
2015-03-17 18:45:45 +02:00
keni
414aea7517
Update .gitignore files.
2015-03-17 18:45:42 +02:00
keni
25cd007c48
Bulk recovery of file CVS headers and addition of NHDT- headers.
2015-03-17 18:45:12 +02:00
keni
485173626a
Convert mdgrep from cvs to git.
2015-03-17 18:44:54 +02:00
keni
8ac52b247a
Set up mdgrep for git instead of cvs.
2015-03-17 18:44:53 +02:00
keni
6fd30ab1ce
Manually fix botched NHDT-Branch expansions.
2015-03-01 20:32:28 -05:00
Pasi Kallinen
d7c9abe0f8
Remove useless dungeon.def mangling
2015-03-01 14:33:03 +02:00
Pasi Kallinen
b7537e0fbf
Add new parameters to makedefs: --debug and --make
...
"makedefs --debug --make q" is equivalent to "makedefs -q" with
DEBUG defined.
2015-02-27 19:34:34 -05:00
Sean Hunt
17ea9ff9ab
Fix some warnings on the unconditionals branch.
2015-02-27 19:34:31 -05:00
Sean Hunt
7c09285a8c
Make EXP_ON_BOTL unconditional.
2015-02-27 19:34:26 -05:00
Sean Hunt
0001534d04
Make REDO unconditional.
2015-02-27 19:33:52 -05:00
Sean Hunt
74e741bbbc
Make AUTOPICKUP_EXCEPTIONS unconditional.
2015-02-27 19:33:50 -05:00
Sean Hunt
b138d380ea
Make BARGETHROUGH unconditional.
2015-02-27 19:33:48 -05:00
Sean Hunt
6e9fa71b05
Make SEDUCE unconditional.
2015-02-27 19:33:48 -05:00
Sean Hunt
ac108cd365
Make GOLDOBJ unconditional.
2015-02-27 19:33:40 -05:00
Sean Hunt
4f59f5c6fd
Make WIZARD unconditional.
2015-02-27 19:33:22 -05:00
Sean Hunt
ad82ca80f3
Make DUNGEON_OVERVIEW unconditional.
2015-02-27 19:33:20 -05:00