Downloads containing Fio1_a.j2as

Downloads
Name Author Game Mode Rating
JJ2+ Only: Find It Out (Single Player)Featured Download Superjazz Single player 8.7 Download file

File preview

const bool MLLESetupSuccessful = MLLE::Setup(); ///@MLLE-Generated
#include "MLLE-Include-1.6.asc" ///@MLLE-Generated
#pragma require "Fio1_a.j2l" ///@MLLE-Generated
#include "Fio_common.asc"
#include "Fio_drawing.asc"
#include "Fio_entities.asc"
#include "Fio_globals.asc"

const string NEXT_LEVEL_FILENAME = "Fio1_x.j2l";

bool wasFloorSwitchDestroyed = false;

array<Checkpoint@> fio1aCheckpoints = {
	Checkpoint(0, TILE * 131, TILE * 64)
};

array<string> questTexts = {
	fio::getQuestText(7, 10, 7000),
	fio::getQuestTextComplete(7000),
	fio::getQuestTextPerfect(3000)
};

array<string> texts = {
	"|So...a switch at the end of the corridor? I see something behind that wall ahead.",
	"|Phew what a fall! So it was true.",
	"|Is this The Grey Fort yet? At least it is guarded by lizards, bats and even dragons it seems.",
	"|Woah! I've never seen such diabolic creatures before! What are they doing here?",
	"|Disappearing bridges! Wow!",
	"|Feeling so sick, ugh!",
	"|So many secret passages...Where to go now?",
	"|What? A crate just fell down from the sky? What could be in it?",
	"|Could this be an entrance to something greater? I've got to find out!",
	"|The floor on this platform seems to be tampered with. Hmm..."
};

bool onCheat(string &in cheat) {
	return fio::handleCheat(cheat, NEXT_LEVEL_FILENAME);
}

bool onDrawHealth(jjPLAYER@ play, jjCANVAS@ canvas) {
	fioDraw::animateHud();
	fioDraw::drawHud(play, canvas);
	return false;
}

bool onDrawLives(jjPLAYER@ play, jjCANVAS@ canvas) {
	return true;
}

void onLevelLoad() {
	initializeGlobals(fio1aCheckpoints, 7);
	fioDraw::initializeDrawing(texts, questTexts);
}

void onLevelReload() {
	fio::handleLevelReload();
}

void onMain() {
	fioDraw::controlHud();
}

void onPlayer(jjPLAYER@ play) {
	fio::handlePlayer(play);
	fio::controlQuest();
	
	if (jjGameTicks == 1) {
		play.ballTime = 0; // Ensure the reset of player's ball mode from the intro level
		fioDraw::doShowOptionalQuest(0);
	}
	
	if (jjTriggers[6] && !wasFloorSwitchDestroyed) {
		wasFloorSwitchDestroyed = true;
		jjEnabledASFunctions[11] = false;
		fioDraw::elapsedTextDisplay = 0; // Artificial text reset on the text about the tampered floor when the crate below is already destroyed
	}
}

void onPlayerInput(jjPLAYER@ play) {
	fio::controlPlayerInput(play, true);
}

void onRoast(jjPLAYER@ victim, jjPLAYER@ killer) {
	fio::saveTriggerStates();
	asPlay.savePlayerProperties(play);
}

void onFunction0() {
	fioDraw::doShowText(0);
}

void onFunction1() {
	jjTriggers[1] = true;
	jjSamplePriority(SOUND::COMMON_BASE1); //the hidden switch sound
}

void onFunction2() {
	fioDraw::doShowText(1);
}

void onFunction3() {
	fioDraw::doShowText(2);
}

void onFunction4() {
	fioDraw::doShowText(3);
}

void onFunction5(bool darker) {
	if (darker) {
		play.lighting = LIGHTING_TWILIGHT;
	}
	else {
		play.lighting = LIGHTING_STANDARD;
	}
}

void onFunction6() {
	fioDraw::doShowText(4);
}

void onFunction7() {
	fioDraw::doShowText(5);
	play.stoned = 210;
}

void onFunction8() {
	fioDraw::doShowText(6);
}

void onFunction9() {
	if (jjTriggers[3]) {
		fioDraw::doShowText(7);
		jjEnabledASFunctions[9] = false;
	}
}

void onFunction10() {
	fioDraw::doShowText(8);
}

void onFunction11() {
	fioDraw::doShowText(9);
}

void onFunction12() {
	if (!checkpoints[0].isReached()) {
		checkpoints[0].setReached();
	}
}

void onFunction13() {
	fio::handleLevelCycle(NEXT_LEVEL_FILENAME);
}