# HG changeset patch # User unc0rr # Date 1455041476 -10800 # Node ID b69f5f22a3ba7987eae27d10efd183fa30769d20 # Parent caa1e84c3ac29faa6efdd7e7b673da6cc3b5bda6# Parent c22d292e7266fa0060845e1235d5a24b3db188e2 Merge default diff -r caa1e84c3ac2 -r b69f5f22a3ba .travis.yml --- a/.travis.yml Fri Jan 01 19:15:32 2016 +0300 +++ b/.travis.yml Tue Feb 09 21:11:16 2016 +0300 @@ -59,4 +59,4 @@ - "See details at %{build_url}" on_success: change on_failure: always - skip_join: true + skip_join: false diff -r caa1e84c3ac2 -r b69f5f22a3ba ChangeLog.txt --- a/ChangeLog.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/ChangeLog.txt Tue Feb 09 21:11:16 2016 +0300 @@ -2,11 +2,21 @@ * bugfixes 0.9.22 -> 0.9.23 - * Hammer damage is now rounded down. This means it will cause NO DAMAGE to a hedgehog with less than 3 hp. + + Improved hedgehog spawns on maps that lack land mass or free space + + Highlander mode displays game scheme specifics (mines timer, etc.) in ESC info + + AI hedgehogs know how to use Bee now + + Small visual effects enhancements + * Video recording functionality is restored + * Gameplay fix: Hammer damage is now rounded down. This means it will cause NO DAMAGE to a hedgehog with less than 3 hp. * Fixed bee not being affected by wrap world edge while still being thrown * Fixed turn not ending when sticky mine was trapped on rubberband + * Fixed screenshots being too bright if taken in quick succession + * Fixed hog-speech missing a response type (Justyouwait/"You're gonna pay for that") on some platforms (e.g. Linux) * Various other fixes +Lua-API: + + New call: SetCinematicMode(enable) -- e.g. for cutscenes etc. + 0.9.21 -> 0.9.22 + New Weapon / Map object: AirMine (floating mine that will follow nearby hedgehogs) + Extensive changes to TechRacer: Variable terrain types, enhanced parameters, hwmap interpreter, fuel limiter, etc. diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/Doxyfile --- a/QTfrontend/Doxyfile Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/Doxyfile Tue Feb 09 21:11:16 2016 +0300 @@ -190,7 +190,7 @@ # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = "repo{1}=http://code.google.com/p/hedgewars/source/browse/QTfrontend/\1" +ALIASES = "repo{1}=http://hg.hedgewars.org/hedgewars/file/default/QTfrontend/\1" # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/main.cpp --- a/QTfrontend/main.cpp Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/main.cpp Tue Feb 09 21:11:16 2016 +0300 @@ -28,6 +28,7 @@ #include #include #include +#include #include "hwform.h" #include "hwconsts.h" @@ -318,7 +319,8 @@ engine->setWriteDir(cfgdir->absolutePath()); engine->mountPacks(); - QTranslator Translator; + QTranslator TranslatorHedgewars; + QTranslator TranslatorQt; { QSettings settings(DataManager::instance().settingsFileName(), QSettings::IniFormat); settings.setIniCodec("UTF-8"); @@ -333,10 +335,13 @@ cc = HWApplication::keyboardInputLocale().name(); } - // load locale file into translator - if (!Translator.load(QString("physfs://Locale/hedgewars_%1").arg(cc))) - qWarning("Failed to install translation (%s)", qPrintable(cc)); - app.installTranslator(&Translator); + // Load locale files into translators + if (!TranslatorHedgewars.load(QString("physfs://Locale/hedgewars_%1").arg(cc))) + qWarning("Failed to install Hedgewars translation (%s)", qPrintable(cc)); + if (!TranslatorQt.load(QString("%1/qt_%2").arg(QLibraryInfo::location(QLibraryInfo::TranslationsPath), cc))) + qWarning("Failed to install Qt translation (%s)", qPrintable(cc)); + app.installTranslator(&TranslatorHedgewars); + app.installTranslator(&TranslatorQt); app.setLayoutDirection(QLocale(cc).textDirection()); } diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/res/StatsBestKiller.png Binary file QTfrontend/res/StatsBestKiller.png has changed diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/res/StatsCustomAchievement.png Binary file QTfrontend/res/StatsCustomAchievement.png has changed diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/res/StatsHedgehogsKilled.png Binary file QTfrontend/res/StatsHedgehogsKilled.png has changed diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/res/StatsMostSelfDamage.png Binary file QTfrontend/res/StatsMostSelfDamage.png has changed diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/res/StatsSelfKilled.png Binary file QTfrontend/res/StatsSelfKilled.png has changed diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/res/StatsSkipped.png Binary file QTfrontend/res/StatsSkipped.png has changed diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/ui/dialog/bandialog.cpp --- a/QTfrontend/ui/dialog/bandialog.cpp Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/ui/dialog/bandialog.cpp Tue Feb 09 21:11:16 2016 +0300 @@ -58,6 +58,7 @@ connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject())); this->setWindowModality(Qt::WindowModal); + this->setWindowTitle(tr("Ban player")); } bool BanDialog::byIP() diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/ui/dialog/input_ip.cpp --- a/QTfrontend/ui/dialog/input_ip.cpp Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/ui/dialog/input_ip.cpp Tue Feb 09 21:11:16 2016 +0300 @@ -63,6 +63,7 @@ connect(pbDefault, SIGNAL(clicked()), this, SLOT(setDefaultPort())); this->setWindowModality(Qt::WindowModal); + this->setWindowTitle(tr("Connect to server")); } void HWHostPortDialog::setDefaultPort() diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/ui/page/pagenetserver.cpp --- a/QTfrontend/ui/page/pagenetserver.cpp Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/ui/page/pagenetserver.cpp Tue Feb 09 21:11:16 2016 +0300 @@ -83,7 +83,7 @@ labelURL->setText( "" "
" - "" + + "" + tr("Click here for details") + "
"); labelURL->setOpenExternalLinks(true); diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/ui/widget/chatwidget.cpp --- a/QTfrontend/ui/widget/chatwidget.cpp Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/ui/widget/chatwidget.cpp Tue Feb 09 21:11:16 2016 +0300 @@ -373,7 +373,7 @@ return QString("%1").arg(Qt::escape(nickname)); } -const QRegExp HWChatWidget::URLREGEXP = QRegExp("(http(s)?://)?(www\\.)?((hedgewars\\.org|code\\.google\\.com|googlecode\\.com|hh\\.unit22\\.org)(/[^ ]*)?)"); +const QRegExp HWChatWidget::URLREGEXP = QRegExp("(http(s)?://)?(www\\.)?((([^/:?&#]+\\.)?hedgewars\\.org|code\\.google\\.com|googlecode\\.com|hh\\.unit22\\.org)(/[^ ]*)?)"); bool HWChatWidget::containsHighlight(const QString & sender, const QString & message) { diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/ui/widget/feedbackdialog.cpp --- a/QTfrontend/ui/widget/feedbackdialog.cpp Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/ui/widget/feedbackdialog.cpp Tue Feb 09 21:11:16 2016 +0300 @@ -60,6 +60,7 @@ setModal(true); setWindowFlags(Qt::Sheet); setWindowModality(Qt::WindowModal); + setWindowTitle(tr("Feedback")); setMinimumSize(700, 460); resize(700, 460); setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); @@ -84,7 +85,7 @@ "" "

%1

" "

%2

" - "

%3 known bugs

" + "

%3 known bugs

" "

%4

" "

") .arg(tr("Send us feedback!")) diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/ui/widget/hatprompt.cpp --- a/QTfrontend/ui/widget/hatprompt.cpp Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/ui/widget/hatprompt.cpp Tue Feb 09 21:11:16 2016 +0300 @@ -60,6 +60,7 @@ setModal(true); setWindowFlags(Qt::Sheet); setWindowModality(Qt::WindowModal); + setWindowTitle(tr("Choose a hat")); setMinimumSize(550, 430); resize(550, 430); setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/ui/widget/roomnameprompt.cpp --- a/QTfrontend/ui/widget/roomnameprompt.cpp Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/ui/widget/roomnameprompt.cpp Tue Feb 09 21:11:16 2016 +0300 @@ -32,6 +32,7 @@ setModal(true); setWindowFlags(Qt::Sheet); setWindowModality(Qt::WindowModal); + setWindowTitle(tr("Create room")); setMinimumSize(360, 130); resize(360, 180); setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/ui/widget/seedprompt.cpp --- a/QTfrontend/ui/widget/seedprompt.cpp Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/ui/widget/seedprompt.cpp Tue Feb 09 21:11:16 2016 +0300 @@ -31,6 +31,7 @@ setModal(true); setWindowFlags(Qt::Sheet); setWindowModality(Qt::WindowModal); + setWindowTitle(tr("Seed")); setMinimumSize(360, 160); resize(360, 160); setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/ui/widget/themeprompt.cpp --- a/QTfrontend/ui/widget/themeprompt.cpp Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/ui/widget/themeprompt.cpp Tue Feb 09 21:11:16 2016 +0300 @@ -61,6 +61,7 @@ setModal(true); setWindowFlags(Qt::Sheet); setWindowModality(Qt::WindowModal); + setWindowTitle(tr("Choose a theme")); setMinimumSize(550, 430); resize(550, 430); setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); diff -r caa1e84c3ac2 -r b69f5f22a3ba QTfrontend/weapons.h --- a/QTfrontend/weapons.h Fri Jan 01 19:15:32 2016 +0300 +++ b/QTfrontend/weapons.h Tue Feb 09 21:11:16 2016 +0300 @@ -17,11 +17,67 @@ */ -// TODO: keep on documenting all the weapons -//skip---------------------------------| -//structure------------------------------------------------------------------| +/* + AmmoType lookup table (use monospace font / cursor movements) - + amGrenade-----------------------| + amClusterBomb--------------------| + amBazooka-------------------------| + amBee------------------------------| + amShotgun---------------------------| + amPickHammer-------------------------| + amSkip--------------------------------| + amRope---------------------------------| + amMine----------------------------------| + amDEagle---------------------------------| + amDynamite--------------------------------| + amFirePunch--------------------------------| + amWhip--------------------------------------| + amBaseballBat--------------------------------| + amParachute-----------------------------------| + amAirAttack------------------------------------| + amMineStrike------------------------------------| + amBlowTorch--------------------------------------| + amGirder------------------------------------------| + amTeleport-----------------------------------------| + amSwitch--------------------------------------------| + amMortar---------------------------------------------| + amKamikaze--------------------------------------------| + amCake-------------------------------------------------| + amSeduction---------------------------------------------| + amWatermelon---------------------------------------------| + amHellishBomb---------------------------------------------| + amNapalm---------------------------------------------------| + amDrill-----------------------------------------------------| + amBallgun----------------------------------------------------| + amRCPlane-----------------------------------------------------| + amLowGravity---------------------------------------------------| + amExtraDamage---------------------------------------------------| + amInvulnerable---------------------------------------------------| + amExtraTime-------------------------------------------------------| + amLaserSight-------------------------------------------------------| + amVampiric----------------------------------------------------------| + amSniperRifle--------------------------------------------------------| + amJetpack-------------------------------------------------------------| + amMolotov--------------------------------------------------------------| + amBirdy-----------------------------------------------------------------| + amPortalGun--------------------------------------------------------------| + amPiano-------------------------------------------------------------------| + amGasBomb------------------------------------------------------------------| + amSineGun-------------------------------------------------------------------| + amFlamethrower---------------------------------------------------------------| + amSMine-----------------------------------------------------------------------| + amHammer-----------------------------------------------------------------------| + amResurrector-------------------------------------------------------------------| + amDrillStrike--------------------------------------------------------------------| + amSnowball------------------------------------------------------------------------| + amTardis---------------------------------------------------------------------------| + amLandGun---------------------------------------------------------------------------| + amIceGun-----------------------------------------------------------------------------| + amKnife-------------------------------------------------------------------------------| + amRubber-------------------------------------------------------------------------------| + amAirMine-------------------------------------------------------------------------------| +*/ #define AMMOLINE_DEFAULT_QT "939192942219912103223511100120000000021110010101111100010" #define AMMOLINE_DEFAULT_PROB "040504054160065554655446477657666666615551010111541111111" #define AMMOLINE_DEFAULT_DELAY "000000000000020550000004000700400000000022000000060002000" diff -r caa1e84c3ac2 -r b69f5f22a3ba README.md --- a/README.md Fri Jan 01 19:15:32 2016 +0300 +++ b/README.md Tue Feb 09 21:11:16 2016 +0300 @@ -28,7 +28,7 @@ Contribute: ----------- If you see a bug or have any suggestion please use the official bug tracker at -http://code.google.com/p/hedgewars/issues/list or the integrated feedback +http://hedgewars.org/bugs or the integrated feedback button. If you want to help or get to know the sources better you can do that with some diff -r caa1e84c3ac2 -r b69f5f22a3ba gameServer/HWProtoInRoomState.hs --- a/gameServer/HWProtoInRoomState.hs Fri Jan 01 19:15:32 2016 +0300 +++ b/gameServer/HWProtoInRoomState.hs Tue Feb 09 21:11:16 2016 +0300 @@ -342,6 +342,7 @@ isJust maybeClientId && (kickId /= thisClientId) && sameRoom + && (not $ hasSuperPower kickCl) && ((isNothing $ gameInfo rm) || notOnly2Players || teamsInGame kickCl == 0) ] diff -r caa1e84c3ac2 -r b69f5f22a3ba gameServer/OfficialServer/checker.hs --- a/gameServer/OfficialServer/checker.hs Fri Jan 01 19:15:32 2016 +0300 +++ b/gameServer/OfficialServer/checker.hs Tue Feb 09 21:11:16 2016 +0300 @@ -153,10 +153,12 @@ CheckFailed msg -> do warningM "Check" "Check failed" answer ["CHECKED", "FAIL", msg] + threadDelay 1500000 answer ["READY"] CheckSuccess msgs -> do warningM "Check" "Check succeeded" answer ("CHECKED" : "OK" : msgs) + threadDelay 1500000 answer ["READY"] where answer :: [B.ByteString] -> IO () @@ -176,7 +178,7 @@ main :: IO () -main = withSocketsDo $ do +main = withSocketsDo . forever $ do #if !defined(mingw32_HOST_OS) installHandler sigPIPE Ignore Nothing installHandler sigCHLD Ignore Nothing diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/ArgParsers.pas --- a/hedgewars/ArgParsers.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/ArgParsers.pas Tue Feb 09 21:11:16 2016 +0300 @@ -105,7 +105,7 @@ WriteLn(stdout, ' --help'); WriteLn(stdout, ''); WriteLn(stdout, 'For more detailed help and examples go to:'); - WriteLn(stdout, 'http://code.google.com/p/hedgewars/wiki/CommandLineOptions'); + WriteLn(stdout, 'http://hedgewars.org/kb/CommandLineOptions'); GameType:= gmtSyntax; end; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/SDLh.pas --- a/hedgewars/SDLh.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/SDLh.pas Tue Feb 09 21:11:16 2016 +0300 @@ -88,11 +88,19 @@ SDL_ALLEVENTS = $FFFFFFFF; // dummy event type to prevent stack corruption SDL_APPINPUTFOCUS = $02; + // (some) audio formats from SDL_audio.h + AUDIO_S16LSB = $8010; // Signed 16-bit samples, in little-endian byte order + AUDIO_S16MSB = $9010; // Signed 16-bit samples, in big-endian byte order + AUDIO_S16SYS = {$IFDEF ENDIAN_LITTLE}AUDIO_S16LSB{$ELSE}AUDIO_S16MSB{$ENDIF}; + + // default audio format from SDL_mixer.h + MIX_DEFAULT_FORMAT = AUDIO_S16SYS; + SDL_BUTTON_LEFT = 1; SDL_BUTTON_MIDDLE = 2; SDL_BUTTON_RIGHT = 3; - SDL_BUTTON_WHEELUP = 4; - SDL_BUTTON_WHEELDOWN = 5; + SDL_BUTTON_X1 = 4; + SDL_BUTTON_X2 = 5; SDL_TEXTEDITINGEVENT_TEXT_SIZE = 32; @@ -1008,6 +1016,17 @@ sockets: PTCPSocket; end; +{$IFDEF WIN32} + TThreadFunction = function (p: pointer): Longword; stdcall; + pfnSDL_CurrentBeginThread = function ( + _Security: pointer; + _StackSize: LongWord; + _StartAddress: TThreadFunction; + _ArgList: pointer; + _InitFlag: Longword; + _ThrdAddr: PLongword): PtrUInt; cdecl; + pfnSDL_CurrentEndThread = procedure (_Retval: LongInt); cdecl; +{$ENDIF} ///////////////////////////////////////////////////////////////// ///////////////////// FUNCTION DEFINITIONS ///////////////////// @@ -1060,7 +1079,9 @@ function SDL_CreateRenderer(window: PSDL_Window; index: LongInt; flags: LongWord): PSDL_Renderer; cdecl; external SDLLibName; function SDL_DestroyWindow(window: PSDL_Window): LongInt; cdecl; external SDLLibName; function SDL_DestroyRenderer(renderer: PSDL_Renderer): LongInt; cdecl; external SDLLibName; +procedure SDL_SetWindowPosition(window: PSDL_Window; w, h: LongInt); cdecl; external SDLLibName; procedure SDL_SetWindowSize(window: PSDL_Window; w, h: LongInt); cdecl; external SDLLibName; +procedure SDL_SetWindowFullscreen(window: PSDL_Window; flags: LongWord); cdecl; external SDLLibName; function SDL_GetCurrentVideoDriver:Pchar; cdecl; external SDLLibName; function SDL_GL_CreateContext(window: PSDL_Window): PSDL_GLContext; cdecl; external SDLLibName; @@ -1117,7 +1138,13 @@ (* remember to mark the threaded functions as 'cdecl; export;' (or have fun debugging nil arguments) *) +{$IFDEF WIN32} +// SDL uses wrapper in windows +function SDL_CreateThread(fn: Pointer; name: PChar; data: Pointer; bt: pfnSDL_CurrentBeginThread; et: pfnSDL_CurrentEndThread): PSDL_Thread; cdecl; external SDLLibName; +function SDL_CreateThread(fn: Pointer; name: PChar; data: Pointer): PSDL_Thread; cdecl; overload; +{$ELSE} function SDL_CreateThread(fn: Pointer; name: PChar; data: Pointer): PSDL_Thread; cdecl; external SDLLibName; +{$ENDIF} procedure SDL_WaitThread(thread: PSDL_Thread; status: PLongInt); cdecl; external SDLLibName; procedure SDL_DetachThread(thread: PSDL_Thread); cdecl; external SDLLibName; @@ -1304,6 +1331,12 @@ (PByteArray(buf)^[0] shl 24) end; +{$IFDEF WIN32} +function SDL_CreateThread(fn: Pointer; name: PChar; data: Pointer): PSDL_Thread; cdecl; +begin + SDL_CreateThread:= SDL_CreateThread(fn, name, data, nil, nil) +end; +{$ENDIF} end. diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/hwengine.pas Tue Feb 09 21:11:16 2016 +0300 @@ -71,6 +71,7 @@ AddFlakes; SetRandomSeed(cSeed, false); StoreLoad(false); + if not allOK then exit; AssignHHCoords; AddMiscGears; InitWorld; @@ -89,6 +90,9 @@ end; gsConfirm, gsGame, gsChat: begin + // disable screenshot flash effect when about to make another screenshot + if flagMakeCapture and (ScreenFade = sfFromWhite) then + ScreenFade:= sfNone; if not cOnlyStats then // never place between ProcessKbd and DoGameTick - bugs due to /put cmd and isCursorVisible DrawWorld(Lag); @@ -127,7 +131,7 @@ ScreenFade:= sfFromWhite; ScreenFadeValue:= sfMax; ScreenFadeSpeed:= 5; - + if (not flagDumpLand and MakeScreenshot(s, 1, 0)) or (flagDumpLand and MakeScreenshot(s, 1, 1) and ((cReducedQuality and rqBlurryLand <> 0) or MakeScreenshot(s, 1, 2))) then WriteLnToConsole('Screenshot saved: ' + s) @@ -145,11 +149,13 @@ PrevTime, CurrTime: LongWord; isTerminated: boolean; previousGameState: TGameState; + wheelEvent: boolean; begin isTerminated:= false; PrevTime:= SDL_GetTicks; - while isTerminated = false do + while (not isTerminated) and allOK do begin + wheelEvent:= false; SDL_PumpEvents(); while SDL_PeepEvents(@event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) > 0 do @@ -177,35 +183,48 @@ if (GameState >= gsGame) then ProcessMouse(event.button, false); SDL_MOUSEWHEEL: + begin + wheelEvent:= true; ProcessMouseWheel(event.wheel.x, event.wheel.y); + end; - SDL_TEXTINPUT: uChat.TextInput(event.text); + SDL_TEXTINPUT: if GameState = gsChat then uChat.TextInput(event.text); SDL_WINDOWEVENT: - if event.window.event = SDL_WINDOWEVENT_SHOWN then begin - cHasFocus:= true; - onFocusStateChanged() - end - else if event.window.event = SDL_WINDOWEVENT_MINIMIZED then - begin - previousGameState:= GameState; - GameState:= gsSuspend; - end - else if event.window.event = SDL_WINDOWEVENT_RESTORED then - begin - GameState:= previousGameState; + case event.window.event of + SDL_WINDOWEVENT_FOCUS_GAINED: + begin + cHasFocus:= true; + onFocusStateChanged(); + end; + SDL_WINDOWEVENT_FOCUS_LOST: + begin + cHasFocus:= false; + onFocusStateChanged(); + end; + SDL_WINDOWEVENT_MINIMIZED: + begin + previousGameState:= GameState; + GameState:= gsSuspend; + end; + SDL_WINDOWEVENT_RESTORED: + begin + GameState:= previousGameState; {$IFDEF ANDROID} - //This call is used to reinitialize the glcontext and reload the textures - ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true); + //This call is used to reinitialize the glcontext and reload the textures + ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true); {$ENDIF} - end - else if event.window.event = SDL_WINDOWEVENT_RESIZED then - begin - cNewScreenWidth:= max(2 * (event.window.data1 div 2), cMinScreenWidth); - cNewScreenHeight:= max(2 * (event.window.data2 div 2), cMinScreenHeight); - cScreenResizeDelay:= RealTicks + 500{$IFDEF IPHONEOS}div 2{$ENDIF}; + end; + SDL_WINDOWEVENT_RESIZED: + begin + cNewScreenWidth:= max(2 * (event.window.data1 div 2), cMinScreenWidth); + cNewScreenHeight:= max(2 * (event.window.data2 div 2), cMinScreenHeight); + cScreenResizeDelay:= RealTicks + 500{$IFDEF IPHONEOS}div 2{$ENDIF}; + end; + end; // case closed end; + {$IFDEF USE_TOUCH_INTERFACE} SDL_FINGERMOTION: onTouchMotion(event.tfinger.x, event.tfinger.y, event.tfinger.dx, event.tfinger.dy, event.tfinger.fingerId); @@ -229,6 +248,9 @@ end; //end case event.type_ of end; //end while SDL_PollEvent(@event) <> 0 do + if (not wheelEvent) then + ResetMouseWheel(); + if (CursorMovementX <> 0) or (CursorMovementY <> 0) then handlePositionUpdate(CursorMovementX * cameraKeyboardSpeed, CursorMovementY * cameraKeyboardSpeed); @@ -296,12 +318,11 @@ {$ENDIF} /////////////////////////////////////////////////////////////////////////////// -procedure Game; +procedure GameRoutine; //var p: TPathType; var s: shortstring; i: LongInt; begin - initEverything(true); WriteLnToConsole('Hedgewars engine ' + cVersionString + '-r' + cRevisionString + ' (' + cHashString + ') with protocol #' + inttostr(cNetProtoVersion)); //AddFileLog('Prefix: "' + shortstring(PathPrefix) +'"'); @@ -311,18 +332,19 @@ AddFileLog(inttostr(i) + ': ' + ParamStr(i)); WriteToConsole('Init SDL... '); - if not cOnlyStats then SDLTry(SDL_Init(SDL_INIT_VIDEO or SDL_INIT_NOPARACHUTE) >= 0, 'SDL_Init', true); + if not cOnlyStats then SDLCheck(SDL_Init(SDL_INIT_VIDEO or SDL_INIT_NOPARACHUTE) >= 0, 'SDL_Init', true); WriteLnToConsole(msgOK); + if not cOnlyStats then + begin + WriteToConsole('Init SDL_ttf... '); + SDLCheck(TTF_Init() <> -1, 'TTF_Init', true); + WriteLnToConsole(msgOK); + end; + if not allOK then exit; //SDL_StartTextInput(); SDL_ShowCursor(0); - if not cOnlyStats then - begin - WriteToConsole('Init SDL_ttf... '); - SDLTry(TTF_Init() <> -1, 'TTF_Init', true); - WriteLnToConsole(msgOK); - end; {$IFDEF USE_VIDEO_RECORDING} if GameType = gmtRecord then @@ -340,6 +362,7 @@ ControllerInit(); // has to happen before InitKbdKeyTable to map keys InitKbdKeyTable(); AddProgress(); + if not allOK then exit; LoadLocale(cPathz[ptLocale] + '/en.txt'); // Do an initial load with english if cLocaleFName <> 'en.txt' then @@ -353,6 +376,7 @@ end else cLocale := 'en'; + if not allOK then exit; WriteLnToConsole(msgGettingConfig); if cTestLua then @@ -369,6 +393,7 @@ LoadRecordFromFile(recordFileName); end; + if not allOK then exit; ScriptOnGameInit; s:= 'eproto ' + inttostr(cNetProtoVersion); SendIPCRaw(@s[0], Length(s) + 1); // send proto version @@ -382,8 +407,9 @@ InitSound(); isDeveloperMode:= false; - TryDo(InitStepsFlags = cifAllInited, 'Some parameters not set (flags = ' + inttostr(InitStepsFlags) + ')', true); + if checkFails(InitStepsFlags = cifAllInited, 'Some parameters not set (flags = ' + inttostr(InitStepsFlags) + ')', true) then exit; //ParseCommand('rotmask', true); + if not allOK then exit; {$IFDEF USE_VIDEO_RECORDING} if GameType = gmtRecord then @@ -395,16 +421,22 @@ {$ENDIF} MainLoop; +end; + +procedure Game; +begin + initEverything(true); + GameRoutine; // clean up all the memory allocated freeEverything(true); end; - /////////////////////////////////////////////////////////////////////////////// // preInitEverything - init variables that are going to be ovewritten by arguments // initEverything - init variables only. Should be coupled by below // freeEverything - free above. Pay attention to the init/free order! procedure preInitEverything; begin + allOK:= true; Randomize(); uVariables.preInitModule; @@ -502,19 +534,23 @@ begin initEverything(false); - IPCWaitPongEvent; - TryDo(InitStepsFlags = cifRandomize, 'Some parameters not set (flags = ' + inttostr(InitStepsFlags) + ')', true); + if allOK then + begin + IPCWaitPongEvent; + if checkFails(InitStepsFlags = cifRandomize, 'Some parameters not set (flags = ' + inttostr(InitStepsFlags) + ')', true) then exit; - ScriptOnPreviewInit; -{$IFDEF MOBILE} - GenPreview(Preview); -{$ELSE} - GenPreviewAlpha(Preview); -{$ENDIF} - WriteLnToConsole('Sending preview...'); - SendIPCRaw(@Preview, sizeof(Preview)); - SendIPCRaw(@MaxHedgehogs, sizeof(byte)); - WriteLnToConsole('Preview sent, disconnect'); + ScriptOnPreviewInit; + {$IFDEF MOBILE} + GenPreview(Preview); + {$ELSE} + GenPreviewAlpha(Preview); + {$ENDIF} + WriteLnToConsole('Sending preview...'); + SendIPCRaw(@Preview, sizeof(Preview)); + SendIPCRaw(@MaxHedgehogs, sizeof(byte)); + WriteLnToConsole('Preview sent, disconnect'); + end; + freeEverything(false); end; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uAI.pas --- a/hedgewars/uAI.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uAI.pas Tue Feb 09 21:11:16 2016 +0300 @@ -52,10 +52,11 @@ ThinkThread:= nil; SDL_UnlockMutex(ThreadLock); - with CurrentHedgehog^ do - if Gear <> nil then - if BotLevel <> 0 then - StopMessages(Gear^.Message); + if CurrentHedgehog <> nil then + with CurrentHedgehog^ do + if Gear <> nil then + if BotLevel <> 0 then + StopMessages(Gear^.Message); BestActions.Count:= 0; BestActions.Pos:= 0 @@ -552,7 +553,7 @@ if Gear^.Message <> 0 then begin StopMessages(Gear^.Message); - TryDo((Gear^.Message and gmAllStoppable) = 0, 'Engine bug: AI may break demos playing', true); + if checkFails((Gear^.Message and gmAllStoppable) = 0, 'Engine bug: AI may break demos playing', true) then exit; end; if Gear^.Message <> 0 then diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uAmmos.pas --- a/hedgewars/uAmmos.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uAmmos.pas Tue Feb 09 21:11:16 2016 +0300 @@ -70,7 +70,7 @@ begin if newAmmo[a].Count > 0 then begin - TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true); + if checkFails(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true) then exit; Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= newAmmo[a]; inc(mi[Ammoz[a].Slot]) end @@ -85,10 +85,13 @@ ammos: TAmmoCounts; newAmmos: TAmmoArray; begin -TryDo((byte(ammoLoadout[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoProbability[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoDelay[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoReinforcement[0]) = byte(ord(High(TAmmoType)))), 'Incomplete or missing ammo scheme set (incompatible frontend or demo/save?)', true); + if checkFails((byte(ammoLoadout[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoProbability[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoDelay[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoReinforcement[0]) = byte(ord(High(TAmmoType)))) + , 'Incomplete or missing ammo scheme set (incompatible frontend or demo/save?)' + , true) + then exit; +if checkFails(StoreCnt < cMaxHHs, 'Ammo stores overflow', true) then exit; inc(StoreCnt); -TryDo(StoreCnt <= cMaxHHs, 'Ammo stores overflow', true); new(StoresList[Pred(StoreCnt)]); @@ -153,8 +156,10 @@ function GetAmmoByNum(num: LongInt): PHHAmmo; begin - TryDo(num < StoreCnt, 'Invalid store number', true); - GetAmmoByNum:= StoresList[num] + if checkFails(num < StoreCnt, 'Invalid store number', true) then + GetAmmoByNum:= nil + else + GetAmmoByNum:= StoresList[num] end; function GetCurAmmoEntry(var Hedgehog: THedgehog): PAmmo; @@ -364,7 +369,7 @@ inc(slot) end end; - TryDo(slot <= cMaxSlotIndex, 'Ammo slot index overflow', true); + if checkFails(slot <= cMaxSlotIndex, 'Ammo slot index overflow', true) then exit; CurAmmoType:= Ammo^[slot, ammoidx].AmmoType; end end; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uCollisions.pas --- a/hedgewars/uCollisions.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uCollisions.pas Tue Feb 09 21:11:16 2016 +0300 @@ -62,7 +62,7 @@ function CalcSlopeTangent(Gear: PGear; collisionX, collisionY: LongInt; var outDeltaX, outDeltaY: LongInt; TestWord: LongWord): boolean; implementation -uses uConsts, uLandGraphics, uVariables, uDebug; +uses uConsts, uLandGraphics, uVariables; type TCollisionEntry = record X, Y, Radius: LongInt; @@ -76,10 +76,10 @@ procedure AddCI(Gear: PGear); begin -if (Gear^.CollisionIndex >= 0) or +if (Gear^.CollisionIndex >= 0) or (Count > MAXRECTSINDEX) or ((Count > MAXRECTSINDEX-200) and ((Gear^.Kind = gtMine) or (Gear^.Kind = gtSMine) or (Gear^.Kind = gtKnife))) then exit; -TryDo(Count <= MAXRECTSINDEX, 'Collision rects array overflow', true); + with cinfos[Count] do begin X:= hwRound(Gear^.X); diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uCommandHandlers.pas --- a/hedgewars/uCommandHandlers.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uCommandHandlers.pas Tue Feb 09 21:11:16 2016 +0300 @@ -93,8 +93,8 @@ if isDeveloperMode then begin i:= StrToInt(s); - TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true); - TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true); + checkFails(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true); + checkFails(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true); end end; @@ -379,7 +379,7 @@ begin s:= s; // avoid compiler hint - TryDo(AllInactive, '/nextturn called when not all gears are inactive', true); + if checkFails(AllInactive, '/nextturn called when not all gears are inactive', true) then exit; CheckSum:= CheckSum xor GameTicks; gi := GearsList; @@ -398,7 +398,7 @@ SendIPC(s) end else - TryDo(CurrentTeam^.hasGone or (CheckSum = lastTurnChecksum), 'Desync detected', true); + checkFails(CurrentTeam^.hasGone or (CheckSum = lastTurnChecksum), 'Desync detected', true); AddFileLog('Next turn: time '+inttostr(GameTicks)); end; @@ -408,7 +408,7 @@ if CheckNoTeamOrHH then exit; -TryDo((s[0] = #1) and (s[1] >= '1') and (s[1] <= '5'), 'Malformed /timer', true); +if checkFails((s[0] = #1) and (s[1] >= '1') and (s[1] <= '5'), 'Malformed /timer', true) then exit; if not isExternalSource then SendIPC(s); @@ -450,7 +450,7 @@ if CheckNoTeamOrHH then exit; - TryDo((s[0] = #1) and (s[1] <= char(High(TAmmoType))), 'Malformed /setweap', true); + if checkFails((s[0] = #1) and (s[1] <= char(High(TAmmoType))), 'Malformed /setweap', true) then exit; if not isExternalSource then SendIPC('w' + s); diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uDebug.pas --- a/hedgewars/uDebug.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uDebug.pas Tue Feb 09 21:11:16 2016 +0300 @@ -23,8 +23,12 @@ interface procedure OutError(Msg: shortstring; isFatalError: boolean); -procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean); inline; -procedure SDLTry(Assert: boolean; Msg: shortstring; isFatal: boolean); +//procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean); inline; +function checkFails(Assert: boolean; Msg: shortstring; isFatal: boolean): boolean; +function SDLCheck(Assert: boolean; Msg: shortstring; isFatal: boolean): boolean; + +var + allOK: boolean; implementation uses SDLh, uConsole, uCommands, uConsts; @@ -42,14 +46,26 @@ OutError(Msg, isFatal) end; -procedure SDLTry(Assert: boolean; Msg: shortstring; isFatal: boolean); +function checkFails(Assert: boolean; Msg: shortstring; isFatal: boolean): boolean; +begin + if not Assert then + OutError(Msg, false); + + allOK:= allOK and (Assert or (not isFatal)); + checkFails:= (not Assert) and isFatal +end; + +function SDLCheck(Assert: boolean; Msg: shortstring; isFatal: boolean): boolean; var s: shortstring; begin -if not Assert then + if not Assert then begin - s:= SDL_GetError(); - OutError(Msg + ': ' + s, isFatal) - end + s:= SDL_GetError(); + OutError(Msg + ': ' + s, false) + end; + + allOK:= allOK and (Assert or (not isFatal)); + SDLCheck:= (not Assert) and isFatal end; end. diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uGame.pas --- a/hedgewars/uGame.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uGame.pas Tue Feb 09 21:11:16 2016 +0300 @@ -28,7 +28,7 @@ //////////////////// uses uInputHandler, uTeams, uIO, uAI, uGears, uSound, uLocale, uCaptions, uTypes, uVariables, uCommands, uConsts, uVisualGearsList, uUtils - {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF}; + {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF}, uDebug; procedure DoGameTick(Lag: LongInt); var i,j : LongInt; @@ -40,6 +40,7 @@ if (not CurrentTeam^.ExtDriven) then begin NetGetNextCmd; // its for the case of receiving "/say" message + if not allOK then exit; isInLag:= false; FlushMessages(Lag) end; @@ -87,7 +88,7 @@ end; PlayNextVoice; i:= 1; -while (GameState <> gsExit) and (i <= Lag) do +while (GameState <> gsExit) and (i <= Lag) and allOK do begin if not CurrentTeam^.ExtDriven then begin @@ -99,6 +100,8 @@ else begin NetGetNextCmd; + if not allOK then exit; + if isInLag then case GameType of gmtNet: begin diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uGears.pas --- a/hedgewars/uGears.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uGears.pas Tue Feb 09 21:11:16 2016 +0300 @@ -748,7 +748,7 @@ if (ClansCount = 2) and ((GameFlags and gfDivideTeams) <> 0) then begin t:= 0; - TryDo(ClansCount = 2, 'More or less than 2 clans on map in divided teams mode!', true); + if checkFails(ClansCount = 2, 'More or less than 2 clans on map in divided teams mode!', true) then exit; for p:= 0 to 1 do begin with ClansArray[p]^ do @@ -821,7 +821,7 @@ hwRound(Gear^.Y) - SpritesData[sprTargetBee].Height div 2, sprTargetBee, 0, lfBasic, $FFFFFFFF, false, false, false); Gear^.Y:= int2hwFloat(hwRound(Gear^.Y) - 16 - Gear^.Radius); - Gear^.State:= Gear^.State and not gsttmpFlag; + Gear^.State:= Gear^.State and (not gsttmpFlag); AddFileLog('Carved a hole for hog at coordinates (' + inttostr(hwRound(Gear^.X)) + ',' + inttostr(hwRound(Gear^.Y)) + ')') end end; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uGearsHandlersMess.pas Tue Feb 09 21:11:16 2016 +0300 @@ -86,7 +86,7 @@ procedure doStepKamikaze(Gear: PGear); procedure doStepCakeExpl(Gear: PGear); procedure doStepCakeDown(Gear: PGear); -procedure doStepCakeWork(Gear: PGear); +procedure doStepCakeWalk(Gear: PGear); procedure doStepCakeUp(Gear: PGear); procedure doStepCakeFall(Gear: PGear); procedure doStepCake(Gear: PGear); @@ -2003,9 +2003,11 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepDynamite(Gear: PGear); +var VGear: PVisualGear; begin doStepFallingGear(Gear); AllInactive := false; + if Gear^.Timer mod 166 = 0 then inc(Gear^.Tag); if Gear^.Timer = 1000 then // might need better timing @@ -3163,6 +3165,7 @@ if Gear^.Tag < 2250 then exit; + InCinematicMode:= false; doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Boom, Gear^.Hedgehog, EXPLAutoSound); AfterAttack; DeleteGear(Gear) @@ -3171,8 +3174,9 @@ procedure doStepCakeDown(Gear: PGear); var gi: PGear; - dmg, dmgBase: LongInt; + dmg, dmgBase, partyEpicness, i: LongInt; fX, fY, tdX, tdY: hwFloat; + sparkles: PVisualGear; begin AllInactive := false; @@ -3191,6 +3195,7 @@ fX:= int2hwFloat(hwRound(Gear^.X)); fY:= int2hwFloat(hwRound(Gear^.Y)); dmgBase:= cakeDmg shl 1 + cHHRadius div 2; + partyEpicness:= 0; gi := GearsList; while gi <> nil do begin @@ -3204,21 +3209,46 @@ if (dmg > 1) then dmg:= ModifyDamage(min(dmg div 2, cakeDmg), gi); if (dmg > 1) then if (CurrentHedgehog^.Gear = gi) and (gi^.Hedgehog^.Effects[heInvulnerable] = 0) then - gi^.State := gi^.State or gstLoser + begin + gi^.State := gi^.State or gstLoser; + // probably not too epic if hitting self too... + dec(partyEpicness, 45); + end else + begin gi^.State := gi^.State or gstWinner; + if CurrentHedgehog^.Gear = gi then + dec(partyEpicness, 45) + else + inc(partyEpicness); + end; end; gi := gi^.NextGear end; ////////////////////////////////////////////////////////////////////// Gear^.doStep := @doStepCakeExpl; + if (partyEpicness > 6) and (abs(90 - abs(trunc(Gear^.DirAngle))) < 20) then + begin + for i := 0 to (2 * partyEpicness) do + begin + sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtEgg, 1); + if sparkles <> nil then + begin + sparkles^.dX:= 0.008 * (random(100) - 50); + sparkles^.dY:= -0.3 + 0.002 * (random(100) - 50); + sparkles^.Tint:= ((random(210)+45) shl 24) or ((random(210)+45) shl 16) or ((random(210)+45) shl 8) or $FF; + sparkles^.Angle:= random(360); + end + end; + InCinematicMode:= true; + end; PlaySound(sndCake) end else dec(Gear^.Pos) end; -procedure doStepCakeWork(Gear: PGear); +procedure doStepCakeWalk(Gear: PGear); var tdx, tdy: hwFloat; cakeData: PCakeData; @@ -3285,7 +3315,7 @@ end; CakeI := 0; end; - Gear^.doStep := @doStepCakeWork + Gear^.doStep := @doStepCakeWalk end else inc(Gear^.Pos) @@ -3718,6 +3748,7 @@ Gear^.State := Gear^.State or gsttmpFlag; PauseMusic; playSound(sndRideOfTheValkyries); + inCinematicMode:= true; end; // pickup bonuses @@ -3729,6 +3760,7 @@ if ((Gear^.State and gstCollision) <> 0) or CheckGearDrowning(Gear) then begin + inCinematicMode:= false; StopSoundChan(Gear^.SoundChannel); StopSound(sndRideOfTheValkyries); ResumeMusic; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uGearsHandlersRope.pas --- a/hedgewars/uGearsHandlersRope.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uGearsHandlersRope.pas Tue Feb 09 21:11:16 2016 +0300 @@ -270,7 +270,7 @@ Gear^.X := Gear^.X + nx * len; Gear^.Y := Gear^.Y + ny * len; inc(RopePoints.Count); - TryDo(RopePoints.Count <= MAXROPEPOINTS, 'Rope points overflow', true); + if checkFails(RopePoints.Count <= MAXROPEPOINTS, 'Rope points overflow', true) then exit; Gear^.Elasticity := Gear^.Elasticity - len; Gear^.Friction := Gear^.Friction - len; haveDivided := true; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uGearsHedgehog.pas --- a/hedgewars/uGearsHedgehog.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uGearsHedgehog.pas Tue Feb 09 21:11:16 2016 +0300 @@ -873,9 +873,59 @@ //////////////////////////////////////////////////////////////////////////////// +procedure moveHedgehogOutOfWall(Gear: PGear); +var + hx: hwFloat; + colly, collxl, collxr: boolean; +begin +colly:= (TestCollisionYwithGear(Gear, 1) <> 0); + +while colly do + begin + // don't use TestCollisionXwithXYShift, because it checks for gears + // save real x-position + hx:= Gear^.X; + + Gear^.X:= hx + _1; + collxl:= (TestCollisionX(Gear, -1) <> 0); + + Gear^.X:= hx - _1; + collxr:= (TestCollisionX(Gear, 1) <> 0); + + // restore original value + Gear^.X:= hx; + + // do nothing if trapped between 2 walls + if collxl = collxr then + break; + + // if we in a wall - fix that + if collxl then + begin + // check for obstacle + if (TestCollisionX(Gear, 1) <> 0) then + break; + Gear^.X:= Gear^.X + _1; + end + else + begin + // check for obstacle + if (TestCollisionX(Gear, -1) <> 0) then + break; + Gear^.X:= Gear^.X - _1; + end; + + colly:= (TestCollisionYwithGear(Gear, 1) <> 0); + end; + + +end; + +//////////////////////////////////////////////////////////////////////////////// procedure doStepHedgehogMoving(Gear: PGear); var isFalling, isUnderwater: boolean; land: Word; + cnt: LongWord; begin if Gear^.Hedgehog^.Unplaced then begin @@ -892,7 +942,15 @@ if Gear^.dY.QWordValue > 8160437862 then Gear^.dY.QWordValue:= 8160437862; -isFalling:= (Gear^.dY.isNegative) or (TestCollisionYKick(Gear, 1) = 0); +isFalling:= (Gear^.dY.isNegative); +if (not isFalling) then + begin + // make sure we're not just stuck in wall + moveHedgehogOutOfWall(Gear); + // test for floor/obstacle below + isFalling:= (TestCollisionYKick(Gear, 1) = 0); + end; + if isFalling then begin land:= TestCollisionYKick(Gear, -1); @@ -935,6 +993,7 @@ land:= TestCollisionYwithGear(Gear, 1); if ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) < _0_55.QWordValue) and ((land and lfIce) = 0) and ((land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0)) + and (Gear^.Damage = 0) and ((Gear^.State and gstHHJumping) <> 0) then SetLittle(Gear^.dX); @@ -1037,15 +1096,24 @@ else begin Gear^.State:= Gear^.State and (not gstMoving); - while TestCollisionYWithGear(Gear,1) = 0 do - Gear^.Y:= Gear^.Y+_1; + cnt:= 0; + while (cnt < 6) and (not CheckGearDrowning(Gear)) and (Gear <> nil) and (TestCollisionYWithGear(Gear,1) = 0) do + begin + Gear^.Y:= Gear^.Y + _1; + inc(cnt) + end; + SetLittle(Gear^.dX) end else begin Gear^.State:= Gear^.State and (not gstMoving); - while TestCollisionYWithGear(Gear,1) = 0 do - Gear^.Y:= Gear^.Y+_1; + cnt:= 0; + while (cnt < 6) and (not CheckGearDrowning(Gear)) and (Gear <> nil) and (TestCollisionYWithGear(Gear,1) = 0) do + begin + Gear^.Y:= Gear^.Y + _1; + inc(cnt) + end; SetLittle(Gear^.dX) end else if (hwAbs(Gear^.dX) > cLittle) @@ -1059,8 +1127,12 @@ begin Gear^.State:= Gear^.State and (not gstWinner); Gear^.State:= Gear^.State and (not gstMoving); - while (not CheckGearDrowning(Gear)) and (Gear <> nil) and (TestCollisionYWithGear(Gear,1) = 0) do + cnt:= 0; + while (cnt < 6) and (not CheckGearDrowning(Gear)) and (Gear <> nil) and (TestCollisionYWithGear(Gear,1) = 0) do + begin Gear^.Y:= Gear^.Y + _1; + inc(cnt) + end; // could become nil in CheckGearDrowning if ai's hog fails to respawn in ai survival if Gear = nil then exit; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uGearsList.pas --- a/hedgewars/uGearsList.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uGearsList.pas Tue Feb 09 21:11:16 2016 +0300 @@ -150,7 +150,8 @@ AddFileLog('Attempted to remove Gear #'+inttostr(Gear^.uid)+' from the list twice.'); exit end; -TryDo((Gear = nil) or (curHandledGear = nil) or (Gear = curHandledGear), 'You''re doing it wrong', true); + +checkFails((Gear = nil) or (curHandledGear = nil) or (Gear = curHandledGear), 'You''re doing it wrong', true); if Gear^.NextGear <> nil then Gear^.NextGear^.PrevGear:= Gear^.PrevGear; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uGearsRender.pas --- a/hedgewars/uGearsRender.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uGearsRender.pas Tue Feb 09 21:11:16 2016 +0300 @@ -846,6 +846,7 @@ end else // not gstHHDriven begin + // check if hedgehog is sliding/rolling if (Gear^.Damage > 0) and (HH^.Effects[heFrozen] = 0) and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then begin @@ -855,6 +856,23 @@ 2, 1, Gear^.DirAngle); + + // dust effect + // TODO fix: this gives different results based on framerate + if (sx mod 8) = 0 then + begin + if Gear^.dX.isNegative then + tx := hwRound(Gear^.X) + cHHRadius + else + tx := hwRound(Gear^.X) - cHHRadius; + ty:= hwRound(Gear^.Y) + cHHRadius + 2; + if ((tx and LAND_WIDTH_MASK) = 0) and + ((ty and LAND_HEIGHT_MASK) = 0) and + (Land[ty, tx] <> 0) then + AddVisualGear(tx - 2 + Random(4), ty - 8, vgtDust); + end; + + // draw april's fool hat if AprilOne and (curhat <> nil) then DrawTextureRotatedF(curhat, 1.0, -1.0, 0, sx, sy, 18, sign, 32, 32, sign*Gear^.DirAngle) @@ -1250,7 +1268,29 @@ else DrawSpriteRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle) end; - gtDynamite: DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1); + gtDynamite: begin + DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1); + if (random(3) = 0) then + begin + vg:= AddVisualGear(hwRound(Gear^.X)+12-(Gear^.Tag shr 1), hwRound(Gear^.Y)-16, vgtStraightShot); + if vg <> nil then + with vg^ do + begin + Tint:= $FFCC00FF; + Angle:= random(360); + dx:= 0.0005 * (random(200)); + dy:= 0.0005 * (random(200)); + if random(2) = 0 then + dx := -dx; + if random(2) = 0 then + dy := -dy; + FrameTicks:= 100+random(300); + Scale:= 0.1+1/(random(3)+3); + State:= ord(sprStar) + end + end; + + end; gtClusterBomb: DrawSpriteRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle); gtCluster: DrawSprite(sprClusterParticle, x - 8, y - 8, 0); gtFlame: if Gear^.Tag and 1 = 0 then diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uIO.pas --- a/hedgewars/uIO.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uIO.pas Tue Feb 09 21:11:16 2016 +0300 @@ -70,28 +70,36 @@ function AddCmd(Time: Word; str: shortstring): PCmd; var command: PCmd; begin -new(command); -FillChar(command^, sizeof(TCmd), 0); -command^.loTime:= Time; -command^.str:= str; -if (command^.cmd <> 'F') and (command^.cmd <> 'G') then dec(command^.len, 2); // cut timestamp -if headcmd = nil then + if (lastcmd <> nil) and (lastcmd^.cmd = '+') then + begin + command:= lastcmd; + end else begin - headcmd:= command; - lastcmd:= command - end -else - begin - lastcmd^.Next:= command; - lastcmd:= command + new(command); + + if headcmd = nil then + begin + headcmd:= command; + lastcmd:= command + end + else + begin + lastcmd^.Next:= command; + lastcmd:= command + end; end; -AddCmd:= command; + + FillChar(command^, sizeof(TCmd), 0); + command^.loTime:= Time; + command^.str:= str; + if (command^.cmd <> 'F') and (command^.cmd <> 'G') then dec(command^.len, 2); // cut timestamp + + AddCmd:= command; end; procedure RemoveCmd; var tmp: PCmd; begin -TryDo(headcmd <> nil, 'Engine bug: headcmd = nil', true); tmp:= headcmd; headcmd:= headcmd^.Next; if headcmd = nil then @@ -202,7 +210,8 @@ {$I-} assign(f, fileName); reset(f, 1); -tryDo(IOResult = 0, 'Error opening file ' + fileName, true); +if checkFails(IOResult = 0, 'Error opening file ' + fileName, true) then + exit; i:= 0; // avoid compiler hints s[0]:= #0; @@ -212,13 +221,13 @@ begin s[0]:= char(i); ss:= ss + s; - while (Length(ss) > 1)and(Length(ss) > byte(ss[1])) do + while (Length(ss) > 1)and(Length(ss) > byte(ss[1])) and allOK do begin ParseIPCCommand(copy(ss, 2, byte(ss[1]))); Delete(ss, 1, Succ(byte(ss[1]))); end end -until i = 0; +until (i = 0) or (not allOK); close(f) {$I+} @@ -284,7 +293,7 @@ repeat IPCCheckSock; SDL_Delay(1) -until isPonged +until isPonged or (not allOK) end; procedure SendIPCAndWaitReply(s: shortstring); @@ -391,7 +400,7 @@ end; if (headcmd <> nil) and tmpflag and (not CurrentTeam^.hasGone) then - TryDo(GameTicks < LongWord(hiTicks shl 16) + headcmd^.loTime, + checkFails(GameTicks < LongWord(hiTicks shl 16) + headcmd^.loTime, 'oops, queue error. in buffer: ' + headcmd^.cmd + ' (' + IntToStr(GameTicks) + ' > ' + IntToStr(hiTicks shl 16 + headcmd^.loTime) + ')', diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uInputHandler.pas --- a/hedgewars/uInputHandler.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uInputHandler.pas Tue Feb 09 21:11:16 2016 +0300 @@ -35,6 +35,7 @@ procedure ProcessKey(code: LongInt; KeyDown: boolean); procedure ResetKbd; +procedure ResetMouseWheel; procedure FreezeEnterKey; procedure InitKbdKeyTable; @@ -226,20 +227,40 @@ ProcessKey(KeyNameToCode('mousem'), ButtonDown); SDL_BUTTON_RIGHT: ProcessKey(KeyNameToCode('mouser'), ButtonDown); - SDL_BUTTON_WHEELDOWN: - ProcessKey(KeyNameToCode('wheeldown'), ButtonDown); - SDL_BUTTON_WHEELUP: - ProcessKey(KeyNameToCode('wheelup'), ButtonDown); end; end; +var mwheelupCode, mwheeldownCode: Integer; + procedure ProcessMouseWheel(x, y: LongInt); begin //writelntoconsole('[MOUSEWHEEL] '+inttostr(x)+', '+inttostr(y)); if y > 0 then - ProcessKey(KeyNameToCode('wheelup'), true) + begin + // reset other direction + if tkbd[mwheeldownCode] then + ProcessKey(mwheeldownCode, false); + // trigger "button down" event + if (not tkbd[mwheelupCode]) then + ProcessKey(mwheelupCode, true); + end else if y < 0 then - ProcessKey(KeyNameToCode('wheeldown'), true); + begin + // reset other direction + if tkbd[mwheelupCode] then + ProcessKey(mwheelupCode, false); + // trigger "button down" event + if (not tkbd[mwheeldownCode]) then + ProcessKey(mwheeldownCode, true); + end; +end; + +procedure ResetMouseWheel(); +begin + if tkbd[mwheelupCode] then + ProcessKey(mwheelupCode, false); + if tkbd[mwheeldownCode] then + ProcessKey(mwheeldownCode, false); end; procedure ResetKbd; @@ -311,8 +332,10 @@ KeyNames[cKeyMaxIndex ]:= 'mousel'; KeyNames[cKeyMaxIndex - 1]:= 'mousem'; KeyNames[cKeyMaxIndex - 2]:= 'mouser'; - KeyNames[cKeyMaxIndex - 3]:= 'wheelup'; - KeyNames[cKeyMaxIndex - 4]:= 'wheeldown'; + mwheelupCode:= cKeyMaxIndex - 3; + KeyNames[mwheelupCode]:= 'wheelup'; + mwheeldownCode:= cKeyMaxIndex - 4; + KeyNames[mwheeldownCode]:= 'wheeldown'; for i:= 0 to cKeyMaxIndex - 5 do begin @@ -596,6 +619,10 @@ procedure initModule; begin + // assign 0 until InitKbdKeyTable is called + mwheelupCode:= 0; + mwheeldownCode:= 0; + RegisterVariable('dbind', @chDefaultBind, true ); end; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uLand.pas --- a/hedgewars/uLand.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uLand.pas Tue Feb 09 21:11:16 2016 +0300 @@ -260,10 +260,10 @@ var x, y: LongInt; p: PLongwordArray; begin -TryDo(Surface <> nil, 'Assert (LandSurface <> nil) failed', true); +if checkFails(Surface <> nil, 'Assert (LandSurface <> nil) failed', true) then exit; if SDL_MustLock(Surface) then - SDLTry(SDL_LockSurface(Surface) >= 0, 'SDL_LockSurface', true); + if SDLCheck(SDL_LockSurface(Surface) >= 0, 'SDL_LockSurface', true) then exit; p:= Surface^.pixels; for y:= 0 to LAND_HEIGHT - 1 do @@ -291,7 +291,7 @@ tmpsurf:= SDL_CreateRGBSurface(SDL_SWSURFACE, LAND_WIDTH, LAND_HEIGHT, 32, RMask, GMask, BMask, AMask); - TryDo(tmpsurf <> nil, 'Error creating pre-land surface', true); + if checkFails(tmpsurf <> nil, 'Error creating pre-land surface', true) then exit; ColorizeLand(tmpsurf); if gameFlags and gfShoppaBorder = 0 then DrawBorderFromImage(tmpsurf); AddOnLandObjects(tmpsurf); @@ -451,8 +451,10 @@ cpX:= (LAND_WIDTH - tmpsurf^.w) div 2; cpY:= LAND_HEIGHT - tmpsurf^.h; if SDL_MustLock(tmpsurf) then - SDLTry(SDL_LockSurface(tmpsurf) >= 0, 'SDL_LockSurface', true); + SDLCheck(SDL_LockSurface(tmpsurf) >= 0, 'SDL_LockSurface', true); + if allOK then + begin p:= tmpsurf^.pixels; for y:= 0 to Pred(tmpsurf^.h) do begin @@ -461,15 +463,16 @@ p:= PLongwordArray(@(p^[tmpsurf^.pitch div 4])); end; - if SDL_MustLock(tmpsurf) then - SDL_UnlockSurface(tmpsurf); - if not disableLandBack then - begin - // freed in freeModule() below - LandBackSurface:= LoadDataImage(ptCurrTheme, 'LandBackTex', ifIgnoreCaps or ifTransparent); - if (LandBackSurface <> nil) and GrayScale then - Surface2GrayScale(LandBackSurface) - end; + if SDL_MustLock(tmpsurf) then + SDL_UnlockSurface(tmpsurf); + if not disableLandBack then + begin + // freed in freeModule() below + LandBackSurface:= LoadDataImage(ptCurrTheme, 'LandBackTex', ifIgnoreCaps or ifTransparent); + if (LandBackSurface <> nil) and GrayScale then + Surface2GrayScale(LandBackSurface) + end; + end; end; if (tmpsurf <> nil) then SDL_FreeSurface(tmpsurf); @@ -487,9 +490,11 @@ begin mapName:= ExtractFileName(cPathz[ptMapCurrent]); tmpsurf:= LoadDataImage(ptMissionMaps, mapName + '/map', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps); + if not allOK then exit; end; // (bare) Sanity check. Considering possible LongInt comparisons as well as just how much system memoery it would take -TryDo((tmpsurf^.w < $40000000) and (tmpsurf^.h < $40000000) and (QWord(tmpsurf^.w) * tmpsurf^.h < 6*1024*1024*1024), 'Map dimensions too big!', true); +if checkFails((tmpsurf^.w < $40000000) and (tmpsurf^.h < $40000000) and (QWord(tmpsurf^.w) * tmpsurf^.h < 6*1024*1024*1024), 'Map dimensions too big!', true) + then exit; ResizeLand(tmpsurf^.w, tmpsurf^.h); LoadMapConfig; @@ -500,16 +505,16 @@ rightX:= (playWidth + ((LAND_WIDTH - playWidth) div 2)) - 1; topY:= LAND_HEIGHT - playHeight; -TryDo(tmpsurf^.format^.BytesPerPixel = 4, 'Map should be 32bit', true); +if not checkFails(tmpsurf^.format^.BytesPerPixel = 4, 'Map should be 32bit', true) then + BlitImageAndGenerateCollisionInfo( + (LAND_WIDTH - tmpsurf^.w) div 2, + LAND_HEIGHT - tmpsurf^.h, + tmpsurf^.w, + tmpsurf); -BlitImageAndGenerateCollisionInfo( - (LAND_WIDTH - tmpsurf^.w) div 2, - LAND_HEIGHT - tmpsurf^.h, - tmpsurf^.w, - tmpsurf); SDL_FreeSurface(tmpsurf); -LoadMask; +if allOK then LoadMask; end; procedure DrawBottomBorder; // broken out from other borders for doing a floor-only map, or possibly updating bottom during SD @@ -663,6 +668,8 @@ FreeLandObjects; +if not allOK then exit; + if GrayScale then begin if (cReducedQuality and rqBlurryLand) = 0 then @@ -794,7 +801,7 @@ if digest = '' then digest:= s else - TryDo(s = digest, 'Different maps generated, sorry', true); + checkFails(s = digest, 'Different maps generated, sorry', true); end; procedure chSendLandDigest(var s: shortstring); @@ -808,7 +815,7 @@ ScriptSetString('LandDigest', s); chLandCheck(s); - SendIPCRaw(@s[0], Length(s) + 1) + if allOK then SendIPCRaw(@s[0], Length(s) + 1) end; procedure initModule; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uLandGenTemplateBased.pas --- a/hedgewars/uLandGenTemplateBased.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uLandGenTemplateBased.pas Tue Feb 09 21:11:16 2016 +0300 @@ -9,7 +9,7 @@ var minDistance, dabDiv: LongInt; // different details size implementation -uses uVariables, uTypes, uConsts, uFloat, uLandUtils, uRandom, SDLh, math; +uses {$IFDEF IPHONEOS}uTypes, {$ENDIF} uVariables, uConsts, uFloat, uLandUtils, uRandom, SDLh, math; procedure SetPoints(var Template: TEdgeTemplate; var pa: TPixAr; fps: PPointArray); diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uLandGraphics.pas --- a/hedgewars/uLandGraphics.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uLandGraphics.pas Tue Feb 09 21:11:16 2016 +0300 @@ -705,7 +705,7 @@ if outOfMap then doPlace:= false; // just using for a check -TryDo(SpritesData[Obj].Surface <> nil, 'Assert SpritesData[Obj].Surface failed', true); +if checkFails(SpritesData[Obj].Surface <> nil, 'Assert SpritesData[Obj].Surface failed', true) then exit; Image:= SpritesData[Obj].Surface; w:= SpritesData[Obj].Width; @@ -716,10 +716,15 @@ col:= Frame div numFramesFirstCol; if SDL_MustLock(Image) then - SDLTry(SDL_LockSurface(Image) >= 0, 'TryPlaceOnLand', true); + if SDLCheck(SDL_LockSurface(Image) >= 0, 'TryPlaceOnLand', true) then exit; bpp:= Image^.format^.BytesPerPixel; -TryDo(bpp = 4, 'It should be 32 bpp sprite', true); +if checkFails(bpp = 4, 'It should be 32 bpp sprite', true) then +begin + if SDL_MustLock(Image) then + SDL_UnlockSurface(Image); + exit +end; // Check that sprite fits free space p:= PByteArray(@(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ])); case bpp of @@ -824,7 +829,7 @@ begin numFramesFirstCol:= SpritesData[Obj].imageHeight div SpritesData[Obj].Height; -TryDo(SpritesData[Obj].Surface <> nil, 'Assert SpritesData[Obj].Surface failed', true); +if checkFails(SpritesData[Obj].Surface <> nil, 'Assert SpritesData[Obj].Surface failed', true) then exit; Image:= SpritesData[Obj].Surface; w:= SpritesData[Obj].Width; @@ -835,14 +840,19 @@ col:= Frame div numFramesFirstCol; if SDL_MustLock(Image) then - SDLTry(SDL_LockSurface(Image) >= 0, 'EraseLand', true); + if SDLCheck(SDL_LockSurface(Image) >= 0, 'EraseLand', true) then exit; bpp:= Image^.format^.BytesPerPixel; -TryDo(bpp = 4, 'It should be 32 bpp sprite', true); +if checkFails(bpp = 4, 'It should be 32 bpp sprite', true) then +begin + if SDL_MustLock(Image) then + SDL_UnlockSurface(Image); + exit +end; // Check that sprite fits free space p:= PByteArray(@(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ])); -case bpp of - 4: for y:= 0 to Pred(h) do + + for y:= 0 to Pred(h) do begin for x:= 0 to Pred(w) do if ((PLongword(@(p^[x * 4]))^) and AMask) <> 0 then @@ -854,13 +864,11 @@ exit end; p:= PByteArray(@(p^[Image^.pitch])) - end - end; + end; // Checked, now place p:= PByteArray(@(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ])); -case bpp of - 4: for y:= 0 to Pred(h) do + for y:= 0 to Pred(h) do begin for x:= 0 to Pred(w) do if ((PLongword(@(p^[x * 4]))^) and AMask) <> 0 then @@ -875,7 +883,7 @@ gX:= (cpX + x) div 2; gY:= (cpY + y) div 2; end; - if (not eraseOnLFMatch or (Land[cpY + y, cpX + x] and LandFlags <> 0)) and + if (not eraseOnLFMatch or (Land[cpY + y, cpX + x] and LandFlags <> 0)) and ((PLongword(@(p^[x * 4]))^) and AMask <> 0) then begin if not onlyEraseLF then @@ -888,7 +896,6 @@ end; p:= PByteArray(@(p^[Image^.pitch])); end; - end; if SDL_MustLock(Image) then SDL_UnlockSurface(Image); @@ -910,7 +917,7 @@ GetPlaceCollisionTex:= nil; numFramesFirstCol:= SpritesData[Obj].imageHeight div SpritesData[Obj].Height; -TryDo(SpritesData[Obj].Surface <> nil, 'Assert SpritesData[Obj].Surface failed', true); +checkFails(SpritesData[Obj].Surface <> nil, 'Assert SpritesData[Obj].Surface failed', true); Image:= SpritesData[Obj].Surface; w:= SpritesData[Obj].Width; h:= SpritesData[Obj].Height; @@ -918,19 +925,32 @@ col:= Frame div numFramesFirstCol; if SDL_MustLock(Image) then - SDLTry(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true); + if SDLCheck(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true) then + exit; bpp:= Image^.format^.BytesPerPixel; -TryDo(bpp = 4, 'It should be 32 bpp sprite', true); +checkFails(bpp = 4, 'It should be 32 bpp sprite', true); finalSurface:= SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, RMask, GMask, BMask, AMask); -TryDo(finalSurface <> nil, 'GetPlaceCollisionTex: fail to create surface', true); +checkFails(finalSurface <> nil, 'GetPlaceCollisionTex: fail to create surface', true); if SDL_MustLock(finalSurface) then - SDLTry(SDL_LockSurface(finalSurface) >= 0, 'GetPlaceCollisionTex', true); + SDLCheck(SDL_LockSurface(finalSurface) >= 0, 'GetPlaceCollisionTex', true); + +if not allOK then + begin + if SDL_MustLock(Image) then + SDL_UnlockSurface(Image); + + if SDL_MustLock(finalSurface) then + SDL_UnlockSurface(finalSurface); + + if finalSurface <> nil then + SDL_FreeSurface(finalSurface); + end; p:= PLongWordArray(@(PLongWordArray(Image^.pixels)^[ (Image^.pitch div 4) * row * h + col * w ])); pt:= PLongWordArray(finalSurface^.pixels); diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uLandObjects.pas --- a/hedgewars/uLandObjects.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uLandObjects.pas Tue Feb 09 21:11:16 2016 +0300 @@ -109,10 +109,14 @@ WriteToConsole('Generating collision info... '); if SDL_MustLock(Image) then - SDLTry(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true); + if SDLCheck(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true) then exit; bpp:= Image^.format^.BytesPerPixel; -TryDo(bpp = 4, 'Land object should be 32bit', true); +if checkFails(bpp = 4, 'Land object should be 32bit', true) then +begin +if SDL_MustLock(Image) then + SDL_UnlockSurface(Image); +end; if Width = 0 then Width:= Image^.w; @@ -160,10 +164,14 @@ WriteToConsole('Generating collision info... '); if SDL_MustLock(Image) then - SDLTry(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true); + if SDLCheck(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true) then exit; bpp:= Image^.format^.BytesPerPixel; -TryDo(bpp = 4, 'Land object should be 32bit', true); +if checkFails(bpp = 4, 'Land object should be 32bit', true) then +begin +if SDL_MustLock(Image) then + SDL_UnlockSurface(Image); +end; p:= Image^.pixels; mp:= Mask^.pixels; @@ -203,7 +211,7 @@ h:= h1 end; inc(RectCount); -TryDo(RectCount < MaxRects, 'AddRect: overflow', true) +checkFails(RectCount < MaxRects, 'AddRect: overflow', true) end; procedure InitRects; @@ -512,12 +520,12 @@ s:= cPathz[ptCurrTheme] + '/' + cThemeCFGFilename; WriteLnToConsole('Reading objects info...'); f:= pfsOpenRead(s); -TryDo(f <> nil, 'Bad data or cannot access file ' + s, true); +if checkFails(f <> nil, 'Bad data or cannot access file ' + s, true) then exit; ThemeObjects.Count:= 0; SprayObjects.Count:= 0; -while not pfsEOF(f) do +while (not pfsEOF(f)) and allOK do begin pfsReadLn(f, s); if Length(s) = 0 then diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uLandOutline.pas --- a/hedgewars/uLandOutline.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uLandOutline.pas Tue Feb 09 21:11:16 2016 +0300 @@ -30,7 +30,7 @@ procedure Push(_xl, _xr, _y, _dir: LongInt); begin - TryDo(Stack.Count <= 8192, 'FillLand: stack overflow', true); + if checkFails(Stack.Count <= 8192, 'FillLand: stack overflow', true) then exit; _y:= _y + _dir; if (_y < 0) or (_y >= LAND_HEIGHT) then exit; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uLandTexture.pas --- a/hedgewars/uLandTexture.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uLandTexture.pas Tue Feb 09 21:11:16 2016 +0300 @@ -72,10 +72,11 @@ if cOnlyStats then exit; if (Width <= 0) or (Height <= 0) then exit; - TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true); - TryDo(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true); - TryDo((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true); - TryDo(Y + Height <= LAND_HEIGHT, 'UpdateLandTexture: wrong Height parameter', true); + checkFails((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true); + checkFails(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true); + checkFails((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true); + checkFails(Y + Height <= LAND_HEIGHT, 'UpdateLandTexture: wrong Height parameter', true); + if not allOK then exit; tSize:= TEXSIZE; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uLocale.pas --- a/hedgewars/uLocale.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uLocale.pas Tue Feb 09 21:11:16 2016 +0300 @@ -50,7 +50,7 @@ first[e]:= true; f:= pfsOpenRead(FileName); -TryDo(f <> nil, 'Cannot load locale "' + FileName + '"', false); +checkFails(f <> nil, 'Cannot load locale "' + FileName + '"', false); s:= ''; @@ -63,18 +63,19 @@ continue; if (s[1] < '0') or (s[1] > '9') then continue; - TryDo(Length(s) > 6, 'Load locale: empty string', true); + checkFails(Length(s) > 6, 'Load locale: empty string', true); {$IFNDEF PAS2C} val(s[1]+s[2], a, c); - TryDo(c = 0, ansistring('Load locale: numbers should be two-digit: ') + s, true); + checkFails(c = 0, ansistring('Load locale: numbers should be two-digit: ') + s, true); val(s[4]+s[5], b, c); - TryDo(c = 0, ansistring('Load locale: numbers should be two-digit: ') + s, true); + checkFails(c = 0, ansistring('Load locale: numbers should be two-digit: ') + s, true); {$ELSE} val(s[1]+s[2], a); val(s[4]+s[5], b); {$ENDIF} - TryDo(s[3] = ':', 'Load locale: ":" expected', true); - TryDo(s[6] = '=', 'Load locale: "=" expected', true); + checkFails(s[3] = ':', 'Load locale: ":" expected', true); + checkFails(s[6] = '=', 'Load locale: "=" expected', true); + if not allOK then exit; Delete(s, 1, 6); case a of 0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then @@ -83,7 +84,7 @@ trmsg[TMsgStrId(b)]:= s; 2: if (b >=0) and (b <= ord(High(TEventId))) then begin - TryDo(trevt_n[TEventId(b)] < MAX_EVENT_STRINGS, 'Too many event strings in ' + IntToStr(a) + ':' + IntToStr(b), false); + checkFails(trevt_n[TEventId(b)] < MAX_EVENT_STRINGS, 'Too many event strings in ' + IntToStr(a) + ':' + IntToStr(b), false); if first[TEventId(b)] then begin trevt_n[TEventId(b)]:= 0; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uRenderUtils.pas --- a/hedgewars/uRenderUtils.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uRenderUtils.pas Tue Feb 09 21:11:16 2016 +0300 @@ -99,7 +99,8 @@ tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, PChar(s), clr); finalRect.x:= X + cFontBorder + 2; finalRect.y:= Y + cFontBorder; - SDLTry(tmpsurf <> nil, 'TTF_RenderUTF8_Blended', true); + if SDLCheck(tmpsurf <> nil, 'TTF_RenderUTF8_Blended', true) then + exit; SDL_UpperBlit(tmpsurf, @textRect, Surface, @finalRect); SDL_FreeSurface(tmpsurf); finalRect.x:= X; @@ -114,7 +115,8 @@ tmpPixel: Longword; pixels: PLongWordArray; begin - TryDo(Surface^.format^.BytesPerPixel = 4, 'flipSurface failed, expecting 32 bit surface', true); + if checkFails(Surface^.format^.BytesPerPixel = 4, 'flipSurface failed, expecting 32 bit surface', true) then + exit; SDL_LockSurface(Surface); pixels:= Surface^.pixels; if Vertical then @@ -129,7 +131,7 @@ end else for x := 0 to (Surface^.w div 2) - 1 do - for y := 0 to Surface^.h -1 do + for y := 0 to Surface^.h - 1 do begin i:= y*Surface^.w + x; j:= y*Surface^.w + (Surface^.w - x - 1); @@ -245,8 +247,9 @@ var y, x, i, j: LongInt; srcPixels, destPixels: PLongWordArray; begin - TryDo(src^.format^.BytesPerPixel = 4, 'rotateSurface failed, expecting 32 bit surface', true); - TryDo(dest^.format^.BytesPerPixel = 4, 'rotateSurface failed, expecting 32 bit surface', true); + checkFails(src^.format^.BytesPerPixel = 4, 'rotateSurface failed, expecting 32 bit surface', true); + checkFails(dest^.format^.BytesPerPixel = 4, 'rotateSurface failed, expecting 32 bit surface', true); + if not allOK then exit; SDL_LockSurface(src); SDL_LockSurface(dest); @@ -292,11 +295,12 @@ finalSurface:= SDL_CreateRGBSurface(SDL_SWSURFACE, w + cFontBorder * 2 + 4, h + cFontBorder * 2, 32, RMask, GMask, BMask, AMask); - TryDo(finalSurface <> nil, 'RenderString: fail to create surface', true); + if checkFails(finalSurface <> nil, 'RenderString: fail to create surface', true) then + exit(nil); WriteInRoundRect(finalSurface, 0, 0, Color, font, s, maxLength); - TryDo(SDL_SetColorKey(finalSurface, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true); + checkFails(SDL_SetColorKey(finalSurface, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, false); RenderStringTexLim:= Surface2Tex(finalSurface, false); @@ -443,7 +447,8 @@ finalSurface:= SDL_CreateRGBSurface(SDL_SWSURFACE, rect.w, rect.h, 32, RMask, GMask, BMask, AMask); - TryDo(finalSurface <> nil, 'RenderString: fail to create surface', true); + if checkFails(finalSurface <> nil, 'RenderString: fail to create surface', true) then + exit(nil); //////////////////////////////// CORNERS /////////////////////////////// copyToXY(SpritesData[corner].Surface, finalSurface, 0, 0); /////////////////// NW @@ -522,9 +527,11 @@ rect.x:= edgeHeight + 1 + ((i - w) div 2); // trying to more evenly position the text, vertically rect.y:= edgeHeight + ((j-(numLines*h)) div 2) + line * h; - SDLTry(tmpsurf <> nil, 'TTF_Init', true); - SDL_UpperBlit(tmpsurf, nil, finalSurface, @rect); - SDL_FreeSurface(tmpsurf); + if not SDLCheck(tmpsurf <> nil, 'TTF_RenderUTF8_Blended', true) then + begin + SDL_UpperBlit(tmpsurf, nil, finalSurface, @rect); + SDL_FreeSurface(tmpsurf); + end; inc(line); end; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uScript.pas --- a/hedgewars/uScript.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uScript.pas Tue Feb 09 21:11:16 2016 +0300 @@ -23,7 +23,7 @@ * This unit defines, implements and registers functions and * variables/constants bindings for usage in Lua scripts. * - * Please keep http://code.google.com/p/hedgewars/wiki/LuaAPI up to date! + * Please keep http://hedgewars.org/kb/LuaAPI up to date! * * Note: If you add a new function, make sure to test if _all_ parameters * work as intended! (Especially conversions errors can sneak in @@ -440,6 +440,19 @@ lc_setweapon:= 0; end; +// enable/disable cinematic effects +function lc_setcinematicmode(L : Plua_State) : LongInt; Cdecl; +const + call = 'SetCinematicMode'; + params = 'enable'; +begin + if (CheckLuaParamCount(L, 1, call, params)) then + begin + CinematicScript:= lua_toboolean(L, 1); + end; + lc_setcinematicmode:= 0; +end; + // no parameter means reset to default (and 0 means unlimited) function lc_setmaxbuilddistance(L : Plua_State) : LongInt; Cdecl; var np: LongInt; @@ -3097,7 +3110,7 @@ begin // initialize lua luaState:= lua_open; -TryDo(luaState <> nil, 'lua_open failed', true); +if checkFails(luaState <> nil, 'lua_open failed', true) then exit; // open internal libraries luaopen_base(luaState); @@ -3340,6 +3353,7 @@ lua_register(luaState, _P'SetWaterLine', @lc_setwaterline); lua_register(luaState, _P'SetNextWeapon', @lc_setnextweapon); lua_register(luaState, _P'SetWeapon', @lc_setweapon); +lua_register(luaState, _P'SetCinematicMode', @lc_setcinematicmode); lua_register(luaState, _P'SetMaxBuildDistance', @lc_setmaxbuilddistance); // drawn map functions lua_register(luaState, _P'AddPoint', @lc_addPoint); diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uSound.pas --- a/hedgewars/uSound.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uSound.pas Tue Feb 09 21:11:16 2016 +0300 @@ -290,10 +290,10 @@ exit(AskForVoicepack('Default')); end; - while (voicepacks[i].name <> name) and (voicepacks[i].name <> '') do + while (voicepacks[i].name <> name) and (voicepacks[i].name <> '') and (i < cMaxTeams) do begin inc(i); - TryDo(i <= cMaxTeams, 'Engine bug: AskForVoicepack i > cMaxTeams', true) + //TryDo(i <= cMaxTeams, 'Engine bug: AskForVoicepack i > cMaxTeams', true) end; voicepacks[i].name:= name; @@ -310,7 +310,7 @@ success:= SDL_InitSubSystem(SDL_INIT_AUDIO) >= 0; if success then - success:= Mix_OpenAudio(44100, $8010, channels, 1024) = 0; + success:= Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, channels, 1024) = 0; if success then WriteLnToConsole(msgOK) @@ -322,10 +322,11 @@ end; WriteToConsole('Init SDL_mixer... '); - SDLTry(Mix_Init(MIX_INIT_OGG) <> 0, 'Mix_Init', true); + if SDLCheck(Mix_Init(MIX_INIT_OGG) <> 0, 'Mix_Init', true) then exit; WriteLnToConsole(msgOK); Mix_AllocateChannels(Succ(chanTPU)); + previousVolume:= cInitVolume; ChangeVolume(cInitVolume); end; @@ -424,7 +425,7 @@ s:= cPathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName; WriteToConsole(msgLoading + s + ' '); defVoicepack^.chunks[snd]:= Mix_LoadWAV_RW(rwopsOpenRead(s), 1); - SDLTry(defVoicepack^.chunks[snd] <> nil, 'Mix_LoadWAV_RW', true); + if not SDLCheck(defVoicepack^.chunks[snd] <> nil, 'Mix_LoadWAV_RW', true) then exit; WriteLnToConsole(msgOK); end; lastChan[snd]:= Mix_PlayChannelTimed(-1, defVoicepack^.chunks[snd], 0, -1) @@ -523,7 +524,7 @@ s:= cPathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName; WriteToConsole(msgLoading + s + ' '); defVoicepack^.chunks[snd]:= Mix_LoadWAV_RW(rwopsOpenRead(s), 1); - SDLTry(defVoicepack^.chunks[snd] <> nil, 'Mix_LoadWAV_RW', true); + if SDLCheck(defVoicepack^.chunks[snd] <> nil, 'Mix_LoadWAV_RW', true) then exit; WriteLnToConsole(msgOK); end; if fadems > 0 then @@ -574,10 +575,10 @@ WriteToConsole(msgLoading + s + ' '); Mus:= Mix_LoadMUS_RW(rwopsOpenRead(s)); - SDLTry(Mus <> nil, 'Mix_LoadMUS_RW', false); + SDLCheck(Mus <> nil, 'Mix_LoadMUS_RW', false); WriteLnToConsole(msgOK); - SDLTry(Mix_FadeInMusic(Mus, -1, 3000) <> -1, 'Mix_FadeInMusic', false) + SDLCheck(Mix_FadeInMusic(Mus, -1, 3000) <> -1, 'Mix_FadeInMusic', false) end; procedure SetVolume(vol: LongInt); diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uStats.pas --- a/hedgewars/uStats.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uStats.pas Tue Feb 09 21:11:16 2016 +0300 @@ -38,7 +38,7 @@ procedure declareAchievement(id, teamname, location: shortstring; value: LongInt); implementation -uses uSound, uLocale, uVariables, uUtils, uIO, uCaptions, uDebug, uMisc, uConsole, uScript; +uses uSound, uLocale, uVariables, uUtils, uIO, uCaptions, uMisc, uConsole, uScript; var DamageClan : Longword = 0; DamageTotal : Longword = 0; @@ -99,7 +99,7 @@ var i, t: LongInt; s: ansistring; begin -TryDo(not bBetweenTurns, 'Engine bug: TurnReaction between turns', true); +//TryDo(not bBetweenTurns, 'Engine bug: TurnReaction between turns', true); inc(FinishedTurnsTotal); if FinishedTurnsTotal <> 0 then diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uStore.pas --- a/hedgewars/uStore.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uStore.pas Tue Feb 09 21:11:16 2016 +0300 @@ -112,15 +112,19 @@ clr.g:= (Color shr 8) and $FF; clr.b:= Color and $FF; tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, s, clr); -SDLTry(tmpsurf <> nil, 'TTF_RenderUTF8_Blended', true); +if tmpsurf = nil then exit; tmpsurf:= doSurfaceConversion(tmpsurf); -SDLTry(tmpsurf <> nil, 'TTF_RenderUTF8_Blended, doSurfaceConversion', true); -SDL_UpperBlit(tmpsurf, nil, Surface, @finalRect); -SDL_FreeSurface(tmpsurf); -finalRect.x:= X; -finalRect.y:= Y; -finalRect.w:= w + cFontBorder * 2 + 4; -finalRect.h:= h + cFontBorder * 2; + +if tmpsurf <> nil then +begin + SDL_UpperBlit(tmpsurf, nil, Surface, @finalRect); + SDL_FreeSurface(tmpsurf); + finalRect.x:= X; + finalRect.y:= Y; + finalRect.w:= w + cFontBorder * 2 + 4; + finalRect.h:= h + cFontBorder * 2; +end; + WriteInRect:= finalRect end; @@ -145,8 +149,10 @@ rr.h:= h; texsurf:= SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, RMask, GMask, BMask, AMask); - TryDo(texsurf <> nil, errmsgCreateSurface, true); - TryDo(SDL_SetColorKey(texsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true); + if not checkFails(texsurf <> nil, errmsgCreateSurface, true) then + checkFails(SDL_SetColorKey(texsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true); + + if not allOK then exit(nil); DrawRoundRect(@rr, cWhiteColor, cNearBlackColor, texsurf, true); @@ -192,8 +198,9 @@ r.w:= 32; r.h:= 32; texsurf:= SDL_CreateRGBSurface(SDL_SWSURFACE, r.w, r.h, 32, RMask, GMask, BMask, AMask); - TryDo(texsurf <> nil, errmsgCreateSurface, true); - TryDo(SDL_SetColorKey(texsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true); + if not checkFails(texsurf <> nil, errmsgCreateSurface, true) then + checkFails(SDL_SetColorKey(texsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true); + if not allOK then exit; r.w:= 26; r.h:= 19; @@ -225,20 +232,20 @@ Flag:= 'hedgewars'; flagsurf:= LoadDataImageAltFile(ptFlags, Flag, 'hedgewars', ifNone); - TryDo(flagsurf <> nil, 'Failed to load flag "' + Flag + '" as well as the default flag', true); + if not checkFails(flagsurf <> nil, 'Failed to load flag "' + Flag + '" as well as the default flag', true) then + begin + case maxLevel of + 1: copyToXY(SpritesData[sprBotlevels].Surface, flagsurf, 0, 0); + 2: copyToXYFromRect(SpritesData[sprBotlevels].Surface, flagsurf, 5, 2, 17, 13, 5, 2); + 3: copyToXYFromRect(SpritesData[sprBotlevels].Surface, flagsurf, 9, 5, 13, 10, 9, 5); + 4: copyToXYFromRect(SpritesData[sprBotlevels].Surface, flagsurf, 13, 9, 9, 6, 13, 9); + 5: copyToXYFromRect(SpritesData[sprBotlevels].Surface, flagsurf, 17, 11, 5, 4, 17, 11) + end; - case maxLevel of - 1: copyToXY(SpritesData[sprBotlevels].Surface, flagsurf, 0, 0); - 2: copyToXYFromRect(SpritesData[sprBotlevels].Surface, flagsurf, 5, 2, 17, 13, 5, 2); - 3: copyToXYFromRect(SpritesData[sprBotlevels].Surface, flagsurf, 9, 5, 13, 10, 9, 5); - 4: copyToXYFromRect(SpritesData[sprBotlevels].Surface, flagsurf, 13, 9, 9, 6, 13, 9); - 5: copyToXYFromRect(SpritesData[sprBotlevels].Surface, flagsurf, 17, 11, 5, 4, 17, 11) - end; - - copyToXY(flagsurf, texsurf, 2, 2); - SDL_FreeSurface(flagsurf); - flagsurf:= nil; - + copyToXY(flagsurf, texsurf, 2, 2); + SDL_FreeSurface(flagsurf); + flagsurf:= nil; + end; // restore black border pixels inside the flag PLongwordArray(texsurf^.pixels)^[32 * 2 + 2]:= cNearBlackColor; @@ -251,6 +258,8 @@ SDL_FreeSurface(texsurf); texsurf:= nil; + if not allOK then exit; + AIKillsTex := RenderStringTex(ansistring(inttostr(stats.AIKills)), Clan^.Color, fnt16); dec(drY, r.h + 2); @@ -356,7 +365,7 @@ s:= cPathz[ptFonts] + '/' + Name; WriteToConsole(msgLoading + s + ' (' + inttostr(Height) + 'pt)... '); Handle:= TTF_OpenFontRW(rwopsOpenRead(s), true, Height); - SDLTry(Handle <> nil, 'TTF_OpenFontRW', true); + if SDLCheck(Handle <> nil, 'TTF_OpenFontRW', true) then exit; TTF_SetFontStyle(Handle, style); WriteLnToConsole(msgOK) end; @@ -387,6 +396,7 @@ and ((cCloudsNumber > 0) or (ii <> sprCloud)) and ((vobCount > 0) or (ii <> sprFlake)) and (savesurf or (not cOnlyStats)) // in stats-only only load those which are needed later + and allOK then begin if reload then @@ -445,7 +455,7 @@ Surface:= nil end; -if not cOnlyStats then +if (not cOnlyStats) and allOK then begin WriteNames(fnt16); @@ -471,9 +481,9 @@ for ai:= Low(TAmmoType) to High(TAmmoType) do with Ammoz[ai] do begin - TryDo(length(trAmmo[NameId]) > 0,'No default text/translation found for ammo type #' + intToStr(ord(ai)) + '!',true); + if checkFails(length(trAmmo[NameId]) > 0,'No default text/translation found for ammo type #' + intToStr(ord(ai)) + '!',true) then exit; tmpsurf:= TTF_RenderUTF8_Blended(Fontz[CheckCJKFont(trAmmo[NameId],fnt16)].Handle, PChar(trAmmo[NameId]), cWhiteColorChannels); - TryDo(tmpsurf <> nil,'Name-texture creation for ammo type #' + intToStr(ord(ai)) + ' failed!',true); + if checkFails(tmpsurf <> nil,'Name-texture creation for ammo type #' + intToStr(ord(ai)) + ' failed!',true) then exit; tmpsurf:= doSurfaceConversion(tmpsurf); FreeAndNilTexture(NameTex); NameTex:= Surface2Tex(tmpsurf, false); @@ -605,7 +615,7 @@ // anounce that loading failed OutError(msgFailed, false); - SDLTry(false, 'LoadImage', (imageFlags and ifCritical) <> 0); + if SDLCheck(false, 'LoadImage', (imageFlags and ifCritical) <> 0) then exit; // rwops was already freed by IMG_Load_RW rwops:= nil; end else @@ -625,7 +635,7 @@ tmpsurf:= doSurfaceConversion(tmpsurf); if (imageFlags and ifTransparent) <> 0 then - TryDo(SDL_SetColorKey(tmpsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true); + if checkFails(SDL_SetColorKey(tmpsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true) then exit; WriteLnToConsole(msgOK + ' (' + inttostr(tmpsurf^.w) + 'x' + inttostr(tmpsurf^.h) + ')'); @@ -734,7 +744,6 @@ end; procedure SetupOpenGL; -var buf: array[byte] of char; begin AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_GetCurrentVideoDriver()) + ')'); @@ -744,7 +753,7 @@ //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); if SDLGLcontext = nil then SDLGLcontext:= SDL_GL_CreateContext(SDLwindow); - SDLTry(SDLGLcontext <> nil, 'SDLGLcontext', true); + if SDLCheck(SDLGLcontext <> nil, 'SDLGLcontext', true) then exit; SDL_GL_SetSwapInterval(1); RendererSetup(); @@ -775,7 +784,7 @@ {$ENDIF} end; - TryDo(ProgrTex <> nil, 'Error - Progress Texure is nil!', true); + if checkFails(ProgrTex <> nil, 'Error - Progress Texure is nil!', true) then exit; RenderClear(); if Step < numsquares then @@ -876,7 +885,7 @@ inc(h, ha + 8); tmpsurf:= SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, RMask, GMask, BMask, AMask); -TryDo(tmpsurf <> nil, 'RenderHelpWindow: fail to create surface', true); +if checkFails(tmpsurf <> nil, 'RenderHelpWindow: fail to create surface', true) then exit(nil); // render border and background r.x:= 0; @@ -988,7 +997,7 @@ SDL_WINDOWPOS_CENTERED_MASK, SDL_WINDOWPOS_CENTERED_MASK, cScreenWidth, cScreenHeight, SDL_WINDOW_HIDDEN or SDL_WINDOW_OPENGL); - SDLTry(SDLwindow <> nil, 'SDL_CreateWindow', true); + if SDLCheck(SDLwindow <> nil, 'SDL_CreateWindow', true) then exit; SetupOpenGL(); end; {$ENDIF} // USE_VIDEO_RECORDING @@ -1024,7 +1033,7 @@ begin // set window title WriteToConsole('Init SDL_image... '); - SDLTry(IMG_Init(IMG_INIT_PNG) <> 0, 'IMG_Init', true); + if SDLCheck(IMG_Init(IMG_INIT_PNG) <> 0, 'IMG_Init', true) then exit; WriteLnToConsole(msgOK); end else @@ -1063,26 +1072,48 @@ *) SetupOpenGLAttributes(); {$ENDIF} + // these values in x and y make the window appear in the center x:= SDL_WINDOWPOS_CENTERED_MASK; y:= SDL_WINDOWPOS_CENTERED_MASK; - // SDL_WINDOW_RESIZABLE makes the window resizable and - // respond to rotation events on mobile devices - flags:= SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN or SDL_WINDOW_RESIZABLE; - - {$IFDEF MOBILE} - if isPhone() then - SDL_SetHint('SDL_IOS_ORIENTATIONS','LandscapeLeft LandscapeRight'); - // no need for borders on mobile devices - flags:= flags or SDL_WINDOW_BORDERLESS; - {$ENDIF} - - if cFullScreen then - flags:= flags or SDL_WINDOW_FULLSCREEN; if SDLwindow = nil then + begin + + // SDL_WINDOW_RESIZABLE makes the window resizable and + // respond to rotation events on mobile devices + flags:= SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN or SDL_WINDOW_RESIZABLE; + + {$IFDEF MOBILE} + if isPhone() then + SDL_SetHint('SDL_IOS_ORIENTATIONS','LandscapeLeft LandscapeRight'); + // no need for borders on mobile devices + flags:= flags or SDL_WINDOW_BORDERLESS; + {$ENDIF} + + if cFullScreen then + flags:= flags or SDL_WINDOW_FULLSCREEN; + SDLwindow:= SDL_CreateWindow(PChar('Hedgewars'), x, y, cScreenWidth, cScreenHeight, flags); - SDLTry(SDLwindow <> nil, 'SDL_CreateWindow', true); + end + // we're toggling + else if Length(s) = 0 then + begin + if cFullScreen then + begin + SDL_SetWindowSize(SDLwindow, cScreenWidth, cScreenHeight); + SDL_SetWindowFullscreen(SDLwindow, SDL_WINDOW_FULLSCREEN); + end + else + begin + SDL_SetWindowFullscreen(SDLwindow, 0); + SDL_SetWindowSize(SDLwindow, cScreenWidth, cScreenHeight); + SDL_SetWindowPosition(SDLwindow, x, y); + end; + updateViewLimits(); + end; + + if SDLCheck(SDLwindow <> nil, 'SDL_CreateWindow', true) then exit; // load engine ico {$IFNDEF DARWIN} diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uTeams.pas Tue Feb 09 21:11:16 2016 +0300 @@ -119,7 +119,7 @@ PrevHH, PrevTeam : LongWord; begin TargetPoint.X:= NoPointX; -TryDo(CurrentTeam <> nil, 'nil Team', true); +if checkFails(CurrentTeam <> nil, 'nil Team', true) then exit; with CurrentHedgehog^ do if (PreviousTeam <> nil) and PlacingHogs and Unplaced then begin @@ -355,9 +355,9 @@ var team: PTeam; c, t: LongInt; begin -TryDo(TeamsCount < cMaxTeams, 'Too many teams', true); +if checkFails(TeamsCount < cMaxTeams, 'Too many teams', true) then exit(nil); New(team); -TryDo(team <> nil, 'AddTeam: team = nil', true); +if checkFails(team <> nil, 'AddTeam: team = nil', true) then exit(nil); FillChar(team^, sizeof(TTeam), 0); team^.AttackBar:= 2; team^.CurrHedgehog:= 0; @@ -551,10 +551,10 @@ s:= ''; if (not isDeveloperMode) then exit; -TryDo((CurrentTeam <> nil), 'Can''t add hedgehogs yet, add a team first!', true); +if checkFails((CurrentTeam <> nil), 'Can''t add hedgehogs yet, add a team first!', true) then exit; with CurrentTeam^ do begin - TryDo(HedgehogsNumber<=cMaxHHIndex, 'Can''t add hedgehog to "' + TeamName + '"! (already ' + intToStr(HedgehogsNumber) + ' hogs)', true); + if checkFails(HedgehogsNumber<=cMaxHHIndex, 'Can''t add hedgehog to "' + TeamName + '"! (already ' + intToStr(HedgehogsNumber) + ' hogs)', true) then exit; SplitBySpace(id, s); SwitchCurrentHedgehog(@Hedgehogs[HedgehogsNumber]); CurrentHedgehog^.BotLevel:= StrToInt(id); @@ -562,7 +562,7 @@ Gear:= AddGear(0, 0, gtHedgehog, 0, _0, _0, 0); SplitBySpace(s, id); Gear^.Health:= StrToInt(s); - TryDo(Gear^.Health > 0, 'Invalid hedgehog health', true); + if checkFails(Gear^.Health > 0, 'Invalid hedgehog health', true) then exit; if (GameFlags and gfSharedAmmo) <> 0 then CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex else if (GameFlags and gfPerHogAmmo) <> 0 then @@ -608,14 +608,18 @@ // color is always little endian so the mask must be constant also in big endian archs Color:= Color or $FF000000; AddTeam(Color); - CurrentTeam^.TeamName:= ts; - CurrentTeam^.PlayerHash:= s; - loadTeamBinds(ts); + + if CurrentTeam <> nil then + begin + CurrentTeam^.TeamName:= ts; + CurrentTeam^.PlayerHash:= s; + loadTeamBinds(ts); - if GameType in [gmtDemo, gmtSave, gmtRecord] then - CurrentTeam^.ExtDriven:= true; + if GameType in [gmtDemo, gmtSave, gmtRecord] then + CurrentTeam^.ExtDriven:= true; - CurrentTeam^.voicepack:= AskForVoicepack('Default') + CurrentTeam^.voicepack:= AskForVoicepack('Default') + end end end; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uTextures.pas --- a/hedgewars/uTextures.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uTextures.pas Tue Feb 09 21:11:16 2016 +0300 @@ -176,6 +176,9 @@ r, slr, w, si, li: LongWord; begin w:= surf^.w; + // just a single pixel, nothing to do here + if (w < 2) and (surf^.h < 2) then + exit; slr:= surf^.h - 2; si:= 0; li:= w - 1; @@ -226,7 +229,7 @@ if (surf^.format^.BytesPerPixel <> 4) then begin - TryDo(false, 'Surface2Tex failed, expecting 32 bit surface', true); + checkFails(false, 'Surface2Tex failed, expecting 32 bit surface', true); Surface2Tex^.id:= 0; exit end; @@ -236,7 +239,8 @@ glBindTexture(GL_TEXTURE_2D, Surface2Tex^.id); if SDL_MustLock(surf) then - SDLTry(SDL_LockSurface(surf) >= 0, 'Lock surface', true); + if SDLCheck(SDL_LockSurface(surf) >= 0, 'Lock surface', true) then + exit(nil); fromP4:= Surf^.pixels; diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uVariables.pas Tue Feb 09 21:11:16 2016 +0300 @@ -209,6 +209,10 @@ ScreenFade : TScreenFade; ScreenFadeValue : LongInt; ScreenFadeSpeed : LongInt; + InCinematicMode : boolean; + CinematicSteps : LongInt; + CinematicBarH : LongInt; + CinematicScript : boolean; UIDisplay : TUIDisplay; LocalMessage : LongWord; @@ -2680,6 +2684,10 @@ disableLandBack := false; ScreenFade := sfNone; + InCinematicMode := false; + CinematicSteps := 0; + CinematicBarH := 0; + CinematicScript := false; // those values still are not perfect cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth); diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uVideoRec.pas --- a/hedgewars/uVideoRec.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uVideoRec.pas Tue Feb 09 21:11:16 2016 +0300 @@ -109,7 +109,7 @@ filename:= UserPathPrefix + '/VideoTemp/' + RecPrefix; soundFilePath:= UserPathPrefix + '/VideoTemp/' + RecPrefix + '.sw'; - TryDo(AVWrapper_Init(@AddFileLogRaw + if checkFails(AVWrapper_Init(@AddFileLogRaw , PChar(ansistring(filename)) , PChar(ansistring(desc)) , PChar(ansistring(soundFilePath)) @@ -118,7 +118,7 @@ , PChar(ansistring(cAudioCodec)) , cScreenWidth, cScreenHeight, cVideoFramerateNum, cVideoFramerateDen, cVideoQuality) >= 0, 'AVWrapper_Init failed', - true); + true) then exit(false); numPixels:= cScreenWidth*cScreenHeight; YCbCr_Planes[0]:= GetMem(numPixels); diff -r caa1e84c3ac2 -r b69f5f22a3ba hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Fri Jan 01 19:15:32 2016 +0300 +++ b/hedgewars/uWorld.pas Tue Feb 09 21:11:16 2016 +0300 @@ -1382,6 +1382,39 @@ // this scale is used to keep the various widgets at the same dimension at all zoom levels SetScale(cDefaultZoomLevel); +// cinematic effects +if CinematicScript or (InCinematicMode and autoCameraOn + and ((CurrentHedgehog = nil) or CurrentHedgehog^.Team^.ExtDriven + or (CurrentHedgehog^.BotLevel <> 0) or (GameType = gmtDemo))) then + begin + if CinematicSteps < 300 then + begin + inc(CinematicSteps, Lag); + if CinematicSteps > 300 then + CinematicSteps:= 300; + end; + end +else if CinematicSteps > 0 then + begin + dec(CinematicSteps, Lag); + if CinematicSteps < 0 then + CinematicSteps:= 0; + end; + +// render black bars +if CinematicSteps > 0 then + begin + r.x:= ViewLeftX; + r.w:= ViewWidth; + r.y:= ViewTopY; + CinematicBarH:= (ViewHeight * CinematicSteps) div 2048; + r.h:= CinematicBarH; + DrawRect(r, 0, 0, 0, $FF, true); + r.y:= ViewBottomY - r.h; + DrawRect(r, 0, 0, 0, $FF, true); + end; + + // Turn time if UIDisplay <> uiNone then begin @@ -1751,7 +1784,7 @@ WorldDx:= WorldDx + LongInt(rightX) - leftX; end; -wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - cVisibleWater; +wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - (cVisibleWater + trunc(CinematicBarH / (cScaleFactor / 2.0))); if WorldDy < wdy then WorldDy:= wdy; diff -r caa1e84c3ac2 -r b69f5f22a3ba misc/OfficialChallenges/racer_#18.hwmap --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/OfficialChallenges/racer_#18.hwmap Tue Feb 09 21:11:16 2016 +0300 @@ -0,0 +1,1 @@ +AAABrnicJcsxS0JRGMbx55xzzz2ecymJllwCCYeGPoDjJaVR1K0tihoEa2nR1dD6BBdBCDIIahACxwzqonIXDRochIIGh4Yg2ju+d/nx8Od9kymsI/GtctAb/AbuoTyHGcod6KTzBfdU3MJtsgPIFqt1ZMu5QOKEYDVqUEVR76iiSsO7J0SdGvRcNjp6jheoZ0I2qEEGrB3JwLmEHhOsTQ2qh0Gkem4BekpgQA1eX1Qir69SUD4hKtSgN9l+pFedz4lb5d3Qcgf5GNPFssGMnFJoRqIJ80o4JWrwyjwIvbLYhVcgeEANesbsxwOzJ3sqFVp+aMF7khhbEljJxYAa1MJNvstrnhlatiHKMRksG9wrdvymFmJrqv94NjRHPIvEr/Inas2ZTUya+2PzwX0YyfORxa5uTJ4azBnXka7K3+k/hAxnGg== \ No newline at end of file diff -r caa1e84c3ac2 -r b69f5f22a3ba misc/OfficialChallenges/racer_#19.hwmap --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/OfficialChallenges/racer_#19.hwmap Tue Feb 09 21:11:16 2016 +0300 @@ -0,0 +1,1 @@ +AAACWHicJdGxS1tRFMfx3825556TtJ0cRdCpFIpLJzOktIUGQZBCh0hLx+IoCoKDFFok2CJFKDilon9AEB/SwRZKhEDiEGhxKTg5+FQchEAtYuh95y2f4TtcOL97b9qNgd/gH7hG1+Az/gx9Ty8QRHZRWpM96CI/QnhcmEvCn8JORh96krODrEHrJInW+Rvkp0FiDdLnqUT6YRj82+Apa5AR6iYy4lcRnhnUtQZ/7MqJP6ZfkFXDla1B9+k80X1+iOKtQefW4C9dJfWX1II8MVzFGkKVBmmo+ivogkEDa+Abnk35JtyBfDd41hr0lT9KIxUUOzlH1qAHhX6qB/QB+s7Izo8NpUm/fBhp4O5MzrI1hKHQPAxD+jK+bISmNciEK7VlAkDoGq5kDf6p225HfoCqOdvW4Feo1Y58gvuY07KG4lu//jWyBlnJWbeWbTC/EdcYhjww3Lw1hPt80WClesNfuecNfo2/vfjxgx5f8JdeaNKgE5q+jOK4kQ0WG2SLNjuyVZiDLBm0aQ06yrWOjvpb6KnBNWv4DxsWmqM= \ No newline at end of file diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_ar.ts --- a/share/hedgewars/Data/Locale/hedgewars_ar.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ar.ts Tue Feb 09 21:11:16 2016 +0300 @@ -76,6 +76,10 @@ permanent + + Ban player + + DataManager @@ -114,6 +118,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -464,6 +472,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -689,6 +704,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -722,6 +741,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1675,6 +1698,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2161,6 +2192,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2628,6 +2663,10 @@ Close + + Seed + + SelWeaponWidget @@ -2698,6 +2737,10 @@ Use selected theme + + Choose a theme + + binds @@ -3462,10 +3505,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3473,5 +3512,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_bg.ts --- a/share/hedgewars/Data/Locale/hedgewars_bg.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_bg.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -467,6 +475,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -692,6 +707,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -725,6 +744,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1694,6 +1717,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2196,6 +2227,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2664,6 +2699,10 @@ Close + + Seed + + SelWeaponWidget @@ -2738,6 +2777,10 @@ Use selected theme + + Choose a theme + + binds @@ -3502,10 +3545,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3513,5 +3552,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_cs.ts --- a/share/hedgewars/Data/Locale/hedgewars_cs.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_cs.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -473,6 +481,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -698,6 +713,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -731,6 +750,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1710,6 +1733,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2212,6 +2243,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2681,6 +2716,10 @@ Close + + Seed + Semínko + SelWeaponWidget @@ -2755,6 +2794,10 @@ Use selected theme + + Choose a theme + + binds @@ -3519,10 +3562,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3530,5 +3569,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_da.ts --- a/share/hedgewars/Data/Locale/hedgewars_da.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_da.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -471,6 +479,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -696,6 +711,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -729,6 +748,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1698,6 +1721,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2204,6 +2235,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2672,6 +2707,10 @@ Close + + Seed + Spire + SelWeaponWidget @@ -2746,6 +2785,10 @@ Use selected theme + + Choose a theme + + binds @@ -3510,10 +3553,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3521,5 +3560,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_de.ts --- a/share/hedgewars/Data/Locale/hedgewars_de.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Tue Feb 09 21:11:16 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -38,7 +38,7 @@ BanDialog - + IP IP-Adresse @@ -73,22 +73,27 @@ Abbrechen - + + Ban player + + + + you know why du weißt schon, warum - + Warning Warnung - + Please, specify %1 Bitte leg %1 fest - + nickname Spitzname @@ -109,17 +114,22 @@ FeedbackDialog - + + Feedback + Feedback + + + View Ansehen - + Cancel Abbrechen - + Send Feedback Feedback senden @@ -128,7 +138,7 @@ Bitte gib uns Feedback! - + We are always happy about suggestions, ideas, or bug reports. Wir freuen uns immer über Vorschläge, Ideen oder Fehlerberichte. @@ -141,17 +151,17 @@ Deine E-Mail-Adresse ist optional, aber wir könnten sie brauchen, um dich zu kontaktieren. - + Send us feedback! Schicke uns dein Feedback! - - If you found a bug, you can see if it's already been reported here: - Falls du einen Fehler gefunden hast, kannst du hier sehen, ob er bereits bekannt is (auf Englisch): - - + If you found a bug, you can see if it's already been reported here: + Falls du einen Fehler gefunden hast, kannst du hier sehen, ob er bereits bekannt is (auf Englisch): + + + Your email address is optional, but necessary if you want us to get back at you. Deine E-Mail-Adresse ist optional, es sei denn du möchtest, dass wir dir antworten. @@ -207,7 +217,7 @@ GameUIConfig - + Guest Gast @@ -265,12 +275,12 @@ Das Spielprofil »%1« wird nicht unterstützt - + Cannot create directory %1 Das Verzeichnis %1 konnte nicht angelegt werden - + Failed to open data directory: %1 @@ -281,62 +291,62 @@ Bitte überprüfe deine Installation! - + Usage command-line Verwendung - - OPTION - command-line - SCHALTER - - - - - CONNECTSTRING - command-line - VERBINDUNGSTEXT - - - - Options - command-line - Schalter - - - Display this help + OPTION command-line - Diese Hilfe anzeigen + SCHALTER + + CONNECTSTRING + command-line + VERBINDUNGSTEXT + + + + Options + command-line + Schalter + + + + Display this help + command-line + Diese Hilfe anzeigen + + + Custom path for configuration data and user data command-line Benutzerdefinierter Pfad für Konfigurations- und Benutzerdaten - + Custom path to the game data folder command-line Benutzerdefinierter Pfad für das Spieldatenverzeichnis - + Hedgewars can use a %1 (e.g. "%2") to connect on start. command-line Hedgewars kann ein %1 (z.B. »%2«) verwenden, um beim Start zu verbinden. - + Malformed option argument: %1 command-line Fehlerhaftes Schalterargument: %1 - + Unknown option argument: %1 command-line Unbekannter Schalter: %1 @@ -578,18 +588,18 @@ HWGame - + en.txt de.txt - + Cannot open demofile %1 Wiederholungsdatei »%1« konnte nicht geöffnet werden - + A Fatal ERROR occured! - The game engine had to stop. We are very sorry for the inconvenience :( @@ -609,6 +619,14 @@ + HWHostPortDialog + + + Connect to server + + + + HWMapContainer @@ -927,17 +945,22 @@ HatPrompt - + + Choose a hat + + + + Cancel Abbrechen - + Use selected hat Gewählten Hut auswählen - + Search for a hat: Nach einem Hut suchen: @@ -973,27 +996,27 @@ %1 Bilder pro Sekunde, - + Audio: Audio: - + unknown unbekannt - + Duration: %1m %2s Dauer: %1m %2s - + Video: %1x%2 Video: %1x%2 - + %1 fps %1 Hz @@ -2683,7 +2706,7 @@ Tags (durch Kommas getrennt): - + Description Beschreibung @@ -2738,22 +2761,22 @@ Fenster-Auflösung - + Your Email Deine E-Mail-Adresse - + Summary Zusammenfassung - + Send system information Systeminformation senden - + Type the security code: Gib den Sicherheitscode ein: @@ -2884,14 +2907,14 @@ Server konnte nicht gestartet werden - + Hedgewars - Error Hedgewars – Fehler - + Hedgewars - Success Hedgewars – Erfolg @@ -3097,23 +3120,23 @@ Hedgewars – Spitzname nicht registriert - + System Information Preview Systeminformations-Vorschau - - + + Failed to generate captcha Captcha-Generierung fehlgeschlagen - + Failed to download captcha Captcha-Download fehlgeschlagen - + Please fill out all fields. Email is optional. Bitte füll alle Felder aus. Das Feld »E-Mail« ist optional. @@ -3316,22 +3339,23 @@ RoomNamePrompt - + Enter a name for your room. Gib einen Namen für deinen Raum ein. - - Cancel - Abbrechen - - + Cancel + Abbrechen + + + + Create room Raum erstellen - + set password Kennwort setzen @@ -3407,22 +3431,27 @@ SeedPrompt - + + Seed + Seed + + + The map seed is the basis for all random values generated by the game. Der sog. Seed (wörtlich übersetzt: engl. für »Saat«) ist die Basis für alle Zufallswerte, die vom Spiel generiert werden. - - Cancel - Abbrechen - - + Cancel + Abbrechen + + + Set seed Seed setzen - + Close Schließen @@ -3516,17 +3545,22 @@ ThemePrompt - + Cancel Abbrechen - + Search for a theme: Nach einer Szenerie suchen: - + + Choose a theme + + + + Use selected theme Ausgewählte Szenerie benutzen @@ -3880,39 +3914,39 @@ binds (keys) - + Axis Achse - - + + (Up) (Hoch) - - + + (Down) (Runter) - + Hat Cooliehat - + (Left) (Links) - + (Right) (Rechts) - + Button Taste @@ -4280,280 +4314,279 @@ server - + Authentication failed Authentifizierung fehlgeschlagen - - 60 seconds cooldown after kick - 60 Sekunden Abkühlzeit nach Hinauswurf - - - - kicked - hinausgeworfen - - - - Ping timeout - Ping-Timeout - - - - bye - tschüss - - - - Your vote counted - Deine Stimme zählte - - - - Pause toggled - Pause umgeschaltet - - - - new seed - Neuer Seed - - - - number of hedgehogs in team - Anzahl der Igel im Team - - - - Empty config entry - Leerer Konfigurations-Eintrag - - - - Corrupted hedgehogs info - Kaputte Igel-Info - - - too many teams - zu viele Teams + 60 seconds cooldown after kick + 60 Sekunden Abkühlzeit nach Hinauswurf - too many hedgehogs - zu viele Igel - - - - There's already a team with same name in the list - Es gibt bereits ein Team mit dem selben Namen in der Liste + kicked + hinausgeworfen - round in progress - laufende Runde + Ping timeout + Ping-Timeout + bye + tschüss + + + + Your vote counted + Deine Stimme zählte + + + + Pause toggled + Pause umgeschaltet + + + + new seed + Neuer Seed + + + + number of hedgehogs in team + Anzahl der Igel im Team + + + + Empty config entry + Leerer Konfigurations-Eintrag + + + + Corrupted hedgehogs info + Kaputte Igel-Info + + + + too many teams + zu viele Teams + + + + too many hedgehogs + zu viele Igel + + + + There's already a team with same name in the list + Es gibt bereits ein Team mit dem selben Namen in der Liste + + + + round in progress + laufende Runde + + + restricted eingeschränkt + + REMOVE_TEAM: no such team + REMOVE_TEAM: kein solches Team + + + + Not team owner! + Nicht Team-Besitzer*In! + + + + Less than two clans! + Weniger als zwei Klans! + + + + Room with such name already exists + ein Raum mit einem solchen Namen existiert bereits + + + + /maxteams: specify number from 2 to 8 + /maxteams: Zahl zwischen 2 und 8 wählen + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + Verfügbare »callvote«-Befehle: kick <Spitzname>, map <Name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + callvote kick: Spitznamen festlegen + + + + callvote kick: no such user + callvote kick: Benutzer existiert nicht + + + + callvote map: no such map + callvote map: Karte existiert nicht + + + + callvote pause: no game in progress + callvote pause: es läuft kein Spiel + + + + callvote hedgehogs: specify number from 1 to 8 + callvote hedgehogs: Zahl zwischen 1 und 8 wählen + + + + Illegal room name + Verbotener Raumname + + - REMOVE_TEAM: no such team - REMOVE_TEAM: kein solches Team - - - - Not team owner! - Nicht Team-Besitzer*In! + No such room + Ein solcher Raum existiert nicht + + + + Joining restricted + Zutritt verboten + + + + Registered users only + Nur für registrierte Benutzer + + + + You are banned in this room + Du wurdest aus diesem Raum verbannt + + + + Nickname already chosen + Spitzname bereits gewählt + + + + Illegal nickname + Verbotener Spitzname - Less than two clans! - Weniger als zwei Klans! - - - - Room with such name already exists - ein Raum mit einem solchen Namen existiert bereits - - - - /maxteams: specify number from 2 to 8 - /maxteams: Zahl zwischen 2 und 8 wählen - - - - Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs - Verfügbare »callvote«-Befehle: kick <Spitzname>, map <Name>, pause, newseed, hedgehogs + Protocol already known + Protokoll bereits bekannt + + + + Bad number + Schlechte Zahl + + + + Nickname is already in use + Spitzname bereits in Benutzung + + + + Restricted + Eingeschränkt + + + + Not room master + Nicht Gastgeber + + + + No checker rights + Keine Rechte zum Benutzen des Inspektionshilfsprogramms + + + + Room version incompatible to your hedgewars version + Die Raumversion ist inkompatibel zu deiner Hedgewars-Version + + + + You already have voted + Du hast bereits deine Stimme abgegeben + + + + Voting closed + Abstimmung abgeschlossen + + + + New voting started + Neue Abstimmung gestartet + + + + Voting expired + Abstimmung abgelaufen + + + + kick + hinauswerfen + + + + map + Karte + + + + pause + pausieren + + + + Reconnected too fast + Zu schnell wieder verbunden - callvote kick: specify nickname - callvote kick: Spitznamen festlegen + Warning! Chat flood protection activated + Nicht jeder weiß, was »Flooding« heißt, daher ist die Übersetzung etwas ausführlicher. + Achtung! Chat-Flood-Schutz ist aktiv. Bitte red etwas langsamer. - callvote kick: no such user - callvote kick: Benutzer existiert nicht + Excess flood + Nicht jeder weiß, was »Flooding« heißt, daher wird es hier umschrieben. + Zu viele Nachrichten in kurzer Zeit abgeschickt - callvote map: no such map - callvote map: Karte existiert nicht + Game messages flood detected - 1 + Zu viele Spielnachrichten in kurzer Zeit ermittelt – 1 + + + Game messages flood detected - 2 + Zu viele Spielnachrichten in kurzer Zeit ermittelt – 2 - callvote pause: no game in progress - callvote pause: es läuft kein Spiel + Warning! Joins flood protection activated + Nicht jeder weiß, was »Flooding« heißt, daher ist die Übersetzung etwas ausführlicher und umschreibend. + Achtung! Der Server wird ein zu schnelles Beitreten in kurzer Zeit nicht akzeptieren - callvote hedgehogs: specify number from 1 to 8 - callvote hedgehogs: Zahl zwischen 1 und 8 wählen - - - - Illegal room name - Verbotener Raumname - - - - No such room - Ein solcher Raum existiert nicht - - - - Joining restricted - Zutritt verboten - - - - Registered users only - Nur für registrierte Benutzer - - - - You are banned in this room - Du wurdest aus diesem Raum verbannt - - - - Nickname already chosen - Spitzname bereits gewählt - - - - Illegal nickname - Verbotener Spitzname - - - - Protocol already known - Protokoll bereits bekannt - - - - Bad number - Schlechte Zahl - - - - Nickname is already in use - Spitzname bereits in Benutzung - - - - Restricted - Eingeschränkt - - - - Not room master - Nicht Gastgeber - - - - No checker rights - Keine Rechte zum Benutzen des Inspektionshilfsprogramms - - - - Room version incompatible to your hedgewars version - Die Raumversion ist inkompatibel zu deiner Hedgewars-Version - - - - You already have voted - Du hast bereits deine Stimme abgegeben - - - - Voting closed - Abstimmung abgeschlossen - - - - New voting started - Neue Abstimmung gestartet - - - - Voting expired - Abstimmung abgelaufen - - - - kick - hinauswerfen - - - - map - Karte - - - - pause - pausieren - - - - Reconnected too fast - Zu schnell wieder verbunden - - - - Warning! Chat flood protection activated - Nicht jeder weiß, was »Flooding« heißt, daher ist die Übersetzung etwas ausführlicher. - Achtung! Chat-Flood-Schutz ist aktiv. Bitte red etwas langsamer. - - - - Excess flood - Nicht jeder weiß, was »Flooding« heißt, daher wird es hier umschrieben. - Zu viele Nachrichten in kurzer Zeit abgeschickt - - - - Game messages flood detected - 1 - Zu viele Spielnachrichten in kurzer Zeit ermittelt – 1 - - - - Game messages flood detected - 2 - Zu viele Spielnachrichten in kurzer Zeit ermittelt – 2 - - - - Warning! Joins flood protection activated - Nicht jeder weiß, was »Flooding« heißt, daher ist die Übersetzung etwas ausführlicher und umschreibend. - Achtung! Der Server wird ein zu schnelles Beitreten in kurzer Zeit nicht akzeptieren - - - There's no voting going on Zur Zeit findet keine Abstimmung statt diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_el.ts --- a/share/hedgewars/Data/Locale/hedgewars_el.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_el.ts Tue Feb 09 21:11:16 2016 +0300 @@ -76,6 +76,10 @@ permanent + + Ban player + + DataManager @@ -114,6 +118,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -465,6 +473,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -690,6 +705,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -723,6 +742,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1692,6 +1715,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2194,6 +2225,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2662,6 +2697,10 @@ Close + + Seed + + SelWeaponWidget @@ -2732,6 +2771,10 @@ Use selected theme + + Choose a theme + + binds @@ -3496,10 +3539,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3507,5 +3546,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_en.ts --- a/share/hedgewars/Data/Locale/hedgewars_en.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Tue Feb 09 21:11:16 2016 +0300 @@ -76,6 +76,10 @@ permanent + + Ban player + + DataManager @@ -114,6 +118,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -463,6 +471,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -688,6 +703,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -721,6 +740,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1674,6 +1697,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2160,6 +2191,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2628,6 +2663,10 @@ Close + + Seed + + SelWeaponWidget @@ -2698,6 +2737,10 @@ Use selected theme + + Choose a theme + + binds @@ -3462,10 +3505,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3473,5 +3512,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_es.ts --- a/share/hedgewars/Data/Locale/hedgewars_es.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_es.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -471,6 +479,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -696,6 +711,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -729,6 +748,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1698,6 +1721,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2200,6 +2231,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2668,6 +2703,10 @@ Close + + Seed + Semilla + SelWeaponWidget @@ -2742,6 +2781,10 @@ Use selected theme + + Choose a theme + + binds @@ -3506,10 +3549,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3517,5 +3556,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_fi.ts --- a/share/hedgewars/Data/Locale/hedgewars_fi.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_fi.ts Tue Feb 09 21:11:16 2016 +0300 @@ -1,15 +1,11 @@ - - - - About Unknown Compiler - Tuntematon kääntäjä + Tuntematon kääntäjä @@ -27,7 +23,7 @@ copy of %1 - %1 kopio + %1 kopio @@ -42,7 +38,7 @@ IP/Nick - IP/Nimi + IP/Nimi Reason @@ -70,7 +66,7 @@ Please, specify %1 - Tarkenna: %1 + Tarkenna: %1 nickname @@ -80,6 +76,10 @@ permanent ikuinen + + Ban player + + DataManager @@ -118,6 +118,10 @@ Your email address is optional, but necessary if you want us to get back at you. Sähköposti on valinnainen, jos et halua meidän ottavan yhteyttä. + + Feedback + Palaute + FreqSpinBox @@ -202,7 +206,7 @@ Scheme '%1' not supported - Säännöille '%1' ei ole tukea + Säännöille '%1' ei ole tukea Cannot create directory %1 @@ -213,7 +217,7 @@ %1 Please check your installation! - Hakemiston avaaminen epäonnistui: + Hakemiston avaaminen epäonnistui: %1 Tarkista, että peli on asennettu oikein! @@ -374,7 +378,7 @@ Someone already uses your nickname %1 on the server. Please pick another nickname: - Nimimerkkisi %1 on jo käytössä. + Nimimerkkisi %1 on jo käytössä. Valiste jokin muu: @@ -391,7 +395,7 @@ If this nick isn't yours, please register your own nick at www.hedgewars.org Password: - Tämä nimimerkki on rekisteröity, etkä antanut salasanaa. + Tämä nimimerkki on rekisteröity, etkä antanut salasanaa. Jos tämä ei ole nimesi, rekisteröi omasi osoitteessa hedgewars.org @@ -401,7 +405,7 @@ Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - Nimimerkkiäsi ei ole rekisteröity. + Nimimerkkiäsi ei ole rekisteröity. Estääksesi muita käyttämästä sitä, voit rekisteröidä sen osoitteessa hedgewars.org @@ -409,7 +413,7 @@ Your password wasn't saved either. - + Salasanaasi ei tallennettu. @@ -436,7 +440,7 @@ You reconnected too fast. Please wait a few seconds and try again. - Yhdistit uudelleen liian pian. + Yhdistit uudelleen liian pian. Odota hetki ja yritä uudelleen. @@ -454,7 +458,7 @@ The room is protected with password. Please, enter the password: - Huoneeseen pääsee vain salasanalla. + Huoneeseen pääsee vain salasanalla. Salasana: @@ -477,7 +481,7 @@ Last two engine messages: %2 - Vakava virhe tapahtui, ja pelimoottori kaatui! + Vakava virhe tapahtui, ja pelimoottori kaatui! Olemme pahoillamme, että näin pääsi käymään :( @@ -488,6 +492,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -703,7 +714,7 @@ If you don't have an account on www.hedgewars.org, just enter your nickname. - Kirjaudu yhdistääksesi palvelimelle. + Kirjaudu yhdistääksesi palvelimelle. Jos et ole rekisteröitynyt, pelkkä nimimerkki riittää. @@ -718,7 +729,7 @@ New Account - Rekisteröidy + Rekisteröidy @@ -753,6 +764,10 @@ Search for a hat: Etsi hattua: + + Choose a hat + + KB @@ -788,7 +803,7 @@ %1 fps - %1 kuvaa/s + %1 kuvaa/s @@ -838,7 +853,7 @@ IP/Nick - IP/Nimim + IP/Nimim Expiration @@ -1106,7 +1121,7 @@ Manage videos recorded from game - Hallinnoi peleistä nauhoitettuja videoita + Hallinnoi peleistä nauhoitettuja videoita Edit game preferences @@ -1604,7 +1619,7 @@ Load a previously saved game - Avaa tallennettu peli + Avaa tallennettu peli @@ -1722,6 +1737,14 @@ Show games in-progress Näytä alkaneet pelit + + Show password protected + + + + Show join restricted + + QCheckBox @@ -1866,27 +1889,27 @@ Red/Cyan - Punainen/Syaani + Punainen/Syaani Cyan/Red - Syaani/Punainen + Syaani/Punainen Red/Blue - Punainen/Sininen + Punainen/Sininen Blue/Red - Sininen/Punainen + Sininen/Punainen Red/Green - Punainen/Vihreä + Punainen/Vihreä Green/Red - Vihreä/Punainen + Vihreä/Punainen Side-by-side @@ -1898,27 +1921,27 @@ Red/Cyan grayscale - Punainen/Syaani harmaasävy + Punainen/Syaani harmaasävy Cyan/Red grayscale - Syaani/Punainen harmaasävy + Syaani/Punainen harmaasävy Red/Blue grayscale - Punainen/Sininen harmaasävy + Punainen/Sininen harmaasävy Blue/Red grayscale - Sininen/Punainen harmaasävy + Sininen/Punainen harmaasävy Red/Green grayscale - Punainen/Vihreä harmaasävy + Punainen/Vihreä harmaasävy Green/Red grayscale - Vihreä/Punainen harmaasävy + Vihreä/Punainen harmaasävy @@ -2110,7 +2133,7 @@ There are videos that are currently being processed. Exiting now will abort them. Do you really want to quit? - Videoiden prosessointi on käynnissä. + Videoiden prosessointi on käynnissä. Sulkeminen keskeyttää tämän. Haluatko varmasti lopettaa? @@ -2136,7 +2159,7 @@ Tags (comma separated): - Hakusanat (pilkulla eroteltuna): + Hakusanat (pilkulla eroteltuna): Description @@ -2196,7 +2219,7 @@ Type the security code: - Todista, että olet ihminen: + Todista, että olet ihminen: Revision @@ -2226,6 +2249,10 @@ Script parameter Skriptin parametri + + Air Mines + + QLineEdit @@ -2266,7 +2293,7 @@ Error while authenticating at google.com: - Virhe kirjautuessa google.comiin: + Virhe kirjautuessa google.comiin: @@ -2276,7 +2303,7 @@ Error while sending metadata to youtube.com: - Virhe lähetettäessä oheistietoja youtube.comiin: + Virhe lähetettäessä oheistietoja youtube.comiin: @@ -2410,7 +2437,7 @@ Cannot open '%1' for reading - Ei voi avata '%1' lukua varten + Ei voi avata '%1' lukua varten Cannot use the ammo '%1'! @@ -2471,7 +2498,7 @@ Are you sure you want to start this game? Not all players are ready. - Haluatko varmasti aloittaa pelin? + Haluatko varmasti aloittaa pelin? Kaikki pelaajat eivät ole valmiita. @@ -2697,6 +2724,10 @@ Close Sulje + + Seed + Siemen + SelWeaponWidget @@ -2734,7 +2765,7 @@ Unable to run engine at %1 Error code: %2 - Pelimoottorin käynnistäminen %1:ssä epäonnistui + Pelimoottorin käynnistäminen %1:ssä epäonnistui Vikakoodi: %2 @@ -2744,7 +2775,7 @@ We are very sorry for the inconvenience :( If this keeps happening, please click the '%2' button in the main menu! - Pelimoottori kaatui yllättäen! + Pelimoottori kaatui yllättäen! (Vikakoodi: %1) Olemme pahoillamme tapahtuneesta :( @@ -2773,6 +2804,10 @@ Use selected theme Käytä valittua teemaa + + Choose a theme + + binds @@ -2794,7 +2829,7 @@ attack - hyökkäys + hyökkäys precise aim @@ -2946,7 +2981,7 @@ autocam / find hedgehog - automaattikamera / etsi siili + automaattikamera / etsi siili speed up replay @@ -3450,7 +3485,7 @@ Authentication failed - Tunnistautuminen epäonnistui + Tunnistautuminen epäonnistui 60 seconds cooldown after kick @@ -3514,7 +3549,7 @@ map - kartta + kartta pause @@ -3538,7 +3573,7 @@ Game messages flood detected - 2 - Peliviestien tulva havaittu - 2 + Peliviestien tulva havaittu - 2 Warning! Joins flood protection activated @@ -3548,5 +3583,49 @@ There's no voting going on Äänestyksiä ei ole meneillään + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + - \ No newline at end of file + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_fr.ts --- a/share/hedgewars/Data/Locale/hedgewars_fr.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_fr.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent Permanent + + Ban player + + DataManager @@ -130,6 +134,10 @@ Your email address is optional, but necessary if you want us to get back at you. L'adresse email est optionnelle, mais nécessaire si vous voulez que l'on vous recontacte. + + Feedback + Contact + FreqSpinBox @@ -492,6 +500,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -724,6 +739,10 @@ Password: Mot de passe: + + New Account + + HWUploadVideoDialog @@ -757,6 +776,10 @@ Search for a hat: Chercher un chapeau: + + Choose a hat + + KB @@ -1754,6 +1777,14 @@ Show games in-progress Parties en cours + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2258,6 +2289,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2733,6 +2768,10 @@ Close Fermer + + Seed + Graine + SelWeaponWidget @@ -2815,6 +2854,10 @@ Use selected theme Utiliser le thème séléctionné + + Choose a theme + + binds @@ -3580,10 +3623,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3591,5 +3630,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_gl.ts --- a/share/hedgewars/Data/Locale/hedgewars_gl.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_gl.ts Tue Feb 09 21:11:16 2016 +0300 @@ -76,6 +76,10 @@ permanent + + Ban player + + DataManager @@ -114,6 +118,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -463,6 +471,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -688,6 +703,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -721,6 +740,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1678,6 +1701,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2164,6 +2195,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2631,6 +2666,10 @@ Close + + Seed + + SelWeaponWidget @@ -2701,6 +2740,10 @@ Use selected theme + + Choose a theme + + binds @@ -3465,10 +3508,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3476,5 +3515,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_hu.ts --- a/share/hedgewars/Data/Locale/hedgewars_hu.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_hu.ts Tue Feb 09 21:11:16 2016 +0300 @@ -76,6 +76,10 @@ permanent + + Ban player + + DataManager @@ -114,6 +118,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -457,6 +465,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -682,6 +697,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -715,6 +734,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1662,6 +1685,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2148,6 +2179,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2614,6 +2649,10 @@ Close + + Seed + + SelWeaponWidget @@ -2684,6 +2723,10 @@ Use selected theme + + Choose a theme + + binds @@ -3448,10 +3491,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3459,5 +3498,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_it.ts --- a/share/hedgewars/Data/Locale/hedgewars_it.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_it.ts Tue Feb 09 21:11:16 2016 +0300 @@ -76,6 +76,10 @@ permanent permanente + + Ban player + + DataManager @@ -114,6 +118,10 @@ Your email address is optional, but necessary if you want us to get back at you. Il tuo indirizzo di posta elettronica è opzionale, ma potremmo volerti contattare. + + Feedback + Opinioni + FreqSpinBox @@ -252,7 +260,7 @@ Hedgewars can use a %1 (e.g. "%2") to connect on start. command-line - Hedgewars può usare un %1 (per esempio "%2") per connettersi all'avvio. + Hedgewars può usare un %1 (per esempio "%2") per connettersi all'avvio. Malformed option argument: %1 @@ -475,7 +483,7 @@ %2 ERRORE non recuperabile! Il motore di gioco si è dovuto arrestare. -Ci dispiace molto per l'inconveniente :( +Ci dispiace molto per l'inconveniente :( Se continua a succedere, per piacere clicca il bottone '%1' nel menu principale! @@ -484,6 +492,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -708,6 +723,10 @@ Password: Password: + + New Account + + HWUploadVideoDialog @@ -741,6 +760,10 @@ Search for a hat: Cerca un cappello: + + Choose a hat + + KeyBinder @@ -1667,6 +1690,14 @@ Show games in-progress Mostra partite in corso + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2151,6 +2182,10 @@ Script parameter Parametro dello script + + Air Mines + + QLineEdit @@ -2612,6 +2647,10 @@ Close Chiudi + + Seed + Seed + SelWeaponWidget @@ -2662,7 +2701,7 @@ Il motore del gioco è morto inaspettatamente! (codice di uscita %1) -Ci dispiace molto per l'inconveniente :( +Ci dispiace molto per l'inconveniente :( Se questo continua a succedere, per piacere clicca il bottone '%2' nel menu principale! @@ -2688,6 +2727,10 @@ Use selected theme Usa tema selezionato + + Choose a theme + + binds @@ -3445,7 +3488,7 @@ Game messages flood detected - 2 - Rilevato numero messaggi di gioco eccessivo - 2 + Rilevato numero messaggi di gioco eccessivo - 2 Warning! Joins flood protection activated @@ -3455,5 +3498,49 @@ There's no voting going on Non ci sono votazioni in questo momento + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_ja.ts --- a/share/hedgewars/Data/Locale/hedgewars_ja.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ja.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -461,6 +469,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -686,6 +701,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -719,6 +738,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1662,6 +1685,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2148,6 +2179,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2614,6 +2649,10 @@ Close + + Seed + 乱数シード + SelWeaponWidget @@ -2688,6 +2727,10 @@ Use selected theme + + Choose a theme + + binds @@ -3448,10 +3491,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3459,5 +3498,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_ko.ts --- a/share/hedgewars/Data/Locale/hedgewars_ko.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ko.ts Tue Feb 09 21:11:16 2016 +0300 @@ -76,6 +76,10 @@ permanent + + Ban player + + DataManager @@ -114,6 +118,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -457,6 +465,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -678,6 +693,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -711,6 +730,10 @@ Search for a hat: + + Choose a hat + + KeyBinder @@ -1627,6 +1650,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2109,6 +2140,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2567,6 +2602,10 @@ Close + + Seed + + SelWeaponWidget @@ -2637,6 +2676,10 @@ Use selected theme + + Choose a theme + + binds @@ -3393,10 +3436,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3404,5 +3443,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_lt.ts --- a/share/hedgewars/Data/Locale/hedgewars_lt.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_lt.ts Tue Feb 09 21:11:16 2016 +0300 @@ -20,12 +20,12 @@ AmmoSchemeModel - + new - + copy of %1 @@ -39,7 +39,7 @@ - + IP @@ -74,22 +74,27 @@ - + + Ban player + + + + you know why - + Warning - + Please, specify %1 - + nickname @@ -105,37 +110,42 @@ FeedbackDialog - + We are always happy about suggestions, ideas, or bug reports. - + Send us feedback! - - If you found a bug, you can see if it's already been reported here: + + Feedback + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. - + View - + Cancel - + Send Feedback @@ -188,7 +198,7 @@ GameUIConfig - + Guest @@ -251,72 +261,73 @@ - + Cannot create directory %1 - - Usage - command-line - - - - - OPTION - command-line - - - - - CONNECTSTRING - command-line - - - - Options + Usage command-line - Display this help + OPTION command-line - Custom path for configuration data and user data + + CONNECTSTRING command-line - Custom path to the game data folder + Options command-line + Display this help + command-line + + + + + Custom path for configuration data and user data + command-line + + + + + Custom path to the game data folder + command-line + + + + Hedgewars can use a %1 (e.g. "%2") to connect on start. command-line - + Malformed option argument: %1 command-line - + Unknown option argument: %1 command-line - + Failed to open data directory: %1 @@ -335,67 +346,67 @@ HWChatWidget - + %1 has joined - + %1 has left - + %1 has left (%2) - + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded - + StyleSheet saved to %1 - + Failed to save StyleSheet to %1 @@ -403,52 +414,52 @@ HWForm - + DefaultTeam - + Game aborted - + Nickname - - + + No nickname supplied. - + Someone already uses your nickname %1 on the server. Please pick another nickname: - - - + + + Guest - + %1's Team - + Hedgewars - Nick registered - + This nick is registered, and you haven't specified a password. If this nick isn't yours, please register your own nick at www.hedgewars.org @@ -457,92 +468,92 @@ - + Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - + Your password wasn't saved either. - - + + Hedgewars - Empty nickname - + Hedgewars - Wrong password - + You entered a wrong password. - + Room password - + The room is protected with password. Please, enter the password: - + Try Again - + Hedgewars - Connection error - + You reconnected too fast. Please wait a few seconds and try again. - - + + Cannot save record to file %1 - + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: - + This page requires an internet connection. @@ -550,7 +561,7 @@ HWGame - + A Fatal ERROR occured! - The game engine had to stop. We are very sorry for the inconvenience :( @@ -562,182 +573,190 @@ - + en.txt lt.txt - + Cannot open demofile %1 + HWHostPortDialog + + + Connect to server + + + + HWMapContainer - + Map type: - - Image map - - - - - Mission map - - - - - Hand-drawn - - - - Randomly generated + Image map - Random maze + Mission map + Hand-drawn + + + + + Randomly generated + + + + + Random maze + + + + Random perlin - + Random - + Map preview: - + Load map drawing - + Edit map drawing - - All - - - - - Small - - - - - Medium - - - - Large + All - Cavern + Small + Medium + + + + + Large + + + + + Cavern + + + + Wacky - - Large tunnels - - - - - Small islands - - - - - Medium islands - - - + Large tunnels + + + + + Small islands + + + + + Medium islands + + + + Large islands - + Map size: - + Maze style: - + Style: - + Mission: - + Map: - - + + Theme: %1 - + Load drawn map - + Drawn Maps - + All files - + Small tunnels - + Medium tunnels - + Seed @@ -819,7 +838,7 @@ - + Quit reason: @@ -849,6 +868,11 @@ Password: + + + New Account + + HWUploadVideoDialog @@ -874,17 +898,22 @@ HatPrompt - + + Choose a hat + + + + Search for a hat: - + Cancel - + Use selected hat @@ -900,27 +929,27 @@ LibavInteraction - + Duration: %1m %2s - + Video: %1x%2 - + %1 fps - + Audio: - + unknown @@ -1075,34 +1104,34 @@ - + Load - + Save - + Load drawn map - - + + Drawn Maps - - + + All files - + Save drawn map @@ -1629,17 +1658,17 @@ PageRoomsList - + Search for a room: - + Create room - + Join room @@ -1649,17 +1678,17 @@ - + Admin features - + Open server administration page - + %1 players online @@ -1806,37 +1835,37 @@ - + None (Default) - + Wrap (World wraps) - + Bounce (Edges reflect) - + Sea (Edges connect to sea) - + Copy - + New - + Delete @@ -1970,44 +1999,44 @@ QAction - + Info - + Kick - + Ban - + Follow - - + + Ignore - - + + Add friend - + Unignore - + Remove friend @@ -2036,6 +2065,16 @@ Show games in-progress + + + Show password protected + + + + + Show join restricted + + QCheckBox @@ -2534,21 +2573,26 @@ - % Get Away Time + Air Mines + % Get Away Time + + + + World Edge - - Script parameter - - - + Script parameter + + + + Scheme Name: @@ -2590,27 +2634,27 @@ - + Your Email - + Summary - + Send system information - + Description - + Type the security code: @@ -2643,7 +2687,7 @@ QLineEdit - + unnamed @@ -2680,92 +2724,92 @@ - - + + Cannot delete default scheme '%1'! - + Please select a record from the list - + Hedgewars - Nick not registered - + Unable to start server - + Connection to server is lost - + Not all players are ready - + Are you sure you want to start this game? Not all players are ready. - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - - + + Hedgewars - Success - + All file associations have been set - + File association failed. - + Error - + Cannot use the ammo '%1'! @@ -2833,38 +2877,38 @@ - + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? - + Schemes - Warning - + Schemes - Are you sure? - + Do you really want to delete the game scheme '%1'? @@ -2897,7 +2941,7 @@ - + File error @@ -2908,7 +2952,7 @@ - + Cannot open '%1' for reading @@ -3121,22 +3165,23 @@ RoomNamePrompt - + Enter a name for your room. - + set password - - Cancel - - - + Cancel + + + + + Create room @@ -3189,22 +3234,22 @@ - + Random Map - + Random Maze - + Random Perlin - + Hand-drawn @@ -3212,22 +3257,27 @@ SeedPrompt - + + Seed + + + + The map seed is the basis for all random values generated by the game. - - Cancel - - - + Cancel + + + + Set seed - + Close @@ -3302,17 +3352,22 @@ ThemePrompt - + + Choose a theme + + + + Search for a theme: - + Cancel - + Use selected theme @@ -3658,39 +3713,39 @@ binds (keys) - + Axis - - + + (Up) - - + + (Down) - + Hat - + (Left) - + (Right) - + Button @@ -4058,57 +4113,57 @@ server - + Restricted - - Not room master - - - - - Corrupted hedgehogs info - - - - - too many teams - - - - - too many hedgehogs - - - - There's already a team with same name in the list + Not room master - round in progress + Corrupted hedgehogs info - restricted + too many teams - REMOVE_TEAM: no such team + too many hedgehogs + There's already a team with same name in the list + + + + + round in progress + + + + + restricted + + + + + REMOVE_TEAM: no such team + + + + Not team owner! - + Less than two clans! @@ -4119,161 +4174,211 @@ - Voting closed + Your vote counted - New voting started + Voting closed - Voting expired + Pause toggled - kick + New voting started - map + Voting expired + kick + + + + + map + + + + pause - - Illegal room name - - - - - Room with such name already exists - - - - - Nickname already chosen - - - - - Illegal nickname + + new seed + + + + + number of hedgehogs in team - Protocol already known + Illegal room name - Bad number + Room with such name already exists - Nickname is already in use + /maxteams: specify number from 2 to 8 - No checker rights + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs - Authentication failed + callvote kick: specify nickname - 60 seconds cooldown after kick + callvote kick: no such user - kicked + callvote map: no such map - Reconnected too fast + callvote pause: no game in progress - Ping timeout + callvote hedgehogs: specify number from 1 to 8 - bye + Nickname already chosen - No such room + Illegal nickname - Room version incompatible to your hedgewars version + Protocol already known - Joining restricted + Bad number - Registered users only + Nickname is already in use - You are banned in this room + No checker rights - Warning! Chat flood protection activated + Authentication failed - Excess flood + 60 seconds cooldown after kick - Game messages flood detected - 1 + kicked - Game messages flood detected - 2 + Reconnected too fast - Warning! Joins flood protection activated + Ping timeout + bye + + + + + No such room + + + + + Room version incompatible to your hedgewars version + + + + + Joining restricted + + + + + Registered users only + + + + + You are banned in this room + + + + + Warning! Chat flood protection activated + + + + + Excess flood + + + + + Game messages flood detected - 1 + + + + + Warning! Joins flood protection activated + + + + There's no voting going on - + Empty config entry diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_ms.ts --- a/share/hedgewars/Data/Locale/hedgewars_ms.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ms.ts Tue Feb 09 21:11:16 2016 +0300 @@ -20,12 +20,12 @@ AmmoSchemeModel - + new - + copy of %1 @@ -39,7 +39,7 @@ - + IP @@ -74,22 +74,27 @@ - + + Ban player + + + + you know why - + Warning - + Please, specify %1 - + nickname @@ -105,37 +110,42 @@ FeedbackDialog - + We are always happy about suggestions, ideas, or bug reports. - + Send us feedback! - - If you found a bug, you can see if it's already been reported here: + + Feedback + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. - + View - + Cancel - + Send Feedback @@ -186,7 +196,7 @@ GameUIConfig - + Guest @@ -239,72 +249,73 @@ - + Cannot create directory %1 - - Usage - command-line - - - - - OPTION - command-line - - - - - CONNECTSTRING - command-line - - - - Options + Usage command-line - Display this help + OPTION command-line - Custom path for configuration data and user data + + CONNECTSTRING command-line - Custom path to the game data folder + Options command-line + Display this help + command-line + + + + + Custom path for configuration data and user data + command-line + + + + + Custom path to the game data folder + command-line + + + + Hedgewars can use a %1 (e.g. "%2") to connect on start. command-line - + Malformed option argument: %1 command-line - + Unknown option argument: %1 command-line - + Failed to open data directory: %1 @@ -323,67 +334,67 @@ HWChatWidget - + %1 has joined - + %1 has left - + %1 has left (%2) - + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded - + StyleSheet saved to %1 - + Failed to save StyleSheet to %1 @@ -392,34 +403,34 @@ HWForm - - - + + + Guest - + DefaultTeam - + %1's Team - + Game aborted - + Hedgewars - Nick registered - + This nick is registered, and you haven't specified a password. If this nick isn't yours, please register your own nick at www.hedgewars.org @@ -428,109 +439,109 @@ - + Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - + Your password wasn't saved either. - + Nickname - + Someone already uses your nickname %1 on the server. Please pick another nickname: - - + + No nickname supplied. - - + + Hedgewars - Empty nickname - + Hedgewars - Wrong password - + You entered a wrong password. - + Room password - + The room is protected with password. Please, enter the password: - + Try Again - + Hedgewars - Connection error - + You reconnected too fast. Please wait a few seconds and try again. - - + + Cannot save record to file %1 - + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: - + This page requires an internet connection. @@ -538,7 +549,7 @@ HWGame - + A Fatal ERROR occured! - The game engine had to stop. We are very sorry for the inconvenience :( @@ -550,182 +561,190 @@ - + en.txt ms.txt - + Cannot open demofile %1 + HWHostPortDialog + + + Connect to server + + + + HWMapContainer - + Map type: - - Image map - - - - - Mission map - - - - - Hand-drawn - - - - Randomly generated + Image map - Random maze + Mission map + Hand-drawn + + + + + Randomly generated + + + + + Random maze + + + + Random perlin - + Random - + Map preview: - + Load map drawing - + Edit map drawing - - All - - - - - Small - - - - - Medium - - - - Large + All - Cavern + Small + Medium + + + + + Large + + + + + Cavern + + + + Wacky - - Large tunnels - - - - - Small islands - - - - - Medium islands - - - + Large tunnels + + + + + Small islands + + + + + Medium islands + + + + Large islands - + Map size: - + Maze style: - + Style: - + Mission: - + Map: - - + + Theme: %1 - + Load drawn map - + Drawn Maps - + All files - + Small tunnels - + Medium tunnels - + Seed @@ -751,7 +770,7 @@ HWNewNet - + Quit reason: @@ -837,6 +856,11 @@ Password: + + + New Account + + HWUploadVideoDialog @@ -862,17 +886,22 @@ HatPrompt - + + Choose a hat + + + + Search for a hat: - + Cancel - + Use selected hat @@ -888,27 +917,27 @@ LibavInteraction - + Duration: %1m %2s - + Video: %1x%2 - + %1 fps - + Audio: - + unknown @@ -1063,34 +1092,34 @@ - + Load - + Save - + Load drawn map - - + + Drawn Maps - - + + All files - + Save drawn map @@ -1601,17 +1630,17 @@ PageRoomsList - + Search for a room: - + Create room - + Join room @@ -1621,17 +1650,17 @@ - + Admin features - + Open server administration page - + %1 players online @@ -1776,37 +1805,37 @@ - + None (Default) - + Wrap (World wraps) - + Bounce (Edges reflect) - + Sea (Edges connect to sea) - + Copy - + New - + Delete @@ -1953,44 +1982,44 @@ - + Info - + Kick - + Ban - + Follow - - + + Ignore - - + + Add friend - + Unignore - + Remove friend @@ -2004,6 +2033,16 @@ Show games in-progress + + + Show password protected + + + + + Show join restricted + + QCheckBox @@ -2362,27 +2401,27 @@ - + Your Email - + Summary - + Send system information - + Description - + Type the security code: @@ -2544,21 +2583,26 @@ - % Get Away Time + Air Mines + % Get Away Time + + + + World Edge - - Script parameter - - - + Script parameter + + + + Scheme Name: @@ -2611,7 +2655,7 @@ QLineEdit - + unnamed @@ -2648,82 +2692,82 @@ - - + + Cannot delete default scheme '%1'! - + Please select a record from the list - + Hedgewars - Nick not registered - + Unable to start server - + Connection to server is lost - + Not all players are ready - + Are you sure you want to start this game? Not all players are ready. - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - - + + Hedgewars - Success - + All file associations have been set - + File association failed. @@ -2791,38 +2835,38 @@ - + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? - + Schemes - Warning - + Schemes - Are you sure? - + Do you really want to delete the game scheme '%1'? @@ -2853,7 +2897,7 @@ - + File error @@ -2864,17 +2908,17 @@ - + Cannot open '%1' for reading - + Error - + Cannot use the ammo '%1'! @@ -3087,22 +3131,23 @@ RoomNamePrompt - + Enter a name for your room. - + set password - - Cancel - - - + Cancel + + + + + Create room @@ -3155,22 +3200,22 @@ - + Random Map - + Random Maze - + Random Perlin - + Hand-drawn @@ -3178,22 +3223,27 @@ SeedPrompt - + + Seed + + + + The map seed is the basis for all random values generated by the game. - - Cancel - - - + Cancel + + + + Set seed - + Close @@ -3268,17 +3318,22 @@ ThemePrompt - + + Choose a theme + + + + Search for a theme: - + Cancel - + Use selected theme @@ -3984,39 +4039,39 @@ - + Axis - - + + (Up) - - + + (Down) - + Hat - + (Left) - + (Right) - + Button @@ -4024,57 +4079,57 @@ server - + Restricted - - Not room master - - - - - Corrupted hedgehogs info - - - - - too many teams - - - - - too many hedgehogs - - - - There's already a team with same name in the list + Not room master - round in progress + Corrupted hedgehogs info - restricted + too many teams - REMOVE_TEAM: no such team + too many hedgehogs + There's already a team with same name in the list + + + + + round in progress + + + + + restricted + + + + + REMOVE_TEAM: no such team + + + + Not team owner! - + Less than two clans! @@ -4085,161 +4140,211 @@ - Voting closed + Your vote counted - New voting started + Voting closed - Voting expired + Pause toggled - kick + New voting started - map + Voting expired + kick + + + + + map + + + + pause - - Illegal room name - - - - - Room with such name already exists - - - - - Nickname already chosen - - - - - Illegal nickname + + new seed + + + + + number of hedgehogs in team - Protocol already known + Illegal room name - Bad number + Room with such name already exists - Nickname is already in use + /maxteams: specify number from 2 to 8 - No checker rights + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs - Authentication failed + callvote kick: specify nickname - 60 seconds cooldown after kick + callvote kick: no such user - kicked + callvote map: no such map - Reconnected too fast + callvote pause: no game in progress - Ping timeout + callvote hedgehogs: specify number from 1 to 8 - bye + Nickname already chosen - No such room + Illegal nickname - Room version incompatible to your hedgewars version + Protocol already known - Joining restricted + Bad number - Registered users only + Nickname is already in use - You are banned in this room + No checker rights - Warning! Chat flood protection activated + Authentication failed - Excess flood + 60 seconds cooldown after kick - Game messages flood detected - 1 + kicked - Game messages flood detected - 2 + Reconnected too fast - Warning! Joins flood protection activated + Ping timeout + bye + + + + + No such room + + + + + Room version incompatible to your hedgewars version + + + + + Joining restricted + + + + + Registered users only + + + + + You are banned in this room + + + + + Warning! Chat flood protection activated + + + + + Excess flood + + + + + Game messages flood detected - 1 + + + + + Warning! Joins flood protection activated + + + + There's no voting going on - + Empty config entry diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_nl.ts --- a/share/hedgewars/Data/Locale/hedgewars_nl.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_nl.ts Tue Feb 09 21:11:16 2016 +0300 @@ -76,6 +76,10 @@ permanent + + Ban player + + DataManager @@ -114,6 +118,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -463,6 +471,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -684,6 +699,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -717,6 +736,10 @@ Search for a hat: + + Choose a hat + + KeyBinder @@ -1643,6 +1666,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2125,6 +2156,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2584,6 +2619,10 @@ Close + + Seed + + SelWeaponWidget @@ -2654,6 +2693,10 @@ Use selected theme + + Choose a theme + + binds @@ -3410,10 +3453,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3421,5 +3460,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_pl.ts --- a/share/hedgewars/Data/Locale/hedgewars_pl.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent dożywotni + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. E-mail jest opcjonalny chyba, że chcesz byśmy się z tobą skontaktowali. + + Feedback + Twoja opinia + FreqSpinBox @@ -490,6 +498,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -718,6 +733,10 @@ Password: Hasło: + + New Account + + HWUploadVideoDialog @@ -751,6 +770,10 @@ Search for a hat: Szukaj czapki: + + Choose a hat + + KB @@ -1757,6 +1780,14 @@ Show games in-progress Pokaż trwające gry + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2265,6 +2296,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2765,6 +2800,10 @@ Close Zamknij + + Seed + Ziarno + SelWeaponWidget @@ -2847,6 +2886,10 @@ Use selected theme Użyj wybranego motywu + + Choose a theme + + binds @@ -3611,10 +3654,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3622,5 +3661,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_pt_BR.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent permanente + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. Seu endereço de e-mail é opcional, mas é necessário se quiser que lhe dermos um retorno. + + Feedback + Retorno + FreqSpinBox @@ -480,6 +488,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -709,6 +724,10 @@ Password: Senha: + + New Account + + HWUploadVideoDialog @@ -742,6 +761,10 @@ Search for a hat: Buscar por um chapéu: + + Choose a hat + + KB @@ -1738,6 +1761,14 @@ Show games in-progress Mostrar jogos em andamento + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2242,6 +2273,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2715,6 +2750,10 @@ Close Fechar + + Seed + Semear + SelWeaponWidget @@ -2797,6 +2836,10 @@ Use selected theme Usar o tema selecionado + + Choose a theme + + binds @@ -3563,10 +3606,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3574,5 +3613,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_pt_PT.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent permanente + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. O teu e-mail é opcional, mas necessário se quiseres que te contactemos de volta. + + Feedback + Feedback + FreqSpinBox @@ -484,6 +492,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -716,6 +731,10 @@ Password: Password: + + New Account + + HWUploadVideoDialog @@ -749,6 +768,10 @@ Search for a hat: Procurar: + + Choose a hat + + KB @@ -1722,6 +1745,14 @@ Show games in-progress Mostrar jogos em progresso + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2214,6 +2245,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2719,6 +2754,10 @@ Close Fechar + + Seed + Semente + SelWeaponWidget @@ -2801,6 +2840,10 @@ Use selected theme Utilizar o tema selecionado + + Choose a theme + + binds @@ -3565,10 +3608,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3576,5 +3615,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_ro.ts --- a/share/hedgewars/Data/Locale/hedgewars_ro.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ro.ts Tue Feb 09 21:11:16 2016 +0300 @@ -76,6 +76,10 @@ permanent + + Ban player + + DataManager @@ -114,6 +118,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -469,6 +477,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -694,6 +709,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -727,6 +746,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1690,6 +1713,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2176,6 +2207,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2645,6 +2680,10 @@ Close + + Seed + + SelWeaponWidget @@ -2715,6 +2754,10 @@ Use selected theme + + Choose a theme + + binds @@ -3479,10 +3522,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3490,5 +3529,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_ru.ts --- a/share/hedgewars/Data/Locale/hedgewars_ru.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent постоянный + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. Адрес e-mail необязателен, но необходим, если вы хотите получить ответ. + + Feedback + Отзыв + FreqSpinBox @@ -489,6 +497,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -717,6 +732,10 @@ Password: Пароль: + + New Account + + HWUploadVideoDialog @@ -750,6 +769,10 @@ Search for a hat: Поиск по шляпам: + + Choose a hat + + KB @@ -1073,6 +1096,8 @@ (%1 %2) + + @@ -1754,6 +1779,14 @@ Show games in-progress Показывать текущие игры + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2262,6 +2295,10 @@ Script parameter Параметр скрипта + + Air Mines + + QLineEdit @@ -2427,6 +2464,8 @@ Do you really want to remove %1 file(s)? + + @@ -2730,6 +2769,10 @@ Close Закрыть + + Seed + Зерно + SelWeaponWidget @@ -2811,6 +2854,10 @@ Use selected theme Использовать выбранную тему + + Choose a theme + + binds @@ -3575,10 +3622,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3586,5 +3629,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_sk.ts --- a/share/hedgewars/Data/Locale/hedgewars_sk.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -480,6 +488,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -705,6 +720,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -738,6 +757,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1730,6 +1753,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2236,6 +2267,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2731,6 +2766,10 @@ Close + + Seed + Zrno + SelWeaponWidget @@ -2805,6 +2844,10 @@ Use selected theme + + Choose a theme + + binds @@ -3569,10 +3612,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3580,5 +3619,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_sv.ts --- a/share/hedgewars/Data/Locale/hedgewars_sv.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_sv.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + + FreqSpinBox @@ -471,6 +479,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -696,6 +711,10 @@ Password: + + New Account + + HWUploadVideoDialog @@ -729,6 +748,10 @@ Search for a hat: + + Choose a hat + + KB @@ -1698,6 +1721,14 @@ Show games in-progress + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2200,6 +2231,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2668,6 +2703,10 @@ Close + + Seed + Frö + SelWeaponWidget @@ -2742,6 +2781,10 @@ Use selected theme + + Choose a theme + + binds @@ -3506,10 +3549,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3517,5 +3556,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_tr_TR.ts --- a/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent kalıcı + + Ban player + + DataManager @@ -130,6 +134,10 @@ Your email address is optional, but necessary if you want us to get back at you. + + Feedback + Geri Bildirim + FreqSpinBox @@ -489,6 +497,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -721,6 +736,10 @@ Password: Parola: + + New Account + + HWUploadVideoDialog @@ -754,6 +773,10 @@ Search for a hat: Şapka ara: + + Choose a hat + + KB @@ -1733,6 +1756,14 @@ Show games in-progress Süren oyunları göster + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2229,6 +2260,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2731,6 +2766,10 @@ Close Kapat + + Seed + Besleme + SelWeaponWidget @@ -2813,6 +2852,10 @@ Use selected theme Seçili temayı kullan + + Choose a theme + + binds @@ -3577,10 +3620,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3588,5 +3627,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_uk.ts --- a/share/hedgewars/Data/Locale/hedgewars_uk.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_uk.ts Tue Feb 09 21:11:16 2016 +0300 @@ -80,6 +80,10 @@ permanent постійний + + Ban player + + DataManager @@ -118,6 +122,10 @@ Your email address is optional, but necessary if you want us to get back at you. Ваша електронна адреса не є обов'язковою, але потрібною, якщо ви хочете, щоб ми з вами зв'язались. + + Feedback + Відгук + FreqSpinBox @@ -491,6 +499,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -719,6 +734,10 @@ Password: Пароль: + + New Account + + HWUploadVideoDialog @@ -752,6 +771,10 @@ Search for a hat: Шукати капелюх: + + Choose a hat + + KB @@ -1731,6 +1754,14 @@ Show games in-progress Показувати триваючі ігри + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2235,6 +2266,10 @@ Script parameter + + Air Mines + + QLineEdit @@ -2707,6 +2742,10 @@ Close Закрити + + Seed + Висів + SelWeaponWidget @@ -2782,6 +2821,10 @@ Use selected theme Використати вибрану тему + + Choose a theme + + binds @@ -3546,10 +3589,6 @@ - Game messages flood detected - 2 - - - Warning! Joins flood protection activated @@ -3557,5 +3596,49 @@ There's no voting going on + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_zh_CN.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Tue Feb 09 21:11:16 2016 +0300 @@ -20,12 +20,12 @@ AmmoSchemeModel - + new - + copy of %1 @@ -39,7 +39,7 @@ - + IP IP @@ -74,22 +74,27 @@ 取消 - + + Ban player + + + + you know why - + Warning - + Please, specify %1 - + nickname @@ -105,37 +110,42 @@ FeedbackDialog - + We are always happy about suggestions, ideas, or bug reports. - + Send us feedback! - - If you found a bug, you can see if it's already been reported here: + + Feedback + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. - + View - + Cancel 取消 - + Send Feedback @@ -186,7 +196,7 @@ GameUIConfig - + Guest @@ -239,72 +249,73 @@ - + Cannot create directory %1 - - Usage - command-line - - - - - OPTION - command-line - - - - - CONNECTSTRING - command-line - - - - Options + Usage command-line - Display this help + OPTION command-line - Custom path for configuration data and user data + + CONNECTSTRING command-line - Custom path to the game data folder + Options command-line + Display this help + command-line + + + + + Custom path for configuration data and user data + command-line + + + + + Custom path to the game data folder + command-line + + + + Hedgewars can use a %1 (e.g. "%2") to connect on start. command-line - + Malformed option argument: %1 command-line - + Unknown option argument: %1 command-line - + Failed to open data directory: %1 @@ -323,67 +334,67 @@ HWChatWidget - + %1 has joined - + %1 has left - + %1 has left (%2) - + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded - + StyleSheet saved to %1 - + Failed to save StyleSheet to %1 @@ -392,34 +403,34 @@ HWForm - - - + + + Guest - + DefaultTeam - + %1's Team - + Game aborted - + Hedgewars - Nick registered - + This nick is registered, and you haven't specified a password. If this nick isn't yours, please register your own nick at www.hedgewars.org @@ -428,109 +439,109 @@ - + Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - + Your password wasn't saved either. - + Nickname - + Someone already uses your nickname %1 on the server. Please pick another nickname: - - + + No nickname supplied. - - + + Hedgewars - Empty nickname - + Hedgewars - Wrong password - + You entered a wrong password. - + Room password - + The room is protected with password. Please, enter the password: - + Try Again - + Hedgewars - Connection error - + You reconnected too fast. Please wait a few seconds and try again. - + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: - + This page requires an internet connection. - - + + Cannot save record to file %1 无法录入文件 %1 @@ -538,7 +549,7 @@ HWGame - + A Fatal ERROR occured! - The game engine had to stop. We are very sorry for the inconvenience :( @@ -550,182 +561,190 @@ - + en.txt zh_CN.txt - + Cannot open demofile %1 DEMO %1 打不开 + HWHostPortDialog + + + Connect to server + + + + HWMapContainer - + Small tunnels - + Medium tunnels - + Seed - - Map type: - - - - Image map - - - - - Mission map - - - - - Hand-drawn + Map type: - Randomly generated + Image map - Random maze + Mission map + Hand-drawn + + + + + Randomly generated + + + + + Random maze + + + + Random perlin - + Random - + Map preview: - + Load map drawing - + Edit map drawing - - All - 全部 - - - - Small - 小型 - - - - Medium - 中型 - - - Large - 大型 + All + 全部 - Cavern - 洞穴 + Small + 小型 + Medium + 中型 + + + + Large + 大型 + + + + Cavern + 洞穴 + + + Wacky 曲折 - - Large tunnels - - - - - Small islands - - - - - Medium islands - - - + Large tunnels + + + + + Small islands + + + + + Medium islands + + + + Large islands - + Map size: - + Maze style: - + Style: - + Mission: - + Map: - - + + Theme: %1 - + Load drawn map - + Drawn Maps - + All files @@ -797,7 +816,7 @@ - + Quit reason: 退出原因: @@ -837,6 +856,11 @@ Password: + + + New Account + + HWUploadVideoDialog @@ -862,17 +886,22 @@ HatPrompt - + + Choose a hat + + + + Search for a hat: - + Cancel 取消 - + Use selected hat @@ -895,27 +924,27 @@ LibavInteraction - + Duration: %1m %2s - + Video: %1x%2 - + %1 fps - + Audio: - + unknown @@ -1070,34 +1099,34 @@ - + Load 读取 - + Save 保存 - + Load drawn map - - + + Drawn Maps - - + + All files - + Save drawn map @@ -1612,17 +1641,17 @@ PageRoomsList - + Search for a room: - + Create room - + Join room @@ -1632,7 +1661,7 @@ - + Open server administration page @@ -1645,14 +1674,14 @@ 加入 - + %1 players online - + Admin features 管理员功能 @@ -1795,37 +1824,37 @@ - + None (Default) - + Wrap (World wraps) - + Bounce (Edges reflect) - + Sea (Edges connect to sea) - + Copy - + New 新游戏 - + Delete 删除 @@ -1957,7 +1986,7 @@ QAction - + Kick @@ -1981,39 +2010,39 @@ - + Info 信息 - + Ban 屏蔽 - + Follow - - + + Ignore - - + + Add friend - + Unignore - + Remove friend @@ -2027,6 +2056,16 @@ Show games in-progress + + + Show password protected + + + + + Show join restricted + + QCheckBox @@ -2478,21 +2517,26 @@ - % Get Away Time + Air Mines + % Get Away Time + + + + World Edge - - Script parameter - - - + Script parameter + + + + Scheme Name: 设置名称: @@ -2564,27 +2608,27 @@ - + Your Email - + Summary - + Send system information - + Description - + Type the security code: @@ -2638,7 +2682,7 @@ QLineEdit - + unnamed 无名 @@ -2665,12 +2709,12 @@ QMessageBox - + Error 错误 - + Cannot use the ammo '%1'! @@ -2685,82 +2729,82 @@ - - + + Cannot delete default scheme '%1'! - + Please select a record from the list - + Hedgewars - Nick not registered - + Unable to start server - + Connection to server is lost 服务器连接丢失 - + Not all players are ready - + Are you sure you want to start this game? Not all players are ready. - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - - + + Hedgewars - Success - + All file associations have been set - + File association failed. @@ -2828,38 +2872,38 @@ - + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? - + Schemes - Warning - + Schemes - Are you sure? - + Do you really want to delete the game scheme '%1'? @@ -2890,7 +2934,7 @@ - + File error @@ -2901,7 +2945,7 @@ - + Cannot open '%1' for reading @@ -3114,22 +3158,23 @@ RoomNamePrompt - + Enter a name for your room. - + set password - - Cancel - 取消 - - + Cancel + 取消 + + + + Create room @@ -3182,22 +3227,22 @@ 武器 - + Random Map - + Random Maze - + Random Perlin - + Hand-drawn @@ -3205,22 +3250,27 @@ SeedPrompt - + + Seed + + + + The map seed is the basis for all random values generated by the game. - - Cancel - 取消 - - + Cancel + 取消 + + + Set seed - + Close @@ -3295,17 +3345,22 @@ ThemePrompt - + + Choose a theme + + + + Search for a theme: - + Cancel 取消 - + Use selected theme @@ -4015,39 +4070,39 @@ - + Axis - - + + (Up) - - + + (Down) - + Hat - + (Left) - + (Right) - + Button @@ -4055,57 +4110,57 @@ server - + Restricted - - Not room master - - - - - Corrupted hedgehogs info - - - - - too many teams - - - - - too many hedgehogs - - - - There's already a team with same name in the list + Not room master - round in progress + Corrupted hedgehogs info - restricted + too many teams - REMOVE_TEAM: no such team + too many hedgehogs + There's already a team with same name in the list + + + + + round in progress + + + + + restricted + + + + + REMOVE_TEAM: no such team + + + + Not team owner! - + Less than two clans! @@ -4116,161 +4171,211 @@ - Voting closed + Your vote counted - New voting started + Voting closed - Voting expired + Pause toggled - kick + New voting started - map + Voting expired + kick + + + + + map + + + + pause 暂停 - - Illegal room name - - - - - Room with such name already exists - - - - - Nickname already chosen - - - - - Illegal nickname + + new seed + + + + + number of hedgehogs in team - Protocol already known + Illegal room name - Bad number + Room with such name already exists - Nickname is already in use + /maxteams: specify number from 2 to 8 - No checker rights + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs - Authentication failed + callvote kick: specify nickname - 60 seconds cooldown after kick + callvote kick: no such user - kicked + callvote map: no such map - Reconnected too fast + callvote pause: no game in progress - Ping timeout + callvote hedgehogs: specify number from 1 to 8 - bye + Nickname already chosen - No such room + Illegal nickname - Room version incompatible to your hedgewars version + Protocol already known - Joining restricted + Bad number - Registered users only + Nickname is already in use - You are banned in this room + No checker rights - Warning! Chat flood protection activated + Authentication failed - Excess flood + 60 seconds cooldown after kick - Game messages flood detected - 1 + kicked - Game messages flood detected - 2 + Reconnected too fast - Warning! Joins flood protection activated + Ping timeout + bye + + + + + No such room + + + + + Room version incompatible to your hedgewars version + + + + + Joining restricted + + + + + Registered users only + + + + + You are banned in this room + + + + + Warning! Chat flood protection activated + + + + + Excess flood + + + + + Game messages flood detected - 1 + + + + + Warning! Joins flood protection activated + + + + There's no voting going on - + Empty config entry diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Locale/hedgewars_zh_TW.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Tue Feb 09 21:11:16 2016 +0300 @@ -76,6 +76,10 @@ permanent 永久 + + Ban player + + DataManager @@ -114,6 +118,10 @@ Your email address is optional, but necessary if you want us to get back at you. 如果希望我們回覆你, 請留下你的電子郵件地址。 + + Feedback + 信息反饋 + FreqSpinBox @@ -469,6 +477,13 @@ + HWHostPortDialog + + Connect to server + + + + HWMapContainer All @@ -697,6 +712,10 @@ Password: 密碼: + + New Account + + HWUploadVideoDialog @@ -730,6 +749,10 @@ Search for a hat: 搜索一頂帽子: + + Choose a hat + + KB @@ -1677,6 +1700,14 @@ Show games in-progress 顯示正在進行的遊戲 + + Show password protected + + + + Show join restricted + + QCheckBox @@ -2165,6 +2196,10 @@ Script parameter 腳本參數 + + Air Mines + + QLineEdit @@ -2633,6 +2668,10 @@ Close 關閉 + + Seed + 種子 + SelWeaponWidget @@ -2709,6 +2748,10 @@ Use selected theme 使用選定的主題 + + Choose a theme + + binds @@ -3474,7 +3517,7 @@ Game messages flood detected - 2 - 已經偵測到遊戲訊息氾濫 - 2 + 已經偵測到遊戲訊息氾濫 - 2 Warning! Joins flood protection activated @@ -3484,5 +3527,49 @@ There's no voting going on 沒有正在進行的投票 + + Your vote counted + + + + Pause toggled + + + + new seed + + + + number of hedgehogs in team + + + + /maxteams: specify number from 2 to 8 + + + + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + + + + callvote kick: specify nickname + + + + callvote kick: no such user + + + + callvote map: no such map + + + + callvote pause: no game in progress + + + + callvote hedgehogs: specify number from 1 to 8 + + diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua Tue Feb 09 21:11:16 2016 +0300 @@ -184,7 +184,8 @@ ------------- other functions --------------- function isHeroNextToRunner() - if GetHealth(hero.gear) and math.abs(GetX(hero.gear) - GetX(runner.gear)) < 75 and + if GetGearType(hero.gear) == gtHedgehog and GetGearType(runner.gear) == gtHedgehog and + math.abs(GetX(hero.gear) - GetX(runner.gear)) < 75 and math.abs(GetY(hero.gear) - GetY(runner.gear)) < 75 and StoppedGear(hero.gear) then return true end diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Missions/Training/Basic_Training_-_Sniper_Rifle.lua --- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Sniper_Rifle.lua Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Sniper_Rifle.lua Tue Feb 09 21:11:16 2016 +0300 @@ -36,6 +36,9 @@ local target = nil local last_hit_time = 0 + +local cinematic = false + -- This is a custom function to make it easier to -- spawn more targets with just one line of code -- You may define as many custom functions as you @@ -48,6 +51,10 @@ end function blowUp(x, y) + if cinematic == false then + cinematic = true + SetCinematicMode(true) + end -- adds some TNT gear = AddGear(x, y, gtDynamite, 0, 0, 0, 0) end @@ -178,13 +185,20 @@ -- This function is called before a gear is destroyed. -- We use it to count the number of targets destroyed. function onGearDelete(gear) + local gt = GetGearType(gear) - if GetGearType(gear) == gtCase then + if gt == gtCase then game_lost = true return end - if (GetGearType(gear) == gtTarget) then + if (gt == gtDynamite) and cinematic then + cinematic = false + SetCinematicMode(false) + return + end + + if gt == gtTarget then -- remember when the target was hit for adjusting the camera last_hit_time = TurnTimeLeft -- Add one point to our score/counter diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Missions/Training/User_Mission_-_That_Sinking_Feeling.lua --- a/share/hedgewars/Data/Missions/Training/User_Mission_-_That_Sinking_Feeling.lua Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_That_Sinking_Feeling.lua Tue Feb 09 21:11:16 2016 +0300 @@ -12,6 +12,7 @@ local waterPix = 0 local frig = 0 local watGear = nil +local cinematic = false -- allow skipping of the intro via hitting precise key function onPrecise() @@ -68,6 +69,8 @@ function onGameStart() + cinematic = true + SetCinematicMode(true) SendHealthStatsOff() ShowMission(loc("That Sinking Feeling"), loc("Challenge"), loc("Save as many hapless hogs as possible!"), 4, 1) @@ -207,6 +210,11 @@ -- start the water rising when the intro is finished if introStage == 110 then + if cinematic then + SetCinematicMode(false) + cinematic = false + end + waterCounter = waterCounter + 1 if (waterCounter == 100) and (waterPix < 1615) then waterCounter = 0 diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua Tue Feb 09 21:11:16 2016 +0300 @@ -727,7 +727,7 @@ --============================================================================ --for custom made continent, follows the same standards as the globalism one. You can make your continent with ~~. Take the weapons generated from globalism, if you want a GUI :P ---weapons=, ammo = ascii[116(1 ammo) to 125(inf ammo)] types = ascii[36(Grenade), 37(Clusterbomb) to 90(knife)] see https://code.google.com/p/hedgewars/wiki/AmmoTypes +--weapons=, ammo = ascii[116(1 ammo) to 125(inf ammo)] types = ascii[36(Grenade), 37(Clusterbomb) to 90(knife)] see http://hedgewars.org/kb/AmmoTypes --ex "Own continent~this continent rocks!~tZ}$" will get 1 knife and inf grenades function onParameters() diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua Tue Feb 09 21:11:16 2016 +0300 @@ -242,6 +242,8 @@ EnableGameFlags(gfInfAttack, gfRandomOrder, gfPerHogAmmo) DisableGameFlags(gfResetWeps, gfSharedAmmo) HealthCaseProb = 100 + Goals = loc("Highlander: Eliminate enemy hogs and take their weapons.") .."|" .. + loc("Weapons are reset on end of turn.") end function onGameStart() @@ -271,16 +273,6 @@ --WriteLnToConsole('utiltot:'..utiltot..' atktot:'..atktot) - ShowMission ( - loc("HIGHLANDER"), - loc("Not all hogs are born equal."), - - "- " .. loc("Eliminate enemy hogs and take their weapons.") .. "|" .. - "- " .. loc("Per-Hog Ammo") .. "|" .. - "- " .. loc("Weapons reset.") .. "|" .. - "- " .. loc("Unlimited Attacks") .. "|" .. - "", 4, 4000 - ) runOnGears(StartingSetUp) runOnGears(ConvertValues) diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua Tue Feb 09 21:11:16 2016 +0300 @@ -4,14 +4,26 @@ -- Overall padding for roping freedom local Padding = 430 +local TeamRope = false function onParameters() parseParams() if params["pad"] ~= nil then Padding = params["pad"] end + if params["teamrope"] ~= nil then + TeamRope = true + end end +function onGearAdd(gear) + if GetGearType(gear) == gtRope and TeamRope then + SetTag(gear,1) + SetGearValues(gear,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,GetClanColor(GetHogClan(CurrentHedgehog))) + end +end + + -- This could probably use less points and more precision -- 700x700 for object space function DrawStar(x, y, d, f) diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Scripts/OfficialChallenges.lua --- a/share/hedgewars/Data/Scripts/OfficialChallenges.lua Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Scripts/OfficialChallenges.lua Tue Feb 09 21:11:16 2016 +0300 @@ -26,6 +26,10 @@ return("Racer Challenge #14") elseif LandDigest == "M-528106034Scripts/Multiplayer/Racer.lua" then return("Racer Challenge #16") + elseif LandDigest == "M-534640804Scripts/Multiplayer/Racer.lua" then + return("Racer Challenge #18") + elseif LandDigest == "M-1839546856Scripts/Multiplayer/Racer.lua" then + return("Racer Challenge #19") end -- challenges without border elseif LandDigest == "M-134869715Scripts/Multiplayer/Racer.lua" then diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/British/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/British/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/British/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/Classic/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Classic/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/Classic/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/Default/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Default/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/Default/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/Default_es/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Default_es/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/Default_es/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/Default_ru/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Default_ru/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/Default_ru/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/Default_uk/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Default_uk/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/Default_uk/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/HillBilly/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/HillBilly/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/HillBilly/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/Mobster/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Mobster/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/Mobster/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/Pirate/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Pirate/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/Pirate/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/Robot/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Robot/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/Robot/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/Russian/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Russian/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/Russian/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/Singer/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Singer/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/Singer/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Sounds/voices/Surfer/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Surfer/CMakeLists.txt Fri Jan 01 19:15:32 2016 +0300 +++ b/share/hedgewars/Data/Sounds/voices/Surfer/CMakeLists.txt Tue Feb 09 21:11:16 2016 +0300 @@ -12,7 +12,7 @@ Illgetyou.ogg Incoming.ogg Jump*.ogg -JustYouwait.ogg +Justyouwait.ogg Kamikaze.ogg Laugh.ogg Melon.ogg diff -r caa1e84c3ac2 -r b69f5f22a3ba share/hedgewars/Data/Themes/Castle/LandBackTex.png diff -r caa1e84c3ac2 -r b69f5f22a3ba tools/docgen.sh --- a/tools/docgen.sh Fri Jan 01 19:15:32 2016 +0300 +++ b/tools/docgen.sh Tue Feb 09 21:11:16 2016 +0300 @@ -25,13 +25,7 @@ branch=$(hg identify -b) rev=$(hg identify -rdefault -i) -#branchurl="${branch}" -#revurl="${rev}" - -branchurl="$branch" -revurl="$rev" - -export PROJECT_NUMBER="${branchurl} branch, ${revurl}" +export PROJECT_NUMBER="${branch} branch, ${rev}" export OUTPUT_DIRECTORY fi diff -r caa1e84c3ac2 -r b69f5f22a3ba tools/rgit2hg.sh --- a/tools/rgit2hg.sh Fri Jan 01 19:15:32 2016 +0300 +++ b/tools/rgit2hg.sh Tue Feb 09 21:11:16 2016 +0300 @@ -26,7 +26,7 @@ echo "Checking $url ..." echo page=$(wget -q -O- "$url") - author=$(echo "$page" | sed -rn 's/^.*"author-name">(<[^>]*>)*([^ <]*).*/\2/ p') + author=$(echo "$page" | sed -rn '1,/"user-mention"/{s/^.*"user-mention"( *[^>]*)?> *([^ <]*).*$/\2/ p}') if [ -z "$author" ]; then echo 'Couldn'\''t find author! Skipping '"$1"' ...' >&2 shift @@ -45,13 +45,18 @@ echo result=$(hg log -R "$HW_HG" -u "$author" -d "$date" -v -l1) if [ -z "$result" ]; then + echo 'No match with this author'\''s name. It might differ, so let'\''s try using date only ...' + echo + result=$(hg log -R "$HW_HG" -d "$date" -v) + fi + if [ -z "$result" ]; then echo 'No match :(' shift continue fi rev=$(echo "$result" | sed 's/^.*://;q') echo 'Found match: r'"$rev" - echo 'Link: https://code.google.com/p/hedgewars/source/detail?r='"$rev" + echo 'Link: http://hg.hedgewars.org/hedgewars/rev/'"$rev" echo echo "$result" # proceed to next parameter