68 lines
1.2 KiB
C
68 lines
1.2 KiB
C
/*
|
|
* game_engine.h
|
|
*
|
|
* Created on: 29 nov. 2019
|
|
* Author: JackCarterSmith
|
|
*/
|
|
|
|
#ifndef GAME_ENGINE_H_
|
|
#define GAME_ENGINE_H_
|
|
|
|
#include "stm32412g_discovery.h"
|
|
|
|
|
|
/**
|
|
* @brief HighScores datas structure
|
|
*/
|
|
typedef struct {
|
|
uint8_t Solo_HS;
|
|
uint8_t Multi_HS;
|
|
}PP_HighScoresTypeDef;
|
|
|
|
/**
|
|
* @brief Ball datas structure
|
|
*/
|
|
typedef struct {
|
|
uint8_t posX;
|
|
uint8_t posY;
|
|
int8_t accX;
|
|
int8_t accY;
|
|
}PP_BallTypeDef;
|
|
|
|
/**
|
|
* @brief PongBar datas structure
|
|
*/
|
|
typedef struct {
|
|
uint8_t pos;
|
|
int8_t acc;
|
|
}PP_BarTypeDef;
|
|
|
|
/**
|
|
* @brief GameMode type definitions
|
|
*/
|
|
typedef enum {
|
|
SOLO_MODE = 0x01,
|
|
MULTI_MODE = 0x02
|
|
}Game_ModeTypdef;
|
|
|
|
/**
|
|
* @brief Menu definitions
|
|
*/
|
|
typedef enum {
|
|
MENU_MAIN = 0x01,
|
|
MENU_GAME = 0x02,
|
|
MENU_END = 0x03
|
|
}MenuTypdef;
|
|
|
|
|
|
//void generateNewBall(Game_ModeTypdef type, uint32_t seed);
|
|
uint32_t genSeed();
|
|
void refreshCurrScreen(uint32_t _t, PP_BarTypeDef *_barDatas);
|
|
void displayLoadingScreen();
|
|
void displayStartMenu(PP_HighScoresTypeDef hsDatas);
|
|
void displayGameArea(Game_ModeTypdef type, PP_BarTypeDef *_barDatas);
|
|
void displayEndMenu();
|
|
MenuTypdef getCurrMenu();
|
|
|
|
#endif /* GAME_ENGINE_H_ */
|