-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheaders.hpp
91 lines (75 loc) · 1.7 KB
/
headers.hpp
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
#ifndef MAUH_HEADERS
#define MAUH_HEADERS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <I86.h>
#include <dos.h>
#include <conio.h>
#include <malloc.h>
#include <time.h>
#include <stdarg.h>
class RC4 {
public:
RC4(char *seed, int len);
unsigned int rand();
unsigned char rand8();
private:
unsigned char state[256];
unsigned int x,y;
};
#define SEEDSIZE 32
char *init_rc4();
class VGA256Term {
public:
VGA256Term();
void draw_term();
void clear_screen(unsigned char color);
void printf_term(char *s, ...);
void printchar_term(char c);
void move_cursor_offset(unsigned int x, unsigned int y);
int get_int();
~VGA256Term();
private:
unsigned char far *video_buffer;
char term_buff[40][25];
char term_buff2[40][25];
int term_x, term_y;
void Set_Video_Mode(int mode);
void print_char(char c, int x1, int y1, char color, char bgcolor);
void set_color(int index, int red, int green, int blue);
void term_newline();
};
class Room {
public:
int ID;
Room *rooms[3];
bool hasAnkleBiters;
bool hasMaltego;
bool hasSupplies;
Room(int id);
void setRooms(Room *r1, Room *r2, Room *r3);
};
class Player {
public:
Room *location;
int arrows;
bool hasDied;
int supplies;
Player(Room *location);
void doActions();
};
class Muppet {
public:
Room *location;
bool hasDied;
int moveCounter;
Muppet(Room *location, RC4 *Rand);
void doActions();
void runAway();
private:
RC4 *Rand;
int prev_loc;
};
#endif