Skip to content

Commit

Permalink
Fix remaining sequence overrides.
Browse files Browse the repository at this point in the history
  • Loading branch information
pchote committed Jan 3, 2023
1 parent d209d13 commit dba79f5
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 81 deletions.
19 changes: 18 additions & 1 deletion OpenRA.Mods.Mobius/RemasterSpriteSequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,29 @@ public class RemasterSpriteSequence : ClassicTilesetSpecificSpriteSequence
[Desc("Change the position in-game on X, Y, Z.")]
protected static readonly SpriteSequenceField<float3> RemasteredOffset = new SpriteSequenceField<float3>(nameof(RemasteredOffset), float3.Zero);

[Desc("Frame index to start from.")]
protected static readonly SpriteSequenceField<int?> RemasteredStart = new SpriteSequenceField<int?>(nameof(RemasteredStart), null);

[Desc("Number of frames to use. Does not have to be the total amount the sprite sheet has.")]
protected static readonly SpriteSequenceField<int?> RemasteredLength = new SpriteSequenceField<int?>(nameof(RemasteredLength), null);

[Desc("Time (in milliseconds at default game speed) to wait until playing the next frame in the animation.")]
protected static readonly SpriteSequenceField<int?> RemasteredTick = new SpriteSequenceField<int?>(nameof(RemasteredTick), null);

static readonly int[] FirstFrame = { 0 };

bool hasRemasteredSprite = true;

public RemasterSpriteSequence(SpriteCache cache, ISpriteSequenceLoader loader, string image, string sequence, MiniYaml data, MiniYaml defaults)
: base(cache, loader, image, sequence, data, defaults) { }
: base(cache, loader, image, sequence, data, defaults)
{
start = LoadField(RemasteredStart, data, defaults) ?? start;
tick = LoadField(RemasteredTick, data, defaults) ?? tick;
if (LoadField<string>(RemasteredLength.Key, null, data, defaults) != "*")
length = LoadField(RemasteredLength, data, defaults) ?? length;
else
length = null;
}

string ResolveTilesetId(string tileset, MiniYaml data, MiniYaml defaults)
{
Expand Down
2 changes: 1 addition & 1 deletion mods/cnc/sequences/campaign-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ boat:
RemasteredOffset: 5, 11
wake-right:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\WAKE.ZIP
Offset: -5,11
RemasteredOffset: -5,11
icon:
RemasteredFilename:
105 changes: 51 additions & 54 deletions mods/cnc/sequences/infantry-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,63 +5,60 @@ vice:
Combine:
chem-n:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-N.ZIP
Offset: 5, 11
RemasteredOffset: 5, 11
chem-nw:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-NW.ZIP
Offset: 43, 11
RemasteredOffset: 43, 11
chem-w:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-W.ZIP
Offset: 43, -16
RemasteredOffset: 43, -16
chem-sw:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-SW.ZIP
Offset: 37, -32
RemasteredOffset: 37, -32
chem-s:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-S.ZIP
Offset: 27, -32
RemasteredOffset: 27, -32
chem-se:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-SE.ZIP
Offset: -27, -32
RemasteredOffset: -27, -32
chem-e:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-E.ZIP
Offset: -37, -16
RemasteredOffset: -37, -16
chem-ne:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-NE.ZIP
Offset: -16, 11
RemasteredOffset: -16, 11
die:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEMBALL.ZIP
icon:
RemasteredFilename:

pvice:
Inherits: vice

e1:
Defaults:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\UNITS\E1.ZIP
die-crushed: # FIXME
Start: 389
Length: 1
Tick: 6400
die-crushed:
RemasteredStart: 389
RemasteredLength: 1
RemasteredTick: 6400
icon:
RemasteredFilename:

e2:
Defaults:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\UNITS\E2.ZIP
die-crushed: # FIXME
Start: 532
Length: 1
Tick: 6400
die-crushed:
RemasteredStart: 532
RemasteredLength: 1
RemasteredTick: 6400
icon:
RemasteredFilename:

e3:
Defaults:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\UNITS\E3.ZIP
die-crushed: # FIXME
Start: 404
Length: 1
Tick: 6400
die-crushed:
RemasteredStart: 404
RemasteredLength: 1
RemasteredTick: 6400
icon:
RemasteredFilename:

Expand All @@ -72,32 +69,32 @@ e4:
Combine:
flame-n:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\FLAME-N.ZIP
Offset: 16, 32
RemasteredOffset: 16, 32
flame-nw:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\FLAME-NW.ZIP
Offset: 43, 37
RemasteredOffset: 43, 37
flame-w:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\FLAME-W.ZIP
Offset: 43, 11
RemasteredOffset: 43, 11
flame-sw:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\FLAME-SW.ZIP
Offset: 37, -11
RemasteredOffset: 37, -11
flame-s:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\FLAME-S.ZIP
Offset: 16, -11
RemasteredOffset: 16, -11
flame-se:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\FLAME-SE.ZIP
Offset: -27, -11
RemasteredOffset: -27, -11
flame-e:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\FLAME-E.ZIP
Offset: -37, 11
RemasteredOffset: -37, 11
flame-ne:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\FLAME-NE.ZIP
Offset: -37, 43
die-crushed: # FIXME
Start: 515
Length: 1
Tick: 6400
RemasteredOffset: -37, 43
die-crushed:
RemasteredStart: 515
RemasteredLength: 1
RemasteredTick: 6400
icon:
RemasteredFilename:

Expand All @@ -108,32 +105,32 @@ e5:
Combine:
chem-n:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-N.ZIP
Offset: 5, 11
RemasteredOffset: 5, 11
chem-nw:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-NW.ZIP
Offset: 43, 11
RemasteredOffset: 43, 11
chem-w:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-W.ZIP
Offset: 43, -16
RemasteredOffset: 43, -16
chem-sw:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-SW.ZIP
Offset: 37, -32
RemasteredOffset: 37, -32
chem-s:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-S.ZIP
Offset: 27, -32
RemasteredOffset: 27, -32
chem-se:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-SE.ZIP
Offset: -27, -32
RemasteredOffset: -27, -32
chem-e:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-E.ZIP
Offset: -37, -16
RemasteredOffset: -37, -16
chem-ne:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\CHEM-NE.ZIP
Offset: -16, 11
die-crushed: # FIXME
Start: 515
Length: 1
Tick: 6400
RemasteredOffset: -16, 11
die-crushed:
RemasteredStart: 515
RemasteredLength: 1
RemasteredTick: 6400
icon:
RemasteredFilename:

Expand All @@ -142,19 +139,19 @@ e6:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\UNITS\E6.ZIP
die-crushed:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\UNITS\E1.ZIP
Start: 389 # FIXME
Length: 1
Tick: 6400
RemasteredStart: 389
RemasteredLength: 1
RemasteredTick: 6400
icon:
RemasteredFilename:

rmbo:
Defaults:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\UNITS\RMBO.ZIP
die-crushed: # FIXME
die-crushed:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\UNITS\E1.ZIP
Start: 389
Length: 1
Tick: 6400
RemasteredStart: 389
RemasteredLength: 1
RemasteredTick: 6400
icon:
RemasteredFilename:
33 changes: 17 additions & 16 deletions mods/cnc/sequences/misc-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ atomic:
ionsfx:
idle:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\IONSFX.ZIP
RemasteredOffset: 0, -920

bomblet:
idle:
Expand Down Expand Up @@ -188,7 +189,7 @@ moveflsh:

resources:
Defaults:
Length: *
RemasteredLength: *
ti1:
RemasteredFilenamePattern: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\TEMPERATE\TI1\TI1.TEM-{0:D4}.DDS
Count: 12
Expand Down Expand Up @@ -273,30 +274,30 @@ shroud:
-full:
shroud-typea: shadow
shroud-typeb: shadow
Start: 0 # FIXME
RemasteredStart: 0
shroud-typec: shadow
Start: 0 # FIXME
RemasteredStart: 0
shroud-typed: shadow
Start: 0 # FIXME
RemasteredStart: 0
shroud-full:
RemasteredFilenamePattern:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\SHROUD\SHADOW-ALL.DDS
Length: 1
RemasteredLength: 1
fog-typea: shadow
Alpha: 0.5
fog-typeb: shadow
Start: 0 # FIXME
RemasteredStart: 0
Alpha: 0.5
fog-typec: shadow
Start: 0 # FIXME
RemasteredStart: 0
Alpha: 0.5
fog-typed: shadow
Start: 0 # FIXME
RemasteredStart: 0
Alpha: 0.5
fog-full:
RemasteredFilenamePattern:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\SHROUD\SHADOW-ALL.DDS
Length: 1
RemasteredLength: 1
Alpha: 0.5

# Note: The order of smudges and craters determines
Expand All @@ -306,32 +307,32 @@ scorches:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\TEMPERATE\SC1\SC1.TEM-0000.DDS
RemasteredTilesetFilenamesPattern:
DESERT: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\DESERT\SC1.DES\SC1.DES-0000.DDS
Scale: 0.5
RemasteredScale: 0.5
sc2:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\TEMPERATE\SC2\SC2.TEM-0000.DDS
RemasteredTilesetFilenamesPattern:
DESERT: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\DESERT\SC2.DES\SC2.DES-0000.DDS
Scale: 0.5
RemasteredScale: 0.5
sc3:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\TEMPERATE\SC3\SC3.TEM-0000.DDS
RemasteredTilesetFilenamesPattern:
DESERT: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\DESERT\SC3.DES\SC3.DES-0000.DDS
Scale: 0.5
RemasteredScale: 0.5
sc4:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\TEMPERATE\SC4\SC4.TEM-0000.DDS
RemasteredTilesetFilenamesPattern:
DESERT: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\DESERT\SC4.DES\SC4.DES-0000.DDS
Scale: 0.5
RemasteredScale: 0.5
sc5:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\TEMPERATE\SC5\SC5.TEM-0000.DDS
RemasteredTilesetFilenamesPattern:
DESERT: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\DESERT\SC5.DES\SC5.DES-0000.DDS
Scale: 0.5
RemasteredScale: 0.5
sc6:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\TEMPERATE\SC6\SC6.TEM-0000.DDS
RemasteredTilesetFilenamesPattern:
DESERT: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\DESERT\SC6.DES\SC6.DES-0000.DDS
Scale: 0.5
RemasteredScale: 0.5

craters:
cr1:
Expand All @@ -340,7 +341,7 @@ craters:
RemasteredTilesetFilenamesPattern:
DESERT: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\DESERT\CR1.DES\CR1.DES-{0:D4}.DDS
Count: 5
Scale: 0.5
RemasteredScale: 0.5
cr2:
RemasteredFilenamePattern: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\TEMPERATE\CR2\CR2.TEM-{0:D4}.DDS
Count: 5
Expand Down
10 changes: 5 additions & 5 deletions mods/cnc/sequences/structures-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ proc:
resources:
RemasteredMaskFilename: proctwr_mask.png
RemasteredOffset: 11, 21
Start: 18 # FIXME
RemasteredStart: 18
damaged-resources:
RemasteredMaskFilename: proctwr_damaged_mask.png
RemasteredOffset: 11, 21
Start: 48 # FIXME
RemasteredStart: 48
bib:
RemasteredOffset: 0, 0
RemasteredFilenamePattern: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\TERRAIN\TEMPERATE\BIB2\BIB2.TEM-{0:D4}.DDS
Expand Down Expand Up @@ -225,7 +225,7 @@ tmpl:
RemasteredOffset: 0,-64
smoke:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\VFX\ATOMDOOR.ZIP
Offset: 0, -224
RemasteredOffset: 3, -275
make:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\STRUCTURES\TMPLMAKE.ZIP
bib:
Expand Down Expand Up @@ -281,7 +281,7 @@ gun:
Defaults:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\STRUCTURES\GUN.ZIP
idle:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\STRUCTURES\GUNMAKE.ZIP # Empty first frame. We need WithSpriteBody for the make anim, and WSB needs at least a placeholder default sequence to work
RemasteredFilename: blank.png
make:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\STRUCTURES\GUNMAKE.ZIP
bib:
Expand Down Expand Up @@ -355,7 +355,7 @@ bio.husk:
miss:
Defaults:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\STRUCTURES\MISS.ZIP
RemasteredOffset: 0,-5
RemasteredOffset: 0, -5
make:
RemasteredFilename: DATA\ART\TEXTURES\SRGB\TIBERIAN_DAWN\STRUCTURES\MISS.ZIP
bib:
Expand Down
Loading

0 comments on commit dba79f5

Please sign in to comment.