Downloads containing xlmscrapyard.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 18 Levels Jazz2Online Multiple N/A Download file

File preview

const array<uint16> tilesToVFlip = {
	40, 41, 42, 43, 44,
	55, 56, 57, 58, 59
};

const array<uint16> tilesToGiveBlackBGs = {
	33, 45, 49, 69
};

const array<uint16> tilesToReplace1 = {
	340, 341, 342, 343, 344, 345, 346, 347, 348, 349
};

const array<uint16> tilesToReplace2 = {
	360, 361, 362, 363, 364, 365, 366, 367, 368, 369
};

const array<uint16> tilesToReplace3 = {
	380, 381, 382, 383, 384, 385, 386, 387, 388, 389
};

const array<uint16> tilesToReplace4 = {
	390, 391, 392, 393
};

void onLevelLoad() {
	for (int i = 0; i < 10; ++i) {
		jjPIXELMAP VFlippedCaves1(tilesToVFlip[i]);
		VFlippedCaves1.save(tilesToReplace1[i] | TILE::VFLIPPED, true);
		
		jjPIXELMAP VFlippedCaves2(tilesToVFlip[i]);
			for (uint x = 0; x < VFlippedCaves2.width; ++x)
				for (uint y = 0; y < VFlippedCaves2.height; ++y)
					if (VFlippedCaves2[x,y] == 0)
						VFlippedCaves2[x,y] = 95; //black background
		VFlippedCaves2.save(tilesToReplace2[i] | TILE::VFLIPPED, true);
		
		jjPIXELMAP cavesBlackBG(tilesToVFlip[i]);
			for (uint x = 0; x < cavesBlackBG.width; ++x)
				for (uint y = 0; y < cavesBlackBG.height; ++y)
					if (cavesBlackBG[x,y] == 0)
						cavesBlackBG[x,y] = 95;
		cavesBlackBG.save(tilesToReplace3[i], true);	
	}
	
	for (int i = 0; i < 4; ++i) {
		jjPIXELMAP cavesBlackBG(tilesToGiveBlackBGs[i]);
			for (uint x = 0; x < cavesBlackBG.width; ++x)
				for (uint y = 0; y < cavesBlackBG.height; ++y)
					if (cavesBlackBG[x,y] == 0)
						cavesBlackBG[x,y] = 95;
		cavesBlackBG.save(tilesToReplace4[i], true);		
	}

	jjPIXELMAP blackTile(759);
		for (uint x = 0; x < blackTile.width; ++x)
			for (uint y = 0; y < blackTile.height; ++y)
				if (blackTile[x,y] != 254)
					blackTile[x,y] = 95;
	blackTile.save(759, true);
	
	for (int i = 1; i < 255; i++) {
		if (jjObjectPresets[i].playerHandling == HANDLING::PICKUP) {
			jjObjectPresets[i].behavior = CannotBeBuried;
		}
	}
	
	jjOBJ@ preset = jjObjectPresets[OBJECT::FROZENSPRING];
	preset.behavior = coloredSpring;
	preset.bulletHandling = HANDLING::IGNOREBULLET;
	preset.freeze = 0;
	preset.ySpeed = -18.f;
	preset.xPos = preset.xOrg + 8;
	
	jjDelayGeneratedCrateOrigins = true;
	jjUseLayer8Speeds = true;
}

void CannotBeBuried(jjOBJ@ obj) {
	obj.behave(BEHAVIOR::PICKUP);
	if (jjMaskedPixel(int(obj.xPos), int(obj.yPos) + 8)) {
		obj.state = STATE::FLOAT;
	}
	if (obj.ySpeed < 0) obj.ySpeed = 0.25;
}

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

void onDrawLayer6(jjPLAYER@ play, jjCANVAS@ canvas) {
	if (!jjLowDetail) canvas.drawRectangle(0, 0, jjLayerWidth[6]*32, jjLayerHeight[6]*32, 31, SPRITE::TRANSLUCENT, 1);
}

void onMain() {
	jjLayerHasTiles[6] = !jjLowDetail;
}

void onFunction0(jjPLAYER@ play) {
	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]");
}

void onFunction1(jjPLAYER@ play) {
	play.showText("@@@@Spawn Times@Ammo: 16@Full NRG: 28@Powerups: 28");
}

void onFunction2(jjPLAYER@ play) {
	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.");
}