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