kubo/states/kubo_states.h

46 lines
1.4 KiB
C

/*
* Copyright Luka Jankovic 2025
*
* This file is part of Kubo.
*
* Kubo is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* Kubo is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* Kubo. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef KUBO_STATES_H
#define KUBO_STATES_H
#include "kubo_state_command.h"
#include "kubo_state_normal.h"
#include "kubo_state_wall_select.h"
enum kubo_context_state {
KUBO_CONTEXT_NORMAL,
KUBO_CONTEXT_COMMAND,
KUBO_CONTEXT_WALL_NEW,
KUBO_CONTEXT_WALL_SELECT,
};
struct kubo_state_list_entry {
enum kubo_context_state id;
struct kubo_state_data data;
};
static const struct kubo_state_list_entry kubo_state_data[] = {
{KUBO_CONTEXT_NORMAL, kubo_state_normal_data},
{KUBO_CONTEXT_COMMAND, kubo_state_command_data},
{KUBO_CONTEXT_WALL_SELECT, kubo_state_wall_select_data}};
static const unsigned kubo_state_data_length =
sizeof(kubo_state_data) / sizeof(kubo_state_data[0]);
#endif