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
a35e7a21
Commit
a35e7a21
authored
Oct 27, 2020
by
Pierre MARQUE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1ère définition des objets
parent
0974a4a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
131 additions
and
0 deletions
+131
-0
air_defense.c
air_defense.c
+131
-0
air_defense.exe
air_defense.exe
+0
-0
cheatSheet.pdf
cheatSheet.pdf
+0
-0
No files found.
air_defense.c
0 → 100644
View file @
a35e7a21
/*******************************************************************************************
*
* raylib [core] example - Basic window
*
* Welcome to raylib!
*
* To test examples in Notepad++, provided with default raylib installer package,
* just press F6 and run [raylib_compile_execute] script, it will compile and execute.
* Note that compiled executable is placed in the same folder as .c file
*
* You can find all basic examples on [C:\raylib\raylib\examples] directory and
* raylib official webpage: [www.raylib.com]
* gcc -W -Wall -Wextra -Wno-unused-parameter -std=c99 core_basic_window.c -o core_basic_window
* Enjoy using raylib. :)
*
* This example has been created using raylib 1.0 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2013-2020 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "libraylib.a"
#include "raylib.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
//----------------------------------------------------------------------------------
// Some Defines
//---------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
// Types and Structures Definition
//----------------------------------------------------------------------------------
typedef
struct
Aircraft
{
int
life
;
int
numberOfParatroopers
;
Rectangle
hitbox
;
Vector2
position
;
Vector2
speed
;
}
Avion
;
typedef
struct
Paratrooper
{
int
life
;
Rectangle
hitbox
;
Vector2
position
;
Vector2
speed
;
}
Paratrooper
;
typedef
struct
bombShell
{
int
radius1
;
int
radius2
;
int
damageDone
;
Vector2
position
;
Vector2
speed
;
}
bombShell
;
typedef
struct
Bullet
{
int
damageDone
;
Vector2
position
;
Vector2
speed
;
};
//------------------------------------------------------------------------------------
// Global Variables Declaration
//------------------------------------------------------------------------------------
const
int
screenWidth
=
800
;
const
int
screenHeight
=
450
;
//------------------------------------------------------------------------------------
// Module Functions Declaration (local)
//------------------------------------------------------------------------------------
static
void
InitGame
(
void
);
// Initialize game
static
void
UpdateGame
(
void
);
// Update game (one frame)
static
void
DrawGame
(
void
);
// Draw game (one frame)
static
void
UnloadGame
(
void
);
// Unload game
static
void
UpdateDrawFrame
(
void
);
// Update and Draw (one frame)
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int
main
(
void
)
{
// Initialization
//--------------------------------------------------------------------------------------
InitWindow
(
screenWidth
,
screenHeight
,
"raylib [core] example - basic window"
);
SetTargetFPS
(
60
);
// Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while
(
!
WindowShouldClose
())
// Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
// TODO: Update your variables here
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing
();
ClearBackground
(
RAYWHITE
);
DrawText
(
"Congrats! You created your first windooow!"
,
190
,
200
,
20
,
LIGHTGRAY
);
EndDrawing
();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow
();
// Close window and OpenGL context
//--------------------------------------------------------------------------------------
return
0
;
}
\ No newline at end of file
air_defense.exe
0 → 100644
View file @
a35e7a21
File added
cheatSheet.pdf
0 → 100644
View file @
a35e7a21
File added
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