home *** CD-ROM | disk | FTP | other *** search
- on exitFrame me
- global inputString, screenDimensions, playerSO, playerLocData, rumbleOffset, editmode, playerViewpoint, screenTileSize, terrainData_Type, textureBrush, mouseinput, locksOpened, maxLocks, lockedOffReigon, paletteScroll, scrollLeft, scrollRight, terrainRef
- harvestinput()
- repeat with wVector = 1 to 1
- if inputString[[1, 4][wVector]] = 1 then
- playerViewpoint[wVector] = playerViewpoint[wVector] - 60
- if playerViewpoint[wVector] <= 0 then
- playerViewpoint[wVector] = 1
- end if
- next repeat
- end if
- if inputString[[2, 3][wVector]] = 1 then
- playerViewpoint[wVector] = playerViewpoint[wVector] + 60
- maxValue = (([count(terrainData_Type[1]), count(terrainData_Type)][wVector] - screenDimensions[wVector] + 1) * 50) - 15
- if playerViewpoint[wVector] > maxValue then
- playerViewpoint[wVector] = maxValue
- end if
- end if
- end repeat
- if mouseinput = 1 then
- editmode = #Terrain
- case editmode of
- #Terrain:
- clickTile = ((playerViewpoint + the mouseLoc) / screenTileSize) + 1
- terrainData_Type[clickTile[2]][clickTile[1]] = textureBrush
- end case
- end if
- set the loc of sprite playerSO to playerLocData[3] - playerViewpoint + rumbleOffset
- if scrollRight = 1 then
- if paletteScroll > 0 then
- paletteScroll = paletteScroll - 1
- end if
- end if
- if scrollLeft = 1 then
- if paletteScroll < (count(terrainRef) - 10) then
- paletteScroll = paletteScroll + 1
- end if
- end if
- updatePaletteTextures()
- repositionTerrain()
- redrawTerrainPics()
- updateParalaxBG()
- go(the frame)
- end
-