The Battle for Wesnoth  1.19.0-dev
Functions
lua_map_location Namespace Reference

Functions

int intf_get_direction (lua_State *L)
 Expose map_location::get_direction function to lua Arg 1: a location Arg 2: a direction Arg 3: (optional) number of steps. More...
 
int intf_vector_sum (lua_State *L)
 Expose map_location::vector_sum to lua. More...
 
int intf_vector_diff (lua_State *L)
 Expose map_location::vector_difference to lua. More...
 
int intf_vector_negation (lua_State *L)
 Expose map_location::vector_negation to lua. More...
 
int intf_rotate_right_around_center (lua_State *L)
 Expose map_location::rotate_right_around_center to lua. More...
 
int intf_tiles_adjacent (lua_State *L)
 Expose map_location tiles_adjacent. More...
 
int intf_get_adjacent_tiles (lua_State *L)
 Expose map_location get_adjacent_tiles. More...
 
int intf_get_tiles_in_radius (lua_State *L)
 Expose map_location get_tiles_in_radius. More...
 
int intf_distance_between (lua_State *L)
 Expose map_location distance_between. More...
 
int intf_get_in_basis_N_NE (lua_State *L)
 Expose map_location get_in_basis_N_NE. More...
 
int intf_get_relative_dir (lua_State *L)
 Expose map_location get_relative_dir. More...
 

Function Documentation

◆ intf_distance_between()

int lua_map_location::intf_distance_between ( lua_State *  L)

Expose map_location distance_between.

  • Args 1, 2: Two locations
  • Ret: The distance between the two locations

Definition at line 192 of file lua_map_location_ops.cpp.

References distance_between(), and luaW_tolocation().

Referenced by lua_kernel_base::lua_kernel_base().

◆ intf_get_adjacent_tiles()

int lua_map_location::intf_get_adjacent_tiles ( lua_State *  L)

Expose map_location get_adjacent_tiles.

  • Arg 1: A location
  • Ret 1 - 6: The adjacent locations

Definition at line 153 of file lua_map_location_ops.cpp.

References get_adjacent_tiles(), luaW_pushlocation(), and luaW_tolocation().

Referenced by lua_kernel_base::lua_kernel_base().

◆ intf_get_direction()

int lua_map_location::intf_get_direction ( lua_State *  L)

Expose map_location::get_direction function to lua Arg 1: a location Arg 2: a direction Arg 3: (optional) number of steps.

Definition at line 35 of file lua_map_location_ops.cpp.

References d, map_location::get_direction(), luaW_pushlocation(), luaW_tolocation(), wfl::msg(), n, and map_location::parse_direction().

Referenced by lua_kernel_base::lua_kernel_base().

◆ intf_get_in_basis_N_NE()

int lua_map_location::intf_get_in_basis_N_NE ( lua_State *  L)

Expose map_location get_in_basis_N_NE.

Definition at line 207 of file lua_map_location_ops.cpp.

References map_location::get_in_basis_N_NE(), and luaW_tolocation().

Referenced by lua_kernel_base::lua_kernel_base().

◆ intf_get_relative_dir()

int lua_map_location::intf_get_relative_dir ( lua_State *  L)

Expose map_location get_relative_dir.

  • Args 1, 2: Two locations
  • Ret: The direction of location 2 from location 1

Definition at line 225 of file lua_map_location_ops.cpp.

References map_location::get_relative_dir(), luaW_tolocation(), and map_location::write_direction().

Referenced by lua_kernel_base::lua_kernel_base().

◆ intf_get_tiles_in_radius()

int lua_map_location::intf_get_tiles_in_radius ( lua_State *  L)

Expose map_location get_tiles_in_radius.

  • Arg 1: A location
  • Ret: The locations

Definition at line 172 of file lua_map_location_ops.cpp.

References get_tiles_in_radius(), lua_push(), and luaW_tolocation().

Referenced by lua_kernel_base::lua_kernel_base().

◆ intf_rotate_right_around_center()

int lua_map_location::intf_rotate_right_around_center ( lua_State *  L)

◆ intf_tiles_adjacent()

int lua_map_location::intf_tiles_adjacent ( lua_State *  L)

Expose map_location tiles_adjacent.

  • Args 1, 2: Two locations
  • Ret: True if the locations are adjacent

Definition at line 136 of file lua_map_location_ops.cpp.

References luaW_tolocation(), and tiles_adjacent().

Referenced by lua_kernel_base::lua_kernel_base().

◆ intf_vector_diff()

int lua_map_location::intf_vector_diff ( lua_State *  L)

Expose map_location::vector_difference to lua.

Definition at line 86 of file lua_map_location_ops.cpp.

References luaW_pushlocation(), luaW_tolocation(), and map_location::vector_difference_assign().

Referenced by lua_kernel_base::lua_kernel_base().

◆ intf_vector_negation()

int lua_map_location::intf_vector_negation ( lua_State *  L)

Expose map_location::vector_negation to lua.

  • Arg 1: Location
  • Ret: Negated vector

Definition at line 103 of file lua_map_location_ops.cpp.

References luaW_pushlocation(), luaW_tolocation(), and map_location::vector_negation().

Referenced by lua_kernel_base::lua_kernel_base().

◆ intf_vector_sum()

int lua_map_location::intf_vector_sum ( lua_State *  L)