cancel
Showing results for 
Search instead for 
Did you mean: 

AnimatedImage can not work

V.H
Senior

I add three AnimatedImages in a screen, but only one can work normal.

I transplant 'Knight Hits Zombie Game' code and bring my own project, the Zombie and Head AnimatedImages can not play but the Knight AnimatedImage work normal. (The Zombie and Head show the first image but can not show the others).

18 REPLIES 18
V.H
Senior

Solved.

Hi,

Good to hear it works ��. What board were you using ? What was the issue and the fix ? Was it due to an issue with the external flash loader ?

/Romain

​I ported the program to my own board used 320 * 170 touch screen.

I close the timestamp and the random function cannot work. (CortexMMCUInstrumentation.cpp)

DNguy.14
Associate II

Where can I get the source code of Knight Hit Zombie game?

Used "TouchGfx Desinger"​ could generate the source code of Knight Hit Zombie game.

DNguy.14
Associate II

Thanks you, I don't know it's an example already available in ToughGFX.

Hi,

You can find it in the Demos tab in TouchGFX Designer.

0693W00000aILftQAG.png 

/Romain

Thanks you, I got it.

Hello, I use Random function in Utils.hpp but it's always return the same value. Can you help me?

class Utils
{
public:
    static int randomNumberBetween(int lowest, int highest)
    {
#ifdef SIMULATOR
        return (int)(lowest + (highest - lowest) * (rand() / (float)RAND_MAX));
#else
        uint32_t random = (touchgfx::HAL::getInstance()->getCPUCycles() * HAL::getInstance()->getCPUCycles());
        return lowest + (random % (highest - lowest));
#endif
    }
};