Phantasmal MUD Lib for DGD

Phantasmal Site > Phantasmal API > API Listing > opposite_direction

API Function: opposite_direction

Summary:
take a numerical direction and return the opposite

Defined In LPC Object:
/usr/common/sys/exitd.c

Prototype:
int opposite_direction(int direction)

Can Be Called By:
Anybody

Description:

Take a numerical direction and return the opposite. North would return south, up would return down, etc. Some directions may not have opposites.

Return Value:

A numerical direction, or DIR_ERR if the direction isn't recognized, or has no opposite.

Errors:
Normally none.

See Also:
get_short_for_dir , get_name_for_dir , direction_by_string