making indentation consistent (noticed while debugging)
authornemo
Sun, 31 Oct 2010 12:19:54 -0400
changeset 4046 cfdbddc4b385
parent 4045 e3a2a39a8277
child 4047 6c07a302b7c0
making indentation consistent (noticed while debugging)
hedgewars/hwengine.pas
hedgewars/uConsole.pas
hedgewars/uKeys.pas
hedgewars/uMisc.pas
--- a/hedgewars/hwengine.pas	Sun Oct 31 00:32:41 2010 -0400
+++ b/hedgewars/hwengine.pas	Sun Oct 31 12:19:54 2010 -0400
@@ -267,24 +267,25 @@
 
     LoadLocale(Pathz[ptLocale] + '/en.txt');  // Do an initial load with english
     if cLocaleFName <> 'en.txt' then
-    begin
+        begin
         // Try two letter locale first before trying specific locale overrides
         if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then
             LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt');
         LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
-    end;
+        end;
 
     WriteLnToConsole(msgGettingConfig);
+
     if recordFileName = '' then
-    begin
+        begin
         InitIPC;
         SendIPCAndWaitReply('C');        // ask for game config
-    end
+        end
     else
-    begin
+        begin
         LoadRecordFromFile(recordFileName);
         perfExt_SaveBeganSynching();
-    end;
+        end;
 
     ScriptOnGameInit;
 
--- a/hedgewars/uConsole.pas	Sun Oct 31 00:32:41 2010 -0400
+++ b/hedgewars/uConsole.pas	Sun Oct 31 12:19:54 2010 -0400
@@ -90,22 +90,22 @@
     done: boolean;
 begin
 {$IFNDEF NOCONSOLE}
-    {$IFDEF DEBUGFILE}AddFileLog('Console write: ' + s);{$ENDIF}
-    Write(s);
-    done:= false;
+{$IFDEF DEBUGFILE}AddFileLog('Console write: ' + s);{$ENDIF}
+Write(s);
+done:= false;
 
-    while not done do
+while not done do
     begin
-        Len:= cLineWidth - Length(ConsoleLines[CurrLine].s);
-        SetLine(ConsoleLines[CurrLine], ConsoleLines[CurrLine].s + copy(s, 1, Len));
-        Delete(s, 1, Len);
-        if byte(ConsoleLines[CurrLine].s[0]) = cLineWidth then
+    Len:= cLineWidth - Length(ConsoleLines[CurrLine].s);
+    SetLine(ConsoleLines[CurrLine], ConsoleLines[CurrLine].s + copy(s, 1, Len));
+    Delete(s, 1, Len);
+    if byte(ConsoleLines[CurrLine].s[0]) = cLineWidth then
         begin
-            inc(CurrLine);
-            if CurrLine = cLinesCount then CurrLine:= 0;
-            PByte(@ConsoleLines[CurrLine].s)^:= 0
+        inc(CurrLine);
+        if CurrLine = cLinesCount then CurrLine:= 0;
+        PByte(@ConsoleLines[CurrLine].s)^:= 0
         end;
-        done:= (Length(s) = 0);
+    done:= (Length(s) = 0);
     end;
 {$ENDIF}
 end;
@@ -113,12 +113,12 @@
 procedure WriteLnToConsole(s: shortstring);
 begin
 {$IFNDEF NOCONSOLE}
-    WriteToConsole(s);
-    WriteLn;
-    inc(CurrLine);
-    if CurrLine = cLinesCount then
-        CurrLine:= 0;
-    PByte(@ConsoleLines[CurrLine].s)^:= 0
+WriteToConsole(s);
+WriteLn;
+inc(CurrLine);
+if CurrLine = cLinesCount then
+    CurrLine:= 0;
+PByte(@ConsoleLines[CurrLine].s)^:= 0
 {$ENDIF}
 end;
 
--- a/hedgewars/uKeys.pas	Sun Oct 31 00:32:41 2010 -0400
+++ b/hedgewars/uKeys.pas	Sun Oct 31 12:19:54 2010 -0400
@@ -264,15 +264,16 @@
 
 for i:= 6 to cKeyMaxIndex do
     begin
-        s:= shortstring(sdl_getkeyname(i));
+    s:= shortstring(sdl_getkeyname(i));
     //writeln(stdout,inttostr(i) + ': ' + s);
-        if s = 'unknown key' then KeyNames[i]:= ''
-        else begin
+    if s = 'unknown key' then KeyNames[i]:= ''
+    else 
+        begin
         for t:= 1 to Length(s) do
             if s[t] = ' ' then s[t]:= '_';
-            KeyNames[i]:= s
+        KeyNames[i]:= s
         end;
-end;
+    end;
 
 //for i:= 0 to cKeyMaxIndex do writeln(stdout,inttostr(i) + ': ' + KeyNames[i]);
 
--- a/hedgewars/uMisc.pas	Sun Oct 31 00:32:41 2010 -0400
+++ b/hedgewars/uMisc.pas	Sun Oct 31 12:19:54 2010 -0400
@@ -280,12 +280,12 @@
 begin
 // obsolete? written in WriteLnToConsole() anyway
 // {$IFDEF DEBUGFILE}AddFileLog(Msg);{$ENDIF}
-    WriteLnToConsole(Msg);
-    if isFatalError then
+WriteLnToConsole(Msg);
+if isFatalError then
     begin
-        SendIPC('E' + GetLastConsoleLine);
-        SDL_Quit;
-        halt(1)
+    SendIPC('E' + GetLastConsoleLine);
+    SDL_Quit;
+    halt(1)
     end
 end;