简体   繁体   English

使用GCC ARM进行调试时,END枚举出现问题

[英]Problems with the END enum when debugging with GCC ARM

I have an app which uses the Tween method for a number of animations. 我有一个使用Tween方法进行许多动画处理的应用程序。 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. 当使用x86调试进行调试时,这些补间似乎工作正常。 However when I use the GCC ARM debug I end up with an IwAssert failure at line 360 in IwTween.cpp . 但是,当我使用GCC ARM调试时,在IwTween.cpp的第360行出现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 ). 我已经调试了Tween方法,并且注意到,对于我的第一个补间来说一切都很好,我可以看到该方法遍历每个TypeFLOATFLOATFLOATFLOATONCOMPLETEEND )。 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. 但是对于第二个补间,当Tween方法到达END枚举时, Type变为0(因此我看到TypeFLOATFLOATEASINGONCOMPLETE0 ))导致执行默认case语句,从而调用断言失败。

I'm not sure if I'm doing something wrong or if this is a bug with Marmalade itself? 我不确定我是在做错什么还是这是果酱本身的错误?

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. 我的EndAnimating方法不是静态的,这在Tween方法中引起了一些问题。 Strangely it only caused a problem when debugging with the ARM simulator. 奇怪的是,它仅在使用ARM仿真器进行调试时才引起问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM