2 Copyright © 2004 Parallel Realities
3 Copyright © 2007-2008 Kővágó Zoltán <DirtY.iCE.hu@gmail.com>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 See the GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #include <boost/format.hpp>
26 #include "gettext.hpp"
27 #include "font/fontengine.hpp"
28 #include "console/console.hpp"
30 void createStatsPanel(int page
)
32 SDL_Surface
*image
= graphics
.getSprite("infoPanel", true)->image
[0];
34 graphics
.drawRect(1, 1, image
->w
- 2, image
->h
- 2, graphics
.black
, graphics
.white
, image
);
36 std::ostringstream oss
;
37 const unsigned char size
= font_manager
.GetOldSize(0);
39 unsigned short x1
= 80;
40 unsigned short x2
= 270;
41 unsigned short x3
= 300;
42 unsigned short y
= 25;
44 FontEngine::DrawLine("default", _("DirtY BLoB WaRs: statistics"), size
, 200, y
, "center_base", image
);
47 Sprite
*arrows
= graphics
.getSprite("HubArrows", true);
52 FontEngine::DrawLine("default", _("Skill Level:"), size
, x1
, y
+= 20, "begin_base", image
);
53 FontEngine::DrawLine("default", _(skill
[game
.skill
]), size
, x2
, y
, "begin_base", image
);
55 FontEngine::DrawLine("default", _("Score:"), size
, x1
, y
+= 20, "begin_base", image
);
56 FontEngine::DrawLine("default", (oss
<< game
.score
, oss
.str()), size
, x2
, y
, "begin_base", image
);
59 FontEngine::DrawLine("default", _("MIAs saved:"), font_manager
.GetOldSize(0), x1
, y
+= 20, "begin_base", image
);
60 FontEngine::DrawLine("default", (oss
<< game
.totalMIAsRescued
, oss
.str()), size
, x2
, y
, "begin_base", image
);
63 FontEngine::DrawLine("default", _("Objectives completed:"), size
, x1
, y
+= 20, "begin_base", image
);
64 FontEngine::DrawLine("default", (oss
<< game
.totalObjectivesCompleted
, oss
.str()), size
, x2
, y
, "begin_base", image
);
67 // Don't do this on Extreme or it will always say 100%
70 FontEngine::DrawLine("default", _("Percentage complete:"), size
, x1
, y
+= 20, "begin_base", image
);
71 FontEngine::DrawLine("default", (oss
<< gameData
.getPercentageComplete() << "%", oss
.str()), size
, x2
, y
, "begin_base", image
);
74 FontEngine::DrawLine("default", boost::str(boost::format(_("Total game time: %02d:%02d:%02d")) % game
.totalHours
% game
.totalMinutes
% game
.totalSeconds
),
75 size
, 200, y
+= 110, "center_base", image
);
80 FontEngine::DrawLine("default", _("Enemies defeated:"), size
, x1
, y
+= 20, "begin_base", image
);
81 FontEngine::DrawLine("default", (oss
<< game
.totalEnemiesDefeated
, oss
.str()), size
, x2
, y
, "begin_base", image
);
84 FontEngine::DrawLine("default", _("Items collected:"), size
, x1
, y
+= 20, "begin_base", image
);
85 FontEngine::DrawLine("default", (oss
<< game
.totalItemsCollected
, oss
.str()), size
, x2
, y
, "begin_base", image
);
88 FontEngine::DrawLine("default", _("Bonuses picked up:"), size
, x1
, y
+= 20, "begin_base", image
);
89 FontEngine::DrawLine("default", (oss
<< game
.totalBonusesCollected
, oss
.str()), size
, x2
, y
, "begin_base", image
);
92 FontEngine::DrawLine("default", _("Best combo:"), size
, x1
, y
+= 20, "begin_base", image
);
93 FontEngine::DrawLine("default", boost::str(boost::format(_("%1% hit", "%1% hits", game
.maxComboHits
)) % (int) game
.maxComboHits
), size
, x2
, y
, "begin_base", image
);
95 FontEngine::DrawLine("default", _("Missions started:"), size
, x1
, y
+= 20, "begin_base", image
);
96 FontEngine::DrawLine("default", (oss
<< game
.levelsStarted
, oss
.str()), size
, x2
, y
, "begin_base", image
);
99 FontEngine::DrawLine("default", _("Continues used:"), size
, x1
, y
+= 20, "begin_base", image
);
100 FontEngine::DrawLine("default", (oss
<< game
.continuesUsed
, oss
.str()), size
, x2
, y
, "begin_base", image
);
103 if ((game
.continuesUsed
> 0) && (game
.levelsStarted
> 0))
105 FontEngine::DrawLine("default", _("Average continue usage:"), size
, x1
, y
+= 20, "begin_base", image
);
106 FontEngine::DrawLine("default", (oss
<< (game
.continuesUsed
/ game
.levelsStarted
), oss
.str()), size
, x2
, y
, "begin_base", image
);
110 FontEngine::DrawLine("default", _("Escapes used:"), size
, x1
, y
+= 20, "begin_base", image
);
111 FontEngine::DrawLine("default", (oss
<< game
.escapes
, oss
.str()), size
, x2
, y
, "begin_base", image
);
121 FontEngine::DrawLine("default", _("Weapon"), size
, x1
, y
+= 20, "begin_base", image
);
122 FontEngine::DrawLine("default", _("Ammo used"), size
, x2
, y
, "begin_base", image
);
123 FontEngine::DrawLine("default", _("Accuracy"), size
, x3
, y
, "begin_base", image
);
125 typedef std::pair
<std::string
, int> WeaponPair
;
126 std::vector
<WeaponPair
> weapons
;
127 weapons
.push_back(WeaponPair(_("Pistol"), WP_PISTOL
));
128 weapons
.push_back(WeaponPair(_("Machine gun"), WP_MACHINEGUN
));
129 weapons
.push_back(WeaponPair(_("Laser cannon"), WP_LASER
));
130 weapons
.push_back(WeaponPair(_("Grenades"), WP_GRENADES
));
131 weapons
.push_back(WeaponPair(_("Spread gun"), WP_SPREAD
));
135 for (std::vector
<WeaponPair
>::iterator iter
= weapons
.begin(); iter
!= weapons
.end(); iter
++)
137 FontEngine::DrawLine("default", iter
->first
, size
, x1
, y
+= 20, "begin_base", image
);
138 FontEngine::DrawLine("default", (oss
<< game
.bulletsFired
[iter
->second
], oss
.str()), size
, x2
, y
, "begin_base", image
);
140 FontEngine::DrawLine("default", (oss
<< game
.getWeaponAccuracy(iter
->second
) << "%", oss
.str()), size
, x3
, y
, "begin_base", image
);
145 FontEngine::DrawLine("default", _("Total"), size
, x1
, y
+= 30, "begin_base", image
);
146 FontEngine::DrawLine("default", (oss
<< game
.getTotalBulletsFired(), oss
.str()), size
, x2
, y
, "begin_base", image
);
148 FontEngine::DrawLine("default", (oss
<< game
.getTotalAccuracy() << "%", oss
.str()), size
, x3
, y
, "begin_base", image
);
151 FontEngine::DrawLine("default", _("Most used weapon"), size
, x1
, y
+= 50, "begin_base", image
);
152 FontEngine::DrawLine("default", _(weapon
[game
.getMostUsedWeapon()].name
), size
, x2
, y
, "begin_base", image
);
157 graphics
.blit(arrows
->image
[0], 150, 260, image
, false);
158 graphics
.blit(arrows
->image
[2], 200, 260, image
, false);
161 graphics
.blit(arrows
->image
[1], 150, 260, image
, false);
164 graphics
.blit(arrows
->image
[3], 200, 260, image
, false);
167 void loadLevelBrief(char *levelName
)
169 char briefLine
[1024];
171 if (!engine
.loadData("data/levelBrief"))
173 graphics
.showErrorAndExit(_("Couldn't load mission briefing file (%s)"), "data/levelBrief");
176 char *line
= strtok((char*)engine
.dataBuffer
, "\n");
177 bool collectData
= false;
178 Video::PointSurface image
= graphics
.getSprite("infoPanel", true)->image
[0];
182 //graphics.clearChatString();
189 sscanf(line
, "%[^\n\r]", briefLine
);
191 if (strcmp(briefLine
, "@EOF@") == 0)
197 //graphics.createChatString(line);
205 sscanf(line
, "%*c %[^]]", briefLine
);
206 if (strcmp(briefLine
, levelName
) == 0)
211 line
= strtok(NULL
, "\n");
222 //graphics.drawChatString(image, 40);
223 debug
<< "Level brief is: " << text
<< std::endl
;
224 Video::PointSurface
rend_text(FontEngine::Renderer::RenderText(font_manager
.GetFont("default"), text
, font_manager
.GetOldSize(0), 380));
225 image
.BlitInto(Video::Point(10, 40), rend_text
, rend_text
["begin_base"]);
228 void createObjectivesPanel(char *levelName
)
230 SDL_Surface
*image
= graphics
.getSprite("infoPanel", true)->image
[0];
232 Data
*data
= (Data
*)gameData
.dataList
.getHead();
236 graphics
.drawRect(1, 1, image
->w
- 2, image
->h
- 2, graphics
.black
, graphics
.white
, image
);
239 char levelMIAKey
[100];
244 sprintf(levelMIAKey
, _("%s MIAs").c_str(), levelName
);
246 graphics
.setFontColor(0xff, 0xff, 0xff, 0x00, 0x00, 0x00);
248 //sprintf(string, _("Information for %s").c_str(), _(levelName).c_str());
249 //graphics.drawString(string, 200, y, true, image);
250 FontEngine::DrawLine("default", boost::str(boost::format(_("Information for '%1%'")) % _(levelName
)), font_manager
.GetOldSize(0), 200, y
, "center_base", image
);
253 while (data
->next
!= NULL
)
255 data
= (Data
*)data
->next
;
257 if ((strcmp(data
->key
, levelName
) == 0) || (strstr(data
->key
, levelMIAKey
)))
261 if (strstr(data
->key
, "MIAs"))
263 // if it says 0 / 0 don't bother...
264 if (strcmp(data
->value
, "0 / 0"))
266 graphics
.drawString(_("MIAs Rescued"), x1
, y
+= 20, false, image
);
267 sprintf(string
, "%d / %d", data
->current
, data
->target
);
268 (data
->isComplete()) ? graphics
.setFontColor(0x00, 0xff, 0x00, 0x00, 0x00, 0x00) : graphics
.setFontColor(0xff, 0x00, 0x00, 0x00, 0x00, 0x00);
269 graphics
.drawString(string
, x2
, y
, false, image
);
272 else if (!strstr(data
->value
, "MIA_"))
274 if ((game
.skill
< 3) && (strstr(data
->value
, "L.R.T.S.")) && (!gameData
.completedWorld
))
276 graphics
.drawString("???? ???????? ????", x1
, y
+= 20, false, image
);
280 strcpy(string
, data
->value
);
282 if (strlen(string
) >= 25)
285 // don't break unicode characters
286 while (((string
[cut_char
] >> 6) & 3) == 2)
291 string
[cut_char
++] = '.';
292 string
[cut_char
++] = '.';
293 string
[cut_char
++] = '.';
294 string
[cut_char
] = '\0';
297 graphics
.drawString(string
, x1
, y
+= 20, false, image
);
300 if (data
->target
== 1)
302 sprintf(string
, "%s", (data
->isComplete()) ? _("Completed").c_str() : _("Incomplete").c_str());
306 sprintf(string
, "%d / %d", data
->current
, data
->target
);
309 (data
->isComplete()) ? graphics
.setFontColor(0x00, 0xff, 0x00, 0x00, 0x00, 0x00) : graphics
.setFontColor(0xff, 0x00, 0x00, 0x00, 0x00, 0x00);
310 graphics
.drawString(string
, x2
, y
, false, image
);
314 graphics
.setFontColor(0xff, 0xff, 0xff, 0x00, 0x00, 0x00);
318 loadLevelBrief(levelName
);
321 void createMIAPanel(int start
, int max
)
333 SDL_Surface
*image
= graphics
.getSprite("infoPanel", true)->image
[0];
335 Data
*data
= (Data
*)gameData
.dataList
.getHead();
337 graphics
.drawRect(1, 1, image
->w
- 2, image
->h
- 2, graphics
.black
, graphics
.white
, image
);
339 graphics
.setFontColor(0xff, 0xff, 0xff, 0x00, 0x00, 0x00);
341 graphics
.drawString(_("MIA Statistics"), 200, y
, true, image
);
343 graphics
.drawString(_("Name"), x1
, y
+= 20, false, image
);
344 graphics
.drawString(_("Location"), x2
, y
, false, image
);
345 graphics
.drawString(_("Status"), x3
, y
, false, image
);
349 while (data
->next
!= NULL
)
351 data
= (Data
*)data
->next
;
353 if (strstr(data
->value
, "MIA_"))
361 sprintf(name
, "%s", data
->value
);
364 sprintf(string
, "%s", strtok(NULL
, "_"));
365 graphics
.drawString(string
, x1
, y
+= 20, false, image
);
367 graphics
.drawString(data
->key
, x2
, y
, false, image
);
369 if (data
->isComplete())
371 sprintf(string
, "%s", _("Found").c_str());
372 graphics
.setFontColor(0x00, 0xff, 0x00, 0x00, 0x00, 0x00);
376 sprintf(string
, "%s", _("Missing").c_str());
377 graphics
.setFontColor(0xff, 0x00, 0x00, 0x00, 0x00, 0x00);
380 graphics
.drawString(string
, x3
, y
, false, image
);
382 graphics
.setFontColor(0xff, 0xff, 0xff, 0x00, 0x00, 0x00);
391 Sprite
*arrows
= graphics
.getSprite("HubArrows", true);
394 graphics
.blit(arrows
->image
[0], 150, 260, image
, false);
396 graphics
.blit(arrows
->image
[1], 150, 260, image
, false);
398 if ((end
== 9) && (current
+ 9 < max
))
399 graphics
.blit(arrows
->image
[2], 200, 260, image
, false);
401 graphics
.blit(arrows
->image
[3], 200, 260, image
, false);
404 bool requirementMet(char *requiredLevel
)
406 if (engine
.cheatLevels
)
411 if (strcmp(requiredLevel
, "@none@") == 0)
416 if (strstr(requiredLevel
, "Stages"))
419 sscanf(requiredLevel
, "%*s %d", &stages
);
421 if (game
.stagesCleared
>= stages
)
427 return gameData
.requiredLevelCleared(requiredLevel
);
432 SDL_FillRect(graphics
.screen
, NULL
, graphics
.black
);
433 graphics
.delay(1000);
438 graphics
.loadBackground("gfx/main/worldmap.png", false);
439 audio
.loadMusic("music/forAFriend.mod");
441 graphics
.quickSprite("cheatHeader", graphics
.loadImage("gfx/main/cheats.png"));
442 graphics
.quickSprite("optionsHeader", graphics
.loadImage("gfx/main/options.png"));
443 graphics
.quickSprite("keyHeader", graphics
.loadImage("gfx/main/keyConfig.png"));
444 graphics
.quickSprite("joystickHeader", graphics
.loadImage("gfx/main/joystickConfig.png"));
445 graphics
.quickSprite("optionsBackground", graphics
.loadImage("gfx/main/optionsBackground.png"));
449 Sprite
*cursor
= graphics
.addSprite("Cursor");
450 for (int i
= 0 ; i
< 6 ; i
++)
452 sprintf(string
, "gfx/main/cursor%d.png", i
+ 1);
453 cursor
->setFrame(i
, graphics
.loadImage(string
), 10);
456 Sprite
*newTarget
= graphics
.addSprite("NewTarget");
457 Sprite
*visitedTarget
= graphics
.addSprite("VisitedTarget");
459 for (int i
= 0 ; i
< 5 ; i
++)
461 sprintf(string
, "gfx/sprites/miaSignal%d.png", i
+ 1);
463 newTarget
->setFrame(i
, graphics
.loadImage(string
, -60, 0, 0), 15);
464 visitedTarget
->setFrame(i
, graphics
.loadImage(string
, 0, 0, 0), 15);
467 Sprite
*hubIcons
= graphics
.addSprite("HubIcons");
468 for (int i
= 0 ; i
< 6 ; i
++)
470 sprintf(string
, "gfx/main/hubIcon%d.png", i
+ 1);
471 hubIcons
->setFrame(i
, graphics
.loadImage(string
), 60);
474 SDL_Surface
*infoPanel
= graphics
.quickSprite("infoPanel", graphics
.createSurface(400, 300));
476 Sprite
*hubArrows
= graphics
.addSprite("HubArrows");
477 hubArrows
->setFrame(0, graphics
.loadImage("gfx/main/hubArrowLeft.png"), 60);
478 hubArrows
->setFrame(1, graphics
.loadImage("gfx/main/hubArrowLeft2.png"), 60);
479 hubArrows
->setFrame(2, graphics
.loadImage("gfx/main/hubArrowRight.png"), 60);
480 hubArrows
->setFrame(3, graphics
.loadImage("gfx/main/hubArrowRight2.png"), 60);
485 engine
.loadData("data/hub");
487 char *line
= strtok((char*)engine
.dataBuffer
, "\n");
489 char name
[50], level
[50], requiredLevel
[50];
494 graphics
.setFontSize(0);
495 graphics
.setFontColor(0xff, 0xff, 0xff, 0x00, 0x00, 0x00);
497 int numberOfHubs
= 0;
499 gameData
.calculateWorldCompleted();
503 sscanf(line
, "%*c %[^\"] %*c %*c %[^\"] %*c %d %d %*c %[^\"] %*c", name
, level
, &x
, &y
, requiredLevel
);
505 if (strcmp(name
, "@EOF@") == 0)
510 // don't show boss levels on Easy (they might be cheating!)
513 if (strstr(name
, "BioMech"))
515 line
= strtok(NULL
, "\n");
520 if (requirementMet(requiredLevel
))
522 if (!gameData
.levelPrefectlyCleared(name
))
524 hubPoint
= new HubLevel
;
525 hubPoint
->set(name
, level
, x
, y
);
526 hubPoint
->levelNameImage
= graphics
.getString(_(name
), false);
528 (!gameData
.stagePreviouslyCleared(name
)) ? hubPoint
->target
= newTarget
: hubPoint
->target
= visitedTarget
;
530 hubList
.add(hubPoint
);
535 line
= strtok(NULL
, "\n");
540 strcpy(level
, "@none@");
541 strcpy(game
.stageName
, "@none@");
543 bool showData
= false;
544 bool showStats
= false;
545 bool showMIAs
= false;
553 Data
*data
= (Data
*)gameData
.dataList
.getHead();
555 while (data
->next
!= NULL
)
557 data
= (Data
*)data
->next
;
559 if (strstr(data
->value
, "MIA_"))
565 bool validStage
= false;
567 if ((numberOfHubs
== 0) && (gameData
.completedWorld
))
569 game
.setMapName("data/spaceStation");
570 strcpy(game
.stageName
, "Space Station");
571 createObjectivesPanel("Space Station");
573 showStats
= showMIAs
= false;
576 // Wait wait wait... we're in easy mode. Game ends here.
580 return SECTION_EASYOVER
;
587 Uint32 frameLimit
= SDL_GetTicks() + 16;
594 graphics
.updateScreen();
595 graphics
.drawBackground();
596 graphics
.animateSprites();
600 graphics
.drawRect(bx
+ 10, by
+ 400, 620, 20, graphics
.black
, graphics
.white
, graphics
.screen
);
601 graphics
.drawString(_("Selected Destination") + " : " + _(game
.stageName
), bx
+ 320, by
+ 409, true, graphics
.screen
);
604 graphics
.drawRect(bx
+ 10, by
+ 430, 620, 40, graphics
.black
, graphics
.white
, graphics
.screen
);
607 sprintf(pos
, "%.3d:%.3d", engine
.getMouseX(), engine
.getMouseY());
608 graphics
.drawString(pos
, bx
+ 320, by
+ 15, true, graphics
.screen
);
612 mouseXDelta
= engine
.getJoyX(8);
613 mouseYDelta
= engine
.getJoyY(8);
615 if (engine
.isKey(KEY_RIGHT
))
620 if (engine
.isKey(KEY_LEFT
))
625 if (engine
.keyState
[SDLK_DOWN
])
630 if (engine
.keyState
[SDLK_UP
])
635 if ((mouseXDelta
!= 0) || (mouseYDelta
!= 0))
637 engine
.setMouse(engine
.getMouseX() + (int)mouseXDelta
, engine
.getMouseY() + (int)mouseYDelta
);
640 hubPoint
= (HubLevel
*)hubList
.getHead();
642 // Collisions for Hub Points
643 while (hubPoint
->next
!= NULL
)
645 hubPoint
= (HubLevel
*)hubPoint
->next
;
647 graphics
.blit(hubPoint
->target
->getCurrentFrame(), bx
+ hubPoint
->x
, by
+ hubPoint
->y
, graphics
.screen
, false);
649 if (Collision::collision(engine
.getMouseX(), engine
.getMouseY(), 1, 1, bx
+ hubPoint
->x
, by
+ hubPoint
->y
, 16, 16))
651 labelX
= engine
.getMouseX();
652 labelY
= engine
.getMouseY() - 20;
654 labelWidth
= hubPoint
->levelNameImage
->w
/ 2;
656 Math::limitInt(&labelX
, bx
+ 10 + labelWidth
, bx
+ 630 - labelWidth
);
658 graphics
.blit(hubPoint
->levelNameImage
, labelX
, labelY
, graphics
.screen
, true);
660 if (engine
.mouseLeft
|| engine
.isKey(KEY_FIRE
))
662 game
.setMapName(hubPoint
->filename
);
663 game
.setStageName(hubPoint
->stageName
);
665 engine
.mouseLeft
= 0;
666 engine
.clearKey(KEY_FIRE
);
669 if (engine
.mouseRight
|| engine
.isKey(KEY_MAP
))
671 game
.setMapName(hubPoint
->filename
);
672 game
.setStageName(hubPoint
->stageName
);
673 createObjectivesPanel(game
.stageName
);
676 engine
.mouseRight
= 0;
677 engine
.clearKey(KEY_MAP
);
682 // Collisions for Panel
683 for (int i
= ((1 - validStage
) * 2) ; i
< 6 ; i
++)
685 graphics
.blit(hubIcons
->image
[i
], bx
+ 50 + (i
* 100), by
+ 440, graphics
.screen
, false);
686 if (Collision::collision(engine
.getMouseX(), engine
.getMouseY(), 1, 1, bx
+ 50 + (i
* 100), by
+ 440, hubIcons
->image
[i
]->w
, hubIcons
->image
[i
]->h
))
688 if (engine
.mouseLeft
|| engine
.isKey(KEY_FIRE
))
696 createObjectivesPanel(game
.stageName
);
697 showData
= !showData
;
698 showStats
= showMIAs
= false;
701 createMIAPanel(miaStart
, miaMax
);
702 showStats
= showData
= false;
703 showMIAs
= !showMIAs
;
706 createStatsPanel(page
);
707 showStats
= !showStats
;
708 showData
= showMIAs
= false;
712 graphics
.setFontSize(0);
713 graphics
.setFontColor(0xff, 0xff, 0xff, 0x00, 0x00, 0x00);
720 engine
.mouseLeft
= false;
721 engine
.keyState
[SDLK_LCTRL
] = 0;
726 // Collisions for Panel Buttons
727 if ((showMIAs
) || (showStats
))
729 // SDLK_LCTRL is the "fire" button.
730 if (engine
.mouseLeft
|| engine
.isKey(KEY_FIRE
))
732 if (Collision::collision(engine
.getMouseX(), engine
.getMouseY(), 1, 1, bx
+ 270, by
+ 310, 32, 32))
738 Math::limitInt(&(miaStart
-= 9), 0, miaMax
);
739 createMIAPanel(miaStart
, miaMax
);
745 Math::limitInt(&(--page
), 0, 2);
746 createStatsPanel(page
);
749 engine
.mouseLeft
= 0;
750 engine
.clearKey(KEY_FIRE
);
754 if (Collision::collision(engine
.getMouseX(), engine
.getMouseY(), 1, 1, bx
+ 320, by
+ 310, 32, 32))
758 if (miaStart
+ 9 < miaMax
)
760 Math::limitInt(&(miaStart
+= 9), 0, miaMax
);
761 createMIAPanel(miaStart
, miaMax
);
767 Math::limitInt(&(++page
), 0, 2);
768 createStatsPanel(page
);
771 engine
.mouseLeft
= 0;
772 engine
.clearKey(KEY_FIRE
);
777 if ((showData
) || (showStats
) || (showMIAs
))
779 graphics
.blit(infoPanel
, bx
+ 320, by
+ 200, graphics
.screen
, true);
780 if (engine
.mouseLeft
|| engine
.isKey(KEY_FIRE
))
782 showData
= showStats
= showMIAs
= false;
786 graphics
.blit(cursor
->getCurrentFrame(), engine
.getMouseX(), engine
.getMouseY(), graphics
.screen
, true);
788 engine
.delay(frameLimit
);
789 frameLimit
= SDL_GetTicks() + 16;