-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgourav.h
60 lines (51 loc) · 860 Bytes
/
gourav.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
#ifndef GOURAV_H_
#define GOURAV_H_
#include <iostream.h>
#include <graphics.h>
#include <fstream.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <ctype.h>
#include <math.h>
#include <dos.h>
#include <dir.h>
#define port 0x33
int mbutton, mx, my;
union REGS mi, mo;
_mouse_init()
{
mi.x.ax = 0;
int86(0x33, &mi, &mo);
return (mo.x.ax);
}
_mouse_show()
{
mi.x.ax = 1;
int86(0x33, &mi, &mo);
return 0;
}
_mouse_hide()
{
mi.x.ax = 2;
int86(0x33, &mi, &mo);
return 0;
}
_mouse_getmousepos(int *mbutton, int *mx, int *my)
{
mi.x.ax = 3;
int86(0x33, &mi, &mo);
*mbutton = mo.x.bx;
*mx = mo.x.cx;
*my = mo.x.dx;
return 0;
}
void _graphics_init()
{
int gd = DETECT, gm = 0;
initgraph(&gd, &gm, "d:\\tc\\bgi");
settextjustify(HORIZ_DIR, CENTER_TEXT);
settextjustify(VERT_DIR, CENTER_TEXT);
}
#endif