-
Notifications
You must be signed in to change notification settings - Fork 1
/
LADEN.C
75 lines (72 loc) · 1.78 KB
/
LADEN.C
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
/*
Name: Laden.c
Author: Eldar E.
Description: It's a tamagoochi, only this time the creature is bin laden
Date: 9/9/2002 (DD/MM/YYYY)
Copyright: Eldar E.
*/
#include <stdio.h>
#include <alloc.h>
#include "laden\\headers\\VGAgraph.c"
#include "laden\\headers\\fonts.c"
#include "laden\\headers\\TheTime.c"
#include "laden\\headers\\bmp.c"
#include "laden\\headers\\mouse.c"
#include "laden\\l_funcs.c"
main()
{
struct pos mnow, mlast;
int button, i;
SetMode(0x0013);
init();
for (;;)
{
if ((button = MouseStatus(&mnow.x, &mnow.y, 1))==1)
{
if (check_button(0, mnow)) {
save_status();
break;
}
else
for (i=1; i<5; ++i)
if (((status[2])||(i==4))&&(check_button(i, mnow))) {
button = run_bar(i, &mnow, &mlast, vpage);
break;
}
}
else if (button==2) {
mouseOn = !mouseOn;
total_delay(3);
button = -1;
}
else button = dec_food(vpage);
if (check_death(&mnow, &mlast, vpage))
button = -1;
else
{
if ((mnow.x<SX_MAX/2)&&(mnow.y<SY_MAX/2)&&(eye_status != -1)) {
eye_status = -1;
button = -1;
}
else if ((mnow.x>SX_MAX/2)&&(mnow.y<SY_MAX/2)&&(eye_status != 0)) {
eye_status = 0;
button = -1;
}
else if ((mnow.x>SX_MAX/2)&&(mnow.y>SY_MAX/2)&&(eye_status != 1)) {
eye_status = 1;
button = -1;
}
else if ((mnow.x<SX_MAX/2)&&(mnow.y>SY_MAX/2)&&(eye_status != 2)) {
eye_status = 2;
button = -1;
}
if (button==-1)
Ani_laden(eye_status, vpage);
}
draw_mouse(mnow, &mlast, button, vpage);
}
SetMode(0x0003);
CloseBMP(table);
free(vpage);
}