History

convert monstdata array to ndb file, make monsters by name. make some types more consistent

mischief committed 11 years ago

Commit 4bbc7bc1 parent c99276c11 files · +312 −134Browse files

Showing the changes to hack9.c (1 of 11 files). Show all

Unified · Split

hack9.c+7−1
@@ -107,6 +107,7 @@ usage(void) · 106 unmodified lines
107void107void
108threadmain(int argc, char *argv[])108threadmain(int argc, char *argv[])
109{109{
110 char buf[256];
110 /* of viewport, in size of tiles */111 /* of viewport, in size of tiles */
111 Tile *t;112 Tile *t;
112 Level *level;113 Level *level;
@@ -129,6 +130,11 @@ threadmain(int argc, char *argv[]) · 16 unmodified lines
129 130
130 uiinit(argv0);131 uiinit(argv0);
131 132
133 snprint(buf, sizeof(buf), "%s/lib/hack9/%s", home, "monster.ndb");
134 if(monstdbopen(buf) < 0)
135 if(monstdbopen("monster.ndb") < 0)
136 sysfatal("monstdbopen: %r");
137
132 /* initial level */138 /* initial level */
133 if(debug > 0){139 if(debug > 0){
134 if((level = genlevel(11, 11, 0)) == nil)140 if((level = genlevel(11, 11, 0)) == nil)
@@ -139,7 +145,7 @@ threadmain(int argc, char *argv[]) · 4 unmodified lines
139 }145 }
140 146
141 /* the player */147 /* the player */
142 player = monst(TWIZARD);148 player = mbyname("wizard");
143 if(player == nil)149 if(player == nil)
144 sysfatal("monst: %r");150 sysfatal("monst: %r");
145 151

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t