# HG changeset patch # User tiyuri@gmail.com # Date 1283375893 -3600 # Node ID 32cb5e1a6293ea2bd2455a39b59cc82fcddd08e5 # Parent 5341dc5a8919633747533591afadd78915d74d13# Parent 74664e8ee05a593c9478b517aafe0762e658bbfd New Art theme music (thank the lord!) diff -r 74664e8ee05a -r 32cb5e1a6293 hedgewars/CCHandlers.inc --- a/hedgewars/CCHandlers.inc Wed Sep 01 22:15:23 2010 +0100 +++ b/hedgewars/CCHandlers.inc Wed Sep 01 22:18:13 2010 +0100 @@ -291,7 +291,7 @@ s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; if not CurrentTeam^.ExtDriven then SendIPC('L'); -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do Message:= Message or gm_Left @@ -311,7 +311,7 @@ s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; if not CurrentTeam^.ExtDriven then SendIPC('R'); -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do Message:= Message or gm_Right @@ -331,7 +331,7 @@ s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; if not CurrentTeam^.ExtDriven then SendIPC('U'); -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do Message:= Message or gm_Up @@ -351,7 +351,7 @@ s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; if not CurrentTeam^.ExtDriven then SendIPC('D'); -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do Message:= Message or gm_Down @@ -371,7 +371,7 @@ s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; if not CurrentTeam^.ExtDriven then SendIPC('Z'); -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do Message:= Message or gm_Precise @@ -391,7 +391,7 @@ s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; if not CurrentTeam^.ExtDriven then SendIPC('j'); -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do Message:= Message or gm_LJump @@ -402,7 +402,7 @@ s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; if not CurrentTeam^.ExtDriven then SendIPC('J'); -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do Message:= Message or gm_HJump @@ -412,12 +412,7 @@ begin s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; -if ReadyTimeLeft > 1 then - begin - ReadyTimeLeft:= 1; // set to 1 millisecond so we still play the sound file - if not CurrentTeam^.ExtDriven then SendIPC('A'); - exit - end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do begin @@ -448,7 +443,7 @@ s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; if not CurrentTeam^.ExtDriven then SendIPC('S'); -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do Message:= Message or gm_Switch @@ -494,7 +489,7 @@ if (s[0] <> #1) or (s[1] < '1') or (s[1] > '5') or CheckNoTeamOrHH then exit; if not CurrentTeam^.ExtDriven then SendIPC(s); -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do begin @@ -510,7 +505,7 @@ slot:= byte(s[1]) - 49; if slot > cMaxSlotIndex then exit; if not CurrentTeam^.ExtDriven then SendIPC(char(byte(s[1]) + 79)); -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do begin @@ -585,7 +580,7 @@ begin if CheckNoTeamOrHH or isPaused then exit; -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; if not CurrentTeam^.ExtDriven then SendIPC('g'); @@ -595,7 +590,7 @@ procedure doPut(putX, putY: LongInt; fromAI: boolean); begin if CheckNoTeamOrHH or isPaused then exit; -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; if not CurrentTeam^.ExtDriven and bShowAmmoMenu then begin @@ -687,10 +682,11 @@ procedure chAmmoMenu(var s: shortstring); begin s:= s; // avoid compiler hint -if CheckNoTeamOrHH then -bShowAmmoMenu:= true +if CheckNoTeamOrHH then + bShowAmmoMenu:= true else -with CurrentTeam^ do + begin + with CurrentTeam^ do with Hedgehogs[CurrHedgehog] do begin bSelected:= false; @@ -699,7 +695,9 @@ else if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0) or ((MultiShootAttacks > 0) and ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_NoRoundEndHint) = 0)) or ((Gear^.State and gstHHDriven) = 0) then else bShowAmmoMenu:= true - end + end; + if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1 + end end; procedure chFullScr(var s: shortstring); @@ -800,7 +798,7 @@ procedure chPause(var s: shortstring); begin s:= s; // avoid compiler hint -if ReadyTimeLeft > 1 then begin ReadyTimeLeft:= 1; exit end; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; if gameType <> gmtNet then isPaused:= not isPaused; SDL_ShowCursor(ord(isPaused)) diff -r 74664e8ee05a -r 32cb5e1a6293 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Wed Sep 01 22:15:23 2010 +0100 +++ b/hedgewars/hwengine.pas Wed Sep 01 22:18:13 2010 +0100 @@ -85,7 +85,7 @@ ProcessKbd; if not isPaused then begin - if ReadyTimeLeft = 0 then DoGameTick(Lag); + DoGameTick(Lag); ProcessVisualGears(Lag); end; end; diff -r 74664e8ee05a -r 32cb5e1a6293 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Sep 01 22:15:23 2010 +0100 +++ b/hedgewars/uGears.pas Wed Sep 01 22:18:13 2010 +0100 @@ -848,7 +848,14 @@ and (CurrentHedgehog^.Gear <> nil) and ((CurrentHedgehog^.Gear^.State and gstAttacked) = 0) then PlaySound(sndHurry, CurrentTeam^.voicepack); - dec(TurnTimeLeft) + if ReadyTimeLeft > 0 then + begin + if ReadyTimeLeft = 2000 then + PlaySound(sndComeonthen, CurrentTeam^.voicepack); + dec(ReadyTimeLeft) + end + else + dec(TurnTimeLeft) end; if skipFlag then diff -r 74664e8ee05a -r 32cb5e1a6293 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Wed Sep 01 22:15:23 2010 +0100 +++ b/hedgewars/uStore.pas Wed Sep 01 22:18:13 2010 +0100 @@ -26,7 +26,6 @@ var PixelFormat: PSDL_PixelFormat; SDLPrimSurface: PSDL_Surface; PauseTexture, - ReadyTexture, SyncTexture, ConfirmTexture: PTexture; cScaleFactor: GLfloat; @@ -447,7 +446,6 @@ // TODO: are those textures ever freed? PauseTexture:= RenderStringTex(trmsg[sidPaused], cYellowColor, fntBig); -ReadyTexture:= RenderStringTex(trmsg[sidReady], cYellowColor, fntBig); ConfirmTexture:= RenderStringTex(trmsg[sidConfirm], cYellowColor, fntBig); SyncTexture:= RenderStringTex(trmsg[sidSync], cYellowColor, fntBig); diff -r 74664e8ee05a -r 32cb5e1a6293 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Wed Sep 01 22:15:23 2010 +0100 +++ b/hedgewars/uTeams.pas Wed Sep 01 22:18:13 2010 +0100 @@ -283,11 +283,19 @@ else TurnTimeLeft:= cHedgehogTurnTime; if (TurnTimeLeft > 0) and (CurrentHedgehog^.BotLevel = 0) then begin - PlaySound(sndComeonthen, CurrentTeam^.voicepack); - ReadyTimeLeft:= cReadyDelay + if CurrentTeam^.ExtDriven then + PlaySound(sndIllGetYou, CurrentTeam^.voicepack) + else + PlaySound(sndYesSir, CurrentTeam^.voicepack); + ReadyTimeLeft:= cReadyDelay; + AddCaption(Format(shortstring(trmsg[sidReady]), CurrentTeam^.TeamName), cWhiteColor, capgrpGameState) end else - ReadyTimeLeft:= 0; + begin + if TurnTimeLeft > 0 then + PlaySound(sndIllGetYou, CurrentTeam^.voicepack); + ReadyTimeLeft:= 0 + end end; function AddTeam(TeamColor: Longword): PTeam; diff -r 74664e8ee05a -r 32cb5e1a6293 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Wed Sep 01 22:15:23 2010 +0100 +++ b/hedgewars/uWorld.pas Wed Sep 01 22:18:13 2010 +0100 @@ -857,21 +857,6 @@ if fastUntilLag then DrawCentered(0, (cScreenHeight shr 1), SyncTexture); if isPaused then DrawCentered(0, (cScreenHeight shr 1), PauseTexture); -if ReadyTimeLeft > 0 then - begin - // TODO: move outside drawing code or do a spearate step in ugears? - if (ReadyTimeLeft = 1) or (ReadyTimeLeft < Lag) then - if (CurrentTeam^.ExtDriven or (CurrentHedgehog^.BotLevel > 0)) then - PlaySound(sndIllGetYou, CurrentTeam^.voicepack) - else - PlaySound(sndYesSir, CurrentTeam^.voicepack); - - if ReadyTimeLeft > Lag then - dec(ReadyTimeLeft, Lag) - else - ReadyTimeLeft:= 0; - DrawCentered(0, (cScreenHeight shr 1), ReadyTexture); - end; if not isFirstFrame and (missionTimer <> 0) or isPaused or fastUntilLag or (GameState = gsConfirm) then begin if (ReadyTimeLeft = 0) and (missionTimer > 0) then dec(missionTimer, Lag); diff -r 74664e8ee05a -r 32cb5e1a6293 share/hedgewars/Data/Locale/en.txt --- a/share/hedgewars/Data/Locale/en.txt Wed Sep 01 22:15:23 2010 +0100 +++ b/share/hedgewars/Data/Locale/en.txt Wed Sep 01 22:18:13 2010 +0100 @@ -64,7 +64,7 @@ 01:11=This weapon or utility is not yet available! 01:12=Last round till Sudden Death! 01:13=%1 rounds till Sudden Death! -01:14=Get ready! +01:14=Get ready, %1! ; Event messages ; Hog (%1) died