Mercurial > ~darius > hgwebdir.cgi > mikmod
comparison include/timer.h @ 10:55420dceb8e0
Initial entry of mikmod into the CVS tree.
author | darius |
---|---|
date | Fri, 23 Jan 1998 16:05:11 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:990c9dadb348 | 10:55420dceb8e0 |
---|---|
1 /* | |
2 FILE : TIMER.H | |
3 | |
4 DOS-based Timer Interrupt functions | |
5 Includes defines for TIMER.C and VTIMER.C | |
6 */ | |
7 | |
8 #ifndef VTIMER_H | |
9 #define VTIMER_H | |
10 | |
11 #include "tdefs.h" | |
12 | |
13 #define VT_VRSYNC 1 | |
14 #define VT_CALLOLD 2 | |
15 | |
16 #ifdef __cplusplus | |
17 extern "C" { | |
18 #endif | |
19 | |
20 // Defined in TIMER.C | |
21 | |
22 void Timer_Exit(void); | |
23 void Timer_Init(int rate, void (*handler)(void)); | |
24 void Timer_SetSpeed(UWORD rate); | |
25 void Timer_Start(void); | |
26 void Timer_Stop(void); | |
27 | |
28 | |
29 // Defined in VTIMER.C | |
30 void VT_Exit(void); | |
31 void VT_Init(void); | |
32 SWORD VT_Alloc(void); | |
33 void VT_Free(SWORD handle); | |
34 void VT_SetHandler(SWORD handle,void (*handler)(void)); | |
35 void VT_SetSpeed(SWORD handle,SLONG speed); | |
36 void VT_SetBPM(SWORD handle,UBYTE bpm); | |
37 void VT_Start(SWORD handle); | |
38 void VT_Stop(SWORD handle); | |
39 void VT_Mode(UBYTE flags); | |
40 void VT_V0Handler(void (*handler)(void)); | |
41 void VT_V1Handler(void (*handler)(void)); | |
42 | |
43 #ifdef __cplusplus | |
44 } | |
45 #endif | |
46 | |
47 | |
48 extern volatile int framecount; | |
49 void framecounter(void); | |
50 | |
51 // COUNTER.C defnitions | |
52 // (ObjectGraphics Library) | |
53 | |
54 #define CNT_ACTIVE 16 | |
55 #define CNT_VALUE 0 | |
56 #define CNT_POINTER 1 | |
57 #define CNT_FUNCTION 2 | |
58 #define CNT_TYPE 15 | |
59 | |
60 typedef struct COUNTER | |
61 { struct COUNTER *next, *prev; | |
62 UBYTE flags; | |
63 ULONG counter; | |
64 ULONG resetcount; | |
65 int increment; | |
66 int value; | |
67 int stopvalue; | |
68 } COUNTER; | |
69 | |
70 | |
71 // Defined in COUNTER.C | |
72 // (ObjectGraphics Library) | |
73 | |
74 COUNTER *RegisterCounter(ULONG initcount, ULONG resetcount, int value, int increment, int stopvalue, UBYTE flags); | |
75 void RemoveCounter(COUNTER *counter); | |
76 void StartCounter(COUNTER *counter); | |
77 void StopCounter(COUNTER *counter); | |
78 | |
79 #ifdef DJGPP | |
80 #include <dpmi.h> | |
81 typedef void (*PVI)(); | |
82 #define interrupt | |
83 #define far | |
84 void _dos_setvect(unsigned vector, PVI handler); | |
85 PVI _dos_getvect(unsigned vector); | |
86 #endif | |
87 | |
88 #endif |