Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

src/crogue.c File Reference


Detailed Description

Main file for initialization, the event loop, and cleanup.

See also:
sys/ticalc/main.c

sys/curses/main.c

Definition in file crogue.c.

#include "crogue.h"
#include "substdio.h"
#include "export.h"

Go to the source code of this file.

Functions

void cb_main_menu_choice (int n, char *buf)
void main_menu (void)
void initialize (void)
void resize_map_store (int size_x, int size_y)
void eventloop (void)
void die (const char *cause_of_death)
void end_game (const char *cause_of_death)
void quit (void)
void cleanup (void)
void timepass (ushort amt)

Variables

worldw
const char * main_menu_choices []
const int num_main_menu_choices = 6


Function Documentation

void cb_main_menu_choice int  n,
char *  buf
[static]
 

Definition at line 189 of file crogue.c.

References main_menu_choices.

Referenced by main_menu().

void cleanup void   ) 
 

Definition at line 293 of file crogue.c.

References cleanup_items(), debug_free, world::itemids, world::plr, world::shuffletranslation, player::spellknowledge, sys_cleanup(), world::t, UI_TF_Deinit(), and w.

Referenced by panic(), and quit().

void die const char *  cause_of_death  ) 
 

Definition at line 250 of file crogue.c.

References draw(), end_game(), KEY_ACKNOWLEDGE, message(), and read_char().

Referenced by plr_takedamage(), and potion_numbness_expire().

void end_game const char *  cause_of_death  ) 
 

Definition at line 260 of file crogue.c.

References award_high_score(), award_item_points(), cleanup_save(), display_scores(), message(), world::plr, quit(), read_char(), player::score, and w.

Referenced by die(), follow_connection(), and plr_move().

void eventloop void   ) 
 

Definition at line 239 of file crogue.c.

References draw(), and plr_move().

Referenced by main().

void initialize void   ) 
 

Definition at line 92 of file crogue.c.

References COORD, debug_calloc, display_title_screen(), enter_map(), get_entropy, init_discoveries(), init_layout(), init_options(), init_shuffle_tab(), init_spells(), load_options(), lsrand(), main_menu(), MAPSIZE_X, MAPSIZE_Y, world::messagevis, OPTION_GRAY_ON, OPTION_GRAYSCALE, world::options, restore_game(), sys_init(), sys_init_data_file(), world::time, UI_MF_clear(), UI_TF_Init(), and w.

Referenced by main().

void main_menu void   )  [static]
 

Definition at line 195 of file crogue.c.

References cb_main_menu_choice(), COORD, world::current_map, world::current_map_link, deref_file_ptr(), world::desc, display_scores(), display_title_screen(), gen_map(), help(), init_player(), world::level, main_menu_rect, world_descriptor::mainmap, mapdesc::mapindex, world::maxlevel, num_main_menu_choices, options_menu(), quit(), world_descriptor::tutorialmap, UI_Menu_Pick(), and w.

Referenced by initialize().

void quit void   ) 
 

Definition at line 283 of file crogue.c.

References cleanup().

Referenced by end_game(), main_menu(), and plr_move().

void resize_map_store int  size_x,
int  size_y
 

Definition at line 154 of file crogue.c.

References COORD, debug_free, debug_malloc, world::mapsize_x, world::mapsize_y, world::t, UI_TF_Init(), and w.

Referenced by gen_map(), load_level(), and restore_game().

void timepass ushort  amt  ) 
 

Definition at line 311 of file crogue.c.

References addrandommonst(), call_usefunc(), monster::energy, player::extrinsic, player::facing_forced, get_item_property(), player::hps, player::hps_max, INVENTORY, isNull, ITEMDESC, player::level, lrand(), world::m, MAPDESC_CURRENT, MAPFLAG_NORANDMONST, MDESC, message(), MONSTERS_MAX, monstmove(), player::partialhps, player::partialpps, world::plr, plr_takedamage(), PLRINVSIZE, player::pps, player::pps_max, PROPERTY_BURN, remove_expired_timers(), player::satiation, STAT_DIGESTION, STAT_FLAG_DRAIN, STAT_FLAG_TIMER, STAT_FLAGS, STAT_MANA, STAT_REGEN, STAT_SPEED, world::time, monster::type, uint, update_player(), player::velocity, and w.

Referenced by cast_spell(), do_drop_item(), do_takeoff_item(), do_wear_item(), follow_connection(), manip_door(), pickup(), plr_move(), plr_run(), plr_search(), plr_walk(), study_spell(), throw_item(), tool_holysymbol(), and use_item().


Variable Documentation

const char* main_menu_choices[] [static]
 

Initial value:

 {
    gettext("New game"),
    gettext("Help"),
    gettext("Tutorial"),
    gettext("High scores"),
    gettext("Options"),
    gettext("Quit")
    }

Definition at line 178 of file crogue.c.

Referenced by cb_main_menu_choice().

const int num_main_menu_choices = 6 [static]
 

Definition at line 186 of file crogue.c.

Referenced by main_menu().

world* w
 

Definition at line 85 of file crogue.c.

Referenced by _UI_TF_DrawTile(), add_item(), add_mark(), add_timer(), addrandommonst(), apply_stat_mod_desc(), apply_timers(), attack_tile(), auto_follow_connection(), award_high_score(), award_item_points(), award_mark(), awardXP(), base_coat(), bigmap_place_corridor(), bigmap_place_room(), bigmap_place_vault(), bigmap_postpass(), bigmap_prepass(), calc_light(), calc_light_tile(), call_attackfunc(), call_genericfunc(), call_stepfunc(), call_throwhitfunc(), call_usefunc(), cast_spell(), cause_confusion(), cave_pass(), cb_cave(), cb_cave_partial(), cb_options_menu(), char_info(), cleanup(), cleanup_items(), cleanup_save(), compress_items(), compress_monsters(), compress_tiles(), confuse_monster(), connection_fill(), construct_rect(), count_adjacent_tiles(), count_items(), delete_item(), deref_file_ptr(), deref_file_ptr_partial(), deref_jump_table(), distribute_attributes(), dll_fill_room(), do_drop_item(), draw(), draw_item(), draw_tile(), end_game(), enter_map(), facing_towards(), find_monster_description(), follow_connection(), force_follow_connection(), full_redraw(), gather_wandering_monsters(), gen_map(), get_plr(), get_w(), give_gold(), give_item_slip(), hotkey_item(), hunger_status(), identify_type(), illuminate(), init_discoveries(), init_inventory(), init_items(), init_options(), init_player(), init_shuffle_tab(), init_skills(), init_spells(), init_timers(), initialize(), item_step(), learn_spell(), light_room(), link_data_file(), list_discoveries(), load_level(), load_options(), main_menu(), make_connections(), make_door(), make_noise(), manip_door(), marks_to_advance(), mod_from_attribute(), monst_anger(), monst_attack_plr(), monst_attack_type(), monst_battle_pet(), monst_can_attack_player(), monst_chat(), monst_detect_player(), monst_facing(), monst_heal(), monst_hit_plr(), monst_is_aligned_with_plr(), monst_is_peaceful(), monst_is_pet(), monst_remove(), monst_swing_monst(), monst_takedamage(), monstbytile(), monstcanmove(), monstmove(), monstmoveawayfromplayer(), monstmoverandomly(), monstmoveto(), monstmovetowardsplayer(), monstname(), numSpellsKnown(), options_menu(), pet_move(), pickup(), place_corridors(), place_doors(), place_fountain(), place_hole(), place_item(), place_items(), place_monster(), place_player_on_map(), place_player_randomly(), place_room(), place_shop(), place_wandering_monsters(), player_can_see(), player_facing(), playerclassname(), plr_attack(), plr_attack_monster_roll(), plr_mod_stat(), plr_move(), plr_moveto(), plr_restore_stat(), plr_run(), plr_search(), plr_takedamage(), plr_walk(), potion_numbness_expire(), print_skills(), prompt_dir(), refresh_spell(), remove_expired_timers(), replace(), resize_map_store(), restore_game(), save_game(), save_level(), scare_monster_force(), spell_confusion(), spellByIndex(), spellString(), study_book(), study_spell(), sys_cleanup(), sys_init_data_file(), throw_item(), tile_is_occupied(), tile_is_passable(), tile_is_transparent(), timepass(), tool_holysymbol(), top_item(), trace_path(), tracevision(), type_is_identified(), UI_MF_clear(), UI_MF_history(), UI_MF_sendmsg(), UI_TF_DrawEffect(), UI_TF_Scroll(), update_player(), vmessage(), weapon_skill_attack(), weapon_skill_damage(), webspinner_build(), and webspinner_cower().


Generated on Thu May 20 13:12:12 2004 for CalcRogue by doxygen 1.3.6