Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jumpNrun
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
wise2023_jumpnrun
jumpNrun
Commits
d6c33e8f
Commit
d6c33e8f
authored
1 year ago
by
Janos
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' of git.imp.fu-berlin.de:wise2023_jumpnrun/jumpnrun
parents
b6692783
f0e3d5b3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gameLoop.c
+1
-0
1 addition, 0 deletions
gameLoop.c
menu2.c
+1
-10
1 addition, 10 deletions
menu2.c
with
2 additions
and
10 deletions
gameLoop.c
+
1
−
0
View file @
d6c33e8f
...
@@ -51,6 +51,7 @@ bool gameLoop(enum vehicle theme,SDL_Renderer* renderer) {
...
@@ -51,6 +51,7 @@ bool gameLoop(enum vehicle theme,SDL_Renderer* renderer) {
case
SDL_QUIT
:
case
SDL_QUIT
:
end_game
=
true
;
end_game
=
true
;
quit_game
=
true
;
quit_game
=
true
;
break
;
// any key input starts game and takes player input
// any key input starts game and takes player input
case
SDL_KEYDOWN
:
case
SDL_KEYDOWN
:
start_game
=
true
;
start_game
=
true
;
...
...
This diff is collapsed.
Click to expand it.
menu2.c
+
1
−
10
View file @
d6c33e8f
...
@@ -215,15 +215,6 @@ Nachb.: Das Spiel wird erneut gestartet, wenn y gedrückt wird. Wenn n gedrückt
...
@@ -215,15 +215,6 @@ Nachb.: Das Spiel wird erneut gestartet, wenn y gedrückt wird. Wenn n gedrückt
*/
*/
int
end_screen
(
SDL_Renderer
*
renderer
)
{
int
end_screen
(
SDL_Renderer
*
renderer
)
{
//Schriftart, -farbe und -groesse festesetzen
TTF_Font
*
font
=
TTF_OpenFont
(
"images/Go-Mono.ttf"
,
28
);
if
(
font
==
NULL
)
{
SDL_Log
(
"Schriftart konnte nicht geladen werden! SDL_ttf Error: %s
\n
"
,
TTF_GetError
());
return
-
1
;
}
if
(
SDL_SetRenderDrawColor
(
renderer
,
255
,
255
,
255
,
0
)
!=
0
)
{
if
(
SDL_SetRenderDrawColor
(
renderer
,
255
,
255
,
255
,
0
)
!=
0
)
{
SDL_Log
(
"Farbe konnte nicht gesetzt werden! SDL_Error %s
\n
"
,
SDL_GetError
());
SDL_Log
(
"Farbe konnte nicht gesetzt werden! SDL_Error %s
\n
"
,
SDL_GetError
());
return
(
-
1
);
return
(
-
1
);
...
@@ -242,7 +233,7 @@ int end_screen(SDL_Renderer* renderer) {
...
@@ -242,7 +233,7 @@ int end_screen(SDL_Renderer* renderer) {
}
}
// Text ausgeben
// Text ausgeben
SDL_Surface
*
surfaceMessage
=
TTF_RenderText_Blended_Wrapped
(
font
,
"Nochmal? (y)/(n)"
,
(
SDL_Color
)
{
255
,
255
,
255
,
255
},
200
);
SDL_Surface
*
surfaceMessage
=
TTF_RenderText_Blended_Wrapped
(
font
,
"Nochmal?
(y)/(n)"
,
(
SDL_Color
)
{
255
,
255
,
255
,
255
},
8
*
200
);
if
(
surfaceMessage
==
NULL
)
if
(
surfaceMessage
==
NULL
)
printf
(
"Text Surface loading failed: %s
\n
"
,
TTF_GetError
());
printf
(
"Text Surface loading failed: %s
\n
"
,
TTF_GetError
());
...
...
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