Simplify some dependencies.
This commit is contained in:
parent
75bc031b46
commit
a6ec8a9595
4 changed files with 4 additions and 7 deletions
1
advent.h
1
advent.h
|
@ -21,7 +21,6 @@
|
|||
|
||||
#define LINESIZE 1024
|
||||
#define TOKLEN 5 // # outputting characters in a token */
|
||||
#define NDWARVES 6 // number of dwarves
|
||||
#define PIRATE NDWARVES // must be NDWARVES-1 when zero-origin
|
||||
#define DALTLC LOC_NUGGET // alternate dwarf location
|
||||
#define INVLIMIT 7 // inventory limit (# of objects)
|
||||
|
|
3
init.c
3
init.c
|
@ -46,8 +46,7 @@ int initialise(void)
|
|||
int seedval = (int)rand();
|
||||
set_seed(seedval);
|
||||
|
||||
assert(NDWARVES == NDWARFLOCS);
|
||||
for (int i = 1; i <= NDWARFLOCS; i++) {
|
||||
for (int i = 1; i <= NDWARVES; i++) {
|
||||
game.dwarves[i].loc = dwarflocs[i-1];
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,6 @@ const travelop_t travel[] = {{
|
|||
const char *ignore = "{ignore}";
|
||||
|
||||
/* Dwarf starting locations */
|
||||
const int dwarflocs[NDWARFLOCS] = {{{dwarflocs}}};
|
||||
const int dwarflocs[NDWARVES] = {{{dwarflocs}}};
|
||||
|
||||
/* end */
|
||||
|
|
|
@ -35,9 +35,8 @@ SPDX-License-Identifier: BSD-2-Clause
|
|||
#define COND_HOGRE 20 /* Trying to deal with ogre */
|
||||
#define COND_HJADE 21 /* Found all treasures except jade */
|
||||
|
||||
/* Count of dwarf starting locations */
|
||||
#define NDWARFLOCS {ndwarflocs}
|
||||
extern const int dwarflocs[NDWARFLOCS];
|
||||
#define NDWARVES {ndwarflocs} // number of dwarves
|
||||
extern const int dwarflocs[NDWARVES];
|
||||
|
||||
typedef struct {{
|
||||
const char** strs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue