11{ ***************************************************************************
22
33 This file is part of Vespucci.
4- Copyright (C) 2008, 2009, 2010, 2011 Dirk Stolle
4+ Copyright (C) 2008, 2009, 2010, 2011, 2015 Dirk Stolle
55
66 This program is free software: you can redistribute it and/or modify
77 it under the terms of the GNU General Public License as published by
@@ -72,6 +72,8 @@ interface
7272 (x: 50 ; y: 55 )
7373 );
7474
75+ { PlaceDollarSignHereDEFINE DEBUG_CODE 1}
76+
7577type
7678 { record type which holds different parts of (player's) score }
7779 TScoreRecord = record
@@ -561,7 +563,7 @@ TData = class
561563implementation
562564
563565uses
564- Terrain;
566+ Terrain, DebugWriter ;
565567
566568constructor TData.Create(const NumNation_Player: LongInt=cNationEngland);
567569var i: Integer;
@@ -635,7 +637,9 @@ procedure TData.InitializeMap;
635637 begin
636638 if m_Map.LoadFromFile(GetPathBase+america_map_path) then
637639 begin
638- WriteLn(' Map "' +GetPathBase+america_map_path+' " successfully loaded.' );
640+ { $IFDEF DEBUG_CODE}
641+ WriteDebugLn(' Map "' +GetPathBase+america_map_path+' " successfully loaded.' );
642+ { $ENDIF}
639643 InitTribes_America;
640644 end // if
641645 else begin
@@ -828,7 +832,9 @@ procedure TData.StartNewGame(const InAmerica: Boolean; const NumNation_Player: L
828832 SpawnEuropeanNation(j, cSpawnpointsAmerica[i].x, cSpawnpointsAmerica[i].y);
829833 bits:= bits or (1 shl i);
830834 end ;// for
831- WriteLn(' First ships created.' );
835+ { $IFDEF DEBUG_CODE}
836+ WriteDebugLn(' First ships created.' );
837+ { $ENDIF}
832838 end
833839 else begin
834840 // generate map
@@ -846,7 +852,9 @@ procedure TData.StartNewGame(const InAmerica: Boolean; const NumNation_Player: L
846852 SpawnEuropeanNation(j, cMap_X-1 , cSpawnpointsAmerica[i].y);
847853 bits:= bits or (1 shl i);
848854 end ;// for
849- WriteLn(' First ships created.' );
855+ { $IFDEF DEBUG_CODE}
856+ WriteDebugLn(' First ships created.' );
857+ { $ENDIF}
850858 end ;// else branch
851859 // TODO: complete this procedure
852860end ;// proc
0 commit comments