Skip to content

Commit

Permalink
Make GitAssetLoader non-madatory
Browse files Browse the repository at this point in the history
  • Loading branch information
ekrebs5 committed Sep 16, 2024
1 parent 3190c74 commit 67c4e50
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 37 deletions.
26 changes: 14 additions & 12 deletions .squot-materialize
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
'src'
]
},
SquotBlobMapper {
#path : FSAbsolutePath [
'testMapFile.morph'
],
#encoding : 'bin'
},
SquotImageMapper {
#path : FSAbsolutePath [
'GMTEIcons',
Expand Down Expand Up @@ -113,6 +107,13 @@
},
#path : @9
},
SquotBlobMapper {
#path : FSAbsolutePath [
'testingResources',
'map.morph'
],
#encoding : 'bin'
},
SquotCypressMapper {
#package : MCPackage {
#name : 'GameMecha-Examples'
Expand Down Expand Up @@ -194,12 +195,6 @@
],
#encoding : @4
},
SquotBlobMapper {
#path : FSAbsolutePath [
'map.morph'
],
#encoding : 'bin'
},
SquotImageMapper {
#path : FSAbsolutePath [
'GMTEIcons',
Expand All @@ -226,6 +221,13 @@
},
#path : @9
},
SquotBlobMapper {
#path : FSAbsolutePath [
'testingResources',
'testMapFile.morph'
],
#encoding : 'bin'
},
SquotCypressMapper {
#package : MCPackage {
#name : 'GameMecha-TileEditor'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ baseline: spec
<baseline>
spec
for: #'common'
do: [

self squotMapper: spec.

do: [
spec
package: 'GameMecha-ResourceLoading';
package: 'GameMecha-Collision';
package: 'GameMecha-KeyHandling';
package: 'GameMecha-TileEditor' with: [spec requires: #('Squot')];
package: 'GameMecha-TileEditor';
package: 'GameMecha-Examples' with: [spec requires: #('core')];
package: 'GameMecha-DemoGame' with: [spec requires: #('core')];
package: 'GameMecha-Test' with: [spec requires: #('core' 'GameMecha-Examples')].
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
"class" : {
},
"instance" : {
"baseline:" : "ek 9/13/2024 19:43",
"squotMapper:" : "ek 9/13/2024 17:43" } }
"baseline:" : "ek 9/16/2024 10:27" } }
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ loadTestMapFileToFileDirectory

|tempFile|
tempFile := FileDirectory default asFSReference / self fileUUID.
tempFile writeStreamDo: [:stream | stream nextPutAll: ((GitAssetLoader for: 'GameMecha') loadAsset: '/testMapFile.morph')]
tempFile writeStreamDo: [:stream | stream nextPutAll: (((Smalltalk at: #GitAssetLoader) for: 'GameMecha') loadAsset: '/testingResources/testMapFile.morph')]
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
editorTests
testDirectImport
"tests the creation of a tileMap from a local file path"
Smalltalk at: #GitAssetLoader ifAbsent: [^ self].

self loadTestMapFileToFileDirectory.
self assert: ((GMTEEditor getTileMapFromFilePath: self fileUUID) isKindOf: GMTETileMap)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
editorTests
testDirectImportFromAssetbrowser
"tests the creation of a tileMap from the git asset browser"
Smalltalk at: #GitAssetLoader ifAbsent: [^ self].

self assert: ((GMTEEditor getTileMapFromProjectName: 'GameMecha' withPath: '/testMapFile.morph') isKindOf: GMTETileMap)
self assert: ((GMTEEditor getTileMapFromProjectName: 'GameMecha' withPath: '/testingResources/testMapFile.morph') isKindOf: GMTETileMap)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
editorTests
testImportButton
"tests the import function"
Smalltalk at: #GitAssetLoader ifAbsent: [^ self].

self loadTestMapFileToFileDirectory.
[self editor importFromMorph] valueSupplyingAnswer: self fileUUID.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
"editor:" : "jj 6/22/2024 16:55",
"fileUUID" : "jj 6/22/2024 20:21",
"fileUUID:" : "jj 6/22/2024 16:55",
"loadTestMapFileToFileDirectory" : "JS 6/23/2024 18:18",
"loadTestMapFileToFileDirectory" : "ek 9/16/2024 10:25",
"setUp" : "jj 6/23/2024 18:55",
"tearDown" : "jj 6/22/2024 20:24",
"testAddLayerButton" : "JS 6/24/2024 00:19",
"testDeleteLayer" : "jj 6/22/2024 20:25",
"testDirectImport" : "jj 6/22/2024 20:30",
"testDirectImportFromAssetbrowser" : "jj 6/22/2024 20:30",
"testDirectImport" : "ek 9/16/2024 10:28",
"testDirectImportFromAssetbrowser" : "ek 9/16/2024 10:26",
"testExport" : "jj 6/23/2024 19:02",
"testExportButton" : "jj 6/22/2024 20:28",
"testImportButton" : "jj 6/22/2024 20:28",
"testImportButton" : "ek 9/16/2024 10:28",
"testMoveLayerDown" : "JS 6/25/2024 18:02",
"testMoveLayerUp" : "JS 6/25/2024 18:02",
"testMultiDeleteLayer" : "jj 6/22/2024 20:31",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
fileHandling
getTileMapFromProjectName: aName withPath: aPath
"Loads a tileMap from the git asset browser"

^ GMTEEditor getTileMapFromFileBinary: ((GitAssetLoader for: aName) loadAsset: aPath)
Smalltalk at: #GitAssetLoader
ifAbsent: [self error: 'Squot Mapper GitAssetLoader not available'.
^ self].
^ GMTEEditor getTileMapFromFileBinary: (((Smalltalk at: #GitAssetLoader) for: aName) loadAsset: aPath)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"getInputFieldSize" : "mcjj 7/12/2024 21:41",
"getTileMapFromFileBinary:" : "mcjj 7/12/2024 21:41",
"getTileMapFromFilePath:" : "mcjj 7/12/2024 21:43",
"getTileMapFromProjectName:withPath:" : "mcjj 7/12/2024 21:43",
"getTileMapFromProjectName:withPath:" : "ek 9/16/2024 10:25",
"getVisibilityIndicator:" : "mcjj 7/12/2024 21:44",
"hLayoutFrame:ofN:" : "mcjj 7/12/2024 21:47",
"hLayoutFrame:ofN:vSymmetric:" : "tw 7/11/2024 17:03",
Expand Down

0 comments on commit 67c4e50

Please sign in to comment.