Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/home/groups/n/no/noxwizard/cvs/src/map.cpp File Reference

Map related functions. More...

#include "nxwcommn.h"
#include "map.h"
#include "data.h"
#include "set.h"
#include "items.h"
#include "chars.h"
#include "classes.h"
#include "inlines.h"
#include "coord.h"

Defines

#define MAX_Z_CLIMB_BRIDGE   14
#define MAX_Z_CLIMB   2
#define MIN_Z_FALL   6
#define MAX_Z_FALL   20

Functions

SI08 isWalkable (Location pos, UI08 flags, P_CHAR pc)
 Looks if a char can walk on the given Location.

LOGICAL lineOfSight (Location A, Location B,SI32 checkfor)
 Tells if the line of sight between two locations is not interrupted.

LOGICAL canNpcWalkHere (Location pos)
 Tells if an npc can move in the given position.

SI08 staticTop (Location pos)
SI08 tileHeight (UI16 id)
SI08 mapElevation (UI32 x, UI32 y)
SI08 mapAverageElevation (UI32 x, UI32 y)
SI08 dynamicElevation (Location pos)
SI08 getHeight (Location pos)
 Returns the estimated height of walker's position.

void getMultiCorners (P_ITEM pi, SI32 &x1, SI32 &y1, SI32 &x2, SI32 &y2)


Detailed Description

Map related functions.

Author:
Luxor

Define Documentation

#define MAX_Z_CLIMB   2
 

#define MAX_Z_CLIMB_BRIDGE   14
 

#define MAX_Z_FALL   20
 

#define MIN_Z_FALL   6
 


Function Documentation

LOGICAL canNpcWalkHere Location    pos
 

Tells if an npc can move in the given position.

Author:
Luxor
Todo:
Implement special features based on the npc (fire elemental should walk on lava passages etc...)

SI08 dynamicElevation Location    pos
 

Author:
Luxor

SI08 getHeight Location    pos
 

Returns the estimated height of walker's position.

Author:
Luxor

void getMultiCorners P_ITEM    pi,
SI32   x1,
SI32   y1,
SI32   x2,
SI32   y2
 

Author:
Luxor

SI08 isWalkable Location    pos,
UI08    flags,
P_CHAR    pc
 

Looks if a char can walk on the given Location.

Author:
Luxor
Returns:
The next z value of char position, illegal_z if the tile isn't walkable

LOGICAL lineOfSight Location    A,
Location    B,
SI32    checkfor
 

Tells if the line of sight between two locations is not interrupted.

Author:
Luxor
Returns:
True if the line of sight is clean, false if not

SI08 mapAverageElevation UI32    x,
UI32    y
 

Author:
Luxor

SI08 mapElevation UI32    x,
UI32    y
 

Author:
Luxor

SI08 staticTop Location    pos
 

Author:
Luxor

SI08 tileHeight UI16    id
 

Author:
Luxor
SourceForge.net Logo