about summary refs log tree commit diff stats
path: root/data/maps/the_entry/doors.txtpb
blob: 6bef160129795c8e8c79fadcd636e0378821cbfe (plain) (blame)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
generated by cgit-pink 1.4.1 (git 2.36.1) at 2026-02-01 11:33:33 +0000
 


SDL_RenderCopy(renderer, background, NULL, NULL);
		applyTexture(renderer, pointer, selection==0?45:238, 430);
		SDL_RenderPresent(renderer);
		
		while (SDL_PollEvent(&e))
		{
			if (e.type == SDL_QUIT)
			{
				return NULL;
			} else if (e.type == SDL_KEYDOWN)
			{
				if ((e.key.keysym.sym == SDLK_LEFT) && (selection != 0))
				{
					selection--;
				} else if ((e.key.keysym.sym == SDLK_RIGHT) && (selection != 1))
				{
					selection++;
				} else if (e.key.keysym.sym == SDLK_RETURN)
				{
					switch (selection)
					{
						case 0:
							return new HowToPlayState();

							break;
						case 1:
							return new TitleState();
					}
				}
			}
		}
	}
}