Downloads containing xlmaverno.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Facilis descensus AvernoFeatured Download Loon Battle 8.5 Download file

File preview

const bool MLLESetupSuccessful = MLLE::Setup(array<MLLEWeaponApply@> = {null, null, se::RollerMLLEWrapper(), null, null, SuperToaster::Weapon(), WeaponVMega::Boomerang::Weapon(), null, null}); ///@MLLE-Generated
#include "MLLE-Include-1.5w.asc" ///@MLLE-Generated
#pragma require "xlmaverno-MLLE-Data-3.j2l" ///@MLLE-Generated
#pragma require "xlmaverno-MLLE-Data-2.j2l" ///@MLLE-Generated
#pragma require "xlmaverno-MLLE-Data-1.j2l" ///@MLLE-Generated
#pragma require "xlmaverno.j2l" ///@MLLE-Generated
#include "WeaponVMega1.asc" ///@MLLE-Generated
#pragma require "WeaponVMega1.asc" ///@MLLE-Generated
#include "SuperToaster.asc" ///@MLLE-Generated
#pragma require "SuperToaster.asc" ///@MLLE-Generated
#include "SEroller-mlle.asc" ///@MLLE-Generated
#pragma require "SEroller-mlle.asc" ///@MLLE-Generated
#pragma require "MLLE-Weapons.asc"

bool onDrawAmmo(jjPLAYER@ player, jjCANVAS@ canvas) {
	return MLLE::WeaponHook.drawAmmo(player, canvas);
}

bool lightning = false, toggleLayers = true;
int lightningDelay = 250;

void onLevelLoad() {
	jjAnimSets[ANIM::RAVEN].load();
	jjAnimSets[ANIM::RAPIER].load();
	jjAnimSets[ANIM::SKELETON].load();

	jjUseLayer8Speeds = true;
	
	generateCustomSpringSprites(jjAnimSets[ANIM::CUSTOM[9]], array<uint> = {40, 16, 64, 88});
    turnIntoCustomSpring(jjObjectPresets[OBJECT::FROZENSPRING], 0, 19.75f, false);
    turnIntoCustomSpring(jjObjectPresets[OBJECT::HORREDSPRING], 1, 22.25f, false);
    turnIntoCustomSpring(jjObjectPresets[OBJECT::HORBLUESPRING], 3, 33.3f, false);
	
	jjObjectPresets[OBJECT::HORREDSPRING].causesRicochet = jjObjectPresets[OBJECT::HORBLUESPRING].causesRicochet = false;
	
	jjDelayGeneratedCrateOrigins = true;
       
    jjObjectPresets[OBJECT::GUN9POWERUP].direction = -1;
	jjObjectPresets[OBJECT::ICEPOWERUP].direction = 0;
	jjObjectPresets[OBJECT::RFPOWERUP].direction = -1;
	jjObjectPresets[OBJECT::TNTPOWERUP].direction = -1;
	
	jjANIMATION@ anim = jjAnimations[jjAnimSets[ANIM::BAT] + 1];
		for (uint j = 0; j < anim.frameCount; j++) {
			jjANIMFRAME@ frame = jjAnimFrames[anim + j];
			jjPIXELMAP sprite(frame);
			for (uint x = 0; x < sprite.width; ++x) {
				for (uint y = 0; y < sprite.height; ++y) {
					if (sprite[x,y] >= 88 && sprite[x,y] <= 95) sprite[x,y] += 136;
				}
			}
			sprite.save(frame);
	}
}

void onMain() {	
	if (!jjLowDetail) {
	
		if (lightning && lightningDelay > 0) lightningDelay--;
	
		if (jjGameTicks % 600 >= 575 && jjGameTicks % 600 <= 579) jjSetFadeColors(255,255,255);
		else if (jjGameTicks % 600 >= 580) {
			int timer = 600 - jjGameTicks % 600;
			jjSetFadeColors(15 + timer * 195 / 20, 30 + timer * 180 / 20, 45 + timer * 165 / 20);
			lightning = true;
			lightningDelay = 250;
		}
	
		if (lightning && lightningDelay == 0) {
			jjSample(jjLocalPlayers[0].xPos, jjLocalPlayers[0].yPos < jjWaterLevel? jjLocalPlayers[0].yPos : jjWaterLevel, SOUND::BILSBOSS_THUNDER, jjTriggers[30] && jjLocalPlayerCount == 1? 12:42, 0);
			lightning = false;
		}
	}

	
	jjWeapons[WEAPON::TNT].comesFromGunCrates = true;	
	jjWeapons[WEAPON::GUN8].comesFromGunCrates = true;
    jjWeapons[WEAPON::GUN9].comesFromGunCrates = true;
}

jjANIMSET@ customSpringSprite;
array<int> fastCustomSpringSpeeds(jjLocalPlayerCount);
bool generateCustomSpringSprites(jjANIMSET@ anim, const array<uint> &in colors) {
    int length = colors.length();
    bool success = (@customSpringSprite = anim).allocate(array<uint>(length * 3, 5)) !is null;
    if (success) {
        uint srcSet = jjAnimSets[ANIM::SPRING];
        for (int i = 0; i < length; i++) {
            uint color = colors[i];
            uint destAnimOffset = anim + i * 3;
            for (int j = 0; j < 3; j++) {
                uint srcAnim = jjAnimations[srcSet + j];
                uint destAnim = jjAnimations[destAnimOffset + j];
                for (int k = 0; k < 5; k++) {
                    jjPIXELMAP image(jjAnimFrames[destAnim + k] = jjAnimFrames[srcAnim + k]);
                    int width = image.width;
                    int height = image.height;
                    for (int l = 0; l < height; l++) {
                        for (int m = 0; m < width; m++) {
                            int pixel = image[m, l];
                            if (pixel >= 32 && pixel < 40)
                                image[m, l] = color + (pixel & 7);
                        }
                    }
                    if (!image.save(jjAnimFrames[destAnim + k]))
                        return false;
                }
            }
        }
    }
    return success;
}
void initializeCustomSpring(jjOBJ@ obj) {
    int anim = obj.curAnim;
    obj.behave(obj.behavior = BEHAVIOR::SPRING, false);
    if (obj.curAnim != anim) {
        obj.curAnim = anim + 2;
        obj.determineCurFrame();
    }
    obj.draw();
}
 
void turnIntoCustomSpring(jjOBJ@ obj, uint color, float power, bool horizontal) {
    if (horizontal) {
        obj.xSpeed = power;
        obj.ySpeed = 0.f;
    } else {
        obj.xSpeed = 0.f;
        obj.ySpeed = -power;
        if (obj.state == STATE::START && obj.creatorType == CREATOR::LEVEL) {
            int x = int(obj.xPos) >> 5;
            int y = int(obj.yPos) >> 5;
            if (jjParameterGet(x, y, 0, 1) != 0) {
                jjParameterSet(x, y, 0, 1, 0);
                obj.yPos -= 4.f;
                obj.ySpeed = power;
            }
        }
    }
    obj.behavior = initializeCustomSpring;
    obj.curAnim = customSpringSprite + color * 3 + (horizontal ? 1 : 0);
    obj.energy = obj.frameID = obj.freeze = obj.justHit = obj.light = obj.points = 0;
    obj.isBlastable = obj.isTarget = obj.scriptedCollisions = obj.triggersTNT = false;
    obj.deactivates = obj.isFreezable = true;
    obj.bulletHandling = HANDLING::IGNOREBULLET;
    obj.playerHandling = HANDLING::SPECIAL;
    obj.lightType = LIGHT::NORMAL;
    obj.determineCurFrame();
}
 
void handleFastCustomSpringSpeeds(jjPLAYER@ play) {
        if (play.ySpeed < -32.f) {
                fastCustomSpringSpeeds[play.localPlayerID] = int(ceil((play.ySpeed + 32.f) / -0.125f));
        } else if (fastCustomSpringSpeeds[play.localPlayerID] != 0) {
                if (play.ySpeed < -31.f) {
                        fastCustomSpringSpeeds[play.localPlayerID]--;
                        play.ySpeed = -32.f;
                } else {
                        fastCustomSpringSpeeds[play.localPlayerID] = 0;
                }
        }
}

array<bool> canJump(jjLocalPlayerCount, true);
array<bool> canJumpTwo(jjLocalPlayerCount, true);

void onPlayer(jjPLAYER@ player) {
	array<jjLAYER@> layers = jjLayerOrderGet();
	if (!jjLowDetail) {
		if (player.cameraY >= 41*32) {
			toggleLayers = true;
		}
		else toggleLayers = false;
		
		layers[17].hasTiles = 
		layers[18].hasTiles = 
		layers[19].hasTiles = 
		layers[20].hasTiles = toggleLayers;
		
		layers[23].hasTiles = 
		layers[24].hasTiles = 
		layers[25].hasTiles = 
		layers[26].hasTiles = 
		layers[27].hasTiles = 
		layers[28].hasTiles = 
		layers[29].hasTiles = !toggleLayers;
	}

	player.lightType = LIGHT::NONE;
		
    handleFastCustomSpringSpeeds(player);
	
	if (!canJump[player.localPlayerID]) {
        player.keyJump = player.keyDown = player.keyFire = player.keyLeft = player.keyRight = false;
    }
	
	if (!canJumpTwo[player.localPlayerID]) {
        player.keyJump = player.keyDown = player.keyFire = false;
    }
	
	if (player.health == 0 || jjGameTicks == 1){
	  canJump[player.localPlayerID] = true;
	  canJumpTwo[player.localPlayerID] = true;
	 // player.yOrg += 32;
	}
	
	if (jjLocalPlayerCount == 1) player.lighting = jjTriggers[30]? 55:85;
}

void onLevelReload() {
	MLLE::Palette.apply();
}


void onFunction3(jjPLAYER@ play, bool preventJump) {
    canJump[play.localPlayerID] = preventJump;
}

void onFunction4(jjPLAYER@ play, bool preventJump) {
    canJumpTwo[play.localPlayerID] = preventJump;
}

void onFunction0(jjPLAYER@ play) {
	jjIsSnowing = true;
}

void onFunction1(jjPLAYER@ play) {
	jjIsSnowing = false;
}

class Raven {
    private float xPos, yPos, xOrg, yOrg, minScale, maxScale;
    private int direction, param;
    
    void setParameters(Raven@ raven, float xOrg, float yOrg, float minScale, float maxScale, int direction, int param) {
        raven.xOrg = xOrg;
        raven.yOrg = yOrg;
        raven.minScale = minScale;
        raven.maxScale = maxScale;
        raven.direction = direction;
        raven.param = param;
    }
    
    void getPosition(Raven@ raven) {
        raven.xPos = jjSin(jjGameTicks*2)*140*raven.direction + raven.xOrg;
        raven.yPos = jjCos(jjGameTicks*2)*22*raven.direction + raven.yOrg;
    }
    
    void draw(Raven@ raven, jjCANVAS@ canvas) {
        canvas.drawResizedSprite(int(raven.xPos), int(raven.yPos), ANIM::RAVEN, raven.yPos > (raven.yOrg + 0.24) && raven.yPos < (raven.yOrg + 2.8)? 2:1, jjGameTicks >> 3, raven.yPos >= (raven.yOrg + 2.8)? maxScale:-minScale, raven.yPos >= (raven.yOrg + 2.8)? maxScale:minScale, SPRITE::BRIGHTNESS, param);
    }
}


void onDrawLayer7(jjPLAYER@ play, jjCANVAS@ canvas) {
    array<Raven> ravens(10);

    ravens[0].setParameters(ravens[0], 20*32, 5*32, 0.8, 0.86, 1, 70);
    ravens[0].getPosition(ravens[0]);
	
    ravens[0].draw(ravens[0], canvas);
	
	ravens[1].setParameters(ravens[1], 35*32, -1*32, 0.6, 0.67, -1, 70);
    ravens[1].getPosition(ravens[1]);
	
    ravens[1].draw(ravens[1], canvas);
	
	ravens[2].setParameters(ravens[2], 50*32, 3*32, 0.78, 0.82, -1, 70);
    ravens[2].getPosition(ravens[2]);
	
	ravens[2].draw(ravens[2], canvas);
	
	ravens[3].setParameters(ravens[3], 60*32, 5*32, 0.65, 0.71, 1, 70);
    ravens[3].getPosition(ravens[3]);
	
    ravens[3].draw(ravens[3], canvas);
	
	ravens[4].setParameters(ravens[4], 73*32, 1*32, 0.7, 0.74, -1, 70);
    ravens[4].getPosition(ravens[4]);
	
    ravens[4].draw(ravens[4], canvas);
	
	ravens[5].setParameters(ravens[5], 84*32, 4*32, 0.78, 0.82, 1, 70);
    ravens[5].getPosition(ravens[5]);
	
	ravens[5].draw(ravens[5], canvas);
	
	ravens[6].setParameters(ravens[6], 97*32, 2*32, 0.6, 0.67, -1, 70);
    ravens[6].getPosition(ravens[6]);
	
    ravens[6].draw(ravens[6], canvas);
	
	ravens[7].setParameters(ravens[7], 105*32, 7*32, 0.78, 0.82, -1, 70);
    ravens[7].getPosition(ravens[7]);
	
	ravens[7].draw(ravens[7], canvas);
	
	ravens[8].setParameters(ravens[8], 98*32, 8*32, 0.84, 0.89, 1, 70);
    ravens[8].getPosition(ravens[8]);
	
	ravens[8].draw(ravens[8], canvas);
	
	ravens[9].setParameters(ravens[9], 124*32, 12*32, 0.78, 0.82, 1, 70);
    ravens[9].getPosition(ravens[9]);
	
	ravens[9].draw(ravens[9], canvas);
}

class Rapier {
    private float xPos, yPos, xOrg, yOrg, minScale, maxScale;
    private int direction, param;
	
    void setParameters(Rapier@ rapier, float xOrg, float yOrg, float minScale, float maxScale, int direction, int param) {
        rapier.xOrg = xOrg;
        rapier.yOrg = yOrg;
        rapier.minScale = minScale;
        rapier.maxScale = maxScale;
        rapier.direction = direction;
		rapier.param = param;
    }
    
    void getPosition(Rapier@ rapier) {
        rapier.xPos = jjSin(jjGameTicks)*64*rapier.direction + rapier.xOrg;
        rapier.yPos = jjCos(jjGameTicks)*16*rapier.direction + rapier.yOrg;
    }
    
    void draw(Rapier@ rapier, jjCANVAS@ canvas) {
        canvas.drawResizedSprite(int(rapier.xPos), int(rapier.yPos), ANIM::RAPIER, rapier.yPos > (rapier.yOrg + 0.24) && rapier.yPos < (rapier.yOrg + 2.8)? 2:2, jjGameTicks >> 3, rapier.yPos >= (rapier.yOrg + 2.8)? maxScale:-minScale, rapier.yPos >= (rapier.yOrg + 2.8)? maxScale:minScale, SPRITE::BRIGHTNESS, param);
    }
}

void onDrawLayer6(jjPLAYER@ play, jjCANVAS@ canvas) {
    array<Rapier> rapiers(12);
    
    rapiers[0].setParameters(rapiers[0], 11*32, 114*32, 0.84, 0.9, -1, 30);
    rapiers[0].getPosition(rapiers[0]);
	
	rapiers[0].draw(rapiers[0], canvas);
	
	rapiers[1].setParameters(rapiers[1], 47*32, 100*32, 0.73, 0.78, 1, 30);
    rapiers[1].getPosition(rapiers[1]);
    
    rapiers[1].draw(rapiers[1], canvas);
	
	rapiers[2].setParameters(rapiers[2], 22*32, 113*32, 0.9, 0.94, 1, 30);
    rapiers[2].getPosition(rapiers[2]);
    
    rapiers[2].draw(rapiers[2], canvas);
	
	rapiers[3].setParameters(rapiers[3], 39*32, 111*32, 0.85, 0.91, -1, 30);
    rapiers[3].getPosition(rapiers[3]);
    
    rapiers[3].draw(rapiers[3], canvas);
	
	rapiers[4].setParameters(rapiers[4], 54*32, 109*32, 0.92, 0.97, 1, 30);
    rapiers[4].getPosition(rapiers[4]);
    
    rapiers[4].draw(rapiers[4], canvas);
	
	rapiers[5].setParameters(rapiers[5], 68*32, 107*32, 0.95, 0.99, 1, 30);
    rapiers[5].getPosition(rapiers[5]);
    
    rapiers[5].draw(rapiers[5], canvas);
	
	rapiers[6].setParameters(rapiers[6], 82*32, 106*32, 0.88, 0.93, -1, 30);
    rapiers[6].getPosition(rapiers[6]);
    
    rapiers[6].draw(rapiers[6], canvas);
	
	rapiers[7].setParameters(rapiers[7], 97*32, 93*32, 0.85, 0.91, 1, 30);
    rapiers[7].getPosition(rapiers[7]);
    
    rapiers[7].draw(rapiers[7], canvas);
	
	rapiers[8].setParameters(rapiers[8], 113*32, 91*32, 0.8, 0.85, -1, 30);
    rapiers[8].getPosition(rapiers[8]);
    
    rapiers[8].draw(rapiers[8], canvas);
	
	rapiers[9].setParameters(rapiers[9], 125*32, 78*32, 0.78, 0.83, 1, 30);
    rapiers[9].getPosition(rapiers[9]);
    
    rapiers[9].draw(rapiers[9], canvas);
	
	rapiers[10].setParameters(rapiers[10], 146*32, 80*32, 0.72, 0.75, -1, 30);
    rapiers[10].getPosition(rapiers[10]);
    
    rapiers[10].draw(rapiers[10], canvas);
	
	rapiers[11].setParameters(rapiers[11], 136*32, 86*32, 0.9, 0.75, 1, 30);
    rapiers[11].getPosition(rapiers[11]);
    
    rapiers[11].draw(rapiers[11], canvas);
}

void onDrawLayer3(jjPLAYER@ play, jjCANVAS@ canvas) {
// Castle Skeletons
	canvas.drawSprite(29*32, ((135*32) - 6), ANIM::SKELETON, 2, 12, 0, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(39*32, ((83*32) - 6), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((27*32) - 10), ((46*32) - 6), ANIM::SKELETON, 2, 12, 0, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(152*32, ((75*32) - 6), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(176*32, ((67*32) - 6), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(144*32, ((89*32) - 6), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(114*32, ((90*32) - 6), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(94*32, ((82*32) - 6), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(71*32, ((81*32) - 6), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(84*32, ((80*32) - 6), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(48*32, ((93*32) - 6), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(65*32, ((107*32) - 6), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((105*32) - 5), ((119*32) - 24), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(60*32, ((89*32) - 6), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(49*32, ((106*32) - 6), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(49*32, ((59*32) - 6), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(70*32, ((59*32) - 6), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(105*32, ((59*32) - 6), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(91*32, ((45*32) - 6), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	
// Castle Bricks Skeletons
	canvas.drawSprite(((119*32) + 10), ((104*32) - 11), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((117*32) - 6), ((103*32) - 11), ANIM::SKELETON, 2, 12, 0, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((204*32) - 6), ((57*32) - 11), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	

// Ice Skeletons
	canvas.drawSprite(14*32, ((151*32) - 16), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(44*32, ((146*32) - 16), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(72*32, ((142*32) - 16), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(142*32, ((120*32) - 16), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(157*32, ((107*32) - 16), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((193*32) - 8), ((105*32) - 16), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((190*32) - 8), ((90*32) - 16), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((201*32) + 18), ((75*32) - 16), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((193*32) + 8), ((76*32) - 16), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);


// Snow Skeletons
	canvas.drawSprite(((50*32) - 10), ((19*32) + 2), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((99*32) - 10), ((19*32) + 2), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((76*32) - 10), ((30*32) + 2), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((150*32) + 15), ((35*32) + 2), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((135*32) + 10), ((28*32) + 2), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((113*32) + 5), ((39*32) + 2), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((166*32) + 10), ((51*32) + 2), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((178*32) - 10), ((50*32) + 2), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((132*32) - 10), ((48*32) + 2), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((153*32) + 2), ((58*32) + 2), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((122*32) + 2), ((28*32) + 2), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);

// Piled Skeletons
	// Piled on Ice
	canvas.drawSprite(((99*32 - 10)), ((137*32) - 24), ANIM::SKELETON, 2, 12, 0, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((97*32 + 4)), ((137*32) - 24), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((95*32 + 18)), ((137*32) - 24), ANIM::SKELETON, 2, 12, 0, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((98*32 + 8)), ((137*32) - 32), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	
	// Piled on Castle Bricks
	canvas.drawSprite(((174*32) + 10), ((33*32) - 19), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((173*32) - 2), ((33*32) - 19), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((175*32) - 12), ((33*32) - 19), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((174*32) - 6), ((33*32) - 19), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((174*32) + 8), ((33*32) - 27), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	
	canvas.drawSprite(((106*32) + 10), ((34*32) - 19), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((105*32) - 2), ((34*32) - 19), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((107*32) - 12), ((34*32) - 19), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((106*32) - 6), ((34*32) - 19), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((106*32) + 8), ((34*32) - 27), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	
	// Piled on Castle
	canvas.drawSprite(67*32, ((46*32) - 14), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((67*32) + 8), ((46*32) - 14), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((71*32) + 8), ((46*32) - 14), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((72*32) + 14), ((46*32) - 14), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
}

void onDrawLayer2(jjPLAYER@ play, jjCANVAS@ canvas) {
// Castle Skeletons
	canvas.drawSprite(67*32, ((46*32) - 5), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((68*32) + 5), ((46*32) - 5), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((71*32) + 12), ((46*32) - 5), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((72*32) + 16), ((46*32) - 5), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((70*32) + 24), ((46*32) - 5), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);

// Castle Bricks Skeletons
	canvas.drawSprite(((174*32) - 6), ((33*32) - 11), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((173*32) - 16), ((33*32) - 11), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((175*32) + 1), ((33*32) - 11), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((174*32) + 4), ((33*32) - 11), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	
	canvas.drawSprite(((106*32) - 6), ((34*32) - 11), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((105*32) - 16), ((34*32) - 11), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((107*32) + 1), ((34*32) - 11), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((106*32) + 4), ((34*32) - 11), ANIM::SKELETON, 2, 12, 1, SPRITE::SINGLEHUE, 64);
	

// Ice Skeletons
	canvas.drawSprite(100*32, ((137*32) - 16), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((98*32) + 14), ((137*32) - 16), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((96*32) + 28), ((137*32) - 16), ANIM::SKELETON, 2, 12, 0, SPRITE::SINGLEHUE, 64);
	canvas.drawSprite(((94*32) + 42), ((137*32) - 16), ANIM::SKELETON, 2, 12, -1, SPRITE::SINGLEHUE, 64);
}