default.h

Go to the documentation of this file.
00001 /* $Id: default.h 14421 2008-09-30 20:39:50Z rubidium $ */
00002 
00005 #ifndef DEFAULT_H
00006 #define DEFAULT_H
00007 
00008 #include "../../direction_type.h"
00009 #include "../../vehicle_type.h"
00010 #include "../../rail_type.h"
00011 
00012 void AiDoGameLoop(Company *c);
00013 void SaveLoad_AI(CompanyID company);
00014 
00015 struct AiBuildRec {
00016   TileIndex spec_tile;
00017   TileIndex use_tile;
00018   byte rand_rng;
00019   byte cur_building_rule;
00020   byte unk6;
00021   byte unk7;
00022   byte buildcmd_a;
00023   byte buildcmd_b;
00024   byte direction;
00025   CargoID cargo;
00026 };
00027 
00028 struct CompanyAI {
00029   byte state;
00030   byte tick;            
00031   uint32 state_counter; 
00032   uint16 timeout_counter;
00033 
00034   byte state_mode;
00035   byte banned_tile_count;
00036   RailTypeByte railtype_to_use;
00037 
00038   CargoID cargo_type;
00039   byte num_wagons;
00040   byte build_kind;
00041   byte num_build_rec;
00042   byte num_loco_to_build;
00043   byte num_want_fullload;
00044 
00045   byte route_type_mask;
00046 
00047   TileIndex start_tile_a;
00048   TileIndex cur_tile_a;
00049   DiagDirectionByte cur_dir_a;
00050   DiagDirectionByte start_dir_a;
00051 
00052   TileIndex start_tile_b;
00053   TileIndex cur_tile_b;
00054   DiagDirectionByte cur_dir_b;
00055   DiagDirectionByte start_dir_b;
00056 
00057   Vehicle *cur_veh; 
00058 
00059   AiBuildRec src, dst, mid1, mid2;
00060 
00061   VehicleID wagon_list[9];
00062   byte order_list_blocks[20];
00063 
00064   TileIndex banned_tiles[16];
00065   byte banned_val[16];
00066 };
00067 
00068 extern CompanyAI _companies_ai[MAX_COMPANIES];
00069 
00070 #endif

Generated on Fri Nov 21 19:01:31 2008 for openttd by  doxygen 1.5.6