|
method void draw(int frame, boolean color, int dir) {
var int memAddress;
let memAddress = 16384 + xPos + (yPos * 512);
if (color) {
if (frame = 0) {
do Memory.poke(memAddress+0, 992);
do Memory.poke(memAddress+32, 4088);
do Memory.poke(memAddress+64, 8188);
do Memory.poke(memAddress+96, 16382);
do Memory.poke(memAddress+128, 16382);
do Memory.poke(memAddress+160, 32767);
do Memory.poke(memAddress+192, 32767);
do Memory.poke(memAddress+224, 32767);
do Memory.poke(memAddress+256, 32767);
do Memory.poke(memAddress+288, 32767);
do Memory.poke(memAddress+320, 16382);
do Memory.poke(memAddress+352, 16382);
do Memory.poke(memAddress+384, 8188);
do Memory.poke(memAddress+416, 4088);
do Memory.poke(memAddress+448, 992);
do Memory.poke(memAddress+480, 0);
}
if (frame = 1) {
if (dir = 0) {
do Memory.poke(memAddress+0, 0);
do Memory.poke(memAddress+32, 3096);
do Memory.poke(memAddress+64, 7196);
do Memory.poke(memAddress+96, 15934);
do Memory.poke(memAddress+128, 15934);
do Memory.poke(memAddress+160, 32319);
do Memory.poke(memAddress+192, 32639);
do Memory.poke(memAddress+224, 32639);
do Memory.poke(memAddress+256, 32767);
do Memory.poke(memAddress+288, 32767);
do Memory.poke(memAddress+320, 16382);
do Memory.poke(memAddress+352, 16382);
do Memory.poke(memAddress+384, 8188);
do Memory.poke(memAddress+416, 4088);
do Memory.poke(memAddress+448, 992);
do Memory.poke(memAddress+480, 0);
}
if (dir = 1) {
do Memory.poke(memAddress+0, 0);
do Memory.poke(memAddress+32, 992);
do Memory.poke(memAddress+64, 4088);
do Memory.poke(memAddress+96, 8188);
do Memory.poke(memAddress+128, 16382);
do Memory.poke(memAddress+160, 16382);
do Memory.poke(memAddress+192, 32767);
do Memory.poke(memAddress+224, 32767);
do Memory.poke(memAddress+256, 32639);
do Memory.poke(memAddress+288, 32639);
do Memory.poke(memAddress+320, 32319);
do Memory.poke(memAddress+352, 15934);
do Memory.poke(memAddress+384, 15934);
do Memory.poke(memAddress+416, 7196);
do Memory.poke(memAddress+448, 3096);
do Memory.poke(memAddress+480, 0);
}
if (dir = 2) {
do Memory.poke(memAddress+0, 992);
do Memory.poke(memAddress+32, 4088);
do Memory.poke(memAddress+64, 8188);
do Memory.poke(memAddress+96, 16382);
do Memory.poke(memAddress+128, 16382);
do Memory.poke(memAddress+160, 32760);
do Memory.poke(memAddress+192, 32704);
do Memory.poke(memAddress+224, 32512);
do Memory.poke(memAddress+256, 32704);
do Memory.poke(memAddress+288, 32760);
do Memory.poke(memAddress+320, 16382);
do Memory.poke(memAddress+352, 16382);
do Memory.poke(memAddress+384, 8188);
do Memory.poke(memAddress+416, 4088);
do Memory.poke(memAddress+448, 992);
do Memory.poke(memAddress+480, 0);
}
if (dir = 3) {
do Memory.poke(memAddress+0, 1984);
do Memory.poke(memAddress+32, 8176);
do Memory.poke(memAddress+64, 16376);
do Memory.poke(memAddress+96, 32764);
do Memory.poke(memAddress+128, 32764);
do Memory.poke(memAddress+160, 8190);
do Memory.poke(memAddress+192, 1022);
do Memory.poke(memAddress+224, 254);
do Memory.poke(memAddress+256, 1022);
do Memory.poke(memAddress+288, 8190);
do Memory.poke(memAddress+320, 32764);
do Memory.poke(memAddress+352, 32764);
do Memory.poke(memAddress+384, 16376);
do Memory.poke(memAddress+416, 8176);
do Memory.poke(memAddress+448, 1984);
do Memory.poke(memAddress+480, 0);
}
}
if (frame = 2) {
if (dir = 0) {
do Memory.poke(memAddress+0, 0);
do Memory.poke(memAddress+32, 0);
do Memory.poke(memAddress+64, 0);
do Memory.poke(memAddress+96, 0);
do Memory.poke(memAddress+128, 0);
do Memory.poke(memAddress+160, 24579);
do Memory.poke(memAddress+192, 28679);
do Memory.poke(memAddress+224, 30735);
do Memory.poke(memAddress+256, 31775);
do Memory.poke(memAddress+288, 32319);
do Memory.poke(memAddress+320, 16254);
do Memory.poke(memAddress+352, 16382);
do Memory.poke(memAddress+384, 8188);
do Memory.poke(memAddress+416, 4088);
do Memory.poke(memAddress+448, 992);
do Memory.poke(memAddress+480, 0);
}
if (dir = 1) {
do Memory.poke(memAddress+0, 0);
do Memory.poke(memAddress+32, 992);
do Memory.poke(memAddress+64, 4088);
do Memory.poke(memAddress+96, 8188);
do Memory.poke(memAddress+128, 16382);
do Memory.poke(memAddress+160, 16254);
do Memory.poke(memAddress+192, 32319);
do Memory.poke(memAddress+224, 31775);
do Memory.poke(memAddress+256, 30735);
do Memory.poke(memAddress+288, 28679);
do Memory.poke(memAddress+320, 24579);
do Memory.poke(memAddress+352, 0);
do Memory.poke(memAddress+384, 0);
do Memory.poke(memAddress+416, 0);
do Memory.poke(memAddress+448, 0);
do Memory.poke(memAddress+480, 0);
}
if (dir = 2) {
do Memory.poke(memAddress+0, 992);
do Memory.poke(memAddress+32, 4064);
do Memory.poke(memAddress+64, 8128);
do Memory.poke(memAddress+96, 16256);
do Memory.poke(memAddress+128, 16128);
do Memory.poke(memAddress+160, 32256);
do Memory.poke(memAddress+192, 31744);
do Memory.poke(memAddress+224, 30720);
do Memory.poke(memAddress+256, 31744);
do Memory.poke(memAddress+288, 32256);
do Memory.poke(memAddress+320, 16128);
do Memory.poke(memAddress+352, 16256);
do Memory.poke(memAddress+384, 8128);
do Memory.poke(memAddress+416, 4064);
do Memory.poke(memAddress+448, 992);
do Memory.poke(memAddress+480, 0);
}
if (dir = 3) {
do Memory.poke(memAddress+0, 1984);
do Memory.poke(memAddress+32, 2032);
do Memory.poke(memAddress+64, 1016);
do Memory.poke(memAddress+96, 508);
do Memory.poke(memAddress+128, 252);
do Memory.poke(memAddress+160, 126);
do Memory.poke(memAddress+192, 62);
do Memory.poke(memAddress+224, 30);
do Memory.poke(memAddress+256, 62);
do Memory.poke(memAddress+288, 126);
do Memory.poke(memAddress+320, 252);
do Memory.poke(memAddress+352, 508);
do Memory.poke(memAddress+384, 1016);
do Memory.poke(memAddress+416, 2032);
do Memory.poke(memAddress+448, 1984);
do Memory.poke(memAddress+480, 0);
}
}
} else {
do Memory.poke(memAddress+0, 0);
do Memory.poke(memAddress+32, 0);
do Memory.poke(memAddress+64, 0);
do Memory.poke(memAddress+96, 0);
do Memory.poke(memAddress+128, 0);
do Memory.poke(memAddress+160, 0);
do Memory.poke(memAddress+192, 0);
do Memory.poke(memAddress+224, 0);
do Memory.poke(memAddress+256, 0);
do Memory.poke(memAddress+288, 0);
do Memory.poke(memAddress+320, 0);
do Memory.poke(memAddress+352, 0);
do Memory.poke(memAddress+384, 0);
do Memory.poke(memAddress+416, 0);
do Memory.poke(memAddress+448, 0);
}
return;
}
(Sorry about the absence of indentation. HTML didn't allow me to put in space characters at the start of a line. It's not my fault)
|