Skip to content

Commit

Permalink
tilestore performance improvement, removed debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksander Morgensterns committed Jun 13, 2024
1 parent 6e60ebd commit cfea4cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
5 changes: 1 addition & 4 deletions source/GM-TE/GMTEEditableTileMap.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,13 @@ GMTEEditableTileMap >> tileSelectionSet: anObject [

{
#category : #updating,
#'squeak_changestamp' : 'Alex M 6/14/2024 01:43'
#'squeak_changestamp' : 'Alex M 6/14/2024 01:49'
}
GMTEEditableTileMap >> updateTile: aTile inLayer: aLayer FromEvent: anEvent [
| tileIdx hoveredTile |

hoveredTile := aTile.

Transcript show: hoveredTile.
Transcript show: self model selectedTile.

(anEvent redButtonPressed and: [self model selectedTile notNil])
ifTrue: [hoveredTile
ifNil: [
Expand Down
24 changes: 7 additions & 17 deletions source/GM-TE/GMTETileContainer.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@ GMTETileContainer class >> withParent: aParent [
^container
]

{
#category : #'as yet unclassified',
#'squeak_changestamp' : 'Alex M 5/24/2024 00:35'
}
GMTETileContainer >> extent: anExtent [
| n gap |
super extent: anExtent.
"n := self width / 30.
gap := self width - (n floor * 30) / n.
self submorphs do: [ :tile|
tile extent: (30 + gap - 2)
]"
]

{
#category : #accessing,
#'squeak_changestamp' : 'Alex M 5/21/2024 16:49'
Expand All @@ -59,12 +45,16 @@ GMTETileContainer >> parent: anObject [

{
#category : #'as yet unclassified',
#'squeak_changestamp' : 'Alex M 5/24/2024 00:37'
#'squeak_changestamp' : 'Alex M 6/14/2024 01:52'
}
GMTETileContainer >> step [
| n gap minTileSize |
self parent ifNotNil:[self extent: parent extent ].
minTileSize := 40. "Magic number currently".

(self parent isNil or: [self parent extent = self extent])
ifTrue: [^nil].

self extent: parent extent.
minTileSize := 40. "Magic number currently."
n := self width / minTileSize.
gap := self width - (n floor * minTileSize) / n.
self submorphs do: [ :tile|
Expand Down

0 comments on commit cfea4cd

Please sign in to comment.