Question

I have an app which uses the Tween method for a number of animations. One of the tweens is the following:

pipe_Tweener.Tween(3.2f,
    FLOAT, &pSprite->m_X, (float) -pSprite->GetImage()->GetWidth(),
    FLOAT, &pSprite->m_Y, (float) pSprite->m_Y,
    FLOAT, &pSprite->m_X, (float) -pSprite->GetImage()->GetWidth(),
    FLOAT, &pSprite->m_Y, (float) pSprite->m_Y,
    ONCOMPLETE, &Game::ResetP,
    END);

and another is:

pipe_Tweener.Tween(JUMP_TIME,
    FLOAT, &bSprite->m_X, (float) bSprite->m_X,
    FLOAT, &bSprite->m_Y, (float) bSprite->m_Y-JUMP_HEIGHT,
    EASING, Ease::sineOut,
    ONCOMPLETE, &Game::EndAnimating, 
    END);

These tweens seem to work fine when debugging using the x86 debug. However when I use the GCC ARM debug I end up with an IwAssert failure at line 360 in IwTween.cpp. I've debugged through the Tween method, and what I've noticed is that for my first tween everything is fine, I can see the method going through each Type (FLOAT, FLOAT, FLOAT, FLOAT , ONCOMPLETE, END). However for the second tween when the Tween method gets to the END enum, Type becomes 0, (so I see for Type (FLOAT, FLOAT, EASING, ONCOMPLETE, 0) causing the default case statement to execute, which calls the assert failure.

I'm not sure if I'm doing something wrong or if this is a bug with Marmalade itself?

Was it helpful?

Solution

I've actually solved this, but I'll post in case it'll help anyone else. My EndAnimating method was not static, which was causing some problem in the Tween method. Strangely it only caused a problem when debugging with the ARM simulator.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top