Skip to content

Commit

Permalink
Merge pull request #393 from RagnarokResearchLab/animation-type-analysis
Browse files Browse the repository at this point in the history
Add support for RSM animation types to the FileAnalyzer
  • Loading branch information
rdw-software authored Sep 16, 2024
2 parents c2d0d10 + e00ecec commit 6344e7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Tests/Tools/FileAnalyzer.spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions Tools/FileAnalyzer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function FileAnalyzer:AnalyzeRSW(rswFiles)
numSpatialAudioSources = {},
numParticleEffectEmitters = {},
unknownRenewalPropFlag = {},
animationTypeID = {},
isSolid = {},
},
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6344e7d

Please sign in to comment.