-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathred.h
More file actions
37 lines (34 loc) · 985 Bytes
/
red.h
File metadata and controls
37 lines (34 loc) · 985 Bytes
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
#ifndef RED_H
#define RED_H
#include "snake.h"
#include "food.h"
#include "constants.h"
#include "SDL2-2.0.10/include/SDL_events.h"
#include "SDL2-2.0.10/include/SDL_render.h"
#include "SDL2-2.0.10/include/SDL_surface.h"
#include "SDL2-2.0.10/include/SDL_timer.h"
#include <cstddef>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
extern "C" {
#include"./SDL2-2.0.10/include/SDL.h"
#include"./SDL2-2.0.10/include/SDL_main.h"
}
class Red : public Food {
public:
double time_of_last_red, time_of_last_power_up;
int power,points_for_red,frequency_of_power_up;
int display;
Red();
int display_red(double time,Snake* snake,SDL_Surface* screen,int* points,double delta);
void power_up(Snake* snake, SDL_Surface *screen,double time,int* points);
double progress_bar(SDL_Surface* screen, double time,Snake snake);
void save_red(FILE* fptr);
int load_red(FILE* fptr);
void load_config(FILE* fptr);
};
#endif