You are not logged in.

#1 2009-01-21 01:05:29

Cid2mizard
Member

Moving tiles bug

I have a bug with a 2 tiles next to the other across the screen, once in the coordinated (posax) >= 320, we see a shift of 1 or 2 pixels on the frame.

Code:

    i = 0;
    tempo = 0;
    float posax = -460;

    while (stape == 1)//Sprint latérale
    {
        GRRLIB_FillScreen(0xFF000000);

        GRRLIB_DrawImg(0, 140, 640, 200, tex_town1, 0, 1, 1, 255);
        GRRLIB_DrawTile(posax, 180, 230, 136, tex_sprinta, 0, 1, 1, 255, i, 4);
        GRRLIB_DrawTile(posax + 230, 180, 230, 136, tex_sprintb, 0, 1, 1, 255, i, 4);

        posax+=2;

        if (tempo < 4) tempo++;

        else
        {
            tempo = 0;
            i++;
            if (i > 3) i = 0;
        }

        //if (SND_StatusVoice(0)==SND_UNUSED) stape = 2;

        GRRLIB_Render();
    }

Any idea for this bug ?


www.nintendomax.com - 100% Hack  0% Warez

Offline

 

#2 2009-01-21 01:32:23

NoNameNo
Administrator

Re: Moving tiles bug

already talked about it in the forum, it's a libogc bug not a grrlib, a workaround have been found by a forum member and implemented in the svn. try grrlib svn and tell us if the bug is still here.

Offline

 

#3 2009-01-21 13:56:03

Cid2mizard
Member

Re: Moving tiles bug

Yes with 3.0.5 alpha r14, i'vnt no bugs. Thanks smile


www.nintendomax.com - 100% Hack  0% Warez

Offline

 

#4 2009-01-21 14:32:06

NoNameNo
Administrator

Re: Moving tiles bug

np wink
take care, 3.0.5 is still under heavy dev and lot of modification will be made.
so stay tuned to make evolution on your code when you upgrade the svn version wink

Offline

 

#5 2009-01-21 17:41:20

Cid2mizard
Member

Re: Moving tiles bug

no i have many bug with it, i store on 3.0.1 hmm

Edit : i have apply a spiffen correction on 3.0.1 and it's good

Code:

    //f32 s1= frame/maxframe;
    //f32 s2= (frame+1)/maxframe;
    //f32 t1= 0;
    //f32 t2=1;
    
    // Frame Correction by spiffen
    f32 FRAME_CORR = 0.001f;
    f32 s1 = (((frame))/(f32)maxframe)+(FRAME_CORR/(maxframe*width));
    f32 s2 = (((frame)+1)/(f32)maxframe)-(FRAME_CORR/(maxframe*width));
    f32 t1 = (((int)(frame/maxframe)))+(FRAME_CORR/(maxframe*height));
    f32 t2 = (((int)(frame/maxframe)+1))-(FRAME_CORR/(maxframe*height));

Last edited by Cid2mizard (2009-01-21 23:20:11)


www.nintendomax.com - 100% Hack  0% Warez

Offline

 

Board footer

Powered by FluxBB