Downloads containing xlmscrapyard.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 18Featured Download TreyLina Multiple 10 Download file

File preview

  1. const array<uint16> tilesToVFlip = {
  2.         40, 41, 42, 43, 44,
  3.         55, 56, 57, 58, 59
  4. };
  5.  
  6. const array<uint16> tilesToGiveBlackBGs = {
  7.         33, 45, 49, 69
  8. };
  9.  
  10. const array<uint16> tilesToReplace1 = {
  11.         340, 341, 342, 343, 344, 345, 346, 347, 348, 349
  12. };
  13.  
  14. const array<uint16> tilesToReplace2 = {
  15.         360, 361, 362, 363, 364, 365, 366, 367, 368, 369
  16. };
  17.  
  18. const array<uint16> tilesToReplace3 = {
  19.         380, 381, 382, 383, 384, 385, 386, 387, 388, 389
  20. };
  21.  
  22. const array<uint16> tilesToReplace4 = {
  23.         390, 391, 392, 393
  24. };
  25.  
  26. void onLevelLoad() {
  27.         for (int i = 0; i < 10; ++i) {
  28.                 jjPIXELMAP VFlippedCaves1(tilesToVFlip[i]);
  29.                 VFlippedCaves1.save(tilesToReplace1[i] | TILE::VFLIPPED, true);
  30.                
  31.                 jjPIXELMAP VFlippedCaves2(tilesToVFlip[i]);
  32.                         for (uint x = 0; x < VFlippedCaves2.width; ++x)
  33.                                 for (uint y = 0; y < VFlippedCaves2.height; ++y)
  34.                                         if (VFlippedCaves2[x,y] == 0)
  35.                                                 VFlippedCaves2[x,y] = 95; //black background
  36.                 VFlippedCaves2.save(tilesToReplace2[i] | TILE::VFLIPPED, true);
  37.                
  38.                 jjPIXELMAP cavesBlackBG(tilesToVFlip[i]);
  39.                         for (uint x = 0; x < cavesBlackBG.width; ++x)
  40.                                 for (uint y = 0; y < cavesBlackBG.height; ++y)
  41.                                         if (cavesBlackBG[x,y] == 0)
  42.                                                 cavesBlackBG[x,y] = 95;
  43.                 cavesBlackBG.save(tilesToReplace3[i], true);   
  44.         }
  45.        
  46.         for (int i = 0; i < 4; ++i) {
  47.                 jjPIXELMAP cavesBlackBG(tilesToGiveBlackBGs[i]);
  48.                         for (uint x = 0; x < cavesBlackBG.width; ++x)
  49.                                 for (uint y = 0; y < cavesBlackBG.height; ++y)
  50.                                         if (cavesBlackBG[x,y] == 0)
  51.                                                 cavesBlackBG[x,y] = 95;
  52.                 cavesBlackBG.save(tilesToReplace4[i], true);           
  53.         }
  54.  
  55.         jjPIXELMAP blackTile(759);
  56.                 for (uint x = 0; x < blackTile.width; ++x)
  57.                         for (uint y = 0; y < blackTile.height; ++y)
  58.                                 if (blackTile[x,y] != 254)
  59.                                         blackTile[x,y] = 95;
  60.         blackTile.save(759, true);
  61.        
  62.         for (int i = 1; i < 255; i++) {
  63.                 if (jjObjectPresets[i].playerHandling == HANDLING::PICKUP) {
  64.                         jjObjectPresets[i].behavior = CannotBeBuried;
  65.                 }
  66.         }
  67.        
  68.         jjOBJ@ preset = jjObjectPresets[OBJECT::FROZENSPRING];
  69.         preset.behavior = coloredSpring;
  70.         preset.bulletHandling = HANDLING::IGNOREBULLET;
  71.         preset.freeze = 0;
  72.         preset.ySpeed = -18.f;
  73.         preset.xPos = preset.xOrg + 8;
  74.        
  75.         jjDelayGeneratedCrateOrigins = true;
  76.         jjUseLayer8Speeds = true;
  77. }
  78.  
  79. void CannotBeBuried(jjOBJ@ obj) {
  80.         obj.behave(BEHAVIOR::PICKUP);
  81.         if (jjMaskedPixel(int(obj.xPos), int(obj.yPos) + 8)) {
  82.                 obj.state = STATE::FLOAT;
  83.         }
  84.         if (obj.ySpeed < 0) obj.ySpeed = 0.25;
  85. }
  86.  
  87. void coloredSpring(jjOBJ@ obj) {
  88.         obj.behave(BEHAVIOR::SPRING, false);
  89.         jjDrawSpriteFromCurFrame(obj.xPos, obj.yPos, obj.curFrame, obj.direction, SPRITE::PALSHIFT, 216);
  90. }
  91.  
  92. void onDrawLayer6(jjPLAYER@ play, jjCANVAS@ canvas) {
  93.         if (!jjLowDetail) canvas.drawRectangle(0, 0, jjLayerWidth[6]*32, jjLayerHeight[6]*32, 31, SPRITE::TRANSLUCENT, 1);
  94. }
  95.  
  96. void onMain() {
  97.         jjLayerHasTiles[6] = !jjLowDetail;
  98. }
  99.  
  100. void onFunction0(jjPLAYER@ play) {
  101.         play.showText("@@@@@Scrapyard@Created by PurpleJazz of XLM (2015-2016)@Tileset conversion by NOKA, edited by PurpleJazz@np: Michiel van den Bos - Botpack 9 [4:49]");
  102. }
  103.  
  104. void onFunction1(jjPLAYER@ play) {
  105.         play.showText("@@@@Spawn Times@Ammo: 16@Full NRG: 28@Powerups: 28");
  106. }
  107.  
  108. void onFunction2(jjPLAYER@ play) {
  109.         play.showText("@@@@jazz 4 over online ? what online@@jazz jack rabbit 4 is new@@edit boss dog@@jazz 4, jazz 5, jazz 6, jazz 7, jazz 8,@@jazz news and jazz jack rabbit kill.");
  110. }