Skip to main content
V.H
Senior
October 25, 2021
Question

AnimatedImage can not work

  • October 25, 2021
  • 18 replies
  • 4361 views

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).

This topic has been closed for replies.

18 replies

V.H
V.HAuthor
Senior
October 25, 2021

Solved.

Romain DIELEMAN
ST Employee
October 25, 2021

Hi,

​

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

/Romain

V.H
V.HAuthor
Senior
October 25, 2021

​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
March 6, 2023

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

V.H
V.HAuthor
Senior
March 7, 2023

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

DNguy.14
Associate II
March 7, 2023

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
 }
};

DNguy.14
Associate II
March 7, 2023

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

Romain DIELEMAN
ST Employee
March 7, 2023

Hi,

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

0693W00000aILftQAG.png 

/Romain

DNguy.14
Associate II
March 7, 2023

Thanks you, I got it.