Downloads containing mlsacr.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 17 Levels Jazz2Online Multiple N/A Download file
JJ2+ Only: SacrosanctFeatured Download cooba Capture the flag 8.4 Download file

File preview

void WheelSpring(jjOBJ@ obj) {
	if (obj.state == STATE::START) obj.direction = 1;

	float xPos = obj.xPos;
	obj.behave(BEHAVIOR::SPRING, false);
	obj.yPos = obj.yOrg + 8;
	
	if (obj.eventID == OBJECT::BLUESPRING) obj.ySpeed = -48;
	
	if (obj.freeze == 1) obj.unfreeze(0);
	if (obj.freeze == 0) obj.xPos = xPos + 1.5*obj.direction;
	
	if (!jjMaskedPixel(int(obj.xPos), int(obj.yPos) + 32) || jjMaskedPixel(int(obj.xPos)+16*obj.direction, int(obj.yPos-16))) {
		if (obj.direction == 1) obj.direction = -1;
		else obj.direction = 1;
	}
	jjDrawSpriteFromCurFrame(obj.xPos, obj.yPos - 4, obj.curFrame, 0, obj.freeze > 0 ? SPRITE::FROZEN : SPRITE::NORMAL);
	jjDrawTile(obj.xPos - 16, obj.yPos - 8, obj.freeze > 0? 593 + TILE::HFLIPPED : obj.direction < 0? 1 + TILE::ANIMATED : 2 + TILE::ANIMATED);
}

void Lantern(jjOBJ@ light) {
	jjDrawTile(light.xPos - 15, light.yPos - 15, 288);
	light.behave(BEHAVIOR::STEADYLIGHT);
}

void onLevelLoad() {
	jjObjectPresets[OBJECT::STEADYLIGHT].behavior = Lantern;	
	jjObjectPresets[OBJECT::FULLENERGY].lightType = LIGHT::BRIGHT;
	jjObjectPresets[OBJECT::FULLENERGY].light = 14;
	jjTexturedBGTexture = TEXTURE::MEDIVO;
	jjPalette.gradient(24,32,96, 0,0,0);
	jjPalette.apply();

	jjLayerYOffset[2] = 8;	
	jjLayerYOffset[6] = -16;
	
	jjSetWaterGradient(0, 30, 30, 0, 250, 250);
	jjWaterLighting = WATERLIGHT::GLOBAL;
	jjSetWaterLevel(60.5*32, true);
	
	jjDelayGeneratedCrateOrigins = true;
	
	jjWeapons[WEAPON::ICE].comesFromGunCrates    = false;
	jjWeapons[WEAPON::SEEKER].comesFromGunCrates = false;
	jjWeapons[WEAPON::GUN8].comesFromGunCrates   = true;
	jjWeapons[WEAPON::GUN9].comesFromGunCrates   = true;
}

void onLevelBegin() {
	jjObjects[jjAddObject(OBJECT::BLUESPRING,  64*32, 56*32, 0, CREATOR::OBJECT, WheelSpring)].deactivates = false;
	jjObjects[jjAddObject(OBJECT::GREENSPRING, 64*32, 21*32, 0, CREATOR::OBJECT, WheelSpring)].deactivates = false;
	
	for (int i = 1; i < jjObjectCount; i++) {
		jjOBJ@ obj = jjObjects[i];
		if (obj.eventID == OBJECT::CTFBASE && obj.xOrg > 65*32) {
			obj.yOrg = obj.yOrg + 16;
		}
	}
}

void onMain() {
	jjIsSnowing = !jjLowDetail;
	jjTexturedBGTexture = jjLowDetail ? TEXTURE::LAYER8 : TEXTURE::MEDIVO;
}

void onDrawLayer4(jjPLAYER@ play, jjCANVAS@ layer) {
	layer.drawTile(101*32, 36*32, 32);
	layer.drawTile(101*32, 37*32, 30);
}