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-calcs.h"
#include "player-timed.h"
#include "source.h"
#include "trap.h"
#include "list-elements.h"
#include "list-projections.h"

Data Structures

struct  project_feature_handler_context_s
 

Feature handlers

More...
 

Macros

#define ELEM(a)   project_feature_handler_##a,
 
#define PROJ(a)   project_feature_handler_##a,
 

Typedefs

typedef struct
project_feature_handler_context_s 
project_feature_handler_context_t
 

Feature handlers

More...
 
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)
 
static void project_feature_handler_AWAY_UNDEAD (project_feature_handler_context_t *context)
 
static void project_feature_handler_AWAY_EVIL (project_feature_handler_context_t *context)
 
static void project_feature_handler_AWAY_ALL (project_feature_handler_context_t *context)
 
static void project_feature_handler_TURN_UNDEAD (project_feature_handler_context_t *context)
 
static void project_feature_handler_TURN_EVIL (project_feature_handler_context_t *context)
 
static void project_feature_handler_TURN_ALL (project_feature_handler_context_t *context)
 
static void project_feature_handler_DISP_UNDEAD (project_feature_handler_context_t *context)
 
static void project_feature_handler_DISP_EVIL (project_feature_handler_context_t *context)
 
static void project_feature_handler_DISP_ALL (project_feature_handler_context_t *context)
 
static void project_feature_handler_MON_CLONE (project_feature_handler_context_t *context)
 
static void project_feature_handler_MON_POLY (project_feature_handler_context_t *context)
 
static void project_feature_handler_MON_HEAL (project_feature_handler_context_t *context)
 
static void project_feature_handler_MON_SPEED (project_feature_handler_context_t *context)
 
static void project_feature_handler_MON_SLOW (project_feature_handler_context_t *context)
 
static void project_feature_handler_MON_CONF (project_feature_handler_context_t *context)
 
static void project_feature_handler_MON_SLEEP (project_feature_handler_context_t *context)
 
static void project_feature_handler_MON_HOLD (project_feature_handler_context_t *context)
 
static void project_feature_handler_MON_STUN (project_feature_handler_context_t *context)
 
static void project_feature_handler_MON_DRAIN (project_feature_handler_context_t *context)
 
bool project_f (struct source origin, int r, int y, int x, int dam, int typ)
 Called from project() to affect terrain features. More...
 

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)    project_feature_handler_##a,
#define PROJ (   a)    project_feature_handler_##a,

Typedef Documentation


Feature handlers

typedef void(* project_feature_handler_f)(project_feature_handler_context_t *)

Function Documentation

bool project_f ( struct source  origin,
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
originis the origin of the effect
ris the distance from the centre of the effect
ythe coordinates of the grid being handled
xthe coordinates of the grid being handled
damis the "damage" from the effect at distance r from the centre
typis the projection (PROJ_) 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 feature_handlers, NULL, 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_AWAY_ALL ( project_feature_handler_context_t context)
static
static void project_feature_handler_AWAY_EVIL ( project_feature_handler_context_t context)
static
static void project_feature_handler_AWAY_UNDEAD ( 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_DISP_ALL ( project_feature_handler_context_t context)
static
static void project_feature_handler_DISP_EVIL ( project_feature_handler_context_t context)
static
static void project_feature_handler_DISP_UNDEAD ( 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_MON_CLONE ( project_feature_handler_context_t context)
static
static void project_feature_handler_MON_CONF ( project_feature_handler_context_t context)
static
static void project_feature_handler_MON_DRAIN ( project_feature_handler_context_t context)
static
static void project_feature_handler_MON_HEAL ( project_feature_handler_context_t context)
static
static void project_feature_handler_MON_HOLD ( project_feature_handler_context_t context)
static
static void project_feature_handler_MON_POLY ( project_feature_handler_context_t context)
static
static void project_feature_handler_MON_SLEEP ( project_feature_handler_context_t context)
static
static void project_feature_handler_MON_SLOW ( project_feature_handler_context_t context)
static
static void project_feature_handler_MON_SPEED ( project_feature_handler_context_t context)
static
static void project_feature_handler_MON_STUN ( 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_TURN_ALL ( project_feature_handler_context_t context)
static
static void project_feature_handler_TURN_EVIL ( project_feature_handler_context_t context)
static
static void project_feature_handler_TURN_UNDEAD ( 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().