helapordo 1.4.12
Loading...
Searching...
No Matches
floors.h File Reference
#include <math.h>
#include "game_utils.h"
Include dependency graph for floors.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void init_floor_layout (Floor *floor)
 Takes a Floor pointer and initialises its floor_layout fields to empty.
 
float calc_distance (int x1, int y1, int x2, int y2)
 Function to calculate the distance between two points.
 
void init_floor_rooms (Floor *floor)
 Takes a Floor pointer and initialises its rooms_matrix and roomclass_matrix, using the values in floor_layout fields.
 
void floor_random_walk (Floor *floor, int x, int y, int steps, int do_layout_clean)
 Takes a Floor pointer and tries walking randomly to initialises its floor_layout field.
 
void floor_set_room_types (Floor *floor)
 Takes a Floor pointer and initialises its roomclass_layout, using the floor_layout fields.
 
void load_floor_explored (Floor *floor)
 Takes a Floor pointer and initialises its explored_matrix using the values in floor_layout fields.
 
void debug_print_roomclass_layout (Floor *floor, FILE *fp)
 Takes a Floor pointer and prints its roomClass layout to the passed FILE pointer.
 
void debug_print_floor_layout (Floor *floor, FILE *fp)
 Takes a Floor pointer and prints its floor layout to the passed FILE pointer.
 

Function Documentation

◆ calc_distance()

float calc_distance ( int x1,
int y1,
int x2,
int y2 )

Function to calculate the distance between two points.

◆ debug_print_floor_layout()

void debug_print_floor_layout ( Floor * floor,
FILE * fp )

Takes a Floor pointer and prints its floor layout to the passed FILE pointer.

See also
Floor
floorClass

◆ debug_print_roomclass_layout()

void debug_print_roomclass_layout ( Floor * floor,
FILE * fp )

Takes a Floor pointer and prints its roomClass layout to the passed FILE pointer.

See also
Floor
floorClass
roomClass

◆ floor_random_walk()

void floor_random_walk ( Floor * floor,
int x,
int y,
int steps,
int do_layout_clean )

Takes a Floor pointer and tries walking randomly to initialises its floor_layout field.

If do_layout_clean is 1, it will reset floor layout when walked area ratio is below or above expectations.

See also
Floor
floorClass

◆ floor_set_room_types()

void floor_set_room_types ( Floor * floor)

Takes a Floor pointer and initialises its roomclass_layout, using the floor_layout fields.

See also
Floor
floorClass

◆ init_floor_layout()

void init_floor_layout ( Floor * floor)

Takes a Floor pointer and initialises its floor_layout fields to empty.

It also sets the area field to 0.

See also
Floor
floorClass

◆ init_floor_rooms()

void init_floor_rooms ( Floor * floor)

Takes a Floor pointer and initialises its rooms_matrix and roomclass_matrix, using the values in floor_layout fields.

See also
Floor
floorClass

◆ load_floor_explored()

void load_floor_explored ( Floor * floor)

Takes a Floor pointer and initialises its explored_matrix using the values in floor_layout fields.

See also
Floor
floorClass