0
|
1 #define __PWPLIB_C
|
|
2
|
|
3 #include "config.h"
|
|
4
|
|
5 #include <stdio.h>
|
|
6 #include <stdlib.h>
|
|
7
|
|
8 #include <windows.h>
|
|
9
|
|
10 #include "pwplib.h"
|
|
11
|
|
12 #define DESTRUCTORS 8
|
|
13
|
|
14 /******************** random stuff *************************/
|
|
15
|
|
16 extern void pwplib_dummy();
|
|
17 #define pwp_dummy pwplib_dummy
|
|
18
|
|
19 /********************* timer ******************************/
|
|
20
|
|
21 #define TIMERHZ 72
|
|
22 int pwp_w32_ticks()
|
|
23 {
|
|
24 int ticks = GetTickCount();
|
|
25
|
|
26 return ((ticks*TIMERHZ)/1000);
|
|
27 // (10000000/10441));
|
|
28 }
|
|
29
|
|
30 /******************** initialization *********************/
|
|
31
|
|
32 int pwplib_initcore()
|
|
33 {
|
|
34 pwplib_init_common();
|
|
35
|
|
36 win32con_init();
|
|
37
|
|
38 win32snd_init();
|
|
39
|
|
40 pwplib.timerfunc = pwp_w32_ticks;
|
|
41
|
|
42
|
|
43 if(pwplib.dump_rast==pwplib_dummy && pwplib.dump_attr!=pwplib_dummy)
|
|
44 pwplib.dump_rast=pwplib_dump_rast_plain;
|
|
45
|
|
46 return 1;
|
|
47 }
|
|
48
|
|
49 /*********************************************************************/
|
|
50
|
|
51 void pwplib_startup()
|
|
52 {
|
|
53 }
|
|
54
|
|
55 void pwplib_end()
|
|
56 {
|
|
57 pwplib_shutdown();
|
|
58
|
|
59 /* write some stuph */
|
|
60 }
|
|
61
|
|
62 /***************************************************************/
|
|
63
|
|
64 extern void pwplib_getopts();
|
|
65
|
|
66 int pwplib_init(int argc,char**argv)
|
|
67 {
|
|
68 // printf("ME THINKS WIN32 ROOLZ\n\n");
|
|
69
|
|
70 pwplib.argc=argc;
|
|
71 pwplib.argv=argv;
|
|
72
|
|
73 pwplib_getopts();
|
|
74
|
|
75 pwplib_initcore();
|
|
76
|
|
77 return 1;
|
|
78 }
|
|
79
|