Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BMSEV #205

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add BMSEV #205

wants to merge 1 commit into from

Conversation

ThanatosGit
Copy link
Contributor

Simple format but no idea what this is for or what is the meaning of all the floats.
Don't know if it makes sense to merge it like that but I leave it here for now.

Fixes #166

Example:

Container: 
    magic = b'MSEV' (total 4)
    version = u'1.9.0' (total 5)
    elements = ListContainer: 
        Container: 
            name = u'exterior' (total 8)
            unknown_floats = ListContainer: 
                1.0
                0.5932559967041016
                0.6855469942092896
                0.16550900042057037
                1.0
                1.0
                3.5
                0.0
                2.0
                0.12156900018453598
                0.1210940033197403
                0.12156900018453598
                1.0
                0.0
                2.0
                0.5529410243034363
                0.5333330035209656
                0.5529410243034363
                -100.0
                0.0
                2.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.32548999786376953
                0.37254899740219116
                0.21960799396038055
                1.0
                0.19607800245285034
                0.137254998087883
                0.10196100175380707
                0.0
                0.0
                0.09411799907684326
                0.09411799907684326
                0.09411799907684326
                0.0
        Container: 
            name = u'cueva01' (total 7)
            unknown_floats = ListContainer: 
                2.0
                0.4156860113143921
                0.5098040103912354
                0.21568599343299866
                1.0
                2.0
                2.5625
                0.0
                2.0
                0.17647099494934082
                0.17647099494934082
                0.20000000298023224
                1.0
                0.0
                2.0
                0.47843098640441895
                0.37254899740219116
                0.2901960015296936
                -100.0
                0.0
                2.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.18431399762630463
                0.20784300565719604
                0.1254899948835373
                1.0
                0.10980399698019028
                0.09411799907684326
                0.08627499639987946
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'default' (total 7)
            unknown_floats = ListContainer: 
                2.0
                0.3803919851779938
                0.4666669964790344
                0.19215700030326843
                1.0
                2.0
                1.7999999523162842
                0.0
                2.0
                0.20000000298023224
                0.20000000298023224
                0.20000000298023224
                1.0
                0.0
                0.0
                0.23137299716472626
                0.21960799396038055
                0.18431399762630463
                -100.0
                0.0
                2.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.20000000298023224
                0.34902000427246094
                0.17647099494934082
                1.0
                0.22352899610996246
                0.1529410034418106
                0.058823999017477036
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'chozoroom01' (total 11)
            unknown_floats = ListContainer: 
                1.0
                0.4666669964790344
                0.6313729882240295
                0.11372499912977219
                1.0
                1.0
                2.625
                0.0
                1.0
                0.20000000298023224
                0.20000000298023224
                0.20000000298023224
                1.0
                0.0
                1.0
                0.38431400060653687
                0.35686299204826355
                0.3294120132923126
                -120.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                1.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.07058800011873245
                0.07843100279569626
                0.031373001635074615
                1.0
                0.1568630039691925
                0.08235300332307816
                0.08235300332307816
                0.0
                1.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'hazarousExt' (total 11)
            unknown_floats = ListContainer: 
                1.0
                0.2980389893054962
                0.11372499912977219
                0.47843098640441895
                1.0
                1.0
                0.9375
                0.0
                2.0
                0.10196100175380707
                0.10196100175380707
                0.10196100175380707
                1.0
                0.0
                1.0
                0.34902000427246094
                0.3098039925098419
                0.4588240087032318
                -101.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.24706999957561493
                0.20000000298023224
                0.32548999786376953
                1.0
                0.08627499639987946
                0.0
                0.2941179871559143
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'hazarous' (total 8)
            unknown_floats = ListContainer: 
                1.0
                0.2901960015296936
                0.1568630039691925
                0.4078429937362671
                1.0
                1.0
                1.600000023841858
                0.0
                1.0
                0.20784300565719604
                0.20784300565719604
                0.20784300565719604
                1.0
                0.0
                1.0
                0.1333329975605011
                0.11764699965715408
                0.1450980007648468
                -80.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.1450980007648468
                0.1450980007648468
                0.17254899442195892
                1.0
                0.031373001635074615
                0.0
                0.05098000168800354
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'chozoroom03' (total 11)
            unknown_floats = ListContainer: 
                1.0
                0.2824609875679016
                0.4462890028953552
                0.2626670002937317
                1.0
                1.0
                1.5
                0.0
                1.0
                0.21972699463367462
                0.21972699463367462
                0.21972699463367462
                1.0
                0.0
                1.0
                0.21972699463367462
                0.21823899447917938
                0.14333699643611908
                -22.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                1.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.4716799855232239
                0.36862701177597046
                0.0
                1.0
                0.1686280071735382
                0.1490200012922287
                0.0
                0.0
                1.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'StandardCave02' (total 14)
            unknown_floats = ListContainer: 
                1.0
                0.2901960015296936
                0.3098039925098419
                0.19607800245285034
                1.0
                1.0
                1.5
                0.0
                1.0
                0.20784300565719604
                0.20784300565719604
                0.20784300565719604
                1.0
                0.0
                1.0
                0.1450980007648468
                0.1333329975605011
                0.015685999765992165
                -22.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                1.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.36862701177597046
                0.2980389893054962
                0.0
                1.0
                0.1686280071735382
                0.1490200012922287
                0.0
                0.0
                1.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'StandardCave' (total 12)
            unknown_floats = ListContainer: 
                1.0
                0.24313700199127197
                0.2705880105495453
                0.1254899948835373
                1.0
                1.0
                1.5
                0.0
                1.0
                0.18431399762630463
                0.18431399762630463
                0.18431399762630463
                1.0
                0.0
                1.0
                0.4588240087032318
                0.4248049855232239
                0.01176500041037798
                -100.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.10196100175380707
                0.08235300332307816
                0.0
                1.0
                0.1254899948835373
                0.11372499912977219
                0.0
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'SpecialEnergie' (total 14)
            unknown_floats = ListContainer: 
                1.0
                0.23529399931430817
                0.4365229904651642
                0.2646479904651642
                1.0
                1.0
                1.7999999523162842
                0.0
                1.0
                0.21176500618457794
                0.21176500618457794
                0.22352899610996246
                1.0
                0.0
                1.0
                0.34117698669433594
                0.3176470100879669
                0.5098040103912354
                -100.0
                0.0
                2.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.02352900058031082
                0.035294000059366226
                1.0
                0.07058800011873245
                0.04705899953842163
                0.058823999017477036
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'exterior02' (total 10)
            unknown_floats = ListContainer: 
                1.0
                0.4196079969406128
                0.4882810115814209
                0.1686280071735382
                1.0
                1.0
                3.0999999046325684
                0.0
                2.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                1.0
                0.0
                2.0
                0.507843017578125
                0.3235290050506592
                0.12745100259780884
                -110.0
                0.0
                2.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.1647060066461563
                0.20784300565719604
                0.1647060066461563
                1.0
                0.10980399698019028
                0.09411799907684326
                0.08627499639987946
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'PostQueen' (total 9)
            unknown_floats = ListContainer: 
                1.0
                0.038086000829935074
                0.13183599710464478
                0.017578000202775
                1.0
                1.0
                4.125
                0.0
                1.0
                0.18431399762630463
                0.20000000298023224
                0.18431399762630463
                1.0
                0.0
                0.0
                0.18039199709892273
                0.21960799396038055
                0.17254899442195892
                -100.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.08007799834012985
                0.0
                0.0
                0.05761700123548508
                0.13769499957561493
                0.011718999594449997
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'cuevasIzda' (total 10)
            unknown_floats = ListContainer: 
                2.0
                0.5171970129013062
                0.5976560115814209
                0.1442900002002716
                1.0
                2.0
                3.0
                0.0
                2.0
                0.18431399762630463
                0.18431399762630463
                0.18431399762630463
                1.0
                0.0
                0.0
                0.5529410243034363
                0.5333330035209656
                0.5529410243034363
                -100.0
                0.0
                2.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.10196100175380707
                0.08235300332307816
                0.0
                1.0
                0.1254899948835373
                0.11372499912977219
                0.0
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'chozoroom02' (total 11)
            unknown_floats = ListContainer: 
                2.0
                0.36862701177597046
                0.2627449929714203
                0.1647060066461563
                1.0
                2.0
                1.125
                0.0
                2.0
                0.06274499744176865
                0.06274499744176865
                0.06274499744176865
                1.0
                0.0
                0.0
                0.1450980007648468
                0.1333329975605011
                0.015685999765992165
                -22.0
                0.0
                2.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.20000000298023224
                0.4023439884185791
                0.14941400289535522
                1.0
                0.3789060115814209
                0.31054699420928955
                0.10000000149011612
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'CSPlanetArrivalTake01' (total 21)
            unknown_floats = ListContainer: 
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                10.0
                0.0
                0.0
                0.019999999552965164
                0.019999999552965164
                0.019999999552965164
                1.0
                0.0
                2.0
                1.0
                1.0
                1.0
                -100.0
                0.0
                2.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.02352900058031082
                0.0
                0.12156900018453598
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'Preset_0' (total 8)
            unknown_floats = ListContainer: 
                2.0
                0.3803919851779938
                0.4666669964790344
                0.19215700030326843
                1.0
                2.0
                1.7999999523162842
                0.0
                2.0
                0.20000000298023224
                0.20000000298023224
                0.20000000298023224
                1.0
                0.0
                0.0
                0.23137299716472626
                0.21960799396038055
                0.18431399762630463
                -100.0
                0.0
                2.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.20000000298023224
                0.34902000427246094
                0.17647099494934082
                1.0
                0.22352899610996246
                0.1529410034418106
                0.058823999017477036
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'subidaEspecial' (total 14)
            unknown_floats = ListContainer: 
                2.0
                0.24313700199127197
                0.2705880105495453
                0.1254899948835373
                1.0
                2.0
                1.7999999523162842
                0.0
                2.0
                0.18431399762630463
                0.18431399762630463
                0.18431399762630463
                1.0
                0.0
                0.0
                0.12156900018453598
                0.08235300332307816
                0.01176500041037798
                -100.0
                0.0
                2.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.10196100175380707
                0.08235300332307816
                0.0
                1.0
                0.1254899948835373
                0.11372499912977219
                0.0
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0
        Container: 
            name = u'space' (total 5)
            unknown_floats = ListContainer: 
                1.0
                0.0
                0.0
                0.0
                1.0
                1.0
                3.125
                0.0
                2.0
                0.12156900018453598
                0.1210940033197403
                0.12156900018453598
                1.0
                0.0
                2.0
                0.36470600962638855
                0.4078429937362671
                0.3294120132923126
                -100.0
                0.0
                2.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                1.0
                0.0
                0.0
                0.0
                0.0
                1.0
                0.32548999786376953
                0.37254899740219116
                0.21960799396038055
                1.0
                0.19607800245285034
                0.137254998087883
                0.10196100175380707
                0.0
                0.0
                0.11999999731779099
                0.11999999731779099
                0.11999999731779099
                0.0

Copy link

codecov bot commented Aug 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.77%. Comparing base (1317e94) to head (5024a51).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #205      +/-   ##
==========================================
+ Coverage   76.69%   76.77%   +0.08%     
==========================================
  Files          74       75       +1     
  Lines        3446     3458      +12     
==========================================
+ Hits         2643     2655      +12     
  Misses        803      803              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@duncathan duncathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it even known what this file is for? lol

BMSEV = Struct(
"magic" / Const(b"MSEV"),
"version" / VersionAdapter(),
"elements" / make_vector(Struct(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can probably use make_dict() instead

@steven11sjf
Copy link
Contributor

Compare it with dread's BREV, I assume its the same thing but not using reflection system.

I'd need to count fields to figure it out for sure but it looks like floats[1:4] may be the fog color. and probably a couple other colors in there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MSR: Implement parsing for BMSEV
3 participants