En proceso de eliminar el online y los menus

This commit is contained in:
2024-05-10 14:04:50 +02:00
parent 5587b25e41
commit b5c04c6c26
11 changed files with 11 additions and 1236 deletions

View File

@@ -1,5 +1,4 @@
#include "hiscore_table.h"
#include "common/jscore.h"
#include <iostream>
const Uint8 SELF = 0;
@@ -109,41 +108,23 @@ void HiScoreTable::render()
// Escribe el texto: Mejores puntuaciones
text->writeDX(TXT_CENTER | TXT_COLOR | TXT_SHADOW, GAMECANVAS_CENTER_X, 8, lang->getText(42), 1, orangeColor, 1, shdwTxtColor);
// Escribe la lista de jugadores
int numUsers = jscore::getNumUsers();
for (int i = 0; i < numUsers; ++i)
// Rellena la lista con nombres
std::vector<std::string> names;
names.insert(names.end(), {"Bry", "Usufondo", "G.Lucas", "P.Delgat", "P.Arrabalera", "Pelechano", "Sahuquillo", "Bacteriol", "Pepe", "Rosita"});
for (int i = 0; i < 10; ++i)
{
const std::string userName = jscore::getUserName(i).substr(0, 17);
const int nameLenght = (int)userName.length();
const int nameLenght = names[i].length();
const int numDots = 20 - nameLenght;
std::string dots = "";
for (int j = 0; j < numDots; ++j)
{
dots = dots + ".";
}
const std::string line = userName + dots + scoreToString(jscore::getPoints(i));
const std::string line = names[i] + dots + "0000000";
text->writeDX(TXT_CENTER | TXT_SHADOW, GAMECANVAS_CENTER_X, (i * spaceBetweenLines) + spaceBetweenHeader, line, 1, orangeColor, 1, shdwTxtColor);
}
// Rellena la lista con otros nombres
if (numUsers < 10)
{
std::vector<std::string> names;
names.insert(names.end(), {"Bry", "Usufondo", "G.Lucas", "P.Delgat", "P.Arrabalera", "Pelechano", "Sahuquillo", "Bacteriol", "Pepe", "Rosita"});
for (int i = numUsers; i < 10; ++i)
{
const int nameLenght = names[i - numUsers].length();
const int numDots = 20 - nameLenght;
std::string dots = "";
for (int j = 0; j < numDots; ++j)
{
dots = dots + ".";
}
const std::string line = names[i - numUsers] + dots + "0000000";
text->writeDX(TXT_CENTER | TXT_SHADOW, GAMECANVAS_CENTER_X, (i * spaceBetweenLines) + spaceBetweenHeader, line, 1, orangeColor, 1, shdwTxtColor);
}
}
if ((mode == mhst_manual) && (counter % 50 > 14))
{