Angband
Data Structures | Macros | Typedefs | Functions | Variables
project-feat.c File Reference

projection effects on terrain More...

#include "angband.h"
#include "cave.h"
#include "game-world.h"
#include "generate.h"
#include "obj-pile.h"
#include "obj-util.h"
#include "player-timed.h"
#include "trap.h"
#include "list-elements.h"
#include "list-project-environs.h"
#include "list-project-monsters.h"

Data Structures

struct  project_feature_handler_context_s
 

Feature handlers

More...

Macros

#define ELEM(a, b, c, d, e, f, g, col)   project_feature_handler_##a,
#define PROJ_ENV(a, col)   project_feature_handler_##a,
#define PROJ_MON(a, obv)   NULL,

Typedefs

typedef struct
project_feature_handler_context_s 
project_feature_handler_context_t
 

Feature handlers


typedef void(* project_feature_handler_f )(project_feature_handler_context_t *)

Functions

static void project_feature_handler_LIGHT_WEAK (project_feature_handler_context_t *context)
static void project_feature_handler_DARK_WEAK (project_feature_handler_context_t *context)
static void project_feature_handler_KILL_WALL (project_feature_handler_context_t *context)
static void project_feature_handler_KILL_DOOR (project_feature_handler_context_t *context)
static void project_feature_handler_KILL_TRAP (project_feature_handler_context_t *context)
static void project_feature_handler_MAKE_DOOR (project_feature_handler_context_t *context)
static void project_feature_handler_MAKE_TRAP (project_feature_handler_context_t *context)
static void project_feature_handler_ACID (project_feature_handler_context_t *context)
static void project_feature_handler_ELEC (project_feature_handler_context_t *context)
static void project_feature_handler_FIRE (project_feature_handler_context_t *context)
static void project_feature_handler_COLD (project_feature_handler_context_t *context)
static void project_feature_handler_POIS (project_feature_handler_context_t *context)
static void project_feature_handler_LIGHT (project_feature_handler_context_t *context)
static void project_feature_handler_DARK (project_feature_handler_context_t *context)
static void project_feature_handler_SOUND (project_feature_handler_context_t *context)
static void project_feature_handler_SHARD (project_feature_handler_context_t *context)
static void project_feature_handler_NEXUS (project_feature_handler_context_t *context)
static void project_feature_handler_NETHER (project_feature_handler_context_t *context)
static void project_feature_handler_CHAOS (project_feature_handler_context_t *context)
static void project_feature_handler_DISEN (project_feature_handler_context_t *context)
static void project_feature_handler_WATER (project_feature_handler_context_t *context)
static void project_feature_handler_ICE (project_feature_handler_context_t *context)
static void project_feature_handler_GRAVITY (project_feature_handler_context_t *context)
static void project_feature_handler_INERTIA (project_feature_handler_context_t *context)
static void project_feature_handler_FORCE (project_feature_handler_context_t *context)
static void project_feature_handler_TIME (project_feature_handler_context_t *context)
static void project_feature_handler_PLASMA (project_feature_handler_context_t *context)
static void project_feature_handler_METEOR (project_feature_handler_context_t *context)
static void project_feature_handler_MISSILE (project_feature_handler_context_t *context)
static void project_feature_handler_MANA (project_feature_handler_context_t *context)
static void project_feature_handler_HOLY_ORB (project_feature_handler_context_t *context)
static void project_feature_handler_ARROW (project_feature_handler_context_t *context)
bool project_f (int who, int r, int y, int x, int dam, int typ)
 Called from project() to affect terrain features.

Variables

static const
project_feature_handler_f 
feature_handlers []

Detailed Description

projection effects on terrain

Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke

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.

Macro Definition Documentation

#define ELEM (   a,
  b,
  c,
  d,
  e,
  f,
  g,
  col 
)    project_feature_handler_##a,
#define PROJ_ENV (   a,
  col 
)    project_feature_handler_##a,
#define PROJ_MON (   a,
  obv 
)    NULL,

Typedef Documentation


Feature handlers

typedef void(* project_feature_handler_f)(project_feature_handler_context_t *)

Function Documentation

bool project_f ( int  who,
int  r,
int  y,
int  x,
int  dam,
int  typ 
)

Called from project() to affect terrain features.

Called for projections with the PROJECT_GRID flag set, which includes beam, ball and breath effects.

Parameters
whois the monster list index of the caster
ris the distance from the centre of the effect
y
xthe coordinates of the grid being handled
damis the "damage" from the effect at distance r from the centre
typis the projection (GF_) type
Returns
whether the effects were obvious

Note that this function determines if the player can see anything that happens by taking into account: blindness, line-of-sight, and illumination.

Hack – effects on grids which are memorized but not in view are also seen.

References FALSE, feature_handlers, and project_feature_handler_context_s::obvious.

Referenced by project().

static void project_feature_handler_ACID ( project_feature_handler_context_t context)
static
static void project_feature_handler_ARROW ( project_feature_handler_context_t context)
static
static void project_feature_handler_CHAOS ( project_feature_handler_context_t context)
static
static void project_feature_handler_COLD ( project_feature_handler_context_t context)
static
static void project_feature_handler_DARK ( project_feature_handler_context_t context)
static
static void project_feature_handler_DARK_WEAK ( project_feature_handler_context_t context)
static
static void project_feature_handler_DISEN ( project_feature_handler_context_t context)
static
static void project_feature_handler_ELEC ( project_feature_handler_context_t context)
static
static void project_feature_handler_FIRE ( project_feature_handler_context_t context)
static
static void project_feature_handler_FORCE ( project_feature_handler_context_t context)
static
static void project_feature_handler_GRAVITY ( project_feature_handler_context_t context)
static
static void project_feature_handler_HOLY_ORB ( project_feature_handler_context_t context)
static
static void project_feature_handler_ICE ( project_feature_handler_context_t context)
static
static void project_feature_handler_INERTIA ( project_feature_handler_context_t context)
static
static void project_feature_handler_KILL_DOOR ( project_feature_handler_context_t context)
static
static void project_feature_handler_KILL_TRAP ( project_feature_handler_context_t context)
static
static void project_feature_handler_KILL_WALL ( project_feature_handler_context_t context)
static
static void project_feature_handler_LIGHT ( project_feature_handler_context_t context)
static
static void project_feature_handler_LIGHT_WEAK ( project_feature_handler_context_t context)
static
static void project_feature_handler_MAKE_DOOR ( project_feature_handler_context_t context)
static
static void project_feature_handler_MAKE_TRAP ( project_feature_handler_context_t context)
static
static void project_feature_handler_MANA ( project_feature_handler_context_t context)
static
static void project_feature_handler_METEOR ( project_feature_handler_context_t context)
static
static void project_feature_handler_MISSILE ( project_feature_handler_context_t context)
static
static void project_feature_handler_NETHER ( project_feature_handler_context_t context)
static
static void project_feature_handler_NEXUS ( project_feature_handler_context_t context)
static
static void project_feature_handler_PLASMA ( project_feature_handler_context_t context)
static
static void project_feature_handler_POIS ( project_feature_handler_context_t context)
static
static void project_feature_handler_SHARD ( project_feature_handler_context_t context)
static
static void project_feature_handler_SOUND ( project_feature_handler_context_t context)
static
static void project_feature_handler_TIME ( project_feature_handler_context_t context)
static
static void project_feature_handler_WATER ( project_feature_handler_context_t context)
static

Variable Documentation

const project_feature_handler_f feature_handlers[]
static

Referenced by project_f().