home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / TroyReturns.dxr / 00011.ls < prev    next >
Encoding:
Text File  |  2002-01-31  |  1.6 KB  |  45 lines

  1. on exitFrame me
  2.   global inputString, screenDimensions, playerSO, playerLocData, rumbleOffset, editmode, playerViewpoint, screenTileSize, terrainData_Type, textureBrush, mouseinput, locksOpened, maxLocks, lockedOffReigon, paletteScroll, scrollLeft, scrollRight, terrainRef
  3.   harvestinput()
  4.   repeat with wVector = 1 to 1
  5.     if inputString[[1, 4][wVector]] = 1 then
  6.       playerViewpoint[wVector] = playerViewpoint[wVector] - 60
  7.       if playerViewpoint[wVector] <= 0 then
  8.         playerViewpoint[wVector] = 1
  9.       end if
  10.       next repeat
  11.     end if
  12.     if inputString[[2, 3][wVector]] = 1 then
  13.       playerViewpoint[wVector] = playerViewpoint[wVector] + 60
  14.       maxValue = (([count(terrainData_Type[1]), count(terrainData_Type)][wVector] - screenDimensions[wVector] + 1) * 50) - 15
  15.       if playerViewpoint[wVector] > maxValue then
  16.         playerViewpoint[wVector] = maxValue
  17.       end if
  18.     end if
  19.   end repeat
  20.   if mouseinput = 1 then
  21.     editmode = #Terrain
  22.     case editmode of
  23.       #Terrain:
  24.         clickTile = ((playerViewpoint + the mouseLoc) / screenTileSize) + 1
  25.         terrainData_Type[clickTile[2]][clickTile[1]] = textureBrush
  26.     end case
  27.   end if
  28.   set the loc of sprite playerSO to playerLocData[3] - playerViewpoint + rumbleOffset
  29.   if scrollRight = 1 then
  30.     if paletteScroll > 0 then
  31.       paletteScroll = paletteScroll - 1
  32.     end if
  33.   end if
  34.   if scrollLeft = 1 then
  35.     if paletteScroll < (count(terrainRef) - 10) then
  36.       paletteScroll = paletteScroll + 1
  37.     end if
  38.   end if
  39.   updatePaletteTextures()
  40.   repositionTerrain()
  41.   redrawTerrainPics()
  42.   updateParalaxBG()
  43.   go(the frame)
  44. end
  45.