Downloads containing HH17_level00.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Holiday Hare '17Featured Download ShadowGPW Single player 8.8 Download file

File preview

  1. void onPlayer(jjPLAYER@ p) {
  2.         p.ballTime = 1;
  3.         p.cameraFreeze(96+jjGameTicks, 0, false, true);
  4.         p.keyFire = p.keyJump = p.keyRun = false;
  5.        
  6.         jjLayerXOffset[2] = jjLayerXOffset[2] + 0.5;
  7.         jjLayerXOffset[3] = jjLayerXOffset[3] + 0.26175;
  8.         jjLayerXOffset[5] = jjLayerXOffset[5] + 0.1425;
  9.         jjLayerXOffset[7] = jjLayerXOffset[7] + 0.0675;
  10. }
  11.  
  12. bool isLevelSkipping = false;
  13. int textVisibleFor = 0;
  14. int textAlpha = 0;
  15. string textToDisplay = "";
  16. jjTEXTAPPEARANCE introTextAppearance = STRING::SPIN;
  17.  
  18. void onLevelLoad() {
  19.         introTextAppearance.newline = STRING::SPECIALSIGN;
  20.         introTextAppearance.hash = STRING::SPECIALSIGN;
  21.         introTextAppearance.align = STRING::CENTER;
  22.         introTextAppearance.xAmp = 0;
  23.         introTextAppearance.yAmp = 1;
  24. }
  25.  
  26. bool onDrawHealth(jjPLAYER@ p, jjCANVAS@ canvas) {
  27.         canvas.drawString(
  28.                 int(jjSubscreenWidth * 0.5),
  29.                 lineToDisplay == 9 ? int(jjSubscreenHeight * 0.55) : lineToDisplay == 17 ? int(jjSubscreenHeight * 0.55) : int(jjSubscreenHeight * 0.6),
  30.                 textToDisplay,
  31.                 STRING::LARGE,
  32.                 introTextAppearance,
  33.                 0,
  34.                 SPRITE::BLEND_NORMAL,
  35.                 textAlpha
  36.                 );
  37.                
  38.         return true;
  39. }
  40.  
  41. bool onDrawLives(jjPLAYER@ p, jjCANVAS@ canvas)  { return true; }
  42. bool onDrawScore(jjPLAYER@ p, jjCANVAS@ canvas)  { return true; }
  43. bool onDrawAmmo(jjPLAYER@ p, jjCANVAS@ canvas)   { return true; }
  44.  
  45. int displayLineAtThisTime = 100;
  46. uint8 lineToDisplay = 0;
  47.  
  48. const array<string> Credits = {
  49.         "Holiday Hare `17",
  50.         "Featuring levels by:",
  51.         "cooba",
  52.         "Jelly Jam",
  53.         "Primpy",
  54.         "Blackraptor",
  55.         "Slaz",
  56.         "PurpleJazz",
  57.         "Sir Ementaler",
  58.         "and\nShadow[GpW]",
  59.         "With extra artwork by:",
  60.         "Roobar",
  61.         "Sir Ementaler",
  62.         "PurpleJazz",
  63.         "Biohazard UOI",
  64.         "Pyromanus",
  65.         "Foolstown",
  66.         "and\nViolet CLM",
  67.         " ",
  68.         "Have fun!",
  69.         " "
  70. };
  71.  
  72. void onMain() {
  73.         if (jjGameTicks == displayLineAtThisTime && Credits.length() != lineToDisplay) {
  74.                 textVisibleFor = 140;
  75.                 textToDisplay = Credits[lineToDisplay];
  76.                 displayLineAtThisTime += 210;
  77.         }
  78.  
  79.         if (textVisibleFor > 0) {
  80.                 --textVisibleFor;
  81.                 if (textAlpha < 255) textAlpha += 5;
  82.         }
  83.         else if (textAlpha > 0) {
  84.                 textAlpha -= 5;
  85.                 if (textAlpha == 5) lineToDisplay++;
  86.         }
  87.        
  88.         if (lineToDisplay == 20 && !isLevelSkipping) {
  89.                 isLevelSkipping = true;
  90.                 jjSamplePriority(SOUND::ENDTUNEJAZZ_TUNE);
  91.                 jjNxt(true, true);
  92.         }
  93. }