home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / BeaverFever.dxr / 00004.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  2.7 KB  |  58 lines

  1. on drawShore
  2.   global riverOffset, riverWidth, playerPosition, riverScroll, debrisData, scrollingSpeed, playerlevel, playerData, riverDisplayType, animatedGifFlag, riverFrame
  3.   playerPosition = playerPosition + scrollingSpeed
  4.   bankScroll = playerPosition mod 60
  5.   if bankScroll = 0 then
  6.     bankScroll = 60
  7.   end if
  8.   bankAlternate = playerPosition mod 120
  9.   if bankAlternate = 0 then
  10.     bankAlternate = 120
  11.   end if
  12.   riverScroll = playerPosition mod 75
  13.   if riverScroll = 0 then
  14.     riverScroll = 75
  15.   end if
  16.   if bankAlternate > 60 then
  17.     bankAltBolean = 1
  18.   else
  19.     bankAltBolean = 2
  20.   end if
  21.   bank1SO = 9
  22.   bank2SO = 21
  23.   repeat with whichBlock = 1 to 9
  24.     bankAltBolean = [2, 1][bankAltBolean]
  25.     offPoint = riverOffset
  26.     depthRatio = (((11 - whichBlock) * 100) - (bankScroll * 1.66599999999999993)) / 30
  27.     depthOffset = riverWidth / 1000 * depthRatio
  28.     set the loc of sprite (bank1SO + whichBlock) to point(riverOffset - 50 + depthOffset, (whichBlock * 60) - 90 + bankScroll)
  29.     set the loc of sprite (bank2SO + whichBlock) to point(riverOffset + (riverWidth / 10) + 50 - depthOffset, (whichBlock * 60) - 90 + bankScroll)
  30.     startString = ["bankA ", "bankB ", "bankC "][playerlevel]
  31.     set the member of sprite (bank1SO + whichBlock) to "SandShore"
  32.     set the member of sprite (bank2SO + whichBlock) to "SandShore"
  33.     sprite(bank1SO + whichBlock).skew = 10
  34.     sprite(bank2SO + whichBlock).skew = -10
  35.     set the blend of sprite (bank1SO + whichBlock) to 100
  36.     set the blend of sprite (bank2SO + whichBlock) to 100
  37.   end repeat
  38.   sprite(87).skew = (playerData[2][1] - 1700) / 170.0 * -1
  39.   riverSO = 100
  40.   riverFrame = riverFrame + 0.20000000000000001
  41.   if riverFrame > 4 then
  42.     riverFrame = 1
  43.   end if
  44.   riverAnimFrame = integer(riverFrame)
  45.   riverAnimFrame = 1
  46.   repeat with whichBlock = 1 to 7
  47.     offPoint = riverOffset
  48.     set the loc of sprite (riverSO + whichBlock) to point(riverOffset + 45, (whichBlock * 75) - 120 + riverScroll)
  49.     set the loc of sprite (riverSO + whichBlock + 7) to point(riverOffset + 128, (whichBlock * 75) - 120 + riverScroll)
  50.     set the loc of sprite (riverSO + whichBlock + 14) to point(riverOffset + 211, (whichBlock * 75) - 120 + riverScroll)
  51.     set the loc of sprite (riverSO + whichBlock + 21) to point(riverOffset + 294, (whichBlock * 75) - 120 + riverScroll)
  52.     set the member of sprite (riverSO + whichBlock) to "Animated-Water-Tile" & string(riverAnimFrame)
  53.     set the member of sprite (riverSO + whichBlock + 7) to "Animated-Water-Tile" & string(riverAnimFrame)
  54.     set the member of sprite (riverSO + whichBlock + 14) to "Animated-Water-Tile" & string(riverAnimFrame)
  55.     set the member of sprite (riverSO + whichBlock + 21) to "Animated-Water-Tile" & string(riverAnimFrame)
  56.   end repeat
  57. end
  58.