Code Statistics
cloc counts blank lines, comment lines, and physical lines of source code.
0.3.x
874 text files.
822 unique files.
7265 files ignored.
http://cloc.sourceforge.net v 1.53 T=25.0 s (23.6 files/s, 5047.2 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
C++ 194 8996 6618 49823
C/C++ Header 225 6246 5943 31865
XML 108 679 40 8747
HTML 55 0 0 5431
C 2 119 197 716
Python 1 76 219 240
Bourne Shell 3 19 4 74
Lua 1 14 0 47
DTD 1 18 7 41
-------------------------------------------------------------------------------
SUM: 590 16167 13028 96984
-------------------------------------------------------------------------------
Top 20 largest files in game/ by total line count:
2628 source/game/graphics/renderer.cpp
2083 source/game/entities/unit.cpp
1525 source/game/widgets/widgets.cpp
1370 source/game/gui/user_interface.cpp
1338 source/game/script/script_manager.cpp
1272 source/game/world/world.cpp
1139 source/game/prototypes/cmd_types_general.cpp
1071 source/game/game/game.cpp
1055 source/game/world/map.cpp
1053 source/game/ai/ai_rule.cpp
1036 source/game/search/route_planner.cpp
953 source/game/prototypes/cmd_types_worker.cpp
769 source/game/prototypes/command_type.h
762 source/game/menu/menu_state_new_game.cpp
737 source/game/widgets/widgets_base.cpp
737 source/game/gui/display.cpp
723 source/game/network/network_message.cpp
702 source/game/entities/faction.cpp
685 source/game/search/cluster_map.cpp
646 source/game/ai/ai.cpp
Top 20 number of lines in a method and top 20 largest amount of nested blocks in a method (not counting lines that are blank or only contain single line comments):
#Lines Method
----------------------------
201 bool FactionType::load(int ndx, const string &dir, const TechTree *techTree) {
174 bool EffectType::load(const XmlNode *en, const string &dir, const TechTree *tt, const FactionType *ft) {
168 LRESULT CALLBACK Window::eventRouter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
155 void DebugRenderer::commandLine(string &line) {
145 MenuStateNewGame::MenuStateNewGame(Program &program, MainMenu *mainMenu, bool openNetworkSlots)
136 void PlatformExceptionHandler::handler(int signo, siginfo_t *info, void *context) {
133 void UserInterface::computeDisplay() {
128 void HarvestCommandType::update(Unit *unit) const {
123 void Renderer::renderMap(Map *map, int x, int y, int clientW, int clientH, int cellSize) {
119 void RepairCommandType::update(Unit *unit) const {
117 void Map::pirateChangeHeight(int x, int y, int height, int radius) {
112 void MainWindow::buildMenuBar() {
109 void Renderer::renderSelectionEffects() {
109 void ScriptManager::initGame() {
105 void Map::load(const string &path, TechTree *techTree, Tileset *tileset, ObjectFactory &objFactory) {
105 bool ResourceType::load(const string &dir, int id) {
101 TravelState RoutePlanner::findPathToLocation(Unit *unit, const Vec2i &finalPos) {
99 void UserInterface::computeCommandInfo(int posDisplay) {
Depth Method
----------------------------
8 void UserInterface::computeDisplay() {
8 void UserInterface::computeCommandInfo(int posDisplay) {
8 void MapMaker::growForests(/* control variables ?? */) {
7 void World::tick() {
7 void WidgetConfig::loadBorderStyle(WidgetType widgetType, const char *table, BorderStyle &style) {
7 void SceneCuller::clipVisibleQuad(vector<Vec2f> &in) {
7 void RepairCommandType::update(Unit *unit) const {
7 void Renderer::renderUnitsFast(bool renderingShadows) {
7 void Minimap::updateUnitTex() {
7 void Map::load(const string &path, TechTree *techTree, Tileset *tileset, ObjectFactory &objFactory) {
7 void Map::glestChangeHeight(int x, int y, int height, int radius) {
7 void Faction::init(const FactionType *factionType, ControlType control, string playerName, TechTree *techTree,
7 void Faction::applyCostsOnInterval(const ResourceType *rt) {
7 void AiRuleBuild::findBuildingTypes(UnitTypeList &utList, const ResourceType *rt) {
7 bool CommandType::unitInRange(const Unit *unit, int range, Unit **rangedPtr,
7 bool AiRuleExpand::test(){
7 CommandResult Commander::tryGiveCommand(const Selection &selection, CommandFlags flags,
7 Cartographer::Cartographer(World *world)
6 void World::computeFow() {
6 void WidgetConfig::loadBackgroundStyle(WidgetType widgetType) {