rem ** -------------------- rem ** Variable Setup rem ** -------------------- set romsize 48k set tv pal rem set debug color set zoneheight 16 set screenheight 224 set plotvalueonscreen on rem ** Palette 0 - HUD / attacks P0C1=$0F P0C2=$47 P0C3=$00 rem ** Palette 1 - Green P1C1=$03 P1C2=$16 P1C3=$19 rem ** Palette 2 - Blue P2C1=$A2 P2C2=$A4 P2C3=$A7 rem ** Palette 3 - P4C1=$A9 P4C2=$B2 P4C3=$00 rem ** Palette 6 - Brown P6C1=$22 P6C2=$27 P6C3=$3A rem ** Palette 7 - Walls P7C1=$02 P7C2=$04 P7C3=$07 dim direction = a direction = 0 rem 0 = north rem 1 = east rem 2 = south rem 3 = west dim location = b rem location = 17 dim mapWidth = c mapWidth = 16 dim mapHeight = d mapHeight = 16 dim drawDistance = f dim joyDelay = g gosub resetJoyDelay dim movementSpeed = h dim turnSpeed = i dim attackSpeed = j dim hp = k hp = $99 dim attack = l attack = $3 dim currentMap = m dim ceilingColour = n dim fogColour = o dim floorColour = p dim attackDelay = w attackDelay=0 dim attackAnimFrame=x attackAnimFrame=0 dim attackAnimdelay=y attackAnimFrame=0 dim objectCount = z objectCount = 16 rem Storage for checking visible tile (including M3 to check distance walls) dim viewL0 = var0 dim viewR0 = var1 dim viewM0 = var2 dim viewL1 = var3 dim viewR1 = var4 dim viewM1 = var5 dim viewL2 = var6 dim viewR2 = var7 dim viewM2 = var8 dim viewM3 = var9 rem Storage for checking visible enemies dim enemyM0 = var10 dim enemyM1 = var11 dim enemyM2 = var12 rem Storage for checking visible objects dim objectM0 = var13 dim objectM1 = var14 dim objectM2 = var15 rem Storage for RAM Copy of Map dim wallsMap = $2200 rem dim enemiesMap = $2300 rem dim objectsMap = $2400 dim objectID = $2300 dim objectLocation = $2310 dim objectHealth = $2320 rem dim objectAttack = $2360 dim objectMovementSpeed = $2330 rem dim objectAttackSpeed = $23A0 rem dim objectSolid = $23C0 rem dim = $23E0 dim mapName = $2500 dim hudTileMap = $25CF dim l0TileMap = $266F dim l1TileMap = $26BF dim l2TileMap = $270F dim r0TileMap = $2723 dim r1TileMap = $2773 dim r2TileMap = $27C3 dim m3TileMap = $27D7 rem ** -------------------- rem ** Load Data rem ** -------------------- rem ~Title~ rem ~HUD~ incgraphic gfx/text.png 320A 1 0 0 incgraphic gfx/textDouble.png 320A 1 0 0 incgraphic gfx/CompassN.png 320A 0 1 incbanner gfx/weapon.png 320A 0 1 newblock rem ~Walls~ incgraphic gfx/wallsStone/StoneL0.png 160A 0 2 1 3 7 incgraphic gfx/wallsStone/StoneR0.png 160A 0 1 2 3 7 incgraphic gfx/wallsStone/StoneM0.png 160A 0 1 2 3 7 incgraphic gfx/wallsStone/StoneL1.png 160A 0 1 2 3 7 incgraphic gfx/wallsStone/StoneR1.png 160A 1 2 3 0 7 incgraphic gfx/wallsStone/StoneM1.png 160A 1 0 2 3 7 incgraphic gfx/wallsStone/Stone2.png 160A 1 0 2 3 7 rem newblock rem ~Things~ incbanner gfx/Creature/Creature0.png 160A 0 3 2 1 incbanner gfx/Creature/Creature1.png 160A 0 3 2 1 incbanner gfx/Creature/Creature2.png 160A 0 2 3 1 incgraphic gfx/Items/Puddle1.png 160A 0 3 2 1 incgraphic gfx/Items/Puddle2.png 160A 0 3 2 1 incbanner gfx/Door.png 160A 1 2 0 3 rem newblock rem ~Attacks~ incbanner gfx/Attacks/slash1.png 160A 0 1 2 3 incbanner gfx/Attacks/slash2.png 160A 0 1 2 3 incbanner gfx/Attacks/slash3.png 160A 0 1 2 3 rem ** -------------------- rem ** Title Loop rem ** -------------------- characterset text alphachars '0123456789abcdefghijklmnopqrstuvwxyz -*!^:' clearscreen BACKGRND=$00 P0C1=$0F P0C2=$0F P0C3=$0F rem plotbanner titleMoon 0 8 16 titleLoop drawscreen BACKGRND=$00 for temp1=0 to 60 WSYNC=1 next asm lda #%01000011 sta CTRL sta sCTRL end if joy0fire0 then goto skipTitle if joy0fire1 then goto skipTitle rem goto titleLoop skipTitle clearscreen P0C1=$00 P0C2=$00 P0C3=$00 plotmapfile gfx/HUDMap.tmx HUDMap 0 0 40 4 rem plotchars 'mp:' 0 8 3 rem plotchars 'foc:' 0 36 3 rem plotchars 'lck:' 0 68 3 rem plotchars 'poisoned!' 0 112 3 plotbanner weapon 0 112 24 plotbanner weapon 0 128 24 plotmap mapName 0 8 1 24 1 rem memset mapName 0 26 plotmap l0TileMap 7 0 4 4 10 plotmap l1TileMap 7 32 4 4 10 plotmap l2TileMap 7 64 4 1 10 plotmap m3TileMap 7 72 4 2 10 plotmap r2TileMap 7 88 4 1 10 plotmap r1TileMap 7 96 4 4 10 plotmap r0TileMap 7 128 4 4 10 savescreen incmapfile gfx/HUDMap.tmx set doublewide on incmapfile gfx/wallsStone/StoneL0Map.tmx incmapfile gfx/wallsStone/StoneR0Map.tmx incmapfile gfx/wallsStone/StoneGapL0Map.tmx incmapfile gfx/wallsStone/StoneGapR0Map.tmx incmapfile gfx/wallsStone/StoneM0MapL1.tmx incmapfile gfx/wallsStone/StoneM0MapL2.tmx incmapfile gfx/wallsStone/StoneM0MapM3.tmx incmapfile gfx/wallsStone/StoneM0MapR2.tmx incmapfile gfx/wallsStone/StoneM0MapR1.tmx incmapfile gfx/wallsStone/StoneM0Map2L1.tmx incmapfile gfx/wallsStone/StoneM0Map2R1.tmx incmapfile gfx/wallsStone/StoneL1Map.tmx incmapfile gfx/wallsStone/StoneR1Map.tmx incmapfile gfx/wallsStone/StoneGapL1Map.tmx incmapfile gfx/wallsStone/StoneGapR1Map.tmx incmapfile gfx/wallsStone/StoneM1MapL2.tmx incmapfile gfx/wallsStone/StoneM1MapM3.tmx incmapfile gfx/wallsStone/StoneM1MapR2.tmx incmapfile gfx/wallsStone/StoneL2Map.tmx incmapfile gfx/wallsStone/StoneR2Map.tmx incmapfile gfx/wallsStone/StoneGapL2Map.tmx incmapfile gfx/wallsStone/StoneGapR2Map.tmx incmapfile gfx/wallsStone/StoneM2Map.tmx rem ** -------------------- rem ** Main Loop rem ** -------------------- currentMap=1 rem memcpy wallsMap Map1 256 rem memcpy enemiesMap Enemies1 256 rem memcpy objectsMap Objects1 256 gosub changeMap mainloop if joy0up && joyDelay=0 then gosub resetJoyDelay: goto moveForward if joy0down && joyDelay=0 then gosub resetJoyDelay: goto moveBackward goto doneYInput moveForward temp1 = location if direction = 0 then location = location - mapWidth if direction = 1 then location = location +1 if direction = 2 then location = location + mapWidth if direction = 3 then location = location -1 if wallsMap[location] >0 && wallsMap[location] <>9 then location = temp1 rem playsfx sfx_jumpman 0 goto doneYInput moveBackward temp1 = location if direction = 0 then location = location + mapWidth if direction = 1 then location = location -1 if direction = 2 then location = location - mapWidth if direction = 3 then location = location +1 if wallsMap[location] >0 then location = temp1 rem playsfx sfx_jumpman 0 doneYInput if joy0left && joyDelay=0 then gosub resetJoyDelay: goto rotateLeft if joy0right && joyDelay=0 then gosub resetJoyDelay: goto rotateRight goto doneXInput rotateLeft direction = direction-1 if direction > 3 then direction = 3 goto doneXInput rotateRight direction = direction+1 if direction > 3 then direction = 0 doneXInput if joyDelay >0 then joyDelay = joyDelay-1 if attackDelay >0 then attackDelay = attackDelay-1 if attackAnimdelay > 0 then attackAnimdelay = attackAnimdelay-1 if attackAnimdelay =0 && attackAnimFrame>0 then attackAnimdelay = 1 : attackAnimFrame=attackAnimFrame-1 if joy0fire0 && joyDelay > 6 then joyDelay = 6 : dec hp=hp+1 if !joy0fire1 || attackDelay >0 then goto skipfire1 attackDelay=30 for temp9 = 0 to objectCount if objectLocation[temp9]=location then objectHealth[temp9]=objectHealth[temp9]-1 next attackAnimFrame=3 attackAnimdelay=1 temp1 = rand&3 playsfx sfx_attack skipfire1 rem ~Objects Act~ for temp9 = 0 to objectCount if objectID[temp9]=1 then gosub enemy1Act next if wallsMap[location] = 9 then currentMap=currentMap+1 : gosub changeMap gosub checkMap gosub getDrawDistance drawwait BACKGRND=$00 asm lda #%11000011 sta CTRL sta sCTRL end characterset text drawscreen rem ~HUD~ WSYNC=1 WSYNC=1 WSYNC=1 WSYNC=1 BACKGRND=$0F for temp1=0 to 60 WSYNC=1 next asm lda #%01010000 sta CTRL sta sCTRL end characterset StoneL0 BACKGRND=ceilingColour for temp1=0 to 71 WSYNC=1 next BACKGRND=fogColour for temp1=0 to 15 WSYNC=1 next BACKGRND=floorColour for temp1=0 to 71 WSYNC=1 next characterset text restorescreen if direction = 0 then plotsprite CompassN 0 146 19 : goto skipCompassDraw if direction = 1 then plotsprite CompassN 0 150 28 : goto skipCompassDraw if direction = 2 then plotsprite CompassN 0 146 36 : goto skipCompassDraw if direction = 3 then plotsprite CompassN 0 141 28 : goto skipCompassDraw skipCompassDraw plotvalue textDouble 0 hp 2 20 2 plotvalue textDouble 0 hp 2 52 2 plotvalue textDouble 0 hp 2 84 2 plotvalue textDouble 0 hp 2 20 3 plotvalue textDouble 0 hp 2 52 3 plotvalue textDouble 0 hp 2 84 3 if drawDistance = 2 then gosub draw2 if drawDistance = 1 then gosub draw1 if drawDistance = 0 then gosub draw0 if attackAnimFrame = 0 then goto skipDrawingAttack if attackAnimFrame = 1 then plotbanner slash1 2 32 64 : goto skipDrawingAttack if attackAnimFrame = 2 then plotbanner slash2 2 32 64 : goto skipDrawingAttack if attackAnimFrame = 3 then plotbanner slash3 2 32 64 : goto skipDrawingAttack skipDrawingAttack rem ~Draw the screen and any any gradients drawwait BACKGRND=$00 asm lda #%11000011 sta CTRL sta sCTRL end characterset text drawscreen rem ~HUD~ WSYNC=1 WSYNC=1 WSYNC=1 WSYNC=1 BACKGRND=$0F for temp1=0 to 60 WSYNC=1 next asm lda #%01010000 sta CTRL sta sCTRL end characterset StoneL0 BACKGRND=ceilingColour for temp1=0 to 71 WSYNC=1 next BACKGRND=fogColour for temp1=0 to 15 WSYNC=1 next BACKGRND=floorColour for temp1=0 to 71 WSYNC=1 next rem drawwait rem BACKGRND=$00 goto mainloop rem ** -------------------- rem ** SubRoutines rem ** -------------------- draw0 rem ~Left 0~ if viewL0 >0 then memcpy l0TileMap StoneL0Map 40 if viewL0 = 0 then memcpy l0TileMap StoneGapL0Map 40 rem ~Right 0~ if viewR0 >0 then memcpy r0TileMap StoneR0Map 40 if viewR0 = 0 then memcpy r0TileMap StoneGapR0Map 40 rem ~Front 0~ if viewM1 <> 9 then goto skipDoor memcpy l1TileMap StoneM0MapL1 40: memcpy l2TileMap StoneM0MapL2 10: memcpy m3TileMap StoneM0MapM3 20: memcpy r2TileMap StoneM0MapR2 10: memcpy r1TileMap StoneM0MapR1 40 plotbanner Door 6 64 112 skipDoor if viewM1 = 1 then memcpy l1TileMap StoneM0MapL1 40: memcpy l2TileMap StoneM0MapL2 10: memcpy m3TileMap StoneM0MapM3 20: memcpy r2TileMap StoneM0MapR2 10: memcpy r1TileMap StoneM0MapR1 40 if viewM1 = 2 then memcpy l1TileMap StoneM0Map2L1 40: memcpy l2TileMap StoneM0MapL2 10: memcpy m3TileMap StoneM0MapM3 20: memcpy r2TileMap StoneM0MapR2 10: memcpy r1TileMap StoneM0Map2R1 40 if enemyM0 = 1 then plotbanner Creature0 1 48 154 drawDistance = drawDistance-1 return draw1 rem ~Left 1~ if viewL1 >0 then memcpy l1TileMap StoneL1Map 40 if viewL1 = 0 then memcpy l1TileMap StoneGapL1Map 40 rem ~Right 1~ if viewR1 >0 then memcpy r1TileMap StoneR1Map 40 if viewR1 = 0 then memcpy r1TileMap StoneGapR1Map 40 rem ~Front 1~ if viewM2 >0 then memcpy l2TileMap StoneM1MapL2 10: memcpy m3TileMap StoneM1MapM3 20: memcpy r2TileMap StoneM1MapR2 10 if objectM1 = 128 then plotsprite Puddle1 2 64 160 if enemyM1 = 1 then plotbanner Creature1 1 64 144 drawDistance = drawDistance-1 return draw2 rem ~Left 2~ if viewL2 >0 then memcpy l2TileMap StoneL2Map 10 if viewL2 = 0 then memcpy l2TileMap StoneGapL2Map 10 rem ~Right 2~ if viewR2 >0 then memcpy r2TileMap StoneR2Map 10 if viewR2 = 0 then memcpy r2TileMap StoneGapR2Map 10 rem ~Front 2~ if viewM3 >0 then memcpy m3TileMap StoneM2Map 20 if viewM3 = 0 then memset m3TileMap 0 20 if objectM2 = 128 then plotsprite Puddle2 2 72 144 if enemyM2 = 1 then plotbanner Creature2 1 72 140 drawDistance = drawDistance-1 return getDrawDistance drawDistance = 2 if viewM3 > 0 then drawDistance = 2 if viewM2 > 0 then drawDistance = 1 if viewM1 > 0 then drawDistance = 0 return resetJoyDelay joyDelay = 12 rem if joy0fire0 then joyDelay = 15 return rem ** Get map tiles for the correct direction checkMap if direction = 0 then goto checkMapNorth if direction = 1 then goto checkMapEast if direction = 2 then goto checkMapSouth if direction = 3 then goto checkMapWest checkMapNorth temp1 = location-1 viewL0 = wallsMap[temp1] temp1 = location+1 viewR0 = wallsMap[temp1] temp2 = location viewM0 = wallsMap[temp2] rem enemyM0 = enemiesMap[temp1] rem objectM0 = objectsMap[temp1] temp1 = location-1-mapWidth viewL1 = wallsMap[temp1] temp1 = location+1-mapWidth viewR1 = wallsMap[temp1] temp3 = location-mapWidth viewM1 = wallsMap[temp3] rem enemyM1 = enemiesMap[temp1] rem objectM1 = objectsMap[temp1] temp1 = location-1-mapWidth-mapWidth viewL2 = wallsMap[temp1] temp1 = location+1-mapWidth-mapWidth viewR2 = wallsMap[temp1] temp4 = location-mapWidth-mapWidth viewM2 = wallsMap[temp4] rem enemyM2 = enemiesMap[temp1] rem objectM2 = objectsMap[temp1] temp1 = location-mapWidth-mapWidth-mapWidth viewM3 = wallsMap[temp1] enemyM0=0 enemyM1=0 enemyM2=0 objectM0=0 objectM1=0 objectM2=0 for temp9 = 0 to objectCount if objectLocation[temp9]=temp2 && objectID[temp9] <128 then enemyM0 = objectID[temp9] if objectLocation[temp9]=temp3 && objectID[temp9] <128 then enemyM1 = objectID[temp9] if objectLocation[temp9]=temp4 && objectID[temp9] <128 then enemyM2 = objectID[temp9] if objectLocation[temp9]=temp2 && objectID[temp9] >=128 then objectM0 = objectID[temp9] if objectLocation[temp9]=temp3 && objectID[temp9] >=128 then objectM1 = objectID[temp9] if objectLocation[temp9]=temp4 && objectID[temp9] >=128 then objectM2 = objectID[temp9] next return checkMapEast temp1 = location-mapWidth viewL0 = wallsMap[temp1] temp1 = location+mapWidth viewR0 = wallsMap[temp1] temp2 = location viewM0 = wallsMap[temp2] rem enemyM0 = enemiesMap[temp1] rem objectM0 = objectsMap[temp1] temp1 = location+1-mapWidth viewL1 = wallsMap[temp1] temp1 = location+1+mapWidth viewR1 = wallsMap[temp1] temp3 = location+1 viewM1 = wallsMap[temp3] rem enemyM1 = enemiesMap[temp1] rem objectM1 = objectsMap[temp1] temp1 = location+2-mapWidth viewL2 = wallsMap[temp1] temp1 = location+2+mapWidth viewR2 = wallsMap[temp1] temp4 = location+2 viewM2 = wallsMap[temp4] rem enemyM2 = enemiesMap[temp1] rem objectM2 = objectsMap[temp1] temp1 = location+3 viewM3 = wallsMap[temp1] enemyM0=0 enemyM1=0 enemyM2=0 objectM0=0 objectM1=0 objectM2=0 for temp9 = 0 to objectCount if objectLocation[temp9]=temp2 && objectID[temp9] <128 then enemyM0 = objectID[temp9] if objectLocation[temp9]=temp3 && objectID[temp9] <128 then enemyM1 = objectID[temp9] if objectLocation[temp9]=temp4 && objectID[temp9] <128 then enemyM2 = objectID[temp9] if objectLocation[temp9]=temp2 && objectID[temp9] >=128 then objectM0 = objectID[temp9] if objectLocation[temp9]=temp3 && objectID[temp9] >=128 then objectM1 = objectID[temp9] if objectLocation[temp9]=temp4 && objectID[temp9] >=128 then objectM2 = objectID[temp9] next return checkMapSouth temp1 = location+1 viewL0 = wallsMap[temp1] temp1 = location-1 viewR0 = wallsMap[temp1] temp2 = location viewM0 = wallsMap[temp2] rem enemyM0 = enemiesMap[temp1] rem objectM0 = objectsMap[temp1] temp1 = location+1+mapWidth viewL1 = wallsMap[temp1] temp1 = location-1+mapWidth viewR1 = wallsMap[temp1] temp3 = location+mapWidth viewM1 = wallsMap[temp3] rem enemyM1 = enemiesMap[temp1] rem objectM1 = objectsMap[temp1] temp1 = location+1+mapWidth+mapWidth viewL2 = wallsMap[temp1] temp1 = location-1+mapWidth+mapWidth viewR2 = wallsMap[temp1] temp4 = location+mapWidth+mapWidth viewM2 = wallsMap[temp4] rem enemyM2 = enemiesMap[temp1] rem objectM2 = objectsMap[temp1] temp1 = location+mapWidth+mapWidth+mapWidth viewM3 = wallsMap[temp1] enemyM0=0 enemyM1=0 enemyM2=0 objectM0=0 objectM1=0 objectM2=0 for temp9 = 0 to objectCount if objectLocation[temp9]=temp2 && objectID[temp9] <128 then enemyM0 = objectID[temp9] if objectLocation[temp9]=temp3 && objectID[temp9] <128 then enemyM1 = objectID[temp9] if objectLocation[temp9]=temp4 && objectID[temp9] <128 then enemyM2 = objectID[temp9] if objectLocation[temp9]=temp2 && objectID[temp9] >=128 then objectM0 = objectID[temp9] if objectLocation[temp9]=temp3 && objectID[temp9] >=128 then objectM1 = objectID[temp9] if objectLocation[temp9]=temp4 && objectID[temp9] >=128 then objectM2 = objectID[temp9] next return checkMapWest temp1 = location+mapWidth viewL0 = wallsMap[temp1] temp1 = location-mapWidth viewR0 = wallsMap[temp1] temp2 = location viewM0 = wallsMap[temp2] rem enemyM0 = enemiesMap[temp1] rem objectM0 = objectsMap[temp1] temp1 = location-1+mapWidth viewL1 = wallsMap[temp1] temp1 = location-1-mapWidth viewR1 = wallsMap[temp1] temp3 = location-1 viewM1 = wallsMap[temp3] rem enemyM1 = enemiesMap[temp1] rem objectM1 = objectsMap[temp1] temp1 = location-2+mapWidth viewL2 = wallsMap[temp1] temp1 = location-2-mapWidth viewR2 = wallsMap[temp1] temp4 = location-2 viewM2 = wallsMap[temp4] rem enemyM2 = enemiesMap[temp1] rem objectM2 = objectsMap[temp1] temp1 = location-3 viewM3 = wallsMap[temp1] enemyM0=0 enemyM1=0 enemyM2=0 objectM0=0 objectM1=0 objectM2=0 for temp9 = 0 to objectCount if objectLocation[temp9]=temp2 && objectID[temp9] <128 then enemyM0 = objectID[temp9] if objectLocation[temp9]=temp3 && objectID[temp9] <128 then enemyM1 = objectID[temp9] if objectLocation[temp9]=temp4 && objectID[temp9] <128 then enemyM2 = objectID[temp9] if objectLocation[temp9]=temp2 && objectID[temp9] >=128 then objectM0 = objectID[temp9] if objectLocation[temp9]=temp3 && objectID[temp9] >=128 then objectM1 = objectID[temp9] if objectLocation[temp9]=temp4 && objectID[temp9] >=128 then objectM2 = objectID[temp9] next return changeMap if currentMap <> 1 then goto skipMap1 memcpy mapName Map1Name 24 location = 20 direction = 2 ceilingColour = $00 fogColour = $00 floorColour = $F0 memcpy wallsMap Map1 256 memset objectID 1 128 memset objectLocation 22 128 memset objectHealth 1 128 objectID[0]=1 objectLocation[0]=17 objectMovementSpeed[0] = 50 objectID[1]=1 objectLocation[1]=20 objectMovementSpeed[1] = 50 objectID[2]=1 objectLocation[2]=22 objectMovementSpeed[2] = 50 objectID[16]=128 objectLocation[16]=20 skipMap1 if currentMap <> 2 then goto skipMap2 memcpy mapName Map2Name 24 location = 17 direction = 0 ceilingColour = $A1 fogColour = $00 floorColour = $61 memcpy wallsMap Map2 256 memset objectID 1 128 memset objectLocation 22 128 memset objectHealth 1 128 objectID[0]=1 objectLocation[0]=17 objectMovementSpeed[0] = 50 objectID[1]=1 objectLocation[1]=20 objectMovementSpeed[1] = 50 objectID[2]=1 objectLocation[2]=22 objectMovementSpeed[2] = 50 objectID[16]=128 objectLocation[16]=20 skipMap2 return rem ** -------------------- rem ** Enemy Subroutines rem ** -------------------- enemy1Act if objectHealth[temp9]=0 then objectID[temp9]=0 : goto enemy1SkipAct if objectMovementSpeed[temp9] > 0 then goto enemy1SkipMove temp8 = objectLocation[temp9] temp7=rand if temp7 <64 then goto enemy1MoveNorth if temp7 <128 then goto enemy1MoveEast if temp7 <192 then goto enemy1MoveSouth if temp7 <255 then goto enemy1MoveWest enemy1MoveNorth temp7=temp8-mapWidth if wallsMap[temp7]=0 then objectLocation[temp9]=temp7 objectMovementSpeed[temp9] = 60 goto enemy1SkipMove enemy1MoveEast temp7=temp8+1 if wallsMap[temp7]=0 then objectLocation[temp9]=temp7 objectMovementSpeed[temp9] = 60 goto enemy1SkipMove enemy1MoveSouth temp7=temp8+mapWidth if wallsMap[temp7]=0 then objectLocation[temp9]=temp7 objectMovementSpeed[temp9] = 60 goto enemy1SkipMove enemy1MoveWest temp7=temp8-1 if wallsMap[temp7]=0 then objectLocation[temp9]=temp7 objectMovementSpeed[temp9] = 60 goto enemy1SkipMove enemy1SkipMove objectMovementSpeed[temp9] = objectMovementSpeed[temp9]-1 enemy1SkipAct return rem ** -------------------- rem ** Define Data rem ** -------------------- data sfx_jumpman 16, 5, 4 ; version, priority, frames per chunk $1E,$04,$08 ; 1st chunk of freq,channel,volume data $1B,$04,$08 ; 2nd chunk $18,$04,$08 ; 3rd chunk $11,$04,$08 ; 4th chunk $16,$04,$08 ; 5th chunk $00,$00,$00 ; End Of Sound marker end data sfx_attack 16, 5, 1 ; version, priority, frames per chunk $01,$04,$08 ; 1st chunk of freq,channel,volume data $02,$04,$08 ; 2nd chunk $03,$04,$08 ; 3rd chunk $04,$04,$08 ; 4th chunk $05,$04,$08 ; 5th chunk $00,$00,$00 ; End Of Sound marker end data Map1Name 29,17,14,36,16,10,27,13,14,23,36,21,10,11,34,27,18,23,29,17,36,36,36,36 end data Map2Name 29,17,14,36,29,32,18,28,29,34,36,22,10,35,14,36,36,36,36,36,36,36,36,36 end data Map1 1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1 1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1 1,1,0,1,0,1,0,2,1,1,1,1,1,1,1,1 1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1 1,2,0,2,0,1,0,1,1,1,1,1,1,1,1,1 1,1,0,0,0,0,0,2,1,1,1,1,1,1,1,1 1,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1 1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1 1,1,1,0,2,0,1,1,1,1,1,1,1,1,1,1 1,1,1,0,1,0,1,1,0,0,0,0,0,0,0,1 1,1,2,0,0,0,1,1,0,1,2,1,1,1,0,1 1,1,1,1,0,1,1,1,0,1,0,0,9,1,0,1 1,1,1,1,0,2,1,1,0,1,0,1,2,1,0,2 1,1,1,1,0,1,1,1,0,1,0,1,1,1,0,1 1,1,1,1,0,0,0,0,0,1,0,0,0,0,0,1 1,1,1,1,2,1,1,1,2,1,2,1,1,1,1,1 end data Map2 1,2,1,1,2,1,1,1,1,1,1,1,1,1,1,1 2,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1 1,0,1,1,0,1,0,1,1,1,1,1,1,1,1,1 1,2,1,1,0,0,0,1,1,1,1,1,1,1,1,1 1,0,1,1,0,1,0,1,1,1,1,1,1,1,1,1 1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1 1,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1 1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1 1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1 1,1,0,1,1,1,1,0,0,1,0,1,1,1,1,1 1,1,0,9,1,1,1,1,0,0,0,0,0,1,1,1 1,1,1,1,1,1,1,0,0,1,0,1,0,1,1,1 1,1,1,1,1,1,0,0,1,1,1,1,0,1,1,1 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 end