annotate libadventure/adventure/state/panic.h @ 162:629f55f3961e

core: rework states
author David Demelier <markand@malikania.fr>
date Sun, 18 Oct 2020 12:01:59 +0200
parents libadventure/adventure/panic_state.h@c3a40062acc2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
89
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
1 /*
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 * panic_state.h -- panic state
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 *
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 * Copyright (c) 2020 David Demelier <markand@malikania.fr>
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 *
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 * Permission to use, copy, modify, and/or distribute this software for any
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 * purpose with or without fee is hereby granted, provided that the above
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 * copyright notice and this permission notice appear in all copies.
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 *
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
17 */
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
18
162
629f55f3961e core: rework states
David Demelier <markand@malikania.fr>
parents: 156
diff changeset
19 #ifndef MOLKO_STATE_PANIC_H
629f55f3961e core: rework states
David Demelier <markand@malikania.fr>
parents: 156
diff changeset
20 #define MOLKO_STATE_PANIC_H
89
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
21
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 /**
162
629f55f3961e core: rework states
David Demelier <markand@malikania.fr>
parents: 156
diff changeset
23 * \file panic.h
89
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
24 * \brief Panic state.
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 */
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
26
162
629f55f3961e core: rework states
David Demelier <markand@malikania.fr>
parents: 156
diff changeset
27 struct state;
89
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
28
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 /**
162
629f55f3961e core: rework states
David Demelier <markand@malikania.fr>
parents: 156
diff changeset
30 * Create a state in case of panic.
89
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
31 *
162
629f55f3961e core: rework states
David Demelier <markand@malikania.fr>
parents: 156
diff changeset
32 * \pre state != NULL
629f55f3961e core: rework states
David Demelier <markand@malikania.fr>
parents: 156
diff changeset
33 * \param state the state to initialize
89
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
34 */
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 void
162
629f55f3961e core: rework states
David Demelier <markand@malikania.fr>
parents: 156
diff changeset
36 panic_state(struct state *state);
89
30baadb6f6a2 core: add a panic_state in the adventure, continue #2484 @2h
David Demelier <markand@malikania.fr>
parents:
diff changeset
37
162
629f55f3961e core: rework states
David Demelier <markand@malikania.fr>
parents: 156
diff changeset
38 #endif /* !MOLKO_STATE_PANIC_H */