Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Faster-Than-Light Starship | ThunDerDraGon | Capture the flag | 9 |
#include "MLLE-Include-1.4.asc"
const bool MLLESetupSuccessful = MLLE::Setup();
#pragma require "ezstar.j2l"
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.