├── .gitattributes
├── .gitignore
├── LICENSE.md
├── README.md
├── Sil-Q v1.5.0.pdf
├── Sil.xcodeproj
├── half.mode1
├── half.mode1v3
├── half.pbxuser
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── Sil.xccheckout
│ └── xcuserdata
│ │ └── half.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── WorkspaceSettings.xcsettings
└── xcuserdata
│ └── half.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints.xcbkptlist
│ └── xcschemes
│ ├── Sil.xcscheme
│ └── xcschememanagement.plist
├── lib
├── apex
│ └── .keepalive
├── data
│ └── .gitignore
├── docs
│ ├── Sil 1.3 Manual.pdf
│ ├── Sil-Q 1.4.2 Manual.pdf
│ ├── changes.txt
│ ├── compile.txt
│ ├── copying.txt
│ └── early-changes.txt
├── edit
│ ├── ability.txt
│ ├── artefact.txt
│ ├── flavor.txt
│ ├── history.txt
│ ├── house.txt
│ ├── limits.txt
│ ├── monster.txt
│ ├── names.txt
│ ├── object.txt
│ ├── race.txt
│ ├── special.txt
│ ├── terrain.txt
│ └── vault.txt
├── pref
│ ├── flvr-dvg.prf
│ ├── flvr-new.prf
│ ├── flvr-xxx.prf
│ ├── font-dos.prf
│ ├── font-mac.prf
│ ├── font-win.prf
│ ├── font-x11.prf
│ ├── font-xxx.prf
│ ├── font.prf
│ ├── graf-gcu.prf
│ ├── graf-mac.prf
│ ├── graf-new.prf
│ ├── graf-win.prf
│ ├── graf-x11.prf
│ ├── graf.prf
│ ├── message.prf
│ ├── pref-dos.prf
│ ├── pref-emx.prf
│ ├── pref-gcu.prf
│ ├── pref-mac.prf
│ ├── pref-win.prf
│ ├── pref-x11.prf
│ ├── pref.prf
│ ├── races.prf
│ ├── shades.prf
│ ├── user.prf
│ ├── xtra-dvg.prf
│ ├── xtra-new.prf
│ └── xtra-xxx.prf
├── save
│ └── .gitignore
├── user
│ └── .gitignore
└── xtra
│ ├── font
│ ├── 10x17.fon
│ ├── 10x17b.fon
│ ├── 10x20.fon
│ ├── 12x20.fon
│ ├── 12x20b.fon
│ ├── 12x24.fon
│ ├── 16x25.fon
│ ├── 16x25b.fon
│ ├── 5x8.fon
│ ├── 6x10.fon
│ ├── 6x12.fon
│ ├── 6x13.fon
│ ├── 6x13b.fon
│ ├── 7x13.fon
│ ├── 7x13b.fon
│ ├── 8x13.fon
│ ├── 8x13b.fon
│ ├── 8x13c.fon
│ ├── 8x16.fon
│ ├── 8x16b.fon
│ ├── 9x15.fon
│ ├── 9x15b.fon
│ └── copying.txt
│ ├── graf
│ ├── 16x16.bmp
│ ├── 16x16_microchasm.png
│ ├── Makefile
│ ├── TilePicker.html
│ ├── graphics.txt
│ └── osx_bmp2png.py
│ ├── sound
│ ├── breath.wav
│ ├── clunk.wav
│ ├── death.wav
│ ├── destroy.wav
│ ├── drop.wav
│ ├── eat.wav
│ ├── flee.wav
│ ├── hallu.wav
│ ├── hit.wav
│ ├── hit1.wav
│ ├── kill.wav
│ ├── kill1.wav
│ ├── level.wav
│ ├── miss.wav
│ ├── miss1.wav
│ ├── money.wav
│ ├── opendoor.wav
│ ├── shutdoor.wav
│ ├── sound.cfg
│ ├── thump.wav
│ └── vomit.wav
│ └── tutorial
├── msvc2022
├── sil-q.sln
├── sil-q.vcxproj
└── sil-q.vcxproj.filters
├── silg
├── silx
└── src
├── .clang-format
├── Data.icns
├── Edit.icns
├── Makefile.bcc
├── Makefile.cocoa
├── Makefile.cyg
├── Makefile.dos
├── Makefile.emx
├── Makefile.gtk
├── Makefile.inc
├── Makefile.lcc
├── Makefile.nfe
├── Makefile.osx
├── Makefile.src
├── Makefile.std
├── Makefile.typew
├── Makefile.win
├── Save.icns
├── Sil.icns
├── Sil.ico
├── Sil.r
├── Sil.rsrc
├── Sil.xml
├── angband.h
├── birth.c
├── cave.c
├── cmd1.c
├── cmd2.c
├── cmd3.c
├── cmd4.c
├── cmd5.c
├── cmd6.c
├── cocoa
├── AppDelegate.h
├── AppDelegate.m
├── CommandMenu.plist
├── Data.icns
├── Edit.icns
├── Save.icns
├── Sil-Cocoa.xml
├── Sil_Icons.icns
└── en.lproj
│ ├── MainMenu.nib
│ └── MainMenu.xib
├── config.h
├── defines.h
├── dump_items.c
├── dungeon.c
├── externs.h
├── files.c
├── generate.c
├── h-basic.h
├── h-config.h
├── h-define.h
├── h-system.h
├── h-type.h
├── init.h
├── init1.c
├── init2.c
├── load.c
├── maid-x11.c
├── maid-x11.h
├── main-cap.c
├── main-cocoa-NMcC.m
├── main-cocoa.m
├── main-crb.c
├── main-gcu.c
├── main-gtk.c
├── main-nfe.c
├── main-typew.txt
├── main-win.c
├── main-x11.c
├── main-xxx.c
├── main.c
├── main.h
├── melee1.c
├── melee2.c
├── monster1.c
├── monster2.c
├── obj-info.c
├── object1.c
├── object2.c
├── randart.c
├── readdib.c
├── readdib.h
├── save.c
├── sil.rc
├── spells1.c
├── spells2.c
├── squelch.c
├── tables.c
├── types.h
├── unix2dos
├── unix2doslib
├── use-obj.c
├── util.c
├── variable.c
├── wizard1.c
├── wizard2.c
├── xtra1.c
├── xtra2.c
├── z-form.c
├── z-form.h
├── z-rand.c
├── z-rand.h
├── z-term.c
├── z-term.h
├── z-util.c
├── z-util.h
├── z-virt.c
└── z-virt.h
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | src/unix2dos text eol=lf
3 | src/unix2doslib text eol=lf
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.o
2 | *.raw
3 | src/sil
4 | src/sil.o.x86_64
5 | Sil.app
6 | .DS_Store
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sil-Q
2 | Sil-Q is a computer role-playing game with a strong emphasis on discovery and
3 | tactical combat. It has a simple but rich combat system which allows for a
4 | great variety of choice.
5 |
6 | Sil-Q continues the development of Sil which hasn't been updated for a while.
7 |
8 | ## Compiling Instructions
9 |
10 | Compiling Sil-Q is not very difficult, and has been tested on Windows, Linux, and OS X.
11 |
12 | Makefiles for various other systems still exist as a legacy from Sil. If you manage
13 | to build Sil-Q for a system other than Windows, Linux, or OS X please create a git branch
14 | with any changes necessary, update this file and open a github pull request against
15 | https://github.com/sil-quirk/sil-q.
16 |
17 | The first step is the same on all systems, so do this and then look through
18 | this file for advice on your specific system.
19 |
20 | 0. Install the Sil source code:
21 |
22 | Unzip the file "Sil-src.zip". It will become a folder called "Sil"
23 | which contains subfolders called "lib" and "src". Move it to wherever
24 | you want to keep it. The src folder contains all the source code
25 | while the lib folder contains other files that the game uses.
26 | When you are done compiling, the game will be automatically installed
27 | in the Sil folder as well.
28 |
29 |
30 | ### Linux or Unix with gcc (tested with Sil-Q)
31 |
32 | There are several different unix setups for Sil-Q:
33 |
34 | X11: Allows multiple windows, has correct colours.
35 | GCU: Works in a terminal using 'curses', has only 16 or 8 colours.
36 | CAP: Works even in old terminals, but is monochrome.
37 |
38 | 1. Mess with the Makefile:
39 |
40 | Edit Makefile.std in the src directory.
41 | Look for the section listing multiple "Variations".
42 | Choose the variation that you like best.
43 | Remove the # comments from that section's code.
44 | Comment out the default section.
45 |
46 | 2. Compile Sil-Q:
47 |
48 | Run "make -f Makefile.std install" in the src directory.
49 |
50 | 3. Run Sil-Q:
51 |
52 | Go back to the Sil folder and start Sil-Q with "sil".
53 |
54 | ### Windows with Cygwin (tested with Sil-Q)
55 |
56 | 1. Getting the free Cygwin compiler:
57 |
58 | Download the free Cygwin compiler. It provides a shell interface very
59 | similar to a normal Unix/Linux shell with many useful tools. Install it
60 | and start the Cygwin terminal. Make sure to get the 32 bit version.
61 |
62 | Note you will have to ensure "make" and the mingw C compiler are installed
63 | as they may not be included in your Cygwin default installation.
64 |
65 | 2. Compile Sil-Q:
66 |
67 | In the Cygwin terminal change to the src directory and run
68 | "make -f Makefile.cyg install".
69 | Sil should now be compiled and installed into the Sil folder.
70 | The executable file will be called Sil.exe.
71 |
72 | 3. Run Sil-Q:
73 |
74 | Go back to the Sil folder and run Sil.exe.
75 |
76 | ### Windows with Visual Studio 2022 (experimental, tested with Sil-Q on MSVC 2022)
77 |
78 | 1. Acquire Microsoft Visual Studio 2022.
79 |
80 | 2. Compile Sil-Q:
81 |
82 | Assuming you have MSVC 2022, this should be as simple as selecting Debug or
83 | Release, opening sil-q.sln in the msvc2019 directory and selecting Build Solution
84 | from the Build menu.
85 |
86 | 3. Run Sil-Q:
87 |
88 | Go back to the Sil folder and run Sil.exe.
89 |
90 | NOTE: This is a very new and very raw port, and requires testing.
91 |
92 | ### OS X with Xcode (tested with Sil-Q; Xcode 11.6 on OS X 10.15.5)
93 |
94 | 1. Get Xcode from the app store if not installed:
95 |
96 | Use App Store to get Xcode, a free set of development tools from Apple.
97 |
98 | 2. Compile Sil-Q:
99 |
100 | In a Terminal window, change to the src directory and run
101 | "make -f Makefile.cocoa install".
102 | Sil-Q should now be compiled and set up as an OS X application, Sil.app,
103 | in the folder above the src directory. You may move Sil.app to wherever
104 | you like.
105 |
106 | If you are using an arm-based Mac and want a native application, use
107 | "make -f Makefile.cocoa ARCHS=arm64 install"
108 | instead of the command given above. To generate a universal application
109 | that will run natively on either x86_64 or arm, use
110 | "make -f Makefile.cocoa ARCHS='x86_64 arm64' install".
111 | Building for arm likely requires at least Xcode 12.2 or later. Before
112 | building for a different set of architectures, run
113 | "make -f Makefile.cocoa clean" to clean up any object files that may not
114 | match your new set of selected architectures.
115 |
116 | 3. Run Sil-Q:
117 |
118 | In a Finder window, navigate to where you placed Sil.app. Then double
119 | click on it to run it. If you are running 10.15 or later and haven't run
120 | Sil-Q or Sil before, you'll see a dialog about granting Sil-Q access to
121 | your Documents folder since it wants to place saved games, the high
122 | score file, and some other data in Documents/Sil.
123 |
124 |
--------------------------------------------------------------------------------
/Sil-Q v1.5.0.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/Sil-Q v1.5.0.pdf
--------------------------------------------------------------------------------
/Sil.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Sil.xcodeproj/project.xcworkspace/xcshareddata/Sil.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | BA455D8C-0542-40DD-8CDD-2074B1C0CD7A
9 | IDESourceControlProjectName
10 | project
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 3E844855F7AD3531E055A5DB5B08F25A58E3B1FF
14 | https://github.com/halfsickofshadows/Sil.git
15 |
16 | IDESourceControlProjectPath
17 | Sil.xcodeproj/project.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 3E844855F7AD3531E055A5DB5B08F25A58E3B1FF
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/halfsickofshadows/Sil.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | 3E844855F7AD3531E055A5DB5B08F25A58E3B1FF
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 3E844855F7AD3531E055A5DB5B08F25A58E3B1FF
36 | IDESourceControlWCCName
37 | Sil
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Sil.xcodeproj/project.xcworkspace/xcuserdata/half.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/Sil.xcodeproj/project.xcworkspace/xcuserdata/half.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Sil.xcodeproj/project.xcworkspace/xcuserdata/half.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Sil.xcodeproj/xcuserdata/half.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/Sil.xcodeproj/xcuserdata/half.xcuserdatad/xcschemes/Sil.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
60 |
61 |
63 |
64 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/Sil.xcodeproj/xcuserdata/half.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Sil.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A9E8BDEE0907B86200A7232C
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/lib/apex/.keepalive:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/apex/.keepalive
--------------------------------------------------------------------------------
/lib/data/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/lib/docs/Sil 1.3 Manual.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/docs/Sil 1.3 Manual.pdf
--------------------------------------------------------------------------------
/lib/docs/Sil-Q 1.4.2 Manual.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/docs/Sil-Q 1.4.2 Manual.pdf
--------------------------------------------------------------------------------
/lib/edit/flavor.txt:
--------------------------------------------------------------------------------
1 | # File: flavor.txt
2 | #
3 | # This file is used to create the "lib/data/flavor.raw" file, which is
4 | # used to initialize the "flavor" information for Sil.
5 | #
6 | # Do not modify this file unless you know exactly what you are doing,
7 | # unless you wish to risk possible system crashes and broken savefiles.
8 | #
9 | # === Understanding flavor.txt ===
10 | #
11 | # N: index : tval : sval
12 | # G: char : attr
13 | # D: text
14 | #
15 | # 'N' is for the serial number (which must increase for each
16 | # new item), the tval (the type of item), and the
17 | # sval (the subtype). (See object.txt)
18 | #
19 | # 'G' is for the graphics. (See object.txt)
20 | #
21 | # 'D' is for the name/description.
22 |
23 |
24 |
25 | # Version stamp (required)
26 |
27 | V:1.5.0
28 |
29 |
30 | ##### Rings #####
31 |
32 | # Fixed: The Ring of Barahir
33 | N:1:45:32
34 | G:=:g1
35 | D:Serpentine
36 |
37 | N:2:45
38 | G:=:v1
39 | D:Amethyst
40 |
41 | N:3:45
42 | G:=:G1
43 | D:Beryl
44 |
45 | N:4:45
46 | G:=:r1
47 | D:Bloodstone
48 |
49 | N:5:45
50 | G:=:w
51 | D:Adamant
52 |
53 | N:6:45
54 | G:=:g
55 | D:Emerald
56 |
57 | N:7:45
58 | G:=:r
59 | D:Garnet
60 |
61 | N:8:45
62 | G:=:G
63 | D:Jade
64 |
65 | N:9:45
66 | G:=:w
67 | D:Marble
68 |
69 | N:10:45
70 | G:=:W
71 | D:Moonstone
72 |
73 | N:11:45
74 | G:=:D
75 | D:Onyx
76 |
77 | N:12:45
78 | G:=:W
79 | D:Chalcedony
80 |
81 | N:13:45
82 | G:=:r1
83 | D:Ruby
84 |
85 | N:14:45
86 | G:=:b
87 | D:Sapphire
88 |
89 | N:15:45
90 | G:=:y
91 | D:Topaz
92 |
93 | N:16:45
94 | G:=:b1
95 | D:Turquoise
96 |
97 | N:17:45
98 | G:=:U
99 | D:Bronze
100 |
101 | N:18:45
102 | G:=:y1
103 | D:Golden
104 |
105 | N:19:45
106 | G:=:W
107 | D:Silver
108 |
109 | N:20:45
110 | G:=:D
111 | D:Jet
112 |
113 | N:21:45
114 | G:=:w
115 | D:Pearl
116 |
117 | #N:20:45
118 | #G:=:B
119 | #D:Mithril
120 |
121 |
122 |
123 | ##### Amulets #####
124 |
125 | # Fixed: The Pearl 'Nimphelos'
126 | N:41:40:13
127 | G:":w
128 | D:Pearl
129 |
130 | # Fixed: The Jewel 'Elessar'
131 | N:42:40:16
132 | G:":g
133 | D:Emerald
134 |
135 | # Fixed: The Necklace of the Dwarves
136 | N:43:40:12
137 | G:":y
138 | D:Jewelled
139 |
140 | N:44:40
141 | G:":y
142 | D:Amber
143 |
144 | N:45:40
145 | G:":U1
146 | D:Driftwood
147 |
148 | N:46:40
149 | G:":o
150 | D:Coral
151 |
152 | N:47:40
153 | G:":w
154 | D:Ivory
155 |
156 | N:48:40
157 | G:":D
158 | D:Obsidian
159 |
160 | N:49:40
161 | G:":U
162 | D:Bronze
163 |
164 | N:50:40
165 | G:":y
166 | D:Golden
167 |
168 | N:51:40
169 | G:":B
170 | D:Crystal
171 |
172 | N:52:40
173 | G:":W
174 | D:Silver
175 |
176 | N:53:40
177 | G:":W
178 | D:Dragon Tooth
179 |
180 | N:54:40
181 | G:":r
182 | D:Ruby
183 |
184 | N:55:40
185 | G:":B1
186 | D:Sea Shell
187 |
188 | #N:56:40
189 | #G:":B
190 | #D:Mithril
191 |
192 |
193 | ##### Staves #####
194 |
195 | N:68:55
196 | G:_:U
197 | D:Aspen
198 |
199 | N:69:55
200 | G:_:w
201 | D:Birch
202 |
203 | N:70:55
204 | G:_:D
205 | D:Ebony
206 |
207 | N:71:55
208 | G:_:U1
209 | D:Elm
210 |
211 | N:72:55
212 | G:_:u
213 | D:Mahogany
214 |
215 | N:73:55
216 | G:_:U
217 | D:Maple
218 |
219 | N:74:55
220 | G:_:D1
221 | D:Oak
222 |
223 | N:75:55
224 | G:_:r
225 | D:Rosewood
226 |
227 | N:76:55
228 | G:_:U1
229 | D:Walnut
230 |
231 | N:77:55
232 | G:_:W
233 | D:Silver
234 |
235 | N:78:55
236 | G:_:u
237 | D:Runed
238 |
239 | N:79:55
240 | G:_:y
241 | D:Golden
242 |
243 | N:80:55
244 | G:_:s
245 | D:Ashen
246 |
247 | N:81:55
248 | G:_:U1
249 | D:Gnarled
250 |
251 | N:82:55
252 | G:_:w
253 | D:Ivory
254 |
255 | N:83:55
256 | G:_:U
257 | D:Willow
258 |
259 | N:84:55
260 | G:_:u
261 | D:Yew
262 |
263 | N:85:55
264 | G:_:U
265 | D:Beech
266 |
267 | N:86:55
268 | G:_:u1
269 | D:Twisted
270 |
271 | ##### Horns #####
272 |
273 | N:101:66
274 | G:?:W
275 | D:Silver
276 |
277 | N:102:66
278 | G:?:U
279 | D:Brazen
280 |
281 | N:103:66
282 | G:?:w
283 | D:Ivory
284 |
285 | N:104:66
286 | G:?:W1
287 | D:Tapered
288 |
289 | N:105:66
290 | G:?:U1
291 | D:Engraved
292 |
293 | ##### Herbs #####
294 |
295 | N:121:80
296 | G:,:D
297 | D:Black
298 |
299 | N:122:80
300 | G:,:g
301 | D:Dark Green
302 |
303 | N:123:80
304 | G:,:y
305 | D:Yellow
306 |
307 | N:124:80
308 | G:,:W
309 | D:Grey
310 |
311 | N:125:80
312 | G:,:G
313 | D:Pale Green
314 |
315 | N:126:80
316 | G:,:r
317 | D:Russet
318 |
319 | N:127:80
320 | G:,:s
321 | D:Thorny
322 |
323 | N:128:80
324 | G:,:U
325 | D:Mottled
326 |
327 | N:129:80
328 | G:,:u
329 | D:Wrinkled
330 |
331 | N:130:80
332 | G:,:w
333 | D:Pale
334 |
335 | #N:131:80
336 | #G:,:g1
337 | #D:Leafy
338 |
339 | N:141:81
340 | G:,:r1
341 | D:Bright Red
342 |
343 | N:142:81
344 | G:,:G
345 | D:Bright Green
346 |
347 | N:143:81
348 | G:,:y1
349 | D:Golden
350 |
351 | N:144:81
352 | G:,:B
353 | D:Sky Blue
354 |
355 | N:145:81
356 | G:,:U
357 | D:Copper
358 |
359 | N:146:81
360 | G:,:r
361 | D:Ruby
362 |
363 | N:147:81
364 | G:,:v
365 | D:Pink
366 |
367 | N:148:81
368 | G:,:o
369 | D:Orange
370 |
371 | N:149:81
372 | G:,:v1
373 | D:Violet
374 |
375 | N:150:81
376 | G:,:b1
377 | D:Bright Blue
378 |
379 |
380 |
381 |
382 |
383 |
384 | ##### Potions #####
385 |
386 | # Fixed: miruvor
387 | N:193:75:0
388 | G:!:W
389 | D:Clear
390 |
391 | # Fixed: orcish liquor
392 | N:195:75:2
393 | G:!:u
394 | D:Murky Brown
395 |
396 | # Fixed: Esgalduin
397 | N:196:75:3
398 | G:!:W1
399 | D:Limpid
400 |
401 | N:197:75
402 | G:!:b
403 | D:Dark Blue
404 |
405 | N:198:75
406 | G:!:b1
407 | D:Brilliant Blue
408 |
409 | N:199:75
410 | G:!:D
411 | D:Black
412 |
413 | N:200:75
414 | G:!:u
415 | D:Brown
416 |
417 | N:201:75
418 | G:!:W
419 | D:Sparkling
420 |
421 | N:202:75
422 | G:!:w
423 | D:Milky White
424 |
425 | N:203:75
426 | G:!:U
427 | D:Copper Speckled
428 |
429 | N:204:75
430 | G:!:r
431 | D:Crimson
432 |
433 | N:205:75
434 | G:!:g
435 | D:Green
436 |
437 | N:206:75
438 | G:!:g
439 | D:Dark Green
440 |
441 | N:207:75
442 | G:!:s
443 | D:Grey
444 |
445 | N:208:75
446 | G:!:G
447 | D:Emerald
448 |
449 | N:209:75
450 | G:!:o
451 | D:Bright Orange
452 |
453 | N:210:75
454 | G:!:G
455 | D:Pale Green
456 |
457 | N:211:75
458 | G:!:s
459 | D:Smoky
460 |
461 | N:212:75
462 | G:!:D
463 | D:Dark
464 |
465 | N:213:75
466 | G:!:v1
467 | D:Violet
468 |
469 | N:214:75
470 | G:!:r
471 | D:Vermilion
472 |
473 | N:215:75
474 | G:!:y
475 | D:Yellow
476 |
477 | N:216:75
478 | G:!:B
479 | D:Sky Blue
480 |
481 | N:217:75
482 | G:!:v
483 | D:Shimmering
484 |
485 | N:218:75
486 | G:!:w
487 | D:Cloudy
488 |
489 | N:219:75
490 | G:!:y
491 | D:Golden
492 |
493 | N:220:75
494 | G:!:b
495 | D:Sparkling Blue
496 |
497 | N:221:75
498 | G:!:B
499 | D:Azure
500 |
501 |
--------------------------------------------------------------------------------
/lib/edit/history.txt:
--------------------------------------------------------------------------------
1 | # File: history.txt
2 | #
3 | # This file is used to create the "lib/data/history.raw" file, which is
4 | # used to initialize the "player history" information for Sil.
5 | #
6 | # Do not modify this file unless you know exactly what you are doing,
7 | # unless you wish to risk possible system crashes and broken savefiles.
8 | #
9 | # === Understanding history.txt ===
10 | #
11 | # N: primary index : secondary index : probability : house
12 | # D: description
13 | #
14 | # 'N' the primary index represents the type of descriptive text
15 | # being generated (e.g. a Dwarven profession) and the secondary
16 | # index gives the particular thing within this type (e.g. craftsman).
17 | # The probability is the highest value of a random number from 1 to 100
18 | # that will lead to this choice (so these increase through a type).
19 | # Note that the races (race.txt) give primary indices into this table.
20 | #
21 | # 'D' A piece of descriptive text
22 | #
23 | # Background information (see below)
24 | #
25 | # Chart progression by race:
26 | #
27 | # Noldor --> 1 --> 2 --> 3 --> 50 --> 51 --> 52
28 | # Sindar --> 4 --> 5 --> 54 --> 55 --> 56
29 | # Edain --> 21 --> 22 --> 23 --> 25 --> 26 --> 27 --> 28
30 | # Naugrim --> 16 --> 17 --> 18 --> 57 --> 58 --> 59 --> 60 --> 61
31 | #
32 | #
33 | # * Note that this table *must* be correct or drastic errors may occur!
34 | #
35 | # * Note that the "spacing" in the "description" lines is very important!
36 |
37 |
38 | # Version stamp (required)
39 |
40 | V:1.5.0
41 |
42 |
43 | # Noldor history
44 |
45 | N:1:2:30:0
46 | D:You are one of several children
47 | N:1:2:60:0
48 | D:You are one of two children
49 | N:1:2:95:0
50 | D:You are the only child
51 | N:1:50:100:0
52 | D:You awoke on the shores of lake Cuivienen.
53 |
54 | N:2:3:20:0
55 | D:of an archer
56 | N:2:3:40:0
57 | D:of a warrior
58 | N:2:3:60:0
59 | D:of a smith
60 | N:2:3:95:0
61 | D:of a bard
62 | N:2:3:100:0
63 | D:of a prince
64 |
65 | N:3:50:100:1
66 | D:from the house of Feanor.
67 | N:3:50:100:2
68 | D:from the house of Fingolfin.
69 | N:3:50:100:3
70 | D:from the house of Finarfin.
71 |
72 |
73 | # Sindar history
74 |
75 | N:4:5:30:0
76 | D:You are one of several children
77 | N:4:5:60:0
78 | D:You are one of two children
79 | N:4:5:95:0
80 | D:You are the only child
81 | N:4:54:100:0
82 | D:You awoke on the shores of lake Cuivienen.
83 |
84 | N:5:54:35:0
85 | D:of a Sindar archer.
86 | N:5:54:50:0
87 | D:of a Sindar warrior.
88 | N:5:54:60:0
89 | D:of a Sindar smith.
90 | N:5:54:95:0
91 | D:of a Sindar bard.
92 | N:5:54:99:0
93 | D:of a Sindar prince.
94 | N:5:54:100:0
95 | D:of a Sindar king.
96 |
97 |
98 | # Naugrim History
99 |
100 | N:16:17:25:0
101 | D:You are one of two children of a Dwarven
102 | N:16:17:100:0
103 | D:You are the only child of a Dwarven
104 |
105 | N:17:18:5:0
106 | D:Outcast.
107 | N:17:18:50:0
108 | D:Craftsman.
109 | N:17:18:70:0
110 | D:Warrior.
111 | N:17:18:99:0
112 | D:Smith.
113 | N:17:18:100:0
114 | D:Prince.
115 |
116 | N:18:57:10:0
117 | D:You are the black sheep of the family.
118 | N:18:57:85:0
119 | D:You are a credit to the family.
120 | N:18:57:100:0
121 | D:You were a well liked child.
122 |
123 |
124 |
125 | # Edain History
126 |
127 | N:21:22:5:0
128 | D:You are the illegitimate and unacknowledged child
129 | N:21:22:7:0
130 | D:You are the illegitimate but acknowledged child
131 | N:21:22:70:0
132 | D:You are one of several children
133 | N:21:22:90:0
134 | D:You are the first child
135 | N:21:22:100:0
136 | D:You are the only child
137 |
138 | N:22:23:30:0
139 | D:of a farmer.
140 | N:22:23:60:0
141 | D:of a craftsman.
142 | N:22:23:80:0
143 | D:of an archer.
144 | N:22:23:99:0
145 | D:of a warrior.
146 | N:22:23:100:0
147 | D:of a prince.
148 |
149 |
150 | N:23:25:10:0
151 | D:You are the black sheep of the family.
152 | N:23:25:80:0
153 | D:You are a credit to the family.
154 | N:23:25:100:0
155 | D:You were a well liked child.
156 |
157 |
158 | # Edain Description
159 |
160 | N:25:26:20:0
161 | D:You have dark brown eyes,
162 | N:25:26:60:0
163 | D:You have brown eyes,
164 | N:25:26:70:0
165 | D:You have hazel eyes,
166 | N:25:26:80:0
167 | D:You have green eyes,
168 | N:25:26:90:0
169 | D:You have blue eyes,
170 | N:25:26:100:0
171 | D:You have blue-gray eyes,
172 |
173 | N:26:27:70:0
174 | D:straight
175 | N:26:27:90:0
176 | D:wavy
177 | N:26:27:100:0
178 | D:curly
179 |
180 | N:27:28:30:0
181 | D:black hair,
182 | N:27:28:70:0
183 | D:brown hair,
184 | N:27:28:80:0
185 | D:auburn hair,
186 | N:27:28:90:0
187 | D:red hair,
188 | N:27:28:100:0
189 | D:golden hair,
190 |
191 | N:28:0:30:0
192 | D:and an average complexion.
193 | N:28:0:80:0
194 | D:and an average complexion.
195 | N:28:0:90:0
196 | D:and a fair complexion.
197 | N:28:0:100:0
198 | D:and a very fair complexion.
199 |
200 |
201 | # Noldor description
202 |
203 | N:50:51:85:0
204 | D:You have light grey eyes,
205 | N:50:51:95:0
206 | D:You have light blue eyes,
207 | N:50:51:100:0
208 | D:You have light green eyes,
209 |
210 | N:51:52:75:0
211 | D:straight
212 | N:51:52:100:0
213 | D:wavy
214 |
215 | N:52:0:90:3
216 | D:golden hair, and a fair complexion.
217 | N:52:0:70:0
218 | D:black hair, and a fair complexion.
219 | N:52:0:80:0
220 | D:brown hair, and a fair complexion.
221 | N:52:0:88:0
222 | D:auburn hair, and a fair complexion.
223 | N:52:0:95:0
224 | D:golden hair, and a fair complexion.
225 | N:52:0:100:0
226 | D:silver hair, and a fair complexion.
227 |
228 |
229 | # Sindar description
230 |
231 | N:54:55:85:0
232 | D:You have light grey eyes,
233 | N:54:55:95:0
234 | D:You have light blue eyes,
235 | N:54:55:100:0
236 | D:You have light green eyes,
237 |
238 | N:55:56:75:0
239 | D:straight
240 | N:55:56:100:0
241 | D:wavy
242 |
243 | N:56:0:70:0
244 | D:black hair, and a fair complexion.
245 | N:56:0:80:0
246 | D:brown hair, and a fair complexion.
247 | N:56:0:88:0
248 | D:auburn hair, and a fair complexion.
249 | N:56:0:95:0
250 | D:golden hair, and a fair complexion.
251 | N:56:0:100:0
252 | D:silver hair, and a fair complexion.
253 |
254 |
255 | # Naugrim description
256 |
257 | N:57:58:100:0
258 | D:You have dark brown eyes,
259 |
260 | N:58:59:90:0
261 | D:straight
262 | N:58:59:100:0
263 | D:wavy
264 |
265 | N:59:60:75:0
266 | D:black hair,
267 | N:59:60:100:0
268 | D:brown hair,
269 |
270 | N:60:61:40:0
271 | D:a one foot beard,
272 | N:60:61:80:0
273 | D:a two foot beard,
274 | N:60:61:98:0
275 | D:a three foot beard,
276 | N:60:61:100:0
277 | D:a four foot beard,
278 |
279 | N:61:0:70:0
280 | D:and a dark complexion.
281 | N:61:0:100:0
282 | D:and a ruddy complexion.
283 |
--------------------------------------------------------------------------------
/lib/edit/house.txt:
--------------------------------------------------------------------------------
1 | # File: house.txt
2 | #
3 | # This file is used to create the "lib/data/house.raw" file, which is
4 | # used to initialize the "player house" information for Sil.
5 | #
6 | # Do not modify this file unless you know exactly what you are doing,
7 | # unless you wish to risk possible system crashes and broken savefiles.
8 | #
9 | #
10 | # === Understanding house.txt ===
11 | #
12 | # N: house number : house name
13 | # A: alternate house name
14 | # B: short house name
15 | # F: house flag
16 | # S: str : dex : con : gra
17 | #
18 | # 'N' indicates the beginning of an entry. The serial number must
19 | # increase for each new house.
20 | #
21 | # 'A' is the alternate house name, so it can be used in the form:
22 | # Caranthir of
23 | #
24 | # 'B' is the short house name when it needs to be displayed in
25 | # a small space.
26 | #
27 | # 'F' is the house flags, which modify certain skills
28 | #
29 | # 'S' is the bonuses to stats: Str, Dex, Con, Gra
30 |
31 |
32 | # Version stamp (required)
33 |
34 | V:1.5.0
35 |
36 | N:0:Houseless
37 | A:Houseless
38 | B:Houseless
39 | S:0:0:0:0
40 | D:
41 |
42 | N:1:House of Feanor
43 | A:Feanor's House
44 | B:Feanor
45 | F:SMT_AFFINITY
46 | S:0:1:0:0
47 | D:Feanor was the greatest of the Noldor, though proud and
48 | D: unyielding. He created the Silmarils which Morgoth later
49 | D: stole, and he led his house across the sea to Beleriand
50 | D: in pursuit. Those of Feanor's house are fiery in temper,
51 | D: but capable of great works of beauty.
52 |
53 | N:2:House of Fingolfin
54 | A:Fingolfin's House
55 | B:Fingolfin
56 | F:WIL_AFFINITY
57 | S:0:0:1:0
58 | D:Fingolfin led his house into Beleriand to protect its
59 | D: peoples from the shadow of Morgoth. Betrayed by the
60 | D: Feanorians, they had to come through the icy wastes of the north.
61 | D: Their people are the most hardy and valiant, most
62 | D: feared by the orcs and hated by Morgoth.
63 |
64 | N:3:House of Finarfin
65 | A:Finarfin's House
66 | B:Finarfin
67 | F:PER_AFFINITY
68 | S:0:0:0:1
69 | D:Finarfin himself did not come to Beleriand, but many of his house
70 | D: made the journey under Fingolfin's banner. They are the
71 | D: fairest and wisest of the Noldor. All have golden hair as
72 | D: a mark of their Vanyarin ancestry.
73 |
74 | N:4:Of Doriath
75 | A:Doriath
76 | B:Doriath
77 | F:SNG_AFFINITY
78 | S:0:0:0:1
79 | D:Most Sindar dwell in the forests of Doriath. Thingol is their
80 | D: king, and rules from Menegroth with Melian at his side.
81 | D: Her power hides Doriath from the servants of Morgoth, allowing
82 | D: the Sindar to hunt and feast as in the days before his shadow grew.
83 |
84 | N:5:House of Nogrod
85 | A:Nogrod
86 | B:Nogrod
87 | F:SMT_AFFINITY
88 | S:0:1:0:0
89 | D:Nogrod, the 'Hollowbold', is a dwarven stronghold beneath the
90 | D: Blue Mountains. The forges burn brightly in its deep mansions
91 | D: and the smiths of Nogrod are matchless in all Beleriand.
92 |
93 | N:6:House of Belegost
94 | A:Belegost
95 | B:Belegost
96 | F:WIL_AFFINITY
97 | S:1:0:0:0
98 | D:Belegost, the 'Great Fortress', is a dwarven citadel in the
99 | D: northern ranges of the Blue Mountains. Its stout warriors
100 | D: are legendary for their strength and for the fearsome
101 | D: iron masks they wear to battle.
102 |
103 | N:7:House of Beor
104 | A:Beor's House
105 | B:Beor
106 | F:EVN_AFFINITY
107 | S:0:0:0:1
108 | D:Those of Beor's house are steadfast in endurance of hardship
109 | D: and sorrow, slow to tears and to laughter; their fortitude needs
110 | D: no hope to sustain it. For the most part they have brown hair
111 | D: with brown or grey eyes.
112 |
113 | N:8:People of Haleth
114 | A:Haleth's People
115 | B:Haleth
116 | F:STL_AFFINITY
117 | S:0:1:0:0
118 | D:The people of Haleth are not eager for lore, and use few words;
119 | D: for they do not love great concourse of men, and many among them
120 | D: delight in solitude, wandering free in the greenwoods. For the most
121 | D: part they are small in stature, with dark hair and dark eyes.
122 |
123 | N:9:House of Hador
124 | A:Hador's House
125 | B:Hador
126 | F:MEL_AFFINITY
127 | S:1:0:0:0
128 | D:Those of Hador's house are quick to wrath and laughter,
129 | D: fierce in battle, generous to friend and foe, swift in resolve,
130 | D: fast in loyalty and joyous in heart. For the most part they are
131 | D: tall, with flaxen or golden hair, blue-grey eyes and fair skin.
132 |
133 | # New Sindar House: should be moved into order when I next break savefile
134 | # compatibility (v 1.1?)
135 |
136 | N:10:Of the Falas
137 | A:the Falas
138 | B:Falathrim
139 | F:ARC_AFFINITY
140 | S:0:1:0:0
141 | D:When Thingol met with Melian under the wheeling stars, many of his folk
142 | D: despaired of finding him again and journeyed to the shore, the Falas,
143 | D: to set sail to Valinor. Some tarried there and dwelt in the havens on the
144 | D: edge of Middle-Earth with their lord, Cirdan, the shipbuilder.
145 |
146 |
--------------------------------------------------------------------------------
/lib/edit/limits.txt:
--------------------------------------------------------------------------------
1 | # File: limits.txt
2 | #
3 | # This file is used to create the "lib/data/limits.raw" file, which is
4 | # used to initialize the "array sizes" information for Sil.
5 | #
6 | # Do not modify this file unless you know exactly what you are doing,
7 | # unless you wish to risk possible system crashes and broken savefiles.
8 | #
9 | # These numbers are all actually the maximum + 1, (except for the artifact
10 | # non-total numbers)
11 |
12 |
13 | # Version stamp (required)
14 |
15 | V:1.5.0
16 |
17 |
18 | # Maximum number of feature types
19 | M:F:86
20 |
21 | # Maximum number of object kinds
22 | M:K:600
23 |
24 | # Maximum number of abilities
25 | M:B:240
26 |
27 | # Maximum number of total artifacts
28 | #
29 | # M:A:special:normal:random:self-made
30 | #
31 | # special artifacts: (1 to this number - 1)
32 | # normal artifacts: ((special) to (special + this number - 1))
33 | # random artifacts: ((normal artifacts) to (normal artfiacts + this number - 1))
34 | # self-made artfiacts: ((random artifacts) to (random artifacts + this number - 1))
35 | # total artifacts = special + normal + random + self-made
36 | #
37 | # changing these numbers will almost always break savefile compatibility
38 | #
39 | M:A:20:180:1:50
40 |
41 | # Maximum number of special item types
42 | M:E:145
43 |
44 | # Maximum number of monster races
45 | M:R:656
46 |
47 | # Maximum number of permanent maintainer ghost templates (in *angband/lib/bones)
48 | M:G:19
49 |
50 | # Maximum number of vaults
51 | M:V:500
52 |
53 | # Maximum number of player races
54 | M:P:4
55 |
56 | # Maximum number of player houses
57 | M:C:11
58 |
59 | # Maximum number of player history lines
60 | M:H:165
61 |
62 | # Maximum number of quests (including a slot for random quests)
63 | M:Q:4
64 |
65 | # Maximum number of flavors
66 | M:L:310
67 |
68 | # Maximum number of objects on the level
69 | M:O:512
70 |
71 | # Previously we had the maximum number of monsters on the level here
72 | # but it has been made into a compile-time #define
73 |
74 | #
75 | # Array sizes (in bytes) for some initialization stuff
76 | #
77 |
78 | # Size of the "fake" array for reading in names of monsters, objects,
79 | # artifacts, store-owners, player-races, ...
80 | M:N:20480
81 |
82 | # Size of the "fake" array for reading in the descriptions of monsters,
83 | # vaults, and the player-histories
84 | M:T:65440
85 |
86 |
--------------------------------------------------------------------------------
/lib/edit/monster.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/edit/monster.txt
--------------------------------------------------------------------------------
/lib/edit/race.txt:
--------------------------------------------------------------------------------
1 | # File: race.txt
2 | #
3 | # This file is used to create the "lib/data/race.raw" file, which is
4 | # used to initialize the "player race" information for Sil.
5 | #
6 | # Do not modify this file unless you know exactly what you are doing,
7 | # unless you wish to risk possible system crashes and broken savefiles.
8 | #
9 | #
10 | # === Understanding race.txt ===
11 | #
12 | # N: race number : race name
13 | # S: str : dex : con : gra
14 | # I: history : agebase : agemax
15 | # H: hgt : modhgt
16 | # W: wgt : modwgt
17 | # F: racial flags
18 | # E: tval : sval : min : max
19 | #
20 | # 'N' indicates the beginning of an entry. The serial number must
21 | # increase for each new race.
22 | #
23 | # 'S' is for the stat modifiers - strength, dexterity, constitution, grace.
24 | #
25 | # 'I' is for info - starting point of the player history, base age,
26 | # max age.
27 | #
28 | # 'H' is height info - base height (males), mod height (males),
29 | # base height (females), mod height (females).
30 | #
31 | # 'W' is weight info - base weight (males), mod weight (males),
32 | # base weight (females), mod weight (females).
33 | #
34 | # 'F' is for racial flags.
35 | #
36 | # 'E' is for starting equipment - tval of the item, sval of the item,
37 | # minimum amount, maximum amount.
38 |
39 |
40 | # Version stamp (required)
41 |
42 | V:1.5.0
43 |
44 | # - Noldor:
45 | # - The deep elves
46 | # - Stat modifers 0 +1 +2 +2
47 | # - Blade proficiency = a bonus of 1 to melee when wielding '|' weapons
48 | # - Arc affinity = a bonus of 1 to archery and a free ability
49 |
50 | N:0:Noldor
51 | S:0:1:2:2
52 | I:1:20:4865
53 | H:78:3
54 | W:150:8
55 | C:1|2|3
56 | F:BOW_PROFICIENCY | SNG_AFFINITY
57 | E:39:0:3:3 # ~ Wooden Torches (3)
58 | E:80:37:3:3 # , Fragment of Lembas (3)
59 | E:23:7:1:1 # | Curved sword (1)
60 | D:The Noldor are known as the 'Deep-elves', for they are the
61 | D: most learned and inventive of the elven kindreds. They saw
62 | D: the light of the Two Trees in Valinor and gained much in
63 | D: lore and skill. They are tall and lithe, yet so strong
64 | D: of spirit that they can endure vast hardship. Their
65 | D: hair is mostly dark and their eyes grey.
66 |
67 | # - Sindar:
68 | # - The grey elves
69 | # - Stat modifers -1 +1 +2 +1
70 | # - Blade proficiency = a bonus of 1 to melee when wielding '|' weapons
71 | # - Arc affinity = a bonus of 1 to archery and a free ability
72 |
73 | N:1:Sindar
74 | S:-1:1:2:1
75 | I:4:20:4865
76 | H:76:3
77 | W:148:8
78 | C:4|10
79 | F:BOW_PROFICIENCY | SNG_AFFINITY
80 | E:39:0:3:3 # ~ Wooden Torches (3)
81 | E:80:37:3:3 # , Fragment of Lembas (3)
82 | E:23:7:1:1 # | Curved sword (1)
83 | D:The Sindar are the 'Grey-elves' who never saw the blessed light of
84 | D: the Two Trees, but who found an echo of it in their queen,
85 | D: Melian the Maiar. They are less learned and powerful than the
86 | D: Noldor, but have fair voices and are gifted in song.
87 |
88 | # - Naugrim:
89 | # - The dwarves
90 | # - Stat modifers 0 -1 +3 +1
91 | # - Axe proficiency = a bonus of 1 to melee when wielding an axe
92 | # - Arc penalty = a penalty of -1 to archery and abilities cost 500 more
93 | # - Smt affinity = a bonus of 1 to smithing and a free ability
94 |
95 | N:2:Naugrim
96 | S:0:-1:3:1
97 | I:16:35:180
98 | H:54:2
99 | W:155:10
100 | C:5|6
101 | F:AXE_PROFICIENCY | ARC_PENALTY | SMT_AFFINITY
102 | E:39:0:3:3 # ~ Wooden Torches (3)
103 | E:80:35:5:5 # , Pieces of Dark Bread (5)
104 | E:23:7:1:1 # | Curved sword (1)
105 | D:The dwarves are stone-hard and stubborn, fast in friendship
106 | D: and in enmity. They live long, far beyond the span of Men
107 | D: but not for ever. They are short in stature, deep-breasted
108 | D: and stout in the leg, and their beards are long. They were
109 | D: named the 'Naugrim' by the Sindar, meaning 'the stunted people'.
110 |
111 |
112 | # - Edain:
113 | # - The mortal men of the first age
114 | # - Stat modifers 0 0 0 0
115 |
116 | N:3:Edain
117 | S:0:0:0:0
118 | I:21:15:45
119 | H:70:4
120 | W:150:12
121 | C:7|8|9
122 | E:39:0:3:3 # ~ Wooden Torches (3)
123 | E:80:35:5:5 # , Pieces of Dark Bread (5)
124 | E:23:7:1:1 # | Curved sword (1)
125 | D:The Edain are the Men of Beleriand. They gained much from
126 | D: dealings with the Noldor, and grew more long lived than their
127 | D: kin beyond the mountains.
128 | D: However, compared to the elves they were more frail, and more easily
129 | D: slain by weapon or mischance.
130 | D: The Edain dwell in the north of
131 | D: Beleriand and help the Noldor to contain Morgoth's power.
132 |
133 |
134 |
--------------------------------------------------------------------------------
/lib/pref/flvr-new.prf:
--------------------------------------------------------------------------------
1 | #Rings
2 |
3 | #Serpentine ring may not be used, even though it is in the flavor.txt file
4 | #it is currently set to the pink error tile.
5 | # Serpentine
6 | L:1:0x86/0x94
7 |
8 | # Amethyst ring
9 | L:2:0x82/0x80
10 |
11 | # Beryl ring
12 | L:3:0x82/0x81
13 |
14 | # Bloodstone ring
15 | L:4:0x82/0x82
16 |
17 | # Adamant ring
18 | L:5:0x82/0x83
19 |
20 | # Emerald ring
21 | L:6:0x82/0x84
22 |
23 | # Garnet ring
24 | L:7:0x82/0x85
25 |
26 | # Jade ring
27 | L:8:0x82/0x86
28 |
29 | # Marble ring
30 | L:9:0x82/0x87
31 |
32 | # Moonstone ring
33 | L:10:0x82/0x88
34 |
35 | # Onyx ring
36 | L:11:0x82/0x89
37 |
38 | # Chalcedony ring
39 | L:12:0x82/0x8A
40 |
41 | # Ruby ring
42 | L:13:0x82/0x8B
43 |
44 | # Sapphire ring
45 | L:14:0x82/0x8C
46 |
47 | # Topez ring
48 | L:15:0x82/0x8D
49 |
50 | # Turqoise ring
51 | L:16:0x82/0x8E
52 |
53 | # Bronze ring
54 | L:17:0x82/0x8F
55 |
56 | # Golden Lazuli ring
57 | L:18:0x82/0x90
58 |
59 | # Silver ring
60 | L:19:0x82/0x91
61 |
62 | # Jet ring
63 | L:20:0x82/0x92
64 |
65 | # Pearl ring
66 | L:21:0x82/0x93
67 |
68 |
69 | #Amulets
70 |
71 | # Pearl amulet
72 | L:41:0x84/0x82
73 |
74 | # Emerald amulet
75 | L:42:0x84/0x8B
76 |
77 | # Jeweled amulet
78 | L:43:0x84/0x8C
79 |
80 | # Amber amulet
81 | L:44:0x84/0x89
82 |
83 | # Driftwood amulet
84 | L:45:0x84/0x8E
85 |
86 | # Coral amulet
87 | L:46:0x84/0x80
88 |
89 | # Ivory amulet
90 | L:47:0x84/0x84
91 |
92 | # Obsidian amulet
93 | L:48:0x84/0x85
94 |
95 | # Bronze amulet
96 | L:49:0x84/0x81
97 |
98 | # Golden amulet
99 | L:50:0x84/0x87
100 |
101 | # Crystal amulet
102 | L:51:0x84/0x8D
103 |
104 | # Silver amulet
105 | L:52:0x84/0x83
106 |
107 | # Dragon Tooth amulet
108 | L:53:0x84/0x88
109 |
110 | # Ruby amulet
111 | L:54:0x84/0x86
112 |
113 | # Sea Shell amulet
114 | L:55:0x84/0x8A
115 |
116 | #################################v
117 | #I believe that the mithril amulet is not used, even though it is in the flavor.txt file
118 | #it is set to error tile
119 | # Mithril amulet
120 | L:56:0x83/0x9F
121 |
122 |
123 | #Staves
124 |
125 | # Aspen staff
126 | L:68:0x84/0x8F
127 |
128 | # Birch staff
129 | L:69:0x84/0x90
130 |
131 | # Ebony staff
132 | L:70:0x84/0x91
133 |
134 | # Elm staff
135 | L:71:0x84/0x92
136 |
137 | # Mahogany staff
138 | L:72:0x84/0x93
139 |
140 | # Maple staff
141 | L:73:0x84/0x94
142 |
143 | # Oak staff
144 | L:74:0x84/0x95
145 |
146 | # Rosewood staff
147 | L:75:0x84/0x96
148 |
149 | # Walnut staff
150 | L:76:0x84/0x97
151 |
152 | # Silver staff
153 | L:77:0x84/0x98
154 |
155 | # Runed staff
156 | L:78:0x84/0x99
157 |
158 | # Golden staff
159 | L:79:0x84/0x9A
160 |
161 | # Ashen staff
162 | L:80:0x84/0x9B
163 |
164 | # Gnarled staff
165 | L:81:0x84/0x9C
166 |
167 | # Ivory staff
168 | L:82:0x84/0x9D
169 |
170 | # Willow staff
171 | L:83:0x84/0x9E
172 |
173 | # Yew staff
174 | L:84:0x84/0x9F
175 |
176 | # Beech staff
177 | L:85:0x85/0x80
178 |
179 | # Twisted staff
180 | L:86:0x85/0x81
181 |
182 |
183 | #Horns
184 | # Silver horn
185 | L:101:0x82/0x96
186 |
187 | # Brazen horn
188 | L:102:0x82/0x97
189 |
190 | # Ivory horn
191 | L:103:0x82/0x98
192 |
193 | # Tapered horn
194 | L:104:0x82/0x99
195 |
196 | # Engraved horn
197 | L:105:0x82/0x9A
198 |
199 | #Herbs
200 | # Black herb
201 | L:121:0x81/0x8A
202 |
203 | # Dark Green herb
204 | L:122:0x81/0x8B
205 |
206 | # Yellow herb
207 | L:123:0x81/0x8C
208 |
209 | # Grey herb
210 | L:124:0x81/0x8D
211 |
212 | # Pale Green herb
213 | L:125:0x81/0x8E
214 |
215 | # Russet herb
216 | L:126:0x81/0x90
217 |
218 | # Thorny herb
219 | L:127:0x81/0x8F
220 |
221 | # Mottled herb
222 | L:128:0x81/0x91
223 |
224 | # Wrinkled herb
225 | L:129:0x81/0x92
226 |
227 | # Pale herb
228 | L:130:0x81/0x93
229 |
230 | # Leafy herb
231 | L:131:0x81/0x94
232 |
233 |
234 | #Easter Eggs
235 |
236 | # Bright Red easter egg
237 | L:141:0x81/0x97
238 |
239 | # Bright Green easter egg
240 | L:142:0x81/0x98
241 |
242 | # Golden easter egg
243 | L:143:0x81/0x99
244 |
245 | # Sky Blue easter egg
246 | L:144:0x81/0x9A
247 |
248 | # Copper easter egg
249 | L:145:0x81/0x9B
250 |
251 | # Ruby easter egg
252 | L:146:0x81/0x9C
253 |
254 | # Pink easter egg
255 | L:147:0x81/0x9D
256 |
257 | # Orange easter egg
258 | L:148:0x81/0x9E
259 |
260 | # Violet easter egg
261 | L:149:0x81/0x9F
262 |
263 | # Bright Blue easter egg
264 | L:150:0x81/0x9G
265 |
266 | #Potions
267 |
268 | # Clear potion
269 | L:193:0x83/0x80
270 |
271 | # Murky Brown potion
272 | L:195:0x83/0x81
273 |
274 | # Limpid potion
275 | L:196:0x83/0x82
276 |
277 | # Dark Blue potion
278 | L:197:0x83/0x83
279 |
280 | # Brilliant Blue potion
281 | L:198:0x83/0x84
282 |
283 | # Black potion
284 | L:199:0x83/0x85
285 |
286 | # Brown potion
287 | L:200:0x83/0x86
288 |
289 | # Sparkling potion
290 | L:201:0x83/0x87
291 |
292 | # Milky White potion
293 | L:202:0x83/0x88
294 |
295 | # Copper Speckled potion
296 | L:203:0x83/0x89
297 |
298 | # Crimson potion
299 | L:204:0x83/0x8A
300 |
301 | # Green potion
302 | L:205:0x83/0x8B
303 |
304 | # Dark Green potion
305 | L:206:0x83/0x8C
306 |
307 | # Grey potion
308 | L:207:0x83/0x8D
309 |
310 | # Emerald potion
311 | L:208:0x83/0x8E
312 |
313 | # Bright Orange potion
314 | L:209:0x83/0x8F
315 |
316 | # Pale Green potion
317 | L:210:0x83/0x90
318 |
319 | # Smoky potion
320 | L:211:0x83/0x91
321 |
322 | # Dark potion
323 | L:212:0x83/0x92
324 |
325 | # Violet potion
326 | L:213:0x83/0x93
327 |
328 | # Vermillion potion
329 | L:214:0x83/0x94
330 |
331 | # Yellow potion
332 | L:215:0x83/0x95
333 |
334 | # Sky Blue potion
335 | L:216:0x83/0x96
336 |
337 | # Shimmering potion
338 | L:217:0x83/0x97
339 |
340 | # Cloudy potion
341 | L:218:0x83/0x98
342 |
343 | # Golden potion
344 | L:219:0x83/0x98
345 |
346 | # Sparkling Blue potion
347 | L:220:0x83/0x9A
348 |
349 | # Azure potion
350 | L:221:0x83/0x9B
--------------------------------------------------------------------------------
/lib/pref/font-dos.prf:
--------------------------------------------------------------------------------
1 | # File: font-dos.prf
2 |
3 | #
4 | # This file is used by Angband (when it was compiled using "main-dos.c")
5 | # to specify simple attr/char remappings using a standard font, allowing
6 | # the use of special pseudo-graphic pictures for walls and such.
7 | #
8 |
9 |
--------------------------------------------------------------------------------
/lib/pref/font-mac.prf:
--------------------------------------------------------------------------------
1 | # File: font-mac.prf
2 |
3 | #
4 | # This file defines special attr/char mappings for use in "text" mode
5 | #
6 | # See "lib/help/command.txt" and "src/files.c" for more information.
7 | #
8 |
9 | ### The Original Angband colours
10 | #V:0:0x00:0x00:0x00:0x00
11 | #V:1:0x00:0xFF:0xFF:0xFF
12 | #V:2:0x00:0x80:0x80:0x80
13 | #V:3:0x00:0xFF:0x80:0x00
14 | #V:4:0x00:0xC0:0x00:0x00
15 | #V:5:0x00:0x00:0x80:0x40
16 | #V:6:0x00:0x00:0x00:0xFF
17 | #V:7:0x00:0x80:0x40:0x00
18 | #V:8:0x00:0x40:0x40:0x40
19 | #V:9:0x00:0xC0:0xC0:0xC0
20 | #V:10:0x00:0xA0:0x00:0xFF
21 | #V:11:0x00:0xFF:0xFF:0x00
22 | #V:12:0x00:0xFF:0x00:0x00
23 | #V:13:0x00:0x00:0xFF:0x00
24 | #V:14:0x00:0x00:0xFF:0xFF
25 | #V:15:0x00:0xC0:0x80:0x40
26 |
27 | ## OPTION: Display "veins" (white "%") as "normal walls" (white "#")
28 | ## This replaces the old method of setting "notice_seams" to false,
29 | ## which no longer works as of Angband 2.7.9, for various reasons.
30 | #
31 | #F:50:1/35
32 | #F:51:1/35
33 | #F:52:1/35
34 | #F:53:1/35
35 |
36 |
--------------------------------------------------------------------------------
/lib/pref/font-win.prf:
--------------------------------------------------------------------------------
1 | # File: font-win.prf
2 |
3 | #
4 | # This file is used by Angband (when it was compiled using "main-win.c")
5 | # to specify simple attr/char remappings using a standard font, allowing
6 | # the use of special pseudo-graphic pictures for walls and such.
7 | #
8 | # Note that this file is extremely similar to the "font-ibm.prf" file,
9 | # but it uses different codes, since it uses the special pseudo-graphic
10 | # symbols defined in the "lib/xtra/font/*.FON" files, and there is only
11 | # one special wall type, so we have to use special "colors".
12 | #
13 |
14 | # Note that the special symbols are currently commented out because
15 | # they do not work properly on Vista with the default 8x13 font.
16 |
17 |
18 | ### Terrain features ###
19 |
20 |
21 | # Floors (white / centered dot)
22 |
23 | # F:1:1/31
24 |
25 | # Invis traps (white / centered dot)
26 |
27 | # F:2:1/31
28 |
29 |
30 | # Magma (slate / solid block)
31 |
32 | # F:50:2/127
33 | # F:52:2/127
34 |
35 |
36 | # Quartz (light slate / solid block)
37 |
38 | # F:51:9/127
39 | # F:53:9/127
40 |
41 |
42 | # Secret door (white / solid block)
43 |
44 | # F:48:1/127
45 |
46 | # Granite walls & permanent rock (white / solid block)
47 |
48 | # F:56:1/127
49 | # F:57:1/127
50 | # F:58:1/127
51 | # F:59:1/127
52 | # F:60:1/127
53 | # F:61:1/127
54 | # F:62:1/127
55 | # F:63:1/127
56 |
57 |
--------------------------------------------------------------------------------
/lib/pref/font-x11.prf:
--------------------------------------------------------------------------------
1 | # File: font-x11.prf
2 |
3 |
4 | # Color palette - Text
5 | #
6 | # [there used to be definitions for colours 0-15 here]
7 |
8 |
9 | # Shades - Text
10 | #
11 | # [there used to be definitions for colours 16-31 here]
12 |
13 |
14 |
--------------------------------------------------------------------------------
/lib/pref/font.prf:
--------------------------------------------------------------------------------
1 | # File: font.prf
2 |
3 | #
4 | # This file defines special attr/char mappings for use in "text" mode
5 | #
6 | # This file includes, if appropriate, various "sub-files"
7 | #
8 | # See "lib/help/command.txt" and "src/files.c" for more information.
9 | #
10 |
11 |
12 | ## #
13 | ## # OPTION: Display "veins" (white "%") as "normal walls" (white "#").
14 | ## #
15 | ## F:50:0x01/0x23
16 | ## F:51:0x01/0x23
17 | ## F:52:0x01/0x23
18 | ## F:53:0x01/0x23
19 |
20 |
21 | ##### Standard font file #####
22 |
23 | %:font-xxx.prf
24 |
25 | ##### Load the Shades #####
26 | %:shades.prf
27 |
28 | ##### System Specific Subfiles #####
29 |
30 | ?:[IOR [EQU $SYS xaw] [EQU $SYS x11] [EQU $SYS xpj] [EQU $SYS gtk]]
31 | %:font-x11.prf
32 |
33 | ?:[EQU $SYS gcu]
34 | %:font-gcu.prf
35 |
36 | ?:[EQU $SYS ami]
37 | %:font-ami.prf
38 |
39 | ?:[EQU $SYS mac]
40 | %:font-mac.prf
41 |
42 | ?:[EQU $SYS win]
43 | %:font-win.prf
44 |
45 | ?:[EQU $SYS dos]
46 | %:font-dos.prf
47 |
48 | ?:[EQU $SYS ibm]
49 | %:font-ibm.prf
50 |
51 | ?:[EQU $SYS emx]
52 | %:font-emx.prf
53 |
54 | ?:[EQU $SYS acn]
55 | %:font-acn.prf
56 |
57 | ?:1
58 |
59 |
--------------------------------------------------------------------------------
/lib/pref/graf-gcu.prf:
--------------------------------------------------------------------------------
1 | # File: graf-gcu.prf
2 |
3 | #
4 | # This file is used by Angband (when it was compiled using "main-gcu.c")
5 | # to specify simple attr/char remappings using the special Curses "ACS"
6 | # characters.
7 | #
8 |
9 | #
10 | # Secret doors
11 | #
12 |
13 | F:48:1/0xA3
14 |
15 | #
16 | # Magma
17 | #
18 |
19 | F:50:2/0xA5
20 | F:52:2/0xA5
21 |
22 | #
23 | # Quartz
24 | #
25 |
26 | F:51:9/0xA5
27 | F:53:9/0xA5
28 |
29 | #
30 | # Treasure veins
31 | #
32 |
33 | #F:54:3/0xA3
34 | #F:55:3/0xA3
35 |
36 | #
37 | # Granite walls
38 | #
39 |
40 | F:56:1/0xA3
41 | F:57:1/0xA3
42 | F:58:1/0xA3
43 | F:59:1/0xA3
44 |
45 | #
46 | # Permanent walls
47 | #
48 |
49 | F:60:1/0xA3
50 | F:61:1/0xA3
51 | F:62:1/0xA3
52 | F:63:1/0xA3
53 |
54 |
--------------------------------------------------------------------------------
/lib/pref/graf-mac.prf:
--------------------------------------------------------------------------------
1 | # File: graf-mac.prf
2 |
3 | #
4 | # This file defines special attr/char mappings for use in "graphics" mode
5 | #
6 | # See "lib/help/command.txt" and "src/files.c" for more information.
7 | #
8 |
9 |
10 | # New tiles
11 | ?:[EQU $GRAF new]
12 | %:graf-new.prf
13 |
14 |
--------------------------------------------------------------------------------
/lib/pref/graf-win.prf:
--------------------------------------------------------------------------------
1 | # File: graf-win.prf
2 |
3 | #
4 | # This file defines special attr/char mappings for use in "graphics" mode
5 | #
6 | # See "lib/help/command.txt" and "src/files.c" for more information.
7 | #
8 |
9 |
10 | # New tiles
11 | ?:[EQU $GRAF new]
12 | %:graf-new.prf
13 |
--------------------------------------------------------------------------------
/lib/pref/graf-x11.prf:
--------------------------------------------------------------------------------
1 | # File: graf-x11.prf
2 |
3 |
4 | # Font stuff
5 | %:font-x11.prf
6 |
7 | # Color palette - Graphics
8 | #
9 | # [there used to be definitions for colours 16-31 here]
10 |
11 | # Hack -- initialization
12 | ?:[NOT [EQU $SYS xxx]]
13 |
14 | # New tiles
15 | ?:[EQU $GRAF new]
16 | %:graf-new.prf
17 |
18 | ?:1
19 |
--------------------------------------------------------------------------------
/lib/pref/graf.prf:
--------------------------------------------------------------------------------
1 | # File: graf.prf
2 |
3 | #
4 | # This file defines special attr/char mappings for use in "graphics" mode
5 | #
6 | # This file includes, if appropriate, various "sub-files"
7 | #
8 | # See "lib/help/command.txt" and "src/files.c" for more information.
9 | #
10 |
11 |
12 | ##### Standard font file #####
13 |
14 | %:font-xxx.prf
15 |
16 |
17 | ##### System Specific Subfiles #####
18 |
19 | ?:[IOR [EQU $SYS xaw] [EQU $SYS x11] [EQU $SYS xpj]]
20 | %:graf-x11.prf
21 |
22 | ?:[EQU $SYS lsl]
23 | %:graf-lsl.prf
24 |
25 | ?:[EQU $SYS gcu]
26 | %:graf-gcu.prf
27 |
28 | ?:[EQU $SYS ami]
29 | %:graf-ami.prf
30 |
31 | ?:[EQU $SYS mac]
32 | %:graf-mac.prf
33 |
34 | ?:[IOR [EQU $SYS win] [EQU $SYS dos]]
35 | %:graf-win.prf
36 |
37 | ?:[EQU $SYS ibm]
38 | %:graf-ibm.prf
39 |
40 | ?:[EQU $SYS emx]
41 | %:graf-emx.prf
42 |
43 | ?:[EQU $SYS acn]
44 | %:graf-acn.prf
45 |
46 | ?:1
47 |
48 |
--------------------------------------------------------------------------------
/lib/pref/message.prf:
--------------------------------------------------------------------------------
1 | # File: message.prf
2 |
3 | #
4 | # This file defines the default message colors.
5 | #
6 | # This file includes, if appropriate, various "sub-files".
7 | #
8 | # See "lib/help/command.txt" and "src/files.c" for more information.
9 | #
10 | # Format:
11 | # M::
12 | #
13 | # Possible colors:
14 | # d = Black
15 | # w = White
16 | # s = Gray
17 | # o = Orange
18 | # r = Red
19 | # g = Green
20 | # b = Blue
21 | # u = Brown
22 | # D = Dark Gray
23 | # W = Light Gray
24 | # v = Violet
25 | # y = Yellow
26 | # R = Light Red
27 | # G = Light Green
28 | # B = Light Blue
29 | # U = Light Brown
30 |
31 |
32 | # MSG_GENERIC
33 | M:0:w
34 |
35 | # MSG_HIT
36 | M:1:w
37 |
38 | # MSG_MISS
39 | M:2:w
40 |
41 | # MSG_FLEE
42 | M:3:w
43 |
44 | # MSG_DROP
45 | M:4:w
46 |
47 | # MSG_KILL
48 | M:5:w
49 |
50 | # MSG_LEVEL
51 | M:6:w
52 |
53 | # MSG_DEATH
54 | M:7:w
55 |
56 | # MSG_STUDY
57 | M:8:w
58 |
59 | # MSG_TELEPORT
60 | M:9:w
61 |
62 | # MSG_SHOOT
63 | M:10:w
64 |
65 | # MSG_QUAFF
66 | M:11:w
67 |
68 | # MSG_ZAP
69 | M:12:w
70 |
71 | # MSG_WALK
72 | M:13:w
73 |
74 | # MSG_TPOTHER
75 | M:14:w
76 |
77 | # MSG_HITWALL
78 | M:15:w
79 |
80 | # MSG_EAT
81 | M:16:w
82 |
83 | # MSG_STORE1
84 | M:17:w
85 |
86 | # MSG_STORE2
87 | M:18:w
88 |
89 | # MSG_STORE3
90 | M:19:w
91 |
92 | # MSG_STORE4
93 | M:20:w
94 |
95 | # MSG_DIG
96 | M:21:w
97 |
98 | # MSG_OPENDOOR
99 | M:22:w
100 |
101 | # MSG_SHUTDOOR
102 | M:23:w
103 |
104 | # MSG_TPLEVEL
105 | M:24:w
106 |
107 | # MSG_BELL
108 | M:25:o
109 |
110 | # MSG_NOTHING_TO_OPEN
111 | M:26:w
112 |
113 | # MSG_LOCKPICK_FAIL
114 | M:27:w
115 |
116 | # MSG_STAIRS
117 | M:28:w
118 |
119 | # MSG_HITPOINT_WARN
120 | M:29:o
121 |
122 | ?:1
123 |
124 |
--------------------------------------------------------------------------------
/lib/pref/pref-emx.prf:
--------------------------------------------------------------------------------
1 | # File: pref-emx.prf
2 |
3 | #
4 | # Include "pref-win.prf" to get the default macros.
5 | #
6 | # Note that, while most key-to-trigger mappings are the same as DOS/Win,
7 | # some few odd keys will be different or not available at all.
8 | #
9 | # Examples: Ctrl-Escape, Alt-PrintScreen
10 | #
11 | # What's NOT working: color palette redefinitions.
12 | #
13 |
14 | %:pref-win.prf
15 |
16 |
--------------------------------------------------------------------------------
/lib/pref/pref-gcu.prf:
--------------------------------------------------------------------------------
1 | # File: pref-gcu.prf
2 |
3 | #
4 | # This file may be included by "pref.prf", when using "main-gcu.prf".
5 | #
6 | # It contains macro definitions to allow the VT100 cursor keys to be
7 | # recognized by Angband. This will also make the "escape" key take a
8 | # few seconds to recognize, so you may want to use the "`" key instead.
9 | #
10 |
11 |
12 | ### VT100 Keypad ###
13 |
14 |
15 | # Special keypad keys (delete, insert)
16 |
17 | A:.
18 | P:\e[3~
19 |
20 | A:0
21 | P:\e[2~
22 |
23 |
24 | # Numerical keypad keys (map to appropriate number)
25 |
26 | A:1
27 | P:\e[4~
28 | P:\e[F
29 |
30 | A:2
31 | P:\e[B
32 |
33 | A:3
34 | P:\e[6~
35 |
36 | A:4
37 | P:\e[D
38 |
39 | A:5
40 | P:\e[E
41 | P:\e[G
42 |
43 | A:6
44 | P:\e[C
45 |
46 | A:7
47 | P:\e[1~
48 | P:\e[H
49 |
50 | A:8
51 | P:\e[A
52 |
53 | A:9
54 | P:\e[5~
55 |
56 |
57 | # Basic function keys (F1 - F4)
58 |
59 | A:\e
60 | P:\eOP
61 |
62 | A:\e
63 | P:\eOQ
64 |
65 | A:\e
66 | P:\eOR
67 |
68 | A:\e
69 | P:\eOS
70 |
71 |
--------------------------------------------------------------------------------
/lib/pref/pref-mac.prf:
--------------------------------------------------------------------------------
1 | # File: pref-mac.prf
2 |
3 | #
4 | # This file is included by "pref.prf" when "main-mac.c" is used.
5 | #
6 | # See "lib/help/command.txt" and "src/files.c" for more information.
7 | #
8 | #
9 | # Macro Trigger configuration
10 | #
11 | # T:::::....
12 | # '&' in specifies location of modifier character.
13 | # '#' in specifies location of key code.
14 | #
15 | # If is null string, all trigger definition will be cleared.
16 |
17 | T:&x#:CSOX:control-:shift-:option-:command-
18 |
19 | # T:::
20 | # '\' in is escape character.
21 |
22 | #
23 | # These keycodes come from .
24 |
25 | T:KP_Decimal:41
26 | T:KP_Multiply:43
27 | T:KP_Add:45
28 | T:KP_Clear:47
29 | T:KP_Divide:4B
30 | T:KP_Enter:4C
31 | T:KP_Subtract:4E
32 | T:KP_Equal:51
33 | T:KP_0:52
34 | T:KP_1:53
35 | T:KP_2:54
36 | T:KP_3:55
37 | T:KP_4:56
38 | T:KP_5:57
39 | T:KP_6:58
40 | T:KP_7:59
41 | T:KP_8:5B
42 | T:KP_9:5C
43 | T:F1:7A
44 | T:F2:78
45 | T:F3:63
46 | T:F4:76
47 | T:F5:60
48 | T:F6:61
49 | T:F7:62
50 | T:F8:64
51 | T:F9:65
52 | T:F10:6D
53 | T:F11:67
54 | T:F12:6F
55 | T:F13:69
56 | T:F14:6B
57 | T:F15:71
58 | T:Help:72
59 | T:Home:73
60 | T:Page_Up:74
61 | T:Delete:75
62 | T:End:77
63 | T:Page_Down:79
64 | T:Left:7B
65 | T:Right:7C
66 | T:Down:7D
67 | T:Up:7E
68 | T:Backspace:33
69 |
70 | T:A:00
71 | T:S:01
72 | T:D:02
73 | T:F:03
74 | T:H:04
75 | T:G:05
76 | T:Z:06
77 | T:X:07
78 | T:C:08
79 | T:V:09
80 | T:B:0B
81 | T:Q:0C
82 | T:W:0D
83 | T:E:0E
84 | T:R:0F
85 | T:Y:10
86 | T:T:11
87 | T:1:12
88 | T:2:13
89 | T:3:14
90 | T:4:15
91 | T:6:16
92 | T:5:17
93 | T:=:18
94 | T:9:19
95 | T:7:1A
96 | T:-:1B
97 | T:8:1C
98 | T:0:1D
99 | T:]:1E
100 | T:O:1F
101 | T:U:20
102 | T:[:21
103 | T:I:22
104 | T:P:23
105 | T:L:25
106 | T:J:26
107 | T:':27
108 | T:K:28
109 | T:::29
110 | T:\:2A
111 | T:,:2B
112 | T:/:2C
113 | T:N:2D
114 | T:M:2E
115 | T:.:2F
116 | T:`:32
117 |
118 |
119 | # Hack: For some reason Enter is producing a ^C character instead of a return.
120 | # This macro changes that send a return instead.
121 | A:\r
122 | P:^C
123 |
124 |
125 | ##### Simple Macros #####
126 |
127 | # Ideally I'd have Option-number-keys and Control-number-keys work too
128 | # but I don't know the keycodes for the number-keys (on the top row).
129 |
130 | ###########################
131 | #
132 | # Directed Walking
133 | #
134 | # 789
135 | # 4 6 - these walk in the specified direction
136 | # 123
137 | #
138 | # 5 - rest
139 |
140 | A:0
141 | P:\[KP_0]
142 |
143 | A:1
144 | P:\[KP_1]
145 |
146 | A:2
147 | P:\[KP_2]
148 | P:\[Down]
149 |
150 | A:3
151 | P:\[KP_3]
152 |
153 | A:4
154 | P:\[KP_4]
155 | P:\[Left]
156 |
157 | A:5
158 | P:\[KP_5]
159 |
160 | A:6
161 | P:\[KP_6]
162 | P:\[Right]
163 |
164 | A:7
165 | P:\[KP_7]
166 |
167 | A:8
168 | P:\[KP_8]
169 | P:\[Up]
170 |
171 | A:9
172 | P:\[KP_9]
173 |
174 |
175 | ###########################
176 | #
177 | # Shift-Direction -- Directed Running
178 | #
179 | # 789
180 | # 4 6 - these run in the specified direction
181 | # 123
182 | #
183 | # 5 - rest until needed
184 |
185 | A:.1
186 | P:\[shift-KP_1]
187 |
188 | A:.2
189 | P:\[shift-KP_2]
190 | P:\[shift-Down]
191 |
192 | A:.3
193 | P:\[shift-KP_3]
194 |
195 | A:.4
196 | P:\[shift-KP_4]
197 | P:\[shift-Left]
198 |
199 | A:Z
200 | P:\[shift-KP_5]
201 |
202 | A:.6
203 | P:\[shift-KP_6]
204 | P:\[shift-Right]
205 |
206 | A:.7
207 | P:\[shift-KP_7]
208 |
209 | A:.8
210 | P:\[shift-KP_8]
211 | P:\[shift-Up]
212 |
213 | A:.9
214 | P:\[shift-KP_9]
215 |
216 |
217 | ###########################
218 | #
219 | # Option-Direction -- Directed firing from the 1st quiver
220 | #
221 | # 789
222 | # 4 6 - these fire in the specified direction
223 | # 123
224 | #
225 | # 5/0 - picks the target or closest monster and fires at it
226 | #
227 | # Known bug on UK Keyboard Macs, where Option-3 gives # symbol instead.
228 | # In this case Option-3 doesn't work and you need Shift-3
229 |
230 |
231 | A:\\ff
232 | P:\[option-KP_0]
233 |
234 | A:\\f1
235 | P:\[option-KP_1]
236 |
237 | A:\\f2
238 | P:\[option-KP_2]
239 | P:\[option-Down]
240 |
241 | A:\\f3
242 | P:\[option-KP_3]
243 |
244 | A:\\f4
245 | P:\[option-KP_4]
246 | P:\[option-Left]
247 |
248 | A:\\ff
249 | P:\[option-KP_5]
250 |
251 | A:\\f6
252 | P:\[option-KP_6]
253 | P:\[option-Right]
254 |
255 | A:\\f7
256 | P:\[option-KP_7]
257 |
258 | A:\\f8
259 | P:\[option-KP_8]
260 | P:\[option-Up]
261 |
262 | A:\\f9
263 | P:\[option-KP_9]
264 |
265 |
266 | # Option-z -- Fire from 1st quiver at target, or nearest monster
267 |
268 | A:\\ff
269 | P:\[option-z]
270 |
271 |
272 | ###########################
273 | #
274 | # Control-Direction -- Interact with terrain in chosen direction
275 | #
276 | # 789
277 | # 456
278 | # 123
279 |
280 |
281 | A:\\/1
282 | P:\[control-KP_1]
283 |
284 | A:\\/2
285 | P:\[control-KP_2]
286 | P:\[control-Down]
287 |
288 | A:\\/3
289 | P:\[control-KP_3]
290 |
291 | A:\\/4
292 | P:\[control-KP_4]
293 | P:\[control-Left]
294 |
295 | A:\\/5
296 | P:\[control-KP_5]
297 |
298 | A:\\/6
299 | P:\[control-KP_6]
300 | P:\[control-Right]
301 |
302 | A:\\/7
303 | P:\[control-KP_7]
304 |
305 | A:\\/8
306 | P:\[control-KP_8]
307 | P:\[control-Up]
308 |
309 | A:\\/9
310 | P:\[control-KP_9]
311 |
312 |
313 |
314 | # Diagonals via 'fn' key (useful for laptops)
315 |
316 | A:7
317 | P:\[Page_Up]
318 |
319 | A:1
320 | P:\[Home]
321 |
322 | A:3
323 | P:\[Page_Down]
324 |
325 | A:9
326 | P:\[End]
327 |
328 |
329 | # Running on diagonals via 'fn' key (useful for laptops)
330 |
331 | A:.7
332 | P:\[shift-Page_Up]
333 |
334 | A:.1
335 | P:\[shift-Home]
336 |
337 | A:.3
338 | P:\[shift-Page_Down]
339 |
340 | A:.9
341 | P:\[shift-End]
342 |
343 |
--------------------------------------------------------------------------------
/lib/pref/pref.prf:
--------------------------------------------------------------------------------
1 | # File: pref.prf
2 |
3 | #
4 | # This file defines "default" actions of various kinds
5 | #
6 | # This file includes, if appropriate, various "sub-files"
7 | #
8 | # See "src/files.c" for more information.
9 | #
10 | # Keyset mappings take the form:
11 | # A: action
12 | # C: keyset : key
13 | #
14 | # There are 4 keysets (0, 1, 2, 3), representing the Sil and Angband-style sets
15 | # without and with the hjkl movement
16 | #
17 | # When you press the 'key', the underlying 'action' is triggered.
18 |
19 |
20 | ##### Force certain options #####
21 |
22 | ## # Option -- Default to original commands
23 | ## X:hjkl_movement
24 |
25 | ## # Option -- Default to roguelike commands
26 | ## Y:hjkl_movement
27 |
28 |
29 | ##### Sil Keyset Mappings #####
30 |
31 | # Stay still (numerical)
32 | A:z
33 | C:0:5
34 |
35 | # Control-z / , -- Interact with own square
36 | A:/5
37 | C:0:,
38 | A:/5
39 | C:0:^Z
40 |
41 | # Movement (numerical)
42 |
43 | A:;1
44 | C:0:1
45 | A:;2
46 | C:0:2
47 | A:;3
48 | C:0:3
49 | A:;4
50 | C:0:4
51 | A:;6
52 | C:0:6
53 | A:;7
54 | C:0:7
55 | A:;8
56 | C:0:8
57 | A:;9
58 | C:0:9
59 |
60 |
61 | ##### hjkl Movement Keyset Mappings #####
62 |
63 | # Stay still (numerical)
64 | A:z
65 | C:1:5
66 |
67 | # Control-z / , -- Interact with own square
68 | A:/5
69 | C:1:,
70 | A:/5
71 | C:1:^Z
72 |
73 | # Movement (numerical)
74 | A:;1
75 | C:1:1
76 | A:;2
77 | C:1:2
78 | A:;3
79 | C:1:3
80 | A:;4
81 | C:1:4
82 | A:;6
83 | C:1:6
84 | A:;7
85 | C:1:7
86 | A:;8
87 | C:1:8
88 | A:;9
89 | C:1:9
90 |
91 | # Movement (rogue keys)
92 | A:;1
93 | C:1:b
94 | A:;2
95 | C:1:j
96 | A:;3
97 | C:1:n
98 | A:;4
99 | C:1:h
100 | A:;6
101 | C:1:l
102 | A:;7
103 | C:1:y
104 | A:;8
105 | C:1:k
106 | A:;9
107 | C:1:u
108 |
109 | # Running (shift + rogue keys)
110 | A:.1
111 | C:1:B
112 | A:.2
113 | C:1:J
114 | A:.3
115 | C:1:N
116 | A:.4
117 | C:1:H
118 | A:.6
119 | C:1:L
120 | A:.7
121 | C:1:Y
122 | A:.8
123 | C:1:K
124 | A:.9
125 | C:1:U
126 |
127 | # The missing commands (control + rogue keys)
128 | A:b
129 | C:1:^B
130 | A:l
131 | C:1:^L
132 | A:k
133 | C:1:^K
134 | A:u
135 | C:1:^U
136 | A:n
137 | C:1:^N
138 |
139 | A:L
140 | C:1:W
141 |
142 |
143 | ##### Angband-like Keyset Mappings #####
144 |
145 | # Stay still (numerical)
146 | A:z
147 | C:2:5
148 |
149 | # Control-z / , -- Interact with own square
150 | A:/5
151 | C:2:,
152 | A:/5
153 | C:2:^Z
154 |
155 | # Movement (numerical)
156 | A:;1
157 | C:2:1
158 | A:;2
159 | C:2:2
160 | A:;3
161 | C:2:3
162 | A:;4
163 | C:2:4
164 | A:;6
165 | C:2:6
166 | A:;7
167 | C:2:7
168 | A:;8
169 | C:2:8
170 | A:;9
171 | C:2:9
172 |
173 | # Examine
174 | A:x
175 | C:2:I
176 |
177 | # Throw
178 | A:t
179 | C:2:v
180 |
181 | # Throw (auto-target)
182 | A:^t
183 | C:2:^v
184 |
185 | # Universal Use
186 | A:u
187 | C:2:U
188 |
189 | # Remove
190 | A:r
191 | C:2:t
192 |
193 | # Activate Staff
194 | A:a
195 | C:2:u
196 |
197 | # Bash
198 | A:b
199 | C:2:B
200 |
201 | # Wait
202 | #A:z
203 | #C:3:,
204 |
205 | # Forge
206 | #A:^D
207 | #C:2:m
208 |
209 | # Wait
210 | A:z
211 | C:2:s
212 |
213 | # Rest
214 | A:Z
215 | C:2:R
216 |
217 | # Sing
218 | A:s
219 | C:2:a
220 |
221 | # Character Sheet
222 | A:@
223 | C:2:C
224 |
225 | # Options
226 | A:O
227 | C:2:=
228 |
229 | # Interact with a square
230 | A:/
231 | C:2:+
232 |
233 | # Set Macros
234 | A:$
235 | C:2:@
236 |
237 | # Repeat as '0' is handled internally
238 |
239 | # Remove some now unneeded commands (by assigning them to the unused 'A')
240 | A:A
241 | C:2:x
242 | A:A
243 | C:2:r
244 | A:A
245 | C:2:b
246 | A:A
247 | C:2:Z
248 | A:A
249 | C:2:O
250 | A:A
251 | C:2:/
252 | A:A
253 | C:2:^t
254 |
255 | ##### Angband-like Keyset Mappings with hjkl movement #####
256 |
257 | # Stay still (numerical)
258 | A:z
259 | C:3:5
260 |
261 | # Control-z / , -- Interact with own square
262 | A:/5
263 | C:3:,
264 | A:/5
265 | C:3:^Z
266 |
267 | # Movement (numerical)
268 | A:;1
269 | C:3:1
270 | A:;2
271 | C:3:2
272 | A:;3
273 | C:3:3
274 | A:;4
275 | C:3:4
276 | A:;6
277 | C:3:6
278 | A:;7
279 | C:3:7
280 | A:;8
281 | C:3:8
282 | A:;9
283 | C:3:9
284 |
285 | # Movement (rogue keys)
286 | A:;1
287 | C:3:b
288 | A:;2
289 | C:3:j
290 | A:;3
291 | C:3:n
292 | A:;4
293 | C:3:h
294 | A:;6
295 | C:3:l
296 | A:;7
297 | C:3:y
298 | A:;8
299 | C:3:k
300 | A:;9
301 | C:3:u
302 |
303 | # Running (shift + rogue keys)
304 | A:.1
305 | C:3:B
306 | A:.2
307 | C:3:J
308 | A:.3
309 | C:3:N
310 | A:.4
311 | C:3:H
312 | A:.6
313 | C:3:L
314 | A:.7
315 | C:3:Y
316 | A:.8
317 | C:3:K
318 | A:.9
319 | C:3:U
320 |
321 | # The missing commands (control + rogue keys)
322 | A:b
323 | C:3:^B
324 | A:l
325 | C:3:^L
326 | A:k
327 | C:3:^K
328 | A:u
329 | C:3:^U
330 | A:n
331 | C:3:^N
332 |
333 | A:L
334 | C:3:W
335 |
336 |
337 | # Examine
338 | A:x
339 | C:3:I
340 |
341 | # Throw
342 | A:t
343 | C:3:v
344 |
345 | # Throw (auto-target)
346 | A:^t
347 | C:3:^v
348 |
349 | # Remove
350 | A:r
351 | C:3:t
352 |
353 | # Wait
354 | #A:z
355 | #C:3:,
356 |
357 | # Forge
358 | #A:^D
359 | #C:3:m
360 |
361 | # Wait
362 | A:z
363 | C:3:s
364 |
365 | # Rest
366 | A:Z
367 | C:3:R
368 |
369 | # Sing
370 | A:s
371 | C:3:a
372 |
373 | # Character Sheet
374 | A:@
375 | C:3:C
376 |
377 | # Options
378 | A:O
379 | C:3:=
380 |
381 | # Interact with a square
382 | A:/
383 | C:3:+
384 |
385 | # Set Macros
386 | A:$
387 | C:3:@
388 |
389 | # Repeat as '0' is handled internally
390 |
391 | # Remove some now unneeded commands (by assigning them to the unused 'A')
392 | A:A
393 | C:3:x
394 | A:A
395 | C:3:r
396 | A:A
397 | C:3:Z
398 | A:A
399 | C:3:O
400 | A:A
401 | C:3:/
402 | A:A
403 | C:3:^t
404 |
405 | # Message colors
406 | %:message.prf
407 |
408 | ##### System Specific Subfiles #####
409 |
410 | ?:[IOR [EQU $SYS xaw] [EQU $SYS x11] [EQU $SYS xpj] [EQU $SYS gtk]]
411 | %:pref-x11.prf
412 |
413 | ?:[IOR [EQU $SYS gcu] [EQU $SYS lsl] [EQU $SYS cap] [EQU $SYS vcs] [EQU $SYS sla]]
414 | %:pref-gcu.prf
415 |
416 | ?:[EQU $SYS ami]
417 | %:pref-ami.prf
418 |
419 | ?:[EQU $SYS mac]
420 | %:pref-mac.prf
421 |
422 | ?:[IOR [EQU $SYS dos] [EQU $SYS ibm]]
423 | %:pref-dos.prf
424 |
425 | ?:[EQU $SYS win]
426 | %:pref-win.prf
427 |
428 | ?:[EQU $SYS emx]
429 | %:pref-emx.prf
430 |
431 | ?:[EQU $SYS acn]
432 | %:pref-acn.prf
433 |
434 | ?:1
435 |
--------------------------------------------------------------------------------
/lib/pref/races.prf:
--------------------------------------------------------------------------------
1 | # File: races.prf
2 |
3 | #
4 | # This file loads specific race "sub-files"
5 | #
6 |
7 | ?:[EQU $RACE Noldor]
8 | %:noldor.prf
9 |
10 | ?:[EQU $RACE Sindar]
11 | %:sindar.prf
12 |
13 | ?:[EQU $RACE Naugrim]
14 | %:naugrim.prf
15 |
16 | ?:[EQU $RACE Edain]
17 | %:edain.prf
18 | ?:1
19 |
20 |
--------------------------------------------------------------------------------
/lib/pref/shades.prf:
--------------------------------------------------------------------------------
1 | # File: shades.prf
2 |
3 | #
4 | # This file defines 16 additional color shades for computers that can display more
5 | # than 16 colors at once.
6 | #
7 | # Color palette - Text
8 |
9 | V:0:0x01:0x00:0x00:0x00
10 | V:1:0x01:0xFF:0xFF:0xFF
11 | V:2:0x01:0x80:0x80:0x80
12 | V:3:0x01:0xFF:0x80:0x00
13 | V:4:0x01:0xC0:0x00:0x00
14 | V:5:0x01:0x00:0x80:0x40
15 | V:6:0x01:0x00:0x40:0xFF
16 | V:7:0x01:0x80:0x40:0x00
17 | V:8:0x01:0x50:0x50:0x50
18 | V:9:0x01:0xC0:0xC0:0xC0
19 | V:10:0x01:0xA0:0x00:0xFF
20 | V:11:0x01:0xFF:0xFF:0x00
21 | V:12:0x01:0xFF:0x60:0x60
22 | V:13:0x01:0x00:0xFF:0x00
23 | V:14:0x01:0x00:0xFF:0xFF
24 | V:15:0x01:0xC0:0x80:0x40
25 |
26 | # Shades for text mode
27 |
28 | V:16:0x01:0x30:0x30:0x30
29 | V:17:0x01:0xC0:0xC0:0xC0
30 | V:18:0x01:0xA0:0xA0:0xA0
31 | V:19:0x01:0xDC:0x64:0x00
32 | V:20:0x01:0xF0:0x00:0x00
33 | V:21:0x01:0x00:0x70:0x00
34 | V:22:0x01:0x00:0x80:0xFF
35 | V:23:0x01:0xC8:0x64:0x00
36 | V:24:0x01:0x78:0x64:0x64
37 | V:25:0x01:0xE8:0xD0:0xC0
38 | V:26:0x01:0x60:0x00:0xFF
39 | V:27:0x01:0xC8:0xC8:0x00
40 | V:28:0x01:0xB4:0x46:0x32
41 | V:29:0x01:0x00:0xDC:0x64
42 | V:30:0x01:0x64:0xAA:0xC8
43 | V:31:0x01:0xC8:0xAA:0x46
44 |
--------------------------------------------------------------------------------
/lib/pref/user.prf:
--------------------------------------------------------------------------------
1 | # File: user.prf
2 |
3 | #
4 | # This file defines "override" actions of various kinds
5 | #
6 | # This file includes, if appropriate, various "sub-files"
7 | #
8 | # See "lib/help/command.txt" and "src/files.c" for more information.
9 | #
10 |
11 |
12 | ## Option -- Force the use of original commands
13 | #X:rogue_like_commands
14 |
15 | ## Option -- Force the use of roguelike commands
16 | #Y:rogue_like_commands
17 |
18 |
19 | ##### System Specific Subfiles #####
20 |
21 | ?:[IOR [EQU $SYS xaw] [EQU $SYS x11] [EQU $SYS xpj] [EQU $SYS gtk]]
22 | %:user-x11.prf
23 |
24 | ?:[EQU $SYS gcu]
25 | %:user-gcu.prf
26 |
27 | ?:[EQU $SYS mac]
28 | %:user-mac.prf
29 |
30 | ?:[IOR [EQU $SYS win] [EQU $SYS dos] [EQU $SYS ibm]]
31 | %:user-win.prf
32 |
33 | ?:[EQU $SYS emx]
34 | %:user-emx.prf
35 |
36 | ?:1
37 |
38 |
--------------------------------------------------------------------------------
/lib/pref/xtra-dvg.prf:
--------------------------------------------------------------------------------
1 | # File: xtra-new.prf
2 |
3 | #
4 | # This file defines special attr/char mappings for use in "graphics" mode
5 | #
6 | # Edited for use with David Gervais's 32x32 tiles by Mogami.
7 | #
8 | # See "lib/help/command.txt" and "src/files.c" for more information.
9 | #
10 |
11 |
12 | ##### Remap the player icon #####
13 |
14 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Human] ]
15 | R:0:0x83:0x87
16 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Elf] ]
17 | R:0:0x83:0x8f
18 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Elf] ]
19 | R:0:0x83:0x97
20 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Hobbit] ]
21 | R:0:0x83:0x9f
22 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Gnome] ]
23 | R:0:0x83:0xc7
24 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Dwarf] ]
25 | R:0:0x83:0xaf
26 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Orc] ]
27 | R:0:0x83:0xb7
28 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Troll] ]
29 | R:0:0x83:0xbf
30 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Dunadan] ]
31 | R:0:0x83:0xa7
32 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE High-Elf] ]
33 | R:0:0x83:0xcf
34 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Kobold] ]
35 | R:0:0x83:0xd7
36 |
37 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Human] ]
38 | R:0:0x83:0x81
39 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Elf] ]
40 | R:0:0x83:0x88
41 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Elf] ]
42 | R:0:0x83:0x91
43 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Hobbit] ]
44 | R:0:0x83:0x98
45 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Gnome] ]
46 | R:0:0x83:0xc1
47 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Dwarf] ]
48 | R:0:0x83:0xa8
49 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Orc] ]
50 | R:0:0x83:0xb1
51 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Troll] ]
52 | R:0:0x83:0xb8
53 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Dunadan] ]
54 | R:0:0x83:0xa1
55 | ?:[AND [EQU $CLASS Mage] [EQU $RACE High-Elf] ]
56 | R:0:0x83:0xc8
57 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Kobold] ]
58 | R:0:0x83:0xd1
59 |
60 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Human] ]
61 | R:0:0x83:0x84
62 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Elf] ]
63 | R:0:0x83:0x8c
64 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Elf] ]
65 | R:0:0x83:0x94
66 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Hobbit] ]
67 | R:0:0x83:0x9c
68 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Gnome] ]
69 | R:0:0x83:0xc4
70 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Dwarf] ]
71 | R:0:0x83:0xac
72 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Orc] ]
73 | R:0:0x83:0xb4
74 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Troll] ]
75 | R:0:0x83:0xbc
76 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Dunadan] ]
77 | R:0:0x83:0xa4
78 | ?:[AND [EQU $CLASS Priest] [EQU $RACE High-Elf] ]
79 | R:0:0x83:0xcc
80 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Kobold] ]
81 | R:0:0x83:0xd4
82 |
83 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Human] ]
84 | R:0:0x83:0x86
85 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Elf] ]
86 | R:0:0x83:0x8e
87 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Elf] ]
88 | R:0:0x83:0x96
89 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Hobbit] ]
90 | R:0:0x83:0x9e
91 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Gnome] ]
92 | R:0:0x83:0xc6
93 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Dwarf] ]
94 | R:0:0x83:0xae
95 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Orc] ]
96 | R:0:0x83:0xb6
97 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Troll] ]
98 | R:0:0x83:0xbe
99 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Dunadan] ]
100 | R:0:0x83:0xa6
101 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE High-Elf] ]
102 | R:0:0x83:0xce
103 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Kobold] ]
104 | R:0:0x83:0xd6
105 |
106 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Human] ]
107 | R:0:0x83:0x85
108 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Elf] ]
109 | R:0:0x83:0x8d
110 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Elf] ]
111 | R:0:0x83:0x95
112 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Hobbit] ]
113 | R:0:0x83:0x9d
114 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Gnome] ]
115 | R:0:0x83:0xc5
116 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Dwarf] ]
117 | R:0:0x83:0xad
118 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Orc] ]
119 | R:0:0x83:0xb5
120 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Troll] ]
121 | R:0:0x83:0xbd
122 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Dunadan] ]
123 | R:0:0x83:0xa5
124 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE High-Elf] ]
125 | R:0:0x83:0xcd
126 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Kobold] ]
127 | R:0:0x83:0xd5
128 |
129 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Human] ]
130 | R:0:0x83:0x83
131 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Elf] ]
132 | R:0:0x83:0x8b
133 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Elf] ]
134 | R:0:0x83:0x93
135 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Hobbit] ]
136 | R:0:0x83:0x9b
137 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Gnome] ]
138 | R:0:0x83:0xc3
139 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Dwarf] ]
140 | R:0:0x83:0xab
141 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Orc] ]
142 | R:0:0x83:0xb3
143 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Troll] ]
144 | R:0:0x83:0xbb
145 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Dunadan] ]
146 | R:0:0x83:0xa3
147 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE High-Elf] ]
148 | R:0:0x83:0xcb
149 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Kobold] ]
150 | R:0:0x83:0xd3
151 |
152 |
--------------------------------------------------------------------------------
/lib/pref/xtra-new.prf:
--------------------------------------------------------------------------------
1 | # File: xtra-new.prf
2 |
3 | #
4 | # This file defines special attr/char mappings for use in "graphics" mode
5 | #
6 | # Edited for use with Adam Bolt's new graphics by Robert Ruehlmann
7 | # < rr9@thangorodrim.net >
8 | #
9 | # See "lib/help/command.txt" and "src/files.c" for more information.
10 | #
11 |
12 |
13 | ##### Remap the player icon #####
14 |
15 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Human] ]
16 | R:0:0x92/0x80
17 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Elf] ]
18 | R:0:0x92/0x81
19 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Elf] ]
20 | R:0:0x92/0x82
21 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Hobbit] ]
22 | R:0:0x92/0x83
23 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Gnome] ]
24 | R:0:0x92/0x84
25 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Dwarf] ]
26 | R:0:0x92/0x85
27 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Orc] ]
28 | R:0:0x92/0x86
29 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Troll] ]
30 | R:0:0x92/0x87
31 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Dunadan] ]
32 | R:0:0x92/0x88
33 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE High-Elf] ]
34 | R:0:0x92/0x89
35 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Kobold] ]
36 | R:0:0x92/0x92
37 |
38 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Human] ]
39 | R:0:0x93/0x80
40 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Elf] ]
41 | R:0:0x93/0x81
42 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Elf] ]
43 | R:0:0x93/0x82
44 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Hobbit] ]
45 | R:0:0x93/0x83
46 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Gnome] ]
47 | R:0:0x93/0x84
48 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Dwarf] ]
49 | R:0:0x93/0x85
50 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Orc] ]
51 | R:0:0x93/0x86
52 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Troll] ]
53 | R:0:0x93/0x87
54 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Dunadan] ]
55 | R:0:0x93/0x88
56 | ?:[AND [EQU $CLASS Mage] [EQU $RACE High-Elf] ]
57 | R:0:0x93/0x89
58 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Kobold] ]
59 | R:0:0x93/0x92
60 |
61 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Human] ]
62 | R:0:0x94/0x80
63 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Elf] ]
64 | R:0:0x94/0x81
65 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Elf] ]
66 | R:0:0x94/0x82
67 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Hobbit] ]
68 | R:0:0x94/0x83
69 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Gnome] ]
70 | R:0:0x94/0x84
71 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Dwarf] ]
72 | R:0:0x94/0x85
73 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Orc] ]
74 | R:0:0x94/0x86
75 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Troll] ]
76 | R:0:0x94/0x87
77 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Dunadan] ]
78 | R:0:0x94/0x88
79 | ?:[AND [EQU $CLASS Priest] [EQU $RACE High-Elf] ]
80 | R:0:0x94/0x89
81 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Kobold] ]
82 | R:0:0x94/0x92
83 |
84 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Human] ]
85 | R:0:0x95/0x80
86 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Elf] ]
87 | R:0:0x95/0x81
88 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Elf] ]
89 | R:0:0x95/0x82
90 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Hobbit] ]
91 | R:0:0x95/0x83
92 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Gnome] ]
93 | R:0:0x95/0x84
94 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Dwarf] ]
95 | R:0:0x95/0x85
96 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Orc] ]
97 | R:0:0x95/0x86
98 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Troll] ]
99 | R:0:0x95/0x87
100 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Dunadan] ]
101 | R:0:0x95/0x88
102 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE High-Elf] ]
103 | R:0:0x95/0x89
104 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Kobold] ]
105 | R:0:0x95/0x92
106 |
107 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Human] ]
108 | R:0:0x96/0x80
109 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Elf] ]
110 | R:0:0x96/0x81
111 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Elf] ]
112 | R:0:0x96/0x82
113 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Hobbit] ]
114 | R:0:0x96/0x83
115 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Gnome] ]
116 | R:0:0x96/0x84
117 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Dwarf] ]
118 | R:0:0x96/0x85
119 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Orc] ]
120 | R:0:0x96/0x86
121 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Troll] ]
122 | R:0:0x96/0x87
123 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Dunadan] ]
124 | R:0:0x96/0x88
125 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE High-Elf] ]
126 | R:0:0x96/0x89
127 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Kobold] ]
128 | R:0:0x96/0x92
129 |
130 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Human] ]
131 | R:0:0x97/0x80
132 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Elf] ]
133 | R:0:0x97/0x81
134 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Elf] ]
135 | R:0:0x97/0x82
136 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Hobbit] ]
137 | R:0:0x97/0x83
138 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Gnome] ]
139 | R:0:0x97/0x84
140 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Dwarf] ]
141 | R:0:0x97/0x85
142 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Orc] ]
143 | R:0:0x97/0x86
144 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Troll] ]
145 | R:0:0x97/0x87
146 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Dunadan] ]
147 | R:0:0x97/0x88
148 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE High-Elf] ]
149 | R:0:0x97/0x89
150 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Kobold] ]
151 | R:0:0x97/0x92
152 |
153 |
--------------------------------------------------------------------------------
/lib/pref/xtra-xxx.prf:
--------------------------------------------------------------------------------
1 | # File: xtra-xxx.prf
2 |
3 | #
4 | # This file defines special attr/char mappings for use in "graphics" mode
5 | #
6 | # See "lib/help/command.txt" and "src/files.c" for more information.
7 | #
8 |
9 |
10 | ##### Remap the player icon #####
11 |
12 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Human] ]
13 | R:0:0x8C/0x80
14 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Elf] ]
15 | R:0:0x8C/0x81
16 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Elf] ]
17 | R:0:0x8C/0x82
18 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Hobbit] ]
19 | R:0:0x8C/0x83
20 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Gnome] ]
21 | R:0:0x8C/0x84
22 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Dwarf] ]
23 | R:0:0x8C/0x85
24 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Orc] ]
25 | R:0:0x8C/0x86
26 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Troll] ]
27 | R:0:0x8C/0x87
28 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Dunadan] ]
29 | R:0:0x8C/0x88
30 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE High-Elf] ]
31 | R:0:0x8C/0x89
32 | ?:[AND [EQU $CLASS Warrior] [EQU $RACE Kobold] ]
33 | R:0:0xA4/0x91
34 |
35 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Human] ]
36 | R:0:0x8C/0x8A
37 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Elf] ]
38 | R:0:0x8C/0x8B
39 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Elf] ]
40 | R:0:0x8C/0x8C
41 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Hobbit] ]
42 | R:0:0x8C/0x8D
43 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Gnome] ]
44 | R:0:0x8C/0x8E
45 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Dwarf] ]
46 | R:0:0x8C/0x8F
47 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Orc] ]
48 | R:0:0x8C/0x90
49 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Troll] ]
50 | R:0:0x8C/0x91
51 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Dunadan] ]
52 | R:0:0x8C/0x92
53 | ?:[AND [EQU $CLASS Mage] [EQU $RACE High-Elf] ]
54 | R:0:0x8C/0x93
55 | ?:[AND [EQU $CLASS Mage] [EQU $RACE Kobold] ]
56 | R:0:0xA5/0x91
57 |
58 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Human] ]
59 | R:0:0x8C/0x94
60 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Elf] ]
61 | R:0:0x8C/0x95
62 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Elf] ]
63 | R:0:0x8C/0x96
64 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Hobbit] ]
65 | R:0:0x8C/0x97
66 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Gnome] ]
67 | R:0:0x8C/0x98
68 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Dwarf] ]
69 | R:0:0x8C/0x99
70 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Orc] ]
71 | R:0:0x8C/0x9A
72 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Troll] ]
73 | R:0:0x8C/0x9B
74 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Dunadan] ]
75 | R:0:0x8C/0x9C
76 | ?:[AND [EQU $CLASS Priest] [EQU $RACE High-Elf] ]
77 | R:0:0x8C/0x9D
78 | ?:[AND [EQU $CLASS Priest] [EQU $RACE Kobold] ]
79 | R:0:0xA6/0x91
80 |
81 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Human] ]
82 | R:0:0x8C/0x9E
83 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Elf] ]
84 | R:0:0x8C/0x9F
85 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Elf] ]
86 | R:0:0x8D/0x80
87 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Hobbit] ]
88 | R:0:0x8D/0x81
89 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Gnome] ]
90 | R:0:0x8D/0x82
91 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Dwarf] ]
92 | R:0:0x8D/0x83
93 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Orc] ]
94 | R:0:0x8D/0x84
95 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Troll] ]
96 | R:0:0x8D/0x85
97 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Dunadan] ]
98 | R:0:0x8D/0x86
99 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE High-Elf] ]
100 | R:0:0x8D/0x87
101 | ?:[AND [EQU $CLASS Rogue] [EQU $RACE Kobold] ]
102 | R:0:0xA7/0x91
103 |
104 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Human] ]
105 | R:0:0x8D/0x88
106 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Elf] ]
107 | R:0:0x8D/0x89
108 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Elf] ]
109 | R:0:0x8D/0x8A
110 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Hobbit] ]
111 | R:0:0x8D/0x8B
112 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Gnome] ]
113 | R:0:0x8D/0x8C
114 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Dwarf] ]
115 | R:0:0x8D/0x8D
116 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Orc] ]
117 | R:0:0x8D/0x8E
118 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Troll] ]
119 | R:0:0x8D/0x8F
120 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Dunadan] ]
121 | R:0:0x8D/0x90
122 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE High-Elf] ]
123 | R:0:0x8D/0x91
124 | ?:[AND [EQU $CLASS Ranger] [EQU $RACE Kobold] ]
125 | R:0:0xA8/0x91
126 |
127 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Human] ]
128 | R:0:0x8D/0x92
129 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Elf] ]
130 | R:0:0x8D/0x93
131 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Elf] ]
132 | R:0:0x8D/0x94
133 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Hobbit] ]
134 | R:0:0x8D/0x95
135 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Gnome] ]
136 | R:0:0x8D/0x96
137 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Dwarf] ]
138 | R:0:0x8D/0x97
139 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Orc] ]
140 | R:0:0x8D/0x98
141 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Troll] ]
142 | R:0:0x8D/0x99
143 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Dunadan] ]
144 | R:0:0x8D/0x9A
145 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE High-Elf] ]
146 | R:0:0x8D/0x9B
147 | ?:[AND [EQU $CLASS Paladin] [EQU $RACE Kobold] ]
148 | R:0:0xA9/0x91
149 |
150 |
--------------------------------------------------------------------------------
/lib/save/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/lib/user/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/lib/xtra/font/10x17.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/10x17.fon
--------------------------------------------------------------------------------
/lib/xtra/font/10x17b.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/10x17b.fon
--------------------------------------------------------------------------------
/lib/xtra/font/10x20.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/10x20.fon
--------------------------------------------------------------------------------
/lib/xtra/font/12x20.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/12x20.fon
--------------------------------------------------------------------------------
/lib/xtra/font/12x20b.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/12x20b.fon
--------------------------------------------------------------------------------
/lib/xtra/font/12x24.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/12x24.fon
--------------------------------------------------------------------------------
/lib/xtra/font/16x25.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/16x25.fon
--------------------------------------------------------------------------------
/lib/xtra/font/16x25b.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/16x25b.fon
--------------------------------------------------------------------------------
/lib/xtra/font/5x8.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/5x8.fon
--------------------------------------------------------------------------------
/lib/xtra/font/6x10.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/6x10.fon
--------------------------------------------------------------------------------
/lib/xtra/font/6x12.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/6x12.fon
--------------------------------------------------------------------------------
/lib/xtra/font/6x13.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/6x13.fon
--------------------------------------------------------------------------------
/lib/xtra/font/6x13b.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/6x13b.fon
--------------------------------------------------------------------------------
/lib/xtra/font/7x13.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/7x13.fon
--------------------------------------------------------------------------------
/lib/xtra/font/7x13b.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/7x13b.fon
--------------------------------------------------------------------------------
/lib/xtra/font/8x13.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/8x13.fon
--------------------------------------------------------------------------------
/lib/xtra/font/8x13b.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/8x13b.fon
--------------------------------------------------------------------------------
/lib/xtra/font/8x13c.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/8x13c.fon
--------------------------------------------------------------------------------
/lib/xtra/font/8x16.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/8x16.fon
--------------------------------------------------------------------------------
/lib/xtra/font/8x16b.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/8x16b.fon
--------------------------------------------------------------------------------
/lib/xtra/font/9x15.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/9x15.fon
--------------------------------------------------------------------------------
/lib/xtra/font/9x15b.fon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/font/9x15b.fon
--------------------------------------------------------------------------------
/lib/xtra/graf/16x16.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/graf/16x16.bmp
--------------------------------------------------------------------------------
/lib/xtra/graf/16x16_microchasm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/graf/16x16_microchasm.png
--------------------------------------------------------------------------------
/lib/xtra/graf/Makefile:
--------------------------------------------------------------------------------
1 | MKPATH=../../../mk/
2 | include $(MKPATH)buildsys.mk
3 |
4 | LIBDATA = 16x16.bmp 16x16.png 32x32.png 8x13.bmp 8x8.bmp 8x8.png backgrnd.bmp mask.bmp
5 | PACKAGE = xtra/graf
6 |
7 |
--------------------------------------------------------------------------------
/lib/xtra/graf/TilePicker.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Ed's Tile Picker
5 |
6 |
84 |
85 |
86 |
87 |
88 | Ed's Tile Picker
89 |
90 |
91 | Options
92 |
93 |
94 |
95 |
96 |
97 | Image
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 | Tile Size
106 |
107 |
108 |
109 | x
110 |
111 | px
112 |
113 |
114 |
115 |
116 | Index Mode
117 |
118 |
119 | Left
120 | to Right
121 | Top Down
122 |
123 | X, Y
124 |
125 |
126 |
127 |
128 | Zero Indexed
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
139 |
140 | Last Tile Selected:
141 | This value is copied into the clipboard if your browser supports this functionality.
142 | Note: You may need to set your browser's zoom level to 100% for the selection to work properly.
143 |
144 |
145 |
147 |
149 |
150 |
151 |
152 |
153 |
154 |
--------------------------------------------------------------------------------
/lib/xtra/graf/graphics.txt:
--------------------------------------------------------------------------------
1 | # File: graphics.txt
2 |
3 | # This file is used to initialize a list of graphics modes
4 |
5 | # === Understanding dungeons.txt ===
6 |
7 | # N: serial number : pref file name
8 | # I: tile width : tile height : tileset file name
9 | # M: menu name
10 | # X: alphblending : start row : end row of double high tiles
11 |
12 | # 'N' indicates the beginning of an entry. The serial number must
13 | # increase for each new item. The pref file name is the name used
14 | # on load to load the right pref file set for this tile set.
15 |
16 | # 'I' is for image information - tile width and height are the dimensions,
17 | # in pixels, of an individual tile in the set. filename is the name of the
18 | # image file to load.
19 |
20 | # 'M' is for menu name - the name the graphics mode is listed under when
21 | # selecting it from a graphical menu.
22 |
23 | # 'X' is for extra information - alpha is a flag if the tileset needs to use
24 | # alpha blending. double high tiles are ones that have twice the tile height
25 | # as a typical tile. start row is the first row that uses double high tiles.
26 | # End row is the last row that uses double high tiles. start row and end row
27 | # must be greater than 0, if double high tiles are used, and refer to the
28 | # bottom half of the double row.
29 |
30 |
31 | N:1:Original Tiles
32 | I:8:8:8x8.png
33 | P:old
34 | X:0:0:0
35 |
36 | N:2:Adam Bolt's tiles
37 | I:16:16:16x16.png
38 | P:new
39 | X:0:0:0
40 |
41 | N:3:David Gervais' tiles
42 | I:32:32:32x32.png
43 | P:david
44 | X:0:0:0
45 |
46 | N:4:Nomad's tiles
47 | I:16:16:8x16.png
48 | P:nomad
49 | X:0:0:0
50 |
51 | N:5:Shockbolt's tiles
52 | I:64:64:64x64.png
53 | P:shock
54 | X:1:29:31
55 |
--------------------------------------------------------------------------------
/lib/xtra/graf/osx_bmp2png.py:
--------------------------------------------------------------------------------
1 | """
2 | Converts a tile set from bmp to png for use with the Mac OS X frontend.
3 |
4 | Usage
5 | python osx_bmp2png.py input_file output_file [options]
6 |
7 | Options
8 | --tcoord hcoord vcoord
9 | Reads the color to be treated as transparent for non-terrain tiles
10 | from the position (hcoord, vcoord) in the tile set. Both coordinates
11 | are non-negative integers indexed from zero. Is overridden by
12 | --transparent if that option is set. When not set, the default is to
13 | read the color to be treated as transparent from (0,0).
14 |
15 | --terrain lx1 ly1 ux1 uy1 ...
16 | Sets bounding boxes for parts of the tile set that are to be treated
17 | as completely opaque (i.e. as background terrain). Each bound box is
18 | given by the coordinates for the lower corner, (lx,ly), and upper
19 | corner, (ux,uy), with ux > lx and uy > ly. If not set, the default
20 | is to use two bounding boxes, (0,0) to (496,16) and (192,192) to
21 | (224,208), which are the terrain tiles in Michrochasm's tile set.
22 |
23 | --transparent red green blue
24 | Sets the color, as RGB values between 0 and 255, which will be treated
25 | as completely transparent for non-terrain tiles. If not set, uses
26 | --tcoord or its default to get the color.
27 |
28 | Example
29 | This is the conversion that was used to ready Microchasm's tile set for
30 | the OS X front end:
31 | python osx_bmp2png.py 16x16.bmp 16x16_microchasm.png
32 | That is equivalent to
33 | python osx_bmp2png.py 16x16.bmp 16x16_microchasm.png --tcoord 0 0 \
34 | --terrain 0 0 496 16 192 192 224 208
35 |
36 | Requirements
37 | argparse, PIL (Python imaging library) or equivalent, and
38 | numpy (1.7 or later)
39 |
40 | For Michrochasm's tile set the conversion is required because
41 | CGImageSourceCreateWithURL() does not handle the bmp format and because
42 | there appears to be no NSCompositingOperation which is equivalent to
43 | 'composite this image with the background treating x as transparent'.
44 | """
45 |
46 | import argparse
47 | import PIL.Image
48 | import numpy
49 |
50 | aparser = argparse.ArgumentParser(description='Converts bmp tile set to png.')
51 | aparser.add_argument('input_file', type=str,
52 | help='the path to the input tile set')
53 | aparser.add_argument('output_file', type=str,
54 | help='the path to the converted tile set')
55 | aparser.add_argument('--tcoord', type=int, nargs=2, default=(0,0),
56 | help='Position to be read for transparent color')
57 | aparser.add_argument('--terrain', type=int, nargs='+',
58 | default=(0,0,496,16,192,192,224,208),
59 | help='Bounding box coordinates for terrain tiles')
60 | aparser.add_argument('--transparent', type=int, nargs=3,
61 | help='RGB value to be treated as transparent')
62 |
63 | args = aparser.parse_args()
64 |
65 | tin = PIL.Image.open(args.input_file)
66 |
67 | if len(args.terrain) % 4 != 0:
68 | raise IndexError('Need four values for each bounding box.')
69 | for i in range(0, len(args.terrain), 4):
70 | if (args.terrain[i] > args.terrain[i + 2] or
71 | args.terrain[i + 1] > args.terrain[i + 3]):
72 | raise RuntimeError('Lower bounding box coordinate exceeds the upper one')
73 | if (args.terrain[i] < 0 or args.terrain[i + 2] > tin.width or
74 | args.terrain[i + 1] < 0 or
75 | args.terrain[i + 3] > tin.height):
76 | raise IndexError('Bounding box outside of image bounds')
77 |
78 | palette = tin.getpalette()
79 |
80 | if args.transparent:
81 | trind = None
82 | trarr = numpy.array(args.transparent)
83 | else:
84 | if (args.tcoord[0] < 0 or args.tcoord[0] >= tin.width or
85 | args.tcoord[1] < 0 or args.tcoord[1] >= tin.height):
86 | raise IndexError('Coordinates for transparent pixel are out of bounds')
87 | if palette:
88 | trind = tin.getpixel(tuple(args.tcoord))
89 | else:
90 | trarr = numpy.array(tin.getpixel(args.tcoord)[0:3])
91 |
92 | # Set up the mask for the portions of the tile set not containing terrain.
93 | arrt = numpy.ones((tin.height, tin.width), dtype=numpy.dtype(bool))
94 | ind0, ind1 = numpy.meshgrid(numpy.linspace(0, tin.height - 1, tin.height),
95 | numpy.linspace(0, tin.width - 1, tin.width), indexing='ij')
96 | for i in range(0, len(args.terrain), 4):
97 | arrt = numpy.logical_and(arrt, numpy.logical_or(numpy.logical_or(
98 | ind1 < args.terrain[i], ind0 < args.terrain[i + 1]),
99 | numpy.logical_or(ind1 >= args.terrain[i + 2],
100 | ind0 >= args.terrain[i + 3])))
101 | del ind0, ind1
102 |
103 | arrin = numpy.array(tin)
104 | arrout = numpy.empty((tin.height,tin.width,4), dtype='u1')
105 | if palette:
106 | parr = numpy.reshape(numpy.array(palette), (len(palette) // 3, 3))
107 | arrout[:,:,0:3] = parr[arrin]
108 | if trind is not None:
109 | arrout[:,:,3] = numpy.where(
110 | numpy.logical_and(arrt, arrin == trind),
111 | numpy.zeros((tin.height, tin.width), dtype='u1'),
112 | 255 * numpy.ones((tin.height, tin.width), dtype='u1'))
113 | else:
114 | arrout[:,:,3] = numpy.where(
115 | numpy.logical_and(arrt, numpy.logical_and(
116 | arrout[:,:,0] == trarr[0], numpy.logical_and(
117 | arrout[:,:,1] == trarr[1], arrout[:,:,2] == trarr[2]))),
118 | numpy.zeros((tin.height, tin.width), dtype='u1'),
119 | 255 * numpy.ones((tin.height, tin.width), dtype='u1'))
120 | else:
121 | arrout[:,:,0:3] = arrin[:,:,0:3]
122 | arrout[:,:,3] = numpy.where(
123 | numpy.logical_and(arrt, numpy.logical_and(
124 | arrin[:,:,0] == trarr[0], numpy.logical_and(
125 | arrin[:,:,1] == trarr[1], arrin[:,:,2] == trarr[2]))),
126 | numpy.zeros((tin.height, tin.width), dtype='u1'),
127 | 255 * numpy.ones((tin.height, tin.width), dtype='u1'))
128 |
129 | tout = PIL.Image.fromarray(arrout)
130 | tout.save(args.output_file)
131 |
--------------------------------------------------------------------------------
/lib/xtra/sound/breath.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/breath.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/clunk.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/clunk.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/death.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/death.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/destroy.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/destroy.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/drop.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/drop.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/eat.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/eat.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/flee.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/flee.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/hallu.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/hallu.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/hit.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/hit.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/hit1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/hit1.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/kill.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/kill.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/kill1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/kill1.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/level.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/level.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/miss.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/miss.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/miss1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/miss1.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/money.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/money.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/opendoor.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/opendoor.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/shutdoor.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/shutdoor.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/sound.cfg:
--------------------------------------------------------------------------------
1 | # sound.cfg
2 | #
3 | # Configuration file for the Angband sound events
4 | #
5 | # The format is:
6 | # =
7 | #
8 | # Example:
9 | # hit = hit.wav hit1.wav
10 | #
11 | # Look at the definition of "angband_sound_name" in variable.c for a complete list of
12 | # all the available event names.
13 |
14 | [Sound]
15 | hit = hit.wav drop.wav hit1.wav
16 | miss = miss.wav miss1.wav
17 | flee = flee.wav
18 | drop = clunk.wav
19 | kill = kill.wav destroy.wav kill1.wav
20 | level = level.wav
21 | death = death.wav
22 | study =
23 | teleport =
24 | shoot =
25 | quaff =
26 | zap =
27 | walk =
28 | tpother =
29 | hitwall =
30 | eat = eat.wav
31 | store1 = money.wav
32 | store2 = money.wav
33 | store3 = money.wav
34 | store4 = money.wav
35 | dig = thump.wav
36 | opendoor = opendoor.wav
37 | shutdoor = shutdoor.wav
38 | tplevel = teleport.wav
39 |
40 |
--------------------------------------------------------------------------------
/lib/xtra/sound/thump.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/thump.wav
--------------------------------------------------------------------------------
/lib/xtra/sound/vomit.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/sound/vomit.wav
--------------------------------------------------------------------------------
/lib/xtra/tutorial:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/lib/xtra/tutorial
--------------------------------------------------------------------------------
/msvc2022/sil-q.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29509.3
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sil-q", "sil-q.vcxproj", "{78AC13C0-E998-463E-8473-EF05CA20C3AD}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {78AC13C0-E998-463E-8473-EF05CA20C3AD}.Debug|x64.ActiveCfg = Debug|x64
17 | {78AC13C0-E998-463E-8473-EF05CA20C3AD}.Debug|x64.Build.0 = Debug|x64
18 | {78AC13C0-E998-463E-8473-EF05CA20C3AD}.Debug|x86.ActiveCfg = Debug|Win32
19 | {78AC13C0-E998-463E-8473-EF05CA20C3AD}.Debug|x86.Build.0 = Debug|Win32
20 | {78AC13C0-E998-463E-8473-EF05CA20C3AD}.Release|x64.ActiveCfg = Release|x64
21 | {78AC13C0-E998-463E-8473-EF05CA20C3AD}.Release|x64.Build.0 = Release|x64
22 | {78AC13C0-E998-463E-8473-EF05CA20C3AD}.Release|x86.ActiveCfg = Release|Win32
23 | {78AC13C0-E998-463E-8473-EF05CA20C3AD}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {8195BA57-139F-4CFD-909A-2D3DB9713966}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/silg:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Describe attempt
4 | echo "Launching Sil..."
5 | sleep 2
6 |
7 | # Main window
8 | SIL_X11_FONT_0=12x24; export SIL_X11_FONT_0
9 | SIL_X11_AT_X_0=0; export SIL_X11_AT_X_0
10 | SIL_X11_AT_Y_0=0; export SIL_X11_AT_Y_0
11 |
12 | # Inventory window
13 | SIL_X11_FONT_1=7x13; export SIL_X11_FONT_1
14 | SIL_X11_AT_X_1=1025; export SIL_X11_AT_X_1
15 | SIL_X11_AT_Y_1=268; export SIL_X11_AT_Y_1
16 | SIL_X11_COLS_1=70; export SIL_X11_COLS_1
17 | SIL_X11_ROWS_1=25; export SIL_X11_ROWS_1
18 |
19 | # Equipment window
20 | SIL_X11_FONT_2=7x13; export SIL_X11_FONT_2
21 | SIL_X11_AT_X_2=1025; export SIL_X11_AT_X_2
22 | SIL_X11_AT_Y_2=0; export SIL_X11_AT_Y_2
23 | SIL_X11_COLS_2=70; export SIL_X11_COLS_2
24 | SIL_X11_ROWS_2=16; export SIL_X11_ROWS_2
25 |
26 | # Combat Rolls window
27 | SIL_X11_FONT_3=7x13; export SIL_X11_FONT_3
28 | SIL_X11_AT_X_3=1025; export SIL_X11_AT_X_3
29 | SIL_X11_AT_Y_3=625; export SIL_X11_AT_Y_3
30 | SIL_X11_COLS_3=70; export SIL_X11_COLS_3
31 | SIL_X11_ROWS_3=21; export SIL_X11_ROWS_3
32 |
33 | # Monster Recall window
34 | SIL_X11_FONT_4=7x13; export SIL_X11_FONT_4
35 | SIL_X11_AT_X_4=0; export SIL_X11_AT_X_4
36 | SIL_X11_AT_Y_4=625; export SIL_X11_AT_Y_4
37 | SIL_X11_COLS_4=137; export SIL_X11_COLS_4
38 | SIL_X11_ROWS_4=21; export SIL_X11_ROWS_4
39 |
40 | # Could add more windows here...
41 |
42 | # Gamma correction
43 | SIL_X11_GAMMA=142; export SIL_X11_GAMMA
44 |
45 | # Launch SIL
46 | ./sil -mx11 -- -g -b -n5 &
47 |
--------------------------------------------------------------------------------
/silx:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Describe attempt
4 | echo "Launching Sil..."
5 | sleep 2
6 |
7 | # Main window
8 | SIL_X11_FONT_0=10x20; export SIL_X11_FONT_0
9 | SIL_X11_AT_X_0=0; export SIL_X11_AT_X_0
10 | SIL_X11_AT_Y_0=0; export SIL_X11_AT_Y_0
11 |
12 | # Inventory window
13 | SIL_X11_FONT_1=6x12; export SIL_X11_FONT_1
14 | SIL_X11_AT_X_1=810; export SIL_X11_AT_X_1
15 | SIL_X11_AT_Y_1=217; export SIL_X11_AT_Y_1
16 | SIL_X11_COLS_1=70; export SIL_X11_COLS_1
17 | SIL_X11_ROWS_1=25; export SIL_X11_ROWS_1
18 |
19 | # Equipment window
20 | SIL_X11_FONT_2=6x12; export SIL_X11_FONT_2
21 | SIL_X11_AT_X_2=810; export SIL_X11_AT_X_2
22 | SIL_X11_AT_Y_2=0; export SIL_X11_AT_Y_2
23 | SIL_X11_COLS_2=70; export SIL_X11_COLS_2
24 | SIL_X11_ROWS_2=16; export SIL_X11_ROWS_2
25 |
26 | # Combat Rolls window
27 | SIL_X11_FONT_3=6x12; export SIL_X11_FONT_3
28 | SIL_X11_AT_X_3=810; export SIL_X11_AT_X_3
29 | SIL_X11_AT_Y_3=545; export SIL_X11_AT_Y_3
30 | SIL_X11_COLS_3=70; export SIL_X11_COLS_3
31 | SIL_X11_ROWS_3=18; export SIL_X11_ROWS_3
32 |
33 | # Monster Recall window
34 | SIL_X11_FONT_4=6x12; export SIL_X11_FONT_4
35 | SIL_X11_AT_X_4=0; export SIL_X11_AT_X_4
36 | SIL_X11_AT_Y_4=519; export SIL_X11_AT_Y_4
37 | SIL_X11_COLS_4=133; export SIL_X11_COLS_4
38 | SIL_X11_ROWS_4=21; export SIL_X11_ROWS_4
39 |
40 | # Could add more windows here...
41 |
42 | # Gamma correction
43 | SIL_X11_GAMMA=142; export SIL_X11_GAMMA
44 |
45 | # Launch SIL
46 | ./sil -mx11 -- -n5 &
--------------------------------------------------------------------------------
/src/.clang-format:
--------------------------------------------------------------------------------
1 | BasedOnStyle: WebKit
2 |
3 | # relies on header ordering, terrible ancient codebase
4 | SortIncludes: false
5 |
6 | BreakBeforeBraces: Allman
7 |
8 | ColumnLimit: 80
9 |
10 |
--------------------------------------------------------------------------------
/src/Data.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/src/Data.icns
--------------------------------------------------------------------------------
/src/Edit.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/src/Edit.icns
--------------------------------------------------------------------------------
/src/Makefile.bcc:
--------------------------------------------------------------------------------
1 | ###################################################################
2 | #
3 | # Makefile.bcc - Sil makefile for Borland C++ 5.5 (Win32)
4 | #
5 | ###################################################################
6 |
7 |
8 | ###################################################################
9 | #
10 | # Borland specific directives ---
11 | #
12 | .AUTODEPEND
13 |
14 | ###################################################################
15 | #
16 | # Set tool and version names:
17 |
18 | CC = bcc32
19 | LINKER = ilink32
20 | RC = brc32
21 |
22 | ###################################################################
23 | #
24 | # Name of the *.exe-file
25 |
26 | EXE_FILE = sil.exe
27 |
28 |
29 | ###################################################################
30 | #
31 | # Debug mode (un-comment for debugging)
32 |
33 | # DBGOPT= -v -N -x -xp
34 |
35 |
36 | ###################################################################
37 | #
38 | # Set any compiler options
39 |
40 | CCOPTS = -Hc -tW -lGn -e$(EXE_FILE) -w- \
41 | -D_WIN32_WINNT=0x0400 -DWINVER=0x0400
42 |
43 | # Compile flags:
44 | CCFLAGS= $(CCOPTS) $(DBGOPT)
45 |
46 |
47 | ######################## Targets ##################################
48 |
49 | OBJ = \
50 | main-win.obj readdib.obj \
51 | birth.obj cave.obj cmd1.obj cmd2.obj \
52 | cmd3.obj cmd4.obj cmd5.obj cmd6.obj \
53 | dungeon.obj files.obj generate.obj init1.obj \
54 | init2.obj randart.obj load.obj \
55 | melee1.obj melee2.obj monster1.obj monster2.obj \
56 | object1.obj object2.obj squelch.obj save.obj spells1.obj \
57 | spells2.obj tables.obj util.obj \
58 | variable.obj wizard1.obj wizard2.obj xtra1.obj \
59 | xtra2.obj z-form.obj z-rand.obj z-term.obj \
60 | z-util.obj z-virt.obj \
61 | use-obj.obj \
62 | obj-info.obj
63 |
64 | all : $(EXE_FILE)
65 |
66 | clean:
67 | -@if exist *.obj del *.obj >nul
68 | -@if exist *.exe del *.exe >nul
69 | -@if exist *.res del *.res >nul
70 | -@if exist *.tds del *.tds >nul
71 | -@if exist *.ilc del *.ilc >nul
72 | -@if exist *.ild del *.ild >nul
73 | -@if exist *.ilf del *.ilf >nul
74 | -@if exist *.ils del *.ils >nul
75 |
76 | install: $(EXE_FILE)
77 | copy $(EXE_FILE) ..
78 |
79 |
80 | ########################### Explicit Rules ########################
81 | $(EXE_FILE): $(OBJ) sil.res
82 | $(LINKER) -aa -x $(OBJ) c0w32.obj, $(EXE_FILE),, cw32.lib import32.lib,, sil.res
83 |
84 | sil.res: sil.rc
85 | $(RC) -r sil.rc
86 |
87 |
88 | ########################### Implicit Rules ########################
89 | .c.obj:
90 | $(CC) $(CCFLAGS) -c {$? }
91 |
92 | .obj.exe:
93 | $(CC) $(CCFLAGS) $<
94 |
--------------------------------------------------------------------------------
/src/Makefile.cocoa:
--------------------------------------------------------------------------------
1 | # File: Makefile.cocoa
2 |
3 | # This is a Makefile for Mac OS X Cocoa port of Angband.
4 | #
5 | # Based on Makefile.osx
6 |
7 | # default target
8 | all: install
9 |
10 | # settings
11 | CC = clang
12 | LD = ld
13 | OPT ?= -O2
14 |
15 | ARCHS = x86_64
16 | ARCHFLAGS = $(addprefix -arch ,$(ARCHS))
17 | WARNINGS = -W -Wall -Wno-unused-parameter -Wno-missing-field-initializers
18 | JUST_C = -std=c99 -Wdeclaration-after-statement
19 | OBJ_CFLAGS = -std=c99 -x objective-c -fobjc-arc
20 | CFLAGS = -g -I. $(WARNINGS) $(OPT) -DMACH_O_CARBON -DCOCOA -DUSE_PRIVATE_SAVE_PATH -DPRIVATE_USER_PATH -DRUNTIME_PRIVATE_USER_PATH -DHAVE_MKSTEMP \
21 | -fno-stack-protector -mmacosx-version-min=10.6 $(ARCHFLAGS)
22 | LIBS = -framework Cocoa
23 | # Fix for bug #1663: Set the deployment target via environment variable
24 | # for the final link command. See http://grauonline.de/wordpress/?p=71
25 | # or http://stackoverflow.com/questions/5509885/creating-app-for-old-mac-from-new-mac-machine
26 | DEPLOYMENT_TARGET = MACOSX_DEPLOYMENT_TARGET=10.5
27 |
28 | # Import user prefs
29 | # If you don't want to edit this file, put your module redefinitions
30 | # and build flags in "./config"
31 | -include config
32 |
33 | # Check for autoconf.h; do not warn on nonexistence
34 | autoconf= $(wildcard autoconf.h)
35 | ifneq ($(autoconf),)
36 | CFLAGS += -DHAVE_CONFIG_H
37 | endif
38 |
39 | # Note that Makefile.inc sets VERSION, and so we must run version.sh after
40 | # including Makefile.inc
41 | include Makefile.inc
42 |
43 | APPNAME = $(NAME).app
44 | EXE = $(PROG)
45 |
46 | OBJS = $(BASEOBJS)
47 | OSX_OBJS = main-cocoa.o
48 |
49 |
50 |
51 | #
52 | # Build the "Angband" program
53 | #
54 |
55 |
56 | $(EXE).o: $(OBJS)
57 | @for A in $(ARCHS); do \
58 | printf "%10s %-20s\n" LD $@.$$A; \
59 | $(LD) -r -arch $$A -o $@.$$A $(OBJS); \
60 | LIPO_ARGS="$$LIPO_ARGS -arch $$A $@.$$A"; \
61 | done; \
62 | lipo $$LIPO_ARGS -create -output $@
63 |
64 | $(EXE): $(EXE).o $(OSX_OBJS)
65 | $(DEPLOYMENT_TARGET) $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXE) $(EXE).o $(OSX_OBJS) $(LIBS)
66 |
67 |
68 | #
69 | # Clean up old junk
70 | #
71 |
72 | clean:
73 | -rm -f $(OBJS) $(EXE) $(addprefix $(EXE).o.,$(ARCHS)) $(EXE).o $(OSX_OBJS)
74 |
75 |
76 | #
77 | # Basic build rules and dependencies
78 | #
79 |
80 | main-cocoa.o : main-cocoa.m
81 | @printf "%10s %-20s (objective-c)\n" CC $<
82 | $(CC) $(CFLAGS) $(OBJ_CFLAGS) -c -o $@ $<
83 | %.o : %.c
84 | @printf "%10s %-20s\n" CC $<
85 | $(CC) $(JUST_C) $(CFLAGS) -c -o $@ $<
86 |
87 |
88 | #
89 | # Installation.
90 | # Application bundle -- a directory looking like an ordinary application
91 | #
92 |
93 | # Bundle of the game (it must be a directory whose name ends in ".app")
94 | APPBNDL = ../$(APPNAME)
95 |
96 | # A bundle must have these subdirectories
97 | APPCONT = $(APPBNDL)/Contents
98 | APPBIN = $(APPCONT)/MacOS
99 | APPRES = $(APPCONT)/Resources
100 |
101 | # Auxiliary files. Please note that it still uses resouce fork based
102 | # resources for menus, dialogues and sounds, so that it isn't safe to use
103 | # utilities that doesn't understand them (virtually all Un*x commands) to
104 | # copy or archive the application.
105 | #
106 | # The graphics tiles have been moved out of the resource fork, but, again,
107 | # it isn't generally safe just to convert GIF or BMP files to PNG, because
108 | # the Mac OS takes dpi values stored in various images quite seriously.
109 | # Almost all tilesets for *band requires adjustment, with the sole exception
110 | # of 8x8.png for Vanilla. Make sure setting dpi to 72, *not* preserving
111 | # the actual size of image. When you have them ready, put them in
112 | # the lib/xtra/graf directory and rebuild.
113 | PLIST = cocoa/Sil-Cocoa.xml
114 |
115 | ICONFILES = cocoa/Sil_Icons.icns cocoa/Save.icns cocoa/Edit.icns cocoa/Data.icns
116 |
117 | install: $(EXE) $(ICONFILES) $(PLIST)
118 | @echo making directories...
119 | @mkdir -p $(APPBNDL)
120 | @mkdir -p $(APPCONT)
121 | @mkdir -p $(APPBIN)
122 | @mkdir -p $(APPRES)
123 | @mkdir -p $(APPRES)/en.lproj
124 | @mkdir -p $(APPRES)/lib/docs
125 | @mkdir -p $(APPRES)/lib/edit
126 | @mkdir -p $(APPRES)/lib/pref
127 | @mkdir -p $(APPRES)/lib/xtra
128 | @mkdir -p $(APPRES)/lib/xtra/graf
129 |
130 | @echo copying files...
131 | @cp ../lib/docs/*.txt $(APPRES)/lib/docs
132 | @cp ../lib/edit/*.txt $(APPRES)/lib/edit
133 | @cp ../lib/pref/*.prf $(APPRES)/lib/pref
134 | @cp ../lib/xtra/tutorial $(APPRES)/lib/xtra
135 | @cp ../lib/xtra/graf/16x16_microchasm.png $(APPRES)/lib/xtra/graf
136 |
137 | install -m 755 $(EXE) $(APPBIN)
138 | install -m 644 $(ICONFILES) $(APPRES)
139 | cp cocoa/en.lproj/MainMenu.nib $(APPRES)/en.lproj
140 | sed -e 's/\$$VERSION\$$/$(VERSION)/' -e 's/\$$COPYRIGHT\$$/$(COPYRIGHT)/' \
141 | -e 's/\$$NAME\$$/$(NAME)/' -e 's/\$$EXECUTABLE\$$/$(EXE)/' \
142 | $(PLIST) > $(APPCONT)/Info.plist
143 |
144 | SetFile -a B $(APPBNDL)
145 |
146 |
147 | vars:
148 | @echo LDFLAGS = $(LDFLAGS)
149 | @echo CFLAGS = $(CFLAGS)
150 | @echo BASEOBJS = $(BASEOBJS)
151 |
152 |
153 |
154 | PACKAGE_NAME = $(NAME)-$(VERSION)
155 |
156 | # In the unlikely event that tar+zip isn't enough...
157 |
158 | dist: install
159 | @rm -rf disttemp*
160 | mkdir disttemp
161 | cp -R -p "$(APPBNDL)" disttemp
162 | SetFile -a B disttemp/$(APPNAME)
163 | find .. -name '*.pdf' -depth 1 -print0 | xargs -0 -J % cp -p % disttemp
164 |
165 | @-rm ../"$(PACKAGE_NAME)-osx.dmg"
166 |
167 | hdiutil create -quiet -fs HFS+ -volname $(PACKAGE_NAME) -srcfolder disttemp disttemp.dmg
168 | hdiutil convert disttemp.dmg -quiet -format UDZO -imagekey zlib-level=6 -o ../"$(PACKAGE_NAME)-osx.dmg"
169 |
170 | rm -rf disttemp*
171 |
172 | tests:
173 | $(MAKE) -C tests all CFLAGS="-I.. $(CFLAGS)" LDFLAGS="$(LIBS)" DEFAULT_CONFIG_PATH=../lib
174 |
175 | test-clean:
176 | $(MAKE) -C tests clean
177 |
178 | .PHONY : tests test-clean
179 |
--------------------------------------------------------------------------------
/src/Makefile.cyg:
--------------------------------------------------------------------------------
1 | # This is a makefile for the Cygwin tools which may
2 | # be downloaded by following the links from the URL:
3 | # http://sources.redhat.com/cygwin/
4 |
5 | #
6 | # Standard defines
7 | #
8 |
9 | CC = gcc
10 | WRES = windres
11 | LIBS = -s -mwindows -e _mainCRTStartup -lwinmm -lmsimg32
12 | CFLAGS = -Wall -O2 -fno-strength-reduce -DWINDOWS
13 |
14 | EXOBJS = \
15 | sil.res \
16 | birth.o \
17 | cave.o \
18 | cmd1.o \
19 | cmd2.o \
20 | cmd3.o \
21 | cmd4.o \
22 | cmd5.o \
23 | cmd6.o \
24 | dungeon.o \
25 | files.o \
26 | generate.o \
27 | init1.o \
28 | init2.o \
29 | load.o \
30 | main-win.o \
31 | melee1.o \
32 | melee2.o \
33 | monster1.o \
34 | monster2.o \
35 | obj-info.o \
36 | object1.o \
37 | object2.o \
38 | randart.o \
39 | readdib.o \
40 | save.o \
41 | spells1.o \
42 | spells2.o \
43 | tables.o \
44 | util.o \
45 | variable.o \
46 | wizard1.o \
47 | wizard2.o \
48 | squelch.o \
49 | xtra1.o \
50 | xtra2.o \
51 | z-form.o \
52 | z-rand.o \
53 | z-term.o \
54 | z-util.o \
55 | z-virt.o \
56 | use-obj.o \
57 |
58 | HDRS = \
59 | h-basic.h \
60 | h-define.h h-type.h \
61 | h-system.h h-config.h
62 |
63 |
64 | INCS = \
65 | angband.h \
66 | config.h defines.h \
67 | types.h externs.h \
68 | z-term.h z-rand.h \
69 | z-util.h z-virt.h \
70 | z-form.h $(HDRS)
71 |
72 |
73 | #
74 | # Targets
75 | #
76 |
77 |
78 | default: sil
79 |
80 | install: sil movebin cleanobjs lineendings
81 |
82 | movebin:
83 | mv -f sil.exe ../sil.exe
84 |
85 | lineendings:
86 | ./unix2doslib
87 |
88 | cleanobjs:
89 | rm -f $(EXOBJS)
90 |
91 | cleanbin:
92 | rm -f sil.exe
93 |
94 | clean: cleanobjs cleanbin
95 |
96 |
97 |
98 | #
99 | # Dependency rules
100 | #
101 |
102 | sil: $(EXOBJS)
103 | $(CC) -o sil $(EXOBJS) $(INCDIRS) $(LIBDIRS) $(LIBS)
104 |
105 |
106 | #
107 | # Compiling sil.rc
108 |
109 | sil.res : sil.rc
110 | $(WRES) $< -O coff -F pe-i386 -o $@
111 |
112 |
113 | #
114 | # Compiling objects
115 | #
116 |
117 | birth.o: birth.c $(INCS)
118 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
119 |
120 | cave.o: cave.c $(INCS)
121 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
122 |
123 | cmd1.o: cmd1.c $(INCS)
124 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
125 |
126 | cmd2.o: cmd2.c $(INCS)
127 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
128 |
129 | cmd3.o: cmd3.c $(INCS)
130 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
131 |
132 | cmd4.o: cmd4.c $(INCS)
133 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
134 |
135 | cmd5.o: cmd5.c $(INCS)
136 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
137 |
138 | cmd6.o: cmd6.c $(INCS)
139 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
140 |
141 | dungeon.o: dungeon.c $(INCS)
142 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
143 |
144 | files.o: files.c $(INCS)
145 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
146 |
147 | generate.o: generate.c $(INCS)
148 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
149 |
150 | init1.o: init1.c $(INCS) init.h
151 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
152 |
153 | init2.o: init2.c $(INCS) init.h
154 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
155 |
156 | load.o: load.c $(INCS) init.h
157 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
158 |
159 | main.o: main.c $(INCS)
160 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
161 |
162 | melee1.o: melee1.c $(INCS)
163 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
164 |
165 | main-win.o: main-win.c $(INCS)
166 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
167 |
168 | melee2.o: melee2.c $(INCS)
169 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
170 |
171 | monster1.o: monster1.c $(INCS)
172 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
173 |
174 | monster2.o: monster2.c $(INCS)
175 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
176 |
177 | obj-info.o: obj-info.c $(INCS)
178 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
179 |
180 | object1.o: object1.c $(INCS)
181 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
182 |
183 | object2.o: object2.c $(INCS)
184 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
185 |
186 | randart.o: randart.c $(INCS) init.h
187 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
188 |
189 | #
190 | # Note the additional -DNEAR= flag to cope with the 'NEAR'
191 | # keyword used in readdib.c
192 | #
193 |
194 | readdib.o: readdib.c readdib.h
195 | $(CC) $(CFLAGS) -DNEAR= $(INCDIRS) -c -o $@ $<
196 |
197 | save.o: save.c $(INCS)
198 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
199 |
200 | spells1.o: spells1.c $(INCS)
201 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
202 |
203 | spells2.o: spells2.c $(INCS)
204 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
205 |
206 | tables.o: tables.c $(INCS)
207 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
208 |
209 | use-obj.o: use-obj.c $(INCS)
210 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
211 |
212 | util.o: util.c $(INCS)
213 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
214 |
215 | variable.o: variable.c $(INCS)
216 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
217 |
218 | wizard1.o: wizard1.c $(INCS)
219 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
220 |
221 | wizard2.o: wizard2.c $(INCS)
222 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
223 |
224 | squelch.o: squelch.c $(INCS)
225 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
226 |
227 | xtra1.o: xtra1.c $(INCS)
228 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
229 |
230 | xtra2.o: xtra2.c $(INCS)
231 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
232 |
233 | z-form.o: z-form.c $(HDRS) z-form.h z-util.h z-virt.h
234 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
235 |
236 | z-rand.o: z-rand.c $(HDRS) z-rand.h
237 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
238 |
239 | z-term.o: z-term.c $(HDRS) z-term.h z-virt.h
240 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
241 |
242 | z-util.o: z-util.c $(HDRS) z-util.h
243 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
244 |
245 | z-virt.o: z-virt.c $(HDRS) z-virt.h z-util.h
246 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
247 |
248 | .c.o:
249 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
250 |
251 |
--------------------------------------------------------------------------------
/src/Makefile.dos:
--------------------------------------------------------------------------------
1 | # File: Makefile.dos
2 |
3 | #
4 | # Makefile support for "main-dos.c" and "main-ibm.c"
5 | #
6 | # See "main-dos.c" and "main-ibm.c" for more information.
7 | #
8 |
9 |
10 | #
11 | # Basic definitions
12 | #
13 |
14 | # Objects
15 | OBJS = \
16 | main.o \
17 | main-dos.o \
18 | main-ibm.o \
19 | birth.o \
20 | cave.o \
21 | cmd1.o \
22 | cmd2.o \
23 | cmd3.o \
24 | cmd4.o \
25 | cmd5.o \
26 | cmd6.o \
27 | dungeon.o \
28 | files.o \
29 | generate.o \
30 | init1.o \
31 | init2.o \
32 | load.o \
33 | melee1.o \
34 | melee2.o \
35 | monster1.o \
36 | monster2.o \
37 | obj-info.o \
38 | object1.o \
39 | object2.o \
40 | randart.o \
41 | save.o \
42 | spells1.o \
43 | spells2.o \
44 | squelch.o \
45 | tables.o \
46 | util.o \
47 | variable.o \
48 | wizard1.o \
49 | wizard2.o \
50 | xtra1.o \
51 | xtra2.o \
52 | z-term.o \
53 | z-rand.o \
54 | z-form.o \
55 | z-virt.o \
56 | z-util.o \
57 | use-obj.o \
58 |
59 | # Compiler
60 | CC = gcc
61 |
62 | # Compiler flags
63 | CFLAGS = -Wall -O2 -fno-strength-reduce -s -DUSE_DOS -DUSE_IBM \
64 | -DUSE_BACKGROUND
65 |
66 | # Libraries
67 | LIBS = -lpc -lalleg
68 |
69 |
70 | #
71 | # Targets
72 | #
73 |
74 | default: sil.exe
75 |
76 | install: sil.exe
77 | copy sil.exe ..
78 |
79 | all: sil.exe
80 | @echo All done. Use 'make install' to install.
81 |
82 |
83 | #
84 | # Link executables
85 | #
86 |
87 | sil.exe: $(OBJS)
88 | $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
89 |
90 |
91 | #
92 | # Compile source files
93 | #
94 |
95 | .c.o:
96 | $(CC) $(CFLAGS) -c -o $@ $<
97 |
98 |
99 |
100 | #
101 | # Clean up
102 | #
103 |
104 | clean:
105 | del *.o
106 |
107 | cleanall: clean
108 | del *.exe
109 |
--------------------------------------------------------------------------------
/src/Makefile.gtk:
--------------------------------------------------------------------------------
1 | # File: Makefile.gtk
2 |
3 | #
4 | # The "source" and "object" files.
5 | #
6 |
7 | SRCS = \
8 | z-util.c z-virt.c z-form.c z-rand.c z-term.c \
9 | variable.c tables.c util.c cave.c \
10 | object1.c object2.c monster1.c monster2.c \
11 | xtra1.c xtra2.c spells1.c spells2.c \
12 | melee1.c melee2.c save.c files.c \
13 | cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c \
14 | birth.c load.c \
15 | wizard1.c wizard2.c squelch.c \
16 | generate.c dungeon.c init1.c init2.c randart.c \
17 | main-gtk.c maid-x11.c main.c \
18 | use-obj.c \
19 | obj-info.c
20 |
21 | OBJS = \
22 | z-util.o z-virt.o z-form.o z-rand.o z-term.o \
23 | variable.o tables.o util.o cave.o \
24 | object1.o object2.o monster1.o monster2.o \
25 | xtra1.o xtra2.o spells1.o spells2.o \
26 | melee1.o melee2.o save.o files.o \
27 | cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o \
28 | birth.o load.o \
29 | wizard1.o wizard2.o squelch.o \
30 | generate.o dungeon.o init1.o init2.o randart.o \
31 | main-gtk.o maid-x11.o main.o \
32 | use-obj.o \
33 | obj-info.o \
34 |
35 | #
36 | # This is my compiler of choice, it seems to work most everywhere.
37 | #
38 | CC = gcc
39 |
40 |
41 | ##
42 | ## Compile for Linux
43 | ##
44 | CFLAGS = -Wall -O2 `gtk-config --cflags` \
45 | -D"USE_GTK" -g
46 | LIBS = `gtk-config --libs`
47 |
48 | #
49 | # Default target.
50 | #
51 | all: sil
52 |
53 |
54 | #
55 | # Install the game.
56 | #
57 |
58 | install: sil
59 | cp sil ..
60 |
61 |
62 | #
63 | # Build the "Sil" program
64 | #
65 |
66 | sil: $(OBJS)
67 | $(CC) $(CFLAGS) $(LDFLAGS) -o sil $(OBJS) $(LIBS)
68 |
69 |
70 | #
71 | # Clean up old junk
72 | #
73 |
74 | clean:
75 | -rm -f *.o sil
76 |
77 |
78 | #
79 | # Generate dependencies automatically
80 | #
81 |
82 | depend:
83 | makedepend -D__MAKEDEPEND__ $(SRCS)
84 |
85 |
86 |
87 | #
88 | # Hack -- some file dependencies
89 | #
90 |
91 | HDRS = \
92 | h-basic.h \
93 | h-define.h h-type.h h-system.h h-config.h
94 |
95 | INCS = \
96 | angband.h \
97 | config.h defines.h types.h externs.h \
98 | z-term.h z-rand.h z-util.h z-virt.h z-form.h $(HDRS)
99 |
100 |
101 | birth.o: birth.c $(INCS)
102 | cave.o: cave.c $(INCS)
103 | cmd1.o: cmd1.c $(INCS)
104 | cmd2.o: cmd2.c $(INCS)
105 | cmd3.o: cmd3.c $(INCS)
106 | cmd4.o: cmd4.c $(INCS)
107 | cmd5.o: cmd5.c $(INCS)
108 | cmd6.o: cmd6.c $(INCS)
109 | dungeon.o: dungeon.c $(INCS)
110 | files.o: files.c $(INCS)
111 | generate.o: generate.c $(INCS)
112 | init1.o: init1.c $(INCS) init.h
113 | init2.o: init2.c $(INCS) init.h
114 | load.o: load.c $(INCS) init.h
115 | maid-x11.o: maid-x11.c $(INCS) maid-x11.h
116 | main-gcu.o: main-gcu.c $(INCS) main.h
117 | main-gtk.o: main-gtk.c $(INCS) main.h maid-x11.h
118 | main.o: main.c $(INCS) main.h
119 | melee1.o: melee1.c $(INCS)
120 | melee2.o: melee2.c $(INCS)
121 | monster1.o: monster1.c $(INCS)
122 | monster2.o: monster2.c $(INCS)
123 | obj-info.o: obj-info.c $(INCS)
124 | object1.o: object1.c $(INCS)
125 | object2.o: object2.c $(INCS)
126 | randart.o: randart.c $(INCS) init.h
127 | save.o: save.c $(INCS)
128 | spells1.o: spells1.c $(INCS)
129 | spells2.o: spells2.c $(INCS)
130 | squelch.o: squelch.c $(INCS)
131 | tables.o: tables.c $(INCS)
132 | use-obj.o: use-obj.c $(INCS)
133 | util.o: util.c $(INCS)
134 | variable.o: variable.c $(INCS)
135 | wizard1.o: wizard1.c $(INCS)
136 | wizard2.o: wizard2.c $(INCS)
137 | xtra1.o: xtra1.c $(INCS)
138 | xtra2.o: xtra2.c $(INCS)
139 | z-form.o: z-form.c $(HDRS) z-form.h z-util.h z-virt.h
140 | z-rand.o: z-rand.c $(HDRS) z-rand.h
141 | z-term.o: z-term.c $(HDRS) z-term.h z-virt.h
142 | z-util.o: z-util.c $(HDRS) z-util.h
143 | z-virt.o: z-virt.c $(HDRS) z-virt.h z-util.h
144 |
145 |
--------------------------------------------------------------------------------
/src/Makefile.inc:
--------------------------------------------------------------------------------
1 | #
2 | # File: Makefile.inc
3 | #
4 | # Includes Makefile.src and contains dependency info
5 | #
6 |
7 | include Makefile.src
8 |
9 | BASEOBJS := $(ANGFILES) $(ZFILES)
10 |
11 | depgen:
12 | head -n 19 Makefile.inc > Makefile.new
13 | @for i in $(BASEOBJS:.o=.c); do \
14 | DIR=`echo ./$$i | sed 's|/[^/]*$$||'`; \
15 | gcc -MM -I. $$i | \
16 | sed "s|^\\([^ ]\\)|$$DIR/\\1|" >> Makefile.new; \
17 | done;
18 |
19 | # Dependencies
20 | ./variable.o: variable.c angband.h h-basic.h h-config.h h-system.h h-type.h \
21 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
22 | defines.h types.h externs.h
23 | ./tables.o: tables.c angband.h h-basic.h h-config.h h-system.h h-type.h \
24 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
25 | defines.h types.h externs.h
26 | ./util.o: util.c angband.h h-basic.h h-config.h h-system.h h-type.h \
27 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
28 | defines.h types.h externs.h
29 | ./cave.o: cave.c angband.h h-basic.h h-config.h h-system.h h-type.h \
30 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
31 | defines.h types.h externs.h
32 | ./object1.o: object1.c angband.h h-basic.h h-config.h h-system.h h-type.h \
33 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
34 | defines.h types.h externs.h
35 | ./object2.o: object2.c angband.h h-basic.h h-config.h h-system.h h-type.h \
36 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
37 | defines.h types.h externs.h
38 | ./monster1.o: monster1.c angband.h h-basic.h h-config.h h-system.h h-type.h \
39 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
40 | defines.h types.h externs.h
41 | ./monster2.o: monster2.c angband.h h-basic.h h-config.h h-system.h h-type.h \
42 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
43 | defines.h types.h externs.h
44 | ./xtra1.o: xtra1.c angband.h h-basic.h h-config.h h-system.h h-type.h \
45 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
46 | defines.h types.h externs.h
47 | ./xtra2.o: xtra2.c angband.h h-basic.h h-config.h h-system.h h-type.h \
48 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
49 | defines.h types.h externs.h
50 | ./spells1.o: spells1.c angband.h h-basic.h h-config.h h-system.h h-type.h \
51 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
52 | defines.h types.h externs.h
53 | ./spells2.o: spells2.c angband.h h-basic.h h-config.h h-system.h h-type.h \
54 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
55 | defines.h types.h externs.h
56 | ./melee1.o: melee1.c angband.h h-basic.h h-config.h h-system.h h-type.h \
57 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
58 | defines.h types.h externs.h
59 | ./melee2.o: melee2.c angband.h h-basic.h h-config.h h-system.h h-type.h \
60 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
61 | defines.h types.h externs.h
62 | ./save.o: save.c angband.h h-basic.h h-config.h h-system.h h-type.h \
63 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
64 | defines.h types.h externs.h
65 | ./files.o: files.c angband.h h-basic.h h-config.h h-system.h h-type.h \
66 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
67 | defines.h types.h externs.h
68 | ./cmd1.o: cmd1.c angband.h h-basic.h h-config.h h-system.h h-type.h \
69 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
70 | defines.h types.h externs.h
71 | ./cmd2.o: cmd2.c angband.h h-basic.h h-config.h h-system.h h-type.h \
72 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
73 | defines.h types.h externs.h
74 | ./cmd3.o: cmd3.c angband.h h-basic.h h-config.h h-system.h h-type.h \
75 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
76 | defines.h types.h externs.h
77 | ./cmd4.o: cmd4.c angband.h h-basic.h h-config.h h-system.h h-type.h \
78 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
79 | defines.h types.h externs.h
80 | ./cmd5.o: cmd5.c angband.h h-basic.h h-config.h h-system.h h-type.h \
81 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
82 | defines.h types.h externs.h
83 | ./cmd6.o: cmd6.c angband.h h-basic.h h-config.h h-system.h h-type.h \
84 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
85 | defines.h types.h externs.h
86 | ./birth.o: birth.c angband.h h-basic.h h-config.h h-system.h h-type.h \
87 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
88 | defines.h types.h externs.h
89 | ./load.o: load.c angband.h h-basic.h h-config.h h-system.h h-type.h \
90 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
91 | defines.h types.h externs.h init.h
92 | ./squelch.o: squelch.c angband.h h-basic.h h-config.h h-system.h h-type.h \
93 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
94 | defines.h types.h externs.h
95 | ./wizard1.o: wizard1.c angband.h h-basic.h h-config.h h-system.h h-type.h \
96 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
97 | defines.h types.h externs.h
98 | ./wizard2.o: wizard2.c angband.h h-basic.h h-config.h h-system.h h-type.h \
99 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
100 | defines.h types.h externs.h
101 | ./obj-info.o: obj-info.c angband.h h-basic.h h-config.h h-system.h h-type.h \
102 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
103 | defines.h types.h externs.h
104 | ./generate.o: generate.c angband.h h-basic.h h-config.h h-system.h h-type.h \
105 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
106 | defines.h types.h externs.h
107 | ./dungeon.o: dungeon.c angband.h h-basic.h h-config.h h-system.h h-type.h \
108 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
109 | defines.h types.h externs.h
110 | ./init1.o: init1.c angband.h h-basic.h h-config.h h-system.h h-type.h \
111 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
112 | defines.h types.h externs.h init.h
113 | ./init2.o: init2.c angband.h h-basic.h h-config.h h-system.h h-type.h \
114 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
115 | defines.h types.h externs.h init.h
116 | ./randart.o: randart.c angband.h h-basic.h h-config.h h-system.h h-type.h \
117 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
118 | defines.h types.h externs.h init.h
119 | ./use-obj.o: use-obj.c angband.h h-basic.h h-config.h h-system.h h-type.h \
120 | h-define.h z-util.h z-virt.h z-form.h z-rand.h z-term.h config.h \
121 | defines.h types.h externs.h
122 | ./z-util.o: z-util.c z-util.h h-basic.h h-config.h h-system.h h-type.h \
123 | h-define.h
124 | ./z-virt.o: z-virt.c z-virt.h h-basic.h h-config.h h-system.h h-type.h \
125 | h-define.h z-util.h
126 | ./z-form.o: z-form.c z-form.h h-basic.h h-config.h h-system.h h-type.h \
127 | h-define.h z-util.h z-virt.h
128 | ./z-rand.o: z-rand.c z-rand.h h-basic.h h-config.h h-system.h h-type.h \
129 | h-define.h
130 | ./z-term.o: z-term.c z-term.h h-basic.h h-config.h h-system.h h-type.h \
131 | h-define.h z-virt.h
132 |
--------------------------------------------------------------------------------
/src/Makefile.osx:
--------------------------------------------------------------------------------
1 | # File: Makefile.osx
2 |
3 | # This is a (rather crude) Makefile for Mac OS X Carbon port of Sil.
4 | #
5 | # It was originally designed for NPPAngband
6 | # It is based on Makefile.std, made separate because this port does
7 | # not use main.c.
8 | #
9 | # The main changes for Sil are:
10 | # removing:
11 | # quest.c / quest.o
12 | # renaming most instances of 'angband' to 'sil'
13 | # a notable exception is 'angband.h'
14 |
15 | # If you are able to construct "main-xxx.c" and/or "Makefile.xxx"
16 | # files for a currently unsupported system, please send them to
17 | # Robert Ruehlmann < rr9@thangorodrim.net > for inclusion in future
18 | # versions.
19 | #
20 | # This Makefile comes with "default" dependencies that may be obsolete.
21 |
22 | # Installing the Developer CD and you'll have this, as well as full
23 | # set of Mac OS programming documentation (HTML and PDF)
24 | CC = gcc
25 |
26 | # Some Developer CD tools we need - the standard installation location
27 | TOOLDIR = /Developer/Tools
28 | REZ = $(TOOLDIR)/Rez
29 | # DEREZ = $(TOOLDIR)/DeRez
30 | SETFILE = $(TOOLDIR)/SetFile
31 |
32 | #
33 | # The "source" and "object" files.
34 | #
35 |
36 | SRCS = \
37 | z-util.c z-virt.c z-form.c z-rand.c z-term.c \
38 | variable.c tables.c util.c cave.c \
39 | object1.c object2.c monster1.c monster2.c \
40 | xtra1.c xtra2.c spells1.c spells2.c \
41 | melee1.c melee2.c save.c files.c \
42 | cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c \
43 | birth.c load.c squelch.c \
44 | wizard1.c wizard2.c obj-info.c \
45 | generate.c dungeon.c init1.c init2.c randart.c \
46 | main-crb.c \
47 | use-obj.c
48 |
49 |
50 | OBJS = \
51 | z-util.o z-virt.o z-form.o z-rand.o z-term.o \
52 | variable.o tables.o util.o cave.o \
53 | object1.o object2.o monster1.o monster2.o \
54 | xtra1.o xtra2.o spells1.o spells2.o \
55 | melee1.o melee2.o save.o files.o \
56 | cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o \
57 | birth.o load.o squelch.o \
58 | wizard1.o wizard2.o obj-info.o \
59 | generate.o dungeon.o init1.o init2.o randart.o \
60 | main-crb.o \
61 | use-obj.o
62 |
63 | # Can add '-arch ppc' if needed
64 |
65 | CFLAGS = \
66 | -Wall -Wextra -O0 -fpascal-strings -DMACH_O_CARBON -mmacosx-version-min=10.5 -arch i386
67 | LIBS = -framework CoreFoundation -framework QuickTime -framework Carbon
68 |
69 |
70 | #
71 | # Default target.
72 | #
73 | all: install
74 |
75 |
76 | #
77 | # Install the game.
78 | #
79 |
80 | # Application bundle -- a directory looking like an ordinary application
81 |
82 | # Name of the game
83 | APPNAME = Sil.app
84 | # Bundle of the game (it must be a directory whose name ends in ".app")
85 | APPBNDL = ../$(APPNAME)
86 |
87 | # A bundle must have these subdirectories
88 | APPCONT = $(APPBNDL)/Contents
89 | APPBIN = $(APPCONT)/MacOS
90 | APPRES = $(APPCONT)/Resources
91 |
92 | # Auxiliary files. Please note that it still uses resouce fork based
93 | # resources for menus, dialogues and sounds, so that it isn't safe to use
94 | # utilities that doesn't understand them (virtually all Un*x commands) to
95 | # copy or archive the application.
96 | #
97 | # The graphics tiles have been moved out of the resource fork, but, again,
98 | # it isn't generally safe just to convert GIF or BMP files to PNG, because
99 | # the Mac OS takes dpi values stored in various images quite seriously.
100 | # Almost all tilesets for *band requires adjustment, with the sole exception
101 | # of 8x8.bmp for Vanilla. Make sure setting dpi to 72, *not* preserving
102 | # the actual size of image. When you have them ready, put them in the src
103 | # directory and "make install-tiles".
104 | ICONFILES = Sil.icns Save.icns Edit.icns Data.icns
105 | TILES = ../lib/xtra/graf/8x8.png ../lib/xtra/graf/16x16.png ../lib/xtra/graf/32x32.png
106 | PLIST = Sil.xml
107 | RESSRCS = Sil.r
108 | # RESSRCS = Sil.r Sound.r
109 | RFLAGS = -i /Developer/Headers/FlatCarbon -d MACH_O_CARBON
110 |
111 | install: Sil $(RESSRCS) $(ICONFILES) $(PLIST)
112 | [ -d $(APPBNDL) ] || mkdir $(APPBNDL)
113 | [ -d $(APPCONT) ] || mkdir $(APPCONT)
114 | [ -d $(APPBIN) ] || mkdir $(APPBIN)
115 | [ -d $(APPRES) ] || mkdir $(APPRES)
116 | install -m 755 Sil $(APPBIN)
117 | install -m 644 $(ICONFILES) $(APPRES)
118 | $(REZ) $(RFLAGS) -o $(APPRES)/Sil.rsrc $(RESSRCS)
119 | install -m 644 $(PLIST) $(APPCONT)/Info.plist
120 | install -m 644 $(TILES) $(APPRES)
121 | $(SETFILE) -a B $(APPBNDL)
122 |
123 | install-tiles: $(TILES)
124 | install -m 644 $(TILES) $(APPRES)
125 |
126 |
127 | #
128 | # Build the "Sil" program
129 | #
130 |
131 | Sil: $(OBJS)
132 | $(CC) $(CFLAGS) $(LDFLAGS) -o Sil $(OBJS) $(LIBS)
133 |
134 |
135 | #
136 | # Clean up old junk
137 | #
138 |
139 | clean:
140 | -rm -f *.o Sil
141 |
142 |
143 | #
144 | # Generate dependencies automatically
145 | #
146 |
147 | depend:
148 | makedepend -D__MAKEDEPEND__ $(SRCS)
149 |
150 |
151 |
152 | #
153 | # Hack -- some file dependencies
154 | #
155 |
156 | HDRS = \
157 | h-basic.h \
158 | h-define.h h-type.h h-system.h h-config.h
159 |
160 | INCS = \
161 | angband.h \
162 | config.h defines.h types.h externs.h \
163 | z-term.h z-rand.h z-util.h z-virt.h z-form.h $(HDRS)
164 |
165 |
166 | birth.o: birth.c $(INCS)
167 | cave.o: cave.c $(INCS)
168 | cmd1.o: cmd1.c $(INCS)
169 | cmd2.o: cmd2.c $(INCS)
170 | cmd3.o: cmd3.c $(INCS)
171 | cmd4.o: cmd4.c $(INCS)
172 | cmd5.o: cmd5.c $(INCS)
173 | cmd6.o: cmd6.c $(INCS)
174 | dungeon.o: dungeon.c $(INCS)
175 | files.o: files.c $(INCS)
176 | generate.o: generate.c $(INCS)
177 | init1.o: init1.c $(INCS) init.h
178 | init2.o: init2.c $(INCS) init.h
179 | load.o: load.c $(INCS) init.h
180 | melee1.o: melee1.c $(INCS)
181 | melee2.o: melee2.c $(INCS)
182 | monster1.o: monster1.c $(INCS)
183 | monster2.o: monster2.c $(INCS)
184 | obj-info.o: obj-info.c $(INCS)
185 | object1.o: object1.c $(INCS)
186 | object2.o: object2.c $(INCS)
187 | randart.o: randart.c $(INCS) init.h
188 | save.o: save.c $(INCS)
189 | spells1.o: spells1.c $(INCS)
190 | spells2.o: spells2.c $(INCS)
191 | squelch.o: squelch.c $(INCS)
192 | tables.o: tables.c $(INCS)
193 | use-obj.o: use-obj.c $(INCS)
194 | util.o: util.c $(INCS)
195 | variable.o: variable.c $(INCS)
196 | wizard1.o: wizard1.c $(INCS)
197 | wizard2.o: wizard2.c $(INCS)
198 | xtra1.o: xtra1.c $(INCS)
199 | xtra2.o: xtra2.c $(INCS)
200 | z-form.o: z-form.c $(HDRS) z-form.h z-util.h z-virt.h
201 | z-rand.o: z-rand.c $(HDRS) z-rand.h
202 | z-term.o: z-term.c $(HDRS) z-term.h z-virt.h
203 | z-util.o: z-util.c $(HDRS) z-util.h
204 | z-virt.o: z-virt.c $(HDRS) z-virt.h z-util.h
205 |
206 |
207 |
--------------------------------------------------------------------------------
/src/Makefile.src:
--------------------------------------------------------------------------------
1 | #
2 | # File: Makefile.src
3 | #
4 | # A makefile which includes the current object files, hopefully includable
5 | # across a range of different makefiles, to cut down on maintenance.
6 | #
7 |
8 | NAME = Sil
9 | VERSION = 1.5.0
10 | COPYRIGHT = half & Scatha
11 | PROG = sil
12 |
13 | HEADERS = \
14 | h-basic.h \
15 | h-define.h h-type.h h-system.h h-config.h \
16 | angband.h \
17 | config.h defines.h types.h externs.h \
18 | z-term.h z-rand.h z-util.h z-virt.h z-form.h
19 |
20 | ZFILES = z-util.o z-virt.o z-form.o z-rand.o z-term.o
21 | MAINFILES = main-cap.o main-gcu.o main-x11.o maid-x11.o \
22 | main-gtk.o main.o
23 |
24 | WINMAINFILES = \
25 | win/faangband.res \
26 | main-win.o \
27 | win/readdib.o \
28 | win/readpng.o \
29 | win/scrnshot.o \
30 | win/win-layout.o
31 |
32 | ANGFILES = \
33 | variable.o tables.o util.o cave.o \
34 | object1.o object2.o monster1.o monster2.o \
35 | xtra1.o xtra2.o spells1.o spells2.o \
36 | melee1.o melee2.o save.o files.o \
37 | cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o \
38 | birth.o load.o squelch.o \
39 | wizard1.o wizard2.o obj-info.o \
40 | generate.o dungeon.o init1.o init2.o randart.o \
41 | use-obj.o
42 |
--------------------------------------------------------------------------------
/src/Makefile.typew:
--------------------------------------------------------------------------------
1 | ######################################################
2 | ## This file is intended for compiling to assembly ##
3 | ## to then be run manually on a typewriter ##
4 | ## REFER TO main-typew.txt FOR FURTHER INSTRUCTIONS ##
5 | ######################################################
6 |
7 | SRCS = \
8 | z-util.c z-virt.c z-form.c z-rand.c z-term.c \
9 | variable.c tables.c util.c cave.c \
10 | object1.c object2.c monster1.c monster2.c \
11 | xtra1.c xtra2.c spells1.c spells2.c \
12 | melee1.c melee2.c save.c files.c \
13 | cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c \
14 | birth.c load.c squelch.c \
15 | wizard1.c wizard2.c obj-info.c \
16 | generate.c dungeon.c init1.c init2.c randart.c \
17 | use-obj.c \
18 | main-cap.c \
19 | main-gcu.c \
20 | main-x11.c maid-x11.c \
21 | main-gtk.c \
22 | main.c
23 |
24 | OBJS = \
25 | z-util.o z-virt.o z-form.o z-rand.o z-term.o \
26 | variable.o tables.o util.o cave.o \
27 | object1.o object2.o monster1.o monster2.o \
28 | xtra1.o xtra2.o spells1.o spells2.o \
29 | melee1.o melee2.o save.o files.o \
30 | cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o \
31 | birth.o load.o squelch.o \
32 | wizard1.o wizard2.o obj-info.o \
33 | generate.o dungeon.o init1.o init2.o randart.o \
34 | use-obj.o \
35 | main-cap.o \
36 | main-gcu.o \
37 | main-x11.o maid-x11.o \
38 | main-gtk.o \
39 | main.o
40 |
41 |
42 |
43 | ##
44 | ## Following are some "system" definitions
45 | ##
46 | ## No changes are needed to compile a version that will run on both
47 | ## X11 and Curses, in debugging mode, with maximal warnings, on many
48 | ## normal Unix machines of the Sun OS variety (non-solaris).
49 | ##
50 | ## To use an "alternative" definition, simply "modify" (or "replace")
51 | ## the definition below with one that you like. For example, you can
52 | ## change the compiler to "cc", or remove the "debugging" options, or
53 | ## remove the X11 or Curses support, etc, as desired.
54 | ##
55 | ## See also "config.h" and "h-config.h" for important information.
56 | ##
57 | ## Some "examples" are given below, they can be used by simply
58 | ## removing the FIRST column of "#" signs from the "block" of lines
59 | ## you wish to use, and commenting out "standard" block below.
60 | ##
61 | ## This is not intended to be a "good" Makefile, just a "simple" one.
62 | ##
63 |
64 |
65 | #
66 | # This is my compiler of choice, it seems to work most everywhere.
67 | #
68 | CC = gcc
69 |
70 |
71 | #
72 | # Standard version (see main-x11.c and main-gcu.c)
73 | #
74 | # This version supports both "X11" and "curses" in a single executable.
75 | #
76 | # You may have to add various X11 include/library directories to the
77 | # "CFLAGS", if your machine places files in a weird location.
78 | #
79 | # You may have to replace "-lcurses" with "-lncurses" to use the
80 | # "new curses" library instead of the "old curses" library, and
81 | # you may have to add "-I/usr/include/ncurses" to the "CFLAGS".
82 | #
83 | # See "main-gcu.c" and "config.h" for some optional "curses" defines,
84 | # including "USE_GETCH" and "USE_CURS_SET". Note that "config.h" will
85 | # attempt to "guess" at many of these flags based on your system.
86 | #
87 |
88 | ##
89 | ## Standard -- "main-x11.c" & "main-gcu.c"
90 | ##
91 | CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU"
92 | LIBS = -lX11 -lcurses
93 |
--------------------------------------------------------------------------------
/src/Makefile.win:
--------------------------------------------------------------------------------
1 | # This is a makefile for the Cygwin tools which may
2 | # be downloaded by following the links from the URL:
3 | # http://sources.redhat.com/cygwin/
4 |
5 | #
6 | # Standard defines
7 | #
8 |
9 | CC = gcc
10 | WRES = windres
11 | LIBS = -s -mwindows -e _mainCRTStartup -lwinmm -lmsimg32
12 | CFLAGS = -Wall -O2 -fno-strength-reduce -DWINDOWS
13 |
14 | EXOBJS = \
15 | sil.res \
16 | birth.o \
17 | cave.o \
18 | cmd1.o \
19 | cmd2.o \
20 | cmd3.o \
21 | cmd4.o \
22 | cmd5.o \
23 | cmd6.o \
24 | dungeon.o \
25 | files.o \
26 | generate.o \
27 | init1.o \
28 | init2.o \
29 | load.o \
30 | main-win.o \
31 | melee1.o \
32 | melee2.o \
33 | monster1.o \
34 | monster2.o \
35 | obj-info.o \
36 | object1.o \
37 | object2.o \
38 | randart.o \
39 | readdib.o \
40 | save.o \
41 | spells1.o \
42 | spells2.o \
43 | tables.o \
44 | util.o \
45 | variable.o \
46 | wizard1.o \
47 | wizard2.o \
48 | squelch.o \
49 | xtra1.o \
50 | xtra2.o \
51 | z-form.o \
52 | z-rand.o \
53 | z-term.o \
54 | z-util.o \
55 | z-virt.o \
56 | use-obj.o
57 |
58 | HDRS = \
59 | h-basic.h \
60 | h-define.h h-type.h \
61 | h-system.h h-config.h
62 |
63 |
64 | INCS = \
65 | angband.h \
66 | config.h defines.h \
67 | types.h externs.h \
68 | z-term.h z-rand.h \
69 | z-util.h z-virt.h \
70 | z-form.h $(HDRS)
71 |
72 |
73 | #
74 | # Targets
75 | #
76 |
77 |
78 | default: sil
79 |
80 | install: sil movebin cleanobjs lineendings
81 |
82 | movebin:
83 | mv -f sil.exe ../sil.exe
84 |
85 | lineendings:
86 | ./unix2doslib
87 |
88 | cleanobjs:
89 | rm -f $(EXOBJS)
90 |
91 | cleanbin:
92 | rm -f sil.exe
93 |
94 | clean: cleanobjs cleanbin
95 |
96 |
97 |
98 | #
99 | # Dependency rules
100 | #
101 |
102 | sil: $(EXOBJS)
103 | $(CC) -o sil $(EXOBJS) $(INCDIRS) $(LIBDIRS) $(LIBS)
104 |
105 |
106 | #
107 | # Compiling sil.rc
108 |
109 | sil.res : sil.rc
110 | $(WRES) $< -O coff -F pe-i386 -o $@
111 |
112 |
113 | #
114 | # Compiling objects
115 | #
116 |
117 | birth.o: birth.c $(INCS)
118 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
119 |
120 | cave.o: cave.c $(INCS)
121 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
122 |
123 | cmd1.o: cmd1.c $(INCS)
124 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
125 |
126 | cmd2.o: cmd2.c $(INCS)
127 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
128 |
129 | cmd3.o: cmd3.c $(INCS)
130 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
131 |
132 | cmd4.o: cmd4.c $(INCS)
133 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
134 |
135 | cmd5.o: cmd5.c $(INCS)
136 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
137 |
138 | cmd6.o: cmd6.c $(INCS)
139 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
140 |
141 | dungeon.o: dungeon.c $(INCS)
142 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
143 |
144 | files.o: files.c $(INCS)
145 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
146 |
147 | generate.o: generate.c $(INCS)
148 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
149 |
150 | init1.o: init1.c $(INCS) init.h
151 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
152 |
153 | init2.o: init2.c $(INCS) init.h
154 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
155 |
156 | load.o: load.c $(INCS) init.h
157 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
158 |
159 | main.o: main.c $(INCS)
160 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
161 |
162 | melee1.o: melee1.c $(INCS)
163 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
164 |
165 | main-win.o: main-win.c $(INCS)
166 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
167 |
168 | melee2.o: melee2.c $(INCS)
169 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
170 |
171 | monster1.o: monster1.c $(INCS)
172 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
173 |
174 | monster2.o: monster2.c $(INCS)
175 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
176 |
177 | obj-info.o: obj-info.c $(INCS)
178 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
179 |
180 | object1.o: object1.c $(INCS)
181 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
182 |
183 | object2.o: object2.c $(INCS)
184 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
185 |
186 | randart.o: randart.c $(INCS) init.h
187 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
188 |
189 | #
190 | # Note the additional -DNEAR= flag to cope with the 'NEAR'
191 | # keyword used in readdib.c
192 | #
193 |
194 | readdib.o: readdib.c readdib.h
195 | $(CC) $(CFLAGS) -DNEAR= $(INCDIRS) -c -o $@ $<
196 |
197 | save.o: save.c $(INCS)
198 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
199 |
200 | spells1.o: spells1.c $(INCS)
201 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
202 |
203 | spells2.o: spells2.c $(INCS)
204 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
205 |
206 | tables.o: tables.c $(INCS)
207 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
208 |
209 | use-obj.o: use-obj.c $(INCS)
210 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
211 |
212 | util.o: util.c $(INCS)
213 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
214 |
215 | variable.o: variable.c $(INCS)
216 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
217 |
218 | wizard1.o: wizard1.c $(INCS)
219 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
220 |
221 | wizard2.o: wizard2.c $(INCS)
222 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
223 |
224 | squelch.o: squelch.c $(INCS)
225 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
226 |
227 | xtra1.o: xtra1.c $(INCS)
228 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
229 |
230 | xtra2.o: xtra2.c $(INCS)
231 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
232 |
233 | z-form.o: z-form.c $(HDRS) z-form.h z-util.h z-virt.h
234 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
235 |
236 | z-rand.o: z-rand.c $(HDRS) z-rand.h
237 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
238 |
239 | z-term.o: z-term.c $(HDRS) z-term.h z-virt.h
240 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
241 |
242 | z-util.o: z-util.c $(HDRS) z-util.h
243 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
244 |
245 | z-virt.o: z-virt.c $(HDRS) z-virt.h z-util.h
246 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
247 |
248 | .c.o:
249 | $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
250 |
251 |
--------------------------------------------------------------------------------
/src/Save.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/src/Save.icns
--------------------------------------------------------------------------------
/src/Sil.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/src/Sil.icns
--------------------------------------------------------------------------------
/src/Sil.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/src/Sil.ico
--------------------------------------------------------------------------------
/src/Sil.rsrc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/src/Sil.rsrc
--------------------------------------------------------------------------------
/src/Sil.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CFBundleNameSil
5 | CFBundleDisplayNameSil
6 | CFBundleExecutableSil
7 | CFBundlePackageTypeAPPL
8 | CFBundleSignatureSil1
9 | CFBundleVersion1.3.0
10 | CFBundleShortVersionString1.3.0
11 | CFBundleIconFileSil
12 | CFBundleIdentifiernet.amirrorclear.Sil
13 | CFBundleInfoDictionaryVersion6.0
14 | CFBundleDocumentTypes
15 |
16 |
17 | CFBundleTypeExtentions*
18 | CFBundleTypeIconFileSave
19 | CFBundleTypeNameSil saved game
20 | CFBundleTypeOSTypesSAVE
21 | CFBundleTypeRoleEditor
22 |
23 |
24 | CFBundleTypeExtentions*
25 | CFBundleTypeIconFileEdit
26 | CFBundleTypeNameSil game data
27 | CFBundleTypeOSTypesTEXT
28 | CFBundleTypeRoleEditor
29 |
30 |
31 | CFBundleTypeExtentions*
32 | CFBundleTypeIconFileData
33 | CFBundleTypeNameSil game data
34 | CFBundleTypeOSTypesDATA
35 | CFBundleTypeRoleEditor
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/src/angband.h:
--------------------------------------------------------------------------------
1 | /* File: angband.h */
2 |
3 | /*
4 | * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
5 | *
6 | * This software may be copied and distributed for educational, research,
7 | * and not for profit purposes provided that this copyright and statement
8 | * are included in all such copies. Other copyrights may also apply.
9 | */
10 |
11 | #ifndef INCLUDED_ANGBAND_H
12 | #define INCLUDED_ANGBAND_H
13 |
14 | /*
15 | * Include the low-level includes.
16 | */
17 | #include "h-basic.h"
18 |
19 | /*
20 | * Include the mid-level includes.
21 | */
22 | #include "z-util.h"
23 | #include "z-virt.h"
24 | #include "z-form.h"
25 | #include "z-rand.h"
26 | #include "z-term.h"
27 |
28 | /*
29 | * Include the high-level includes.
30 | */
31 | #include "config.h"
32 | #include "defines.h"
33 | #include "types.h"
34 | #include "externs.h"
35 |
36 | /***** Some older copyright messages follow below *****/
37 |
38 | /*
39 | * Note that these copyright messages apply to an ancient version
40 | * of Angband, as in, from pre-2.4.frog-knows days, and thus the
41 | * references to version numbers may be rather misleading...
42 | */
43 |
44 | /*
45 | * UNIX ANGBAND Version 5.0
46 | */
47 |
48 | /* Original copyright message follows. */
49 |
50 | /*
51 | * ANGBAND Version 4.8 COPYRIGHT (c) Robert Alan Koeneke
52 | *
53 | * I lovingly dedicate this game to hackers and adventurers
54 | * everywhere...
55 | *
56 | * Designer and Programmer:
57 | * Robert Alan Koeneke
58 | * University of Oklahoma
59 | *
60 | * Assistant Programmer:
61 | * Jimmey Wayne Todd
62 | * University of Oklahoma
63 | *
64 | * Assistant Programmer:
65 | * Gary D. McAdoo
66 | * University of Oklahoma
67 | *
68 | * UNIX Port:
69 | * James E. Wilson
70 | * UC Berkeley
71 | * wilson@ernie.Berkeley.EDU
72 | * ucbvax!ucbernie!wilson
73 | */
74 |
75 | /*
76 | * ANGBAND may be copied and modified freely as long as the above
77 | * credits are retained. No one who-so-ever may sell or market
78 | * this software in any form without the expressed written consent
79 | * of the author Robert Alan Koeneke.
80 | */
81 |
82 | #endif
83 |
--------------------------------------------------------------------------------
/src/cmd5.c:
--------------------------------------------------------------------------------
1 | /* File: cmd5.c */
2 |
3 | /*
4 | * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
5 | *
6 | * This software may be copied and distributed for educational, research,
7 | * and not for profit purposes provided that this copyright and statement
8 | * are included in all such copies. Other copyrights may also apply.
9 | */
10 |
11 | #include "angband.h"
12 |
13 | /*
14 | * Hack -- display an object kind in the current window
15 | *
16 | * Include list of usable spells for readible books
17 | */
18 | void display_koff(int k_idx)
19 | {
20 | int y;
21 |
22 | object_type* i_ptr;
23 | object_type object_type_body;
24 |
25 | char o_name[80];
26 |
27 | /* Erase the window */
28 | for (y = 0; y < Term->hgt; y++)
29 | {
30 | /* Erase the line */
31 | Term_erase(0, y, 255);
32 | }
33 |
34 | /* No info */
35 | if (!k_idx)
36 | return;
37 |
38 | /* Get local object */
39 | i_ptr = &object_type_body;
40 |
41 | /* Prepare the object */
42 | object_wipe(i_ptr);
43 |
44 | /* Prepare the object */
45 | object_prep(i_ptr, k_idx);
46 |
47 | /* Describe */
48 | object_desc_spoil(o_name, sizeof(o_name), i_ptr, FALSE, 0);
49 |
50 | /* Mention the object name */
51 | Term_putstr(0, 0, -1, TERM_WHITE, o_name);
52 | }
53 |
--------------------------------------------------------------------------------
/src/cocoa/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | *\file AppDelegate.h
3 | *\brief Declare the application delegate used by the OS X front end.
4 | *
5 | * This work is free software; you can redistribute it and/or modify it
6 | * under the terms of either:
7 | *
8 | * a) the GNU General Public License as published by the Free Software
9 | * Foundation, version 2, or
10 | *
11 | * b) the "Angband licence":
12 | * This software may be copied and distributed for educational, research,
13 | * and not for profit purposes provided that this copyright and statement
14 | * are included in all such copies. Other copyrights may also apply.
15 | */
16 |
17 | #import
18 |
19 | @interface AngbandAppDelegate : NSObject {
20 | NSMenu *_commandMenu;
21 | NSDictionary *_commandMenuTagMap;
22 | }
23 | @property (strong, nonatomic, retain) IBOutlet NSMenu *commandMenu;
24 | @property (strong, nonatomic, retain) NSDictionary *commandMenuTagMap;
25 | - (IBAction)newGame:(id)sender;
26 | - (IBAction)editFont:(id)sender;
27 | - (IBAction)openGame:(id)sender;
28 | - (IBAction)saveGame:(id)sender;
29 | - (IBAction)setRefreshRate:(NSMenuItem *)sender;
30 |
31 | - (void)setGraphicsMode:(NSMenuItem *)sender;
32 | - (void)selectWindow:(id)sender;
33 | - (void)beginGame;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/src/cocoa/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * \file AppDelegate.m
3 | * \brief This is a minimal implementation of the OS X front end.
4 | *
5 | * Use this file to rebuild the .nib file with Xcode without having to pull
6 | * in all of the Sil source. This is the procedure with Xcode 12:
7 | *
8 | * 1) Create a new Xcode project for a macOS App.
9 | * 2) You can set the "Product Name", "Team", "Organization Name",
10 | * "Organization Identifier" as you wish. Setting the product name to
11 | * "sil" and the "Organization Identifier" to "net.amirrorclear" will
12 | * match the bundle identifier used in the full builds for Sil. Set
13 | * "Language" to "Objective-C" and "User Interface" to "XIB". Leave
14 | * "Create Document-Based Application" and "Use Core Data" off.
15 | * The setting for "Include Tests" doesn't matter; you can turn it
16 | * off to avoid extra clutter.
17 | * 3) In Sil's project settings on the "Info" tab, set the deployment
18 | * target to what's used in Sil's Makefile.cocoa. When this was
19 | * written, that was 10.6. Turn off "Use Base Internationalization".
20 | * One could leave it on (and use Base.lproj rather than en.lproj
21 | * in the following instructions) but that imposes the requirement of
22 | * at least 10.8 for the minimum version of OS X. If you target 10.6,
23 | * in the "Build Settings" tab, you'll need to set the setting for
24 | * "Apple CLang - Language - Objective-C"->"Weak References in Manual
25 | * Retain Release" to "No"; for 10.7 or later that won't be neccessary.
26 | * 4) In Sil's targets on the "General" tab, verify that "Main Interface"
27 | * is MainMenu.
28 | * 5) Copy src/cocoa/AppDelegate.h and src/cocoa/AppDelegate.m from the
29 | * Sil source files to the directory in the project with main.m. Copy
30 | * src/cocoa/en.lproj/MainMenu.xib to the en.lproj subdirectory
31 | * of that directory.
32 | * 6) If you modify MainMenu.xib after copying it over, you may want to
33 | * set it so that it can be opened in older versions of Xcode. Select it in
34 | * Xcode, and select one of the things, like "File's Owner" from it. In
35 | * the file information panel for it, there will be a section labeled
36 | * "Document Editing" with an option menu for "Opens in". Choosing one of
37 | * the options other than "Latest Xcode" will close the file and save it
38 | * with the appropriate flags. Note that reopening the .xib file in Xcode
39 | * and saving it will cause the version to revert to the latest Xcode.
40 | * 7) Use Xcode's Product->Build For->Running menu entry to build the project.
41 | * 8) The generated .nib file will be in
42 | * Contents/Resources/en.lproj in the product directory which
43 | * is something like
44 | * ~/Library/Developer/Xcode/DerivedData/-/Build/Products/Debug/.app
45 | * You can use it to replace the .nib file in src/cocoa/en.lproj in the
46 | * Sil source files (in older versions of Sil, MainMenu.nib is a
47 | * directory; you'll have to remove it and replace it with the flat file
48 | * that is generated by the above procedure and adjust the installation
49 | * rules for it in Makefile.cocoa).
50 | *
51 | * This work is free software; you can redistribute it and/or modify it
52 | * under the terms of either:
53 | *
54 | * a) the GNU General Public License as published by the Free Software
55 | * Foundation, version 2, or
56 | *
57 | * b) the "Angband licence":
58 | * This software may be copied and distributed for educational, research,
59 | * and not for profit purposes provided that this copyright and statement
60 | * are included in all such copies. Other copyrights may also apply.
61 | */
62 |
63 | #import "AppDelegate.h"
64 |
65 | @implementation AngbandAppDelegate
66 |
67 | @synthesize commandMenu=_commandMenu;
68 | @synthesize commandMenuTagMap=_comandMenuTagMap;
69 |
70 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
71 | // Insert code here to initialize your application
72 | }
73 |
74 |
75 | - (void)applicationWillTerminate:(NSNotification *)aNotification {
76 | // Insert code here to tear down your application
77 | }
78 |
79 |
80 | - (IBAction)newGame:(id)sender {
81 | }
82 |
83 | - (IBAction)editFont:(id)sender {
84 | }
85 |
86 | - (IBAction)openGame:(id)sender {
87 | }
88 |
89 | - (IBAction)saveGame:(id)sender {
90 | }
91 |
92 | - (IBAction)setRefreshRate:(NSMenuItem *)sender {
93 | }
94 |
95 | - (void)setGraphicsMode:(NSMenuItem *)sender {
96 | }
97 |
98 | - (void)selectWindow:(id)sender {
99 | }
100 |
101 | - (void)beginGame {
102 | }
103 |
104 | @end
105 |
--------------------------------------------------------------------------------
/src/cocoa/CommandMenu.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Title
7 | Knowledge
8 | KeyEquivalent
9 | k
10 | ShiftModifier
11 |
12 | OptionModifier
13 |
14 | AngbandCommand
15 | ~
16 |
17 |
18 | Title
19 | List Monsters
20 | KeyEquivalent
21 | l
22 | ShiftModifier
23 |
24 | OptionModifier
25 |
26 | AngbandCommand
27 | [
28 |
29 |
30 | Title
31 | List Items
32 | KeyEquivalent
33 | l
34 | ShiftModifier
35 |
36 | OptionModifier
37 |
38 | AngbandCommand
39 | ]
40 |
41 |
42 | Title
43 | Inscribe
44 | KeyEquivalent
45 | i
46 | ShiftModifier
47 |
48 | OptionModifier
49 |
50 | AngbandCommand
51 | {
52 |
53 |
54 | Title
55 | Uninscribe
56 | KeyEquivalent
57 | i
58 | ShiftModifier
59 |
60 | OptionModifier
61 |
62 | AngbandCommand
63 | }
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/src/cocoa/Data.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/src/cocoa/Data.icns
--------------------------------------------------------------------------------
/src/cocoa/Edit.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/src/cocoa/Edit.icns
--------------------------------------------------------------------------------
/src/cocoa/Save.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/src/cocoa/Save.icns
--------------------------------------------------------------------------------
/src/cocoa/Sil-Cocoa.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | sil
9 | CFBundleDisplayName
10 | Sil
11 | CFBundleName
12 | Sil
13 | CFBundleIconFile
14 | Sil_Icons
15 | CFBundleIdentifier
16 | net.amirrorclear.Sil
17 | CFBundleInfoDictionaryVersion
18 | 6.0
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | $VERSION$
23 | CFBundleSignature
24 | Sil1
25 | CFBundleVersion
26 | $VERSION$
27 | CGDisableCoalescedUpdates
28 |
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 | CFBundleDocumentTypes
34 |
35 |
36 | CFBundleTypeExtensions
37 |
38 | *
39 |
40 | CFBundleTypeIconFile
41 | Save
42 | CFBundleTypeName
43 | Sil saved game
44 | CFBundleTypeOSTypes
45 |
46 | SAVE
47 |
48 | CFBundleTypeRole
49 | Editor
50 |
51 |
52 | CFBundleTypeExtensions
53 |
54 | *
55 |
56 | CFBundleTypeIconFile
57 | Edit
58 | CFBundleTypeName
59 | Sil game data
60 | CFBundleTypeOSTypes
61 |
62 | TEXT
63 |
64 | CFBundleTypeRole
65 | Editor
66 |
67 |
68 | CFBundleTypeExtensions
69 |
70 | *
71 |
72 | CFBundleTypeIconFile
73 | Data
74 | CFBundleTypeName
75 | Sil game data
76 | CFBundleTypeOSTypes
77 |
78 | DATA
79 |
80 | CFBundleTypeRole
81 | Editor
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/src/cocoa/Sil_Icons.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/src/cocoa/Sil_Icons.icns
--------------------------------------------------------------------------------
/src/cocoa/en.lproj/MainMenu.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sil-quirk/sil-q/ace2dc83bddb32368cb299c895ac1896733abc5d/src/cocoa/en.lproj/MainMenu.nib
--------------------------------------------------------------------------------
/src/h-basic.h:
--------------------------------------------------------------------------------
1 | /* File: h-basic.h */
2 |
3 | #ifndef INCLUDED_H_BASIC_H
4 | #define INCLUDED_H_BASIC_H
5 |
6 | /*
7 | * The most basic "include" file.
8 | *
9 | * This file simply includes other low level header files.
10 | */
11 |
12 | #ifdef HAVE_CONFIG_H
13 | #include "autoconf.h"
14 | #endif /* HAVE_CONFIG_H */
15 |
16 | /* System Configuration */
17 | #include "h-config.h"
18 |
19 | /* System includes/externs */
20 | #include "h-system.h"
21 |
22 | /* Basic types */
23 | #include "h-type.h"
24 |
25 | /* Basic constants and macros */
26 | #include "h-define.h"
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/src/h-define.h:
--------------------------------------------------------------------------------
1 | /* File: h-define.h */
2 |
3 | #ifndef INCLUDED_H_DEFINE_H
4 | #define INCLUDED_H_DEFINE_H
5 |
6 | /*
7 | * Define some simple constants
8 | */
9 |
10 | /*
11 | * Hack -- Define NULL
12 | */
13 | #ifndef NULL
14 | #define NULL ((void*)0)
15 | #endif /* NULL */
16 |
17 | /*
18 | * Hack -- assist "main-ros.c" XXX XXX XXX
19 | */
20 | #ifdef RISCOS
21 | #define O_RDONLY 0
22 | #define O_WRONLY 1
23 | #define O_RDWR 2
24 | #endif
25 |
26 | /*
27 | * Hack -- force definitions -- see fd_seek()
28 | */
29 | #ifndef SEEK_SET
30 | #define SEEK_SET 0
31 | #endif
32 | #ifndef SEEK_CUR
33 | #define SEEK_CUR 1
34 | #endif
35 | #ifndef SEEK_END
36 | #define SEEK_END 2
37 | #endif
38 |
39 | /*
40 | * Hack -- force definitions -- see fd_lock() XXX XXX XXX
41 | */
42 | #ifndef F_UNLCK
43 | #define F_UNLCK 0
44 | #endif
45 | #ifndef F_RDLCK
46 | #define F_RDLCK 1
47 | #endif
48 | #ifndef F_WRLCK
49 | #define F_WRLCK 2
50 | #endif
51 |
52 | /*
53 | * The constants "TRUE" and "FALSE"
54 | */
55 |
56 | #undef TRUE
57 | #define TRUE 1
58 |
59 | #undef FALSE
60 | #define FALSE 0
61 |
62 | /**** Simple "Macros" ****/
63 |
64 | /*
65 | * Non-typed minimum value macro
66 | */
67 | #undef MIN
68 | #define MIN(a, b) (((a) > (b)) ? (b) : (a))
69 |
70 | /*
71 | * Non-typed maximum value macro
72 | */
73 | #undef MAX
74 | #define MAX(a, b) (((a) < (b)) ? (b) : (a))
75 |
76 | /*
77 | * Non-typed absolute value macro
78 | */
79 | #undef ABS
80 | #define ABS(a) (((a) < 0) ? (-(a)) : (a))
81 |
82 | /*
83 | * Non-typed sign extractor macro
84 | */
85 | #undef SGN
86 | #define SGN(a) (((a) < 0) ? (-1) : ((a) != 0))
87 |
88 | /*
89 | * Non-typed between value macro
90 | */
91 | #undef ORDERED
92 | #define ORDERED(a, b, c) \
93 | ((((a) <= (b)) && ((b) <= (c))) || (((c) <= (b)) && ((b) <= (a))))
94 |
95 | /*
96 | * Hack -- allow use of "ASCII" and "EBCDIC" for "indexes", "digits",
97 | * and "Control-Characters".
98 | *
99 | * Note that all "index" values must be "lowercase letters", while
100 | * all "digits" must be "digits". Control characters can be made
101 | * from any legal characters. XXX XXX XXX
102 | */
103 | #ifdef VM
104 | #define A2I(X) alphatoindex(X)
105 | #define I2A(X) indextoalpha(X)
106 | #define D2I(X) ((X) - '0')
107 | #define I2D(X) ((X) + '0')
108 | #define KTRL(X) ((X)&0x1F)
109 | #define UN_KTRL(X) ((X) + 64)
110 | #define ESCAPE '\033'
111 | #else
112 | #define A2I(X) ((X) - 'a')
113 | #define I2A(X) ((X) + 'a')
114 | #define D2I(X) ((X) - '0')
115 | #define I2D(X) ((X) + '0')
116 | #define KTRL(X) ((X)&0x1F)
117 | #define UN_KTRL(X) ((X) + 64)
118 | #define ESCAPE '\033'
119 | #endif
120 |
121 | #endif
122 |
--------------------------------------------------------------------------------
/src/h-system.h:
--------------------------------------------------------------------------------
1 | /* File: h-system.h */
2 |
3 | #ifndef INCLUDED_H_SYSTEM_H
4 | #define INCLUDED_H_SYSTEM_H
5 |
6 | /*
7 | * Include the basic "system" files.
8 | *
9 | * Make sure all "system" constants/macros are defined.
10 | * Make sure all "system" functions have "extern" declarations.
11 | *
12 | * This file is a big hack to make other files less of a hack.
13 | * This file has been rebuilt -- it may need a little more work.
14 | */
15 |
16 | #include
17 | #include
18 | #include
19 |
20 | #if defined(NeXT)
21 | #include
22 | #else
23 | #include
24 | #endif
25 |
26 | #ifdef SET_UID
27 |
28 | #include
29 |
30 | #if defined(Pyramid) || defined(NeXT) || defined(SUNOS) || defined(NCR3K) \
31 | || defined(SUNOS) || defined(ibm032) || defined(__osf__) || defined(ISC) \
32 | || defined(SGI) || defined(linux)
33 | #include
34 | #endif
35 |
36 | #if !defined(SGI) && !defined(ULTRIX)
37 | #include
38 | #endif
39 |
40 | #endif
41 |
42 | #include
43 |
44 | #if defined(MACINTOSH) && defined(__MWERKS__)
45 | #include
46 | #endif
47 |
48 | #if defined(WINDOWS) || defined(MSDOS) || defined(USE_EMX)
49 | #include
50 | #endif
51 |
52 | #if !defined(MACINTOSH) && !defined(AMIGA) && !defined(RISCOS) && !defined(VM) \
53 | && !defined(__MWERKS__)
54 | #if defined(__TURBOC__) || defined(__WATCOMC__)
55 | #include
56 | #else
57 | #include
58 | #endif
59 | #endif
60 |
61 | #if !defined(NeXT) && !defined(RISCOS)
62 | #include
63 | #endif
64 |
65 | #ifdef SET_UID
66 |
67 | #ifndef _MSC_VER
68 | #ifndef USG
69 | #include
70 | #include
71 | #endif
72 |
73 | #ifdef linux
74 | #include
75 | #endif
76 |
77 | #include
78 |
79 | #include
80 |
81 | #else
82 |
83 | #ifndef WINDOWS
84 | #define WINDOWS
85 | #endif
86 |
87 | #undef SET_UID
88 |
89 | #endif
90 |
91 | #include
92 |
93 | #if defined(SOLARIS)
94 | #include
95 | #endif
96 |
97 | #endif
98 |
99 | #if defined(__DJGPP__) || defined(__MWERKS__)
100 | #include
101 | #endif /* __DJGPP__ || __MWERKS__ */
102 |
103 | #include
104 |
105 | #include
106 |
107 | #endif
108 |
--------------------------------------------------------------------------------
/src/h-type.h:
--------------------------------------------------------------------------------
1 | /* File: h-type.h */
2 |
3 | #include
4 |
5 | #ifndef INCLUDED_H_TYPE_H
6 | #define INCLUDED_H_TYPE_H
7 |
8 | /*
9 | * Basic "types".
10 | *
11 | * A char/byte takes exactly 1 byte
12 | * A s16b/u16b takes exactly 2 bytes
13 | * A s32b/u32b takes exactly 4 bytes
14 | */
15 |
16 | /*** Special 4 letter names for some standard types ***/
17 |
18 | /* A string pointer */
19 | typedef const char* cptr;
20 |
21 | /* An error code */
22 | typedef int errr;
23 |
24 | /*
25 | * Hack -- prevent problems with non-MACINTOSH
26 | */
27 | #undef uint
28 | #define uint uint_hack
29 |
30 | /*
31 | * Hack -- prevent problems with AMIGA
32 | */
33 | #undef byte
34 | #define byte byte_hack
35 |
36 | /*
37 | * Hack -- prevent problems with C++
38 | */
39 | #undef bool
40 | #define bool bool_hack
41 |
42 | /* Note that unsigned values can cause math problems */
43 | /* An unsigned byte of memory */
44 | typedef unsigned char byte;
45 |
46 | /* Note that a bool is smaller than a full "int" */
47 | /* Simple True/False type */
48 | typedef char bool;
49 |
50 | /* An unsigned, "standard" integer (often pre-defined) */
51 | typedef unsigned int uint;
52 |
53 | /* Signed/Unsigned 16 bit value */
54 | typedef int16_t s16b;
55 | typedef uint16_t u16b;
56 |
57 | typedef int32_t s32b;
58 | typedef uint32_t u32b;
59 |
60 | #endif /* INCLUDED_H_TYPE_H */
61 |
--------------------------------------------------------------------------------
/src/init.h:
--------------------------------------------------------------------------------
1 | /* File: init.h */
2 |
3 | /*
4 | * Copyright (c) 2000 Robert Ruehlmann
5 | *
6 | * This software may be copied and distributed for educational, research,
7 | * and not for profit purposes provided that this copyright and statement
8 | * are included in all such copies.
9 | */
10 |
11 | #ifndef INCLUDED_INIT_H
12 | #define INCLUDED_INIT_H
13 |
14 | #include "h-basic.h"
15 |
16 | /*
17 | * Parse errors
18 | */
19 | #define PARSE_ERROR_GENERIC 1
20 | #define PARSE_ERROR_OBSOLETE_FILE 2
21 | #define PARSE_ERROR_MISSING_RECORD_HEADER 3
22 | #define PARSE_ERROR_NON_SEQUENTIAL_RECORDS 4
23 | #define PARSE_ERROR_INVALID_FLAG 5
24 | #define PARSE_ERROR_UNDEFINED_DIRECTIVE 6
25 | #define PARSE_ERROR_OUT_OF_MEMORY 7
26 | #define PARSE_ERROR_OUT_OF_BOUNDS 8
27 | #define PARSE_ERROR_TOO_FEW_ARGUMENTS 9
28 | #define PARSE_ERROR_TOO_MANY_ARGUMENTS 10
29 | #define PARSE_ERROR_TOO_MANY_ALLOCATIONS 11
30 | #define PARSE_ERROR_INVALID_SPELL_FREQ 12
31 | #define PARSE_ERROR_INVALID_ITEM_NUMBER 13
32 | #define PARSE_ERROR_TOO_MANY_ENTRIES 14
33 | #define PARSE_ERROR_VAULT_TOO_BIG 15
34 | #define PARSE_ERROR_VAULT_NOT_RECTANGULAR 16
35 | #define PARSE_ERROR_MAX 18
36 |
37 | typedef struct header header;
38 |
39 | typedef errr (*parse_info_txt_func)(char* buf, header* head);
40 |
41 | /*
42 | * Template file header information (see "init.c"). 16 bytes.
43 | *
44 | * Note that the sizes of many of the "arrays" are between 32768 and
45 | * 65535, and so we must use "unsigned" values to hold the "sizes" of
46 | * these arrays below. Normally, I try to avoid using unsigned values,
47 | * since they can cause all sorts of bizarre problems, but I have no
48 | * choice here, at least, until the "race" array is split into "normal"
49 | * and "unique" monsters, which may or may not actually help.
50 | *
51 | * Note that, on some machines, for example, the Macintosh, the standard
52 | * "read()" and "write()" functions cannot handle more than 32767 bytes
53 | * at one time, so we need replacement functions, see "util.c" for details.
54 | *
55 | * Note that, on some machines, for example, the Macintosh, the standard
56 | * "malloc()" function cannot handle more than 32767 bytes at one time,
57 | * but we may assume that the "ralloc()" function can handle up to 65535
58 | * butes at one time. We should not, however, assume that the "ralloc()"
59 | * function can handle more than 65536 bytes at a time, since this might
60 | * result in segmentation problems on certain older machines, and in fact,
61 | * we should not assume that it can handle exactly 65536 bytes at a time,
62 | * since the internal functions may use an unsigned short to specify size.
63 | *
64 | * In general, these problems occur only on machines (such as most personal
65 | * computers) which use 2 byte "int" values, and which use "int" for the
66 | * arguments to the relevent functions.
67 | */
68 | struct header
69 | {
70 | byte v_major; /* Version -- major */
71 | byte v_minor; /* Version -- minor */
72 | byte v_patch; /* Version -- patch */
73 | byte v_extra; /* Version -- extra */
74 |
75 | u16b info_num; /* Number of "info" records */
76 |
77 | u16b info_len; /* Size of each "info" record */
78 |
79 | u32b head_size; /* Size of the "header" in bytes */
80 |
81 | u32b info_size; /* Size of the "info" array in bytes */
82 |
83 | u32b name_size; /* Size of the "name" array in bytes */
84 |
85 | u32b text_size; /* Size of the "text" array in bytes */
86 |
87 | void* info_ptr;
88 | char* name_ptr;
89 | char* text_ptr;
90 |
91 | parse_info_txt_func parse_info_txt;
92 | };
93 |
94 | extern errr init_info_txt(
95 | FILE* fp, char* buf, header* head, parse_info_txt_func parse_info_txt_line);
96 |
97 | #ifdef ALLOW_TEMPLATES
98 | extern errr parse_z_info(char* buf, header* head);
99 | extern errr parse_v_info(char* buf, header* head);
100 | extern errr parse_f_info(char* buf, header* head);
101 | extern errr parse_k_info(char* buf, header* head);
102 | extern errr parse_b_info(char* buf, header* head);
103 | extern errr parse_a_info(char* buf, header* head);
104 | extern errr parse_e_info(char* buf, header* head);
105 | extern errr parse_r_info(char* buf, header* head);
106 | extern errr parse_p_info(char* buf, header* head);
107 | extern errr parse_c_info(char* buf, header* head);
108 | extern errr parse_h_info(char* buf, header* head);
109 | extern errr parse_q_info(char* buf, header* head);
110 | extern errr parse_n_info(char* buf, header* head);
111 | extern errr parse_flavor_info(char* buf, header* head);
112 |
113 | /*
114 | * Error tracking
115 | */
116 | extern int error_idx;
117 | extern int error_line;
118 |
119 | #endif /* ALLOW_TEMPLATES */
120 |
121 | /*
122 | * File headers
123 | */
124 | extern header z_head;
125 | extern header v_head;
126 | extern header f_head;
127 | extern header k_head;
128 | extern header b_head;
129 | extern header a_head;
130 | extern header e_head;
131 | extern header r_head;
132 | extern header p_head;
133 | extern header c_head;
134 | extern header h_head;
135 | extern header b_head;
136 | extern header g_head;
137 | extern header q_head;
138 | extern header n_head;
139 | extern header flavor_head;
140 |
141 | #endif /* INCLUDED_INIT_H */
142 |
--------------------------------------------------------------------------------
/src/maid-x11.h:
--------------------------------------------------------------------------------
1 | /* File: maid-x11.h */
2 |
3 | /* Purpose: Common header file for various x11 ports */
4 |
5 | /*
6 | * Copyright (c) 2001 Robert Ruehlmann, Steven Fuerst
7 | *
8 | * This software may be copied and distributed for educational, research, and
9 | * not for profit purposes provided that this copyright and statement are
10 | * included in all such copies.
11 | */
12 |
13 | #ifndef INCLUDED_MAID_X11_H
14 | #define INCLUDED_MAID_X11_H
15 |
16 | #ifndef __MAKEDEPEND__
17 | #include
18 | #include
19 | #include
20 | #include
21 | #endif /* __MAKEDEPEND__ */
22 |
23 | #ifndef IsModifierKey
24 |
25 | /*
26 | * Keysym macros, used on Keysyms to test for classes of symbols
27 | * These were stolen from one of the X11 header files
28 | */
29 |
30 | #define IsKeypadKey(keysym) \
31 | (((unsigned)(keysym) >= XK_KP_Space) && ((unsigned)(keysym) <= XK_KP_Equal))
32 |
33 | #define IsCursorKey(keysym) \
34 | (((unsigned)(keysym) >= XK_Home) && ((unsigned)(keysym) < XK_Select))
35 |
36 | #define IsPFKey(keysym) \
37 | (((unsigned)(keysym) >= XK_KP_F1) && ((unsigned)(keysym) <= XK_KP_F4))
38 |
39 | #define IsFunctionKey(keysym) \
40 | (((unsigned)(keysym) >= XK_F1) && ((unsigned)(keysym) <= XK_F35))
41 |
42 | #define IsMiscFunctionKey(keysym) \
43 | (((unsigned)(keysym) >= XK_Select) && ((unsigned)(keysym) < XK_KP_Space))
44 |
45 | #define IsModifierKey(keysym) \
46 | (((unsigned)(keysym) >= XK_Shift_L) && ((unsigned)(keysym) <= XK_Hyper_R))
47 |
48 | #endif /* IsModifierKey */
49 |
50 | /*
51 | * Checks if the keysym is a special key or a normal key
52 | * Assume that XK_MISCELLANY keysyms are special
53 | */
54 | #define IsSpecialKey(keysym) ((unsigned)(keysym) >= 0xFF00)
55 |
56 | extern u32b create_pixel(Display* dpy, byte red, byte green, byte blue);
57 | extern cptr get_default_font(int term_num);
58 | extern XImage* ReadBMP(Display* dpy, char* Name);
59 | extern bool smoothRescaling;
60 | extern XImage* ResizeImage(
61 | Display* dpy, XImage* Im, int ix, int iy, int ox, int oy);
62 |
63 | #endif /* INCLUDED_MAID_X11_H */
64 |
--------------------------------------------------------------------------------
/src/main-typew.txt:
--------------------------------------------------------------------------------
1 | This one is a bit tricky, you have type the output manually. And because of the limited computing power of the Typewriter,
2 | you'll have to do most of the computing on Graph paper with the help of a slide rule.
3 |
4 | Algorithm for running Sil-Q on a typewriter:
5 | 1. Compile the source into assembly using the makefile for GCU mode sicne that will give you an output that can be typed out on your typewriter.
6 | 2. Copy out the relevant diagrams and tables for an x86-64 precessor, you'll need these in your calculations.
7 | 3. Take out your slide rule and graph paper
8 | 4. Start crunching numbers, this step may take up to several years. Be patient and DON'T PANICK.
9 | 5. Type out the resulting output on your typewriter.
10 | 6. Mark your desired input in a notebook, then repeat step 4. from where you left off taking into account the input you just wrote down.
11 | 7. Type out the resulting output either below your previous output or on top of it using an eraser ribbon or white out.
12 |
13 | The game can now be played by repeating steps 6. and 7. , All on your very own typewriter!
14 |
--------------------------------------------------------------------------------
/src/main.h:
--------------------------------------------------------------------------------
1 | /* File: main.h */
2 |
3 | /*
4 | * Copyright (c) 2002 Robert Ruehlmann
5 | *
6 | * This software may be copied and distributed for educational, research,
7 | * and not for profit purposes provided that this copyright and statement
8 | * are included in all such copies. Other copyrights may also apply.
9 | */
10 |
11 | #ifndef INCLUDED_MAIN_H
12 | #define INCLUDED_MAIN_H
13 |
14 | #include "angband.h"
15 |
16 | extern errr init_gtk(int argc, char** argv);
17 | extern errr init_xaw(int argc, char** argv);
18 | extern errr init_x11(int argc, char** argv);
19 | extern errr init_xpj(int argc, char** argv);
20 | extern errr init_gcu(int argc, char** argv);
21 | extern errr init_cap(int argc, char** argv);
22 | extern errr init_dos(int argc, char** argv);
23 | extern errr init_ibm(int argc, char** argv);
24 | extern errr init_emx(int argc, char** argv);
25 | extern errr init_sla(int argc, char** argv);
26 | extern errr init_lsl(int argc, char** argv);
27 | extern errr init_ami(int argc, char** argv);
28 | extern errr init_vme(int argc, char** argv);
29 | extern errr init_vcs(int argc, char** argv);
30 |
31 | extern const char help_xpj[];
32 | extern const char help_xaw[];
33 | extern const char help_x11[];
34 | extern const char help_vcs[];
35 | extern const char help_gtk[];
36 | extern const char help_gcu[];
37 | extern const char help_cap[];
38 | extern const char help_vme[];
39 | extern const char help_ami[];
40 | extern const char help_lsl[];
41 | extern const char help_sla[];
42 | extern const char help_emx[];
43 | extern const char help_ibm[];
44 | extern const char help_dos[];
45 |
46 | struct module
47 | {
48 | cptr name;
49 | cptr help;
50 | errr (*init)(int argc, char** argv);
51 | };
52 |
53 | #endif /* INCLUDED_MAIN_H */
54 |
--------------------------------------------------------------------------------
/src/readdib.h:
--------------------------------------------------------------------------------
1 | /* File: readdib.h */
2 |
3 | /*
4 | * This file has been modified for use with "Angband 2.8.2"
5 | *
6 | * Copyright 1991 Microsoft Corporation. All rights reserved.
7 | */
8 |
9 | /*
10 | * Information about a bitmap
11 | */
12 | typedef struct
13 | {
14 | HANDLE hDIB;
15 | HBITMAP hBitmap;
16 | HPALETTE hPalette;
17 | BYTE CellWidth;
18 | BYTE CellHeight;
19 | } DIBINIT;
20 |
21 | /* Read a DIB from a file */
22 | extern BOOL ReadDIB(HWND, LPSTR, DIBINIT*);
23 |
24 | /* Free a DIB */
25 | extern void FreeDIB(DIBINIT* dib);
26 |
--------------------------------------------------------------------------------
/src/sil.rc:
--------------------------------------------------------------------------------
1 | /* File: sil.rc */
2 |
3 | ANGBAND MENU
4 | {
5 | POPUP "&File"
6 | {
7 | MENUITEM "&New", 100
8 | MENUITEM "&Open...", 101
9 | MENUITEM SEPARATOR
10 | MENUITEM "&Save", 110
11 | MENUITEM SEPARATOR
12 | MENUITEM "E&xit", 130
13 | }
14 |
15 | POPUP "&Window"
16 | {
17 | POPUP "&Visibility"
18 | {
19 | MENUITEM "Sil", 200
20 | MENUITEM "Inventory", 201
21 | MENUITEM "Equipment", 202
22 | MENUITEM "Combat Rolls", 203
23 | MENUITEM "Recall", 204
24 | MENUITEM "Character", 205
25 | MENUITEM "Messages", 206
26 | MENUITEM "Monster List", 207
27 | }
28 |
29 | POPUP "&Font"
30 | {
31 | MENUITEM "Sil", 210
32 | MENUITEM "Inventory", 211
33 | MENUITEM "Equipment", 212
34 | MENUITEM "Combat Rolls", 213
35 | MENUITEM "Recall", 214
36 | MENUITEM "Character", 215
37 | MENUITEM "Messages", 216
38 | MENUITEM "Monster List", 217
39 | }
40 |
41 | }
42 |
43 | POPUP "&Options"
44 | {
45 | POPUP "&Graphics"
46 | {
47 | MENUITEM "&None", 400
48 | MENUITEM "&MicroChasm tiles", 402
49 | }
50 |
51 | MENUITEM "&Sound", 410
52 | MENUITEM SEPARATOR
53 | MENUITEM "&Map", 420
54 | }
55 |
56 | }
57 |
58 | ANGBAND ICON "sil.ico"
59 |
60 |
--------------------------------------------------------------------------------
/src/unix2dos:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if [ "$1" = "" ]
4 | then
5 | echo "Usage: $0 filename1 filename2...."
6 | exit
7 | fi
8 |
9 | FILES="$@"
10 |
11 | changeit () {
12 | OLDNAME="$file"
13 | NEWNAME="$file.tmp_$$"
14 | awk '{sub("\r$",""); printf "%s\r\n", $0}' $OLDNAME > $NEWNAME
15 | mv $NEWNAME $OLDNAME
16 | }
17 |
18 | for file in $FILES
19 | do
20 | changeit
21 | done
--------------------------------------------------------------------------------
/src/unix2doslib:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ./unix2dos ../lib/*/*.txt
4 | ./unix2dos ../lib/*/*.prf
--------------------------------------------------------------------------------
/src/z-form.h:
--------------------------------------------------------------------------------
1 | /* File: z-form.h */
2 |
3 | /*
4 | * Copyright (c) 1997 Ben Harrison
5 | *
6 | * This software may be copied and distributed for educational, research,
7 | * and not for profit purposes provided that this copyright and statement
8 | * are included in all such copies.
9 | */
10 |
11 | #ifndef INCLUDED_Z_FORM_H
12 | #define INCLUDED_Z_FORM_H
13 |
14 | #include "h-basic.h"
15 |
16 | /*
17 | * This file provides functions very similar to "sprintf()", but which
18 | * not only parse some additional "format sequences", but also enforce
19 | * bounds checking, and allow repeated "appends" to the same buffer.
20 | *
21 | * See "z-form.c" for more detailed information about the routines,
22 | * including a list of the legal "format sequences".
23 | *
24 | * This file makes use of both "z-util.c" and "z-virt.c"
25 | */
26 |
27 | /**** Available Functions ****/
28 |
29 | /* Format arguments into given bounded-length buffer */
30 | extern size_t vstrnfmt(char* buf, size_t max, cptr fmt, va_list vp);
31 |
32 | /* Simple interface to "vstrnfmt()" */
33 | extern size_t strnfmt(char* buf, size_t max, cptr fmt, ...);
34 |
35 | /* Format arguments into a static resizing buffer */
36 | extern char* vformat(cptr fmt, va_list vp);
37 |
38 | /* Free the memory allocated for the format buffer */
39 | extern void vformat_kill(void);
40 |
41 | /* Append a formatted string to another string */
42 | extern void strnfcat(char* str, size_t max, size_t* end, cptr fmt, ...);
43 |
44 | /* Simple interface to "vformat()" */
45 | extern char* format(cptr fmt, ...);
46 |
47 | /* Vararg interface to "plog()", using "format()" */
48 | extern void plog_fmt(cptr fmt, ...);
49 |
50 | /* Vararg interface to "quit()", using "format()" */
51 | extern void quit_fmt(cptr fmt, ...);
52 |
53 | /* Vararg interface to "core()", using "format()" */
54 | extern void core_fmt(cptr fmt, ...);
55 |
56 | #endif
57 |
--------------------------------------------------------------------------------
/src/z-rand.h:
--------------------------------------------------------------------------------
1 | /* File: z-rand.h */
2 |
3 | /*
4 | * Copyright (c) 1997 Ben Harrison, and others
5 | *
6 | * This software may be copied and distributed for educational, research,
7 | * and not for profit purposes provided that this copyright and statement
8 | * are included in all such copies. Other copyrights may also apply.
9 | */
10 |
11 | #ifndef INCLUDED_Z_RAND_H
12 | #define INCLUDED_Z_RAND_H
13 |
14 | #include "h-basic.h"
15 |
16 | /**** Available constants ****/
17 |
18 | /*
19 | * The "degree" of the "complex" Random Number Generator.
20 | * This value is hard-coded at 63 for a wide variety of reasons.
21 | */
22 | #define RAND_DEG 63
23 |
24 | /**** Available macros ****/
25 |
26 | /*
27 | * Generates a random long integer X where O<=X 0 ? X : 1) == 0)
67 |
68 | /*
69 | * An X percent chance
70 | */
71 | #define percent_chance(X) (rand_int(100) < X)
72 |
73 | /**** Available Variables ****/
74 |
75 | extern bool Rand_quick;
76 | extern u32b Rand_value;
77 | extern u16b Rand_place;
78 | extern u32b Rand_state[RAND_DEG];
79 |
80 | /**** Available Functions ****/
81 |
82 | extern void Rand_state_init(u32b seed);
83 | extern u32b Rand_div(u32b m);
84 | extern s16b Rand_normal(int mean, int stand);
85 | extern u32b Rand_simple(u32b m);
86 | extern s32b div_round(s32b n, s32b d);
87 |
88 | #endif /* INCLUDED_Z_RAND_H */
89 |
--------------------------------------------------------------------------------
/src/z-util.c:
--------------------------------------------------------------------------------
1 | /* File: z-util.c */
2 |
3 | /*
4 | * Copyright (c) 1997 Ben Harrison
5 | *
6 | * This software may be copied and distributed for educational, research,
7 | * and not for profit purposes provided that this copyright and statement
8 | * are included in all such copies.
9 | */
10 |
11 | /* Purpose: Low level utilities -BEN- */
12 |
13 | #include "z-util.h"
14 |
15 | /*
16 | * Convenient storage of the program name
17 | */
18 | cptr argv0 = NULL;
19 |
20 | /*
21 | * Case insensitive comparison between two strings
22 |
23 | */
24 | int my_stricmp(const char* s1, const char* s2)
25 | {
26 | char ch1 = 0;
27 | char ch2 = 0;
28 |
29 | /* Just loop */
30 | while (TRUE)
31 | {
32 | /* We've reached the end of both strings simultaneously */
33 | if ((*s1 == 0) && (*s2 == 0))
34 | {
35 | /* We're still here, so s1 and s2 are equal */
36 | return (0);
37 | }
38 |
39 | ch1 = toupper(*s1);
40 | ch2 = toupper(*s2);
41 |
42 | /* If the characters don't match */
43 | if (ch1 != ch2)
44 | {
45 | /* return the difference between them */
46 | return ((int)(ch1 - ch2));
47 | }
48 |
49 | /* Step on through both strings */
50 | s1++;
51 | s2++;
52 | }
53 |
54 | return (0);
55 | }
56 |
57 | /*
58 | * Case insensitive comparison between the first n characters of two strings
59 | */
60 | int my_strnicmp(cptr a, cptr b, int n)
61 | {
62 | cptr s1, s2;
63 | char z1, z2;
64 |
65 | /* Scan the strings */
66 | for (s1 = a, s2 = b; n > 0; s1++, s2++, n--)
67 | {
68 | z1 = toupper((unsigned char)*s1);
69 | z2 = toupper((unsigned char)*s2);
70 | if (z1 < z2)
71 | return (-1);
72 | if (z1 > z2)
73 | return (1);
74 | if (!z1)
75 | return (0);
76 | }
77 |
78 | return 0;
79 | }
80 |
81 | /*
82 | * The my_strcpy() function copies up to 'bufsize'-1 characters from 'src'
83 | * to 'buf' and NUL-terminates the result. The 'buf' and 'src' strings may
84 | * not overlap.
85 | *
86 | * my_strcpy() returns strlen(src). This makes checking for truncation
87 | * easy. Example: if (my_strcpy(buf, src, sizeof(buf)) >= sizeof(buf)) ...;
88 | *
89 | * This function should be equivalent to the strlcpy() function in BSD.
90 | */
91 | size_t my_strcpy(char* buf, const char* src, size_t bufsize)
92 | {
93 | size_t len = strlen(src);
94 | size_t ret = len;
95 |
96 | /* Paranoia */
97 | if (bufsize == 0)
98 | return ret;
99 |
100 | /* Truncate */
101 | if (len >= bufsize)
102 | len = bufsize - 1;
103 |
104 | /* Copy the string and terminate it */
105 | (void)memcpy(buf, src, len);
106 | buf[len] = '\0';
107 |
108 | /* Return strlen(src) */
109 | return ret;
110 | }
111 |
112 | /*
113 | * The my_strcat() tries to append a string to an existing NUL-terminated
114 | * string. It never writes more characters into the buffer than indicated by
115 | * 'bufsize' and NUL-terminates the buffer. The 'buf' and 'src' strings may not
116 | * overlap.
117 | *
118 | * my_strcat() returns strlen(buf) + strlen(src). This makes checking for
119 | * truncation easy. Example:
120 | * if (my_strcat(buf, src, sizeof(buf)) >= sizeof(buf)) ...;
121 | *
122 | * This function should be equivalent to the strlcat() function in BSD.
123 | */
124 | size_t my_strcat(char* buf, const char* src, size_t bufsize)
125 | {
126 | size_t dlen = strlen(buf);
127 |
128 | /* Is there room left in the buffer? */
129 | if (dlen < bufsize - 1)
130 | {
131 | /* Append as much as possible */
132 | return (dlen + my_strcpy(buf + dlen, src, bufsize - dlen));
133 | }
134 | else
135 | {
136 | /* Return without appending */
137 | return (dlen + strlen(src));
138 | }
139 | }
140 |
141 | /*
142 | * Determine if string "a" is equal to string "b"
143 | */
144 | bool streq(cptr a, cptr b) { return (!strcmp(a, b)); }
145 |
146 | /*
147 | * Determine if string "t" is a suffix of string "s"
148 | */
149 | bool suffix(cptr s, cptr t)
150 | {
151 | size_t tlen = strlen(t);
152 | size_t slen = strlen(s);
153 |
154 | /* Check for incompatible lengths */
155 | if (tlen > slen)
156 | return (FALSE);
157 |
158 | /* Compare "t" to the end of "s" */
159 | return (!strcmp(s + slen - tlen, t));
160 | }
161 |
162 | /*
163 | * Determine if string "t" is a prefix of string "s"
164 | */
165 | bool prefix(cptr s, cptr t)
166 | {
167 | /* Scan "t" */
168 | while (*t)
169 | {
170 | /* Compare content and length */
171 | if (*t++ != *s++)
172 | return (FALSE);
173 | }
174 |
175 | /* Matched, we have a prefix */
176 | return (TRUE);
177 | }
178 |
179 | /*
180 | * Redefinable "plog" action
181 | */
182 | void (*plog_aux)(cptr) = NULL;
183 |
184 | /*
185 | * Print (or log) a "warning" message (ala "perror()")
186 | * Note the use of the (optional) "plog_aux" hook.
187 | */
188 | void plog(cptr str)
189 | {
190 | /* Use the "alternative" function if possible */
191 | if (plog_aux)
192 | (*plog_aux)(str);
193 |
194 | /* Just do a labeled fprintf to stderr */
195 | else
196 | (void)(fprintf(stderr, "%s: %s\n", argv0 ? argv0 : "?", str));
197 | }
198 |
199 | /*
200 | * Redefinable "quit" action
201 | */
202 | void (*quit_aux)(cptr) = NULL;
203 |
204 | /*
205 | * Exit (ala "exit()"). If 'str' is NULL, do "exit(0)".
206 | * If 'str' begins with "+" or "-", do "exit(atoi(str))".
207 | * Otherwise, plog() 'str' and exit with an error code of -1.
208 | * But always use 'quit_aux', if set, before anything else.
209 | */
210 | void quit(cptr str)
211 | {
212 | /* Attempt to use the aux function */
213 | if (quit_aux)
214 | (*quit_aux)(str);
215 |
216 | /* Success */
217 | if (!str)
218 | (void)(exit(0));
219 |
220 | /* Extract a "special error code" */
221 | if ((str[0] == '-') || (str[0] == '+'))
222 | (void)(exit(atoi(str)));
223 |
224 | /* Send the string to plog() */
225 | plog(str);
226 |
227 | /* Failure */
228 | (void)(exit(EXIT_FAILURE));
229 | }
230 |
231 | /*
232 | * Redefinable "core" action
233 | */
234 | void (*core_aux)(cptr) = NULL;
235 |
236 | /*
237 | * Dump a core file, after printing a warning message
238 | * As with "quit()", try to use the "core_aux()" hook first.
239 | */
240 | void core(cptr str)
241 | {
242 | char* crash = NULL;
243 |
244 | /* Use the aux function */
245 | if (core_aux)
246 | (*core_aux)(str);
247 |
248 | /* Dump the warning string */
249 | if (str)
250 | plog(str);
251 |
252 | /* Attempt to Crash */
253 | (*crash) = (*crash);
254 |
255 | /* Be sure we exited */
256 | quit("core() failed");
257 | }
258 |
--------------------------------------------------------------------------------
/src/z-util.h:
--------------------------------------------------------------------------------
1 | /* File: z-util.h */
2 |
3 | /*
4 | * Copyright (c) 1997 Ben Harrison
5 | *
6 | * This software may be copied and distributed for educational, research,
7 | * and not for profit purposes provided that this copyright and statement
8 | * are included in all such copies.
9 | */
10 |
11 | #ifndef INCLUDED_Z_UTIL_H
12 | #define INCLUDED_Z_UTIL_H
13 |
14 | #include "h-basic.h"
15 |
16 | /*
17 | * Extremely basic stuff, like global temp and constant variables.
18 | * Also, some very useful low level functions, such as "streq()".
19 | * All variables and functions in this file are "addressable".
20 | */
21 |
22 | /**** Available variables ****/
23 |
24 | /* A cptr to the name of the program */
25 | extern cptr argv0;
26 |
27 | /* Aux functions */
28 | extern void (*plog_aux)(cptr);
29 | extern void (*quit_aux)(cptr);
30 | extern void (*core_aux)(cptr);
31 |
32 | /**** Available Functions ****/
33 |
34 | /* Case insensitive comparison between two strings */
35 | extern int my_stricmp(const char* s1, const char* s2);
36 | extern int my_strnicmp(cptr a, cptr b, int n);
37 |
38 | /* Copy a string */
39 | extern size_t my_strcpy(char* buf, const char* src, size_t bufsize);
40 |
41 | /* Concatenate two strings */
42 | extern size_t my_strcat(char* buf, const char* src, size_t bufsize);
43 |
44 | /* Test equality, prefix, suffix */
45 | extern bool streq(cptr s, cptr t);
46 | extern bool prefix(cptr s, cptr t);
47 | extern bool suffix(cptr s, cptr t);
48 |
49 | /* Print an error message */
50 | extern void plog(cptr str);
51 |
52 | /* Exit, with optional message */
53 | extern void quit(cptr str);
54 |
55 | /* Dump core, with optional message */
56 | extern void core(cptr str);
57 |
58 | #endif
59 |
--------------------------------------------------------------------------------
/src/z-virt.c:
--------------------------------------------------------------------------------
1 | /* File: z-virt.c */
2 |
3 | /*
4 | * Copyright (c) 1997 Ben Harrison
5 | *
6 | * This software may be copied and distributed for educational, research,
7 | * and not for profit purposes provided that this copyright and statement
8 | * are included in all such copies.
9 | */
10 |
11 | /* Purpose: Memory management routines -BEN- */
12 |
13 | #include "z-virt.h"
14 |
15 | #include "z-util.h"
16 |
17 | /*
18 | * Optional auxiliary "rpanic" function
19 | */
20 | void* (*rpanic_aux)(size_t) = NULL;
21 |
22 | /*
23 | * The system is out of memory, so panic. If "rpanic_aux" is set,
24 | * it can be used to free up some memory and do a new "ralloc()",
25 | * or if not, it can be used to save things, clean up, and exit.
26 | * By default, this function simply crashes the computer.
27 | */
28 | void* rpanic(size_t len)
29 | {
30 | /* Hopefully, we have a real "panic" function */
31 | if (rpanic_aux)
32 | return ((*rpanic_aux)(len));
33 |
34 | /* Attempt to crash before icky things happen */
35 | core("Out of Memory!");
36 |
37 | /* Paranoia */
38 | return (NULL);
39 | }
40 |
41 | /*
42 | * Optional auxiliary "ralloc" function
43 | */
44 | void* (*ralloc_aux)(size_t) = NULL;
45 |
46 | /*
47 | * Allocate some memory
48 | */
49 | void* ralloc(size_t len)
50 | {
51 | void* mem;
52 |
53 | /* Allow allocation of "zero bytes" */
54 | if (len == 0)
55 | return (NULL);
56 |
57 | /* Use the aux function if set */
58 | if (ralloc_aux)
59 | mem = (*ralloc_aux)(len);
60 |
61 | /* Use malloc() to allocate some memory */
62 | else
63 | mem = malloc(len);
64 |
65 | /* We were able to acquire memory */
66 | if (!mem)
67 | mem = rpanic(len);
68 |
69 | /* Return the memory, if any */
70 | return (mem);
71 | }
72 |
73 | /*
74 | * Optional auxiliary "rnfree" function
75 | */
76 | void* (*rnfree_aux)(void*) = NULL;
77 |
78 | /*
79 | * Free some memory (allocated by ralloc), return NULL
80 | */
81 | void* rnfree(void* p)
82 | {
83 | /* Easy to free nothing */
84 | if (!p)
85 | return (NULL);
86 |
87 | /* Use the "aux" function */
88 | if (rnfree_aux)
89 | return ((*rnfree_aux)(p));
90 |
91 | /* Use "free" */
92 | free(p);
93 |
94 | /* Done */
95 | return (NULL);
96 | }
97 |
98 | /*
99 | * Allocate a constant string, containing the same thing as 'str'
100 | */
101 | cptr string_make(cptr str)
102 | {
103 | char* res;
104 |
105 | /* Simple sillyness */
106 | if (!str)
107 | return (str);
108 |
109 | /* Allocate space for the string including terminator */
110 | res = ralloc(strlen(str) + 1);
111 |
112 | /* Copy the string (with terminator) */
113 | strcpy(res, str);
114 |
115 | /* Return the allocated and initialized string */
116 | return (res);
117 | }
118 |
119 | /*
120 | * Un-allocate a string allocated above.
121 | */
122 | errr string_free(cptr str)
123 | {
124 | /* Succeed on non-strings */
125 | if (!str)
126 | return (0);
127 |
128 | /* Kill the buffer of chars we must have allocated above */
129 | (void)rnfree((void*)str);
130 |
131 | /* Success */
132 | return (0);
133 | }
134 |
--------------------------------------------------------------------------------
/src/z-virt.h:
--------------------------------------------------------------------------------
1 | /* File: z-virt.h */
2 |
3 | /*
4 | * Copyright (c) 1997 Ben Harrison
5 | *
6 | * This software may be copied and distributed for educational, research,
7 | * and not for profit purposes provided that this copyright and statement
8 | * are included in all such copies.
9 | */
10 |
11 | #ifndef INCLUDED_Z_VIRT_H
12 | #define INCLUDED_Z_VIRT_H
13 |
14 | #include "h-basic.h"
15 |
16 | /*
17 | * Memory management routines.
18 | *
19 | * Set ralloc_aux to modify the memory allocation routine.
20 | * Set rnfree_aux to modify the memory de-allocation routine.
21 | * Set rpanic_aux to let the program react to memory failures.
22 | *
23 | * These routines work best as a *replacement* for malloc/free.
24 | *
25 | * The string_make() and string_free() routines handle dynamic strings.
26 | * A dynamic string is a string allocated at run-time, which should not
27 | * be modified once it has been created.
28 | *
29 | * Note the macros below which simplify the details of allocation,
30 | * deallocation, setting, clearing, casting, size extraction, etc.
31 | *
32 | * The macros MAKE/C_MAKE and KILL have a "procedural" metaphor,
33 | * and they actually modify their arguments.
34 | *
35 | * Note that, for some reason, some allocation macros may disallow
36 | * "stars" in type names, but you can use typedefs to circumvent
37 | * this. For example, instead of "type **p; MAKE(p,type*);" you
38 | * can use "typedef type *type_ptr; type_ptr *p; MAKE(p,type_ptr)".
39 | *
40 | * Note that it is assumed that "memset()" will function correctly,
41 | * in particular, that it returns its first argument.
42 | */
43 |
44 | /**** Available macros ****/
45 |
46 | /* Size of 'N' things of type 'T' */
47 | #define C_SIZE(N, T) ((N) * (sizeof(T)))
48 |
49 | /* Size of one thing of type 'T' */
50 | #define SIZE(T) (sizeof(T))
51 |
52 | /* Compare two arrays of type T[N], at locations P1 and P2 */
53 | #define C_DIFF(P1, P2, N, T) (memcmp((P1), (P2), C_SIZE(N, T)))
54 |
55 | /* Compare two things of type T, at locations P1 and P2 */
56 | #define DIFF(P1, P2, T) (memcmp((P1), (P2), SIZE(T)))
57 |
58 | /* Set every byte in an array of type T[N], at location P, to V, and return P */
59 | #define C_BSET(P, V, N, T) (memset((P), (V), C_SIZE(N, T)))
60 |
61 | /* Set every byte in a thing of type T, at location P, to V, and return P */
62 | #define BSET(P, V, T) (memset((P), (V), SIZE(T)))
63 |
64 | /* Wipe an array of type T[N], at location P, and return P */
65 | #define C_WIPE(P, N, T) (memset((P), 0, C_SIZE(N, T)))
66 |
67 | /* Wipe a thing of type T, at location P, and return P */
68 | #define WIPE(P, T) (memset((P), 0, SIZE(T)))
69 |
70 | /* Load an array of type T[N], at location P1, from another, at location P2 */
71 | #define C_COPY(P1, P2, N, T) (memcpy((P1), (P2), C_SIZE(N, T)))
72 |
73 | /* Load a thing of type T, at location P1, from another, at location P2 */
74 | #define COPY(P1, P2, T) (memcpy((P1), (P2), SIZE(T)))
75 |
76 | /* Allocate, and return, an array of type T[N] */
77 | #define C_RNEW(N, T) (ralloc(C_SIZE(N, T)))
78 |
79 | /* Allocate, and return, a thing of type T */
80 | #define RNEW(T) (ralloc(SIZE(T)))
81 |
82 | /* Allocate, wipe, and return an array of type T[N] */
83 | #define C_ZNEW(N, T) (C_WIPE(C_RNEW(N, T), N, T))
84 |
85 | /* Allocate, wipe, and return a thing of type T */
86 | #define ZNEW(T) (WIPE(RNEW(T), T))
87 |
88 | /* Allocate a wiped array of type T[N], assign to pointer P */
89 | #define C_MAKE(P, N, T) ((P) = C_ZNEW(N, T))
90 |
91 | /* Allocate a wiped thing of type T, assign to pointer P */
92 | #define MAKE(P, T) ((P) = ZNEW(T))
93 |
94 | /* Free one thing at P, return NULL */
95 | #define FREE(P) (rnfree(P))
96 |
97 | /* Free a thing at location P and set P to NULL */
98 | #define KILL(P) ((P) = FREE(P))
99 |
100 | /**** Available variables ****/
101 |
102 | /* Replacement hook for "rnfree()" */
103 | extern void* (*rnfree_aux)(void*);
104 |
105 | /* Replacement hook for "rpanic()" */
106 | extern void* (*rpanic_aux)(size_t);
107 |
108 | /* Replacement hook for "ralloc()" */
109 | extern void* (*ralloc_aux)(size_t);
110 |
111 | /**** Available functions ****/
112 |
113 | /* De-allocate memory */
114 | extern void* rnfree(void* p);
115 |
116 | /* Panic, attempt to allocate 'len' bytes */
117 | extern void* rpanic(size_t len);
118 |
119 | /* Allocate (and return) 'len', or dump core */
120 | extern void* ralloc(size_t len);
121 |
122 | /* Create a "dynamic string" */
123 | extern cptr string_make(cptr str);
124 |
125 | /* Free a string allocated with "string_make()" */
126 | extern errr string_free(cptr str);
127 |
128 | #endif /* INCLUDED_Z_VIRT_H */
129 |
--------------------------------------------------------------------------------