forked from msokalski/ascii-patrol
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inter.h
118 lines (84 loc) · 1.82 KB
/
inter.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#ifndef INTER_H
#define INTER_H
#include "game.h"
struct PERF
{
~PERF();
PERF(int _idx, const char* _name, int _val, int _minval, int _maxval, int _speed, int _bonus);
void Paint(SCREEN* s, int x, int y, int width);
int Animate(unsigned long t); // return progress value (from min to val)
SPRITE prgs;
SPRITE tick;
SPRITE line;
SPRITE horz; // not used by lineidx==1
SPRITE icon; // used only if unit==0
FNT fnt;
unsigned long time;
int pro;
int idx;
const char* name;
int minval, val, maxval;
int speed;
int bonus;
bool disabled;
int state; // 0-waiting, 1-animating, 2-done
};
struct DLG
{
~DLG();
DLG(const ASSET* _frame, int _tx, int _ty, unsigned char _cl, const char* _name, int _nx, int _ny, const ASSET* _avatar, unsigned long _mix, int _ax, int _ay, int _vx, int _vy);
void Start(const char* txt, unsigned long t);
bool Animate(unsigned long t);
void Finish();
void Clear();
void Paint(SCREEN* s, int x, int y, bool blend);
unsigned long start;
unsigned long time;
bool done;
int vox;
int vx,vy;
char* text;
int lines;
int chars;
unsigned char cl;
int tx,ty;
const char* name;
int nx,ny;
SPRITE frame;
SPRITE avatar;
unsigned long mix;
int ax,ay;
};
struct INTER_MODAL : MODAL
{
SCREEN* s;
int w,h;
const LEVEL* level;
PERF perf_clear;
PERF perf_time;
PERF perf_lives;
FNT fnt;
int dialog_idx;
int dialog_pos;
DLG dlg_player;
DLG dlg_commander;
DLG dlg_alien;
int interference;
int inter_gap;
int inter_pos;
unsigned long prev_t;
DLG* dlg[2];
SPRITE bkgnd;
int phase;
unsigned long phase_t;
int time;
int* score;
int bonus;
virtual ~INTER_MODAL();
INTER_MODAL(SCREEN* _s,
int _lives, int _startlives, int* _score,
const char* _course_name, const LEVEL* _current_level,
int _time, int _hitval, int _hitmax);
virtual int Run();
};
#endif