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.h File Reference

Header of Map related functions. More...

#include "basics.h"

Go to the source code of this file.

Compounds

class  cLine

Enumerations

enum  {
  WALKFLAG_NONE = 0x0, WALKFLAG_MAP = 0x1, WALKFLAG_STATIC = 0x2, WALKFLAG_DYNAMIC = 0x4,
  WALKFLAG_CHARS = 0x8, WALKFLAG_ALL = 0xF
}
 Check flags for isWalkable function. More...


Functions

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

LOGICAL lineOfSight (Location pos1, Location pos2, SI32 checkfor=WALKFLAG_DYNAMIC+WALKFLAG_MAP+WALKFLAG_STATIC)
 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 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)
SI32 line_of_sight (Location a, Location b,SI32 checkfor=WALKFLAG_DYNAMIC+WALKFLAG_MAP+WALKFLAG_STATIC)
SI32 line_of_sight (SI32 x1, SI32 y1, SI32 z1, SI32 x2, SI32 y2, SI32 z2, SI32 checkfor=WALKFLAG_DYNAMIC+WALKFLAG_MAP+WALKFLAG_STATIC)


Detailed Description

Header of Map related functions.

Author:
Luxor

Enumeration Type Documentation

anonymous enum
 

Check flags for isWalkable function.

Author:
Luxor
Enumeration values:
WALKFLAG_NONE 
WALKFLAG_MAP 
WALKFLAG_STATIC 
WALKFLAG_DYNAMIC 
WALKFLAG_CHARS 
WALKFLAG_ALL 


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

SI32 line_of_sight SI32    x1,
SI32    y1,
SI32    z1,
SI32    x2,
SI32    y2,
SI32    z2,
SI32    checkfor = WALKFLAG_DYNAMIC+WALKFLAG_MAP+WALKFLAG_STATIC
[inline]
 

SI32 line_of_sight Location    a,
Location    b,
SI32    checkfor = WALKFLAG_DYNAMIC+WALKFLAG_MAP+WALKFLAG_STATIC
[inline]
 

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 mapElevation UI32    x,
UI32    y
 

Author:
Luxor

SI08 staticTop Location    pos
 

Author:
Luxor

SI08 tileHeight UI16    id
 

Author:
Luxor
SourceForge.net Logo