Convertit "param" a variable global en lloc de anar marejant amb punterets i passant 8.000.000 de paràmetres

This commit is contained in:
2024-09-27 17:42:25 +02:00
parent c1bf0b8aed
commit 46b41757b2
28 changed files with 279 additions and 293 deletions

View File

@@ -1,19 +1,19 @@
#include "define_buttons.h"
#include "param.h"
// Constructor
DefineButtons::DefineButtons(Input *input, Text *text, param_t *param, options_t *options, section_t *section)
DefineButtons::DefineButtons(Input *input, Text *text, options_t *options, section_t *section)
{
// Copia punteros a los objetos
this->input = input;
this->text = text;
this->param = param;
this->options = options;
this->section = section;
// Inicializa variables
enabled = false;
x = param->game.width / 2;
y = param->title.pressStartPosition;
x = param.game.width / 2;
y = param.title.pressStartPosition;
indexController = 0;
indexButton = 0;