-
Notifications
You must be signed in to change notification settings - Fork 0
/
ablakok.c
48 lines (33 loc) · 1015 Bytes
/
ablakok.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <SDL2/SDL.h>
#include <SDL2/SDL2_gfxPrimitives.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <time.h>
#include <SDL2/SDL_image.h>
#include "kirajzol.h"
#include "jatekmenet.h"
#include "debugmalloc.h"
#include "ablakok.h"
void harmadik(SDL_Renderer *renderer, SDL_Window *window, bool *quit3, bool *quit2, int *mag, bool *jatszik,time_t *kezd, time_t *vegez, int *allas){
if(*quit2 == true && *jatszik == true){
sdl_init("Aknakereső", 220, 120, &window, &renderer);
if(*allas == 1){
vesztettel(renderer, *mag);
}
if(*allas == 2){
nyertel(renderer, *mag, *vegez - *kezd);
}
while (!*quit3) {
SDL_Event event;
SDL_WaitEvent(&event);
switch (event.type) {
case SDL_QUIT:
*quit3 = true;
break;
}
}
}
SDL_Quit();
}