# HG changeset patch # User smxx # Date 1269723113 0 # Node ID b0a02930a1dca567be06a1c92d6e22d3cb67dca9 # Parent e005359efc59646ea974d7c6ff03a85da264efb3 Engine: * Added sounds for Birdy (eggs breaking still missing) * Added random coughs/moans to poisoned hogs * Fixed one frame flickers when using fade in/out * Fixed fade in/out while using zoom Frontend: * Added chat context menu icons Themes: * Updated Underwater's horizon diff -r e005359efc59 -r b0a02930a1dc QTfrontend/chatwidget.cpp --- a/QTfrontend/chatwidget.cpp Sat Mar 27 17:45:51 2010 +0000 +++ b/QTfrontend/chatwidget.cpp Sat Mar 27 20:51:53 2010 +0000 @@ -84,16 +84,22 @@ mainLayout.addWidget(chatNicks, 0, 1); acInfo = new QAction(QAction::tr("Info"), chatNicks); + acInfo->setIcon(QIcon(":/res/info.png")); connect(acInfo, SIGNAL(triggered(bool)), this, SLOT(onInfo())); acKick = new QAction(QAction::tr("Kick"), chatNicks); + acKick->setIcon(QIcon(":/res/kick.png")); connect(acKick, SIGNAL(triggered(bool)), this, SLOT(onKick())); acBan = new QAction(QAction::tr("Ban"), chatNicks); + acBan->setIcon(QIcon(":/res/ban.png")); connect(acBan, SIGNAL(triggered(bool)), this, SLOT(onBan())); acFollow = new QAction(QAction::tr("Follow"), chatNicks); + acFollow->setIcon(QIcon(":/res/follow.png")); connect(acFollow, SIGNAL(triggered(bool)), this, SLOT(onFollow())); acIgnore = new QAction(QAction::tr("Ignore"), chatNicks); + acIgnore->setIcon(QIcon(":/res/ignore.png")); connect(acIgnore, SIGNAL(triggered(bool)), this, SLOT(onIgnore())); acFriend = new QAction(QAction::tr("Add friend"), chatNicks); + acFriend->setIcon(QIcon(":/res/addfriend.png")); connect(acFriend, SIGNAL(triggered(bool)), this, SLOT(onFriend())); chatNicks->insertAction(0, acInfo); @@ -341,14 +347,26 @@ // update context menu labels according to possible action if(ignoreList.contains(item->text(), Qt::CaseInsensitive)) + { acIgnore->setText(QAction::tr("Unignore")); + acIgnore->setIcon(QIcon(":/res/unignore.png")); + } else + { acIgnore->setText(QAction::tr("Ignore")); + acIgnore->setIcon(QIcon(":/res/ignore.png")); + } if(friendsList.contains(item->text(), Qt::CaseInsensitive)) + { acFriend->setText(QAction::tr("Remove friend")); + acFriend->setIcon(QIcon(":/res/remfriend.png")); + } else + { acFriend->setText(QAction::tr("Add friend")); + acFriend->setIcon(QIcon(":/res/addfriend.png")); + } } void HWChatWidget::setShowReady(bool s) diff -r e005359efc59 -r b0a02930a1dc QTfrontend/hedgewars.qrc --- a/QTfrontend/hedgewars.qrc Sat Mar 27 17:45:51 2010 +0000 +++ b/QTfrontend/hedgewars.qrc Sat Mar 27 20:51:53 2010 +0000 @@ -85,7 +85,14 @@ res/chat_default_off.png res/chat_ignore_off.png res/chat_friend_off.png - res/ammopicbox.png - res/ammopicdelay.png + res/ammopicbox.png + res/ammopicdelay.png + res/addfriend.png + res/remfriend.png + res/ignore.png + res/unignore.png + res/follow.png + res/info.png + res/kick.png diff -r e005359efc59 -r b0a02930a1dc QTfrontend/res/addfriend.png Binary file QTfrontend/res/addfriend.png has changed diff -r e005359efc59 -r b0a02930a1dc QTfrontend/res/follow.png Binary file QTfrontend/res/follow.png has changed diff -r e005359efc59 -r b0a02930a1dc QTfrontend/res/ignore.png Binary file QTfrontend/res/ignore.png has changed diff -r e005359efc59 -r b0a02930a1dc QTfrontend/res/info.png Binary file QTfrontend/res/info.png has changed diff -r e005359efc59 -r b0a02930a1dc QTfrontend/res/kick.png Binary file QTfrontend/res/kick.png has changed diff -r e005359efc59 -r b0a02930a1dc QTfrontend/res/remfriend.png Binary file QTfrontend/res/remfriend.png has changed diff -r e005359efc59 -r b0a02930a1dc QTfrontend/res/unignore.png Binary file QTfrontend/res/unignore.png has changed diff -r e005359efc59 -r b0a02930a1dc hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sat Mar 27 17:45:51 2010 +0000 +++ b/hedgewars/GSHandlers.inc Sat Mar 27 20:51:53 2010 +0000 @@ -2808,6 +2808,7 @@ HHGear^.Message := HHGear^.Message and not gm_Attack; if Gear^.FlightTime > 0 then begin AddGear(hwRound(Gear^.X), hwRound(Gear^.Y) + 32, gtEgg, 0, Gear^.dX * _0_5, Gear^.dY, 0); + PlaySound(sndBirdyLay); dec(Gear^.FlightTime) end; end; diff -r e005359efc59 -r b0a02930a1dc hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Sat Mar 27 17:45:51 2010 +0000 +++ b/hedgewars/HHHandlers.inc Sat Mar 27 20:51:53 2010 +0000 @@ -192,7 +192,10 @@ amDrill: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtDrill, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); amBallgun: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtBallgun, 0, xx * _0_5, yy * _0_5, 0); amJetpack: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtJetpack, 0, _0, _0, 0); - amBirdy: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y) - 120, gtBirdy, 0, _0, _0, 0); + amBirdy: begin + PlaySound(sndWhistle); + CurAmmoGear:= AddGear(hwRound(X), hwRound(Y) - 120, gtBirdy, 0, _0, _0, 0) + end; amLowGravity: begin PlaySound(sndLowGravity); cGravity:= cMaxWindSpeed / 2 diff -r e005359efc59 -r b0a02930a1dc hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Sat Mar 27 17:45:51 2010 +0000 +++ b/hedgewars/uConsts.pas Sat Mar 27 20:51:53 2010 +0000 @@ -114,7 +114,8 @@ sndNooo, sndHello, sndRopeShot, sndRopeAttach, sndRopeRelease, sndSwitchHog, sndVictory, sndSniperReload, sndSteps, sndLowGravity, sndHellishImpact1, sndHellishImpact2, sndHellishImpact3, sndHellishImpact4, - sndMelonImpact, sndDroplet1, sndDroplet2, sndDroplet3, sndEggBreak, sndDrillRocket); + sndMelonImpact, sndDroplet1, sndDroplet2, sndDroplet3, sndEggBreak, sndDrillRocket, + sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle); TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, @@ -838,7 +839,11 @@ (FileName: 'Droplet2.ogg'; Path: ptSounds),// sndDroplet2 (FileName: 'Droplet3.ogg'; Path: ptSounds),// sndDroplet3 (FileName: ''; Path: ptSounds),// sndEggBreak - (FileName: 'drillgun.ogg'; Path: ptSounds) // sndDrillRocket + (FileName: 'drillgun.ogg'; Path: ptSounds),// sndDrillRocket + (FileName: 'PoisonCough.ogg'; Path: ptVoices),// sndPoisonCough + (FileName: 'PoisonMoan.ogg'; Path: ptVoices),// sndPoisonMoan + (FileName: 'BirdyLay.ogg'; Path: ptSounds),// sndBirdyLay + (FileName: 'Whistle.ogg'; Path: ptSounds) // sndWhistle ); Ammoz: array [TAmmoType] of record diff -r e005359efc59 -r b0a02930a1dc hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sat Mar 27 17:45:51 2010 +0000 +++ b/hedgewars/uGears.pas Sat Mar 27 20:51:53 2010 +0000 @@ -636,6 +636,12 @@ begin Gear:= t; t:= Gear^.NextGear; + if (((GameTicks + Gear^.UID * 100) mod 1000) = 0) and (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog <> nil) and (PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned]) and (getRandom(100) = 0) then + if getRandom(2) = 0 then + PlaySound(sndPoisonCough, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack) + else + PlaySound(sndPoisonMoan, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack); + if Gear^.Active then begin if Gear^.RenderTimer and (Gear^.Timer > 500) and ((Gear^.Timer mod 1000) = 0) then diff -r e005359efc59 -r b0a02930a1dc hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Sat Mar 27 17:45:51 2010 +0000 +++ b/hedgewars/uWorld.pas Sat Mar 27 20:51:53 2010 +0000 @@ -802,25 +802,6 @@ if GameState = gsConfirm then DrawCentered(0, (cScreenHeight shr 1), ConfirmTexture); -SetScale(zoom); - -// Cursor -if isCursorVisible then - begin - if not bShowAmmoMenu then - with CurrentHedgehog^ do - if (Gear^.State and gstHHChooseTarget) <> 0 then - begin - i:= Ammo^[CurSlot, CurAmmo].Pos; - with Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType] do - if PosCount > 1 then - DrawSprite(PosSprite, CursorPoint.X - (SpritesData[PosSprite].Width shr 1), - cScreenHeight - CursorPoint.Y - (SpritesData[PosSprite].Height shr 1), - i); - end; - DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8) - end; - glDisable(GL_TEXTURE_2D); if ScreenFade <> sfNone then @@ -830,11 +811,11 @@ sfToBlack, sfToWhite: if ScreenFadeValue + Lag * ScreenFadeSpeed < sfMax then inc(ScreenFadeValue, Lag * ScreenFadeSpeed) else - ScreenFade:= sfNone; + ScreenFadeValue:= sfMax; sfFromBlack, sfFromWhite: if ScreenFadeValue - Lag * ScreenFadeSpeed > 0 then dec(ScreenFadeValue, Lag * ScreenFadeSpeed) else - ScreenFade:= sfNone; + ScreenFadeValue:= 0; end; if ScreenFade <> sfNone then begin @@ -858,10 +839,32 @@ glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer)); glDisableClientState(GL_VERTEX_ARRAY); - glColor4f(1, 1, 1, 1) + glColor4f(1, 1, 1, 1); + if not isFirstFrame and ((ScreenFadeValue = 0) or (ScreenFadeValue = sfMax)) then ScreenFade:= sfNone end end; +SetScale(zoom); +glEnable(GL_TEXTURE_2D); + +// Cursor +if isCursorVisible then + begin + if not bShowAmmoMenu then + with CurrentHedgehog^ do + if (Gear^.State and gstHHChooseTarget) <> 0 then + begin + i:= Ammo^[CurSlot, CurAmmo].Pos; + with Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType] do + if PosCount > 1 then + DrawSprite(PosSprite, CursorPoint.X - (SpritesData[PosSprite].Width shr 1), + cScreenHeight - CursorPoint.Y - (SpritesData[PosSprite].Height shr 1), + i); + end; + DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8) + end; + +glDisable(GL_TEXTURE_2D); glDisable(GL_BLEND); isFirstFrame:= false end; diff -r e005359efc59 -r b0a02930a1dc share/hedgewars/Data/Themes/Underwater/horizont.png Binary file share/hedgewars/Data/Themes/Underwater/horizont.png has changed