paletes
This commit is contained in:
@@ -21,6 +21,17 @@ assets:
|
||||
palettes:
|
||||
PALETTE:
|
||||
- ${PREFIX}/data/palette/cpc.pal
|
||||
- ${PREFIX}/data/palette/carnival-32.pal
|
||||
- ${PREFIX}/data/palette/cpc-boy.pal
|
||||
- ${PREFIX}/data/palette/downgraded-32.pal
|
||||
- ${PREFIX}/data/palette/endesga-32.pal
|
||||
- ${PREFIX}/data/palette/fantasy.pal
|
||||
- ${PREFIX}/data/palette/mulfok32.pal
|
||||
- ${PREFIX}/data/palette/nanner-pancakes.pal
|
||||
- ${PREFIX}/data/palette/pico-8-secret-palette.pal
|
||||
- ${PREFIX}/data/palette/pineapple-32.pal
|
||||
- ${PREFIX}/data/palette/resurrect-32.pal
|
||||
- ${PREFIX}/data/palette/sheltzy32.pal
|
||||
|
||||
# LOCALE
|
||||
locale:
|
||||
|
||||
35
data/palette/carnival-32.pal
Normal file
35
data/palette/carnival-32.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
77 34 53
|
||||
113 40 42
|
||||
151 86 56
|
||||
208 118 62
|
||||
235 172 77
|
||||
242 208 141
|
||||
221 172 136
|
||||
198 141 128
|
||||
175 109 119
|
||||
199 68 70
|
||||
159 56 71
|
||||
110 64 109
|
||||
167 167 88
|
||||
113 129 65
|
||||
73 101 65
|
||||
55 67 59
|
||||
42 28 49
|
||||
66 49 87
|
||||
77 82 138
|
||||
85 106 151
|
||||
92 129 163
|
||||
125 173 200
|
||||
176 214 217
|
||||
236 230 223
|
||||
207 204 202
|
||||
166 166 166
|
||||
120 120 120
|
||||
98 98 98
|
||||
74 74 74
|
||||
54 54 54
|
||||
97 140 112
|
||||
139 116 99
|
||||
35
data/palette/cpc-boy.pal
Normal file
35
data/palette/cpc-boy.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
0 0 0
|
||||
27 27 101
|
||||
53 53 201
|
||||
102 30 37
|
||||
85 51 97
|
||||
127 53 201
|
||||
188 53 53
|
||||
192 70 110
|
||||
223 109 155
|
||||
27 101 27
|
||||
27 110 131
|
||||
30 121 229
|
||||
121 95 27
|
||||
128 128 128
|
||||
145 148 223
|
||||
201 127 53
|
||||
227 155 141
|
||||
248 120 248
|
||||
53 175 53
|
||||
53 183 143
|
||||
53 193 215
|
||||
127 201 53
|
||||
173 200 170
|
||||
141 225 199
|
||||
225 198 67
|
||||
228 221 154
|
||||
255 255 255
|
||||
238 234 224
|
||||
172 181 107
|
||||
118 132 72
|
||||
63 80 63
|
||||
36 49 55
|
||||
35
data/palette/downgraded-32.pal
Normal file
35
data/palette/downgraded-32.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
123 51 76
|
||||
161 77 85
|
||||
199 115 105
|
||||
227 160 132
|
||||
242 203 155
|
||||
211 123 134
|
||||
175 93 139
|
||||
128 64 133
|
||||
91 51 116
|
||||
65 32 81
|
||||
92 72 106
|
||||
136 125 141
|
||||
184 180 178
|
||||
220 218 201
|
||||
255 255 224
|
||||
182 245 219
|
||||
137 217 217
|
||||
114 182 207
|
||||
92 139 168
|
||||
78 102 121
|
||||
70 73 105
|
||||
68 53 93
|
||||
61 0 61
|
||||
98 23 72
|
||||
148 44 75
|
||||
199 66 79
|
||||
224 107 81
|
||||
242 165 97
|
||||
252 239 141
|
||||
177 212 128
|
||||
128 184 120
|
||||
101 141 120
|
||||
35
data/palette/endesga-32.pal
Normal file
35
data/palette/endesga-32.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
190 74 47
|
||||
215 118 67
|
||||
234 212 170
|
||||
228 166 114
|
||||
184 111 80
|
||||
115 62 57
|
||||
62 39 49
|
||||
162 38 51
|
||||
228 59 68
|
||||
247 118 34
|
||||
254 174 52
|
||||
254 231 97
|
||||
99 199 77
|
||||
62 137 72
|
||||
38 92 66
|
||||
25 60 62
|
||||
18 78 137
|
||||
0 153 219
|
||||
44 232 245
|
||||
255 255 255
|
||||
192 203 220
|
||||
139 155 180
|
||||
90 105 136
|
||||
58 68 102
|
||||
38 43 68
|
||||
24 20 37
|
||||
255 0 68
|
||||
104 56 108
|
||||
181 80 136
|
||||
246 117 122
|
||||
232 183 150
|
||||
194 133 105
|
||||
35
data/palette/fantasy.pal
Normal file
35
data/palette/fantasy.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
237 228 218
|
||||
191 184 180
|
||||
145 141 141
|
||||
99 97 103
|
||||
53 53 64
|
||||
169 73 73
|
||||
202 89 84
|
||||
229 111 75
|
||||
227 147 71
|
||||
238 181 81
|
||||
232 198 91
|
||||
189 163 81
|
||||
139 145 80
|
||||
85 125 85
|
||||
68 99 80
|
||||
62 85 76
|
||||
139 176 173
|
||||
118 159 166
|
||||
102 141 169
|
||||
92 105 159
|
||||
90 88 136
|
||||
124 109 162
|
||||
148 122 157
|
||||
188 135 165
|
||||
217 166 166
|
||||
212 194 182
|
||||
189 170 151
|
||||
134 115 91
|
||||
126 103 76
|
||||
115 91 66
|
||||
96 75 61
|
||||
77 63 56
|
||||
35
data/palette/mulfok32.pal
Normal file
35
data/palette/mulfok32.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
91 166 117
|
||||
107 201 108
|
||||
171 221 100
|
||||
252 239 141
|
||||
255 184 121
|
||||
234 98 98
|
||||
204 66 94
|
||||
163 40 88
|
||||
117 23 86
|
||||
57 9 71
|
||||
97 24 81
|
||||
135 53 85
|
||||
166 85 95
|
||||
201 115 115
|
||||
242 174 153
|
||||
255 195 242
|
||||
238 143 203
|
||||
212 110 179
|
||||
135 62 132
|
||||
31 16 42
|
||||
74 48 82
|
||||
123 84 128
|
||||
166 133 159
|
||||
217 189 200
|
||||
255 255 255
|
||||
174 226 255
|
||||
141 183 255
|
||||
109 128 250
|
||||
132 101 236
|
||||
131 77 196
|
||||
125 45 160
|
||||
78 24 124
|
||||
35
data/palette/nanner-pancakes.pal
Normal file
35
data/palette/nanner-pancakes.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
160 221 211
|
||||
111 176 183
|
||||
87 127 157
|
||||
74 87 134
|
||||
62 59 102
|
||||
57 41 69
|
||||
45 30 47
|
||||
69 46 63
|
||||
93 69 80
|
||||
123 98 104
|
||||
156 128 126
|
||||
195 167 156
|
||||
219 201 180
|
||||
252 236 209
|
||||
170 215 149
|
||||
100 176 130
|
||||
72 136 133
|
||||
63 91 116
|
||||
235 200 167
|
||||
211 160 132
|
||||
184 126 108
|
||||
143 82 82
|
||||
106 57 72
|
||||
197 127 121
|
||||
171 89 125
|
||||
124 61 100
|
||||
78 43 69
|
||||
122 59 79
|
||||
169 75 84
|
||||
216 114 94
|
||||
240 159 113
|
||||
247 207 145
|
||||
35
data/palette/pico-8-secret-palette.pal
Normal file
35
data/palette/pico-8-secret-palette.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
0 0 0
|
||||
29 43 83
|
||||
126 37 83
|
||||
0 135 81
|
||||
171 82 54
|
||||
95 87 79
|
||||
194 195 199
|
||||
255 241 232
|
||||
255 0 77
|
||||
255 163 0
|
||||
255 236 39
|
||||
0 228 54
|
||||
41 173 255
|
||||
131 118 156
|
||||
255 119 168
|
||||
255 204 170
|
||||
41 24 20
|
||||
17 29 53
|
||||
66 33 54
|
||||
18 83 89
|
||||
116 47 41
|
||||
73 51 59
|
||||
162 136 121
|
||||
243 239 125
|
||||
190 18 80
|
||||
255 108 36
|
||||
168 231 46
|
||||
0 181 67
|
||||
6 90 181
|
||||
117 70 101
|
||||
255 110 89
|
||||
255 157 129
|
||||
35
data/palette/pineapple-32.pal
Normal file
35
data/palette/pineapple-32.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
67 0 42
|
||||
137 0 39
|
||||
217 36 60
|
||||
255 97 87
|
||||
255 183 98
|
||||
199 110 70
|
||||
115 57 46
|
||||
52 17 31
|
||||
3 7 16
|
||||
39 59 45
|
||||
69 130 57
|
||||
156 185 59
|
||||
255 216 50
|
||||
255 130 59
|
||||
209 64 31
|
||||
124 25 26
|
||||
49 12 27
|
||||
131 63 52
|
||||
235 156 110
|
||||
255 218 172
|
||||
255 255 228
|
||||
191 195 198
|
||||
109 138 141
|
||||
41 59 73
|
||||
4 21 40
|
||||
3 62 94
|
||||
28 146 167
|
||||
119 214 193
|
||||
255 224 220
|
||||
255 136 169
|
||||
192 59 148
|
||||
96 23 97
|
||||
35
data/palette/resurrect-32.pal
Normal file
35
data/palette/resurrect-32.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
255 255 255
|
||||
251 107 29
|
||||
232 59 59
|
||||
131 28 93
|
||||
195 36 84
|
||||
240 79 120
|
||||
246 129 129
|
||||
252 167 144
|
||||
227 200 150
|
||||
171 148 122
|
||||
150 108 108
|
||||
98 85 101
|
||||
62 53 70
|
||||
11 94 101
|
||||
11 138 143
|
||||
30 188 115
|
||||
145 219 105
|
||||
251 255 134
|
||||
251 185 84
|
||||
205 104 61
|
||||
158 69 57
|
||||
122 48 69
|
||||
107 62 117
|
||||
144 94 169
|
||||
168 132 243
|
||||
234 173 237
|
||||
143 211 255
|
||||
77 155 230
|
||||
77 101 180
|
||||
72 74 119
|
||||
48 225 185
|
||||
143 248 226
|
||||
35
data/palette/sheltzy32.pal
Normal file
35
data/palette/sheltzy32.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
140 255 222
|
||||
69 184 179
|
||||
131 151 64
|
||||
201 236 133
|
||||
70 198 87
|
||||
21 137 104
|
||||
44 91 109
|
||||
34 42 92
|
||||
86 106 137
|
||||
139 171 191
|
||||
204 226 225
|
||||
255 219 165
|
||||
204 172 104
|
||||
163 109 62
|
||||
104 60 52
|
||||
0 0 0
|
||||
56 0 44
|
||||
102 59 147
|
||||
139 114 222
|
||||
156 216 252
|
||||
94 150 221
|
||||
57 83 192
|
||||
128 12 83
|
||||
195 75 145
|
||||
255 148 179
|
||||
189 31 63
|
||||
236 97 74
|
||||
255 164 104
|
||||
255 246 174
|
||||
255 218 112
|
||||
244 176 60
|
||||
255 255 255
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 324 B |
@@ -1,7 +1,4 @@
|
||||
# THE JAIL
|
||||
room:
|
||||
name_en: "THE JAIL"
|
||||
name_ca: "LA JAIL"
|
||||
bgColor: bright_blue
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# ROAD TO THE JAIL
|
||||
room:
|
||||
name_en: "ROAD TO THE JAIL"
|
||||
name_ca: "CAMI A LA JAIL"
|
||||
bgColor: black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# VOID MAIN
|
||||
room:
|
||||
name_ca: "VOID MAIN"
|
||||
name_en: "VOID MAIN"
|
||||
bgColor: black
|
||||
border: bright_black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# JUMP THROUGH
|
||||
room:
|
||||
name_en: "JUMP THROUGH"
|
||||
name_ca: "SALTA A TRAVES"
|
||||
bgColor: black
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# BIG JUMP
|
||||
room:
|
||||
name_en: "BIG JUMP"
|
||||
name_ca: "EL GRAN BOT"
|
||||
bgColor: black
|
||||
border: red
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# WELCOME TO MY ABBEY
|
||||
room:
|
||||
name_en: "WELCOME TO MY ABBEY"
|
||||
name_ca: "BENVINGUT A LA MEUA ABADIA"
|
||||
bgColor: blue
|
||||
border: yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# SIGMASUA > TELEGRAM
|
||||
room:
|
||||
name_en: "SIGMASUA > TELEGRAM"
|
||||
name_ca: "SIGMASUA > TELEGRAM"
|
||||
bgColor: black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THE GARDEN
|
||||
room:
|
||||
name_en: "THE GARDEN"
|
||||
name_ca: "EL JARDI"
|
||||
bgColor: black
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THE BIG TREE
|
||||
room:
|
||||
name_en: "THE BIG TREE"
|
||||
name_ca: "EL GRAN ARBRE"
|
||||
bgColor: black
|
||||
border: bright_blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# TREE TOP
|
||||
room:
|
||||
name_en: "TREE TOP"
|
||||
name_ca: "DALT DE L'ARBRE"
|
||||
bgColor: bright_black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# LAZY ROOM
|
||||
room:
|
||||
name_en: "LAZY ROOM"
|
||||
name_ca: "LA SALA GOSSA"
|
||||
bgColor: black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THE PASSAGE
|
||||
room:
|
||||
name_en: "THE PASSAGE"
|
||||
name_ca: "EL PASSATGE"
|
||||
bgColor: black
|
||||
border: green
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# TUNO KILLER
|
||||
room:
|
||||
name_en: "TUNO KILLER"
|
||||
name_ca: "MATATUNOS"
|
||||
bgColor: black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# KILLING SPREE
|
||||
room:
|
||||
name_en: "KILLING SPREE"
|
||||
name_ca: "MATANÇA INDISCRIMINADA"
|
||||
bgColor: black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# NOW THIS IS THE BATCAVE!
|
||||
room:
|
||||
name_en: "NOW THIS IS THE BATCAVE!"
|
||||
name_ca: "ESTA SI QUE ES LA BATCOVA!"
|
||||
bgColor: black
|
||||
border: black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THE FRIDGE
|
||||
room:
|
||||
name_en: "THE FRIDGE"
|
||||
name_ca: "EL FRIGO"
|
||||
bgColor: blue
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# I DID NOT COPY THIS ONE
|
||||
room:
|
||||
name_en: "I DID NOT COPY THIS ONE"
|
||||
name_ca: "ESTA NO LA HE COPIADA"
|
||||
bgColor: black
|
||||
border: magenta
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# MAKE MONEY
|
||||
room:
|
||||
name_en: "MAKE MONEY"
|
||||
name_ca: "INHERITEDS!"
|
||||
bgColor: black
|
||||
border: yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THIS CAN'T BE THE BATCAVE
|
||||
room:
|
||||
name_en: "THIS CAN'T BE THE BATCAVE"
|
||||
name_ca: "ESTA NO POT SER LA BATCOVA"
|
||||
bgColor: black
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# ENTRANCE TO THE VALLEY
|
||||
room:
|
||||
name_en: "ENTRANCE TO THE VALLEY"
|
||||
name_ca: "ENTRADA A LA VALL"
|
||||
bgColor: black
|
||||
border: red
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# ENTER PAKU SIMBEL
|
||||
room:
|
||||
name_en: "ENTER PAKU SIMBEL"
|
||||
name_ca: "ACCEDINT A PAKU SIMBEL"
|
||||
bgColor: bright_black
|
||||
border: yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# AEE REMAKE, PLEASE
|
||||
room:
|
||||
name_en: "AEE REMAKE, PLEASE"
|
||||
name_ca: "AEE REMAKE, PERFAPLIS"
|
||||
bgColor: bright_black
|
||||
border: yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# INNER CHAMBER
|
||||
room:
|
||||
name_en: "INNER CHAMBER"
|
||||
name_ca: "CAMBRA INTERIOR"
|
||||
bgColor: black
|
||||
border: bright_yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# PLAY IT AGAIN, SAM
|
||||
room:
|
||||
name_en: "PLAY IT AGAIN, SAM"
|
||||
name_ca: "TORNA-LA A TOCAR, SAM"
|
||||
bgColor: black
|
||||
border: bright_yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THE CHAPPEL
|
||||
room:
|
||||
name_en: "THE CHAPPEL"
|
||||
name_ca: "LA CAPELLA"
|
||||
bgColor: blue
|
||||
border: yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# JINGLE BELLS
|
||||
room:
|
||||
name_en: "JINGLE BELLS"
|
||||
name_ca: "CAMPANETES"
|
||||
bgColor: blue
|
||||
border: yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THE BACKYARD
|
||||
room:
|
||||
name_en: "THE BACKYARD"
|
||||
name_ca: "EL PATI DE DARRERE"
|
||||
bgColor: blue
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# YOU SHALL NOT PASS
|
||||
room:
|
||||
name_en: "YOU SHALL NOT PASS"
|
||||
name_ca: "NO PASSARAS"
|
||||
bgColor: bright_black
|
||||
border: black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# QUO VOIDIS
|
||||
room:
|
||||
name_en: "QUO VOIDIS"
|
||||
name_ca: "QUO VOIDIS"
|
||||
bgColor: blue
|
||||
border: bright_black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# QVOID IS A JAILGAME!
|
||||
room:
|
||||
name_en: "QVOID IS A JAILGAME!"
|
||||
name_ca: "QVOID ES UN JAILGAME!"
|
||||
bgColor: blue
|
||||
border: bright_black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# 256 COLORS
|
||||
room:
|
||||
name_en: "256 COLORS"
|
||||
name_ca: "256 COLORS"
|
||||
bgColor: black
|
||||
border: bright_magenta
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# ...?
|
||||
room:
|
||||
name_en: "...?"
|
||||
name_ca: "...?"
|
||||
bgColor: black
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# } WE ALL LOVE JAILGAMES }
|
||||
room:
|
||||
name_en: "ä WE ALL LOVE JAILGAMES ä"
|
||||
name_ca: "ä AMOR PELS JAILGAMES ä"
|
||||
bgColor: black
|
||||
border: bright_black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# ULA HOP!
|
||||
room:
|
||||
name_en: "ULA HOP!"
|
||||
name_ca: "ULA HOP!"
|
||||
bgColor: black
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# SILICON BOOBS
|
||||
room:
|
||||
name_en: "SILICON BOOBS"
|
||||
name_ca: "MAMELLES DE SILICI"
|
||||
bgColor: black
|
||||
border: bright_green
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# BE CAREFUL WITH THE FUSE
|
||||
room:
|
||||
name_en: "BE CAREFUL WITH THE FUSE"
|
||||
name_ca: "COMPTE AMB EL FUSIBLE"
|
||||
bgColor: black
|
||||
border: bright_cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# CHIP'N CHIP
|
||||
room:
|
||||
name_en: "CHIP'N CHIP"
|
||||
name_ca: "CHIP'N CHIP"
|
||||
bgColor: black
|
||||
border: bright_green
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THE FINAL CROSSOVER
|
||||
room:
|
||||
name_en: "THE FINAL CROSSOVER"
|
||||
name_ca: "EL CROSSOVER DEFINITIU"
|
||||
bgColor: bright_black
|
||||
border: yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# YOU'LL BELIEVE AROUNDER CAN FLY
|
||||
room:
|
||||
name_en: "YOU'LL BELIEVE AROUNDER CAN FLY"
|
||||
name_ca: "CREURAS QUE ELS AROUNDERS VOLEN"
|
||||
bgColor: black
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# PREVENT THE CRISIS
|
||||
room:
|
||||
name_en: "PREVENT THE CRISIS"
|
||||
name_ca: "EVITA LA CRISI"
|
||||
bgColor: black
|
||||
border: bright_magenta
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# AROUND WITH ME
|
||||
room:
|
||||
name_en: "AROUND WITH ME"
|
||||
name_ca: "AROUNDA AMB MI"
|
||||
bgColor: black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# P.A.C.O. ON THE GO
|
||||
room:
|
||||
name_en: "P.A.C.O. ON THE GO"
|
||||
name_ca: "P.A.C.O. EN MARXA"
|
||||
bgColor: black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THE TUBE
|
||||
room:
|
||||
name_en: "THE TUBE"
|
||||
name_ca: "EL TUB"
|
||||
bgColor: black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# SANDWITCH AND COUNTER
|
||||
room:
|
||||
name_en: "SANDWITCH AND COUNTER"
|
||||
name_ca: "SANDVITX I COUNTER STRIKE"
|
||||
bgColor: black
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# FEEL THE PRESSURE
|
||||
room:
|
||||
name_en: "FEEL THE PRESSURE"
|
||||
name_ca: "NOTA LA PRESSIO"
|
||||
bgColor: bright_black
|
||||
border: bright_yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# FEEL THE HEAT
|
||||
room:
|
||||
name_en: "FEEL THE HEAT"
|
||||
name_ca: "NOTA EL CALORET"
|
||||
bgColor: bright_black
|
||||
border: bright_yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THE BATTLE NEVER ENDS
|
||||
room:
|
||||
name_en: "THE BATTLE NEVER ENDS"
|
||||
name_ca: "LA BATALLA MAI ACABA"
|
||||
bgColor: black
|
||||
border: white
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# WELCOME TO THE JAILBATTLE
|
||||
room:
|
||||
name_en: "WELCOME TO THE JAILBATTLE"
|
||||
name_ca: "BENVINGUTS A JAILBATTLE"
|
||||
bgColor: green
|
||||
border: bright_green
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# WE NEED A ROBOT
|
||||
room:
|
||||
name_en: "WE NEED A JAILROBOT"
|
||||
name_ca: "NECESSITEM UN JAILROBOT"
|
||||
bgColor: black
|
||||
border: red
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# STORED JAILGAMES
|
||||
room:
|
||||
name_en: "STORED JAILGAMES"
|
||||
name_ca: "EL MAGATZEM DE JAILGAMES"
|
||||
bgColor: black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# MINI ASCII
|
||||
room:
|
||||
name_en: "MINI ASCII"
|
||||
name_ca: "MINI ASCII"
|
||||
bgColor: black
|
||||
border: black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# BREAKOUT.LUA
|
||||
room:
|
||||
name_en: "BREAKOUT.LUA"
|
||||
name_ca: "BREAKOUT.LUA"
|
||||
bgColor: black
|
||||
border: black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# P.A.C.O. WORKSHOP
|
||||
room:
|
||||
name_en: "P.A.C.O. WORKSHOP"
|
||||
name_ca: "EL TALLER DE P.A.C.O."
|
||||
bgColor: black
|
||||
border: yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THE BASEMENT
|
||||
room:
|
||||
name_en: "THE BASEMENT"
|
||||
name_ca: "EL SOTAN"
|
||||
bgColor: black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# THAT'S A GUITAR
|
||||
room:
|
||||
name_en: "THAT'S A GUITAR"
|
||||
name_ca: "AIXO ES UNA GUITARRA"
|
||||
bgColor: black
|
||||
border: black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# HEAVY DEMONS ON LEGGINS
|
||||
room:
|
||||
name_en: "HEAVY DEMONS ON LEGGINS"
|
||||
name_ca: "DIMONIS HEAVIES AMB MALLES"
|
||||
bgColor: black
|
||||
border: black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
# JAILGAMES GO TO HELL
|
||||
room:
|
||||
name_en: "JAILGAMES GO TO HELL"
|
||||
name_ca: "JAILGAMES A L'INFERN"
|
||||
bgColor: red
|
||||
border: bright_red
|
||||
border: red
|
||||
tileSetFile: standard.gif
|
||||
|
||||
# Conexiones de la habitación (null = sin conexión)
|
||||
@@ -44,7 +41,7 @@ tilemap:
|
||||
enemies:
|
||||
- animation: dimallas.yaml
|
||||
position: {x: 13, y: 12}
|
||||
velocity: {x: 54.0, y: 0}
|
||||
velocity: {x: 54, y: 0}
|
||||
boundaries:
|
||||
position1: {x: 4, y: 12}
|
||||
position2: {x: 21, y: 12}
|
||||
@@ -52,15 +49,14 @@ enemies:
|
||||
|
||||
- animation: heavy.yaml
|
||||
position: {x: 17, y: 5}
|
||||
velocity: {x: 0, y: 36.0}
|
||||
velocity: {x: 0, y: 36}
|
||||
boundaries:
|
||||
position1: {x: 17, y: 2}
|
||||
position2: {x: 17, y: 10}
|
||||
color: white
|
||||
|
||||
- animation: heavy.yaml
|
||||
position: {x: 10, y: 8}
|
||||
velocity: {x: 0, y: 36.0}
|
||||
velocity: {x: 0, y: 36}
|
||||
boundaries:
|
||||
position1: {x: 10, y: 2}
|
||||
position2: {x: 10, y: 10}
|
||||
@@ -97,3 +93,4 @@ items:
|
||||
tile: 49
|
||||
position: {x: 21, y: 11}
|
||||
counter: 6
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# CHIRPING
|
||||
room:
|
||||
name_en: "CHIRPING"
|
||||
name_ca: "CHIRPING"
|
||||
bgColor: black
|
||||
border: magenta
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# STATIC
|
||||
room:
|
||||
name_en: "STATIC"
|
||||
name_ca: "ESTATICA"
|
||||
bgColor: black
|
||||
border: bright_magenta
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# MAGNETIC FIELDS
|
||||
room:
|
||||
name_en: "MAGNETIC FIELDS"
|
||||
name_ca: "CAMPS MAGNETICS"
|
||||
bgColor: black
|
||||
border: bright_red
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -33,6 +33,7 @@ Input::Input(std::string game_controller_db_path)
|
||||
{Action::LEFT, KeyState{.scancode = SDL_SCANCODE_LEFT}},
|
||||
{Action::RIGHT, KeyState{.scancode = SDL_SCANCODE_RIGHT}},
|
||||
{Action::JUMP, KeyState{.scancode = SDL_SCANCODE_UP}},
|
||||
{Action::DOWN, KeyState{.scancode = SDL_SCANCODE_DOWN}},
|
||||
|
||||
// Inputs de control
|
||||
{Action::ACCEPT, KeyState{.scancode = SDL_SCANCODE_RETURN}},
|
||||
|
||||
@@ -7,6 +7,7 @@ const std::unordered_map<InputAction, std::string> ACTION_TO_STRING = {
|
||||
{InputAction::LEFT, "LEFT"},
|
||||
{InputAction::RIGHT, "RIGHT"},
|
||||
{InputAction::JUMP, "JUMP"},
|
||||
{InputAction::DOWN, "DOWN"},
|
||||
{InputAction::PAUSE, "PAUSE"},
|
||||
{InputAction::EXIT, "EXIT"},
|
||||
{InputAction::ACCEPT, "ACCEPT"},
|
||||
@@ -30,6 +31,7 @@ const std::unordered_map<std::string, InputAction> STRING_TO_ACTION = {
|
||||
{"LEFT", InputAction::LEFT},
|
||||
{"RIGHT", InputAction::RIGHT},
|
||||
{"JUMP", InputAction::JUMP},
|
||||
{"DOWN", InputAction::DOWN},
|
||||
{"PAUSE", InputAction::PAUSE},
|
||||
{"EXIT", InputAction::EXIT},
|
||||
{"ACCEPT", InputAction::ACCEPT},
|
||||
|
||||
@@ -11,6 +11,7 @@ enum class InputAction : int { // Acciones de entrada posibles en el juego
|
||||
LEFT,
|
||||
RIGHT,
|
||||
JUMP,
|
||||
DOWN,
|
||||
|
||||
// Inputs de control
|
||||
PAUSE,
|
||||
|
||||
@@ -35,12 +35,8 @@ auto RenderInfo::get() -> RenderInfo* {
|
||||
return RenderInfo::render_info;
|
||||
}
|
||||
|
||||
// Constructor: en DEBUG se activa inmediatamente (notifica a Notifier del offset)
|
||||
RenderInfo::RenderInfo() {
|
||||
#ifdef _DEBUG
|
||||
toggle();
|
||||
#endif
|
||||
}
|
||||
// Constructor: arranca oculto; quien quiera activarlo debe llamar a toggle()
|
||||
RenderInfo::RenderInfo() = default;
|
||||
|
||||
// Actualiza la animación de entrada/salida del overlay
|
||||
void RenderInfo::update(float delta_time) {
|
||||
|
||||
@@ -135,6 +135,7 @@ void Debug::loadFromFile() {
|
||||
spawn_settings_.flip = Defaults::Game::Player::SPAWN_FLIP;
|
||||
initial_scene_ = SceneManager::Scene::GAME;
|
||||
lazy_loading_ = false;
|
||||
render_info_enabled_ = false;
|
||||
|
||||
std::ifstream file(debug_file_path_);
|
||||
if (!file.good()) {
|
||||
@@ -145,8 +146,13 @@ void Debug::loadFromFile() {
|
||||
std::string content((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
|
||||
file.close();
|
||||
|
||||
bool needs_save = false;
|
||||
try {
|
||||
auto yaml = fkyaml::node::deserialize(content);
|
||||
// Detecta si falta alguna clave esperada para regenerar el fichero con los nuevos defaults
|
||||
for (const char* key : {"room", "spawn_x", "spawn_y", "spawn_flip", "initial_scene", "lazy_loading", "render_info"}) {
|
||||
if (!yaml.contains(key)) { needs_save = true; break; }
|
||||
}
|
||||
if (yaml.contains("room")) {
|
||||
spawn_settings_.room = yaml["room"].get_value<std::string>();
|
||||
}
|
||||
@@ -166,6 +172,9 @@ void Debug::loadFromFile() {
|
||||
if (yaml.contains("lazy_loading")) {
|
||||
lazy_loading_ = yaml["lazy_loading"].get_value<bool>();
|
||||
}
|
||||
if (yaml.contains("render_info")) {
|
||||
render_info_enabled_ = yaml["render_info"].get_value<bool>();
|
||||
}
|
||||
} catch (...) {
|
||||
// YAML inválido: resetear a defaults y sobreescribir
|
||||
spawn_settings_.room = Defaults::Game::Room::INITIAL;
|
||||
@@ -174,8 +183,11 @@ void Debug::loadFromFile() {
|
||||
spawn_settings_.flip = Defaults::Game::Player::SPAWN_FLIP;
|
||||
initial_scene_ = SceneManager::Scene::GAME;
|
||||
lazy_loading_ = false;
|
||||
render_info_enabled_ = false;
|
||||
saveToFile();
|
||||
return;
|
||||
}
|
||||
if (needs_save) { saveToFile(); }
|
||||
}
|
||||
|
||||
// Guarda la configuración de debug en debug.yaml
|
||||
@@ -190,6 +202,7 @@ void Debug::saveToFile() const {
|
||||
file << "spawn_flip: " << ((spawn_settings_.flip == Flip::RIGHT) ? "right" : "left") << "\n";
|
||||
file << "initial_scene: " << sceneToString(initial_scene_) << "\n";
|
||||
file << "lazy_loading: " << (lazy_loading_ ? "true" : "false") << " # carga perezosa de recursos (dev)\n";
|
||||
file << "render_info: " << (render_info_enabled_ ? "true" : "false") << " # overlay de info activo al arrancar\n";
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -48,6 +48,7 @@ class Debug {
|
||||
[[nodiscard]] auto getInitialScene() const -> SceneManager::Scene { return initial_scene_; } // Obtiene la escena inicial de debug
|
||||
void setInitialScene(SceneManager::Scene s) { initial_scene_ = s; } // Establece la escena inicial de debug
|
||||
[[nodiscard]] auto getLazyLoading() const -> bool { return lazy_loading_; } // Indica si el modo lazy de recursos está activo
|
||||
[[nodiscard]] auto getRenderInfoEnabled() const -> bool { return render_info_enabled_; } // Indica si el overlay RenderInfo arranca activo
|
||||
|
||||
private:
|
||||
static Debug* debug; // [SINGLETON] Objeto privado
|
||||
@@ -66,6 +67,7 @@ class Debug {
|
||||
SpawnSettings spawn_settings_; // Configuración de spawn para debug
|
||||
SceneManager::Scene initial_scene_ = SceneManager::Scene::GAME; // Escena inicial en debug
|
||||
bool lazy_loading_ = false; // Carga lazy de recursos (dev)
|
||||
bool render_info_enabled_ = false; // Overlay de RenderInfo activo al arrancar
|
||||
};
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -177,6 +177,9 @@ Director::Director() {
|
||||
#endif
|
||||
Notifier::init("", "8bithud");
|
||||
RenderInfo::init();
|
||||
#ifdef _DEBUG
|
||||
if (Debug::get()->getRenderInfoEnabled()) { RenderInfo::get()->toggle(); }
|
||||
#endif
|
||||
Console::init("8bithud");
|
||||
Screen::get()->setNotificationsEnabled(true);
|
||||
|
||||
|
||||
@@ -14,9 +14,8 @@
|
||||
#include "utils/utils.hpp" // Para stringToColor, toLower
|
||||
|
||||
// Constructor
|
||||
EditorStatusBar::EditorStatusBar(std::string room_number, std::string room_name)
|
||||
: room_number_(std::move(room_number)),
|
||||
room_name_(std::move(room_name)) {
|
||||
EditorStatusBar::EditorStatusBar(std::string room_number)
|
||||
: room_number_(std::move(room_number)) {
|
||||
const float SURFACE_WIDTH = Options::game.width;
|
||||
constexpr float SURFACE_HEIGHT = 6.0F * Tile::SIZE; // 48 pixels, igual que el scoreboard
|
||||
|
||||
@@ -56,8 +55,8 @@ void EditorStatusBar::fillTexture() {
|
||||
const Uint8 VALUE_COLOR = stringToColor("white");
|
||||
const Uint8 DETAIL_COLOR = stringToColor("bright_yellow");
|
||||
|
||||
// Línea 1: Nombre de la habitación
|
||||
text->writeColored(LEFT_X, LINE1_Y, toLower(room_number_ + " " + room_name_), LABEL_COLOR);
|
||||
// Línea 1: Número de la habitación
|
||||
text->writeColored(LEFT_X, LINE1_Y, toLower(room_number_), LABEL_COLOR);
|
||||
|
||||
// Línea 2: Propiedades de room o info de enemigo
|
||||
if (!line2_.empty()) {
|
||||
|
||||
@@ -11,7 +11,7 @@ class Surface;
|
||||
|
||||
class EditorStatusBar {
|
||||
public:
|
||||
EditorStatusBar(std::string room_number, std::string room_name);
|
||||
explicit EditorStatusBar(std::string room_number);
|
||||
~EditorStatusBar() = default;
|
||||
|
||||
void render();
|
||||
@@ -40,7 +40,6 @@ class EditorStatusBar {
|
||||
|
||||
// Variables
|
||||
std::string room_number_; // Número de la habitación
|
||||
std::string room_name_; // Nombre de la habitación
|
||||
int mouse_tile_x_{0}; // Coordenada X del ratón en tiles
|
||||
int mouse_tile_y_{0}; // Coordenada Y del ratón en tiles
|
||||
std::string line2_; // Contenido de la línea 2
|
||||
|
||||
@@ -219,7 +219,7 @@ void MapEditor::enter(std::shared_ptr<Room> room, std::shared_ptr<Player> player
|
||||
room_->resetEnemyPositions(room_data_.enemies);
|
||||
|
||||
// Crear la barra de estado
|
||||
statusbar_ = std::make_unique<EditorStatusBar>(room_->getNumber(), room_->getName());
|
||||
statusbar_ = std::make_unique<EditorStatusBar>(room_->getNumber());
|
||||
|
||||
// Resetear estado
|
||||
drag_ = {};
|
||||
@@ -1320,7 +1320,6 @@ auto MapEditor::createNewRoom(const std::string& direction) -> std::string { //
|
||||
// Crear Room::Data por defecto con conexión recíproca
|
||||
Room::Data new_room;
|
||||
new_room.number = std::string(name_buf).substr(0, std::string(name_buf).find('.'));
|
||||
new_room.name = "NO_NAME";
|
||||
new_room.bg_color = "black";
|
||||
new_room.border_color = "magenta";
|
||||
new_room.tile_set_file = "standard.gif";
|
||||
|
||||
@@ -37,25 +37,12 @@ auto RoomSaver::conveyorBeltToString(int direction) -> std::string {
|
||||
|
||||
// Genera el YAML completo como texto con formato compacto
|
||||
auto RoomSaver::buildYAML(const fkyaml::node& original_yaml, const Room::Data& room_data) -> std::string { // NOLINT(readability-function-cognitive-complexity)
|
||||
(void)original_yaml; // Ya no se usa; mantenido para compatibilidad con la firma de saveYAML
|
||||
std::ostringstream out;
|
||||
|
||||
// --- Cabecera: nombre como comentario ---
|
||||
out << "# " << room_data.name << "\n";
|
||||
|
||||
// --- Sección room ---
|
||||
out << "room:\n";
|
||||
|
||||
// Escribir todos los campos name_* del YAML original (preserva name_ca, name_en, etc.)
|
||||
if (original_yaml.contains("room")) {
|
||||
const auto& room_node = original_yaml["room"];
|
||||
for (auto it = room_node.begin(); it != room_node.end(); ++it) {
|
||||
const auto KEY = it.key().get_value<std::string>();
|
||||
if (KEY.substr(0, 5) == "name_") {
|
||||
out << " " << KEY << ": \"" << it.value().get_value<std::string>() << "\"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
out << " bgColor: " << room_data.bg_color << "\n";
|
||||
out << " border: " << room_data.border_color << "\n";
|
||||
out << " tileSetFile: " << room_data.tile_set_file << "\n";
|
||||
|
||||
@@ -65,6 +65,7 @@ void Player::handleInput() {
|
||||
}
|
||||
|
||||
wanna_jump_ = Input::get()->checkAction(InputAction::JUMP);
|
||||
wanna_down_ = Input::get()->checkAction(InputAction::DOWN);
|
||||
}
|
||||
|
||||
// La lógica de movimiento está distribuida en move
|
||||
@@ -189,6 +190,13 @@ void Player::updateOnSlope(float delta_time) {
|
||||
startJump();
|
||||
return;
|
||||
}
|
||||
// DOWN: dejarse caer atravesando la rampa
|
||||
if (wanna_down_) {
|
||||
y_ += 1.0F;
|
||||
vy_ = 0.0F;
|
||||
transitionToState(State::ON_AIR);
|
||||
return;
|
||||
}
|
||||
handleShouldFall();
|
||||
}
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ class Player {
|
||||
|
||||
Direction wanna_go_ = Direction::NONE;
|
||||
bool wanna_jump_ = false;
|
||||
bool wanna_down_ = false;
|
||||
|
||||
// --- Variables de estado ---
|
||||
State state_ = State::ON_GROUND; // Estado en el que se encuentra el jugador. Util apara saber si está saltando o cayendo
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#include "utils/utils.hpp" // Para checkCollision
|
||||
|
||||
// Constructor
|
||||
ItemManager::ItemManager(std::string room_name, std::shared_ptr<Scoreboard::Data> scoreboard_data)
|
||||
: room_name_(std::move(room_name)),
|
||||
ItemManager::ItemManager(std::string room_id, std::shared_ptr<Scoreboard::Data> scoreboard_data)
|
||||
: room_id_(std::move(room_id)),
|
||||
data_(std::move(scoreboard_data)) {
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ auto ItemManager::checkCollision(SDL_FRect& rect) -> bool { // NOLINT(readabili
|
||||
for (int i = 0; i < static_cast<int>(items_.size()); ++i) {
|
||||
if (::checkCollision(rect, items_.at(i)->getCollider())) {
|
||||
// Registra el item como recogido
|
||||
ItemTracker::get()->addItem(room_name_, items_.at(i)->getPos());
|
||||
ItemTracker::get()->addItem(room_id_, items_.at(i)->getPos());
|
||||
|
||||
// Elimina el item de la colección
|
||||
items_.erase(items_.begin() + i);
|
||||
|
||||
@@ -23,10 +23,10 @@ class ItemManager {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param room_name Nombre de la habitación (para ItemTracker)
|
||||
* @param room_id Identificador de la habitación (para ItemTracker)
|
||||
* @param scoreboard_data Puntero compartido a los datos del scoreboard
|
||||
*/
|
||||
ItemManager(std::string room_name, std::shared_ptr<Scoreboard::Data> scoreboard_data);
|
||||
ItemManager(std::string room_id, std::shared_ptr<Scoreboard::Data> scoreboard_data);
|
||||
~ItemManager() = default;
|
||||
|
||||
// Prohibir copia y movimiento para evitar duplicación accidental
|
||||
@@ -68,6 +68,6 @@ class ItemManager {
|
||||
|
||||
private:
|
||||
std::vector<std::shared_ptr<Item>> items_; // Colección de items
|
||||
std::string room_name_; // Nombre de la habitación
|
||||
std::string room_id_; // Identificador de la habitación
|
||||
std::shared_ptr<Scoreboard::Data> data_; // Datos del scoreboard
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ Room::Room(const std::string& room_path, std::shared_ptr<Scoreboard::Data> data)
|
||||
|
||||
// Crea los managers de enemigos e items
|
||||
enemy_manager_ = std::make_unique<EnemyManager>();
|
||||
item_manager_ = std::make_unique<ItemManager>(room->name, data_);
|
||||
item_manager_ = std::make_unique<ItemManager>(room->number, data_);
|
||||
|
||||
initializeRoom(*room);
|
||||
openTheJail(); // Abre la Jail si se da el caso
|
||||
@@ -44,7 +44,6 @@ Room::~Room() = default;
|
||||
void Room::initializeRoom(const Data& room) {
|
||||
// Asignar valores a las variables miembro
|
||||
number_ = room.number;
|
||||
name_ = room.name;
|
||||
bg_color_ = room.bg_color;
|
||||
border_color_ = room.border_color;
|
||||
item_color1_ = room.item_color1.empty() ? "yellow" : room.item_color1;
|
||||
@@ -69,7 +68,7 @@ void Room::initializeRoom(const Data& room) {
|
||||
for (const auto& item : room.items) {
|
||||
const SDL_FPoint ITEM_POS = {item.x, item.y};
|
||||
|
||||
if (!ItemTracker::get()->hasBeenPicked(room.name, ITEM_POS)) {
|
||||
if (!ItemTracker::get()->hasBeenPicked(room.number, ITEM_POS)) {
|
||||
// Crear una copia local de los datos del item
|
||||
Item::Data item_copy = item;
|
||||
item_copy.color1 = stringToColor(item_color1_);
|
||||
|
||||
@@ -40,7 +40,6 @@ class Room {
|
||||
|
||||
struct Data {
|
||||
std::string number; // Numero de la habitación
|
||||
std::string name; // Nombre de la habitación
|
||||
std::string bg_color; // Color de fondo de la habitación
|
||||
std::string border_color; // Color del borde de la pantalla
|
||||
std::string item_color1; // Color 1 para los items de la habitación
|
||||
@@ -62,7 +61,6 @@ class Room {
|
||||
|
||||
// --- Funciones ---
|
||||
[[nodiscard]] auto getNumber() const -> const std::string& { return number_; } // Devuelve el numero de la habitación
|
||||
[[nodiscard]] auto getName() const -> const std::string& { return name_; } // Devuelve el nombre de la habitación
|
||||
[[nodiscard]] auto getBGColor() const -> Uint8 { return stringToColor(bg_color_); } // Devuelve el color de la habitación
|
||||
[[nodiscard]] auto getBorderColor() const -> Uint8 { return stringToColor(border_color_); } // Devuelve el color del borde
|
||||
void renderMap(); // Dibuja el mapa en pantalla
|
||||
@@ -122,7 +120,6 @@ class Room {
|
||||
|
||||
// --- Variables ---
|
||||
std::string number_; // Numero de la habitación
|
||||
std::string name_; // Nombre de la habitación
|
||||
std::string bg_color_; // Color de fondo de la habitación
|
||||
std::string border_color_; // Color del borde de la pantalla
|
||||
std::string item_color1_; // Color 1 para los items de la habitación
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "core/resources/resource_helper.hpp" // Para Resource::Helper
|
||||
#include "external/fkyaml_node.hpp" // Para fkyaml::node
|
||||
#include "game/options.hpp" // Para Options::language
|
||||
#include "utils/defines.hpp" // Para Tile::SIZE
|
||||
#include "utils/utils.hpp" // Para stringToColor
|
||||
|
||||
@@ -71,12 +70,6 @@ void RoomLoader::parseRoomConfig(const fkyaml::node& yaml, Room::Data& room, con
|
||||
room.number = file_name.substr(0, file_name.find_last_of('.'));
|
||||
|
||||
// Basic properties
|
||||
const std::string LANG_KEY = "name_" + Options::language;
|
||||
if (room_node.contains(LANG_KEY)) {
|
||||
room.name = room_node[LANG_KEY].get_value<std::string>();
|
||||
} else if (room_node.contains("name")) {
|
||||
room.name = room_node["name"].get_value<std::string>();
|
||||
}
|
||||
if (room_node.contains("bgColor")) {
|
||||
room.bg_color = readColorNode(room_node["bgColor"]);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ Scoreboard::Scoreboard(std::shared_ptr<Data> data)
|
||||
|
||||
// Pinta el objeto en pantalla
|
||||
void Scoreboard::render() {
|
||||
return;
|
||||
surface_->render(nullptr, &surface_dest_);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,6 @@ Game::Game(Mode mode)
|
||||
initPlayer(spawn_data_, room_);
|
||||
total_items_ = getTotalItems();
|
||||
|
||||
createRoomNameTexture();
|
||||
game_backbuffer_surface_ = std::make_shared<Surface>(Options::game.width, Options::game.height);
|
||||
changeRoom(current_room_);
|
||||
|
||||
@@ -340,7 +339,6 @@ void Game::updatePlaying(float delta_time) {
|
||||
checkPlayerAndEnemies();
|
||||
checkIfPlayerIsAlive();
|
||||
checkEndGame();
|
||||
checkRestoringJail(delta_time);
|
||||
checkSomeCheevos();
|
||||
break;
|
||||
|
||||
@@ -466,7 +464,6 @@ void Game::renderPlaying() {
|
||||
// Si el editor está activo, delegar el renderizado de entidades y statusbar
|
||||
if (MapEditor::get()->isActive()) {
|
||||
MapEditor::get()->render();
|
||||
renderRoomName();
|
||||
Screen::get()->render();
|
||||
return;
|
||||
}
|
||||
@@ -478,7 +475,6 @@ void Game::renderPlaying() {
|
||||
if (mode_ == Mode::GAME) {
|
||||
player_->render();
|
||||
}
|
||||
renderRoomName();
|
||||
scoreboard_->render();
|
||||
|
||||
#ifdef _DEBUG
|
||||
@@ -520,7 +516,6 @@ void Game::renderFadeToEnding() {
|
||||
room_->renderEnemies();
|
||||
room_->renderItems();
|
||||
player_->render(); // Player congelado pero visible
|
||||
renderRoomName();
|
||||
scoreboard_->render();
|
||||
|
||||
// 4. Restaurar renderer original
|
||||
@@ -715,12 +710,6 @@ void Game::handleDebugMouseDrag(float delta_time) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Escribe el nombre de la pantalla
|
||||
void Game::renderRoomName() {
|
||||
// Dibuja la textura con el nombre de la habitación
|
||||
room_name_surface_->render(nullptr, &room_name_rect_);
|
||||
}
|
||||
|
||||
// Cambia de habitación
|
||||
auto Game::changeRoom(const std::string& room_path) -> bool {
|
||||
// En las habitaciones los limites tienen la cadena del fichero o un 0 en caso de no limitar con nada
|
||||
@@ -733,9 +722,6 @@ auto Game::changeRoom(const std::string& room_path) -> bool {
|
||||
// Crea un objeto habitación nuevo a partir del fichero
|
||||
room_ = std::make_shared<Room>(room_path, scoreboard_data_);
|
||||
|
||||
// Pone el nombre de la habitación en la textura
|
||||
fillRoomNameTexture();
|
||||
|
||||
// Pone el color del marcador en función del color del borde de la habitación
|
||||
setScoreBoardColor();
|
||||
|
||||
@@ -880,48 +866,6 @@ void Game::togglePause() {
|
||||
scoreboard_->setPaused(paused_);
|
||||
}
|
||||
|
||||
// Da vidas al jugador cuando está en la Jail
|
||||
void Game::checkRestoringJail(float delta_time) {
|
||||
if (room_->getName() != "THE JAIL" || scoreboard_data_->lives == 9) {
|
||||
jail_restore_time_ = 0.0F; // Reset timer cuando no está en la Jail
|
||||
return;
|
||||
}
|
||||
|
||||
if (!paused_) {
|
||||
jail_restore_time_ += delta_time;
|
||||
}
|
||||
|
||||
// Incrementa el numero de vidas
|
||||
if (jail_restore_time_ >= JAIL_RESTORE_INTERVAL) {
|
||||
jail_restore_time_ -= JAIL_RESTORE_INTERVAL; // Mantiene el excedente para precisión
|
||||
scoreboard_data_->lives++;
|
||||
Audio::get()->playSound("death.wav", Audio::Group::GAME);
|
||||
|
||||
// Invalida el logro de completar el juego sin entrar a la jail
|
||||
const bool HAVE_THE_ITEMS = scoreboard_data_->items >= int(total_items_ * 0.9F);
|
||||
if (!HAVE_THE_ITEMS) {
|
||||
Cheevos::get()->setUnobtainable(9);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Crea la textura con el nombre de la habitación
|
||||
void Game::fillRoomNameTexture() { // NOLINT(readability-convert-member-functions-to-static)
|
||||
// Pone la textura como destino de renderizado
|
||||
auto previuos_renderer = Screen::get()->getRendererSurface();
|
||||
Screen::get()->setRendererSurface(room_name_surface_);
|
||||
|
||||
// Rellena la textura de color
|
||||
room_name_surface_->clear(stringToColor("white"));
|
||||
|
||||
// Escribe el texto en la textura
|
||||
auto text = Resource::Cache::get()->getText("smb2");
|
||||
text->writeDX(Text::CENTER_FLAG | Text::COLOR_FLAG, GameCanvas::CENTER_X, text->getCharacterSize() / 2, room_->getName(), 1, room_->getBGColor());
|
||||
|
||||
// Deja el renderizador por defecto
|
||||
Screen::get()->setRendererSurface(previuos_renderer);
|
||||
}
|
||||
|
||||
// Comprueba algunos logros
|
||||
void Game::checkSomeCheevos() { // NOLINT(readability-convert-member-functions-to-static)
|
||||
auto* cheevos = Cheevos::get();
|
||||
@@ -989,15 +933,6 @@ void Game::initPlayer(const Player::SpawnData& spawn_point, std::shared_ptr<Room
|
||||
if (IGNORE_INPUT) { player_->setIgnoreInput(true); }
|
||||
}
|
||||
|
||||
// Crea la textura para poner el nombre de la habitación
|
||||
void Game::createRoomNameTexture() {
|
||||
auto text = Resource::Cache::get()->getText("smb2");
|
||||
room_name_surface_ = std::make_shared<Surface>(Options::game.width, text->getCharacterSize() * 2);
|
||||
|
||||
// Establece el destino de la textura
|
||||
room_name_rect_ = {.x = 0.0F, .y = PlayArea::HEIGHT, .w = Options::game.width, .h = text->getCharacterSize() * 2.0F};
|
||||
}
|
||||
|
||||
// Hace sonar la música
|
||||
void Game::keepMusicPlaying() {
|
||||
const std::string MUSIC_PATH = mode_ == Mode::GAME ? "574070_KUVO_Farewell_to_school.ogg" : "574071_EA_DTV.ogg";
|
||||
|
||||
@@ -42,7 +42,6 @@ class Game {
|
||||
static constexpr float BLACK_SCREEN_DURATION = 0.30F; // Duración de la pantalla negra en segundos (20 frames a 66.67fps)
|
||||
static constexpr float GAME_OVER_THRESHOLD = 0.255F; // Tiempo antes del game over en segundos (17 frames a 66.67fps)
|
||||
static constexpr float DEMO_ROOM_DURATION = 6.0F; // Duración de cada habitación en modo demo en segundos (400 frames)
|
||||
static constexpr float JAIL_RESTORE_INTERVAL = 1.5F; // Intervalo de restauración de vidas en la Jail en segundos (100 frames)
|
||||
static constexpr float FADE_STEP_INTERVAL = 0.05F; // Intervalo entre pasos de fade en segundos
|
||||
static constexpr float POST_FADE_DELAY = 2.0F; // Duración de la pantalla negra después del fade
|
||||
|
||||
@@ -57,7 +56,6 @@ class Game {
|
||||
void update(); // Actualiza el juego, las variables, comprueba la entrada, etc.
|
||||
void render(); // Pinta los objetos en pantalla
|
||||
void handleEvents(); // Comprueba los eventos de la cola
|
||||
void renderRoomName(); // Escribe el nombre de la pantalla
|
||||
void transitionToState(State new_state); // Cambia al estado especificado y resetea los timers
|
||||
void updatePlaying(float delta_time); // Actualiza el juego en estado PLAYING
|
||||
void updateBlackScreen(float delta_time); // Actualiza el juego en estado BLACK_SCREEN
|
||||
@@ -80,12 +78,9 @@ class Game {
|
||||
auto checkEndGame() -> bool; // Comprueba si ha finalizado el juego
|
||||
static auto getTotalItems() -> int; // Obtiene la cantidad total de items que hay en el mapeado del juego
|
||||
void togglePause(); // Pone el juego en pausa
|
||||
void checkRestoringJail(float delta_time); // Da vidas al jugador cuando está en la Jail
|
||||
void fillRoomNameTexture(); // Pone el nombre de la habitación en la textura
|
||||
void checkSomeCheevos(); // Comprueba algunos logros
|
||||
void checkEndGameCheevos(); // Comprueba los logros de completar el juego
|
||||
void initPlayer(const Player::SpawnData& spawn_point, std::shared_ptr<Room> room); // Inicializa al jugador
|
||||
void createRoomNameTexture(); // Crea la textura para poner el nombre de la habitación
|
||||
void keepMusicPlaying(); // Hace sonar la música
|
||||
void demoInit(); // DEMO MODE: Inicializa las variables para el modo demo
|
||||
void demoCheckRoomChange(float delta_time); // DEMO MODE: Comprueba si se ha de cambiar de habitación
|
||||
@@ -102,7 +97,6 @@ class Game {
|
||||
std::shared_ptr<RoomTracker> room_tracker_; // Lleva el control de las habitaciones visitadas
|
||||
std::shared_ptr<Room> room_; // Objeto encargado de gestionar cada habitación del juego
|
||||
std::shared_ptr<Player> player_; // Objeto con el jugador
|
||||
std::shared_ptr<Surface> room_name_surface_; // Textura para escribir el nombre de la habitación
|
||||
std::shared_ptr<Surface> game_backbuffer_surface_; // Backbuffer para efectos de fade
|
||||
|
||||
// Variables de estado del juego
|
||||
@@ -119,9 +113,6 @@ class Game {
|
||||
// Variables de demo mode
|
||||
DemoData demo_; // Variables para el modo demo
|
||||
|
||||
// Variables de efectos visuales
|
||||
SDL_FRect room_name_rect_; // Rectangulo donde pintar la textura con el nombre de la habitación
|
||||
float jail_restore_time_{0.0F}; // Tiempo acumulado para restauración de vidas en la Jail
|
||||
|
||||
#ifdef _DEBUG
|
||||
// Variables de debug para arrastre con ratón
|
||||
|
||||
@@ -361,6 +361,12 @@ auto stringToColor(const std::string& str) -> Uint8 {
|
||||
{"white", 14},
|
||||
{"bright_white", 15},
|
||||
|
||||
// Índices extendidos (paletas de 32 colores): nombres genéricos COLOR_N
|
||||
{"color_16", 16}, {"color_17", 17}, {"color_18", 18}, {"color_19", 19},
|
||||
{"color_20", 20}, {"color_21", 21}, {"color_22", 22}, {"color_23", 23},
|
||||
{"color_24", 24}, {"color_25", 25}, {"color_26", 26}, {"color_27", 27},
|
||||
{"color_28", 28}, {"color_29", 29}, {"color_30", 30}, {"color_31", 31},
|
||||
|
||||
{"transparent", 255}};
|
||||
|
||||
// Busca el color en el mapa
|
||||
@@ -393,6 +399,7 @@ auto colorToString(Uint8 index) -> std::string {
|
||||
"yellow", "bright_yellow",
|
||||
"white", "bright_white"};
|
||||
if (index < NAMES.size()) { return NAMES[index]; }
|
||||
if (index < 32) { return "color_" + std::to_string(index); }
|
||||
if (index == 255) { return "transparent"; }
|
||||
return std::to_string(index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user