forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iuse_software_kitten.h
59 lines (51 loc) · 1.43 KB
/
iuse_software_kitten.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#ifndef CATA_SRC_IUSE_SOFTWARE_KITTEN_H
#define CATA_SRC_IUSE_SOFTWARE_KITTEN_H
#include <iosfwd>
#include <vector>
#include "color.h"
#include "cursesdef.h"
#include "point.h"
struct kobject {
point pos;
nc_color color;
uint8_t character = 0;
};
static constexpr int MAXMESSAGES = 1200;
class robot_finds_kitten
{
public:
bool ret = false;
robot_finds_kitten();
private:
void draw_robot() const;
void draw_kitten() const;
void show() const;
void process_input();
catacurses::window bkatwin;
catacurses::window w;
kobject robot;
kobject kitten;
kobject empty;
static constexpr int numbogus = 20;
kobject bogus[MAXMESSAGES];
std::vector<std::string> bogus_messages;
static constexpr int rfkLINES = 20;
static constexpr int rfkCOLS = 60;
int rfkscreen[rfkCOLS][rfkLINES];
int nummessages = 0;
enum class ui_state : int {
instructions,
main,
invalid_input,
bogus_message,
end_animation,
exit,
};
ui_state current_ui_state = ui_state::instructions;
std::string this_bogus_message;
int end_animation_frame = 0;
static constexpr int num_end_animation_frames = 6;
bool end_animation_last_input_left_or_up = false;
};
#endif // CATA_SRC_IUSE_SOFTWARE_KITTEN_H