Changeset 70


Ignore:
Timestamp:
Jan 11, 2023, 1:15:24 AM (23 months ago)
Author:
chronos
Message:
  • Modified: Play sounds directly with play commands on Linux.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Languages/Tunneler.cs.po

    r69 r70  
    284284msgid "%0:s of %1:s"
    285285msgstr "%0:s z %1:s"
     286
     287#: usound.splaynotsupported
     288#, object-pascal-format
     289msgid "The play command %s does not work on your system"
     290msgstr ""
     291
     292#: usound.sunabletoplay
     293msgid "Unable to play "
     294msgstr ""
     295
  • trunk/Languages/Tunneler.pot

    r69 r70  
    247247msgstr ""
    248248
     249#: usound.splaynotsupported
     250#, object-pascal-format
     251msgid "The play command %s does not work on your system"
     252msgstr ""
     253
     254#: usound.sunabletoplay
     255msgid "Unable to play "
     256msgstr ""
     257
  • trunk/UEngine.pas

    r69 r70  
    77  IntfGraphics, FPImage, LCLType, SpecializedBitmap, GraphType, Math, URectangle,
    88  Syncobjs, UThreading, Forms, DateUtils, UAudioSystem, Generics.Collections,
    9   UWorld, UMatter;
     9  UWorld, UMatter, USound;
    1010
    1111const
     
    243243    CurrentRound: Integer;
    244244    MaxRound: Integer;
    245     AudioShot: TMediaPlayer;
    246     AudioExplode: TMediaPlayer;
     245    AudioShot: TSound;
     246    AudioExplode: TSound;
    247247    DrawDuration: TDatetime;
    248248    constructor Create(AOwner: TComponent); override;
     
    645645    Engine.Redraw;
    646646  end;
    647   if Shield <= 0 then begin
     647  if (Shield <= 0) and not Exploded then begin
    648648    Shield := 0;
    649649    Explosion(Position, ExplosionRange);
     
    18171817  World := TWorld.Create;
    18181818  //DefaultAudioSystem := TAudioSystemMPlayer.Create(nil);
    1819   AudioShot := TMediaPlayer.Create(nil);
    1820   AudioShot.FileName := 'Audio/GE_KF7_Soviet.wav';
    1821   AudioShot.Open;
    1822   AudioExplode := TMediaPlayer.Create(nil);
    1823   AudioExplode.FileName := 'Audio/bomb.wav';
    1824   AudioExplode.Open;
     1819  AudioShot := TSound.Create(nil);
     1820  AudioShot.FileName := GetCurrentDir + '/Audio/GE_KF7_Soviet.wav';
     1821  AudioExplode := TSound.Create(nil);
     1822  AudioExplode.FileName := GetCurrentDir + '/Audio/bomb.wav';
    18251823  InitPlayerPool;
    18261824  DigMasks := TObjectList<TMatrixByte>.Create;
  • trunk/tunneler.lpi

    r63 r70  
    101101      </Item5>
    102102    </RequiredPackages>
    103     <Units Count="13">
     103    <Units Count="15">
    104104      <Unit0>
    105105        <Filename Value="tunneler.lpr"/>
     
    172172        <IsPartOfProject Value="True"/>
    173173      </Unit12>
     174      <Unit13>
     175        <Filename Value="USound.pas"/>
     176        <IsPartOfProject Value="True"/>
     177      </Unit13>
     178      <Unit14>
     179        <Filename Value="AsyncProcess2.pas"/>
     180        <IsPartOfProject Value="True"/>
     181      </Unit14>
    174182    </Units>
    175183  </ProjectOptions>
  • trunk/tunneler.lpr

    r61 r70  
    99  Interfaces, // this includes the LCL widgetset
    1010  Forms, TemplateGenerics, UPlatform, FileUtil, SysUtils, Common, UFormNewGame,
    11   UFormMain, UFormMap, UFormGameResult, UCore, UWorld, UMatter, UFastPixel
     11  UFormMain, UFormMap, UFormGameResult, UCore, UWorld, UMatter, UFastPixel,
     12  USound, AsyncProcess2
    1213  { you can add units after this };
    1314
Note: See TracChangeset for help on using the changeset viewer.