Reorganized documentation
Signed-off-by: Gergely Polonkai (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
parent
480714fc3c
commit
eea085dcdc
@ -18,24 +18,25 @@
|
|||||||
<title>wMUD hackers' guide</title>
|
<title>wMUD hackers' guide</title>
|
||||||
<xi:include href="xml/types.xml"/>
|
<xi:include href="xml/types.xml"/>
|
||||||
<xi:include href="xml/utils.xml"/>
|
<xi:include href="xml/utils.xml"/>
|
||||||
<xi:include href="xml/networking.xml"/>
|
<xi:include href="xml/maintenance-thread.xml"/>
|
||||||
|
<xi:include href="xml/game-networking.xml"/>
|
||||||
<xi:include href="xml/interpreter.xml"/>
|
<xi:include href="xml/interpreter.xml"/>
|
||||||
<xi:include href="xml/db.xml"/>
|
<xi:include href="xml/db.xml"/>
|
||||||
<xi:include href="xml/player.xml"/>
|
<xi:include href="xml/player.xml"/>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter id="object-tree">
|
<!--chapter id="object-tree">
|
||||||
<title>Object Hierarchy</title>
|
<title>Object Hierarchy</title>
|
||||||
<xi:include href="xml/tree_index.sgml"/>
|
<xi:include href="xml/tree_index.sgml"/>
|
||||||
</chapter>
|
</chapter-->
|
||||||
<index id="api-index-full">
|
<index id="api-index-full">
|
||||||
<title>API Index</title>
|
<title>API Index</title>
|
||||||
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
|
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
|
||||||
</index>
|
</index>
|
||||||
<index id="deprecated-api-index" role="deprecated">
|
<!--index id="deprecated-api-index" role="deprecated">
|
||||||
<title>Index of deprecated API</title>
|
<title>Index of deprecated API</title>
|
||||||
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
|
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
|
||||||
</index>
|
</index-->
|
||||||
|
|
||||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||||
</book>
|
</book>
|
||||||
|
@ -1,21 +1,18 @@
|
|||||||
<SECTION>
|
<SECTION>
|
||||||
<TITLE>Data types</TITLE>
|
<TITLE>wMUD's Data Types</TITLE>
|
||||||
<FILE>types</FILE>
|
<FILE>types</FILE>
|
||||||
wmudClientState
|
|
||||||
wmudClient
|
|
||||||
wmudPlayer
|
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<TITLE>Utilities and uncategorized functions</TITLE>
|
<TITLE></TITLE>
|
||||||
<FILE>utils</FILE>
|
<FILE>utils</FILE>
|
||||||
random_number
|
random_number
|
||||||
wmud_random_string
|
wmud_random_string
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<TITLE>Networking</TITLE>
|
<TITLE></TITLE>
|
||||||
<FILE>networking</FILE>
|
<FILE>game-networking</FILE>
|
||||||
TELNET_IAC
|
TELNET_IAC
|
||||||
TELNET_WILL
|
TELNET_WILL
|
||||||
TELNET_WONT
|
TELNET_WONT
|
||||||
@ -26,7 +23,7 @@ wmud_client_send
|
|||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<TITLE>Command interpreter</TITLE>
|
<TITLE></TITLE>
|
||||||
<FILE>interpreter</FILE>
|
<FILE>interpreter</FILE>
|
||||||
wmudCommandFunc
|
wmudCommandFunc
|
||||||
wmudCommand
|
wmudCommand
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include "db.h"
|
#include "db.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:networking
|
* SECTION:game-networking
|
||||||
* @short_description: Game related networking code
|
* @short_description: Game related networking code
|
||||||
*
|
*
|
||||||
* Functions to handle game connections
|
* Functions to handle game connections
|
||||||
@ -342,6 +342,7 @@ game_source_callback(GSocket *socket, GIOCondition condition, struct AcceptData
|
|||||||
/**
|
/**
|
||||||
* wmud_networking_init:
|
* wmud_networking_init:
|
||||||
* @port_number: the port number on which the game listener should listen
|
* @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
|
* @err: the GError in which possible errors will be reported
|
||||||
*
|
*
|
||||||
* Initializes the game network listener
|
* Initializes the game network listener
|
||||||
|
37
src/game.c
37
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "game.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:
|
* elapsed_seconds:
|
||||||
*
|
*
|
||||||
@ -10,6 +45,7 @@
|
|||||||
* simply gets updated by a timeout function which should run every second
|
* simply gets updated by a timeout function which should run every second
|
||||||
*/
|
*/
|
||||||
guint32 elapsed_seconds = 0;
|
guint32 elapsed_seconds = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* elapsed_cycle:
|
* elapsed_cycle:
|
||||||
*
|
*
|
||||||
@ -17,6 +53,7 @@ guint32 elapsed_seconds = 0;
|
|||||||
* #elapsed_seconds reaches the maximum value
|
* #elapsed_seconds reaches the maximum value
|
||||||
*/
|
*/
|
||||||
guint32 elapsed_cycle = 0;
|
guint32 elapsed_cycle = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* rl_sec_elapsed:
|
* rl_sec_elapsed:
|
||||||
|
@ -30,6 +30,13 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "players.h"
|
#include "players.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:maintenance-thread
|
||||||
|
* @short_description: Runtime maintenance functions
|
||||||
|
* @title: Runtime maintenance functions
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmud_maintenance_check_new_players:
|
* wmud_maintenance_check_new_players:
|
||||||
* @player: #wmudPLayer structure of the player record to check
|
* @player: #wmudPLayer structure of the player record to check
|
||||||
|
Loading…
Reference in New Issue
Block a user