Skip to content

Commit 7a56ec3

Browse files
author
Ivo Zilkenat
committed
Merge origin/tmm-dev into tmm-dev
2 parents fab6023 + e6eed57 commit 7a56ec3

11 files changed

+257
-150
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Class {
2+
#name : #GMTEBlendLayersCommand,
3+
#superclass : #GMTETilemapSizeCommand,
4+
#category : #'GM-TE-UI'
5+
}

source/GM-TE/GMTECompositeCommand.class.st

Lines changed: 0 additions & 53 deletions
This file was deleted.

source/GM-TE/GMTEDeleteLayersCommand.class.st

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Class {
22
#name : #GMTEDeleteLayersCommand,
3-
#superclass : #GMTEEditTilesCommand,
3+
#superclass : #GMTETilemapSizeCommand,
44
#instVars : [
55
'layers'
66
],
@@ -9,13 +9,15 @@ Class {
99

1010
{
1111
#category : #'as yet unclassified',
12-
#'squeak_changestamp' : 'Alex M 7/10/2024 04:21'
12+
#'squeak_changestamp' : 'Alex M 7/12/2024 18:57'
1313
}
1414
GMTEDeleteLayersCommand class >> fromLayers: aLayerList editor: anEditor [
1515

1616
^ (self new)
1717
layers: ((SortedCollection sortBlock: [:a :b | a < b]) addAll: aLayerList; yourself);
1818
editor: anEditor;
19+
newSize: 0 @ 0;
20+
saveTiles;
1921
yourself
2022
]
2123

@@ -47,9 +49,10 @@ GMTEDeleteLayersCommand >> layers: anObject [
4749

4850
{
4951
#category : #execution,
50-
#'squeak_changestamp' : 'Alex M 7/10/2024 04:05'
52+
#'squeak_changestamp' : 'Alex M 7/12/2024 18:55'
5153
}
5254
GMTEDeleteLayersCommand >> undo [
5355

54-
self editor addTilemapLayersAt: self layers
56+
self editor addTilemapLayersAt: self layers.
57+
self restoreTiles
5558
]

source/GM-TE/GMTEEditTilesCommand.class.st

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,23 @@ GMTEEditTilesCommand >> initialize [
7777

7878
{
7979
#category : #execution,
80-
#'squeak_changestamp' : 'Alex M 7/10/2024 13:44'
80+
#'squeak_changestamp' : 'Alex M 7/12/2024 19:47'
8181
}
8282
GMTEEditTilesCommand >> placeTilesFromList: aList [
83-
| tile sprite layer x y |
83+
| tile sprite layer x y tileMap |
8484

85+
tileMap := self tileMap.
8586
aList keysDo: [ :coordinates |
8687
x := coordinates at: 1.
8788
y := coordinates at: 2.
8889
layer := coordinates at: 3.
8990

90-
tile := self tileMap tileMatrixStack layer: layer at: y at: x.
91+
tile := tileMap tileMatrixStack layer: layer at: y at: x.
9192
sprite := aList at: coordinates.
9293
tile
9394
ifNil: [sprite
9495
ifNotNil: [
95-
tile := tileMap generateTileAtlayer: layer x: x y: y stack: self tileMap tileMatrixStack tileType: GMTETile.
96+
tile := tileMap generateTileAtlayer: layer x: x y: y stack: tileMap tileMatrixStack tileType: GMTETile.
9697
tile updateSprite: sprite]]
9798
ifNotNil: [sprite
9899
ifNil: [

0 commit comments

Comments
 (0)