# src Directory Reference

## Directories

directory | ai
directory | blitter
directory | core
directory | misc
directory | music
directory | network
directory | os
directory | sound
directory | spriteloader
directory | strgen
directory | table
directory | video
directory | widgets
directory | yapf

## Files

file | aircraft.h [code]
file | aircraft_cmd.cpp [code]
| This file deals with aircraft and airport movements functionalities.

file | aircraft_gui.cpp [code]
file | airport.cpp [code]
file | airport.h [code]
| Various declarations for airports.

file | airport_gui.cpp [code]
file | airport_movement.h [code]
| Heart of the airports and their finite state machines.

file | articulated_vehicles.cpp [code]
file | articulated_vehicles.h [code]
file | autoreplace_base.h [code]
| Base class for autoreplaces/autorenews.

file | autoreplace_cmd.cpp [code]
file | autoreplace_func.h [code]
| Functions related to autoreplacing.

file | autoreplace_gui.cpp [code]
file | autoreplace_gui.h [code]
| Functions related to the autoreplace GUIs.

file | autoreplace_type.h [code]
| Types related to autoreplacing.

file | autoslope.h [code]
file | aystar.cpp [code]
file | aystar.h [code]
| This file has the header for AyStar AyStar is a fast pathfinding routine and is used for things like AI_pathfinding and Train_pathfinding.

file | bmp.cpp [code]
file | bmp.h [code]
file | bridge.h [code]
| Header file for bridges.

file | bridge_gui.cpp [code]
| Graphical user interface for bridge construction.

file | bridge_map.cpp [code]
| Map accessor functions for bridges.

file | bridge_map.h [code]
| Map accessor functions for bridges.

file | build_vehicle_gui.cpp [code]
file | callback_table.cpp [code]
file | callback_table.h [code]
file | cargo_type.h [code]
| Types related to cargos.

file | cargopacket.cpp [code]
| Implementation of the cargo packets.

file | cargopacket.h [code]
file | cargotype.cpp [code]
file | cargotype.h [code]
file | clear_cmd.cpp [code]
file | clear_map.h [code]
| Map accessors for 'clear' tiles.

file | cmd_helper.h [code]
file | command.cpp [code]
file | command_func.h [code]
| Functions related to commands.

file | command_type.h [code]
| Types related to commands.

file | console.cpp [code]
file | console.h [code]
file | console_cmds.cpp [code]
file | currency.cpp [code]
file | currency.h [code]
file | date.cpp [code]
file | date_func.h [code]
| Functions related to dates.

file | date_type.h [code]
| Types related to the dates in OpenTTD.

file | debug.cpp [code]
file | debug.h [code]
file | dedicated.cpp [code]
file | depot.cpp [code]
file | depot.h [code]
| Header files for depots (not hangars).

file | depot_gui.cpp [code]
file | direction_func.h [code]
| Different functions related to conversions between directions.

file | direction_type.h [code]
| Different types to 'show' directions.

file | disaster_cmd.cpp [code]
| All disaster/easter egg vehicles are handled here.

file | dock_gui.cpp [code]
file | driver.cpp [code]
file | driver.h [code]
file | dummy_land.cpp [code]
file | economy.cpp [code]
file | economy_func.h [code]
| Functions related to the economy.

file | economy_type.h [code]
| Types related to the economy.

file | elrail.cpp [code]
| This file deals with displaying wires and pylons for electric railways.

file | endian_check.cpp [code]
| This pretty simple file checks if the system is LITTLE_ENDIAN or BIG_ENDIAN it does that by putting a 1 and a 0 in an array, and read it out as one number.

file | engine.cpp [code]
file | engine.h [code]
file | engine_gui.cpp [code]
file | fileio.cpp [code]
| Standard In/Out file operations.

file | fileio.h [code]
| Declarations for Standard In/Out file operations.

file | fios.cpp [code]
| This file contains functions for building file lists for the save/load dialogs.

file | fios.h [code]
| Declarations for savegames operations.

file | fontcache.cpp [code]
file | fontcache.h [code]
file | functions.h [code]
file | genworld.cpp [code]
file | genworld.h [code]
file | genworld_gui.cpp [code]
file | gfx.cpp [code]
file | gfx_func.h [code]
| Functions related to the gfx engine.

file | gfx_type.h [code]
| Types related to the graphics and/or input devices.

file | gfxinit.cpp [code]
file | gfxinit.h [code]
file | graph_gui.cpp [code]
file | group.h [code]
file | group_cmd.cpp [code]
| Handling of the engine groups.

file | group_gui.cpp [code]
file | group_gui.h [code]
| Functions/definitions that have something to do with groups.

file | gui.h [code]
file | heightmap.cpp [code]
file | heightmap.h [code]
file | helpers.cpp [code]
file | industry.h [code]
file | industry_cmd.cpp [code]
file | industry_gui.cpp [code]
file | industry_map.h [code]
| Accessors for industries.

file | industry_type.h [code]
| Types related to the industry.

file | intro_gui.cpp [code]
file | landscape.cpp [code]
file | landscape.h [code]
file | livery.h [code]
file | lzoconf.h [code]
| -- configuration for the LZO real-time data compression library

file | main_gui.cpp [code]
file | map.cpp [code]
file | map_func.h [code]
file | map_type.h [code]
| Types related to maps.

file | md5.cpp [code]
file | md5.h [code]
file | minilzo.cpp [code]
file | minilzo.h [code]
file | misc.cpp [code]
file | misc_cmd.cpp [code]
file | misc_gui.cpp [code]
file | mixer.cpp [code]
file | mixer.h [code]
file | music.cpp [code]
file | music.h [code]
file | music_gui.cpp [code]
file | namegen.cpp [code]
file | namegen.h [code]
file | newgrf.cpp [code]
file | newgrf.h [code]
file | newgrf_callbacks.h [code]
file | newgrf_canal.cpp [code]
file | newgrf_canal.h [code]
file | newgrf_cargo.cpp [code]
file | newgrf_cargo.h [code]
file | newgrf_commons.cpp [code]
| Implementation of the class OverrideManagerBase and its descendance, present and futur.

file | newgrf_commons.h [code]
| This file simplyfies and embeds a common mechanism of loading/saving and mapping of grf entities.

file | newgrf_config.cpp [code]
file | newgrf_config.h [code]
file | newgrf_engine.cpp [code]
file | newgrf_engine.h [code]
file | newgrf_generic.cpp [code]
file | newgrf_generic.h [code]
file | newgrf_gui.cpp [code]
file | newgrf_house.cpp [code]
file | newgrf_house.h [code]
file | newgrf_industries.cpp [code]
file | newgrf_industries.h [code]
file | newgrf_industrytiles.cpp [code]
file | newgrf_industrytiles.h [code]
file | newgrf_sound.cpp [code]
file | newgrf_sound.h [code]
file | newgrf_spritegroup.cpp [code]
file | newgrf_spritegroup.h [code]
file | newgrf_station.cpp [code]
| Functions for dealing with station classes and custom stations.

file | newgrf_station.h [code]
| Header file for NewGRF stations.

file | newgrf_storage.cpp [code]
| Functionality related to the temporary and persistent storage arrays for NewGRFs.

file | newgrf_storage.h [code]
| Functionality related to the temporary and persistent storage arrays for NewGRFs.

file | newgrf_string_type.h [code]
file | newgrf_text.cpp [code]
| Implementation of Action 04 "universal holder" structure and functions.

file | newgrf_text.h [code]
| Header of Action 04 "universal holder" structure and functions.

file | newgrf_town.cpp [code]
file | newgrf_town.h [code]
file | newgrf_townname.cpp [code]
| Implementation of Action 0F "universal holder" structure and functions.

file | newgrf_townname.h [code]
| Header of Action 0F "universal holder" structure and functions.

file | news.h [code]
file | news_gui.cpp [code]
| News system is realized as a FIFO queue (in an array) The positions in the queue can't be rearranged, we only access the array elements through pointers to the elements.

file | npf.cpp [code]
file | npf.h [code]
file | oldloader.cpp [code]
file | oldpool.cpp [code]
file | oldpool.h [code]
file | openttd.cpp [code]
file | openttd.h [code]
file | order.h [code]
file | order_cmd.cpp [code]
file | order_gui.cpp [code]
file | os2.cpp [code]
file | os_timer.cpp [code]
file | pathfind.cpp [code]
file | pathfind.h [code]
file | player_base.h [code]
| Definition of stuff that is very close to a player, like the player struct itself.

file | player_face.h [code]
| Functionality related to the player's face.

file | player_func.h [code]
| Functions related to players.

file | player_gui.cpp [code]
file | player_gui.h [code]
| GUI Functions related to players.

file | player_type.h [code]
| Types related to players.

file | players.cpp [code]
file | queue.cpp [code]
file | queue.h [code]
file | rail.cpp [code]
file | rail.h [code]
file | rail_cmd.cpp [code]
file | rail_gui.cpp [code]
| File for dealing with rail construction user interface.

file | rail_gui.h [code]
| Functions/types etc.

file | rail_map.h [code]
| Hides the direct accesses to the map array with map accessors.

file | rail_type.h [code]
| The different types of rail.

file | resource.h [code]
file | road.cpp [code]
file | road_cmd.cpp [code]
file | road_cmd.h [code]
file | road_func.h [code]
| Functions related to roads.

file | road_gui.cpp [code]
file | road_gui.h [code]
| Functions/types related to the road GUIs.

file | road_internal.h [code]
| Functions used internally by the roads.

file | road_map.cpp [code]
file | road_map.h [code]
file | road_type.h [code]
| Enums and other types related to roads.

file | roadveh.h [code]
| Road vehicle states.

file | roadveh_cmd.cpp [code]
file | roadveh_gui.cpp [code]
file | saveload.cpp [code]
| All actions handling saving and loading goes on in this file.

file | saveload.h [code]
file | screenshot.cpp [code]
file | screenshot.h [code]
file | sdl.cpp [code]
file | sdl.h [code]
file | settings.cpp [code]
| All actions handling saving and loading of the settings/configuration goes on in this file.

file | settings_func.h [code]
| Functions related to setting/changing the settings.

file | settings_gui.cpp [code]
file | settings_internal.h [code]
| Functions and types used internally for the settings configurations.

file | settings_type.h [code]
| Types related to global configuration settings.

file | ship.h [code]
file | ship_cmd.cpp [code]
file | ship_gui.cpp [code]
file | signal.cpp [code]
| functions related to rail signals updating

file | signal_func.h [code]
| Functions related to signals.

file | signs.cpp [code]
file | signs.h [code]
file | signs_gui.cpp [code]
file | slope_func.h [code]
| Functions related to slopes.

file | slope_type.h [code]
| Definitions of a slope.

file | smallmap_gui.cpp [code]
file | sound.cpp [code]
file | sound_func.h [code]
| Functions related to sound.

file | sound_type.h [code]
| Types related to sounds.

file | sprite.h [code]
file | spritecache.cpp [code]
file | spritecache.h [code]
file | station.cpp [code]
file | station.h [code]
file | station_cmd.cpp [code]
file | station_gui.cpp [code]
file | station_gui.h [code]
| Contains enums and function declarations connected with stations GUI.

file | station_map.h [code]
file | stdafx.h [code]
file | string.cpp [code]
file | string_func.h [code]
| Functions related to low-level strings.

file | string_type.h [code]
| Types for strings.

file | strings.cpp [code]
file | strings_func.h [code]
| Functions related to OTTD's strings.

file | strings_type.h [code]
| Types related to strings.

file | subsidy_gui.cpp [code]
file | terraform_cmd.cpp [code]
| Commands related to terraforming.

file | terraform_gui.cpp [code]
file | terraform_gui.h [code]
| GUI stuff related to terraforming.

file | textbuf_gui.h [code]
| Stuff related to the text buffer GUI.

file | texteff.cpp [code]
file | texteff.hpp [code]
file | tgp.cpp [code]
| OTTD Perlin Noise Landscape Generator, aka TerraGenesis Perlin.

file | tgp.h [code]
file | thread.cpp [code]
file | thread.h [code]
file | tile_cmd.h [code]
| Generic 'commands' that can be performed on all tiles.

file | tile_map.cpp [code]
file | tile_map.h [code]
| Map writing/reading functions for tiles.

file | tile_type.h [code]
| Types related to tiles.

file | timetable.h [code]
file | timetable_cmd.cpp [code]
file | timetable_gui.cpp [code]
file | town.h [code]
file | town_cmd.cpp [code]
file | town_gui.cpp [code]
file | town_map.h [code]
| Accessors for towns.

file | town_type.h [code]
| Types related to towns.

file | track_func.h [code]
| Different conversion functions from one kind of track to another.

file | track_type.h [code]
| All types related to tracks.

file | train.h [code]
file | train_cmd.cpp [code]
file | train_gui.cpp [code]
file | transparency.h [code]
file | transparency_gui.cpp [code]
file | transparency_gui.h [code]
file | tree_cmd.cpp [code]
file | tree_map.h [code]
file | tunnel_map.cpp [code]
file | tunnel_map.h [code]
file | tunnelbridge.h [code]
| Header file for things common for tunnels and bridges.

file | tunnelbridge_cmd.cpp [code]
| This file deals with tunnels and bridges (non-gui stuff).

file | tunnelbridge_map.h [code]
| Functions that have tunnels and bridges in common.

file | unix.cpp [code]
file | unmovable.h [code]
file | unmovable_cmd.cpp [code]
file | unmovable_map.h [code]
file | variables.h [code]
file | vehicle.cpp [code]
file | vehicle_base.h [code]
| Base class for all vehicles.

file | vehicle_func.h [code]
file | vehicle_gui.cpp [code]
file | vehicle_gui.h [code]
file | vehicle_type.h [code]
| Types related to vehicles.

file | viewport.cpp [code]
file | viewport_func.h [code]
| Functions related to (drawing on) viewports.

file | viewport_type.h [code]
| Types related to viewports.

file | void_map.h [code]
file | water.h [code]
| Functions related to water (management).

file | water_cmd.cpp [code]
file | water_map.h [code]
file | waypoint.cpp [code]
file | waypoint.h [code]
file | widget.cpp [code]
file | win32.cpp [code]
| Implementation of MS Windows system calls.

file | win32.h [code]
| declarations of functions for MS windows systems

file | window.cpp [code]
| windowing system, widgets and events

file | window_func.h [code]
| Window functions not directly related to making/drawing windows.

file | window_gui.h [code]
| Functions, definitions and such used only by the GUI.

file | window_type.h [code]
| Types related to windows.

file | zoom_func.h [code]
file | zoom_type.h [code]
| Types related to zooming in and out.