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

Comparing deliantra/server/common/recipe.C (file contents):
Revision 1.32 by root, Fri Nov 6 13:31:47 2009 UTC vs.
Revision 1.33 by root, Sun Nov 29 10:55:18 2009 UTC

50static void build_stringlist (const char *str, char ***result_list, size_t * result_size); 50static void build_stringlist (const char *str, char ***result_list, size_t * result_size);
51 51
52static recipelist *formulalist; 52static recipelist *formulalist;
53 53
54static recipelist * 54static recipelist *
55init_recipelist (void) 55init_recipelist ()
56{ 56{
57 recipelist *tl = new recipelist; 57 recipelist *tl = new recipelist;
58 58
59 tl->total_chance = 0; 59 tl->total_chance = 0;
60 tl->number = 0; 60 tl->number = 0;
63 63
64 return tl; 64 return tl;
65} 65}
66 66
67static recipe * 67static recipe *
68get_empty_formula (void) 68get_empty_formula ()
69{ 69{
70 recipe *t = new recipe; 70 recipe *t = new recipe;
71 71
72 t->chance = 0; 72 t->chance = 0;
73 t->index = 0; 73 t->index = 0;
139 * code, it is possible to have multiples of ingredients in a cauldron 139 * code, it is possible to have multiples of ingredients in a cauldron
140 * which could result in an index formula mismatch. We *don't* check for 140 * which could result in an index formula mismatch. We *don't* check for
141 * that possibility here. -b.t. 141 * that possibility here. -b.t.
142 */ 142 */
143static void 143static void
144check_formulae (void) 144check_formulae ()
145{ 145{
146 recipelist *fl; 146 recipelist *fl;
147 recipe *check, *formula; 147 recipe *check, *formula;
148 int numb = 1; 148 int numb = 1;
149 149
169/* 169/*
170 * init_formulae() - Builds up the lists of formula from the file in 170 * init_formulae() - Builds up the lists of formula from the file in
171 * the libdir. -b.t. 171 * the libdir. -b.t.
172 */ 172 */
173void 173void
174init_formulae (void) 174init_formulae ()
175{ 175{
176 static int has_been_done = 0; 176 static int has_been_done = 0;
177 FILE *fp; 177 FILE *fp;
178 char filename[MAX_BUF], buf[MAX_BUF], *cp, *next; 178 char filename[MAX_BUF], buf[MAX_BUF], *cp, *next;
179 recipe *formula = NULL; 179 recipe *formula = NULL;
379 379
380 return 0; 380 return 0;
381} 381}
382 382
383static recipelist * 383static recipelist *
384get_random_recipelist (void) 384get_random_recipelist ()
385{ 385{
386 recipelist *fl = NULL; 386 recipelist *fl = NULL;
387 int number = 0, roll = 0; 387 int number = 0, roll = 0;
388 388
389 /* first, determine # of recipelist we have */ 389 /* first, determine # of recipelist we have */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines