Mercurial > sdl-ios-xcode
annotate src/hermes/HeadX86.h @ 1734:f7c667ded87d SDL-1.3
The general code handles restoring video mode/gamma/etc. when the window loses focus.
Support for changing fullscreen/windowed mode in progress.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 09 Jul 2006 18:09:16 +0000 |
parents | 4da1ee79c9af |
children |
rev | line source |
---|---|
0 | 1 /* |
2 Header definitions for the x86 routines for the HERMES library | |
3 Copyright (c) 1998 Christian Nentwich (brn@eleet.mcb.at) | |
4 This source code is licensed under the GNU LGPL | |
5 | |
6 Please refer to the file COPYING.LIB contained in the distribution for | |
7 licensing conditions | |
8 */ | |
9 | |
10 #ifndef __HERMES_HEAD_X86__ | |
11 #define __HERMES_HEAD_X86__ | |
12 | |
13 | |
14 #ifdef X86_ASSEMBLER | |
15 | |
16 /* If you can't stand IFDEFS, then close your eyes now, please :) */ | |
17 | |
18 /* Ok, we start with normal function definitions */ | |
19 #ifdef __cplusplus | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
20 extern "C" |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
21 { |
0 | 22 #endif |
23 | |
24 | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
25 void STACKCALL ConvertX86(HermesConverterInterface *); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
26 void STACKCALL ClearX86_32(HermesClearInterface *); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
27 void STACKCALL ClearX86_24(HermesClearInterface *); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
28 void STACKCALL ClearX86_16(HermesClearInterface *); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
29 void STACKCALL ClearX86_8(HermesClearInterface *); |
0 | 30 |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
31 int STACKCALL Hermes_X86_CPU(); |
0 | 32 |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
33 void ConvertX86p32_32BGR888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
34 void ConvertX86p32_32RGBA888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
35 void ConvertX86p32_32BGRA888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
36 void ConvertX86p32_24RGB888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
37 void ConvertX86p32_24BGR888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
38 void ConvertX86p32_16RGB565(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
39 void ConvertX86p32_16BGR565(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
40 void ConvertX86p32_16RGB555(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
41 void ConvertX86p32_16BGR555(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
42 void ConvertX86p32_8RGB332(); |
0 | 43 |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
44 void ConvertX86p16_32RGB888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
45 void ConvertX86p16_32BGR888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
46 void ConvertX86p16_32RGBA888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
47 void ConvertX86p16_32BGRA888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
48 void ConvertX86p16_24RGB888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
49 void ConvertX86p16_24BGR888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
50 void ConvertX86p16_16BGR565(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
51 void ConvertX86p16_16RGB555(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
52 void ConvertX86p16_16BGR555(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
53 void ConvertX86p16_8RGB332(); |
0 | 54 |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
55 void CopyX86p_4byte(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
56 void CopyX86p_3byte(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
57 void CopyX86p_2byte(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
58 void CopyX86p_1byte(); |
0 | 59 |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
60 void ConvertX86pI8_32(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
61 void ConvertX86pI8_24(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
62 void ConvertX86pI8_16(); |
0 | 63 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
64 extern int ConvertX86p16_32RGB888_LUT_X86[512]; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
65 extern int ConvertX86p16_32BGR888_LUT_X86[512]; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
66 extern int ConvertX86p16_32RGBA888_LUT_X86[512]; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
67 extern int ConvertX86p16_32BGRA888_LUT_X86[512]; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
68 |
0 | 69 #ifdef __cplusplus |
70 } | |
71 #endif | |
72 | |
73 | |
74 | |
75 | |
76 /* Now fix up the ELF underscore problem */ | |
77 | |
78 #if defined(__ELF__) && defined(__GNUC__) | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
79 #ifdef __cplusplus |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
80 extern "C" |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
81 { |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
82 #endif |
0 | 83 |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
84 extern int _Hermes_X86_CPU(); |
0 | 85 |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
86 extern void _ConvertX86(HermesConverterInterface *); |
0 | 87 |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
88 extern void _ConvertX86p32_32BGR888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
89 extern void _ConvertX86p32_32RGBA888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
90 extern void _ConvertX86p32_32BGRA888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
91 extern void _ConvertX86p32_24RGB888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
92 extern void _ConvertX86p32_24BGR888(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
93 extern void _ConvertX86p32_16RGB565(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
94 extern void _ConvertX86p32_16BGR565(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
95 extern void _ConvertX86p32_16RGB555(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
96 extern void _ConvertX86p32_16BGR555(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
97 extern void _ConvertX86p32_8RGB332(); |
1197
bb5ace455586
Fixed compiling with gcc 4, patch applied from Gentoo Bugzilla:
Sam Lantinga <slouken@libsdl.org>
parents:
366
diff
changeset
|
98 |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
99 extern void _ConvertX86p16_16BGR565(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
100 extern void _ConvertX86p16_16RGB555(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
101 extern void _ConvertX86p16_16BGR555(); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
102 extern void _ConvertX86p16_8RGB332(); |
1197
bb5ace455586
Fixed compiling with gcc 4, patch applied from Gentoo Bugzilla:
Sam Lantinga <slouken@libsdl.org>
parents:
366
diff
changeset
|
103 |
0 | 104 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
105 #define Hermes_X86_CPU _Hermes_X86_CPU |
1197
bb5ace455586
Fixed compiling with gcc 4, patch applied from Gentoo Bugzilla:
Sam Lantinga <slouken@libsdl.org>
parents:
366
diff
changeset
|
106 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
107 #define ConvertX86 _ConvertX86 |
0 | 108 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
109 #define ConvertX86p32_32BGR888 _ConvertX86p32_32BGR888 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
110 #define ConvertX86p32_32RGBA888 _ConvertX86p32_32RGBA888 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
111 #define ConvertX86p32_32BGRA888 _ConvertX86p32_32BGRA888 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
112 #define ConvertX86p32_24RGB888 _ConvertX86p32_24RGB888 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
113 #define ConvertX86p32_24BGR888 _ConvertX86p32_24BGR888 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
114 #define ConvertX86p32_16RGB565 _ConvertX86p32_16RGB565 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
115 #define ConvertX86p32_16BGR565 _ConvertX86p32_16BGR565 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
116 #define ConvertX86p32_16RGB555 _ConvertX86p32_16RGB555 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
117 #define ConvertX86p32_16BGR555 _ConvertX86p32_16BGR555 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
118 #define ConvertX86p32_8RGB332 _ConvertX86p32_8RGB332 |
0 | 119 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
120 #define ConvertX86p16_16BGR565 _ConvertX86p16_16BGR565 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
121 #define ConvertX86p16_16RGB555 _ConvertX86p16_16RGB555 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
122 #define ConvertX86p16_16BGR555 _ConvertX86p16_16BGR555 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
123 #define ConvertX86p16_8RGB332 _ConvertX86p16_8RGB332 |
0 | 124 |
125 | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
126 #ifdef __cplusplus |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
127 } |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
128 #endif |
0 | 129 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
130 #endif /* ELF & GNU */ |
0 | 131 |
132 | |
133 | |
134 /* Make it run with WATCOM C */ | |
135 #ifdef __WATCOMC__ | |
136 #pragma warning 601 9 | |
137 | |
138 #pragma aux Hermes_X86_CPU "_*" | |
139 | |
140 #pragma aux ConvertX86 "_*" modify [EAX EBX ECX EDX ESI EDI] | |
141 #pragma aux ClearX86_32 "_*" modify [EAX EBX ECX EDX ESI EDI] | |
142 #pragma aux ClearX86_24 "_*" modify [EAX EBX ECX EDX ESI EDI] | |
143 #pragma aux ClearX86_16 "_*" modify [EAX EBX ECX EDX ESI EDI] | |
144 #pragma aux ClearX86_8 "_*" modify [EAX EBX ECX EDX ESI EDI] | |
145 | |
146 #pragma aux ConvertX86p32_32BGR888 "_*" | |
147 #pragma aux ConvertX86p32_32RGBA888 "_*" | |
148 #pragma aux ConvertX86p32_32BGRA888 "_*" | |
149 #pragma aux ConvertX86p32_24RGB888 "_*" | |
150 #pragma aux ConvertX86p32_24BGR888 "_*" | |
151 #pragma aux ConvertX86p32_16RGB565 "_*" | |
152 #pragma aux ConvertX86p32_16BGR565 "_*" | |
153 #pragma aux ConvertX86p32_16RGB555 "_*" | |
154 #pragma aux ConvertX86p32_16BGR555 "_*" | |
155 #pragma aux ConvertX86p32_8RGB332 "_*" | |
156 | |
157 #pragma aux ConvertX86p16_32RGB888 "_*" | |
158 #pragma aux ConvertX86p16_32BGR888 "_*" | |
159 #pragma aux ConvertX86p16_32RGBA888 "_*" | |
160 #pragma aux ConvertX86p16_32BGRA888 "_*" | |
161 #pragma aux ConvertX86p16_24RGB888 "_*" | |
162 #pragma aux ConvertX86p16_24BGR888 "_*" | |
163 #pragma aux ConvertX86p16_16BGR565 "_*" | |
164 #pragma aux ConvertX86p16_16RGB555 "_*" | |
165 #pragma aux ConvertX86p16_16BGR555 "_*" | |
166 #pragma aux ConvertX86p16_8RGB332 "_*" | |
167 | |
168 #pragma aux CopyX86p_4byte "_*" | |
169 #pragma aux CopyX86p_3byte "_*" | |
170 #pragma aux CopyX86p_2byte "_*" | |
171 #pragma aux CopyX86p_1byte "_*" | |
172 | |
173 #pragma aux ConvertX86pI8_32 "_*" | |
174 #pragma aux ConvertX86pI8_24 "_*" | |
175 #pragma aux ConvertX86pI8_16 "_*" | |
176 | |
177 #pragma aux ConvertX86p16_32RGB888_LUT_X86 "_*" | |
178 #pragma aux ConvertX86p16_32BGR888_LUT_X86 "_*" | |
179 #pragma aux ConvertX86p16_32RGBA888_LUT_X86 "_*" | |
180 #pragma aux ConvertX86p16_32BGRA888_LUT_X86 "_*" | |
181 | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
182 #endif /* __WATCOMC__ */ |
0 | 183 |
184 | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
185 #endif /* X86_ASSEMBLER */ |
0 | 186 |
187 | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
188 #endif |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1197
diff
changeset
|
189 /* vi: set ts=4 sw=4 expandtab: */ |