cc68a136 |
1 | \r |
2 | #include <stdio.h>\r |
3 | \r |
4 | #ifdef _XBOX\r |
5 | #include <xtl.h>\r |
6 | #endif\r |
7 | \r |
8 | #ifndef _XBOX\r |
9 | #define WIN32_LEAN_AND_MEAN\r |
10 | #include <windows.h>\r |
11 | #include <d3d8.h>\r |
12 | #endif\r |
13 | \r |
14 | #include <d3dx8.h>\r |
15 | \r |
16 | #include "Pico.h"\r |
17 | \r |
18 | #define PI 3.14159265f\r |
19 | \r |
20 | #define RELEASE(x) if (x) x->Release(); x=NULL;\r |
21 | \r |
22 | #ifdef _XBOX\r |
23 | #define HOME "d:\\"\r |
24 | #else\r |
25 | #define HOME ".\\"\r |
26 | #endif\r |
27 | \r |
28 | // Emu.cpp\r |
29 | extern unsigned short *EmuScreen;\r |
30 | extern int EmuWidth,EmuHeight;\r |
31 | int EmuInit();\r |
32 | void EmuExit();\r |
33 | int EmuRomLoad(char *name);\r |
34 | int EmuFrame();\r |
35 | \r |
36 | // Input.cpp\r |
37 | struct Input\r |
38 | {\r |
39 | short axis[4];\r |
40 | unsigned char button[16];\r |
41 | unsigned char held[16]; // How long has the button been held\r |
42 | char repeat[16]; // Auto-repeat\r |
43 | };\r |
44 | extern struct Input Inp;\r |
45 | int InputInit();\r |
46 | void InputExit();\r |
47 | int InputUpdate();\r |
48 | int InputLightCal(int cx,int cy,int ux,int uy);\r |
49 | \r |
50 | // LightCal.cpp\r |
51 | int LightCalReset();\r |
52 | int LightCalUpdate();\r |
53 | int LightCalRender();\r |
54 | \r |
55 | // Loop.cpp\r |
56 | void preLoopInit();\r |
57 | extern char LoopQuit;\r |
58 | extern int LoopMode;\r |
59 | \r |
60 | int LoopInit();\r |
61 | void LoopExit();\r |
62 | int LoopCode();\r |
63 | \r |
64 | // Main.cpp\r |
65 | extern HWND FrameWnd;\r |
66 | extern int MainWidth,MainHeight;\r |
67 | extern char AppName[];\r |
68 | extern "C" int dprintf(char *format, ...);\r |
69 | \r |
70 | // Rom.cpp\r |
71 | extern unsigned char *RomData;\r |
72 | extern int RomLen;\r |
73 | extern char RomName[260];\r |
74 | int RomLoad();\r |
75 | void RomFree();\r |
76 | \r |
77 | // --------------------------------------------\r |
78 | // Direct.cpp\r |
79 | extern IDirect3DDevice8 *Device;\r |
80 | extern IDirect3DSurface8 *DirectBack; // Back Buffer\r |
81 | int DirectInit();\r |
82 | int DirectClear(unsigned int colour);\r |
83 | int DirectScreen();\r |
84 | int DirectPresent();\r |
85 | void DirectExit();\r |
86 | \r |
87 | // DSound.cpp:\r |
88 | int DSoundInit();\r |
89 | void DSoundExit();\r |
90 | int DSoundUpdate();\r |
91 | extern short *DSoundNext; // Buffer for next sound data to put in loop\r |
92 | //extern int DSoundSeg; // Seg length in samples\r |
93 | void DSoundMute();\r |
94 | void DSoundUnMute();\r |
95 | \r |
96 | // Font.cpp\r |
97 | int FontInit();\r |
98 | void FontExit();\r |
99 | int FontSetColour(unsigned int colour);\r |
100 | int FontText(WCHAR *,int,int);\r |
101 | \r |
102 | // TexScreen.cpp\r |
103 | extern IDirect3DTexture8 *TexScreen;\r |
104 | extern int TexWidth,TexHeight;\r |
105 | int TexScreenInit();\r |
106 | void TexScreenExit();\r |
107 | int TexScreenSwizzle();\r |
108 | int TexScreenLinear();\r |