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

Room editor fixes and improvements. #876

Merged
merged 18 commits into from
May 1, 2022

Conversation

VladiStep
Copy link
Member

@VladiStep VladiStep commented Apr 30, 2022

  1. All room objects (game object instances, tile instances, backgrounds, etc.) with textures that have non-zero target coordinates are now displayed properly (TargetX and TargetY are used now).
  2. Added XOffset and YOffset properties to Background, SpriteInstance and LayerBackgroundData.
  3. Frame index of GameObject and SpriteInstance is now used in much more places: objects render size, GenerateSpriteCache(), XOffset and YOffset.
  4. Frame index UI field doesn't limit the value to the bounds.
  5. Frame index wrappers are changed from SafeImageIndex/SafeFrameIndex to WrappedImageIndex/WrappedFrameIndex - now it's a read-only property that wraps frame index value to a valid array index.
    For example - if sprite has 3 frames, and image index is 4, then it will return 1 - second frame.
  6. Removed redundant null checks on sprite Textures (Textures can't be null).
  7. Renamed some private fields so that they comply with the naming convention (_PrivateBackingField -> _privateBackingField).
  8. Fixed tiles texture cropping.
  9. Fixed room objects pasting (with Ctrl+V).
  10. Extracted common code of PaintObjects() and Command_Paste(), and made new AddObjectCopy() method from it.
  11. Made room object pasting error messages more polite.
  12. Simplified some new T() expressions (new ClassWithLongName() -> new()).
  13. Set proper default values for SpriteInstance to simplify new instance creation.

… index; changed names of private fields of "GameObject"
…t", "YOffset" and "GenerateSpriteCache()" are using frame index; removed null check of "Textures"
… for these properties to both "GameObject" and "Tile".
…ding errors; fixed "UndertaleRoomRenderer" room object size bindings
…dex UI fields don't check if value is out of bounds
… "PaintObjects()" and "Command_Paste()"; changed error messages
@VladiStep VladiStep changed the title Room editor objects offset fixes. Room editor fixes and improvements. May 1, 2022
@VladiStep VladiStep marked this pull request as ready for review May 1, 2022 22:00
@Grossley Grossley merged commit 3cbf811 into UnderminersTeam:master May 1, 2022
@VladiStep VladiStep deleted the roomEditorOffsetFix branch May 2, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants