diff --git a/OpenRA.Game/Graphics/Video.cs b/OpenRA.Game/Graphics/Video.cs new file mode 100644 index 0000000000..ac9b847d6a --- /dev/null +++ b/OpenRA.Game/Graphics/Video.cs @@ -0,0 +1,37 @@ +#region Copyright & License Information +/* + * Copyright 2007-2020 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. For more + * information, see COPYING. + */ +#endregion + +using System; +using OpenRA.FileSystem; +using OpenRA.Primitives; + +namespace OpenRA.Video +{ + public interface IVideo + { + ushort Frames { get; } + byte Framerate { get; } + ushort Width { get; } + ushort Height { get; } + uint[,] FrameData { get; } + + int CurrentFrame { get; } + void AdvanceFrame(); + + bool HasAudio { get; } + byte[] AudioData { get; } + int AudioChannels { get; } + int SampleBits { get; } + int SampleRate { get; } + + void Reset(); + } +} diff --git a/OpenRA.Game/Graphics/VideoLoader.cs b/OpenRA.Game/Graphics/VideoLoader.cs new file mode 100644 index 0000000000..d40ebf92fc --- /dev/null +++ b/OpenRA.Game/Graphics/VideoLoader.cs @@ -0,0 +1,32 @@ +#region Copyright & License Information +/* + * Copyright 2007-2020 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. For more + * information, see COPYING. + */ +#endregion + +using System.IO; + +namespace OpenRA.Video +{ + public interface IVideoLoader + { + bool TryParseVideo(Stream s, out IVideo video); + } + + public static class VideoLoader + { + public static IVideo GetVideo(Stream stream, IVideoLoader[] loaders) + { + foreach (var loader in loaders) + if (loader.TryParseVideo(stream, out var video)) + return video; + + return null; + } + } +} diff --git a/OpenRA.Game/Manifest.cs b/OpenRA.Game/Manifest.cs index e70538763d..97ab264891 100644 --- a/OpenRA.Game/Manifest.cs +++ b/OpenRA.Game/Manifest.cs @@ -70,13 +70,14 @@ namespace OpenRA public readonly string[] SoundFormats = { }; public readonly string[] SpriteFormats = { }; public readonly string[] PackageFormats = { }; + public readonly string[] VideoFormats = { }; readonly string[] reservedModuleNames = { "Include", "Metadata", "Folders", "MapFolders", "Packages", "Rules", "Sequences", "ModelSequences", "Cursors", "Chrome", "Assemblies", "ChromeLayout", "Weapons", "Voices", "Notifications", "Music", "Translations", "TileSets", "ChromeMetrics", "Missions", "Hotkeys", - "ServerTraits", "LoadScreen", "SupportsMapsFrom", "SoundFormats", "SpriteFormats", + "ServerTraits", "LoadScreen", "SupportsMapsFrom", "SoundFormats", "SpriteFormats", "VideoFormats", "RequiresMods", "PackageFormats" }; @@ -154,6 +155,9 @@ namespace OpenRA if (yaml.ContainsKey("SpriteFormats")) SpriteFormats = FieldLoader.GetValue("SpriteFormats", yaml["SpriteFormats"].Value); + + if (yaml.ContainsKey("VideoFormats")) + VideoFormats = FieldLoader.GetValue("VideoFormats", yaml["VideoFormats"].Value); } public void LoadCustomData(ObjectCreator oc) diff --git a/OpenRA.Game/ModData.cs b/OpenRA.Game/ModData.cs index bd9c1eb501..19591c5e27 100644 --- a/OpenRA.Game/ModData.cs +++ b/OpenRA.Game/ModData.cs @@ -15,6 +15,7 @@ using System.IO; using System.Linq; using OpenRA.FileSystem; using OpenRA.Graphics; +using OpenRA.Video; using OpenRA.Widgets; using FS = OpenRA.FileSystem.FileSystem; @@ -31,6 +32,7 @@ namespace OpenRA public readonly ISpriteLoader[] SpriteLoaders; public readonly ISpriteSequenceLoader SpriteSequenceLoader; public readonly IModelSequenceLoader ModelSequenceLoader; + public readonly IVideoLoader[] VideoLoaders; public readonly HotkeyManager Hotkeys; public ILoadScreen LoadScreen { get; private set; } public CursorProvider CursorProvider { get; private set; } @@ -71,6 +73,7 @@ namespace OpenRA SoundLoaders = ObjectCreator.GetLoaders(Manifest.SoundFormats, "sound"); SpriteLoaders = ObjectCreator.GetLoaders(Manifest.SpriteFormats, "sprite"); + VideoLoaders = ObjectCreator.GetLoaders(Manifest.VideoFormats, "video"); var sequenceFormat = Manifest.Get(); var sequenceLoader = ObjectCreator.FindType(sequenceFormat.Type + "Loader"); diff --git a/OpenRA.Mods.Common/FileFormats/VqaReader.cs b/OpenRA.Mods.Cnc/FileFormats/VqaReader.cs similarity index 92% rename from OpenRA.Mods.Common/FileFormats/VqaReader.cs rename to OpenRA.Mods.Cnc/FileFormats/VqaReader.cs index 8e5ca92318..1aac556a90 100644 --- a/OpenRA.Mods.Common/FileFormats/VqaReader.cs +++ b/OpenRA.Mods.Cnc/FileFormats/VqaReader.cs @@ -11,15 +11,22 @@ using System; using System.IO; +using OpenRA.Mods.Common.FileFormats; +using OpenRA.Video; -namespace OpenRA.Mods.Common.FileFormats +namespace OpenRA.Mods.Cnc.FileFormats { - public class VqaReader + public class VqaReader : IVideo { - public readonly ushort Frames; - public readonly byte Framerate; - public readonly ushort Width; - public readonly ushort Height; + public ushort Frames { get { return frames; } } + public byte Framerate { get { return framerate; } } + public ushort Width { get { return width; } } + public ushort Height { get { return height; } } + + readonly ushort frames; + readonly byte framerate; + readonly ushort width; + readonly ushort height; Stream stream; int currentFrame; @@ -80,15 +87,15 @@ namespace OpenRA.Mods.Common.FileFormats /*var version = */stream.ReadUInt16(); videoFlags = stream.ReadUInt16(); - Frames = stream.ReadUInt16(); - Width = stream.ReadUInt16(); - Height = stream.ReadUInt16(); + frames = stream.ReadUInt16(); + width = stream.ReadUInt16(); + height = stream.ReadUInt16(); blockWidth = stream.ReadUInt8(); blockHeight = stream.ReadUInt8(); - Framerate = stream.ReadUInt8(); + framerate = stream.ReadUInt8(); chunkBufferParts = stream.ReadUInt8(); - blocks = new int2(Width / blockWidth, Height / blockHeight); + blocks = new int2(width / blockWidth, height / blockHeight); numColors = stream.ReadUInt16(); /*var maxBlocks = */stream.ReadUInt16(); @@ -106,7 +113,7 @@ namespace OpenRA.Mods.Common.FileFormats /*var unknown5 =*/stream.ReadUInt32(); - var frameSize = Exts.NextPowerOf2(Math.Max(Width, Height)); + var frameSize = Exts.NextPowerOf2(Math.Max(width, height)); if (IsHqVqa) { @@ -116,9 +123,9 @@ namespace OpenRA.Mods.Common.FileFormats } else { - cbfBuffer = new byte[Width * Height]; - cbf = new byte[Width * Height]; - cbp = new byte[Width * Height]; + cbfBuffer = new byte[width * height]; + cbf = new byte[width * height]; + cbp = new byte[width * height]; origData = new byte[2 * blocks.X * blocks.Y]; } @@ -142,8 +149,8 @@ namespace OpenRA.Mods.Common.FileFormats /*var unknown4 = */stream.ReadUInt16(); // Frame offsets - offsets = new uint[Frames]; - for (var i = 0; i < Frames; i++) + offsets = new uint[frames]; + for (var i = 0; i < frames; i++) { offsets[i] = stream.ReadUInt32(); if (offsets[i] > 0x40000000) @@ -168,10 +175,10 @@ namespace OpenRA.Mods.Common.FileFormats var audio2 = new MemoryStream(); // right channel var adpcmIndex = 0; var compressed = false; - for (var i = 0; i < Frames; i++) + for (var i = 0; i < frames; i++) { stream.Seek(offsets[i], SeekOrigin.Begin); - var end = (i < Frames - 1) ? offsets[i + 1] : stream.Length; + var end = (i < frames - 1) ? offsets[i + 1] : stream.Length; while (stream.Position < end) { @@ -261,12 +268,12 @@ namespace OpenRA.Mods.Common.FileFormats void LoadFrame() { - if (currentFrame >= Frames) + if (currentFrame >= frames) return; // Seek to the start of the frame stream.Seek(offsets[currentFrame], SeekOrigin.Begin); - var end = (currentFrame < Frames - 1) ? offsets[currentFrame + 1] : stream.Length; + var end = (currentFrame < frames - 1) ? offsets[currentFrame + 1] : stream.Length; while (stream.Position < end) { @@ -344,8 +351,7 @@ namespace OpenRA.Mods.Common.FileFormats s.ReadBytes(fileBuffer, 0, subchunkLength); Array.Clear(cbf, 0, cbf.Length); Array.Clear(cbfBuffer, 0, cbfBuffer.Length); - var decodeCount = 0; - decodeCount = LCWDecodeInto(fileBuffer, cbfBuffer, decodeMode ? 1 : 0, decodeMode); + var decodeCount = LCWDecodeInto(fileBuffer, cbfBuffer, decodeMode ? 1 : 0, decodeMode); if ((videoFlags & 0x10) == 16) { var p = 0; diff --git a/OpenRA.Mods.Cnc/VideoLoaders/VqaLoader.cs b/OpenRA.Mods.Cnc/VideoLoaders/VqaLoader.cs new file mode 100644 index 0000000000..711a2d5288 --- /dev/null +++ b/OpenRA.Mods.Cnc/VideoLoaders/VqaLoader.cs @@ -0,0 +1,58 @@ +#region Copyright & License Information +/* + * Copyright 2007-2020 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. For more + * information, see COPYING. + */ +#endregion + +using System.IO; +using OpenRA.Mods.Cnc.FileFormats; +using OpenRA.Video; + +namespace OpenRA.Mods.Cnc.VideoLoaders +{ + public class VqaLoader : IVideoLoader + { + public bool TryParseVideo(Stream s, out IVideo video) + { + video = null; + + if (!IsWestwoodVqa(s)) + return false; + + video = new VqaReader(s); + return true; + } + + bool IsWestwoodVqa(Stream s) + { + var start = s.Position; + + if (s.ReadASCII(4) != "FORM") + { + s.Position = start; + return false; + } + + var length = s.ReadUInt32(); + if (length == 0) + { + s.Position = start; + return false; + } + + if (s.ReadASCII(4) != "WVQA") + { + s.Position = start; + return false; + } + + s.Position = start; + return true; + } + } +} diff --git a/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs index 8b35329620..76f1498760 100644 --- a/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs @@ -15,10 +15,10 @@ using Eluant; using OpenRA.Effects; using OpenRA.GameRules; using OpenRA.Mods.Common.Effects; -using OpenRA.Mods.Common.FileFormats; using OpenRA.Mods.Common.Traits; using OpenRA.Primitives; using OpenRA.Scripting; +using OpenRA.Video; namespace OpenRA.Mods.Common.Scripting { @@ -175,12 +175,12 @@ namespace OpenRA.Mods.Common.Scripting return false; } - AsyncLoader l = new AsyncLoader(Media.LoadVqa); + AsyncLoader l = new AsyncLoader(Media.LoadVideo); IAsyncResult ar = l.BeginInvoke(s, null, null); Action onLoadComplete = () => { Media.StopFMVInRadar(); - world.AddFrameEndTask(_ => Media.PlayFMVInRadar(world, l.EndInvoke(ar), onCompleteRadar)); + world.AddFrameEndTask(_ => Media.PlayFMVInRadar(l.EndInvoke(ar), onCompleteRadar)); }; world.AddFrameEndTask(w => w.Add(new AsyncAction(ar, onLoadComplete))); @@ -228,6 +228,6 @@ namespace OpenRA.Mods.Common.Scripting world.AddFrameEndTask(w => w.Add(new FloatingText(position, c, text, duration))); } - public delegate VqaReader AsyncLoader(Stream s); + public delegate IVideo AsyncLoader(Stream s); } } diff --git a/OpenRA.Mods.Common/Scripting/Media.cs b/OpenRA.Mods.Common/Scripting/Media.cs index 145384907b..6e1ff19308 100644 --- a/OpenRA.Mods.Common/Scripting/Media.cs +++ b/OpenRA.Mods.Common/Scripting/Media.cs @@ -11,8 +11,8 @@ using System; using System.IO; -using OpenRA.Mods.Common.FileFormats; using OpenRA.Mods.Common.Widgets; +using OpenRA.Video; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Scripting @@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Scripting public static void PlayFMVFullscreen(World w, string movie, Action onComplete) { var playerRoot = Game.OpenWindow(w, "FMVPLAYER"); - var player = playerRoot.Get("PLAYER"); + var player = playerRoot.Get("PLAYER"); try { @@ -60,9 +60,9 @@ namespace OpenRA.Mods.Common.Scripting }); } - public static void PlayFMVInRadar(World w, VqaReader movie, Action onComplete) + public static void PlayFMVInRadar(IVideo movie, Action onComplete) { - var player = Ui.Root.Get("PLAYER"); + var player = Ui.Root.Get("PLAYER"); player.Open(movie); player.PlayThen(() => @@ -74,13 +74,13 @@ namespace OpenRA.Mods.Common.Scripting public static void StopFMVInRadar() { - var player = Ui.Root.Get("PLAYER"); + var player = Ui.Root.Get("PLAYER"); player.Stop(); } - public static VqaReader LoadVqa(Stream s) + public static IVideo LoadVideo(Stream s) { - return new VqaReader(s); + return VideoLoader.GetVideo(s, Game.ModData.VideoLoaders); } } } diff --git a/OpenRA.Mods.Common/Widgets/Logic/AssetBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/AssetBrowserLogic.cs index f41a6de8fa..1c6cbce502 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/AssetBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/AssetBrowserLogic.cs @@ -17,6 +17,7 @@ using System.Linq; using OpenRA.FileSystem; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Video; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic @@ -44,7 +45,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic IReadOnlyPackage currentPackage; Sprite[] currentSprites; IModel currentVoxel; - VqaPlayerWidget player = null; + VideoPlayerWidget player = null; bool isVideoLoaded = false; bool isLoadError = false; int currentFrame; @@ -84,7 +85,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic spriteWidget.IsVisible = () => !isVideoLoaded && !isLoadError && currentSprites != null; } - var playerWidget = panel.GetOrNull("PLAYER"); + var playerWidget = panel.GetOrNull("PLAYER"); if (playerWidget != null) playerWidget.IsVisible = () => isVideoLoaded && !isLoadError; @@ -379,9 +380,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic prefix += "|"; } - if (Path.GetExtension(filename.ToLowerInvariant()) == ".vqa") + var video = VideoLoader.GetVideo(Game.ModData.DefaultFileSystem.Open(filename), Game.ModData.VideoLoaders); + if (video != null) { - player = panel.Get("PLAYER"); + player = panel.Get("PLAYER"); player.Load(prefix + filename); player.DrawOverlay = false; isVideoLoaded = true; diff --git a/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs index c88e50d5f6..e4de8f6240 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs @@ -17,6 +17,7 @@ using System.Threading; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; using OpenRA.Network; +using OpenRA.Video; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic @@ -36,7 +37,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic readonly ButtonWidget stopBriefingVideoButton; readonly ButtonWidget startInfoVideoButton; readonly ButtonWidget stopInfoVideoButton; - readonly VqaPlayerWidget videoPlayer; + readonly VideoPlayerWidget videoPlayer; readonly BackgroundWidget fullscreenVideoPlayer; readonly ScrollPanelWidget missionList; @@ -71,7 +72,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic previewWidget.Preview = () => selectedMap; previewWidget.IsVisible = () => playingVideo == PlayingVideo.None; - videoPlayer = widget.Get("MISSION_VIDEO"); + videoPlayer = widget.Get("MISSION_VIDEO"); widget.Get("MISSION_BIN").IsVisible = () => playingVideo != PlayingVideo.None; fullscreenVideoPlayer = Ui.LoadWidget("FULLSCREEN_PLAYER", Ui.Root, new WidgetArgs { { "world", world } }); @@ -329,7 +330,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic Game.Sound.MusicVolume = cachedMusicVolume; } - void PlayVideo(VqaPlayerWidget player, string video, PlayingVideo pv, Action onComplete = null) + void PlayVideo(VideoPlayerWidget player, string video, PlayingVideo pv, Action onComplete = null) { if (!modData.DefaultFileSystem.Exists(video)) { @@ -358,7 +359,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic } } - void StopVideo(VqaPlayerWidget player) + void StopVideo(VideoPlayerWidget player) { if (playingVideo == PlayingVideo.None) return; @@ -385,7 +386,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic var missionData = selectedMap.Rules.Actors["world"].TraitInfoOrDefault(); if (missionData != null && missionData.StartVideo != null && modData.DefaultFileSystem.Exists(missionData.StartVideo)) { - var fsPlayer = fullscreenVideoPlayer.Get("PLAYER"); + var fsPlayer = fullscreenVideoPlayer.Get("PLAYER"); fullscreenVideoPlayer.Visible = true; PlayVideo(fsPlayer, missionData.StartVideo, PlayingVideo.GameStart, () => { diff --git a/OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs b/OpenRA.Mods.Common/Widgets/VideoPlayerWidget.cs similarity index 96% rename from OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs rename to OpenRA.Mods.Common/Widgets/VideoPlayerWidget.cs index 027334cff4..3c96f24205 100644 --- a/OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs +++ b/OpenRA.Mods.Common/Widgets/VideoPlayerWidget.cs @@ -11,13 +11,13 @@ using System; using OpenRA.Graphics; -using OpenRA.Mods.Common.FileFormats; using OpenRA.Primitives; +using OpenRA.Video; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets { - public class VqaPlayerWidget : Widget + public class VideoPlayerWidget : Widget { public Hotkey CancelKey = new Hotkey(Keycode.ESCAPE, Modifiers.None); public float AspectRatio = 1.2f; @@ -25,11 +25,11 @@ namespace OpenRA.Mods.Common.Widgets public bool Skippable = true; public bool Paused { get { return paused; } } - public VqaReader Video { get { return video; } } + public IVideo Video { get { return video; } } Sprite videoSprite, overlaySprite; Sheet overlaySheet; - VqaReader video = null; + IVideo video = null; string cachedVideo; float invLength; float2 videoOrigin, videoSize; @@ -44,13 +44,14 @@ namespace OpenRA.Mods.Common.Widgets { if (filename == cachedVideo) return; - var video = new VqaReader(Game.ModData.DefaultFileSystem.Open(filename)); + + var video = VideoLoader.GetVideo(Game.ModData.DefaultFileSystem.Open(filename), Game.ModData.VideoLoaders); + Open(video); cachedVideo = filename; - Open(video); } - public void Open(VqaReader video) + public void Open(IVideo video) { this.video = video; diff --git a/mods/cnc/chrome/assetbrowser.yaml b/mods/cnc/chrome/assetbrowser.yaml index b52537d147..f0f7fe606a 100644 --- a/mods/cnc/chrome/assetbrowser.yaml +++ b/mods/cnc/chrome/assetbrowser.yaml @@ -104,7 +104,7 @@ Container@ASSETBROWSER_PANEL: Sprite@SPRITE: Width: PARENT_RIGHT Height: PARENT_BOTTOM - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: Width: PARENT_RIGHT Height: PARENT_BOTTOM AspectRatio: 1 diff --git a/mods/cnc/chrome/ingame.yaml b/mods/cnc/chrome/ingame.yaml index 8e1079406a..030a2c4760 100644 --- a/mods/cnc/chrome/ingame.yaml +++ b/mods/cnc/chrome/ingame.yaml @@ -160,7 +160,7 @@ Container@OBSERVER_WIDGETS: Y: 1 Width: PARENT_RIGHT - 2 Height: PARENT_BOTTOM - 2 - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 1 Y: 1 Width: PARENT_RIGHT - 2 @@ -1632,7 +1632,7 @@ Container@PLAYER_WIDGETS: Height: 194 SoundUp: RadarUp SoundDown: RadarDown - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: Width: 194 Height: 194 Skippable: false @@ -1856,7 +1856,7 @@ Background@FMVPLAYER: Height: WINDOW_BOTTOM Background: panel-allblack Children: - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 0 Y: 0 Width: WINDOW_RIGHT diff --git a/mods/cnc/chrome/missionbrowser.yaml b/mods/cnc/chrome/missionbrowser.yaml index 9a7c56ddab..1d452cf94a 100644 --- a/mods/cnc/chrome/missionbrowser.yaml +++ b/mods/cnc/chrome/missionbrowser.yaml @@ -146,7 +146,7 @@ Container@MISSIONBROWSER_PANEL: Font: Bold Container@MISSION_BIN: Children: - VqaPlayer@MISSION_VIDEO: + VideoPlayer@MISSION_VIDEO: X: 1 Y: 1 Width: 712 @@ -159,7 +159,7 @@ Background@FULLSCREEN_PLAYER: Background: panel-allblack Visible: False Children: - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 0 Y: 0 Width: WINDOW_RIGHT diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index df6b8d7a0b..14aa1ff0ae 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -212,6 +212,8 @@ SoundFormats: Aud, Wav SpriteFormats: ShpTD, TmpTD, ShpTS, TmpRA +VideoFormats: Vqa + SpriteSequenceFormat: ClassicTilesetSpecificSpriteSequence TilesetExtensions: TEMPERAT: .tem diff --git a/mods/common/chrome/assetbrowser.yaml b/mods/common/chrome/assetbrowser.yaml index 7ee0150139..9f2997d012 100644 --- a/mods/common/chrome/assetbrowser.yaml +++ b/mods/common/chrome/assetbrowser.yaml @@ -99,7 +99,7 @@ Background@ASSETBROWSER_PANEL: Sprite@SPRITE: Width: PARENT_RIGHT Height: PARENT_BOTTOM - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: Width: PARENT_RIGHT Height: PARENT_BOTTOM AspectRatio: 1 diff --git a/mods/common/chrome/ingame-fmvplayer.yaml b/mods/common/chrome/ingame-fmvplayer.yaml index da2e963c8f..00cfcdcd30 100644 --- a/mods/common/chrome/ingame-fmvplayer.yaml +++ b/mods/common/chrome/ingame-fmvplayer.yaml @@ -3,7 +3,7 @@ Background@FMVPLAYER: Height: WINDOW_BOTTOM Background: dialog5 Children: - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 0 Y: 0 Width: WINDOW_RIGHT diff --git a/mods/common/chrome/ingame-observer.yaml b/mods/common/chrome/ingame-observer.yaml index 6dba5fa223..60df813e6a 100644 --- a/mods/common/chrome/ingame-observer.yaml +++ b/mods/common/chrome/ingame-observer.yaml @@ -44,7 +44,7 @@ Container@OBSERVER_WIDGETS: Width: PARENT_RIGHT - 19 Height: PARENT_BOTTOM - 19 WorldInteractionController: INTERACTION_CONTROLLER - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 10 Y: 10 Width: PARENT_RIGHT - 20 diff --git a/mods/common/chrome/missionbrowser.yaml b/mods/common/chrome/missionbrowser.yaml index e445dce72a..7641f6e9d4 100644 --- a/mods/common/chrome/missionbrowser.yaml +++ b/mods/common/chrome/missionbrowser.yaml @@ -147,7 +147,7 @@ Background@MISSIONBROWSER_PANEL: Height: 377 Background: dialog3 Children: - VqaPlayer@MISSION_VIDEO: + VideoPlayer@MISSION_VIDEO: X: 1 Y: 1 Width: 640 @@ -160,7 +160,7 @@ Background@FULLSCREEN_PLAYER: Background: dialog5 Visible: False Children: - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 0 Y: 0 Width: WINDOW_RIGHT diff --git a/mods/d2k/chrome/ingame-observer.yaml b/mods/d2k/chrome/ingame-observer.yaml index be02cd6359..564659077c 100644 --- a/mods/d2k/chrome/ingame-observer.yaml +++ b/mods/d2k/chrome/ingame-observer.yaml @@ -64,7 +64,7 @@ Container@OBSERVER_WIDGETS: Width: PARENT_RIGHT - 19 Height: PARENT_BOTTOM - 19 WorldInteractionController: INTERACTION_CONTROLLER - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 10 Y: 10 Width: PARENT_RIGHT - 20 diff --git a/mods/d2k/chrome/ingame-player.yaml b/mods/d2k/chrome/ingame-player.yaml index f336d8a525..b9d93ab0a2 100644 --- a/mods/d2k/chrome/ingame-player.yaml +++ b/mods/d2k/chrome/ingame-player.yaml @@ -383,7 +383,7 @@ Container@PLAYER_WIDGETS: SoundUp: RadarUp SoundDown: RadarDown Children: - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 12 Y: 32 Width: 202 diff --git a/mods/d2k/chrome/missionbrowser.yaml b/mods/d2k/chrome/missionbrowser.yaml index f06e029bd7..a430791792 100644 --- a/mods/d2k/chrome/missionbrowser.yaml +++ b/mods/d2k/chrome/missionbrowser.yaml @@ -148,7 +148,7 @@ Background@MISSIONBROWSER_PANEL: Height: 483 Background: dialog3 Children: - VqaPlayer@MISSION_VIDEO: + VideoPlayer@MISSION_VIDEO: X: 1 Y: 1 Width: 640 @@ -163,7 +163,7 @@ Background@FULLSCREEN_PLAYER: Background: dialog5 Visible: False Children: - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 0 Y: 0 Width: WINDOW_RIGHT diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index 43a3accc00..6e75f21e48 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -194,6 +194,8 @@ SoundFormats: Aud, Wav SpriteFormats: R8, ShpTD, TmpRA +VideoFormats: Vqa + SpriteSequenceFormat: DefaultSpriteSequence ModelSequenceFormat: PlaceholderModelSequence diff --git a/mods/ra/chrome/ingame-observer.yaml b/mods/ra/chrome/ingame-observer.yaml index cc21e7cd07..3d2f3e7cf8 100644 --- a/mods/ra/chrome/ingame-observer.yaml +++ b/mods/ra/chrome/ingame-observer.yaml @@ -81,7 +81,7 @@ Container@OBSERVER_WIDGETS: Y: 41 Width: 220 Height: 220 - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 9 Y: 41 Width: 220 diff --git a/mods/ra/chrome/ingame-player.yaml b/mods/ra/chrome/ingame-player.yaml index a54240ed65..52934bb589 100644 --- a/mods/ra/chrome/ingame-player.yaml +++ b/mods/ra/chrome/ingame-player.yaml @@ -406,7 +406,7 @@ Container@PLAYER_WIDGETS: SoundUp: RadarUp SoundDown: RadarDown Children: - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 1 Y: 1 Width: 220 diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index c7bf48e7d1..d3d3b3772d 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -218,6 +218,8 @@ SoundFormats: Aud, Wav SpriteFormats: ShpD2, ShpTD, TmpRA, TmpTD, ShpTS +VideoFormats: Vqa + SpriteSequenceFormat: ClassicTilesetSpecificSpriteSequence TilesetExtensions: TEMPERAT: .tem diff --git a/mods/ts/chrome/ingame-observer.yaml b/mods/ts/chrome/ingame-observer.yaml index d6b0b8eae7..2cac1b5718 100644 --- a/mods/ts/chrome/ingame-observer.yaml +++ b/mods/ts/chrome/ingame-observer.yaml @@ -64,7 +64,7 @@ Container@OBSERVER_WIDGETS: Width: PARENT_RIGHT - 19 Height: PARENT_BOTTOM - 19 WorldInteractionController: INTERACTION_CONTROLLER - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 10 Y: 10 Width: PARENT_RIGHT - 20 diff --git a/mods/ts/chrome/ingame-player.yaml b/mods/ts/chrome/ingame-player.yaml index 67186e7543..4e27e088c1 100644 --- a/mods/ts/chrome/ingame-player.yaml +++ b/mods/ts/chrome/ingame-player.yaml @@ -404,7 +404,7 @@ Container@PLAYER_WIDGETS: Height: 161 SoundUp: RadarUp SoundDown: RadarDown - VqaPlayer@PLAYER: + VideoPlayer@PLAYER: X: 16 Y: 64 Width: 206 diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index 1119e7c6e2..a5a604d634 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -247,6 +247,8 @@ SoundFormats: Aud, Wav SpriteFormats: ShpTS, TmpTS, ShpTD +VideoFormats: Vqa + SpriteSequenceFormat: TilesetSpecificSpriteSequence TilesetExtensions: TEMPERATE: .tem