LI2 Roguelite
Public Attributes | List of all members
cell Struct Reference

Structure of a cell. More...

#include <cell.h>

Public Attributes

char symbol
 
unsigned int x
 
unsigned int y
 
unsigned int is_walkable
 
unsigned int block_light
 
unsigned int was_visible
 
unsigned int is_visible
 
int distance_to_player
 
unsigned int has_item
 
unsigned int has_player
 
int monster_index
 
int effect
 
int effect_duration
 
int color
 

Detailed Description

Structure of a cell.

A cell is a single unit of the map with 2D coordinates, a symbol, a walkable flag, a blocking light flag, a distance to the player, a visibility flag and a color.

Parameters
symbolCharacter to be displayed on the screen
xX coordinate
yY coordinate
is_walkable1 if the cell is walkable, 0 otherwise
block_light1 if the cell blocks light, 0 otherwise
was_visible1 if the cell was visible, 0 otherwise
is_visible1 if the cell is visible, 0 otherwise
distance_to_playerDistance to the player, initialized to -1
has_item1 if the cell has an item, 0 otherwise
has_player1 if the cell has the player, 0 otherwise
monster_index1 if the cell has a monster, 0 otherwise
effectEffect of the cell caused by projectiles (0 by default)
effect_durationDuration of the effect if any (0 by default)
colorColor of the cell

TODO:

Parameters
monsterMonster in this cell, if not NULL instead of monster_index

Member Data Documentation

◆ block_light

unsigned int cell::block_light

◆ color

int cell::color

◆ distance_to_player

int cell::distance_to_player

◆ effect

int cell::effect

◆ effect_duration

int cell::effect_duration

◆ has_item

unsigned int cell::has_item

◆ has_player

unsigned int cell::has_player

◆ is_visible

unsigned int cell::is_visible

◆ is_walkable

unsigned int cell::is_walkable

◆ monster_index

int cell::monster_index

◆ symbol

char cell::symbol

◆ was_visible

unsigned int cell::was_visible

◆ x

unsigned int cell::x

◆ y

unsigned int cell::y

The documentation for this struct was generated from the following file: