libEGM GMX Persistent Ids

Reporter: RobertBColton  |  Status: closed  |  Last Modified: August 06, 2020, 07:32:19 AM

I caught a bug in libEGM's GMX reader with respect to instance ids in the rooms. I noticed by comparing the code generation of TKG's Key to Success between a GMX and his GMK that some instances across different rooms had the same instance ids. I had defragged the GMK project for the comparison.

In GM, instance ids should be unique across the entire project, and no two rooms should have instances with the exact same ids. The problem was baked into the GMX reader's id handling. This pull request effectively fixes the issue by reusing the existing id map to persist the maximum ids across a single GMX project.

TKG's Key to Success GMX now works identically to his GMK when built from emake. I compared the code generation with the GMK again and saw no differences.

I also decided to fix the starting id of tiles and instances in here to match that of classic GM. Instances used to start at 100001 and tiles at 10000001. I updated the collision test to reflect this as well.

codecov[bot]  
>Codecov Report

Merging #1989 into master will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1989      +/-   ##
==========================================
- Coverage   30.95%   30.91%   -0.05%     
==========================================
  Files         197      196       -1     
  Lines       19115    19095      -20     
==========================================
- Hits         5918     5904      -14     
+ Misses      13197    13191       -6     
Impacted Files Coverage Δ
ENIGMAsystem/SHELL/SHELLmain.cpp 100.00% <0.00%> (ø)
...m/SHELL/Universal_System/Resources/asset_index.cpp
...HELL/Universal_System/Resources/backgroundinit.cpp 83.33% <0.00%> (+1.93%) ⬆️
...ELL/Universal_System/Extensions/Paths/pathinit.cpp 100.00% <0.00%> (+4.54%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cfabdf2...97a4b37. Read the comment docs.

Please sign in to post comments, or you can view this issue on GitHub.