Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Anniversary Bash 22 levels | Jazz2Online | Multiple | N/A |
const bool MLLESetupSuccessful = MLLE::Setup(); ///@MLLE-Generated
#include "MLLE-Include-1.5.asc" ///@MLLE-Generated
#pragma require "ab22ctf06.j2l" ///@MLLE-Generated
jjPAL standard;
void onLevelLoad() {
removeSpritePaletteReferences();
standard.load("Diam2.j2t");
jjObjectPresets[OBJECT::FULLENERGY].behavior = StillPickup;
jjWeapons[WEAPON::GUN8].comesFromGunCrates = true;
jjWeapons[WEAPON::GUN9].comesFromGunCrates = true;
}
void onLevelBegin() {
jjPalette.copyFrom(16, 40, 16, standard, 1);
jjPalette.copyFrom(59, 37, 59, standard, 1);
jjPalette.apply();
}
void onMain() {
if (jjGetModOrder() == 31 && jjMusicFileName == "babylon.s3m")
jjSetModPosition(0, 0, false);
}
void removeSpritePaletteReferences() {
array<int> mapping(256);
for (int i = 1; i < 96; i++) {
jjPALCOLOR color = jjPalette.color[i];
int best = 0x40000;
for (int j = 96; j < 256; j++) {
jjPALCOLOR match = jjPalette.color[j];
int red = int(match.red) - color.red;
int green = int(match.green) - color.green;
int blue = int(match.blue) - color.blue;
int dist = red * red + green * green + blue * blue;
if (dist < best) {
best = dist;
mapping[i] = j;
}
}
}
for (int i = 96; i < 256; i++) {
mapping[i] = i;
}
for (uint i = 1; i < jjTileCount; i++) {
jjPIXELMAP tile(i);
for (int j = 0; j < 32; j++) {
for (int k = 0; k < 32; k++) {
tile[k, j] = mapping[tile[k, j]];
}
}
tile.save(i, true);
}
}
void StillPickup(jjOBJ@ obj) {
obj.behave(BEHAVIOR::PICKUP);
obj.xPos = obj.xOrg;
}
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.