From a7339f0e1edff37a532c459ce6467f16749383d6 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Mon, 5 Mar 2018 12:58:58 -0500 Subject: Miscellaneous code cleanup --- server.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'server.c') diff --git a/server.c b/server.c index f5df861..5eca81e 100644 --- a/server.c +++ b/server.c @@ -238,10 +238,22 @@ static bool clientMove(struct Client *client, int8_t dx, int8_t dy) { client->cellX += dx; client->cellY += dy; - if (client->cellX == CELL_COLS) { client->tileX++; client->cellX = 0; } - if (client->cellX == UINT8_MAX) { client->tileX--; client->cellX = CELL_COLS - 1; } - if (client->cellY == CELL_ROWS) { client->tileY++; client->cellY = 0; } - if (client->cellY == UINT8_MAX) { client->tileY--; client->cellY = CELL_ROWS - 1; } + if (client->cellX == CELL_COLS) { + client->tileX++; + client->cellX = 0; + } + if (client->cellX == UINT8_MAX) { + client->tileX--; + client->cellX = CELL_COLS - 1; + } + if (client->cellY == CELL_ROWS) { + client->tileY++; + client->cellY = 0; + } + if (client->cellY == UINT8_MAX) { + client->tileY--; + client->cellY = CELL_ROWS - 1; + } if (client->tileX == TILE_COLS) client->tileX = 0; if (client->tileX == UINT32_MAX) client->tileX = TILE_COLS - 1; -- cgit 1.4.1 /catgirl/commit/ui.c?h=2.2a&id=0e1297e068258baba6e26265d81b93bda71be8b2&follow=1'>commit diff
path: root/ui.c (unfollow)
Commit message (Expand)Author
2018-09-13Fix weird tab-complete after commaJune McEnroe
2018-09-13Rewrite UI againJune McEnroe
2018-09-12Add note about C-oJune McEnroe
2018-09-12Use formatParse split to position input cursorJune McEnroe
2018-09-12Factor out IRC formatting parsingJune McEnroe
2018-09-11Add /help equivalent to /manJune McEnroe
2018-09-11Don't render every PM as a pingJune McEnroe
2018-09-11Add urlOpenMatchJune McEnroe
2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe
2018-09-10Set LESSSECURE=1 in man.shJune McEnroe
2018-09-10Add /man commandJune McEnroe
2018-09-10Install man page in chrootJune McEnroe
2018-09-10Install man pageJune McEnroe
2018-09-10Split keys into subsections and document colorsJune McEnroe
2018-09-10Add "blank" lines to chatte.1June McEnroe
2018-09-10Document key bindings in chatte.1June McEnroe
2018-09-08Document slash commands in chatte.1June McEnroe