Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TP7projet_jeu_air_defense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MARQUE Pierre
TP7projet_jeu_air_defense
Commits
a0796251
Commit
a0796251
authored
Oct 31, 2020
by
Pierre MARQUE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fini mais pas de son
parent
64ca4b53
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
288 additions
and
54 deletions
+288
-54
air_defense.c
air_defense.c
+262
-53
air_defense.exe
air_defense.exe
+0
-0
air_defense.h
air_defense.h
+26
-1
No files found.
air_defense.c
View file @
a0796251
This diff is collapsed.
Click to expand it.
air_defense.exe
View file @
a0796251
No preview for this file type
air_defense.h
View file @
a0796251
...
...
@@ -6,15 +6,20 @@
typedef
struct
Paratrooper
{
int
life
;
float
xDrop
;
float
yDrop
;
bool
droped
;
bool
whichWay
;
Rectangle
hitbox
;
Vector2
speed
;
Color
color
;
// yellow or red
Rectangle
drag
[
10
];
}
Paratrooper
;
typedef
struct
Aircraft
{
int
life
;
float
height
;
float
xFirstToJump
;
int
numberOfParatroopers
;
Rectangle
hitbox
;
...
...
@@ -61,12 +66,24 @@ typedef struct AntiParaCanon
Vector2
aimingPosition
;
}
AntiParaCanon
;
typedef
struct
Viewfinder
{
Rectangle
up
;
Rectangle
down
;
Rectangle
left
;
Rectangle
right
;
float
radius
;
Vector2
center
;
Color
color
;
}
Viewfinder
;
//------------------------------------------------------------------------------------
// Module Functions Declaration
//------------------------------------------------------------------------------------
static
void
InitGame
(
void
);
// Initialize game
static
void
UpdateGame
();
// Update game (one frame)
static
void
UpdateGame
(
void
);
// Update game (one frame)
static
void
DrawGame
(
void
);
// Draw game (one frame)
static
void
UnloadGame
(
void
);
// Unload game
...
...
@@ -76,11 +93,19 @@ static void UnloadGame(void); // Unload game
//Initialization functions------------------------------------------------------------
Aircraft
InitializeAircraft
(
void
);
AntiAircraftCanon
InitializeAntiAircraftCanon
(
void
);
AntiParaCanon
InitializeAntiParaCanon
(
void
);
Bombshell
InitializeBombshell
(
void
);
Bullet
InitializeBullet
(
void
);
Paratrooper
InitializeParatrooper
(
void
);
Viewfinder
InitializeViewfinder
(
float
decalage
);
//Game functions----------------------------------------------------------------------
bool
IsRectangleOut
(
Rectangle
rec
);
bool
IsCircleOut
(
Vector2
center
,
float
radius
);
Aircraft
MoveAircrafts
(
Aircraft
aircraft
);
Bombshell
MoveBombshell
(
Bombshell
bombshell
);
Bullet
MoveBullet
(
Bullet
bullet
);
Paratrooper
MoveParatrooper
(
Paratrooper
paratrooper
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment