Downloads containing xlmworks.j2as

Downloads
Name Author Game Mode Rating
JJ2+ Only: WaterworksFeatured Download Loon Battle 8.2 Download file

File preview

void onLevelLoad() {
	jjTexturedBGFadePositionY = 0.45;
	jjTexturedBGTexture = TEXTURE::PSYCH;
	jjUseLayer8Speeds = true;

	jjOBJ@ preset = jjObjectPresets[OBJECT::FROZENSPRING];
	preset.behavior = coloredSpring;
	preset.bulletHandling = HANDLING::IGNOREBULLET;
	preset.freeze = 0;
	preset.ySpeed = -18.f;
	preset.xPos = preset.xOrg + 8;
	
	jjPalette.gradient(0,0,180, 0,0,20, 176, 32);	
}

void onDrawLayer8(jjPLAYER@ play, jjCANVAS@ canvas) {
	canvas.drawRectangle(-240, -200, 800, 320, 95, SPRITE::NORMAL);
}

void offsetPosition(jjOBJ@ obj) {
	obj.behave(BEHAVIOR::SPRING);
	if (obj.xPos > 88*32 && obj.xPos < 90*32) obj.xPos = obj.xOrg + 12;
}

void coloredSpring(jjOBJ@ obj) {
	obj.behave(BEHAVIOR::SPRING, false);
	jjDrawSpriteFromCurFrame(obj.xPos, obj.yPos, obj.curFrame, obj.direction, SPRITE::PALSHIFT, 248);
}

void onLevelBegin() {
	
	for (int x = 0; x < jjLayerWidth[4]; x++) {
		for (int y = 0; y < jjLayerHeight[4]; y++) {
			uint16 tile = jjTileGet(4, x, y);
						
			if (jjEventGet(x, y) == 119) jjTileSet(4, x, y, tile ^ TILE::VFLIPPED);
		}
	}
}

void onMain(){
  jjOBJ@ obj;
  for(int i=0;i<jjObjectCount;i++)
  {
    @obj=jjObjects[i];
    if(!obj.isActive) {continue;}
    switch(obj.eventID)
    {
      case OBJECT::BLUESPRING:
		if(obj.yPos>50*32) {obj.ySpeed=-2526.5;}
        if(obj.freeze>0&&jjGameTicks%2==0) {obj.freeze++;}
        break;
	}
   }
}