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
c2d4820b
Commit
c2d4820b
authored
2 years ago
by
antoinemeyer5
Browse files
Options
Downloads
Patches
Plain Diff
suppression d'un affichage de taha
parent
3a18f0ff
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/jeu_appren_par_renfo/src/player.c
+0
-12
0 additions, 12 deletions
travail_de_groupe/jeu_appren_par_renfo/src/player.c
travail_de_groupe/jeu_appren_par_renfo/src/render.c
+5
-5
5 additions, 5 deletions
travail_de_groupe/jeu_appren_par_renfo/src/render.c
with
5 additions
and
17 deletions
travail_de_groupe/jeu_appren_par_renfo/src/player.c
+
0
−
12
View file @
c2d4820b
...
...
@@ -114,18 +114,6 @@ void updateBall()
{
// landingPoint est déjà / BLOCK_SIZE de base
ball
.
z
=
lagrangeInterpolation
(
ball
.
x
/
BLOCK_SIZE
,
lastHitPoint
[
0
]
/
BLOCK_SIZE
,
lastHitPoint
[
1
]
/
BLOCK_SIZE
,
15
,
2
*
player
.
h
/
BLOCK_SIZE
,
landingPoint
[
0
],
0
);
if
(
ball
.
z
>
0
)
{
/*printf("param. lagrange : xp=%f, xd=%d, yd=%d, xf=%d, yf=%d, xt=%d, yt=%d\n",
ball.x / BLOCK_SIZE,
lastHitPoint[0] / BLOCK_SIZE,
lastHitPoint[1] / BLOCK_SIZE,
15,
2 * player.h / BLOCK_SIZE,
landingPoint[0],
0);
printf("ballZ: %f\n", ball.z);*/
}
}
if
((
int
)
ball
.
z
==
0
)
...
...
This diff is collapsed.
Click to expand it.
travail_de_groupe/jeu_appren_par_renfo/src/render.c
+
5
−
5
View file @
c2d4820b
...
...
@@ -861,10 +861,10 @@ void drawBall()
ballAngle
+=
2
*
pi
;
}
char
str
[
10
];
int
drawBallY
=
(
3
*
screenDimension
.
h
/
4
+
player
.
viewAngle
)
-
rect
.
h
/
5
+
player
.
h
/
BLOCK_SIZE
-
tan
(
ballViewAngle
)
*
ballDistance
;
sprintf
(
str
,
"%d"
,
drawBallY
);
drawString
(
str
,
screenDimension
.
w
-
300
,
100
,
100
,
50
,
255
,
255
,
255
,
255
);
//
char str[10];
//
int drawBallY = (3 * screenDimension.h / 4 + player.viewAngle) - rect.h / 5 + player.h / BLOCK_SIZE - tan(ballViewAngle) * ballDistance;
//
sprintf(str, "%d", drawBallY);
//
drawString(str, screenDimension.w - 300, 100, 100, 50, 255, 255, 255, 255);
// if (angleMax > 2*pi) angleMax -= 2*pi;
// printf("is playing in range %d\n", isAngleInRange(ballAngle, angleMin, angleMax));
...
...
@@ -1019,7 +1019,6 @@ void drawInfosBall()
}
void
drawHub
(){
drawFPS
();
drawInfosPlayer
();
drawInfosBall
();
}
...
...
@@ -1046,6 +1045,7 @@ void drawGame()
}
drawMap2D
(
map
);
drawRacket
();
drawFPS
();
//affiche le hub
if
(
showHub
){
drawHub
();
...
...
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