generated from ECE-Lyon/Base-Projet-Avec-Marp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFrogger.h
41 lines (35 loc) · 817 Bytes
/
Frogger.h
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
//
// Created by Hugo on 10/05/2023.
//
#ifndef PONCTUEL_FROGGER_H
#define PONCTUEL_FROGGER_H
#include <stdio.h>
#include <allegro.h>
#include <time.h>
typedef struct Log{
int x;
int y;
int speed;
BITMAP *sprite;
BITMAP *colisions;
}Log;
typedef struct Frog{
int x;
int y;
int alive;
BITMAP *sprite;
}Frog;
void bitmapLoader();
void freeBitmap();
Log* createLog(int x, int y, int speed, BITMAP *sprite, BITMAP *colisions);
void drawLog(Log *log);
void moveLog(Log *log, int speed);
Frog* createFrog(int x, int y, BITMAP *sprite);
void drawFrog(Frog *frog);
void moveFrog(Frog *frog);
int calculCollisions(int x, int y, BITMAP *colisions);
int calculVide(int x, int y, BITMAP *colisions);
int conditionVictoire(Frog *frog);
int checkVictoire(Frog *frog1, Frog *frog2);
int frogger();
#endif //PONCTUEL_FROGGER_H