ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/readable.C
(Generate patch)

Comparing deliantra/server/common/readable.C (file contents):
Revision 1.52 by root, Fri Nov 6 13:31:47 2009 UTC vs.
Revision 1.56 by root, Fri Mar 26 01:04:44 2010 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 6 * Copyright (©) 1992 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * the terms of the Affero GNU General Public License as published by the 9 * the terms of the Affero GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your 10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version. 11 * option) any later version.
107 107
108/* these are needed for creation of a linked list of 108/* these are needed for creation of a linked list of
109 * pointers to all (hostile) monster objects */ 109 * pointers to all (hostile) monster objects */
110 110
111static int nrofmon = 0, need_to_write_bookarchive = 0; 111static int nrofmon = 0, need_to_write_bookarchive = 0;
112
113/* first_msg is the started of the linked list of messages as read from
114 * the messages file
115 */
116static linked_char *first_msg = NULL;
117 112
118/* 113/*
119 * Spellpath information 114 * Spellpath information
120 */ 115 */
121static uint32 spellpathdef[NRSPELLPATHS] = { 116static uint32 spellpathdef[NRSPELLPATHS] = {
509 * Start of misc. readable functions used by others functions in this file 504 * Start of misc. readable functions used by others functions in this file
510 * 505 *
511 *****************************************************************************/ 506 *****************************************************************************/
512 507
513static titlelist * 508static titlelist *
514get_empty_booklist (void) 509get_empty_booklist ()
515{ 510{
516 titlelist *bl = new titlelist; 511 titlelist *bl = new titlelist;
517 512
518 bl->number = 0; 513 bl->number = 0;
519 bl->first_book = NULL; 514 bl->first_book = NULL;
520 bl->next = NULL; 515 bl->next = NULL;
521 return bl; 516 return bl;
522} 517}
523 518
524static title * 519static title *
525get_empty_book (void) 520get_empty_book ()
526{ 521{
527 title *t = new title; 522 title *t = new title;
528 523
529 t->name = NULL; 524 t->name = NULL;
530 t->archname = NULL; 525 t->archname = NULL;
624/* init_book_archive() - if not called before, initialise the info list 619/* init_book_archive() - if not called before, initialise the info list
625 * This reads in the bookarch file into memory. bookarch is the file 620 * This reads in the bookarch file into memory. bookarch is the file
626 * created and updated across multiple runs of the program. 621 * created and updated across multiple runs of the program.
627 */ 622 */
628static void 623static void
629init_book_archive (void) 624init_book_archive ()
630{ 625{
631 FILE *fp; 626 FILE *fp;
632 int comp, nroftitle = 0; 627 int comp, nroftitle = 0;
633 char buf[MAX_BUF], fname[MAX_BUF], *cp; 628 char buf[MAX_BUF], fname[MAX_BUF], *cp;
634 title *book = NULL; 629 title *book = NULL;
749 * 744 *
750 * This is the function called by the main routine to initialise 745 * This is the function called by the main routine to initialise
751 * all the readable information. 746 * all the readable information.
752 */ 747 */
753void 748void
754init_readable (void) 749init_readable ()
755{ 750{
756 static int did_this; 751 static int did_this;
757 752
758 if (did_this) 753 if (did_this)
759 return; 754 return;
1806 * Writeback routine for updating the bookarchive. 1801 * Writeback routine for updating the bookarchive.
1807 * 1802 *
1808 ****************************************************************************/ 1803 ****************************************************************************/
1809/* write_book_archive() - write out the updated book archive */ 1804/* write_book_archive() - write out the updated book archive */
1810void 1805void
1811write_book_archive (void) 1806write_book_archive ()
1812{ 1807{
1813 FILE *fp; 1808 FILE *fp;
1814 int index = 0; 1809 int index = 0;
1815 char fname[MAX_BUF]; 1810 char fname[MAX_BUF];
1816 title *book = NULL; 1811 title *book = NULL;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines