-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdraw.h
More file actions
85 lines (62 loc) · 2.36 KB
/
Copy pathdraw.h
File metadata and controls
85 lines (62 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#include <SDL.h>
#include <stdio.h>
#include "structs.h"
#include "colors.h"
#include "file.h"
#ifndef SNAKEWKP_DRAW_H
#define SNAKEWKP_DRAW_H
typedef enum {
HEAD = 0,
BODY = 1,
TAIL = 2,
} part_type_et;
typedef struct {
part_type_et type;
direction_et direction;
} part_t;
void DrawTopBar(SDL_Surface *screen, SDL_Surface *charset, uint32_t deltaTime, state_et state, int score);
void DrawGameOver(SDL_Surface *screen, SDL_Surface *charset, int score, int time);
void DrawWin(SDL_Surface *screen, SDL_Surface *charset, int score, int time);
void DrawHelp(SDL_Surface *screen, SDL_Surface *charset);
void DrawBox(SDL_Surface *screen, SDL_Surface *charset, SDL_Rect rect, int type);
void DrawColorBox(SDL_Surface *screen, SDL_Surface *charset, SDL_Rect rect, int type, SDL_Color color);
void DrawProgressBar(
SDL_Surface *screen,
SDL_Surface *charset,
SDL_Rect gameArea,
int value,
int maxValue,
SDL_Color color);
void FillScreen(SDL_Surface *screen, SDL_Color color);
void DrawString(SDL_Surface *screen, SDL_Surface *charset, int x, int y, const char *text);
void DrawColorString(SDL_Surface *screen, SDL_Surface *charset, int x, int y, const char *text, SDL_Color color);
void DrawTime(SDL_Surface *screen, SDL_Surface *charset, int x, int y, uint32_t time);
void DrawColorTime(SDL_Surface *screen, SDL_Surface *charset, int x, int y, uint32_t time, SDL_Color color);
void DrawSnake(
SDL_Surface *screen,
SDL_Surface *objects,
SDL_Rect gameArea,
const point_t *pos,
int length,
const point_t *portalPos,
const int portalCount);
void DrawObjects(
SDL_Surface *screen,
SDL_Surface *charset,
SDL_Surface *objects,
SDL_Rect gameArea,
const point_t *pos,
int length,
int type,
int fruitMode);
void DrawGame(SDL_Surface *screen, SDL_Surface *charset, game_t game, uint32_t *time);
void DrawScores(SDL_Surface *screen, SDL_Surface *charset, score_t *scores);
void DrawInput(SDL_Surface *screen, SDL_Surface *charset, char *name, int blink);
void DrawFruitPoints(
SDL_Surface *screen,
SDL_Surface *charset,
SDL_Surface *objects,
SDL_Rect gameArea,
config_t config);
void DrawAutoFail(SDL_Surface *screen, SDL_Surface *charset, int score, int time);
#endif //SNAKEWKP_DRAW_H