WolfireGames / overgrowth

Open Source codebase of the game Overgrowth by Wolfire Games LLC
Apache License 2.0
2.51k stars 260 forks source link

Uses sscanf for parsing files #36

Open turol opened 2 years ago

turol commented 2 years ago

sscanf is used for parsing files, for example https://github.com/WolfireGames/overgrowth/blob/08da859107194d3d283c6b54565bffb656478a26/Source/Graphics/model.cpp#L422

This is 1. locale-dependent and 2. can be extremely slow, as seen recently with GTA5. Replace all of that with something better.

feliwir commented 2 years ago

I agree that we should try to change this. However to avoid any regression issues, i'd like to introduce unit tests for the file loading first. Afterwards i can work on changing the file loaders and keeping compability to previous behavior

shinymerlyn commented 8 months ago

@feliwir @autious do we have a unit testing system in tree yet? if not, any suggestions?

I have been exploring and documenting the file loader stuff enough that I'd be happy to write some unit tests, if we have a way to run them.