multiplayer pong game for LPC 1768
Dependencies: mbed MbedJSONValue mbed-rtos Adafruit_ST7735 Adafruit_GFX EthernetInterface DebouncedInterrupt
graphics.cpp
- Committer:
- vsoltan
- Date:
- 2020-11-14
- Revision:
- 17:32ae1f106002
- Parent:
- 16:7fd48cda0773
- Child:
- 18:32fce82690a1
File content as of revision 17:32ae1f106002:
#include "graphics.h" Graphics::Graphics() { printf("\n\rInitializing Graphics: initializing TFT\n\r"); this->tft = new Adafruit_ST7735(P_MOSI, P_MISO, P_SOCK, P_CS, P_RS, P_DC); printf("Initializing Graphics: optimizing display for resolution\n\r"); tft->initR(INITR_144GREENTAB); tft->setTextColor(ST7735_WHITE); } void Graphics::renderLaunchScreen() { tft->fillScreen(ST7735_BLACK); tft->setTextCursor(20, 20); tft->printf("%s", "Multiplayer Pong"); tft->setTextCursor(20, 80); tft->printf("%s", "Press any button to continue."); } void Graphics::renderBall(GameState *gs) { } void Graphics::renderPlayers(GameState *gs) { } void Graphics::renderGameState(GameState *gs) { tft->fillScreen(ST7735_RED); }