1// This header file is generated by WOWCube SDK project wizard
2#pragma once
3#include "Gfx.h"
4
5#define DISPLAY_CENTER_X 120
6#define DISPLAY_CENTER_Y 120
7
8#define SCREEN_WIDTH 240
9#define SCREEN_HEIGHT 240
10
11#define NUM_PLANETS 3
12
13typedef struct
14{
15 uint32_t sprite;
16 float x;
17 float y;
18 int z;
19 float angle;
20 float radius;
21 float speed;
22 float orbIncl;
23} Planet_t;
24
25class Bitmaps: public Cubios::Application
26{
27public:
28 Bitmaps();
29 virtual ~Bitmaps();
30
31 virtual void on_PhysicsTick(const std::array<Cubios::Screen, 3>& screens) override;
32 virtual void on_Twist(const Cubios::TOPOLOGY_twistInfo_t& twist) override;
33 virtual void on_Message(uint32_t type, uint8_t* pkt, u32_t size) override;
34 virtual void on_ExternalMessage(uint8_t* pkt, u32_t size) override;
35 virtual void on_Pat(uint32_t count) override;
36 virtual void on_Render(std::array<Cubios::Screen, 3>& screens) override;
37 virtual void on_Tick(uint32_t currentTime, uint32_t deltaTime) override;
38 virtual void on_Timer(uint8_t timerID) override;
39
40 void InitializeResources();
41private:
42
43 //Background image
44 uint32_t bkg_image;
45 //Foreground image
46 uint32_t fg_image;
47
48 //Star and planets
49 uint32_t sun_image;
50 Planet_t planets[NUM_PLANETS];
51
52 float incl;
53};