Steam Fort 0.5
Functions

src/utils.hpp File Reference

Go to the source code of this file.

Functions

bool valid_pos (int x, int y, bool walkable=true)
 Check if selected position is valid.
bool save_exists ()
 Check if file of saved game exists.
void find_near_land (int *x, int *y, int radius, int type)
 Find nearest land of selected type.

Function Documentation

void find_near_land ( int *  x,
int *  y,
int  radius,
int  type 
)

Find nearest land of selected type.

Parameters:
xX-axis position to start. Return X-axis position of land or -1.
yY-axis position to start. Return Y-axis position of land or -1.
radiusSize of radius to search.
typeType of land to search.
bool save_exists ( )

Check if file of saved game exists.

Returns:
True if exists, otherwise false.
bool valid_pos ( int  x,
int  y,
bool  walkable = true 
)

Check if selected position is valid.

Parameters:
xX-axis position
yY-axis position
walkableDid position is walkable? Default true.
Returns:
true if position is valid, otherwise false.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines