Skip to content

Commit

Permalink
OpenInWorld from FilePath
Browse files Browse the repository at this point in the history
  • Loading branch information
JoRost committed May 30, 2024
1 parent 7a6b275 commit f16f570
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion source/GM-TE/GMTEEditor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,19 @@ GMTEEditor class >> fromTileHeight: aHeight widht: aWidth [
tileMatrixMorph updateMap.
]

{
#category : #'as yet unclassified',
#'squeak_changestamp' : 'JS 5/30/2024 16:29'
}
GMTEEditor class >> getTileMapFromFilePath: aFilePath [
|aFileStream morphOrList|

aFileStream := (MultiByteBinaryOrTextStream with: ((FileStream readOnlyFileNamed: aFilePath) binary contentsOfEntireFile)) binary reset.
morphOrList := aFileStream fileInObjectAndCode.
(morphOrList isKindOf: SqueakPage) ifTrue: [morphOrList := morphOrList contentsMorph].
^GMTETileMap newFrom: (morphOrList copy).
]

{
#category : #'as yet unclassified',
#'squeak_changestamp' : 'Alex M 5/28/2024 15:05'
Expand Down Expand Up @@ -451,7 +464,7 @@ GMTEEditor >> import [

{
#category : #'button functions',
#'squeak_changestamp' : 'TW 5/28/2024 16:21'
#'squeak_changestamp' : 'JS 5/30/2024 16:16'
}
GMTEEditor >> importFromMorph [
|fc stream aFileStream morphOrList|
Expand Down

0 comments on commit f16f570

Please sign in to comment.