WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. Examples
  4. GfxAnimatedSprite.h
Mission NodeSDK 6.3C++renderingProject Included

GfxAnimatedSprite.h

Example: GfxAnimatedSprite.h

Examples / SDK 6.3 / C++ / rendering / Gfx Engine - Animated Sprites and Sprite Atlases / project / src
GfxAnimatedSprite.h
CPP
1// This header file is generated by WOWCube SDK project wizard
2//
3// Application UUID: CNiZStZ0Mg
4//
5#pragma once
6
7#include "Gfx.h"
8
9enum GfxObjects
10{
11 myBackground=0,
12 mySprite,
13 myAtlasBase,
14 mySprite2 = 11,
15 mySprite3 = 12,
16 myAtlas2Base
17};
18
19class GfxAnimatedSpriteApp: public Cubios::Application
20{
21public:
22 GfxAnimatedSpriteApp();
23 virtual ~GfxAnimatedSpriteApp();
24
25 virtual void on_PhysicsTick(const std::array<Cubios::Screen, 3>& screens) override;
26 virtual void on_Twist(const Cubios::TOPOLOGY_twistInfo_t& twist) override;
27 virtual void on_Message(uint32_t type, uint8_t* pkt, u32_t size) override;
28 virtual void on_ExternalMessage(uint8_t* pkt, u32_t size) override;
29 virtual void on_Pat(uint32_t count) override;
30 virtual void on_Render(std::array<Cubios::Screen, 3>& screens) override;
31 virtual void on_Tick(uint32_t currentTime, uint32_t deltaTime) override;
32 virtual void on_Timer(uint8_t timerID) override;
33 virtual void on_Close() override;
34
35 void InitializeResources();
36
37private:
38 Cubios::Gfx::SpriteAtlas<Cubios::Gfx::SpriteAtlasElement>* animationAtlas;
39 Cubios::Gfx::SpriteAtlas<Cubios::Gfx::SpriteAtlasElement>* animationAtlas2;
40
41 Cubios::Gfx::AnimatedSprite* sprite;
42 Cubios::Gfx::AnimatedSprite* sprite2;
43 Cubios::Gfx::Sprite* sprite3;
44
45 float position;
46 int16_t prevFrame;
47};
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.
Context Rail

Project files

GfxAnimatedSprite.cpp
project/src/GfxAnimatedSprite.cpp
GfxAnimatedSprite.h
project/src/GfxAnimatedSprite.h
wowcubeapp-build.json
project/wowcubeapp-build.json
Context Rail

Related nodes

GfxAnimatedSprite.cpp
Examples / SDK 6.3 / C++ / rendering / Gfx Engine - Animated Sprites and Sprite Atlases / project / src
Gfx Engine - Animated Sprites and Sprite Atlases
Examples / SDK 6.3 / C++ / rendering
info.json
Examples / SDK 6.3 / C++ / rendering / Gfx Engine - Animated Sprites and Sprite Atlases
wowcubeapp-build.json
Examples / SDK 6.3 / C++ / rendering / Gfx Engine - Animated Sprites and Sprite Atlases / project
Previous Node
GfxAnimatedSprite.cpp
Examples / SDK 6.3 / C++ / rendering / Gfx Engine - Animated Sprites and Sprite Atlases / project / src
Next Node
wowcubeapp-build.json
Examples / SDK 6.3 / C++ / rendering / Gfx Engine - Animated Sprites and Sprite Atlases / project