Added hitfeed; ClearAnimation 0 offset fix
This commit is contained in:
14
hangman.h
14
hangman.h
@@ -10,6 +10,7 @@
|
||||
#define ALPHABET_NUM 36
|
||||
#define ANIM_DURATION 1
|
||||
#define LINEBREAK 16 //Linebreak offset
|
||||
#define HITFEEDSLOTS 5
|
||||
|
||||
/* Data structures */
|
||||
typedef struct {
|
||||
@@ -36,6 +37,11 @@ typedef struct word {
|
||||
struct word *next;
|
||||
} word;
|
||||
|
||||
typedef struct hitfeed {
|
||||
char history[HITFEEDSLOTS][50]; //Prints the last 3 streaks
|
||||
char beststreak[50]; //Prints the best streak
|
||||
int besthit; //Prints the best hit number e.g. Godlike with 15 hits
|
||||
} hitfeed;
|
||||
|
||||
/* Function prototypes */
|
||||
void quitProgram(void);
|
||||
@@ -45,17 +51,19 @@ void initGuessWord(game_state *gs, char *filename);
|
||||
void initAlphabet(game_state *gs);
|
||||
void drawAlphabet(game_state *gs, char usedchar);
|
||||
void drawGuessWord(game_state *gs);
|
||||
int playerInput(game_state *gs);
|
||||
int playerInput(game_state *gs, hitfeed *hf);
|
||||
int fillCurrentWord(game_state *gs, char validchar);
|
||||
int stackWrongCharacter(game_state *gs, char wrongchar);
|
||||
int checkWin(game_state *gs);
|
||||
void printGameStats(game_state *gs);
|
||||
void toLowerCase(char *str);
|
||||
void showStartScreen(game_state *gs);
|
||||
void startGame(game_state *gs);
|
||||
void startGame(game_state *gs, hitfeed *hf);
|
||||
void showHelp(game_state *gs);
|
||||
int centerDiff(int coordinate, char *str);
|
||||
void readRandomLine(char *file, char *result);
|
||||
void trollHitScreen(game_state *gs, int hits);
|
||||
void trollHitScreen(game_state *gs, hitfeed *hf, int hits);
|
||||
void addHitToFeed(hitfeed *hf, char *streak, int hit);
|
||||
void drawFigure(game_state *gs, int drawNext);
|
||||
void animateLineClear(game_state *gs, int line, int offsetMultiplier);
|
||||
void printHitFeed(game_state *gs, hitfeed *hf);
|
||||
|
Reference in New Issue
Block a user