SMB3-Foundry icon indicating copy to clipboard operation
SMB3-Foundry copied to clipboard

Refactor LevelObject Into Multiple Classes

Open TheJoeSmo opened this issue 4 years ago • 0 comments

Closes #71, #41

  • Create AbstractLevelObject and LevelObject are responsible for decoding blocks in the ROM.
  • Create BlockGroupRenderer renders a list of blocks into a rectangle.
  • Create LevelObjectRenderer responsible for rendering the level objects. The render method was copied and reworked to work with the LeveLObjectRenderer.
  • Create LevelObjectAdapter serves as an adapter for the old LevelObject. The adapter is used to try and make everything as compatible as possible with the old LevelObject. The adapter should be worked out of the editor in the future.
  • Many refactors to switch to the new LevelObject. Slight adjustments were made to handle impossible commands and pass tests.
  • Remove LevelObject as it has been replaced.

Additional Information A few unrelated tests for the level renderer mouse movements may have broke. I didn't test those beforehand, but half of those fail, no idea why. Looked at it for a bit and couldn't figure it out.

TheJoeSmo avatar Feb 11 '21 23:02 TheJoeSmo