Skip to content

Image table grouping for vehicles#227

Merged
LeftofZen merged 4 commits intomasterfrom
imageTableGroupingForVehicles
Jan 4, 2026
Merged

Image table grouping for vehicles#227
LeftofZen merged 4 commits intomasterfrom
imageTableGroupingForVehicles

Conversation

@LeftofZen
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings January 4, 2026 04:25
@LeftofZen LeftofZen added the ui label Jan 4, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements image table grouping functionality for vehicle objects, improving the organization and categorization of vehicle sprites in the ObjectEditor. The changes include renaming and clarifying sprite-related properties and flags, implementing a comprehensive vehicle image grouping algorithm, and updating the test infrastructure to support the new data structure.

Key changes:

  • Added comprehensive image table grouping for vehicle body and bogie sprites with support for different orientations and slopes
  • Renamed BogieSprite.RollStates to NumAnimationFrames for clarity and removed unused NumRollSprites property
  • Updated BogieSpriteFlags enum to clarify flag meanings and remove deprecated flags
  • Refactored GetViewModelFromStruct to accept LocoObject instead of ILocoStruct for better context access

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Tests/IdempotenceTests.cs Updated test to work with refactored GetViewModelFromStruct signature that now accepts LocoObject
Gui/ViewModels/LocoTypes/Objects/Vehicle/VehicleViewModel.cs Added empty VehicleComponentsViewModel class, moved namespace, added enum prohibit value attributes for sprites, removed unused import
Gui/ViewModels/LocoTypes/Objects/Building/BuildingViewModel.cs Added blank line for formatting consistency
Gui/ViewModels/LocoTypes/ObjectEditorViewModel.cs Refactored GetViewModelFromStruct to accept LocoObject, reorganized null assignments for better code flow
Definitions/ObjectModels/Objects/Vehicle/BogieSpriteFlags.cs Removed deprecated flags and updated comments for clarity on remaining flags
Definitions/ObjectModels/Objects/Vehicle/BogieSprite.cs Renamed RollStates to NumAnimationFrames, removed NumRollSprites, added Browsable(false) attributes, updated validation
Definitions/ObjectModels/Objects/Vehicle/BodySpriteFlags.cs Updated flag comments for clarity and marked deprecated flag
Definitions/ObjectModels/Objects/Vehicle/BodySprite.cs Added documentation comment explaining computed properties
Definitions/ObjectModels/Graphics/ImageTableGrouper.cs Implemented comprehensive vehicle image grouping with support for body and bogie sprites across different slopes and orientations
Dat/Loaders/Vehicle/VehicleObjectLoader.cs Added comment noting skipped additional image table setup
Dat/FileParsing/LocoBinaryWriter.cs Updated to write NumAnimationFrames and placeholder byte instead of NumRollSprites
Dat/FileParsing/LocoBinaryReader.cs Updated to read NumAnimationFrames and skip placeholder byte instead of reading NumRollSprites
Comments suppressed due to low confidence (1)

Gui/ViewModels/LocoTypes/Objects/Vehicle/VehicleViewModel.cs:24

  • An empty class VehicleComponentsViewModel has been added but contains no implementation. Empty classes add no value and should either be implemented or removed. If this is a placeholder for future work, it should not be committed until it has actual functionality.

@LeftofZen LeftofZen merged commit 64d1a72 into master Jan 4, 2026
@LeftofZen LeftofZen deleted the imageTableGroupingForVehicles branch January 4, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant