Downloads containing HH17_level00.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Holiday Hare '17Featured Download ShadowGPW Single player 8.8 Download file

File preview

void onPlayer(jjPLAYER@ p) {
	p.ballTime = 1;
	p.cameraFreeze(96+jjGameTicks, 0, false, true);
	p.keyFire = p.keyJump = p.keyRun = false;
	
	jjLayerXOffset[2] = jjLayerXOffset[2] + 0.5;
	jjLayerXOffset[3] = jjLayerXOffset[3] + 0.26175;
	jjLayerXOffset[5] = jjLayerXOffset[5] + 0.1425;
	jjLayerXOffset[7] = jjLayerXOffset[7] + 0.0675;
}

bool isLevelSkipping = false;
int textVisibleFor = 0;
int textAlpha = 0;
string textToDisplay = "";
jjTEXTAPPEARANCE introTextAppearance = STRING::SPIN;

void onLevelLoad() {
	introTextAppearance.newline = STRING::SPECIALSIGN;
	introTextAppearance.hash = STRING::SPECIALSIGN;
	introTextAppearance.align = STRING::CENTER;
	introTextAppearance.xAmp = 0;
	introTextAppearance.yAmp = 1;
}

bool onDrawHealth(jjPLAYER@ p, jjCANVAS@ canvas) {
	canvas.drawString(
		int(jjSubscreenWidth * 0.5),
		lineToDisplay == 9 ? int(jjSubscreenHeight * 0.55) : lineToDisplay == 17 ? int(jjSubscreenHeight * 0.55) : int(jjSubscreenHeight * 0.6),
		textToDisplay,
		STRING::LARGE,
		introTextAppearance,
		0,
		SPRITE::BLEND_NORMAL,
		textAlpha
		);
		
	return true;
}

bool onDrawLives(jjPLAYER@ p, jjCANVAS@ canvas)  { return true; }
bool onDrawScore(jjPLAYER@ p, jjCANVAS@ canvas)  { return true; }
bool onDrawAmmo(jjPLAYER@ p, jjCANVAS@ canvas)   { return true; }

int displayLineAtThisTime = 100;
uint8 lineToDisplay = 0;

const array<string> Credits = {
	"Holiday Hare `17",
	"Featuring levels by:",
	"cooba",
	"Jelly Jam",
	"Primpy",
	"Blackraptor",
	"Slaz",
	"PurpleJazz",
	"Sir Ementaler",
	"and\nShadow[GpW]",
	"With extra artwork by:",
	"Roobar",
	"Sir Ementaler",
	"PurpleJazz",
	"Biohazard UOI",
	"Pyromanus",
	"Foolstown",
	"and\nViolet CLM",
	" ",
	"Have fun!",
	" "
};

void onMain() {
	if (jjGameTicks == displayLineAtThisTime && Credits.length() != lineToDisplay) {
		textVisibleFor = 140;
		textToDisplay = Credits[lineToDisplay];
		displayLineAtThisTime += 210;
	}

	if (textVisibleFor > 0) {
		--textVisibleFor;
		if (textAlpha < 255) textAlpha += 5;
	}
	else if (textAlpha > 0) {
		textAlpha -= 5;
		if (textAlpha == 5) lineToDisplay++;
	}
	
	if (lineToDisplay == 20 && !isLevelSkipping) {
		isLevelSkipping = true;
		jjSamplePriority(SOUND::ENDTUNEJAZZ_TUNE);
		jjNxt(true, true);
	}
}