projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code simplification.
[open-adventure.git]
/
init.c
diff --git
a/init.c
b/init.c
index 5d44be5c8fe37cd7d8fcb21cc8f4a72ed4942caf..1752553b0f93c747be489779a09680aab892b904 100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-4,8
+4,8
@@
#include <stdbool.h>
#include "advent.h"
#include <stdbool.h>
#include "advent.h"
-#include "funcs.h"
#include "database.h"
#include "database.h"
+#include "newdb.h"
/*
* Initialisation
/*
* Initialisation
@@
-184,7
+184,7
@@
void initialise(void)
for (i=1; i<=LOCSIZ; i++) {
game.abbrev[i]=0;
for (i=1; i<=LOCSIZ; i++) {
game.abbrev[i]=0;
- if (!(
LTEXT
[i] == 0 || KEY[i] == 0)) {
+ if (!(
long_location_descriptions
[i] == 0 || KEY[i] == 0)) {
k=KEY[i];
if(MOD(labs(TRAVEL[k]),1000) == 1)COND[i]=2;
}
k=KEY[i];
if(MOD(labs(TRAVEL[k]),1000) == 1)COND[i]=2;
}
@@
-219,7
+219,7
@@
void initialise(void)
* not yet found, so we know when to close the cave. */
game.tally=0;
for (i=MINTRS; i<=MAXTRS; i++) {
* not yet found, so we know when to close the cave. */
game.tally=0;
for (i=MINTRS; i<=MAXTRS; i++) {
- if(
PTEXT[i]
!= 0)
+ if(
object_descriptions[i].inventory
!= 0)
game.prop[i]= -1;
game.tally=game.tally-game.prop[i];
}
game.prop[i]= -1;
game.tally=game.tally-game.prop[i];
}
@@
-369,11
+369,6
@@
void initialise(void)
game.knfloc=0;
game.detail=0;
game.abbnum=5;
game.knfloc=0;
game.detail=0;
game.abbnum=5;
- for (i=0; i<=4; i++) {
- long x = 2*i+81;
- if(RTEXT[x] != 0)
- MAXDIE=i+1;
- }
game.numdie=0;
game.holdng=0;
game.dkill=0;
game.numdie=0;
game.holdng=0;
game.dkill=0;
@@
-388,6
+383,5
@@
void initialise(void)
game.closed=false;
game.clshnt=false;
game.novice=false;
game.closed=false;
game.clshnt=false;
game.novice=false;
- game.setup=1;
game.blklin=true;
}
game.blklin=true;
}