-
Notifications
You must be signed in to change notification settings - Fork 2
/
events.c
executable file
·61 lines (51 loc) · 875 Bytes
/
events.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
/*
** Events handling functions.
**
*/
#include "includes.h"
#include "globals.h"
void Events(void)
{
ULONG wait = 0,
bufsig = (1L << buffPort->mp_SigBit),
winsig = (1L << winPort->mp_SigBit);
ULONG done = FALSE;
do
{
if ( wait & SIGBREAKF_CTRL_C )
{
done = TRUE;
}
if ( wait & winsig )
{
done = controlIDCMP();
}
if ( wait & bufsig )
{
struct Message *dbmsg;
while (( dbmsg = IExec->GetMsg( buffPort ) ))
{
handleDBufMessage( dbmsg );
}
}
if(!done)
{
ULONG held_off = 0;
held_off = DrawGrid();
Displacement();
if(steps >20 && camera.z >=0.99)
{
if(pantalla.scr) IIntuition->ScreenToFront(pantalla.scr);
done = TRUE;
}
if ( held_off )
{
IGraphics->WaitTOF();
}
else
{
wait = IExec->Wait( SIGBREAKF_CTRL_C | bufsig | winsig);
}
}
}while(!done);
}