From eea085dcdc08d70a746ba080514de28b074c10dc Mon Sep 17 00:00:00 2001 From: "Gergely Polonkai (W00d5t0ck)" Date: Mon, 26 Mar 2012 16:49:04 +0200 Subject: [PATCH] Reorganized documentation Signed-off-by: Gergely Polonkai (W00d5t0ck) --- docs/reference/wmud/wmud-docs.sgml | 11 ++++---- docs/reference/wmud/wmud-sections.txt | 13 ++++------ src/game-networking.c | 3 ++- src/game.c | 37 +++++++++++++++++++++++++++ src/maintenance.c | 7 +++++ 5 files changed, 57 insertions(+), 14 deletions(-) diff --git a/docs/reference/wmud/wmud-docs.sgml b/docs/reference/wmud/wmud-docs.sgml index 9506fb8..03e80aa 100644 --- a/docs/reference/wmud/wmud-docs.sgml +++ b/docs/reference/wmud/wmud-docs.sgml @@ -18,24 +18,25 @@ wMUD hackers' guide - + + - + API Index - + diff --git a/docs/reference/wmud/wmud-sections.txt b/docs/reference/wmud/wmud-sections.txt index 43939f4..48458d4 100644 --- a/docs/reference/wmud/wmud-sections.txt +++ b/docs/reference/wmud/wmud-sections.txt @@ -1,21 +1,18 @@
-Data types +wMUD's Data Types types -wmudClientState -wmudClient -wmudPlayer
-Utilities and uncategorized functions + utils random_number wmud_random_string
-Networking -networking + +game-networking TELNET_IAC TELNET_WILL TELNET_WONT @@ -26,7 +23,7 @@ wmud_client_send
-Command interpreter + interpreter wmudCommandFunc wmudCommand diff --git a/src/game-networking.c b/src/game-networking.c index 9c896a8..c2cc900 100644 --- a/src/game-networking.c +++ b/src/game-networking.c @@ -32,7 +32,7 @@ #include "db.h" /** - * SECTION:networking + * SECTION:game-networking * @short_description: Game related networking code * * Functions to handle game connections @@ -342,6 +342,7 @@ game_source_callback(GSocket *socket, GIOCondition condition, struct AcceptData /** * wmud_networking_init: * @port_number: the port number on which the game listener should listen + * @game_context: the #GMainContext of the game thread * @err: the GError in which possible errors will be reported * * Initializes the game network listener diff --git a/src/game.c b/src/game.c index 3d0014b..f1908ae 100644 --- a/src/game.c +++ b/src/game.c @@ -1,8 +1,43 @@ +/* wMUD - Yet another MUD codebase by W00d5t0ck + * Copyright (C) 2012 - Gergely POLONKAI + * + * game.c: Game Thread related functions + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include "main.h" #include "game.h" +/** + * SECTION:game-thread + * @short_description: Game related functions + * @title: The Game Thread + * + * The game thread is supposed to serve game client connections. Also, + * maintaining the loaded game world is the objective ot this thread. + * + * This thread has to serve all the game clients after a connection is + * estabilished. Player login, menu interaction and play are both the tasks of + * this thread. + * + * The other main objective is to maintain the loaded world. Moving and + * resetting the mobs, cleaning up areas and many other things belong here. + */ + /** * elapsed_seconds: * @@ -10,6 +45,7 @@ * simply gets updated by a timeout function which should run every second */ guint32 elapsed_seconds = 0; + /** * elapsed_cycle: * @@ -17,6 +53,7 @@ guint32 elapsed_seconds = 0; * #elapsed_seconds reaches the maximum value */ guint32 elapsed_cycle = 0; + /** * * rl_sec_elapsed: diff --git a/src/maintenance.c b/src/maintenance.c index ba7940e..25bd038 100644 --- a/src/maintenance.c +++ b/src/maintenance.c @@ -30,6 +30,13 @@ #include "main.h" #include "players.h" +/** + * SECTION:maintenance-thread + * @short_description: Runtime maintenance functions + * @title: Runtime maintenance functions + * + */ + /** * wmud_maintenance_check_new_players: * @player: #wmudPLayer structure of the player record to check