marioWarningImg = loadImage("mariowarning.png");
marioImg = loadImage("mario.png");
bluescreenImg = loadImage("bluescreen.png");
watImg = loadImage("wat.jpg");
errorSounds = loadSound('mario.wav');
shutdownSound = loadSound('shutdown.mp3');
clickSound = loadSound('click.mp3');
thankSound = loadSound('thank.mp3');
image(marioImg, 50, 50, 100, 100);
text("mario.exe", 55, 172)
if((mouseIsPressed) && mouseX > 50 && mouseX < 150 && mouseY > 50 && mouseY < 170){
quantizedNum = frames / (frameRates / 8) - 2;
}else if(quantizedNum == 1){
errorWindow(getRandomInt(550), getRandomInt(500), "mario.exe", "Okie Dokie?", 0);
}else if(quantizedNum == 2 || quantizedNum == 4 || quantizedNum == 6 || quantizedNum == 7 || quantizedNum == 9){
errorWindow(getRandomInt(550), getRandomInt(500), "mario.exe", "Okie Dokie?", 0);
}else if(quantizedNum == 13){
rect(0, 0, width, height);
errorWindow(width / 2 - 200, height / 2 - 100, "mario.exe", "3 Days Until Mario Steals Your Liver", 130);
}else if(quantizedNum > 13){
if(mouseIsPressed && mouseX > width/2-200 + 250 + 130 && mouseX < width/2-200 + 370 + 130 && mouseY > height/2-100 + 140 && mouseY < height/2-100 + 170){
image(bluescreenImg, 0, 0)
if(frames2 == frameRates * 2){
}else if(frames2 > frameRates * 2 && frames2 < frameRates * 2 + 150){
image(bluescreenImg, 0, 0)
tint(255, (frames2 - frameRates) * 1.5);
image(watImg, 130, 0, 750, 750)
function errorWindow(x, y, text1, text2, offsetX){
rect(x, y, 400 + offsetX, 200, 10, 10, 0, 0);
rect(x + 5, y + 38, 400 - 5 * 2 + offsetX, 200 - 38 - 5);
rect(x + 367 + offsetX, y + 8, 25, 25, 3)
rect(x + 250 + offsetX, y + 140, 120, 30)
triangle(x + 250.5 + offsetX, y + 140.5, x + 250.5 + offsetX, y + 169, x + 371 + offsetX, y + 140.5)
rect(x + 252.5 + offsetX, y + 142.5, 115, 25)
text(text1, x + 12, y + 29);
text(text1, x + 10, y + 27);
text("×", x + 370.5 + offsetX, y + 27.5);
text(text2, x + 150, y + 100)
text("OK", x + 295 + offsetX, y + 162)
image(marioWarningImg, x + 10, y + 40, 120, 120)
function getRandomInt(max) {
return Math.floor(Math.random() * max);