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

  1. global pActiveBullets, pBulletDirection, gCurrentLevel, gTotalScore, gNumLives, gMapChannel, gWon, pInvincibility, gBombList, pEneBombList, pAntObject, pEneObject, pEneObject2, pEneObject3, gNumCheckPoints, gTotalCheckPoints
  2.  
  3. on prepareMovie me
  4.   gCurrentLevel = 0
  5.   gTotalScore = 0
  6.   gMapChannel = 7
  7. end
  8.  
  9. on displayScore
  10.   member("ScoreDisplay").text = string(gTotalScore)
  11. end
  12.  
  13. on displayTries
  14.   member("LivesDisplay").text = string(gNumLives)
  15. end
  16.  
  17. on displayLevel
  18.   member("LevelDisplay").text = string(gCurrentLevel)
  19. end
  20.  
  21. on displayTime theTime
  22.   if (theTime / 60) < 10 then
  23.     timeCount = "0" & string(integer(theTime / 60))
  24.   else
  25.     timeCount = string(integer(theTime / 60))
  26.   end if
  27.   if (theTime mod 60) < 10 then
  28.     timeCount = timeCount && ":" && "0" & string(theTime mod 60)
  29.   else
  30.     timeCount = timeCount && ":" && string(theTime mod 60)
  31.   end if
  32.   member("TimeDisplay").text = timeCount
  33. end
  34.  
  35. on thisIsMYIntersectionFunctionBitch spriteRect, objectSpriteNum
  36.   colRect = intersect(spriteRect, sprite(objectSpriteNum).rect)
  37.   if colRect = rect(0, 0, 0, 0) then
  38.     return 0
  39.   end if
  40.   x1 = colRect.left - sprite(objectSpriteNum).rect.left
  41.   x2 = colRect.right - sprite(objectSpriteNum).rect.left
  42.   y1 = colRect.top - sprite(objectSpriteNum).rect.top
  43.   y2 = colRect.bottom - sprite(objectSpriteNum).rect.top
  44.   repeat with x = x1 to x2
  45.     theColor = sprite(objectSpriteNum).member.image.getPixel(x, y1)
  46.     if theColor = rgb(0, 0, 0) then
  47.       return 1
  48.     end if
  49.     x = x + 3
  50.   end repeat
  51.   repeat with x = x1 to x2
  52.     theColor = sprite(objectSpriteNum).member.image.getPixel(x, y2)
  53.     if theColor = rgb(0, 0, 0) then
  54.       return 1
  55.     end if
  56.     x = x + 3
  57.   end repeat
  58.   repeat with y = y1 to y2
  59.     theColor = sprite(objectSpriteNum).member.image.getPixel(x1, y)
  60.     if theColor = rgb(0, 0, 0) then
  61.       return 1
  62.     end if
  63.     y = y + 3
  64.   end repeat
  65.   repeat with y = y1 to y2
  66.     theColor = sprite(objectSpriteNum).member.image.getPixel(x2, y)
  67.     if theColor = rgb(0, 0, 0) then
  68.       return 1
  69.     end if
  70.     y = y + 3
  71.   end repeat
  72.   return 0
  73. end
  74.