deleting unneeded files and adding sa1cpu
[drnoksnes] / 3d.h
1 /*
2  * Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
3  *
4  * (c) Copyright 1996 - 2001 Gary Henderson (gary.henderson@ntlworld.com) and
5  *                           Jerremy Koot (jkoot@snes9x.com)
6  *
7  * Super FX C emulator code 
8  * (c) Copyright 1997 - 1999 Ivar (ivar@snes9x.com) and
9  *                           Gary Henderson.
10  * Super FX assembler emulator code (c) Copyright 1998 zsKnight and _Demo_.
11  *
12  * DSP1 emulator code (c) Copyright 1998 Ivar, _Demo_ and Gary Henderson.
13  * C4 asm and some C emulation code (c) Copyright 2000 zsKnight and _Demo_.
14  * C4 C code (c) Copyright 2001 Gary Henderson (gary.henderson@ntlworld.com).
15  *
16  * DOS port code contains the works of other authors. See headers in
17  * individual files.
18  *
19  * Snes9x homepage: http://www.snes9x.com
20  *
21  * Permission to use, copy, modify and distribute Snes9x in both binary and
22  * source form, for non-commercial purposes, is hereby granted without fee,
23  * providing that this license information and copyright notice appear with
24  * all copies and any derived work.
25  *
26  * This software is provided 'as-is', without any express or implied
27  * warranty. In no event shall the authors be held liable for any damages
28  * arising from the use of this software.
29  *
30  * Snes9x is freeware for PERSONAL USE only. Commercial users should
31  * seek permission of the copyright holders first. Commercial use includes
32  * charging money for Snes9x or software derived from Snes9x.
33  *
34  * The copyright holders request that bug fixes and improvements to the code
35  * should be forwarded to them so everyone can benefit from the modifications
36  * in future versions.
37  *
38  * Super NES and Super Nintendo Entertainment System are trademarks of
39  * Nintendo Co., Limited and its subsidiary companies.
40  */
41 #ifndef _3D_H_
42 #define _3D_H_
43
44 #if defined(USE_OPENGL)
45 #include <GL/gl.h>
46 #include <GL/glu.h>
47
48 #ifdef __linux__
49 //#include <GL/glx.h>
50 #endif
51
52 typedef struct
53 {
54     bool8       packed_pixels_extension_present;
55     bool8       draw_cube;
56     uint32      version;
57     // Texture format
58     GLint       internal_format;
59     GLint       format;
60     GLint       type;
61
62     GLint       max_texture_size;// 256 or 512
63     GLint       texture_size;
64     uint32      num_textures;    // 1 if max_texture_size == 256, 2 otherwise
65     GLuint      textures [2];
66 } OpenGLData;
67
68 extern OpenGLData OpenGL;
69
70 bool8 S9xOpenGLInit ();
71 bool8 S9xOpenGLInit2 ();
72 void S9xOpenGLPutImage (int width, int height);
73 void S9xOpenGLDeinit ();
74
75 #endif
76
77 #ifdef USE_GLIDE
78 //#include <glide.h>
79
80 typedef struct
81 {
82     bool8       voodoo_present;
83     GrVertex    sq[4];
84     GrTexInfo   texture;
85     int32       texture_mem_size;
86     int32       texture_mem_start;
87     float       x_offset, y_offset;
88     float       x_scale, y_scale;
89     float       voodoo_width;
90     float       voodoo_height;
91 } GlideData;
92
93 extern GlideData Glide;
94 bool8 S9xGlideEnable (bool8 enable);
95 void S9xGlideDeinit ();
96 bool8 S9xGlideInit ();
97 bool8 S9xVoodooInitialise ();
98 #endif
99
100 #endif