Skip to content

DockPanelSuite, MVP Implementation & Code Cleanup #41

Description

@sraboy

This has been in progress for a while and the mini todo items are starting to stack up so I'm creating this issue to track them. The move to MVP will make it easier to update the UI and add features later but it broke a lot of previously-working functionality. Completion of these items will be spread across multiple releases/milestones but should mostly be done before the beta (0.6).

  • Implement presenters (DbfFilePresenter is still unused/untested)
  • Re-implement saving std.set with updated offsets (see commit)
  • Move call to RecalculateOffsets() somewhere that doesn't slow down the UI updates (see commit)
  • The default ImageEditorContainer, when SkaaEditor is first opened, is named "New Sprite". There is no ability to edit or do anything with this. Remove the tab or implement the New Sprite functionality.
  • SkaaSprite, SkaaFrame, SkaaSpriteFrame (and maybe others) should simply mirror 7KAA's objects and/or serve as static classes for file manipulation. The presenters have re-implemented their properties anyway so they're just wasting memory and requiring extra code to support. This may wait until after the beta because, for now, the code simply works as is.
  • re-implement project loading/saving
  • separate, document and cleanup FileTyping.cs
  • IndexedBitmap shouldn't output with the SPR's 4-byte header (but it's easiest to do there so this may not be fixed). Currently, ResIdxMultiBmp just ignores the header when saving; I just think there could be a more eloquent way to do this. Maybe SkaaFrame.GetSprBytes() can have a bool parameter that specifies whether it should strip the header off for us.
  • SpriteViewer's ListView (which is an ObjectListView) doesn't update/show names for SpritePresenter objects
  • Each presenter object creates its own FileStream when saving. This is probably safe to move to PresenterBase.
  • Remove the Cyotek projects and add them as libraries instead. This will likely wait until the most/all of the drawing/editing functionality is implemented because it helps to step through the Cyotek code to see what needs to be overridden or otherwise accounted for.
  • The DataSource, DataTable and DataRow extension methods in SkaaGameDatalib don't need the "isIdx" parameter anymore (I don't think). I'm pretty sure this is left over from before the implementation of DbfFile, when I was confusing the various file formats. Every call to these just passes true.
  • Add the TraceSource logger to classes missing it and add logging messages where there may be errors

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions