renomena tipus _t/_e a CamelCase (Circle, Color, Section, ...)
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "core/audio/audio.hpp" // for Audio
|
||||
#include "core/input/global_inputs.hpp" // for GlobalInputs::handle
|
||||
#include "core/input/input.h" // for inputs_e, Input, REPEAT_TRUE, REPEAT_FALSE
|
||||
#include "core/input/input.h" // for InputAction, Input, REPEAT_TRUE, REPEAT_FALSE
|
||||
#include "core/locale/lang.h" // for Lang
|
||||
#include "core/rendering/fade.h" // for Fade, FADE_CENTER
|
||||
#include "core/rendering/movingsprite.h" // for MovingSprite
|
||||
@@ -31,7 +31,7 @@
|
||||
struct JA_Sound_t;
|
||||
|
||||
// Constructor
|
||||
Game::Game(int numPlayers, int currentStage, SDL_Renderer *renderer, bool demo, section_t *section)
|
||||
Game::Game(int numPlayers, int currentStage, SDL_Renderer *renderer, bool demo, Section *section)
|
||||
: lastStageReached(currentStage) {
|
||||
// Copia los punteros
|
||||
this->renderer = renderer;
|
||||
@@ -502,10 +502,10 @@ auto Game::loadScoreFile() -> bool {
|
||||
auto Game::loadDemoFile() -> bool {
|
||||
// Lee los datos de la demo desde Resource (precargados al arrancar).
|
||||
const auto &bytes = Resource::get()->getDemoBytes();
|
||||
const size_t expected = sizeof(demoKeys_t) * TOTAL_DEMO_DATA;
|
||||
const size_t expected = sizeof(DemoKeys) * TOTAL_DEMO_DATA;
|
||||
if (bytes.size() >= expected) {
|
||||
for (int i = 0; i < TOTAL_DEMO_DATA; ++i) {
|
||||
memcpy(&demo.dataFile[i], bytes.data() + (i * sizeof(demoKeys_t)), sizeof(demoKeys_t));
|
||||
memcpy(&demo.dataFile[i], bytes.data() + (i * sizeof(DemoKeys)), sizeof(DemoKeys));
|
||||
}
|
||||
if (Options::settings.console) {
|
||||
std::cout << "Demo data loaded (" << bytes.size() << " bytes)" << '\n';
|
||||
@@ -564,7 +564,7 @@ auto Game::saveDemoFile() -> bool {
|
||||
if (file != nullptr) {
|
||||
// Guardamos los datos
|
||||
for (auto &i : demo.dataFile) {
|
||||
SDL_WriteIO(file, &i, sizeof(demoKeys_t));
|
||||
SDL_WriteIO(file, &i, sizeof(DemoKeys));
|
||||
}
|
||||
|
||||
if (Options::settings.console) {
|
||||
|
||||
Reference in New Issue
Block a user