4 * Created on: Aug 1, 2012
8 #include "app/Application.h"
10 #include "battle/BattleState.h"
11 #include "battle/Hero.h"
12 #include "battle/Monster.h"
13 #include "battle/PartyLayout.h"
14 #include "battle/Resources.h"
15 #include "common/Ikari.h"
16 #include "common/Inventory.h"
17 #include "common/Item.h"
18 #include "common/Spell.h"
19 #include "geometry/Point.h"
20 #include "graphics/Font.h"
21 #include "graphics/Frame.h"
22 #include "graphics/Gauge.h"
23 #include "graphics/Menu.h"
24 #include "graphics/Sprite.h"
25 #include "sdl/InitImage.h"
26 #include "sdl/InitScreen.h"
27 #include "sdl/InitSDL.h"
32 #include <SDL_image.h>
34 using app::Application;
36 using battle::BattleState;
38 using battle::Monster;
39 using battle::PartyLayout;
41 using common::Inventory;
44 using geometry::Point;
46 using graphics::Frame;
47 using graphics::Gauge;
49 using graphics::Sprite;
51 using sdl::InitScreen;
59 int main(int argc, char **argv) {
60 const int width = 800;
61 const int height = 480;
65 InitImage image(IMG_INIT_PNG);
66 InitScreen screen(width, height);
68 // temporary test data
69 SDL_Surface *bg(IMG_Load("test-data/battle-bg.png"));
70 PartyLayout monstersLayout;
71 monstersLayout.AddPosition(Point<Uint8>(88, 104));
72 monstersLayout.AddPosition(Point<Uint8>(128, 104));
73 monstersLayout.AddPosition(Point<Uint8>(168, 104));
74 monstersLayout.AddPosition(Point<Uint8>(208, 104));
75 PartyLayout heroesLayout;
76 heroesLayout.AddPosition(Point<Uint8>(48, 152));
77 heroesLayout.AddPosition(Point<Uint8>(128, 152));
78 heroesLayout.AddPosition(Point<Uint8>(80, 168));
79 heroesLayout.AddPosition(Point<Uint8>(160, 168));
81 SDL_Surface *monsterImg(IMG_Load("test-data/monster.png"));
82 Sprite dummySprite(monsterImg, 64, 64);
84 monster.SetName("Monster");
85 monster.SetSprite(&dummySprite);
86 monster.SetMaxHealth(10);
87 monster.SetHealth(10);
89 SDL_Surface *maximImg(IMG_Load("test-data/maxim.png"));
90 Sprite maximSprite(maximImg, 64, 64);
92 maxim.SetName("Maxim");
94 maxim.SetSprite(&maximSprite);
95 maxim.SetMaxHealth(33);
101 SDL_Surface *selanImg(IMG_Load("test-data/selan.png"));
102 Sprite selanSprite(selanImg, 64, 64);
104 selan.SetName("Selan");
106 selan.SetSprite(&selanSprite);
107 selan.SetMaxHealth(28);
109 selan.SetMaxMana(23);
113 SDL_Surface *guyImg(IMG_Load("test-data/guy.png"));
114 Sprite guySprite(guyImg, 64, 64);
118 guy.SetSprite(&guySprite);
119 guy.SetMaxHealth(38);
125 SDL_Surface *dekarImg(IMG_Load("test-data/dekar.png"));
126 Sprite dekarSprite(dekarImg, 64, 64);
128 dekar.SetName("Dekar");
130 dekar.SetSprite(&dekarSprite);
131 dekar.SetMaxHealth(38);
137 battle::Resources battleRes;
139 SDL_Surface *swapCursorImg(IMG_Load("test-data/swap-cursor.png"));
140 Sprite swapCursorSprite(swapCursorImg, 32, 32);
141 battleRes.swapCursor = &swapCursorSprite;
142 SDL_Surface *attackIconsImg(IMG_Load("test-data/attack-type-icons.png"));
143 Sprite attackIconsSprite(attackIconsImg, 32, 32);
144 battleRes.attackIcons = &attackIconsSprite;
145 SDL_Surface *attackChoiceIconsImg(IMG_Load("test-data/attack-choice-icons.png"));
146 Sprite attackChoiceIconsSprite(attackChoiceIconsImg, 16, 16);
147 battleRes.attackChoiceIcons = &attackChoiceIconsSprite;
148 SDL_Surface *moveIconsImg(IMG_Load("test-data/move-icons.png"));
149 Sprite moveIconsSprite(moveIconsImg, 32, 32);
150 battleRes.moveIcons = &moveIconsSprite;
152 SDL_Surface *titleFrameImg(IMG_Load("test-data/title-frame.png"));
153 Frame titleFrame(titleFrameImg, 16, 16);
154 battleRes.titleFrame = &titleFrame;
156 SDL_Surface *largeFontImg(IMG_Load("test-data/large-font.png"));
157 Sprite largeFontSprite(largeFontImg, 16, 32);
158 Font largeFont(&largeFontSprite);
159 largeFont.MapRange('A', 'M', 0, 1);
160 largeFont.MapRange('N', 'Z', 0, 2);
161 largeFont.MapRange('a', 'm', 0, 3);
162 largeFont.MapRange('n', 'z', 0, 4);
163 largeFont.MapChar(':', 10, 0);
164 largeFont.MapChar('!', 11, 0);
165 largeFont.MapChar('?', 12, 0);
166 // TODO: add '.' and '-' characters
167 battleRes.titleFont = &largeFont;
169 SDL_Surface *heroTagImg(IMG_Load("test-data/hero-tag-sprites.png"));
170 Sprite heroTagSprite(heroTagImg, 32, 16);
171 battleRes.heroTagLabels = &heroTagSprite;
172 battleRes.levelLabelCol = 0;
173 battleRes.levelLabelRow = 0;
174 battleRes.healthLabelCol = 0;
175 battleRes.healthLabelRow = 1;
176 battleRes.manaLabelCol = 0;
177 battleRes.manaLabelRow = 2;
178 battleRes.moveLabelCol = 0;
179 battleRes.moveLabelRow = 3;
180 battleRes.ikariLabelCol = 0;
181 battleRes.ikariLabelRow = 4;
183 SDL_Surface *numbersImg(IMG_Load("test-data/numbers.png"));
184 Sprite numbersSprite(numbersImg, 16, 16);
185 Font heroTagFont(&numbersSprite);
186 battleRes.heroTagFont = &heroTagFont;
187 SDL_Surface *tagFramesImg(IMG_Load("test-data/tag-frames.png"));
188 Frame heroTagFrame(tagFramesImg, 16, 16, 1, 1, 0, 33);
189 battleRes.heroTagFrame = &heroTagFrame;
190 Frame activeHeroTagFrame(tagFramesImg, 16, 16);
191 battleRes.activeHeroTagFrame = &activeHeroTagFrame;
192 SDL_Surface *smallTagFrameImg(IMG_Load("test-data/small-tag-frame.png"));
193 Frame smallTagFrame(smallTagFrameImg, 8, 16);
194 battleRes.smallHeroTagFrame = &smallTagFrame;
195 Frame lastSmallTagFrame(smallTagFrameImg, 8, 16, 1, 1, 0, 33);
196 battleRes.lastSmallHeroTagFrame = &lastSmallTagFrame;
197 battleRes.heroesBgColor = SDL_MapRGB(screen.Screen()->format, 0x18, 0x28, 0x31);
199 SDL_Surface *gauges(IMG_Load("test-data/gauges.png"));
200 Gauge healthGauge(gauges, 0, 16, 0, 0, 16, 6, 1, 6);
201 battleRes.healthGauge = &healthGauge;
202 Gauge manaGauge(gauges, 0, 32, 0, 0, 16, 6, 1, 6);
203 battleRes.manaGauge = &manaGauge;
204 Gauge ikariGauge(gauges, 0, 48, 0, 0, 16, 6, 1, 6);
205 battleRes.ikariGauge = &ikariGauge;
207 SDL_Surface *selectFrameImg(IMG_Load("test-data/select-frame.png"));
208 Frame selectFrame(selectFrameImg, 16, 16);
209 battleRes.selectFrame = &selectFrame;
211 SDL_Surface *normalFontImg(IMG_Load("test-data/normal-font.png"));
212 Sprite normalFontSprite(normalFontImg, 16, 16);
213 Font normalFont(&normalFontSprite);
214 normalFont.MapRange('A', 'M', 0, 1);
215 normalFont.MapRange('N', 'Z', 0, 2);
216 normalFont.MapRange('a', 'm', 0, 3);
217 normalFont.MapRange('n', 'z', 0, 4);
218 normalFont.MapChar(':', 10, 0);
219 normalFont.MapChar('!', 11, 0);
220 normalFont.MapChar('?', 12, 0);
221 // TODO: add '.' and '-' characters
222 battleRes.normalFont = &normalFont;
224 SDL_Surface *disabledFontImg(IMG_Load("test-data/disabled-font.png"));
225 Sprite disabledFontSprite(disabledFontImg, 16, 16);
226 Font disabledFont(&disabledFontSprite);
227 disabledFont.MapRange('A', 'M', 0, 1);
228 disabledFont.MapRange('N', 'Z', 0, 2);
229 disabledFont.MapRange('a', 'm', 0, 3);
230 disabledFont.MapRange('n', 'z', 0, 4);
231 disabledFont.MapChar(':', 10, 0);
232 disabledFont.MapChar('!', 11, 0);
233 disabledFont.MapChar('?', 12, 0);
234 // TODO: add '.' and '-' characters
235 battleRes.disabledFont = &disabledFont;
237 SDL_Surface *handCursorImg(IMG_Load("test-data/cursor-hand.png"));
238 Sprite handCursorSprite(handCursorImg, 32, 32);
239 battleRes.menuCursor = &handCursorSprite;
241 SDL_Surface *targetingIconsImg(IMG_Load("test-data/targeting-icons.png"));
242 Sprite weaponTargetCursor(targetingIconsImg, 32, 32);
243 Sprite magicTargetCursor(targetingIconsImg, 32, 32, 0, 32);
244 Sprite itemTargetCursor(targetingIconsImg, 32, 32, 0, 64);
245 battleRes.weaponTargetCursor = &weaponTargetCursor;
246 // TODO: add image for magic targeting cursor
247 battleRes.magicTargetCursor = &magicTargetCursor;
248 // TODO: add image for item targeting cursor
249 battleRes.itemTargetCursor = &itemTargetCursor;
252 resetSpell.SetName("Reset");
253 maxim.AddSpell(&resetSpell);
255 strongSpell.SetName("Strong");
256 strongSpell.SetCost(3);
257 strongSpell.SetUsableInBattle();
258 strongSpell.GetTargetingMode().TargetMultipleAllies();
259 maxim.AddSpell(&strongSpell);
260 selan.AddSpell(&strongSpell);
262 strongerSpell.SetName("Stronger");
263 strongerSpell.SetCost(8);
264 strongerSpell.SetUsableInBattle();
265 strongerSpell.GetTargetingMode().TargetMultipleAllies();
266 maxim.AddSpell(&strongerSpell);
267 selan.AddSpell(&strongerSpell);
269 championSpell.SetName("Champion");
270 championSpell.SetCost(16);
271 championSpell.SetUsableInBattle();
272 championSpell.GetTargetingMode().TargetMultipleAllies();
273 maxim.AddSpell(&championSpell);
274 selan.AddSpell(&championSpell);
276 rallySpell.SetName("Rally");
277 rallySpell.SetCost(10);
278 rallySpell.SetUsableInBattle();
279 rallySpell.GetTargetingMode().TargetMultipleAllies();
280 maxim.AddSpell(&rallySpell);
281 selan.AddSpell(&rallySpell);
283 escapeSpell.SetName("Escape");
284 escapeSpell.SetCost(8);
285 selan.AddSpell(&escapeSpell);
287 valorSpell.SetName("Valor");
288 valorSpell.SetCost(30);
289 valorSpell.SetUsableInBattle();
290 valorSpell.GetTargetingMode().TargetMultipleAllies();
291 maxim.AddSpell(&valorSpell);
292 selan.AddSpell(&valorSpell);
294 battleRes.spellMenuHeadline = "Please choose a spell.";
295 battleRes.spellMenuPrototype = Menu<const Spell *>(&normalFont, &disabledFont, &handCursorSprite, 9, 6, 8, 0, 2, 32, 2, ':');
297 SDL_Surface *itemIcons(IMG_Load("test-data/item-icons.png"));
298 Sprite potionIcon(itemIcons, 16, 16);
299 Sprite ballIcon(itemIcons, 16, 16, 0, 16);
300 Sprite crankIcon(itemIcons, 16, 16, 0, 32);
301 Sprite spearIcon(itemIcons, 16, 16, 0, 48);
302 Sprite swordIcon(itemIcons, 16, 16, 0, 64);
303 Sprite axIcon(itemIcons, 16, 16, 0, 80);
304 Sprite rodIcon(itemIcons, 16, 16, 0, 96);
305 Sprite armorIcon(itemIcons, 16, 16, 0, 112);
306 Sprite shieldIcon(itemIcons, 16, 16, 0, 128);
307 Sprite helmetIcon(itemIcons, 16, 16, 0, 144);
308 Sprite ringIcon(itemIcons, 16, 16, 0, 160);
309 Sprite jewelIcon(itemIcons, 16, 16, 0, 176);
311 battleRes.weaponMenuIcon = &swordIcon;
312 battleRes.armorMenuIcon = &armorIcon;
313 battleRes.shieldMenuIcon = &shieldIcon;
314 battleRes.helmetMenuIcon = &helmetIcon;
315 battleRes.ringMenuIcon = &ringIcon;
316 battleRes.jewelMenuIcon = &jewelIcon;
320 antidote.SetName("Antidote");
321 antidote.SetMenuIcon(&potionIcon);
322 antidote.SetUsableInBattle();
323 antidote.GetTargetingMode().TargetSingleAlly();
324 inventory.Add(&antidote, 9);
326 magicJar.SetName("Magic jar");
327 magicJar.SetMenuIcon(&potionIcon);
328 magicJar.SetUsableInBattle();
329 magicJar.GetTargetingMode().TargetSingleAlly();
330 inventory.Add(&magicJar, 4);
332 hiPotion.SetName("Hi-Potion");
333 hiPotion.SetMenuIcon(&potionIcon);
334 hiPotion.SetUsableInBattle();
335 hiPotion.GetTargetingMode().TargetSingleAlly();
336 inventory.Add(&hiPotion, 4);
338 powerPotion.SetName("Power potion");
339 powerPotion.SetMenuIcon(&potionIcon);
340 inventory.Add(&powerPotion, 4);
342 escape.SetName("Escape");
343 inventory.Add(&escape, 2);
345 sleepBall.SetName("Sleep ball");
346 sleepBall.SetMenuIcon(&ballIcon);
347 sleepBall.SetUsableInBattle();
348 sleepBall.GetTargetingMode().TargetSingleEnemy();
349 inventory.Add(&sleepBall, 1);
351 multiBall.SetName("Multi-ball!");
352 multiBall.SetMenuIcon(&ballIcon);
353 multiBall.SetUsableInBattle();
354 multiBall.GetTargetingMode().TargetMultipleEnemies();
355 inventory.Add(&multiBall, 1);
357 figgoru.SetName("Figgoru");
358 figgoru.SetMenuIcon(&crankIcon);
359 figgoru.GetTargetingMode().TargetAllEnemies();
360 inventory.Add(&figgoru, 1);
361 battleRes.inventory = &inventory;
363 battleRes.itemMenuHeadline = "Please choose an item.";
364 battleRes.itemMenuPrototype = Menu<const common::Item *>(&normalFont, &disabledFont, &handCursorSprite, 15, 6, 8, 16, 1, 32, 2, ':');
367 zircoSword.SetName("Zirco sword");
368 zircoSword.SetMenuIcon(&swordIcon);
370 firestorm.SetName("Firestorm");
371 firestorm.SetCost(224);
372 firestorm.GetTargetingMode().TargetAllEnemies();
373 firestorm.SetPhysical();
374 zircoSword.SetIkari(&firestorm);
375 maxim.SetWeapon(&zircoSword);
377 zirconArmor.SetName("Zircon armor");
378 zirconArmor.SetMenuIcon(&armorIcon);
380 magicCure.SetName("Magic cure");
381 magicCure.SetCost(128);
382 magicCure.GetTargetingMode().TargetSingleAlly();
383 magicCure.SetMagical();
384 zirconArmor.SetIkari(&magicCure);
385 maxim.SetArmor(&zirconArmor);
387 holyShield.SetName("Holy shield");
388 holyShield.SetMenuIcon(&shieldIcon);
390 lightGuard.SetName("Light guard");
391 lightGuard.SetCost(128);
392 lightGuard.GetTargetingMode().TargetAllAllies(); // FIXME: actually only targets self
393 lightGuard.SetMagical();
394 holyShield.SetIkari(&lightGuard);
395 maxim.SetShield(&holyShield);
397 legendHelm.SetName("Legend helm");
398 legendHelm.SetMenuIcon(&helmetIcon);
400 boomerang.SetName("Boomerang");
401 boomerang.SetCost(164);
402 boomerang.GetTargetingMode().TargetAllAllies(); // FIXME: actually only targets self
403 boomerang.SetMagical();
404 legendHelm.SetIkari(&boomerang);
405 maxim.SetHelmet(&legendHelm);
407 sProRing.SetName("S-pro ring");
408 sProRing.SetMenuIcon(&ringIcon);
410 courage.SetName("Courage");
412 courage.GetTargetingMode().TargetMultipleAllies();
413 courage.SetMagical();
414 sProRing.SetIkari(&courage);
415 maxim.SetRing(&sProRing);
417 evilJewel.SetName("Evil jewel");
418 evilJewel.SetMenuIcon(&jewelIcon);
420 gloomy.SetName("Gloomy");
422 gloomy.GetTargetingMode().TargetAllEnemies();
424 evilJewel.SetIkari(&gloomy);
425 maxim.SetJewel(&evilJewel);
428 zircoWhip.SetName("Zirco whip");
429 zircoWhip.SetMenuIcon(&rodIcon);
431 thundershriek.SetName("Thundershriek");
432 thundershriek.SetCost(224);
433 thundershriek.GetTargetingMode().TargetAllEnemies();
434 thundershriek.SetPhysical();
435 zircoWhip.SetIkari(&thundershriek);
436 selan.SetWeapon(&zircoWhip);
438 zirconPlate.SetName("Zircon plate");
439 zirconPlate.SetMenuIcon(&armorIcon);
441 suddenCure.SetName("Sudden cure");
442 suddenCure.SetCost(96);
443 suddenCure.GetTargetingMode().TargetAllAllies();
444 suddenCure.SetMagical();
445 zirconPlate.SetIkari(&suddenCure);
446 selan.SetArmor(&zirconPlate);
448 zircoGloves.SetName("Zirco gloves");
449 zircoGloves.SetMenuIcon(&shieldIcon);
451 forcefield.SetName("Forcefield");
452 forcefield.SetCost(64);
453 forcefield.GetTargetingMode().TargetAllAllies();
454 forcefield.SetMagical();
455 zircoGloves.SetIkari(&forcefield);
456 selan.SetShield(&zircoGloves);
458 holyCap.SetName("Holy cap");
459 holyCap.SetMenuIcon(&helmetIcon);
461 vulnerable.SetName("Vulnerable");
462 vulnerable.SetCost(196);
463 vulnerable.GetTargetingMode().TargetAllEnemies();
464 vulnerable.SetPhysical();
465 holyCap.SetIkari(&vulnerable);
466 selan.SetHelmet(&holyCap);
468 ghostRing.SetName("Ghost ring");
469 ghostRing.SetMenuIcon(&ringIcon);
471 destroy.SetName("Destroy");
472 destroy.SetCost(128);
473 destroy.GetTargetingMode().TargetMultipleEnemies();
474 destroy.SetMagical();
475 ghostRing.SetIkari(&destroy);
476 selan.SetRing(&ghostRing);
478 eagleRock.SetName("Eagle rock");
479 eagleRock.SetMenuIcon(&jewelIcon);
481 dive.SetName("Dive");
483 dive.GetTargetingMode().TargetSingleEnemy();
485 eagleRock.SetIkari(&dive);
486 selan.SetJewel(&eagleRock);
489 zircoAx.SetName("Zirco ax");
490 zircoAx.SetMenuIcon(&axIcon);
492 torrent.SetName("Torrent");
493 torrent.SetCost(224);
494 torrent.GetTargetingMode().TargetAllEnemies();
495 torrent.SetPhysical();
496 zircoAx.SetIkari(&torrent);
497 guy.SetWeapon(&zircoAx);
498 guy.SetArmor(&zirconArmor);
500 megaShield.SetName("Mega shield");
501 megaShield.SetMenuIcon(&shieldIcon);
503 ironBarrier.SetName("Iron barrier");
504 ironBarrier.SetCost(255);
505 ironBarrier.GetTargetingMode().TargetAllAllies(); // FIXME: actually only targets self
506 ironBarrier.SetMagical();
507 megaShield.SetIkari(&ironBarrier);
508 guy.SetShield(&megaShield);
510 zircoHelmet.SetName("Zirco helmet");
511 zircoHelmet.SetMenuIcon(&helmetIcon);
513 slow.SetName("Slow");
515 slow.GetTargetingMode().TargetAllEnemies();
517 zircoHelmet.SetIkari(&slow);
518 guy.SetHelmet(&zircoHelmet);
520 powerRing.SetName("Power ring");
521 powerRing.SetMenuIcon(&ringIcon);
523 trick.SetName("Trick");
525 trick.GetTargetingMode().TargetAllEnemies();
527 zircoHelmet.SetIkari(&trick);
528 guy.SetRing(&powerRing);
529 guy.SetJewel(&evilJewel);
531 // NOTE: this is actually Artea equipment
533 lizardBlow.SetName("Lizard blow");
534 lizardBlow.SetMenuIcon(&swordIcon);
536 dragonRush.SetName("Dragon rush");
537 dragonRush.SetCost(164);
538 dragonRush.GetTargetingMode().TargetSingleEnemy();
539 dragonRush.SetPhysical();
540 lizardBlow.SetIkari(&dragonRush);
541 dekar.SetWeapon(&lizardBlow);
543 holyRobe.SetName("Holy robe");
544 holyRobe.SetMenuIcon(&armorIcon);
546 crisisCure.SetName("Crisis cure");
547 crisisCure.SetCost(164);
548 crisisCure.GetTargetingMode().TargetAllAllies();
549 crisisCure.SetMagical();
550 holyRobe.SetIkari(&crisisCure);
551 dekar.SetArmor(&holyRobe);
552 dekar.SetShield(&zircoGloves);
553 dekar.SetHelmet(&holyCap);
555 rocketRing.SetName("Rocket ring");
556 rocketRing.SetMenuIcon(&ringIcon);
558 fake.SetName("Fake");
560 fake.GetTargetingMode().TargetSingleAlly();
562 rocketRing.SetIkari(&fake);
563 dekar.SetRing(&rocketRing);
565 krakenRock.SetName("Kraken rock");
566 krakenRock.SetMenuIcon(&jewelIcon);
568 tenLegger.SetName("Ten-legger");
569 tenLegger.SetCost(164);
570 tenLegger.GetTargetingMode().TargetAllEnemies();
571 tenLegger.SetPhysical();
572 rocketRing.SetIkari(&tenLegger);
573 dekar.SetJewel(&krakenRock);
575 battleRes.ikariMenuHeadline = "Please choose equipment.";
576 battleRes.noEquipmentText = "No equip";
577 battleRes.ikariMenuPrototype = Menu<const Item *>(&normalFont, &disabledFont, &handCursorSprite, 12, 6, normalFont.CharHeight() / 2, normalFont.CharWidth(), 1, normalFont.CharWidth() * 2, 0, ':', 12, normalFont.CharWidth());
579 battleRes.escapeText = "Escapes.";
581 BattleState *battleState(new BattleState(bg, monstersLayout, heroesLayout, &battleRes));
582 battleState->AddMonster(monster);
583 battleState->AddMonster(monster);
584 battleState->AddMonster(monster);
585 battleState->AddMonster(monster);
586 battleState->AddHero(maxim);
587 battleState->AddHero(selan);
588 battleState->AddHero(guy);
589 battleState->AddHero(dekar);
590 Application app(&screen, battleState);
591 app.Buttons().MapKey(SDLK_w, Input::PAD_UP);
592 app.Buttons().MapKey(SDLK_d, Input::PAD_RIGHT);
593 app.Buttons().MapKey(SDLK_s, Input::PAD_DOWN);
594 app.Buttons().MapKey(SDLK_a, Input::PAD_LEFT);
595 app.Buttons().MapKey(SDLK_RIGHT, Input::ACTION_A);
596 app.Buttons().MapKey(SDLK_DOWN, Input::ACTION_B);
597 app.Buttons().MapKey(SDLK_UP, Input::ACTION_X);
598 app.Buttons().MapKey(SDLK_LEFT, Input::ACTION_Y);
599 app.Buttons().MapKey(SDLK_RETURN, Input::START);
600 app.Buttons().MapKey(SDLK_SPACE, Input::SELECT);
601 app.Buttons().MapKey(SDLK_RSHIFT, Input::SHOULDER_RIGHT);
602 app.Buttons().MapKey(SDLK_LSHIFT, Input::SHOULDER_LEFT);
606 } catch (exception &e) {
607 cerr << "exception in main(): " << e.what() << endl;