start refactor context states with kubo_state_wall_select
This commit is contained in:
parent
c2c99e73d2
commit
7e065745d2
13 changed files with 349 additions and 103 deletions
46
states/kubo_states.h
Normal file
46
states/kubo_states.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue