Logo Search packages:      
Sourcecode: 7kaa version File versions  Download package

Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions

Town Class Reference

List of all members.

Public Types

enum  { TOWN_NAME_LEN = 20 }

Public Member Functions

void add_queue (char skillId, char raceId)
int ai_build_neighbor_firm (int firmId, int firmRaceId=0)
int ai_settle_new (int raceId)
void assign_unit (int unitRecno)
void auto_defense (short targetRecno)
void auto_set_layout ()
int average_loyalty ()
int average_resistance (int nationRecno)
int average_target_loyalty ()
int average_target_resistance (int nationRecno)
void being_attacked (int attackerUnitRecno, float attackDamage)
int browse_selected_race_id ()
int camp_influence (int unitRecno)
int can_grant_to_non_own_town (int grantNationRecno)
int can_migrate (int destTownRecno, int migrateNow=0, int raceId=0)
int can_recruit (int raceId)
int can_toggle_firm_link (int firmRecno)
int can_train (int raceId)
void cancel_train_unit ()
void change_loyalty (int raceId, float loyaltyChange)
void change_resistance (int raceId, int nationRecno, float loyaltyChange)
void clear_defense_mode ()
void clear_ptr ()
int closest_own_camp ()
void collect_tax (char remoteAction)
void collect_yearly_tax ()
UCHAR crc8 ()
int create_rebel_unit (int raceId, int isLeader)
void dec_pop (int raceId, int unitHasJob)
void deinit ()
int detect_enemy (int)
void detect_info ()
void disp_auto_loyalty ()
void disp_info (int refreshFlag)
void distribute_demand ()
void draw (int displayLayer=1)
int draw_detect_link_line (int)
void draw_selected ()
int form_new_nation ()
void get_most_populated_race (int &mostRaceId1, int &mostRaceId2)
int get_selected_race ()
int grant_to_non_own_town (int grantNationRecno, int remoteAction)
int has_linked_camp (int nationRecno, int needOverseer)
int has_player_spy ()
void inc_pop (int raceId, int unitHasJob, int unitLoyalty)
void inc_pop_overcrowded (int raceId, int unitHasJob, int unitLoyalty)
int independent_unit_join_nation (int raceId, int toNationRecno)
void init (int, int, int, int)
void init_pop (int raceId, int addPop, int loyalty, int hasJob=0, int firstInit=0)
int is_hostile_nation (int nationRecno)
int is_in_zoom_win ()
void kill_town_people (int raceId, int attackerUnitRecno=0)
int linked_active_camp_count ()
short loc_height ()
short loc_width ()
int majority_race ()
int migrate_to (int destTownRecno, char remoteAction, int raceId=0)
int mobilize_defender (int attackerNationRecno)
int mobilize_town_people (int raceId, int decPop, int mobilizeSpy)
void move_pop (Town *destTown, int raceId, int hasJob)
int needed_anti_spy_level ()
int new_base_town_status ()
void next_day ()
int pick_random_race (int pickNonRecruitableAlso, int pickSpyFlag)
void process_ai ()
int protection_available ()
int protection_needed ()
int race_harmony (int raceId)
int read_file (File *)
int recruit (int withTraining, int raceId, char remoteAction)
int recruit_dec_loyalty (int raceId, int decNow=1)
int recruitable_race_pop (int raceId, int recruitSpy)
void reduce_defender_count ()
void release_firm_link (int)
void release_link ()
void release_town_link (int)
void remove_queue (char skillId)
void reset_hostile_nation (int nationRecno)
void reward (char remoteAction)
void set_auto_collect_tax_loyalty (int loyaltyLevel)
void set_auto_grant_loyalty (int loyaltyLevel)
void set_hostile_nation (int nationRecno)
void set_nation (int nationRecno)
void setup_link ()
int should_ai_migrate ()
void surrender (int toNationRecno)
int think_ai_migrate ()
int think_ai_migrate_to_town ()
int think_attack_linked_enemy ()
int think_attack_nearby_enemy ()
int think_build_base ()
int think_build_camp ()
int think_build_firm (int firmId, int maxFirm)
int think_build_inn ()
int think_build_market ()
int think_build_research ()
int think_build_war_factory ()
int think_capture_enemy_town ()
void think_capture_linked_firm ()
void think_collect_tax ()
int think_counter_spy ()
void think_defense ()
int think_independent_form_new_nation ()
void think_independent_set_link ()
void think_independent_town ()
int think_independent_unit_join_nation ()
void think_move_between_town ()
void think_reward ()
int think_scout ()
int think_split_town ()
int think_spying_town ()
int think_spying_town_assign_to (int raceId)
void toggle_firm_link (int linkId, int toggleFlag, char remoteAction, int setBoth=0)
void toggle_town_link (int linkId, int toggleFlag, char remoteAction, int setBoth=0)
char * town_name ()
void update_base_town_status ()
void update_camp_link ()
void update_loyalty ()
void update_product_supply ()
void update_quality_of_life ()
void update_resistance ()
void update_target_loyalty ()
void update_target_resistance ()
void verify_slot_object_id_array ()
short worker_population ()
int write_file (File *)

Public Attributes

short abs_x1
short abs_x2
short abs_y1
short abs_y2
int accumulated_collect_tax_penalty
int accumulated_enemy_grant_penalty
int accumulated_recruit_penalty
int accumulated_reward_penalty
char ai_link_checked
char ai_town
short auto_collect_tax_loyalty
short auto_grant_loyalty
short center_x
short center_y
short defend_target_recno
short first_slot_id
char has_linked_enemy_camp
char has_linked_own_camp
char has_product_supply [MAX_PRODUCT]
char independ_town_nation_relation
short independent_unit_join_nation_min_rating
char is_base_town
short jobless_population
short jobless_race_pop_array [MAX_RACE]
int last_being_attacked_date
int last_rebel_date
short layout_id
short linked_firm_array [MAX_LINKED_FIRM_TOWN]
short linked_firm_count
char linked_firm_enable_array [MAX_LINKED_FIRM_TOWN]
short linked_town_array [MAX_LINKED_TOWN_TOWN]
short linked_town_count
char linked_town_enable_array [MAX_LINKED_TOWN_TOWN]
short loc_x1
short loc_x2
short loc_y1
short loc_y2
short max_race_pop_array [MAX_RACE]
short nation_recno
char no_neighbor_space
short population
short quality_of_life
char race_id
float race_loyalty_array [MAX_RACE]
short race_pop_array [MAX_RACE]
unsigned char race_pop_growth_array [MAX_RACE]
float race_resistance_array [MAX_RACE][MAX_NATION]
short race_spy_count_array [MAX_RACE]
char race_target_loyalty_array [MAX_RACE]
char race_target_resistance_array [MAX_RACE][MAX_NATION]
short rebel_recno
float received_hit_count
BYTE region_id
int setup_date
short slot_object_id_array [MAX_TOWN_LAYOUT_SLOT]
DWORD start_train_frame_no
char town_combat_level
short town_defender_count
short town_name_id
short town_recno
char train_queue_count
char train_queue_race_array [MAX_TRAIN_QUEUE]
char train_queue_skill_array [MAX_TRAIN_QUEUE]
int train_unit_action_id
short train_unit_recno

Static Public Attributes

static short if_town_recno = 0

Private Member Functions

void calc_loyalty ()
void daily_update_loyalty ()
void detect_auto_menu (int modeCollectTax)
void detect_main_menu ()
void detect_spy_menu ()
void detect_train_menu ()
void disp_auto_menu (int modeCollectTax)
void disp_basic_info (int refreshFlag)
void disp_debug_resistance (int refreshFlag)
void disp_main_menu (int refreshFlag)
void disp_queue_button (int y, int skillId, int buttonUp)
void disp_spy_menu (int refreshFlag)
void disp_train_button (int y, int skillId, int buttonUp)
void disp_train_info (int refreshFlag)
void disp_train_menu (int refreshFlag)
void draw_farm (int, int, int)
void draw_flag (int, int)
void establish_contact_with_player ()
void finish_train (Unit *)
void migrate (int raceId, int destTownZoneRecno, int newLoyalty)
void population_grow ()
void process_auto ()
void process_food ()
void process_queue ()
void process_train ()
void restore_world_matrix ()
void set_world_matrix ()
int think_layout_id ()
void think_migrate ()
int think_migrate_one (Town *targetTown, int raceId, int townDistance)
void think_rebel ()
int think_surrender ()
int unjob_town_people (int raceId, int unjobOverseer, int killOverseer=0)

Detailed Description

Definition at line 88 of file OTOWN.h.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index