Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Projet l2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VAUTRIN Guillaume
Projet l2
Commits
862eb898
Commit
862eb898
authored
4 years ago
by
vautrin33u
Browse files
Options
Downloads
Patches
Plain Diff
Début fonctions gestions de de sprites qui se rencontrent
parent
41118ada
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Ressources/save.txt
+500
-500
500 additions, 500 deletions
Ressources/save.txt
fonctions_SDL.o
+0
-0
0 additions, 0 deletions
fonctions_SDL.o
logique.c
+7
-2
7 additions, 2 deletions
logique.c
with
507 additions
and
502 deletions
Ressources/save.txt
+
500
−
500
View file @
862eb898
This diff is collapsed.
Click to expand it.
fonctions_SDL.o
deleted
100644 → 0
+
0
−
0
View file @
41118ada
File deleted
This diff is collapsed.
Click to expand it.
logique.c
+
7
−
2
View file @
862eb898
...
@@ -77,9 +77,10 @@ void build_sprite_unique (sprite_t *sprite, char nom, int largeur, int hauteur,
...
@@ -77,9 +77,10 @@ void build_sprite_unique (sprite_t *sprite, char nom, int largeur, int hauteur,
if
(
comptX
==
hauteur
&&
comptY
==
largeur
){
if
(
comptX
==
hauteur
&&
comptY
==
largeur
){
init_sprite
(
sprite
,
nom
,
x
,
y
+
1
-
largeur
,
hauteur
,
largeur
,
0
,
0
);
init_sprite
(
sprite
,
nom
,
x
,
y
+
1
-
largeur
,
hauteur
,
largeur
,
0
,
0
);
}
}
print
f
(
"
\n
Sprite : %c, x: %d, y: %d"
,
sprite
->
nom
,
sprite
->
rect
.
x
,
sprite
->
rect
.
y
);
print
_sprite
(
sprite
);
}
}
/*
//TODO: nécessaire pour trouver tous les blocs de comptoires, trouver une solution.
/*
void build_sprites_tab (world_t* world, char nomSprite, int largeur, int hauteur){
void build_sprites_tab (world_t* world, char nomSprite, int largeur, int hauteur){
for (int i=0; i<SCREEN_HEIGHT; i++){
for (int i=0; i<SCREEN_HEIGHT; i++){
...
@@ -89,6 +90,10 @@ void build_sprites_tab (world_t* world, char nomSprite, int largeur, int hauteur
...
@@ -89,6 +90,10 @@ void build_sprites_tab (world_t* world, char nomSprite, int largeur, int hauteur
}
}
}*/
}*/
void
limites_internes
(
world_t
world
,
sprite_t
spr1
,
sprite_t
spr2
){
//Gestion de rencontre entre deux sprites
}
void
init_sprite
(
sprite_t
*
sprite
,
char
nom
,
int
x
,
int
y
,
int
w
,
int
h
,
int
v
,
int
state
){
void
init_sprite
(
sprite_t
*
sprite
,
char
nom
,
int
x
,
int
y
,
int
w
,
int
h
,
int
v
,
int
state
){
//La fonction initialise tous les composants d'un sprite
//La fonction initialise tous les composants d'un sprite
sprite
->
rect
.
x
=
x
;
sprite
->
rect
.
x
=
x
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment