Retrofit RSPEAK() and PSPEAK().
This commit is contained in:
parent
291ec54462
commit
c7ca4ee73c
1 changed files with 6 additions and 14 deletions
20
misc.c
20
misc.c
|
@ -8,6 +8,7 @@
|
||||||
#include "advent.h"
|
#include "advent.h"
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "linenoise/linenoise.h"
|
#include "linenoise/linenoise.h"
|
||||||
|
#include "newdb.h"
|
||||||
|
|
||||||
/* I/O routines (SPEAK, PSPEAK, RSPEAK, SETPRM, GETIN, YES) */
|
/* I/O routines (SPEAK, PSPEAK, RSPEAK, SETPRM, GETIN, YES) */
|
||||||
|
|
||||||
|
@ -137,25 +138,16 @@ void PSPEAK(vocab_t msg,int skip)
|
||||||
* the index of the inventory message for object. (INVEN+N+1 message
|
* the index of the inventory message for object. (INVEN+N+1 message
|
||||||
* is game.prop=N message). */
|
* is game.prop=N message). */
|
||||||
{
|
{
|
||||||
long i, m;
|
if (skip >= 0)
|
||||||
|
newspeak(object_descriptions[msg].longs[skip]);
|
||||||
m=PTEXT[msg];
|
else
|
||||||
if (skip >= 0) {
|
newspeak(object_descriptions[msg].inventory);
|
||||||
for (i=0; i <=skip; i++) {
|
|
||||||
do {
|
|
||||||
m=labs(LINES[m]);
|
|
||||||
} while
|
|
||||||
(LINES[m] >= 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SPEAK(m);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSPEAK(vocab_t i)
|
void RSPEAK(vocab_t i)
|
||||||
/* Print the i-th "random" message (section 6 of database). */
|
/* Print the i-th "random" message (section 6 of database). */
|
||||||
{
|
{
|
||||||
if (i != 0)
|
newspeak(arbitrary_messages[i]);
|
||||||
SPEAK(RTEXT[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SETPRM(long first, long p1, long p2)
|
void SETPRM(long first, long p1, long p2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue