Here you go: I use multi .agc files but you don't have to.
Main.agc:
#include walls2_subimages.agc
GOSUB Setup_Atlas
walls2_subimage.agc:
Setup_Atlas:
Atlas_IMG = LoadImage ( "walls2.png" )
SetImageMagFilter( Atlas_IMG, 1 )
SetImageMinFilter( Atlas_IMG, 1 )
global wall1I
wall1I = LoadSubImage ( Atlas_IMG, "wall1.png" )
global wall2I
wall2I = LoadSubImage ( Atlas_IMG, "wall2.png" )
global wall3
wall3 = LoadSubImage ( Atlas_IMG, "wall3.png" )
global wall4
wall4 = LoadSubImage ( Atlas_IMG, "wall4.png" )
global wall5
wall5 = LoadSubImage ( Atlas_IMG, "wall5.png" )
global wall6
wall6 = LoadSubImage ( Atlas_IMG, "wall6.png" )
global wall7
wall7 = LoadSubImage ( Atlas_IMG, "wall7.png" )
global wall8
wall8 = LoadSubImage ( Atlas_IMG, "wall8.png" )
global wall9
wall9 = LoadSubImage ( Atlas_IMG, "wall9.png" )
global wall10
wall10 = LoadSubImage ( Atlas_IMG, "wall10.png" )
global wall11
wall11 = LoadSubImage ( Atlas_IMG, "wall11.png" )
global wall12
wall12 = LoadSubImage ( Atlas_IMG, "wall12.png" )
global wall13
wall13 = LoadSubImage ( Atlas_IMG, "wall13.png" )
global wall14
wall14 = LoadSubImage ( Atlas_IMG, "wall14.png" )
global wall15
wall15 = LoadSubImage ( Atlas_IMG, "wall15.png" )
global wall16
wall16 = LoadSubImage ( Atlas_IMG, "wall16.png" )
global wall17
wall17 = LoadSubImage ( Atlas_IMG, "wall17.png" )
global wall18
wall18 = LoadSubImage ( Atlas_IMG, "wall18.png" )
global door1
door1 = LoadSubImage ( Atlas_IMG, "door1.png" )
global door2
door2 = LoadSubImage ( Atlas_IMG, "door2.png" )
global door3
door3 = LoadSubImage ( Atlas_IMG, "door3.png" )
global door4
door4 = LoadSubImage ( Atlas_IMG, "door4.png" )
global door5
door5 = LoadSubImage ( Atlas_IMG, "door5.png" )
global door6
door6 = LoadSubImage ( Atlas_IMG, "door6.png" )
global door7
door7 = LoadSubImage ( Atlas_IMG, "door7.png" )
global door8
door8 = LoadSubImage ( Atlas_IMG, "door8.png" )
global door9
door9 = LoadSubImage ( Atlas_IMG, "door9.png" )
global floor1
floor1 = LoadSubImage ( Atlas_IMG, "floor1.png" )
global floor2
floor2 = LoadSubImage ( Atlas_IMG, "floor2.png" )
return
code for displaying the image:
wall1 = CreateSprite ( wall1I )
SetSpriteSize ( wall1 , 20 , -1 )
// setSpritePosition (wall1,45,20)
setSpriteDepth (wall1,5)
setSpriteShape(wall1, 0)
setSpritePhysicsOn (wall1, 1)
setSpriteGroup(wall1, 3)
Here is the .txt file that defines the images. Note the name of this file is the same name as the .png file in the first file it is walls2.png so this file must be called walls2 subimages.txt or walls2_subimages.txt (if you are going to use FE)
wall1.png:0:0:128:96
wall2.png:128:0:128:192
wall3.png:256:0:128:192
wall4.png:384:0:96:96
wall5.png:0:96:128:96
wall6.png:128:192:128:192
wall7.png:256:192:128:192
wall8.png:384:96:92:138
wall9.png:0:288:128:192
wall10.png:0:192:128:96
wall11.png:384:256:92:138
wall12.png:128:416:96:96
wall13.png:224:416:64:96
wall14.png:288:416:64:96
wall15.png:352:416:64:96
wall16.png:384:512:96:160
wall17.png:384:672:96:160
wall18.png:384:832:96:96
door1.png:0:512:128:192
door2.png:128:512:128:192
door3.png:256:512:128:192
door4.png:0:704:128:192
door5.png:128:704:128:192
door6.png:256:704:128:192
door7.png:0:928:128:96
door8.png:128:928:128:96
door9.png:256:928:128:96
floor1.png:416:416:64:48
floor2.png:416:464:64:48
Hope this helps