Fix default object sprites
This commit is contained in:
parent
11c2868b90
commit
0b6d61e3f1
2 changed files with 7 additions and 0 deletions
|
@ -12,6 +12,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fix text boxes in the Palette Editor calculating color incorrectly.
|
- Fix text boxes in the Palette Editor calculating color incorrectly.
|
||||||
|
- Fix default object sprites retaining dimensions and transparency of the previous sprite.
|
||||||
|
|
||||||
## [5.1.1] - 2023-02-20
|
## [5.1.1] - 2023-02-20
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -244,6 +244,9 @@ void ObjectEvent::loadPixmap(Project *project) {
|
||||||
// No sprite associated with this gfx constant.
|
// No sprite associated with this gfx constant.
|
||||||
// Use default sprite instead.
|
// Use default sprite instead.
|
||||||
this->pixmap = project->entitiesPixmap.copy(0, 0, 16, 16);
|
this->pixmap = project->entitiesPixmap.copy(0, 0, 16, 16);
|
||||||
|
this->spriteWidth = 16;
|
||||||
|
this->spriteHeight = 16;
|
||||||
|
this->usingSprite = false;
|
||||||
} else {
|
} else {
|
||||||
this->setFrameFromMovement(project->facingDirections.value(this->movement));
|
this->setFrameFromMovement(project->facingDirections.value(this->movement));
|
||||||
this->setPixmapFromSpritesheet(eventGfx->spritesheet, eventGfx->spriteWidth, eventGfx->spriteHeight, eventGfx->inanimate);
|
this->setPixmapFromSpritesheet(eventGfx->spritesheet, eventGfx->spriteWidth, eventGfx->spriteHeight, eventGfx->inanimate);
|
||||||
|
@ -387,6 +390,9 @@ void CloneObjectEvent::loadPixmap(Project *project) {
|
||||||
// No sprite associated with this gfx constant.
|
// No sprite associated with this gfx constant.
|
||||||
// Use default sprite instead.
|
// Use default sprite instead.
|
||||||
this->pixmap = project->entitiesPixmap.copy(0, 0, 16, 16);
|
this->pixmap = project->entitiesPixmap.copy(0, 0, 16, 16);
|
||||||
|
this->spriteWidth = 16;
|
||||||
|
this->spriteHeight = 16;
|
||||||
|
this->usingSprite = false;
|
||||||
} else {
|
} else {
|
||||||
this->setFrameFromMovement(project->facingDirections.value(this->movement));
|
this->setFrameFromMovement(project->facingDirections.value(this->movement));
|
||||||
this->setPixmapFromSpritesheet(eventGfx->spritesheet, eventGfx->spriteWidth, eventGfx->spriteHeight, eventGfx->inanimate);
|
this->setPixmapFromSpritesheet(eventGfx->spritesheet, eventGfx->spriteWidth, eventGfx->spriteHeight, eventGfx->inanimate);
|
||||||
|
|
Loading…
Reference in a new issue