New journal event command
Redundant information, but makes the journal easier to read. The redundancy might help making a journal replay tool robust. Put it in Hvy Metal II now to gather some real data.
This commit is contained in:
parent
2fb427b676
commit
1c1fa720d4
3 changed files with 11 additions and 0 deletions
|
@ -41,6 +41,7 @@ void journal_login(void);
|
||||||
void journal_logout(void);
|
void journal_logout(void);
|
||||||
void journal_prng(unsigned);
|
void journal_prng(unsigned);
|
||||||
void journal_input(char *);
|
void journal_input(char *);
|
||||||
|
void journal_command(char *);
|
||||||
void journal_update(int);
|
void journal_update(int);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "com.h"
|
#include "com.h"
|
||||||
#include "empio.h"
|
#include "empio.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
#include "journal.h"
|
||||||
#include "match.h"
|
#include "match.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "nat.h"
|
#include "nat.h"
|
||||||
|
@ -102,6 +103,7 @@ dispatch(char *buf, char *redir)
|
||||||
uprnf(buf);
|
uprnf(buf);
|
||||||
pr("\n");
|
pr("\n");
|
||||||
}
|
}
|
||||||
|
journal_command(command->c_form);
|
||||||
switch (command->c_addr()) {
|
switch (command->c_addr()) {
|
||||||
case RET_OK:
|
case RET_OK:
|
||||||
player->btused += command->c_cost;
|
player->btused += command->c_cost;
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
* prng NAME SEED
|
* prng NAME SEED
|
||||||
* login CNUM HOSTADDR USER
|
* login CNUM HOSTADDR USER
|
||||||
* logout CNUM
|
* logout CNUM
|
||||||
|
* command NAME
|
||||||
* input INPUT
|
* input INPUT
|
||||||
* update ETU
|
* update ETU
|
||||||
*/
|
*/
|
||||||
|
@ -173,6 +174,13 @@ journal_input(char *input)
|
||||||
journal_entry("input %s", input);
|
journal_entry("input %s", input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
journal_command(char *cmd)
|
||||||
|
{
|
||||||
|
char *eptr = strchr(cmd, ' ');
|
||||||
|
journal_entry("command %.*s", eptr ? (int)(eptr - cmd) : -1, cmd);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
journal_update(int etu)
|
journal_update(int etu)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue