hedgewars/hwengine.dpr
changeset 565 092cb8deffc5
parent 564 17fb45c670c1
child 566 1c1cb593cb81
equal deleted inserted replaced
564:17fb45c670c1 565:092cb8deffc5
    67 var s: string;
    67 var s: string;
    68 begin
    68 begin
    69 inc(RealTicks, Lag);
    69 inc(RealTicks, Lag);
    70 
    70 
    71 inc(MusicTimerTicks, Lag);
    71 inc(MusicTimerTicks, Lag);
    72 if MusicTimerTicks > 3000 then
    72 if (MusicTimerTicks > 3000) and (GameState > gsStart) then
    73    begin
    73    begin
    74    PlayMusic;
    74    PlayMusic;
    75    MusicTimerTicks:= 0
    75    MusicTimerTicks:= 0
    76    end;
    76    end;
    77 
    77 
    79    gsLandGen: begin
    79    gsLandGen: begin
    80               GenMap;
    80               GenMap;
    81               GameState:= gsStart;
    81               GameState:= gsStart;
    82               end;
    82               end;
    83      gsStart: begin
    83      gsStart: begin
       
    84               InitPlaylistChunk(GetRandom(High(LongWord)));
    84               AssignHHCoords;
    85               AssignHHCoords;
    85               AddMiscGears;
    86               AddMiscGears;
    86               AdjustColor(cColorNearBlack);
    87               AdjustColor(cColorNearBlack);
    87               AdjustColor(cWaterColor);
    88               AdjustColor(cWaterColor);
    88               AdjustColor(cWhiteColor);
    89               AdjustColor(cWhiteColor);
    89               StoreLoad;
    90               StoreLoad;
    90               AdjustColor(cConsoleSplitterColor);
    91               AdjustColor(cConsoleSplitterColor);
    91               ResetKbd;
    92               ResetKbd;
    92               SoundLoad;
    93               SoundLoad;
    93               InitPlaylistChunk(GetRandom(High(LongWord)));
       
    94               if GameType = gmtSave then
    94               if GameType = gmtSave then
    95                  begin
    95                  begin
    96                  isSEBackup:= isSoundEnabled;
    96                  isSEBackup:= isSoundEnabled;
    97                  isSoundEnabled:= false
    97                  isSoundEnabled:= false
    98                  end;
    98                  end;