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

Comparing deliantra/server/random_maps/monster.C (file contents):
Revision 1.3 by root, Sun Sep 10 16:06:37 2006 UTC vs.
Revision 1.7 by root, Sat Dec 30 18:45:28 2006 UTC

1
2/*
3 * static char *rcsid_monster_c =
4 * "$Id: monster.C,v 1.3 2006/09/10 16:06:37 root Exp $";
5 */
6
7/* 1/*
8 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
9 3
10 Copyright (C) 2002 Mark Wedel & Crossfire Development Team 4 Copyright (C) 2002 Mark Wedel & Crossfire Development Team
11 Copyright (C) 1992 Frank Tore Johansen 5 Copyright (C) 1992 Frank Tore Johansen
22 16
23 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 20
27 The authors can be reached via e-mail at crossfire-devel@real-time.com 21 The authors can be reached via e-mail at <crossfire@schmorp.de>
28*/ 22*/
29 23
30#include <global.h> 24#include <global.h>
31#include <random_map.h> 25#include <random_map.h>
32#include <rproto.h> 26#include <rproto.h>
33 27
34/* some monsters are multisquare, and these guys require special 28/* some monsters are multisquare, and these guys require special
35 handling. */ 29 handling. */
36 30
37void 31void
38insert_multisquare_ob_in_map (object *new_obj, mapstruct *map) 32insert_multisquare_ob_in_map (object *new_obj, maptile *map)
39{ 33{
40 int x, y; 34 int x, y;
41 archetype *at; 35 archetype *at;
42 object *old_seg; 36 object *old_seg;
43 object *head; 37 object *head;
68} 62}
69 63
70 64
71/* place some monsters into the map. */ 65/* place some monsters into the map. */
72void 66void
73place_monsters (mapstruct *map, char *monsterstyle, int difficulty, RMParms * RP) 67place_monsters (maptile *map, char *monsterstyle, int difficulty, random_map_params * RP)
74{ 68{
75 char styledirname[256]; 69 char styledirname[256];
76 mapstruct *style_map = 0; 70 maptile *style_map = 0;
77 int failed_placements; 71 int failed_placements;
78 sint64 exp_per_sq, total_experience; 72 sint64 exp_per_sq, total_experience;
79 int number_monsters = 0; 73 int number_monsters = 0;
80 archetype *at; 74 archetype *at;
81 75
116 } 110 }
117 else 111 else
118 { 112 {
119 failed_placements++; 113 failed_placements++;
120 } 114 }
121 exp_per_sq = (sint64) (((double) 1000 * total_experience) / (MAP_WIDTH (map) * MAP_HEIGHT (map) + 1)); 115 exp_per_sq = (sint64) (((double) 1000 * total_experience) / (map->width * map->height + 1));
122 } 116 }
123} 117}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines