projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3178f5d
)
More retrofitting.
author
Jason S. Ninneman
<jsn@mbar.us>
Sun, 11 Jun 2017 18:58:12 +0000
(11:58 -0700)
committer
Jason S. Ninneman
<jsn@mbar.us>
Sun, 11 Jun 2017 22:42:25 +0000
(15:42 -0700)
init.c
patch
|
blob
|
history
score.c
patch
|
blob
|
history
diff --git
a/init.c
b/init.c
index aae770424558e6f21c1ada2f4099bb4f1df5d97b..cabe574a588b4557ffd329ad16cab91e6369dea8 100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-5,6
+5,7
@@
#include "advent.h"
#include "database.h"
#include "advent.h"
#include "database.h"
+#include "newdb.h"
/*
* Initialisation
/*
* Initialisation
@@
-183,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;
}
@@
-218,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];
}
diff --git
a/score.c
b/score.c
index b1e0d7af13f4e615bdbe4c0e46b6c63afb63bd37..cc482ff5d94f4ec0430e433f9754ac7680f8e87d 100644
(file)
--- a/
score.c
+++ b/
score.c
@@
-1,6
+1,7
@@
#include <stdlib.h>
#include "advent.h"
#include "database.h"
#include <stdlib.h>
#include "advent.h"
#include "database.h"
+#include "newdb.h"
/*
* scoring and wrap-up
/*
* scoring and wrap-up
@@
-33,7
+34,7
@@
void score(long mode)
/* First tally up the treasures. Must be in building and not broken.
* Give the poor guy 2 points just for finding each treasure. */
for (i=MINTRS; i<=MAXTRS; i++) {
/* First tally up the treasures. Must be in building and not broken.
* Give the poor guy 2 points just for finding each treasure. */
for (i=MINTRS; i<=MAXTRS; i++) {
- if(
PTEXT[i]
!= 0) {
+ if(
object_descriptions[i].inventory
!= 0) {
k=12;
if(i == CHEST)k=14;
if(i > CHEST)k=16;
k=12;
if(i == CHEST)k=14;
if(i > CHEST)k=16;
@@
-109,7
+110,7
@@
void score(long mode)
RSPEAK(262);
for (i=1; i<=CLSSES; i++) {
if(CVAL[i] >= score) {
RSPEAK(262);
for (i=1; i<=CLSSES; i++) {
if(CVAL[i] >= score) {
-
SPEAK(CTEXT
[i]);
+
newspeak(class_messages
[i]);
i=CVAL[i]+1-score;
SETPRM(1,i,i);
RSPEAK(263);
i=CVAL[i]+1-score;
SETPRM(1,i,i);
RSPEAK(263);