home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add "look" mode to query things on any cell via new THINGS_HERE command.
[plomrogue]
/
src
/
client
/
io.c
diff --git
a/src/client/io.c
b/src/client/io.c
index a46f91ff65c9cd00876cd392454ae2e922c1e1a4..45a1de7ae6fe17d5c4973c172a8c453b6319adf4 100644
(file)
--- a/
src/client/io.c
+++ b/
src/client/io.c
@@
-259,31
+259,31
@@
static void nl_append_string(char * append, char ** string)
static uint8_t read_queue()
{
static uint8_t read_queue()
{
- static uint8_t things_
below_player
_parsing = 0;
+ static uint8_t things_
here
_parsing = 0;
uint8_t ret = 0;
char * msg;
while (NULL != (msg = get_message_from_queue(&world.queue)))
{
char * log_prefix = "LOG ";
uint8_t ret = 0;
char * msg;
while (NULL != (msg = get_message_from_queue(&world.queue)))
{
char * log_prefix = "LOG ";
- if (!strcmp(msg, "THINGS_
BELOW_PLAYER
START"))
+ if (!strcmp(msg, "THINGS_
HERE
START"))
{
ret = 1;
{
ret = 1;
- things_
below_player
_parsing = 1;
- free(world.things_
below_player
);
- world.things_
below_player
= NULL;
+ things_
here
_parsing = 1;
+ free(world.things_
here
);
+ world.things_
here
= NULL;
}
}
- else if (!strcmp(msg, "THINGS_
BELOW_PLAYER
END"))
+ else if (!strcmp(msg, "THINGS_
HERE
END"))
{
{
- things_
below_player
_parsing = 0;
- if (!world.things_
below_player
)
+ things_
here
_parsing = 0;
+ if (!world.things_
here
)
{
{
- nl_append_string("(no
thing)", &world.things_below_player
);
+ nl_append_string("(no
ne known)", &world.things_here
);
}
}
}
}
- else if (things_
below_player
_parsing)
+ else if (things_
here
_parsing)
{
ret = 1;
{
ret = 1;
- nl_append_string(msg, &world.things_
below_player
);
+ nl_append_string(msg, &world.things_
here
);
}
else if (!strncmp(msg, log_prefix, strlen(log_prefix)))
{
}
else if (!strncmp(msg, log_prefix, strlen(log_prefix)))
{
@@
-298,9
+298,7
@@
static uint8_t read_queue()
}
else if (!strcmp(msg, "WORLD_UPDATED"))
{
}
else if (!strcmp(msg, "WORLD_UPDATED"))
{
- free(world.things_below_player);
- world.things_below_player = NULL;
- send("STACK");
+ query_mapcell();
}
free(msg);
}
}
free(msg);
}
@@
-338,7
+336,7
@@
extern char * io_loop()
}
if (change_in_client || read_worldstate() || read_queue())
{
}
if (change_in_client || read_worldstate() || read_queue())
{
- if (world.turn != last_focused_turn && world.
focus_each_turn
)
+ if (world.turn != last_focused_turn && world.
autofocus
)
{
last_focused_turn = world.turn;
map_center();
{
last_focused_turn = world.turn;
map_center();