[refacrored] Animated Backgrounds :D
(Clienthax is immune from the tutorial format)
you need my easyspriteloader
put
Code:
int currentFrame = 0;
Sprite[] omg = null;
long timez = System.currentTimeMillis();
above
Code:
private void drawLoginScreen(
under resetImageProducers(); in drawLoginScreen
put
Code:
if(omg == null)
{
omg = new Sprite[8];
omg[0] = new Sprite("./frames/0.png");
omg[1] = new Sprite("./frames/1.png");
omg[2] = new Sprite("./frames/2.png");
omg[3] = new Sprite("./frames/3.png");
omg[4] = new Sprite("./frames/4.png");
omg[5] = new Sprite("./frames/5.png");
omg[6] = new Sprite("./frames/6.png");
omg[7] = new Sprite("./frames/7.png");
}
if(currentFrame+1 == 9)
currentFrame = 0;
Sprite sprite = omg[currentFrame];
if(!((System.currentTimeMillis() - timez) < /*500*/ /*2000*/ 1000))//time delay
{
currentFrame++;
timez = System.currentTimeMillis();
}
aRSImageProducer_1110.initDrawingArea();
sprite.method346(0, 0);
getGameComponent().repaint();
aRSImageProducer_1111.initDrawingArea();
sprite.method346(-637, 0);
getGameComponent().repaint();
aRSImageProducer_1107.initDrawingArea();
sprite.method346(-128, 0);
getGameComponent().repaint();
aRSImageProducer_1108.initDrawingArea();
sprite.method346(-202, -371);
getGameComponent().repaint();
aRSImageProducer_1109.initDrawingArea();
sprite.method346(-202, -171);
getGameComponent().repaint();
aRSImageProducer_1112.initDrawingArea();
sprite.method346(0, -265);
getGameComponent().repaint();
aRSImageProducer_1113.initDrawingArea();
sprite.method346(-562, -265);
getGameComponent().repaint();
aRSImageProducer_1114.initDrawingArea();
sprite.method346(-128, -171);
getGameComponent().repaint();
aRSImageProducer_1115.initDrawingArea();
sprite.method346(-562, -171);
getGameComponent().repaint();
in drawFlames
replace both
Code:
calcFlamesPosition();
;
with
Code:
//calcFlamesPosition();//stops flames
in doFlamesDrawing
replace
Code:
System.arraycopy(aClass30_Sub2_Sub1_Sub1_1201.myPixels, 0, aRSImageProducer_1110.anIntArray315, 0, 33920);
with
Code:
//System.arraycopy(aClass30_Sub2_Sub1_Sub1_1201.myPixels, 0, aRSImageProducer_1110.anIntArray315, 0, 33920);//stop the flicker from the original bg
and replace
Code:
System.arraycopy(aClass30_Sub2_Sub1_Sub1_1202.myPixels, 0, aRSImageProducer_1111.anIntArray315, 0, 33920);
with
Code:
//System.arraycopy(aClass30_Sub2_Sub1_Sub1_1202.myPixels, 0, aRSImageProducer_1111.anIntArray315, 0, 33920);//stop the flicker from the original bg
heres the sprites i used
[Only registered and activated users can see links. Click Here To Register...]
now for the seethrough login box n crap :)
replace
Code:
aBackground_966 = new Background(titleStreamLoader, "titlebox", 0);
with
Code:
aBackground_966 = new Sprite(titleStreamLoader, "titlebox", 0);
replace
Code:
aBackground_967 = new Background(titleStreamLoader, "titlebutton", 0);
with
Code:
aBackground_967 = new Sprite(titleStreamLoader, "titlebutton", 0);
replace
Code:
aBackground_966.method361(0, 0);
with
Code:
aBackground_966.drawSprite1(0, 0);
replace
Code:
aBackground_967.method361(l - 73, k1 - 20);
with
Code:
aBackground_967.drawSprite1(l - 73, k1 - 20);
replace
Code:
aBackground_967.method361(l - 73, k1 - 20);
with
Code:
aBackground_967.drawSprite1(l - 73, k1 - 20);
replace
Code:
aBackground_967.method361(i1 - 73, l1 - 20);
with
Code:
aBackground_967.drawSprite1(i1 - 73, l1 - 20);
replace
Code:
aBackground_967.method361(i1 - 73, l1 - 20);
with
Code:
aBackground_967.drawSprite1(i1 - 73, l1 - 20);
replace
Code:
aBackground_967.method361(j1 - 73, i2 - 20);
with
Code:
aBackground_967.drawSprite1(j1 - 73, i2 - 20);
done ? O_o