From e00ecec1dadccc5cf1005cb2dc71d4d4fd878863 Mon Sep 17 00:00:00 2001 From: RDW Date: Mon, 16 Sep 2024 06:55:14 +0200 Subject: [PATCH] Tools: Add RSM animation types to the FileAnalyzer This helps determine which types are actually used in the game. --- Tests/Tools/FileAnalyzer.spec.lua | 3 +++ Tools/FileAnalyzer.lua | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/Tests/Tools/FileAnalyzer.spec.lua b/Tests/Tools/FileAnalyzer.spec.lua index cbd58821..e7f38d81 100644 --- a/Tests/Tools/FileAnalyzer.spec.lua +++ b/Tests/Tools/FileAnalyzer.spec.lua @@ -127,6 +127,9 @@ describe("FileAnalyzer", function() assertEquals(analysisResult.fields.iniFile[""], 6) assertEquals(analysisResult.fields.scrFile[""], 6) + assertEquals(analysisResult.fields.animationTypeID[1], 6) + assertEquals(analysisResult.fields.animationTypeID[2], 6) + assertEquals(analysisResult.fields.unknownRenewalPropFlag[0], 10) assertEquals(analysisResult.fields.unknownRenewalPropFlag[171], 1) assertEquals(analysisResult.fields.unknownRenewalPropFlag[188], 1) diff --git a/Tools/FileAnalyzer.lua b/Tools/FileAnalyzer.lua index 12e7291e..130f12ad 100644 --- a/Tools/FileAnalyzer.lua +++ b/Tools/FileAnalyzer.lua @@ -98,6 +98,7 @@ function FileAnalyzer:AnalyzeRSW(rswFiles) numSpatialAudioSources = {}, numParticleEffectEmitters = {}, unknownRenewalPropFlag = {}, + animationTypeID = {}, isSolid = {}, }, } @@ -157,6 +158,11 @@ function FileAnalyzer:AnalyzeRSW(rswFiles) analysisResult.fields.unknownRenewalPropFlag[doodad.unknownMysteryByte] = analysisResult.fields.unknownRenewalPropFlag[doodad.unknownMysteryByte] + 1 + analysisResult.fields.animationTypeID[doodad.animationTypeID] = analysisResult.fields.animationTypeID[doodad.animationTypeID] + or 0 + analysisResult.fields.animationTypeID[doodad.animationTypeID] = analysisResult.fields.animationTypeID[doodad.animationTypeID] + + 1 + analysisResult.fields.isSolid[doodad.isSolid] = analysisResult.fields.isSolid[doodad.isSolid] or 0 analysisResult.fields.isSolid[doodad.isSolid] = analysisResult.fields.isSolid[doodad.isSolid] + 1 end