Mercurial > hg > index.fcgi > lj > lj046
comparison src/ljlocale.c @ 0:c84446dfb3f5
initial add
author | paulo@localhost |
---|---|
date | Fri, 13 Mar 2009 00:39:12 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6dafaefa24c7 |
---|---|
1 #include "ljlocale.h" | |
2 #include <stdlib.h> | |
3 #include <string.h> | |
4 | |
5 | |
6 static const FourCCLocaleEntry *curLocale = englishLocale; | |
7 | |
8 void ljSetLocale(const FourCCLocaleEntry *locale) { | |
9 if (locale) { | |
10 curLocale = locale; | |
11 } | |
12 } | |
13 | |
14 static const FourCCLocaleEntry *ljGetFourCCEntry(unsigned int i) { | |
15 const FourCCLocaleEntry *base = curLocale; | |
16 | |
17 for(; base->code.i != 0; ++base) { | |
18 if (base->code.i == i) { | |
19 return base; | |
20 } | |
21 } | |
22 return NULL; | |
23 } | |
24 | |
25 const char *ljGetFourCCName(FourCC i) { | |
26 const FourCCLocaleEntry *ent = ljGetFourCCEntry(i.i); | |
27 return ent ? ent->name : NULL; | |
28 } | |
29 | |
30 const char *ljGetFourCCDesc(FourCC i) { | |
31 const FourCCLocaleEntry *ent = ljGetFourCCEntry(i.i); | |
32 return ent ? ent->desc : NULL; | |
33 } | |
34 | |
35 const FourCCLocaleEntry englishLocale[] = { | |
36 /* Page names */ | |
37 /* omitted */ | |
38 | |
39 /* Option names */ | |
40 {{"gimm"}, "Gimmick", | |
41 "Goal or other game mode" }, | |
42 {{"pfw"}, "Well width", | |
43 "Amount of space to build in" }, | |
44 {{"pfh"}, "Well height", | |
45 "Amount of space to build in" }, | |
46 {{"vzsp"}, "Enter above ceiling", | |
47 "Pieces start below or above top of well" }, | |
48 {{"spdc"}, "Speed curve", | |
49 "Controls speed of falling piece and delays" }, | |
50 {{"are"}, "Max entry delay", | |
51 "Time from lockdown to next piece entry" }, | |
52 {{"piec"}, "Piece set", | |
53 "Which pieces will be used" }, | |
54 {{"rand"}, "Randomizer", | |
55 "How the pieces are shuffled" }, | |
56 {{"hold"}, "Hold piece", | |
57 "Press Hold to save a piece for later" }, | |
58 {{"rots"}, "Rotation system", | |
59 "How pieces turn and react to walls" }, | |
60 {{"upkl"}, "Floor kicks", | |
61 "Times each piece can rotate upward" }, | |
62 {{"srk"}, "Sub-row kicks", | |
63 "" }, | |
64 {{"lock"}, "Lockdown", | |
65 "Start of time when a piece slides around" }, | |
66 {{"sldt"}, "Lock delay", | |
67 "Amount of time a piece can slide around" }, | |
68 {{"deep"}, "Deep drop", | |
69 "Hard drop past blocks in the well" }, | |
70 {{"clrd"}, "Line clear delay", | |
71 "Time for cleared lines to disappear" }, | |
72 {{"grav"}, "Clear gravity", | |
73 "How blocks above a cleared line fall" }, | |
74 {{"glue"}, "Gluing", | |
75 "How blocks stick together" }, | |
76 {{"lsco"}, "Line scoring", | |
77 "Points awarded for lines" }, | |
78 {{"dsco"}, "Drop scoring", | |
79 "Points awarded for fast play (Up/Down)" }, | |
80 {{"tspn"}, "T-spin detection", | |
81 "Detect turning a piece into a tight space" }, | |
82 {{"garb"}, "Garbage", | |
83 "Blocks added to the bottom of the well" }, | |
84 {{"dasd"}, "Max sideways delay", | |
85 "Hold left/right this long to move fast" }, | |
86 {{"dass"}, "Sideways speed", | |
87 "How fast piece moves left/right" }, | |
88 {{"idas"}, "Initial sideways motion", | |
89 "Allow shifting as a piece is coming out?" }, | |
90 {{"irs"}, "Initial rotation", | |
91 "Hold rotate to turn each piece as it enters" }, | |
92 {{"8way"}, "Allow diagonal motion", | |
93 "Turn off to prevent accidental hard drops" }, | |
94 {{"sfds"}, "Soft drop speed", | |
95 "Hold down to drop the piece this fast" }, | |
96 {{"sfdl"}, "Soft drop", | |
97 "Behavior when a piece lands with down" }, | |
98 {{"hrdl"}, "Hard drop", | |
99 "Behavior when a piece lands with up" }, | |
100 {{"tls"}, "Shadow", | |
101 "Shows where the piece will land" }, | |
102 {{"invs"}, "Hide blocks in well", | |
103 "Invisible challenge tests your memory" }, | |
104 {{"next"}, "Next pieces", | |
105 "Number of previewed pieces" }, | |
106 {{"srph"}, "Smooth gravity", | |
107 "Turn off to make the piece fall row-by-row" }, | |
108 {{"inpv"}, "Next above shadow", | |
109 "Number of previewed pieces inside the well" }, | |
110 {{"mblr"}, "Drop trails", | |
111 "Makes hard drops look harder" }, | |
112 | |
113 {{"lidp"}, "Pause on task switch", | |
114 "Makes Alt+Tab or screensaver safe" }, | |
115 {{"rec"}, "Record all games", | |
116 "Save each game's replay to demo.ljm" }, | |
117 {{"wndw"}, "Display mode", | |
118 "Shut out distractions" }, | |
119 | |
120 /* Booleans */ | |
121 {{"Off"}, "Off" }, | |
122 {{"On"}, "On" }, | |
123 | |
124 /* Gimmicks */ | |
125 {{"Mara"}, "Marathon", | |
126 "Play until you top out."}, | |
127 {{"Line"}, "40 lines", | |
128 "Game ends after you clear this many lines."}, | |
129 {{"Time"}, "180 seconds", | |
130 "Game ends after this much time."}, | |
131 {{"DrlA"}, "Drill Attack", | |
132 "Clear the bottom row of garbage to win."}, | |
133 {{"Item"}, "Vs. w/Items", | |
134 "Three opponents send disabling attacks."}, | |
135 {{"Keys"}, "Baboo!", | |
136 "What can you do with 300 keystrokes?"}, | |
137 | |
138 /* Garbage */ | |
139 {{"HRD"}, "Home Run Derby", | |
140 "Clear 1, 2, or 3 lines and get garbage back"}, | |
141 {{"DrlG"}, "Drill", | |
142 "Well is filled with random garbage"}, | |
143 {{"Zigz"}, "Zigzag", | |
144 "Well is filled with zigzag garbage"}, | |
145 | |
146 /* Piece set */ | |
147 {{"AllP"}, "All pieces", | |
148 "Pieces made of two, three, or four blocks" }, | |
149 {{"IJLO"}, "Tetrominoes", | |
150 "Pieces made of four blocks"}, | |
151 {{"JLOT"}, "Tetrominoes no I", | |
152 "Four blocks, no straight pieces"}, | |
153 {{"SZSZ"}, "S and Z only" }, | |
154 {{"IIII"}, "iCheat(tm)", | |
155 "All I (straight) tetrominoes" }, | |
156 {{"TTTT"}, "T-Party", | |
157 "All T tetrominoes" }, | |
158 | |
159 /* Randomizer */ | |
160 {{"Unif"}, "Memoryless", | |
161 "Equal probability to deal any piece" }, | |
162 {{"Bag"}, "Bag", | |
163 "Deals one of each piece before repeats"}, | |
164 {{"Bag+"}, "Bag + 1", | |
165 "Adds one extra to each set of pieces"}, | |
166 {{"Bag2"}, "Double bag", | |
167 "Deals two of each piece before repeats"}, | |
168 {{"Hist"}, "Strict history", | |
169 "Does not deal a recent piece"}, | |
170 {{"His6"}, "History 6 rolls", | |
171 "Rarely deals a recent piece"}, | |
172 | |
173 /* Speed curve */ | |
174 {{"Exp"}, "Exponential", | |
175 "Game gradually gets faster"}, | |
176 {{"Rh20"}, "Rhythm 20G", | |
177 "Slide pieces into place to the beat"}, | |
178 {{"Rhy0"}, "Rhythm 0G", | |
179 "Drop pieces into place to the beat"}, | |
180 {{"TGM2"}, "Master" }, | |
181 {{"TAPD"}, "Death" }, | |
182 {{"TAD3"}, "Death 300+" }, | |
183 {{"NESc"}, "NES" }, | |
184 {{"GBc"}, "Game Boy" }, | |
185 {{"GBHL"}, "Game Boy Heart" }, | |
186 | |
187 /* Hold */ | |
188 {{"HldE"}, "On, empty", | |
189 "First held piece brings out next"}, | |
190 {{"HldR"}, "On, random", | |
191 "Random piece in hold box at start"}, | |
192 {{"HldN"}, "Hold to next", | |
193 "Hold swaps falling and next (like Radica)"}, | |
194 | |
195 /* Rotation systems */ | |
196 {{"SRS"}, "SRS", | |
197 "LOL T-spin triples"}, | |
198 {{"Sega"}, "Sega 1988" }, | |
199 {{"ARS"}, "Arika", | |
200 "The rotation system of grandmasters"}, | |
201 {{"Tngn"}, "Tengen", | |
202 "Unlicensed" }, | |
203 {{"NRSL"}, "Game Boy", | |
204 "Left-handed system"}, | |
205 {{"NRSR"}, "NES", | |
206 "Right-handed system"}, | |
207 {{"TOD4"}, "TOD M4", | |
208 "Like SRS but less radical" }, | |
209 {{"TDX"}, "Climbing", | |
210 "Spider-Man's favorite Tetris game is DX"}, | |
211 | |
212 /* Lockdown */ | |
213 {{"OLD"}, "Classic", | |
214 "Lock when piece lands" }, | |
215 {{"EntR"}, "Entry reset", | |
216 "Lock delay resets for each new piece" }, | |
217 {{"StpR"}, "Step reset", | |
218 "Lock delay resets when piece moves down" }, | |
219 {{"MovR"}, "Move reset", | |
220 "Lock delay resets when piece moves" }, | |
221 | |
222 /* Lock/line delay and floor kicks */ | |
223 {{"SBSC"}, "Set by speed curve" }, | |
224 {{"Inf"}, "Unlimited" }, | |
225 | |
226 /* Sub-row kick */ | |
227 {{"srkN"}, "Unchanged" }, | |
228 {{"srkM"}, "Kick minimal distance" }, | |
229 {{"srkU"}, "Always kick up" }, | |
230 | |
231 /* Gluing and gravity */ | |
232 {{"Naiv"}, "Naive", | |
233 "Can result in floating blocks"}, | |
234 {{"Squ"}, "Square", | |
235 "Form a 4x4 square from complete pieces" }, | |
236 {{"Stky"}, "Sticky", | |
237 "Blocks stick together"}, | |
238 {{"byCo"}, "Sticky by color", | |
239 "Blocks of each color stick together"}, | |
240 {{"Casc"}, "Cascade", | |
241 "Each piece falls separately" }, | |
242 | |
243 /* Line scoring */ | |
244 {{"LJ"}, "LJ", | |
245 "100, 400, 700, 1200, B2B=200, T=500*n" }, | |
246 {{"Fibo"}, "Fibonacci", | |
247 "100, 200, 300, 500 (800, 1300, ...)" }, | |
248 {{"HotL"}, "Hotline", | |
249 "100-600 for clearing lines on specific rows" }, | |
250 {{"TDSl"}, "Guideline", | |
251 "Level * 100, 300, 500, 800, B2B=50%, T=?" }, | |
252 {{"NESl"}, "8-bit", | |
253 "Level * 40, 100, 300, 1200" }, | |
254 {{"LJns"}, "LJ (nerfed spin)", | |
255 "100, 400, 700, 1200, B2B=200, T=300*n" }, | |
256 | |
257 /* Drop scoring */ | |
258 {{"ConD"}, "Continuous drop", | |
259 "1 point per row dropped without stopping"}, | |
260 {{"S1H1"}, "Drop", | |
261 "1 point per row soft or hard dropped"}, | |
262 {{"S1H2"}, "Soft x1, Hard x2", | |
263 "1 pt/row for soft drop, 2 for hard drop"}, | |
264 | |
265 /* T-spin */ | |
266 {{"Imob"}, "Immobile", | |
267 "Rotate any piece so it can't move up"}, | |
268 {{"CrnT"}, "3-corner T", | |
269 "Rotate T with 3 corners filled" }, | |
270 {{"WKT"}, "3-corner T no kick", | |
271 "Rotate T with 3 corners filled, without kick" }, | |
272 | |
273 /* sideways speed, soft drop speed, zangi */ | |
274 | |
275 /* Zangi */ | |
276 {{"Slid"}, "Slide", | |
277 "The piece can be dropped and then moved"}, | |
278 {{"Lock"}, "Lock", | |
279 "The piece locks immediately"}, | |
280 {{"LocU"}, "Lock on release", | |
281 "Can be moved while drop key is pressed"}, | |
282 | |
283 /* Shadow */ | |
284 {{"tl25"}, "Fainter color" }, | |
285 {{"tl50"}, "Faint color" }, | |
286 {{"tlsC"}, "Color" }, | |
287 {{"tlsM"}, "Monochrome" }, | |
288 {{"invF"}, "Off, hide falling piece too"}, | |
289 | |
290 #ifdef HAS_FPU | |
291 {{"FulS"}, "Full screen", | |
292 "Try to run the game in the full screen."}, | |
293 {{"Wind"}, "Windowed", | |
294 "Run the game in a window."}, | |
295 #endif | |
296 | |
297 /* list terminator */ | |
298 { {.i=0}, NULL } | |
299 }; |