Añadida la unidad service.h
This commit is contained in:
29
source/service.cpp
Normal file
29
source/service.cpp
Normal file
@@ -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;
|
||||
}
|
||||
15
source/service.h
Normal file
15
source/service.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#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);
|
||||
Reference in New Issue
Block a user