forked from cataclysmbnteam/Cataclysm-BN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iuse_software_kitten.h
61 lines (52 loc) · 1.44 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
60
61
#pragma once
#ifndef CATA_SRC_IUSE_SOFTWARE_KITTEN_H
#define CATA_SRC_IUSE_SOFTWARE_KITTEN_H
#include <string>
#include "color.h"
#include "cursesdef.h"
#include "point.h"
class ui_adaptor;
struct kobject {
point pos;
nc_color color;
int character;
};
static constexpr int MAXMESSAGES = 1200;
class robot_finds_kitten
{
public:
bool ret;
robot_finds_kitten();
private:
std::string getmessage( int idx ) const;
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];
static constexpr int rfkLINES = 20;
static constexpr int rfkCOLS = 60;
int rfkscreen[rfkCOLS][rfkLINES];
int nummessages;
int bogus_messages[MAXMESSAGES];
enum class ui_state {
instructions,
main,
invalid_input,
bogus_message,
end_animation,
exit,
};
ui_state current_ui_state = ui_state::instructions;
int bogus_message_idx = 0;
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