diff --git a/source/service.cpp b/source/service.cpp new file mode 100644 index 0000000..dd8ae34 --- /dev/null +++ b/source/service.cpp @@ -0,0 +1,29 @@ +#include "service.h" + +int checkServiceButton(Input *input) +{ + if (input->checkInput(input_service)) + { + if (input->checkInput(input_start)) + { + return SERVICE_EXIT; + } + + else if (input->checkInput(input_fire_left)) + { + return SERVICE_CONFIG; + } + + else if (input->checkInput(input_fire_center)) + { + return SERVICE_SHADERS; + } + + else if (input->checkInput(input_fire_right)) + { + return SERVICE_PAUSE; + } + } + + return SERVICE_NULL; +} \ No newline at end of file diff --git a/source/service.h b/source/service.h new file mode 100644 index 0000000..754e99d --- /dev/null +++ b/source/service.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include "common/utils.h" +#include "common/input.h" +#include "const.h" + +#define SERVICE_NULL 0 +#define SERVICE_EXIT 1 +#define SERVICE_CONFIG 2 +#define SERVICE_SHADERS 3 +#define SERVICE_PAUSE 4 + +// Comprueba el botón de servicio +int checkServiceButton(Input *input); \ No newline at end of file