multiplayer pong game for LPC 1768

Dependencies:   mbed MbedJSONValue mbed-rtos Adafruit_ST7735 Adafruit_GFX EthernetInterface DebouncedInterrupt

Committer:
vsoltan
Date:
Sat Nov 14 02:37:13 2020 +0000
Revision:
17:32ae1f106002
Parent:
16:7fd48cda0773
Child:
18:32fce82690a1
added menu to enter game, JSON de-serialization, and game state update.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vsoltan 16:7fd48cda0773 1
vsoltan 16:7fd48cda0773 2 #ifndef GRAPHICS_H
vsoltan 16:7fd48cda0773 3 #define GRAPHICS_H
vsoltan 16:7fd48cda0773 4
vsoltan 16:7fd48cda0773 5 #include "Adafruit_ST7735.h"
vsoltan 16:7fd48cda0773 6 #include "gamestate.h"
vsoltan 16:7fd48cda0773 7
vsoltan 16:7fd48cda0773 8 #define P_MOSI p5
vsoltan 16:7fd48cda0773 9 #define P_MISO p6
vsoltan 16:7fd48cda0773 10 #define P_SOCK p7
vsoltan 16:7fd48cda0773 11 #define P_CS p9
vsoltan 16:7fd48cda0773 12 #define P_RS p20
vsoltan 16:7fd48cda0773 13 #define P_DC p19
vsoltan 16:7fd48cda0773 14
vsoltan 16:7fd48cda0773 15 class Graphics {
vsoltan 16:7fd48cda0773 16 private:
vsoltan 16:7fd48cda0773 17 Adafruit_ST7735 *tft;
vsoltan 16:7fd48cda0773 18 public:
vsoltan 16:7fd48cda0773 19 Graphics();
vsoltan 16:7fd48cda0773 20 void renderLaunchScreen();
vsoltan 16:7fd48cda0773 21 void renderGameState(GameState *gs);
vsoltan 17:32ae1f106002 22 void renderBall(GameState *gs);
vsoltan 17:32ae1f106002 23 void renderPlayers(GameState *gs);
vsoltan 16:7fd48cda0773 24 };
vsoltan 16:7fd48cda0773 25
vsoltan 16:7fd48cda0773 26 #endif // GRAPHICS_H