Angband
Data Structures | Typedefs | Functions
z-type.h File Reference

Support various data types. More...

#include "h-basic.h"

Go to the source code of this file.

Data Structures

struct  loc
struct  grouper
struct  point_set
 A set of points that can be constructed to apply a set of changes to. More...

Typedefs

typedef struct grouper grouper
 Defines a (value, name) pairing.

Functions

struct loc loc (int x, int y)
struct point_setpoint_set_new (int initial_size)
 Utility functions to work with point_sets.
void point_set_dispose (struct point_set *ps)
void add_to_point_set (struct point_set *ps, int y, int x)
 Add the point to the given point set, making more space if there is no more space left.
int point_set_size (struct point_set *ps)
int point_set_contains (struct point_set *ps, int y, int x)

Detailed Description

Support various data types.

Copyright (c) 2007 Angband Developers

This work is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation, version 2, or

b) the "Angband licence": This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.

Typedef Documentation

typedef struct grouper grouper

Defines a (value, name) pairing.

Variable names used are historical.

Function Documentation

void add_to_point_set ( struct point_set ps,
int  y,
int  x 
)

Add the point to the given point set, making more space if there is no more space left.

References point_set::allocated, mem_realloc(), point_set::n, point_set::pts, loc::x, and loc::y.

Referenced by cave_room_aux(), and target_get_monsters().

struct loc loc ( int  x,
int  y 
)
read
int point_set_contains ( struct point_set ps,
int  y,
int  x 
)

References i, point_set::n, point_set::pts, loc::x, and loc::y.

Referenced by cave_room_aux().

void point_set_dispose ( struct point_set ps)
struct point_set* point_set_new ( int  initial_size)
read

Utility functions to work with point_sets.

References point_set::allocated, mem_alloc(), mem_zalloc(), point_set::n, and point_set::pts.

Referenced by light_room(), and target_get_monsters().

int point_set_size ( struct point_set ps)