Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
NetHack-collaboration/include/sym.h at NetHack-3.7 · NetHack/NetHack-collaboration · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
NetHack
NetHack-collaboration
Repository navigation
Code
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
NetHack-3.7
Breadcrumbs
NetHack-collaboration
/
include
/
sym.h
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
180 lines (155 loc) · 5.09 KB
NetHack-3.7
Breadcrumbs
NetHack-collaboration
/
include
/
sym.h
Copy path
Top
File metadata and controls
Code
Blame
180 lines (155 loc) · 5.09 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
/* NetHack 3.7 sym.h $NHDT-Date: $ $NHDT-Branch: $ $NHDT-Revision: $ */
/* Copyright (c) 2016 by Pasi Kallinen */
/* NetHack may be freely redistributed. See license for details. */
#ifndef
SYM_H
#define
SYM_H
/*
* Default characters for monsters.
*/
/* clang-format off */
enum
mon_defchars
{
#define
MONSYMS_DEFCHAR_ENUM
#include
"defsym.h"
#undef
MONSYMS_DEFCHAR_ENUM
};
/* clang-format on */
enum
mon_syms
{
#define
MONSYMS_S_ENUM
#include
"defsym.h"
#undef
MONSYMS_S_ENUM
MAXMCLASSES
/* number of monster classes */
};
#ifndef
MAKEDEFS_C
/* Default characters for dungeon surroundings and furniture */
enum
cmap_symbols
{
#define
PCHAR_S_ENUM
#include
"defsym.h"
#undef
PCHAR_S_ENUM
MAXPCHARS
};
/*
* special symbol set handling types ( for invoking callbacks, etc.)
* Must match the order of the known_handlers strings
* in drawing.c
*/
enum
symset_handling_types
{
H_UNK
=
0
,
H_IBM
=
1
,
H_DEC
=
2
,
H_CURS
=
3
,
H_MAC
=
4
,
/* obsolete; needed so that the listing of available
* symsets by 'O' can skip it for !MAC_GRAPHICS_ENV */
H_UTF8
=
5
};
struct
symdef
{
uchar
sym
;
const
char
*
explanation
;
uchar
color
;
};
enum
symparse_range
{
SYM_INVALID
=
0
,
SYM_CONTROL
=
1
,
/* start/finish markers */
SYM_PCHAR
=
2
,
/* index into showsyms */
SYM_OC
=
3
,
/* index into oc_syms */
SYM_MON
=
4
,
/* index into monsyms */
SYM_OTH
=
5
/* misc */
};
struct
symparse
{
enum
symparse_range
range
;
int
idx
;
const
char
*
name
;
};
/* linked list of symsets and their characteristics */
struct
symsetentry
{
struct
symsetentry
*
next
;
/* next in list */
char
*
name
;
/* ptr to symset name */
char
*
desc
;
/* ptr to description */
int
idx
;
/* an index value */
enum
symset_handling_types
handling
;
/* known handlers value */
Bitfield
(
nocolor
,
1
);
/* don't use color if set */
Bitfield
(
primary
,
1
);
/* restricted for use as primary set */
Bitfield
(
rogue
,
1
);
/* restricted for use as rogue lev set */
Bitfield
(
explicitly
,
1
);
/* explicit symset set */
/* 4 free bits */
};
/*
*
*/
#define
MAXDCHARS
(S_water - S_stone + 1)
/* mapped dungeon characters */
#define
MAXTCHARS
(TRAPNUM - 1)
/* trap chars */
#define
MAXECHARS
(S_expl_br - S_vbeam + 1)
/* mapped effects characters */
#define
MAXEXPCHARS
9
/* number of explosion characters */
#define
DARKROOMSYM
(Is_rogue_level(&u.uz) ? S_stone : S_darkroom)
#define
is_cmap_trap
(
i
) ((i) >= S_arrow_trap && (i) < S_arrow_trap + MAXTCHARS)
#define
is_cmap_drawbridge
(
i
) ((i) >= S_vodbridge && (i) <= S_hcdbridge)
#define
is_cmap_door
(
i
) ((i) >= S_vodoor && (i) <= S_hcdoor)
#define
is_cmap_wall
(
i
) ((i) >= S_stone && (i) <= S_trwall)
#define
is_cmap_room
(
i
) ((i) >= S_room && (i) <= S_darkroom)
#define
is_cmap_corr
(
i
) ((i) >= S_corr && (i) <= S_litcorr)
#define
is_cmap_furniture
(
i
) ((i) >= S_upstair && (i) <= S_fountain)
#define
is_cmap_water
(
i
) ((i) == S_pool || (i) == S_water)
#define
is_cmap_lava
(
i
) ((i) == S_lava || (i) == S_lavawall)
#define
is_cmap_stairs
(
i
) ((i) >= S_upstair && (i) <= S_brdnladder)
#define
is_cmap_engraving
(
i
) ((i) == S_engroom || (i) == S_engrcorr)
/* misc symbol definitions */
enum
misc_symbols
{
SYM_NOTHING
=
0
,
SYM_UNEXPLORED
=
1
,
SYM_BOULDER
=
2
,
SYM_INVISIBLE
=
3
,
SYM_PET_OVERRIDE
=
4
,
SYM_HERO_OVERRIDE
=
5
,
MAXOTHER
};
/*
* Graphics sets for display symbols
*/
#define
DEFAULT_GRAPHICS
0
/* regular characters: '-', '+', &c */
enum
graphics_sets
{
PRIMARYSET
=
0
,
/* primary graphics set */
ROGUESET
=
1
,
/* rogue graphics set */
NUM_GRAPHICS
,
UNICODESET
=
NUM_GRAPHICS
};
enum
do_customizations
{
do_custom_none
,
do_custom_colors
,
do_custom_symbols
};
enum
customization_types
{
custom_none
,
custom_symbols
,
custom_ureps
,
custom_nhcolor
,
custom_count
};
struct
custom_symbol
{
const
struct
symparse
*
symparse
;
unsigned
char
val
;
};
struct
custom_urep
{
int
glyphidx
;
struct
unicode_representation
u
;
};
struct
custom_nhcolor
{
int
glyphidx
;
uint32
nhcolor
;
};
union
customization_content
{
struct
custom_symbol
sym
;
struct
custom_urep
urep
;
struct
custom_nhcolor
ccolor
;
};
struct
customization_detail
{
union
customization_content
content
;
struct
customization_detail
*
next
;
};
/* one set per symset_name */
struct
symset_customization
{
const
char
*
customization_name
;
int
count
;
enum
customization_types
custtype
;
struct
customization_detail
*
details
;
struct
customization_detail
*
details_end
;
};
extern
const
struct
symdef
defsyms
[
MAXPCHARS
+
1
];
/* defaults */
#define
WARNCOUNT
6
/* number of different warning levels */
extern
const
struct
symdef
def_warnsyms
[
WARNCOUNT
];
#define
SYMHANDLING
(
ht
) (gs.symset[gc.currentgraphics].handling == (ht))
#endif
/* !MAKEDEFS_C */
#endif
/* SYM_H */
You can’t perform that action at this time.