Downloads containing xlmsnowlandN.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Snowland Toni_ Capture the flag 6.7 Download file

File preview

  1. #include "MLLE-Include-1.4.asc"
  2. const bool MLLESetupSuccessful = MLLE::Setup();
  3. #pragma require "xlmsnowlandN-MLLE-Data-1.j2l"
  4. #pragma require "xlmsnowlandN.j2l"
  5.  
  6. void recolor(jjANIMFRAME@ frame, int begin, int end, int shift) {
  7.     jjPIXELMAP image(frame);
  8.     for (int i = image.height; i-- != 0;) {
  9.         for (int j = image.width; j-- != 0;) {
  10.             int color = image[j, i];
  11.             if (color >= begin && color < end)
  12.                 image[j, i] = color + shift;
  13.         }
  14.     }
  15.     image.save(frame);
  16. }
  17. void recolor(jjANIMATION@ anim, int begin, int end, int shift) {
  18.     for (int i = anim.frameCount; i-- != 0;) {
  19.         recolor(jjAnimFrames[anim + i], begin, end, shift);
  20.     }
  21. }
  22.  
  23. void onLevelLoad() {
  24.         jjObjectPresets[OBJECT::FULLENERGY].behavior = CannotBeShotDown;
  25.         jjObjectPresets[OBJECT::ELECTROBULLET].xSpeed *= 1.5;
  26.         jjUseLayer8Speeds = true;
  27.         jjDelayGeneratedCrateOrigins = true;
  28.         recolor(jjAnimations[jjAnimSets[ANIM::AMMO] + 23], 32, 40, -8);
  29.         recolor(jjAnimations[jjAnimSets[ANIM::AMMO] + 25], 32, 40, -8);
  30. }
  31.  
  32. void CannotBeShotDown(jjOBJ@ obj) {
  33.     obj.behave(BEHAVIOR::PICKUP);
  34.     if (obj.state == STATE::FLOATFALL) obj.state = STATE::FLOAT;
  35. }
  36.  
  37. void onLevelBegin() {
  38.     for (int i = 1; i < jjObjectCount; i++) {
  39.         if (jjObjects[i].eventID == OBJECT::CTFBASE || jjObjects[i].behavior == BEHAVIOR::FLAG) jjObjects[i].yOrg += 8;
  40.     }
  41. }
  42.  
  43. void onMain() {
  44.         for (int i = 1; i < jjObjectCount; i++) {
  45.            jjOBJ@ o = jjObjects[i];
  46.            if (o.isActive) {
  47.                if (o.eventID == OBJECT::SEEKERBULLET || o.eventID == OBJECT::SEEKERBULLETPU) {
  48.                            if (o.yPos > 26.85*32 - 18 && o.yPos < 32*32)
  49.                                    if ((o.xPos > 51*32 && o.xPos <52*32) || (o.xPos > 58*32 && o.xPos <59*32))
  50.                                            if (o.doesHurt == 0) {
  51.                                                o.counter = o.counterEnd;
  52.                                                    o.doesHurt++;
  53.                                             }
  54.                 }
  55.             }
  56.         }
  57. }