Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProjetZZ1
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
Marc BERET
ProjetZZ1
Commits
6d64db04
Commit
6d64db04
authored
2 years ago
by
belkhiritaha
Browse files
Options
Downloads
Patches
Plain Diff
fix clock
parent
5215b4ad
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
travail_de_groupe/chef_oeuvre/src/fire.c
+0
-4
0 additions, 4 deletions
travail_de_groupe/chef_oeuvre/src/fire.c
travail_de_groupe/chef_oeuvre/src/render.c
+4
-6
4 additions, 6 deletions
travail_de_groupe/chef_oeuvre/src/render.c
with
4 additions
and
10 deletions
travail_de_groupe/chef_oeuvre/src/fire.c
+
0
−
4
View file @
6d64db04
...
...
@@ -55,10 +55,6 @@ listchainfire_t startFire(listchainfire_t listFire,int numberFire, int mapSize){
xFire
=
rand
()
%
mapSize
;
yFire
=
rand
()
%
mapSize
;
<<<<<<<
HEAD
//printf("xf:%d,yf:%d\n",xFire,yFire);
=======
>>>>>>>
91e99
d9a0e864cf399133d4e59d4d7951d1bbd0a
fire
.
x
=
xFire
;
fire
.
y
=
yFire
;
fire
.
state
=
1
;
...
...
This diff is collapsed.
Click to expand it.
travail_de_groupe/chef_oeuvre/src/render.c
+
4
−
6
View file @
6d64db04
...
...
@@ -285,7 +285,8 @@ void drawTime(){
SDL_RenderCopy
(
renderer
,
scoreTexture
,
NULL
,
&
rect
);
rect
.
y
+=
rect
.
h
;
char
str
[
10
];
sprintf
(
str
,
"%d"
,
UPDATETIME
-
(
int
)
timer
/
1000
%
UPDATETIME
);
printf
(
"%d
\n
"
,
(
UPDATETIME
*
2000
-
(
int
)
timer
%
(
UPDATETIME
*
2000
))
/
1000
);
sprintf
(
str
,
"%d"
,
(
UPDATETIME
*
2000
-
(
int
)
timer
%
(
UPDATETIME
*
2000
))
/
1000
);
SDL_Color
textColor
=
{
237
,
222
,
17
};
SDL_Surface
*
surface
=
TTF_RenderText_Solid
(
robotoFont
,
str
,
textColor
);
SDL_Texture
*
texture
=
SDL_CreateTextureFromSurface
(
renderer
,
surface
);
...
...
@@ -385,17 +386,14 @@ void mainLoop(){
delta
=
(
a
-
b
);
if
(
delta
>
1000
/
FPS_TO_GET
){
timer
+=
delta
;
printf
(
"%d
\n
"
,
(
int
)
timer
%
1000
);
b
=
a
;
<<<<<<<
HEAD
//printf("fps : %f", 1000/delta);
=======
>>>>>>>
91e99
d9a0e864cf399133d4e59d4d7951d1bbd0a
switch
(
gameState
){
case
MENU
:
drawMenu
();
break
;
case
GAME
:
if
((
int
)
timer
%
100
==
0
){
if
((
int
)
timer
%
(
UPDATETIME
*
2000
)
<
1
0
){
nextFire
(
fireList
);
fireList
=
spreadFire
(
fireList
);
}
...
...
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