#include <SDL.h>#include <SDL_image.h>#include <boost/shared_ptr.hpp>#include <list>#include <vector>#include <string>#include <map>#include <math.h>#include <set>#include <boost/variant.hpp>#include <iostream>#include <sstream>#include <fstream>#include <guichan.hpp>#include <guichan/sdl.hpp>Go to the source code of this file.
Defines | |
| #define | pt shared_ptr |
| #define | NEW(x) pt_of(new x) |
| #define | MATCH_IN_ANY_ORDER(i1, v1, i2, v2) ((i1==v1 && i2 == v2) || (i1==v2 && i2 ==v1)) |
| #define | foreach(i, l) for((i) = (l).begin(); (i) != (l).end(); (i)++) |
| macro to iterate through STL containers more concisely. | |
| #define | setof(X, L, P, OUT) OUT.clear(); for(X = L.begin(); X != L.end(); X++) { if(P){ OUT.push_back(*X);}} |
| #define | setof_(M, X, L, P, OUT) OUT.clear(); for(X = L.begin(); X != L.end(); X++) { if(P){ OUT.push_back(M);}} |
Typedefs | |
| typedef seq_list< mood_and_string > | speech_t |
| typedef seq_list< anim_and_string > | speech2_t |
| typedef seq_list< pt< script_cmd > > | script_cmds_t |
| typedef seq_list< seq_list< mood_and_string > > | dialog_t |
| typedef map< pt< mood_t >, anim_right_left > | anim_of_mood_t |
| typedef map< int, SDL_Surface * > | surf_of_letter_t |
Enumerations | |
| enum | walk_there_or_not { walk_there_to_look_at, do_not_walk_there_to_look_at } |
| enum | container_type { CONCEPTS, PHYS_OBJECTS, CAN_CONTAIN_ANYTHING } |
| enum | direction { d_up, d_down, d_left, d_right } |
| enum | horizontal_dir { hd_right, hd_left } |
| enum | walking_phase { CONTACT, RECOIL, PASSING, HIGH_POINT } |
| enum | add_or_remove { ADD, REMOVE } |
| enum | show_or_hide { SHOW, HIDE } |
| enum | option_close_containers { close_any_open_container, do_not_close_containers } |
| enum | special_button_pick_result { SBPR_SAVE_LOAD, SBPR_CYCLE_PLAYER, SBPR_NOTHING, SBPR_STAY_FOLLOW } |
Functions | |
| template<class T> | |
| pt< T > | pt_of (T *t) |
| SDL_Rect | create_rect (int x1, int y2, int x2, int y2) |
| template<class T, class I> | |
| bool | pt_cast (pt< I > i, pt< T > &i2) |
| template<class T, class V> | |
| bool | var_cast (V i, T &i2) |
| template<class T> | |
| T::value_type | min (const T &l) |
| template<class T> | |
| T::value_type | max (const T &l) |
| template<class Map> | |
| Map::mapped_type | map_get (const Map &m, typename Map::key_type i) |
| template<class T> | |
| seq_list< T > | ulist (T first_el) |
| template<class T> | |
| pt< vector< typename T::value_type > > | vector_of (const T &l) |
| template<class T> | |
| pt< set< typename T::value_type > > | set_of (const T &l) |
| template<class Set> | |
| bool | in (typename Set::key_type i, const Set &s) |
| test whether a set<X> or map<X, Y> contains a given X. | |
| template<class L> | |
| bool | in_list (typename L::value_type el, const L &l) |
| test whether a vector<X> or list<X> contains a given X. | |
| pt< vector2< bool > > | walking_map_from_sdl_surface (SDL_Surface *s) |
| string | string_of_int (int i) |
| void | blit_char (const anim_frame_and_pos &src, float scaling, float lighting, cfsurf &screen) |
| pt< cfsurf > | sum_each_pixel (const list< surf_and_weight > &surfs, float time, SDL_Rect visible_rect) |
| pt< layer_lit > | lit_layer_of_unlit_layer (const layer_unlit_after_anim &unlit, const set< pt< light > > &on_lights, float time, SDL_Rect visible_rect) |
| rgbaf | sum_rgbaf (rgbaf r1, rgbaf r2) |
| rgbaf | rgbaf_of_rgbai (Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
| rgbaf | mul_scalar_rgbaf (float scal, rgbaf rg) |
| rgbaf | mul_scalar_rgbaf_noalpha (float scal, rgbaf rg) |
|
|
macro to iterate through STL containers more concisely.
Definition at line 87 of file fack.hpp. Referenced by path_finding::best_route(), FACK::circle_of_light(), FACK::contains_not_recursively(), FACK::contains_recursively(), FACK::define_dialog_aux(), text::draw_text_multiline_variable_ht(), draw_verb_dialog(), FACK::FACK(), item_in_room_at_position(), FACK::lit_layer_of_unlit_layer(), max(), min(), anim_frame_and_pos::print_with_transparency(), FACK::recompute_on_lights(), container::remove_item_aux(), container::remove_item_not_recursively(), container::remove_item_rec_aux(), container::render(), render_layers_and_chars_in_correct_order(), FACK::start(), sum_each_pixel(), and FACK::update_light_transitions(). |
|
|
Definition at line 63 of file fack.hpp. Referenced by my_game::execute_action_object_object(). |
|
|
|
|
|
|
For who knows python: means out = [x for x in l if p] Definition at line 99 of file fack.hpp. Referenced by path_finding::best_route(), and FACK::start(). |
|
|
For who knows python: means out = [y for x in l if p] Definition at line 110 of file fack.hpp. Referenced by path_finding::best_route(), FACK::cycle_active_player(), FACK::exec_next_scr_cmd(), FACK::FACK(), FACK::lit_layer_of_unlit_layer(), FACK::start(), and sum_each_pixel(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
This is a blit procedure tuned for characters. It features: per-pixel alpha-blending, scaling with linear interpolation, uniform lighting, clipping.
Definition at line 80 of file time-critical-procs.cc. References mul_scalar_rgbaf_noalpha(), and write_pixel_with_src_alpha(). Referenced by anim_frame_and_pos::print_with_transparency(). |
|
||||||||||||||||||||
|
Definition at line 5113 of file fack.cc. References int_pair::x, and int_pair::y. Referenced by draw_verb_dialog(), FACK::find_scrolling_rect(), zoomable::item_at_screen_pos(), my_game::my_game(), and FACK::start(). |
|
||||||||||||||||
|
test whether a set<X> or map<X, Y> contains a given X.
Definition at line 274 of file fack.hpp. Referenced by FACK::exec_next_scr_cmd(), my_game::execute_action_verb_object(), FACK::lit_layer_of_unlit_layer(), and FACK::update_light_transitions(). |
|
||||||||||||||||
|
test whether a vector<X> or list<X> contains a given X.
Definition at line 288 of file fack.hpp. Referenced by FACK::the_obj_was_clicked(). |
|
||||||||||||||||||||
|
|
|
||||||||||||||||
|
useful if you want to avoid using the operator[] of a map, because it has no const version. Definition at line 179 of file fack.hpp. Referenced by FACK::calc_command_bar_ht(), text::draw_text_multiline_variable_ht(), draw_verb_dialog(), end_commands(), FACK::exec_next_scr_cmd(), item_in_room_at_position(), FACK::lit_layer_of_unlit_layer(), my_game::my_game(), text::print_line_of_text(), anim_frame_and_pos::print_with_transparency(), FACK::start(), sum_each_pixel(), text::text_wt_in_pixels(), and FACK::update_AI_state(). |
|
||||||||||
|
Compute the maximum value of a list or vector. The contained type must provide an "operator >". Definition at line 163 of file fack.hpp. References foreach. Referenced by decide_position_for_text(), FACK::FACK(), anim_frame::get_pixel_with_interpolation(), and sum_each_pixel(). |
|
||||||||||
|
Compute the minimum value of a list or vector. The contained type must provide an "operator <". Definition at line 147 of file fack.hpp. References foreach. Referenced by FACK::find_scrolling_rect(), anim_frame::get_pixel_with_interpolation(), and sum_each_pixel(). |
|
||||||||||||
|
Definition at line 2679 of file fack.hpp. References rgbaf::a, rgbaf::b, rgbaf::g, and rgbaf::r. Referenced by anim_frame::get_pixel_with_interpolation(), and sum_each_pixel(). |
|
||||||||||||
|
Definition at line 2688 of file fack.hpp. References rgbaf::a, rgbaf::b, rgbaf::g, and rgbaf::r. Referenced by blit_char(), and sum_each_pixel(). |
|
||||||||||||||||
|
||||||||||
|
A function that allows to use shared_ptr in a more readable way. Example: instead of shared_ptr<Class> p; p = shared_ptr<Class>(new Class(4)); you write shared_ptr<Class> p; p = pt_of(new Class(4)); Definition at line 80 of file fack.hpp. Referenced by set_of(), and vector_of(). |
|
||||||||||||||||||||
|
Definition at line 2670 of file fack.hpp. Referenced by cfsurf::from_sdl_surface(), and anim_frame::from_sdl_surface(). |
|
||||||||||
|
Definition at line 253 of file fack.hpp. References pt_of(). Referenced by my_game::my_game(). |
|
|
Definition at line 48 of file fack.cc. Referenced by my_game::my_game(), and path_finding::string_of_int_pair(). |
|
||||||||||||||||
|
create a cfsurf whose rgba values are the sum of the corresponding values in the input cfsurf's.
Definition at line 181 of file time-critical-procs.cc. References foreach, map_get(), max(), min(), mul_scalar_rgbaf(), mul_scalar_rgbaf_noalpha(), NEW, surf_and_weight::oscillation_amplitude, pow(), setof_, sum_rgbaf(), and surf_and_weight::surf. Referenced by FACK::lit_layer_of_unlit_layer(). |
|
||||||||||||
|
Definition at line 2661 of file fack.hpp. References rgbaf::a, rgbaf::b, rgbaf::g, and rgbaf::r. Referenced by anim_frame::get_pixel_with_interpolation(), and sum_each_pixel(). |
|
||||||||||
|
Create a list without specifying the type of the contained element, but only the first element. Definition at line 223 of file fack.hpp. Referenced by draw_verb_dialog(), my_game::execute_action_object_object(), is_there_only_one_option_overall(), and my_game::my_game(). |
|
||||||||||||||||
|
Definition at line 129 of file fack.hpp. Referenced by FACK::exec_next_scr_cmd(), zoomable::item_at_screen_pos(), container::item_at_screen_pos(), FACK::render_command_bar(), FACK::start(), and FACK::update_AI_state(). |
|
||||||||||
|
Create a vector from a list (or anything that has a const_iterator) Definition at line 235 of file fack.hpp. References pt_of(). Referenced by animation::animation(), draw_verb_dialog(), FACK::exec_next_scr_cmd(), FACK::execute_commands(), is_there_only_one_option_overall(), and my_game::my_game(). |
|
|
Definition at line 1021 of file fack.cc. References NEW. Referenced by my_game::my_game(). |
1.4.0