Freeciv-3.2
|
#include <stdio.h>
#include <stdlib.h>
#include "fcintl.h"
#include "log.h"
#include "mem.h"
#include "shared.h"
#include "support.h"
#include "events.h"
Go to the source code of this file.
Macros | |
#define | GEN_EV(event, section, descr) { #event, NULL, section, descr, NULL, event } |
Enumerations | |
enum | event_section_n { E_S_ADVANCE , E_S_BUILD , E_S_CITY , E_S_D_ME , E_S_D_THEM , E_S_GLOBAL , E_S_HUT , E_S_NATION , E_S_TREATY , E_S_UNIT , E_S_VOTE , E_S_WONDER , E_S_XYZZY } |
Functions | |
const char * | get_event_message_text (enum event_type event) |
static int | compar_event_message_texts (const void *i1, const void *i2) |
const char * | get_event_tag (enum event_type event) |
bool | is_city_event (enum event_type event) |
void | events_init (void) |
void | events_free (void) |
Variables | ||
static const char * | event_sections [] | |
struct { | ||
const char * enum_name | ||
char * tag_name | ||
enum event_section_n esn | ||
char * descr_orig | ||
char * full_descr | ||
enum event_type event | ||
} | events [] | |
static int | event_to_index [E_COUNT] | |
enum event_type | sorted_events [E_COUNT] | |
Comparison function for qsort; i1 and i2 are pointers to an event (enum event_type).
Definition at line 264 of file events.c.
Referenced by events_init().
Initialize events. Now also initialise sorted_events[].
Definition at line 331 of file events.c.
Referenced by message_options_init().
const char * get_event_message_text | ( | enum event_type | event | ) |
Returns the translated description of the given event.
Definition at line 247 of file events.c.
Referenced by compar_event_message_texts(), create_messageopt_dialog(), and message_dlg::fill_data().
const char * get_event_tag | ( | enum event_type | event | ) |
Returns a string for the sound to be used for this message type.
Definition at line 276 of file events.c.
Referenced by play_sound_for_event(), and tileset_lookup_sprite_tags().
bool is_city_event | ( | enum event_type | event | ) |
Does the event affect a city if there's one at the event location.
Definition at line 291 of file events.c.
Referenced by meswin_double_click().
char* descr_orig |
Definition at line 79 of file events.c.
Referenced by events_init().
Definition at line 76 of file events.c.
Referenced by _by_name(), and events_init().
enum event_section_n esn |
Definition at line 78 of file events.c.
Referenced by events_init().
enum event_type event |
Definition at line 81 of file events.c.
Referenced by api_notify_embassies_msg(), api_notify_event_msg(), api_notify_research_embassies_msg(), api_notify_research_msg(), change_build_target(), client_handle_packet(), units_select::closeEvent(), connection_list_event(), unit_item::contextMenuEvent(), fc_sidewidget::contextMenuEvent(), create_event(), hud_action::enterEvent(), fc_sidewidget::enterEvent(), chat_input::event(), fc_client::event(), event_after(), chatwdg::eventFilter(), city_dialog::eventFilter(), events_init(), FilterMouseMotionEvents(), force_exit_from_event_loop(), get_event_message_text(), get_event_sprite(), get_event_tag(), handle_event(), illegal_action_msg(), is_city_event(), keyboard_handler(), units_select::keyPressEvent(), hud_message_box::keyPressEvent(), unit_hud_selector::keyPressEvent(), map_view::keyPressEvent(), leave_mapcanvas(), hud_action::leaveEvent(), fc_sidewidget::leaveEvent(), message_options_load(), message_options_save(), meswin_add(), meswin_double_click(), motion_notify_event(), impr_item::mouseDoubleClickEvent(), qfc_dialog::mouseMoveEvent(), notify_dialog::mouseMoveEvent(), map_view::mouseMoveEvent(), resize_widget::mouseMoveEvent(), move_widget::mouseMoveEvent(), minimap_view::mouseMoveEvent(), info_tab::mouseMoveEvent(), fc_double_edge::mouseMoveEvent(), research_diagram::mouseMoveEvent(), unit_item::mousePressEvent(), city_map::mousePressEvent(), production_widget::mousePressEvent(), qfc_dialog::mousePressEvent(), notify_dialog::mousePressEvent(), units_select::mousePressEvent(), scale_widget::mousePressEvent(), resize_widget::mousePressEvent(), move_widget::mousePressEvent(), close_widget::mousePressEvent(), minimap_view::mousePressEvent(), info_tab::mousePressEvent(), plr_widget::mousePressEvent(), fc_double_edge::mousePressEvent(), research_diagram::mousePressEvent(), fc_sidewidget::mousePressEvent(), map_view::mouseReleaseEvent(), notify_conn(), notify_conn_early(), notify_embassies(), notify_player(), notify_research(), notify_research_embassies(), notify_team(), option_button_press_callback(), package_event(), package_event_full(), page_conn_etype(), map_view::paint(), fc_sidewidget::paint(), fc_sidebar::paint(), chatwdg::paintEvent(), qfc_dialog::paintEvent(), units_select::paintEvent(), goto_dialog::paintEvent(), scale_widget::paintEvent(), map_view::paintEvent(), info_tile::paintEvent(), minimap_view::paintEvent(), messagewdg::paintEvent(), fc_sidewidget::paintEvent(), fc_sidebar::paintEvent(), xvote::paintEvent(), receive_packet_chat_msg_100(), receive_packet_early_chat_msg_100(), receive_packet_page_msg_100(), fc_game_tab_widget::resizeEvent(), right_notebook_button_release(), science_diagram_button_release_callback(), fc_client::timerEvent(), tolua_server_notify_embassies_msg00(), tolua_server_notify_event_msg00(), tolua_server_notify_research_embassies_msg00(), tolua_server_notify_research_msg00(), vpackage_event(), unit_item::wheelEvent(), unit_info::wheelEvent(), impr_item::wheelEvent(), impr_info::wheelEvent(), units_select::wheelEvent(), minimap_view::wheelEvent(), and unittype_item::wheelEvent().
Definition at line 49 of file events.c.
Referenced by events_init().
Definition at line 239 of file events.c.
Referenced by events_init(), get_event_message_text(), and get_event_tag().
struct { ... } events[] |
Referenced by events_free(), events_init(), get_event_message_text(), get_event_tag(), and tileset_lookup_sprite_tags().
char* full_descr |
Definition at line 80 of file events.c.
Referenced by events_free(), and events_init().
enum event_type sorted_events[E_COUNT] |
Definition at line 241 of file events.c.
Referenced by events_init().
char* tag_name |
Definition at line 77 of file events.c.
Referenced by city_tile_link(), events_init(), load_sprite(), sprite_exists(), theme_load_sprite(), theme_unload_all_sprites(), theme_unload_sprite(), unit_tile_link(), unload_all_sprites(), and unload_sprite().