- Add support for first and last keyword for defineqav parser when process interpolate ignore block.

This commit is contained in:
Mitchell Richters 2021-08-23 15:34:14 +10:00
parent 23be5ffe8c
commit a920fc5aef
2 changed files with 9 additions and 4 deletions

View file

@ -2055,7 +2055,12 @@ static bool parseDefineQAVInterpolateIgnoreBlock(FScanner& sc, const int& res_id
{ {
// Input is a range of values, split on the hypthen and add each value to the output array. // Input is a range of values, split on the hypthen and add each value to the output array.
auto temparray = input.Split("-"); auto temparray = input.Split("-");
for (auto& value : temparray) output.Push(atoi(value)); if (temparray.Size() == 2)
{
// Test if keywords 'first' and 'last' have been used.'
output.Push(temparray[0].CompareNoCase("first") == 0 ? 0 : atoi(temparray[0]));
output.Push(temparray[1].CompareNoCase("last") == 0 ? maxvalue : atoi(temparray[1]));
}
} }
else else
{ {

View file

@ -109,7 +109,7 @@ defineqav 10005 {
interpolate { interpolate {
type "index" type "index"
ignore { ignore {
frames 3-6 tiles 1 frames 3-last tiles 1
} }
} }
} }
@ -154,7 +154,7 @@ defineqav 10012 {
interpolate { interpolate {
type "index" type "index"
ignore { ignore {
frames 14-99 tiles 2-3 frames 14-last tiles 2-3
} }
} }
} }
@ -211,7 +211,7 @@ defineqav 10021 {
interpolate { interpolate {
type "index" type "index"
ignore { ignore {
frames 6-65 tiles all frames 6-last tiles all
} }
} }
} }