Compare commits
284 Commits
glide-deve
...
glide-deve
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee38094805 | ||
|
|
6e79c3d9b7 | ||
|
|
d86e089d35 | ||
|
|
7d4a1ddda1 | ||
|
|
5ba939612e | ||
|
|
85186e0206 | ||
|
|
587e01e573 | ||
|
|
a20bb982cc | ||
|
|
5ffccc63b8 | ||
|
|
c9727c8829 | ||
|
|
d254f7f28e | ||
|
|
170185784e | ||
|
|
a6ceeebd00 | ||
|
|
67ad843c88 | ||
|
|
f7bcf2ba77 | ||
|
|
5e6b39fb2b | ||
|
|
43fbe0bf3c | ||
|
|
438ac12be4 | ||
|
|
1f827a4602 | ||
|
|
acddb52685 | ||
|
|
fe35279d12 | ||
|
|
6d671089f6 | ||
|
|
1ceb326d78 | ||
|
|
9fbf8482a8 | ||
|
|
f0adaa0423 | ||
|
|
0cfcfe0e88 | ||
|
|
8522edee5c | ||
|
|
8be8bb66b5 | ||
|
|
91669cea49 | ||
|
|
305fab3650 | ||
|
|
a5e52f47f5 | ||
|
|
671cee61eb | ||
|
|
7f50068a47 | ||
|
|
ccadf5f395 | ||
|
|
1096fc0efb | ||
|
|
0e352d42c1 | ||
|
|
ee5fecf71f | ||
|
|
26c95e24f6 | ||
|
|
a0f4e5a4e6 | ||
|
|
347ccd8391 | ||
|
|
c468e627e7 | ||
|
|
426c3988a3 | ||
|
|
da8d31c9d5 | ||
|
|
50de6810a0 | ||
|
|
cd39eb5320 | ||
|
|
99ee5eec74 | ||
|
|
186bb19d28 | ||
|
|
274d0d31c2 | ||
|
|
01f2e823f7 | ||
|
|
fa2272350a | ||
|
|
4a33160a11 | ||
|
|
c93f294492 | ||
|
|
34fa903aea | ||
|
|
2a770d57d5 | ||
|
|
a7b3d9290c | ||
|
|
e2dd1b0ba0 | ||
|
|
11f9ba7f56 | ||
|
|
5db23883e9 | ||
|
|
72028096b9 | ||
|
|
ed0fb7ba52 | ||
|
|
dbcbbb1313 | ||
|
|
db8ef4d0ef | ||
|
|
575bafe6c9 | ||
|
|
e11ac4e5db | ||
|
|
0402d46e43 | ||
|
|
cec38774f4 | ||
|
|
661f489f88 | ||
|
|
c430cef2b2 | ||
|
|
4a72d2061d | ||
|
|
eb40729806 | ||
|
|
bd3e0372c1 | ||
|
|
d565bf19ef | ||
|
|
2ab9b505eb | ||
|
|
f2e22ecf56 | ||
|
|
8574e105f2 | ||
|
|
a4a70bba5b | ||
|
|
e649ca4613 | ||
|
|
64b744733d | ||
|
|
e7cc47e93e | ||
|
|
c6de03a346 | ||
|
|
40230a559e | ||
|
|
ffac0696a3 | ||
|
|
1567a193fe | ||
|
|
14c8945a32 | ||
|
|
e3612b4f58 | ||
|
|
b8c4edab9d | ||
|
|
66386d5ac4 | ||
|
|
c30be75227 | ||
|
|
7ced8d7f32 | ||
|
|
5d1a34c31c | ||
|
|
2d63cec195 | ||
|
|
4a6f09253a | ||
|
|
85ec47f22b | ||
|
|
d04deb23d6 | ||
|
|
c4b365abdf | ||
|
|
e4fc9db7db | ||
|
|
537a15a2fc | ||
|
|
46ca75c1dd | ||
|
|
36dc997a1d | ||
|
|
d2c076b8ab | ||
|
|
19c5f4e705 | ||
|
|
ee6f124929 | ||
|
|
4d29b7f47f | ||
|
|
8ee1de4bcf | ||
|
|
c8f2b9f621 | ||
|
|
c94050cb87 | ||
|
|
3e2cc50867 | ||
|
|
fa071d0a93 | ||
|
|
d39173dfd2 | ||
|
|
ccf3cc1dc9 | ||
|
|
3be55b6512 | ||
|
|
0f6ca06167 | ||
|
|
61ebabbc40 | ||
|
|
103dec9ab9 | ||
|
|
a5352b0145 | ||
|
|
34b5d19350 | ||
|
|
9ba0795fc7 | ||
|
|
e9133561f1 | ||
|
|
5ebace29f9 | ||
|
|
ece8c244f3 | ||
|
|
1488d68cff | ||
|
|
ed2350c8f0 | ||
|
|
54e3669349 | ||
|
|
ed11fcc3cc | ||
|
|
90d647cfa6 | ||
|
|
ffb144a87e | ||
|
|
415127f697 | ||
|
|
2b2d13f32e | ||
|
|
e2a15684a1 | ||
|
|
e0d29a1656 | ||
|
|
6d7be29632 | ||
|
|
16f66e6d28 | ||
|
|
377f8d78a8 | ||
|
|
9f5fb2a342 | ||
|
|
4f59670015 | ||
|
|
eb96ad7944 | ||
|
|
d13007941b | ||
|
|
bc1d8f3932 | ||
|
|
d917bb66ab | ||
|
|
5672bdf2be | ||
|
|
5c3ead43e6 | ||
|
|
6e6171b857 | ||
|
|
14b3357ab8 | ||
|
|
4e3b368794 | ||
|
|
8a425599ef | ||
|
|
8080e4a845 | ||
|
|
3a00e0af75 | ||
|
|
e42511abcc | ||
|
|
bfad389fff | ||
|
|
a23359fc29 | ||
|
|
e9384d45a3 | ||
|
|
cdd969974a | ||
|
|
eeb8c98bb9 | ||
|
|
23b0364245 | ||
|
|
62cc477a02 | ||
|
|
60d8447b98 | ||
|
|
fe99a42068 | ||
|
|
8844a3f2e7 | ||
|
|
e6797e4fd8 | ||
|
|
9d646ac504 | ||
|
|
8e9e9acbb1 | ||
|
|
1ee5e06295 | ||
|
|
a1f750e924 | ||
|
|
902edc7a66 | ||
|
|
49be990209 | ||
|
|
04bc43e39c | ||
|
|
c195d7acdc | ||
|
|
84728cbfb0 | ||
|
|
542a45b6e9 | ||
|
|
b35c0478be | ||
|
|
02a608c61c | ||
|
|
21fa4b55f0 | ||
|
|
3e461e9f67 | ||
|
|
99f02c80e6 | ||
|
|
76d8804c33 | ||
|
|
0ff42bceb5 | ||
|
|
0652ba3057 | ||
|
|
41324bf11c | ||
|
|
789be06f0f | ||
|
|
208cbf570f | ||
|
|
673403f9cf | ||
|
|
6c40713033 | ||
|
|
32b399b380 | ||
|
|
7bfd3b95f9 | ||
|
|
2a711e29fe | ||
|
|
3b522046d6 | ||
|
|
898013970a | ||
|
|
ca1e7fd506 | ||
|
|
ccbd5a7b41 | ||
|
|
c62583a3ee | ||
|
|
93dcdb9390 | ||
|
|
797d81af4a | ||
|
|
8a406cba3d | ||
|
|
da4d6857ba | ||
|
|
b6d45d842c | ||
|
|
355dca22a1 | ||
|
|
57230a2161 | ||
|
|
b594bf89aa | ||
|
|
043f38b035 | ||
|
|
f3ed63fc58 | ||
|
|
d92d50efc8 | ||
|
|
2a7cfdfec7 | ||
|
|
faf890d878 | ||
|
|
5f69e69154 | ||
|
|
6759df5ead | ||
|
|
7dbc64777a | ||
|
|
5c6e58e4e2 | ||
|
|
b5a555a538 | ||
|
|
b4c30b1693 | ||
|
|
721b6fcf1b | ||
|
|
43f6bbc977 | ||
|
|
64bae86d19 | ||
|
|
43291704cb | ||
|
|
12d926449a | ||
|
|
b62e3fd33c | ||
|
|
3c54cfde1e | ||
|
|
40ee824879 | ||
|
|
bc18c519d7 | ||
|
|
1fe48886a8 | ||
|
|
de0e7ca28f | ||
|
|
1e89ef2670 | ||
|
|
8c917cb2a2 | ||
|
|
8adf484af7 | ||
|
|
e710954c4e | ||
|
|
59d59bad72 | ||
|
|
380a78de05 | ||
|
|
42c8b28993 | ||
|
|
d6fce294b4 | ||
|
|
0aa1e159bf | ||
|
|
d6448ee662 | ||
|
|
29212e8a14 | ||
|
|
af4ebfce0c | ||
|
|
19efdba7e0 | ||
|
|
032b25b708 | ||
|
|
d46910aa23 | ||
|
|
2ee4b4f583 | ||
|
|
b33d69b0a3 | ||
|
|
1f08466bc6 | ||
|
|
30ec87871d | ||
|
|
f053d6b0cf | ||
|
|
ef5108ae49 | ||
|
|
9fee9e454d | ||
|
|
46226e7d14 | ||
|
|
383731e840 | ||
|
|
08e1e599fd | ||
|
|
4f81f1ed1b | ||
|
|
ae760389ae | ||
|
|
486276471e | ||
|
|
1a273ba12a | ||
|
|
8b047bb95c | ||
|
|
bbbb581698 | ||
|
|
cb46d5b49c | ||
|
|
8bdf368c58 | ||
|
|
720d0b125e | ||
|
|
35be4ad445 | ||
|
|
dc5f7d0065 | ||
|
|
9b83acbefd | ||
|
|
bc892aff15 | ||
|
|
16a4feb6e6 | ||
|
|
78a5774bc8 | ||
|
|
eea61facf8 | ||
|
|
dd7cb10225 | ||
|
|
e8c99cbad5 | ||
|
|
4092b17053 | ||
|
|
e6d386eb3c | ||
|
|
8448392757 | ||
|
|
c2eaa35f54 | ||
|
|
7415325040 | ||
|
|
5ca0c8b42f | ||
|
|
fdeb88fac5 | ||
|
|
14e33eb51d | ||
|
|
d257dd2bc2 | ||
|
|
371f2af8ec | ||
|
|
6a898856bb | ||
|
|
de08f2ebbf | ||
|
|
dde408cf00 | ||
|
|
76a8dc0416 | ||
|
|
4819e38cc4 | ||
|
|
4fd268232a | ||
|
|
ec57d92c97 | ||
|
|
968e385010 | ||
|
|
367a3b66c4 | ||
|
|
2c11e03776 | ||
|
|
d7086902f1 |
255
LICENSE
Normal file
255
LICENSE
Normal file
@@ -0,0 +1,255 @@
|
||||
3DFX GLIDE Source Code General Public License
|
||||
|
||||
|
||||
1. PREAMBLE
|
||||
|
||||
This license is for software that provides a 3D graphics application
|
||||
program interface (API).The license is intended to offer terms similar
|
||||
to some standard General Public Licenses designed to foster open
|
||||
standards and unrestricted accessibility to source code. Some of these
|
||||
licenses require that, as a condition of the license of the software,
|
||||
any derivative works (that is, new software which is a work containing
|
||||
the original program or a portion of it) must be available for general
|
||||
use, without restriction other than for a minor transfer fee, and that
|
||||
the source code for such derivative works must likewise be made
|
||||
available. The only restriction is that such derivative works must be
|
||||
subject to the same General Public License terms as the original work.
|
||||
|
||||
This 3dfx GLIDE Source Code General Public License differs from the
|
||||
standard licenses of this type in that it does not require the entire
|
||||
derivative work to be made available under the terms of this license
|
||||
nor is the recipient required to make available the source code for
|
||||
the entire derivative work. Rather, the license is limited to only the
|
||||
identifiable portion of the derivative work that is derived from the
|
||||
licensed software. The precise terms and conditions for copying,
|
||||
distribution and modification follow.
|
||||
|
||||
|
||||
2. DEFINITIONS
|
||||
|
||||
2.1 This License applies to any program (or other "work") which
|
||||
contains a notice placed by the copyright holder saying it may be
|
||||
distributed under the terms of this 3dfx GLIDE Source Code General
|
||||
Public License.
|
||||
|
||||
2.2 The term "Program" as used in this Agreement refers to 3DFX's
|
||||
GLIDE source code and object code and any Derivative Work.
|
||||
|
||||
2.3 "Derivative Work" means, for the purpose of the License, that
|
||||
portion of any work that contains the Program or the identifiable
|
||||
portion of a work that is derived from the Program, either verbatim or
|
||||
with modifications and/or translated into another language, and that
|
||||
performs 3D graphics API operations. It does not include any other
|
||||
portions of a work.
|
||||
|
||||
2.4 "Modifications of the Program" means any work, which includes a
|
||||
Derivative Work, and includes the whole of such work.
|
||||
|
||||
2.5 "License" means this 3dfx GLIDE Source Code General Public License.
|
||||
|
||||
2.6 The "Source Code" for a work means the preferred form of the work
|
||||
for making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, any
|
||||
associated interface definition files, and the scripts used to control
|
||||
compilation and installation of the executable work.
|
||||
|
||||
2.7 "3dfx" means 3dfx Interactive, Inc.
|
||||
|
||||
|
||||
3. LICENSED ACTIVITIES
|
||||
|
||||
3.1 COPYING - You may copy and distribute verbatim copies of the
|
||||
Program's Source Code as you receive it, in any medium, subject to the
|
||||
provision of section 3.3 and provided also that:
|
||||
|
||||
(a) you conspicuously and appropriately publish on each copy
|
||||
an appropriate copyright notice (3dfx Interactive, Inc. 1999), a notice
|
||||
that recipients who wish to copy, distribute or modify the Program can
|
||||
only do so subject to this License, and a disclaimer of warranty as
|
||||
set forth in section 5;
|
||||
|
||||
(b) keep intact all the notices that refer to this License and
|
||||
to the absence of any warranty; and
|
||||
|
||||
(c) do not make any use of the GLIDE trademark without the prior
|
||||
written permission of 3dfx, and
|
||||
|
||||
(d) give all recipients of the Program a copy of this License
|
||||
along with the Program or instructions on how to easily receive a copy
|
||||
of this License.
|
||||
|
||||
|
||||
3.2 MODIFICATION OF THE PROGRAM/DERIVATIVE WORKS - You may modify your
|
||||
copy or copies of the Program or any portion of it, and copy and
|
||||
distribute such modifications subject to the provisions of section 3.3
|
||||
and provided that you also meet all of the following conditions:
|
||||
|
||||
(a) you conspicuously and appropriately publish on each copy
|
||||
of a Derivative Work an appropriate copyright notice, a notice that
|
||||
recipients who wish to copy, distribute or modify the Derivative Work
|
||||
can only do so subject to this License, and a disclaimer of warranty
|
||||
as set forth in section 5;
|
||||
|
||||
(b) keep intact all the notices that refer to this License and
|
||||
to the absence of any warranty; and
|
||||
|
||||
(c) give all recipients of the Derivative Work a copy of this
|
||||
License along with the Derivative Work or instructions on how to easily
|
||||
receive a copy of this License.
|
||||
|
||||
(d) You must cause the modified files of the Derivative Work
|
||||
to carry prominent notices stating that you changed the files and the
|
||||
date of any change.
|
||||
|
||||
(e) You must cause any Derivative Work that you distribute or
|
||||
publish to be licensed at no charge to all third parties under the
|
||||
terms of this License.
|
||||
|
||||
(f) You do not make any use of the GLIDE trademark without the
|
||||
prior written permission of 3dfx.
|
||||
|
||||
(g) If the Derivative Work normally reads commands
|
||||
interactively when run, you must cause it, when started running for
|
||||
such interactive use, to print or display an announcement as follows:
|
||||
|
||||
"COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED THIS
|
||||
SOFTWARE IS FREE AND PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND,
|
||||
EITHER EXPRESSED OR IMPLIED. THERE IS NO RIGHT TO USE THE GLIDE
|
||||
TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX INTERACTIVE,
|
||||
INC. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A FULL TEXT OF THE
|
||||
DISTRIBUTION AND NON-WARRANTY PROVISIONS (REQUEST COPY FROM
|
||||
INFO@3DFX.COM)."
|
||||
|
||||
(h) The requirements of this section 3.2 do not apply to the
|
||||
modified work as a whole but only to the Derivative Work. It is not
|
||||
the intent of this License to claim rights or contest your rights to
|
||||
work written entirely by you; rather, the intent is to exercise the
|
||||
right to control the distribution of Derivative Works.
|
||||
|
||||
|
||||
3.3 DISTRIBUTION
|
||||
|
||||
(a) All copies of the Program or Derivative Works which are
|
||||
distributed must include in the file headers the following language
|
||||
verbatim:
|
||||
|
||||
"THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED
|
||||
ONLY PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO
|
||||
RIGHT TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF
|
||||
3DFX INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM
|
||||
THE DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC (info@3dfx.com).
|
||||
THIS PROGRAM. IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
|
||||
USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS
|
||||
IN TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
THE UNITED STATES.
|
||||
|
||||
COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED"
|
||||
|
||||
(b) You may distribute the Program or a Derivative Work in
|
||||
object code or executable form under the terms of Sections 3.1 and 3.2
|
||||
provided that you also do one of the following:
|
||||
|
||||
(1) Accompany it with the complete corresponding
|
||||
machine-readable source code, which must be distributed under the
|
||||
terms of Sections 3.1 and 3.2; or,
|
||||
|
||||
(2) Accompany it with a written offer, valid for at
|
||||
least three years, to give any third party, for a charge no more than
|
||||
your cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 3.1 and 3.2 on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
(3) Accompany it with the information you received as
|
||||
to the offer to distribute corresponding source code. (This alternative
|
||||
is allowed only for noncommercial distribution and only if you received
|
||||
the program in object code or executable form with such an offer, in
|
||||
accord with Subsection 3.3(b)(2) above.)
|
||||
|
||||
(c) The source code distributed need not include anything
|
||||
that is normally distributed (in either source or binary form) with
|
||||
the major components (compiler, kernel, and so on) of the operating
|
||||
system on which the executable runs, unless that component itself
|
||||
accompanies the executable code.
|
||||
|
||||
(d) If distribution of executable code or object code is made
|
||||
by offering access to copy from a designated place, then offering
|
||||
equivalent access to copy the source code from the same place counts
|
||||
as distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
(e) Each time you redistribute the Program or any Derivative
|
||||
Work, the recipient automatically receives a license from 3dfx and
|
||||
successor licensors to copy, distribute or modify the Program and
|
||||
Derivative Works subject to the terms and conditions of the License.
|
||||
You may not impose any further restrictions on the recipients'
|
||||
exercise of the rights granted herein. You are not responsible for
|
||||
enforcing compliance by third parties to this License.
|
||||
|
||||
(f) You may not make any use of the GLIDE trademark without
|
||||
the prior written permission of 3dfx.
|
||||
|
||||
(g) You may not copy, modify, sublicense, or distribute the
|
||||
Program or any Derivative Works except as expressly provided under
|
||||
this License. Any attempt otherwise to copy, modify, sublicense or
|
||||
distribute the Program or any Derivative Works is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
|
||||
4. MISCELLANEOUS
|
||||
|
||||
4.1 Acceptance of this License is voluntary. By using, modifying or
|
||||
distributing the Program or any Derivative Work, you indicate your
|
||||
acceptance of this License to do so, and all its terms and conditions
|
||||
for copying, distributing or modifying the Program or works based on
|
||||
it. Nothing else grants you permission to modify or distribute the
|
||||
Program or Derivative Works and doing so without acceptance of this
|
||||
License is in violation of the U.S. and international copyright laws.
|
||||
|
||||
4.2 If the distribution and/or use of the Program or Derivative Works
|
||||
is restricted in certain countries either by patents or by copyrighted
|
||||
interfaces, the original copyright holder who places the Program under
|
||||
this License may add an explicit geographical distribution limitation
|
||||
excluding those countries, so that distribution is permitted only in
|
||||
or among countries not thus excluded. In such case, this License
|
||||
incorporates the limitation as if written in the body of this License.
|
||||
|
||||
4.3 This License is to be construed according to the laws of the
|
||||
State of California and you consent to personal jurisdiction in the
|
||||
State of California in the event it is necessary to enforce the
|
||||
provisions of this License.
|
||||
|
||||
|
||||
5. NO WARRANTIES
|
||||
|
||||
5.1 TO THE EXTENT PERMITTED BY APPLICABLE LAW, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM. OR DERIVATIVE WORKS THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE PROGRAM AND ANY DERIVATIVE WORKS"AS IS"
|
||||
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY
|
||||
AND PERFORMANCE OF THE PROGRAM AND ANY DERIVATIVE WORK IS WITH YOU.
|
||||
SHOULD THE PROGRAM OR ANY DERIVATIVE WORK PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
5.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL 3DFX
|
||||
INTERACTIVE, INC., OR ANY OTHER COPYRIGHT HOLDER, OR ANY OTHER PARTY
|
||||
WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM OR DERIVATIVE WORKS AS
|
||||
PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
|
||||
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
|
||||
INABILITY TO USE THE PROGRAM OR DERIVATIVE WORKS (INCLUDING BUT NOT
|
||||
LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES
|
||||
SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM OR
|
||||
DERIVATIVE WORKS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
|
||||
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
5
README
Normal file
5
README
Normal file
@@ -0,0 +1,5 @@
|
||||
This is the source code to 3Dfx Glide for Voodoo graphics accelerators.
|
||||
It's forked from the original CVS repo of Glide open source project at
|
||||
sourceforge: https://sourceforge.net/projects/glide/
|
||||
|
||||
Source is licensed under 3DFX GLIDE Source Code General Public License.
|
||||
61
glide2x/Makefile.DJ
Normal file
61
glide2x/Makefile.DJ
Normal file
@@ -0,0 +1,61 @@
|
||||
# DOS / DJGPP makefile for Glide2
|
||||
#
|
||||
# Copyright (c) 2003 - Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (sst1, sst96, cvg, h3).
|
||||
# default = h3
|
||||
# H4=1 High speed Avenger.
|
||||
# target = h3
|
||||
# default = no
|
||||
# OPTFLAGS pass given optimization flags to compiler
|
||||
# target = sst1, sst96, cvg, h3
|
||||
# default = -O2 -ffast-math (+ -mcpu=pentium if USE_X86=1)
|
||||
# DEBUG=1 enable debugging checks and messages
|
||||
# target = sst1, sst96, cvg, h3
|
||||
# default = no
|
||||
# USE_X86=1 use assembler triangle specializations; req by CVG
|
||||
# target = sst1, sst96, cvg, h3
|
||||
# default = no
|
||||
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
|
||||
# capabilities are still checked at run-time to avoid
|
||||
# crashes.
|
||||
# target = cvg, h3
|
||||
# default = no
|
||||
# USE_MMX=1 (see USE_3DNOW)
|
||||
# target = cvg
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# all: build everything
|
||||
# clean: remove object files
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
|
||||
.PHONY: all clean realclean
|
||||
|
||||
export BUILD_NUMBER = 40404
|
||||
export FX_GLIDE_HW ?= h3
|
||||
|
||||
ifeq ($(FX_GLIDE_HW),sst96)
|
||||
G2_DIR = sst1/glide/src
|
||||
else
|
||||
G2_DIR = $(FX_GLIDE_HW)/glide/src
|
||||
endif
|
||||
|
||||
all:
|
||||
make -f Makefile.DJ -C $(G2_DIR)
|
||||
# USE_X86=1 USE_3DNOW=1 USE_MMX=1 USE_SSE=1 USE_SSE2=1
|
||||
|
||||
clean:
|
||||
make -f Makefile.DJ -C $(G2_DIR) clean
|
||||
|
||||
realclean:
|
||||
make -f Makefile.DJ -C $(G2_DIR) realclean
|
||||
@@ -1,6 +1,4 @@
|
||||
# Linux makefile for Glide2 and Texus2
|
||||
#
|
||||
# $Id$
|
||||
# Linux makefile for Glide2
|
||||
#
|
||||
# Copyright (c) 2003 - Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
@@ -9,7 +7,6 @@
|
||||
# Copyright (c) 2006 - Guillem Jover <guillem@hadrons.org>
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
@@ -19,9 +16,9 @@
|
||||
# DRI=1 Build DRI version.
|
||||
# target = h3
|
||||
# default = no
|
||||
# XPATH specify X libraries path; needed by DRI.
|
||||
# target = h3
|
||||
# default = /usr/X11R6/lib
|
||||
# XPATH specify X11 path; needed by SST96 and H3.
|
||||
# default = /usr/X11R6
|
||||
# X11LIBS X libraries path; default = $(XPATH)/lib
|
||||
# H4=1 High speed Avenger/Napalm.
|
||||
# target = h3
|
||||
# default = no
|
||||
@@ -40,7 +37,7 @@
|
||||
# target = cvg, h3
|
||||
# default = no
|
||||
# USE_MMX=1 (see USE_3DNOW)
|
||||
# target = h3
|
||||
# target = cvg
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
@@ -49,8 +46,6 @@
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
|
||||
|
||||
.PHONY: all clean realclean
|
||||
|
||||
.EXPORT_ALL_VARIABLES:
|
||||
@@ -59,16 +54,16 @@ export BUILD_NUMBER = 40404
|
||||
export FX_GLIDE_HW ?= h3
|
||||
|
||||
ifeq ($(FX_GLIDE_HW),sst96)
|
||||
G3_DIR = sst1/glide/src
|
||||
G2_DIR = sst1/glide/src
|
||||
else
|
||||
G3_DIR = $(FX_GLIDE_HW)/glide/src
|
||||
G2_DIR = $(FX_GLIDE_HW)/glide/src
|
||||
endif
|
||||
|
||||
all:
|
||||
make -f makefile.linux -C $(G3_DIR)
|
||||
make -f Makefile.linux -C $(G2_DIR)
|
||||
|
||||
clean:
|
||||
make -f makefile.linux -C $(G3_DIR) clean
|
||||
make -f Makefile.linux -C $(G2_DIR) clean
|
||||
|
||||
realclean:
|
||||
make -f makefile.linux -C $(G3_DIR) realclean
|
||||
make -f Makefile.linux -C $(G2_DIR) realclean
|
||||
67
glide2x/Makefile.mingw
Normal file
67
glide2x/Makefile.mingw
Normal file
@@ -0,0 +1,67 @@
|
||||
# Win32 makefile for Glide2, using MinGW environment
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2003 - Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# CROSS cross-compiler toolchain prefix
|
||||
# Needed when cross-compiling e.g. on Linux,
|
||||
# as opposed to compiling on native Windows.
|
||||
# default = i686-pc-mingw32-
|
||||
# (Note that a trailing '-' is necessary.)
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (sst1, sst96, cvg, h3).
|
||||
# default = h3
|
||||
# H4=1 High speed Avenger/Napalm.
|
||||
# target = h3
|
||||
# default = no
|
||||
# OPTFLAGS pass given optimization flags to compiler
|
||||
# target = sst1, sst96, cvg, h3
|
||||
# default = -O2 -ffast-math -mtune=pentium
|
||||
# DEBUG=1 enable debugging checks and messages
|
||||
# target = sst1, sst96, cvg, h3
|
||||
# default = no
|
||||
# USE_X86=1 use assembler triangle specializations
|
||||
# target = sst1, sst96, cvg, h3
|
||||
# default = no
|
||||
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
|
||||
# capabilities are still checked at run-time to avoid
|
||||
# crashes.
|
||||
# target = cvg, h3
|
||||
# default = no
|
||||
# USE_MMX=1 (see USE_3DNOW)
|
||||
# target = cvg
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# all: build everything
|
||||
# clean: remove object files
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
.PHONY: all clean realclean
|
||||
|
||||
export BUILD_NUMBER = 40404
|
||||
export FX_GLIDE_HW ?= h3
|
||||
|
||||
ifeq ($(FX_GLIDE_HW),sst96)
|
||||
G2_DIR = sst1/glide/src
|
||||
else
|
||||
G2_DIR = $(FX_GLIDE_HW)/glide/src
|
||||
endif
|
||||
|
||||
all:
|
||||
make -f Makefile.mingw -C $(G2_DIR)
|
||||
# USE_X86=1 USE_3DNOW=1 USE_MMX=1
|
||||
|
||||
clean:
|
||||
make -f Makefile.mingw -C $(G2_DIR) clean
|
||||
|
||||
realclean:
|
||||
make -f Makefile.mingw -C $(G2_DIR) realclean
|
||||
61
glide2x/Makefile.win32
Normal file
61
glide2x/Makefile.win32
Normal file
@@ -0,0 +1,61 @@
|
||||
# Win32 makefile for Glide2, using Visual Studio (cl.exe)
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2003 - Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (sst1, sst96, cvg, h3).
|
||||
# default = h3
|
||||
# H4=1 High speed Avenger/Napalm.
|
||||
# target = h3
|
||||
# default = no
|
||||
# OPTFLAGS pass given optimization flags to compiler
|
||||
# target = sst1, sst96, cvg, h3
|
||||
# default = -G6 -O2 (or -Od if DEBUG=1)
|
||||
# DEBUG=1 enable debugging checks and messages
|
||||
# target = sst1, sst96, cvg, h3
|
||||
# default = no
|
||||
# USE_X86=1 use assembler triangle specializations
|
||||
# target = sst1, sst96, cvg, h3
|
||||
# default = no
|
||||
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
|
||||
# capabilities are still checked at run-time to avoid
|
||||
# crashes.
|
||||
# target = cvg, h3
|
||||
# default = no
|
||||
# USE_MMX=1 (see USE_3DNOW)
|
||||
# target = cvg
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# all: build everything
|
||||
# clean: remove object files
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
.PHONY: all clean realclean
|
||||
|
||||
export BUILD_NUMBER = 40404
|
||||
export FX_GLIDE_HW ?= h3
|
||||
|
||||
ifeq ($(FX_GLIDE_HW),sst96)
|
||||
G2_DIR = sst1\glide\src
|
||||
else
|
||||
G2_DIR = $(FX_GLIDE_HW)\glide\src
|
||||
endif
|
||||
|
||||
all:
|
||||
make -f Makefile.win32 -C $(G2_DIR)
|
||||
# USE_X86=1 USE_3DNOW=1 USE_MMX=1
|
||||
|
||||
clean:
|
||||
make -f Makefile.win32 -C $(G2_DIR) clean
|
||||
|
||||
realclean:
|
||||
make -f Makefile.win32 -C $(G2_DIR) realclean
|
||||
@@ -29,3 +29,7 @@ swlibs branch. In order to build any glide library the swlibs branch
|
||||
must be moved inside the glide3x directory. The swlibs branch is not
|
||||
stored here within the glide2x cvs tree because it is also shared with
|
||||
the glide3x branch.
|
||||
|
||||
NOTE: glide2x tree is NOT 64-bit-safe. If you are cross-compiling for
|
||||
dos or windows on a 64-host remember to use the -m32 switch of host-gcc,
|
||||
e.g. run: make HOST_CC="gcc -m32" <other-stuff>
|
||||
|
||||
8
glide2x/clean_djgpp.sh
Executable file
8
glide2x/clean_djgpp.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#! /bin/sh
|
||||
|
||||
make -f Makefile.DJ FX_GLIDE_HW=cvg realclean
|
||||
make -f Makefile.DJ FX_GLIDE_HW=h3 realclean
|
||||
make -f Makefile.DJ FX_GLIDE_HW=sst1 realclean
|
||||
make -f Makefile.DJ FX_GLIDE_HW=sst96 realclean
|
||||
test -L swlibs && rm swlibs
|
||||
|
||||
18
glide2x/cross_djgpp.sh
Executable file
18
glide2x/cross_djgpp.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#! /bin/sh
|
||||
|
||||
# update the following to reflect your own cross-toolchain
|
||||
PATH=/usr/local/cross-djgpp/bin:$PATH
|
||||
DXE_LD_LIBRARY_PATH=/usr/local/cross-djgpp/i586-pc-msdosdjgpp/lib
|
||||
|
||||
export PATH
|
||||
export DXE_LD_LIBRARY_PATH
|
||||
|
||||
test -d swlibs || ln -s ../swlibs swlibs
|
||||
make -f Makefile.DJ FX_GLIDE_HW=cvg clean
|
||||
make -f Makefile.DJ FX_GLIDE_HW=cvg USE_X86=1 USE_3DNOW=1 USE_MMX=1 CC=i586-pc-msdosdjgpp-gcc AR=i586-pc-msdosdjgpp-ar
|
||||
make -f Makefile.DJ FX_GLIDE_HW=h3 clean
|
||||
make -f Makefile.DJ FX_GLIDE_HW=h3 USE_X86=1 USE_3DNOW=1 USE_MMX=1 CC=i586-pc-msdosdjgpp-gcc AR=i586-pc-msdosdjgpp-ar
|
||||
make -f Makefile.DJ FX_GLIDE_HW=sst1 clean
|
||||
make -f Makefile.DJ FX_GLIDE_HW=sst1 USE_X86=1 USE_3DNOW=1 USE_MMX=1 CC=i586-pc-msdosdjgpp-gcc AR=i586-pc-msdosdjgpp-ar
|
||||
make -f Makefile.DJ FX_GLIDE_HW=sst96 clean
|
||||
make -f Makefile.DJ FX_GLIDE_HW=sst96 USE_X86=1 USE_3DNOW=1 USE_MMX=1 CC=i586-pc-msdosdjgpp-gcc AR=i586-pc-msdosdjgpp-ar
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
#
|
||||
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
# THE UNITED STATES.
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
LDIRT = *.exe *.dll *.bat
|
||||
|
||||
!include $(BUILD_ROOT_SWLIBS)/include/nmake/3dfx.mak
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
#
|
||||
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
# THE UNITED STATES.
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
LDIRT = $(patsubst CVS,,$(patsubst makefile%,,$(wildcard *)))
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
@@ -1,27 +0,0 @@
|
||||
#
|
||||
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
#
|
||||
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
# THE UNITED STATES.
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
INSTALL_DESTINATION=$(BUILD_ROOT)\cvg
|
||||
|
||||
!include $(BUILD_ROOT_SWLIBS)\include\nmake\3dfx.mak
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
#
|
||||
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
# THE UNITED STATES.
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#
|
||||
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
#
|
||||
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
# THE UNITED STATES.
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
THISDIR = cmd
|
||||
SUBDIRS = pass
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
@@ -17,9 +17,6 @@
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
# local defines, options, includes
|
||||
LCDEFS =
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
#
|
||||
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
#
|
||||
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
# THE UNITED STATES.
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
THISDIR = glide
|
||||
!if "$(FX_TARGET)" == "DOS"
|
||||
SUBDIRS = src tests
|
||||
!else
|
||||
SUBDIRS = oem src tests
|
||||
!endif
|
||||
|
||||
!include $(BUILD_ROOT_SWLIBS)/include/nmake/3dfx.mak
|
||||
@@ -1,24 +0,0 @@
|
||||
#
|
||||
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
#
|
||||
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
# THE UNITED STATES.
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
#
|
||||
|
||||
THISDIR = glide
|
||||
SUBDIRS = oem src tests
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
@@ -1,24 +0,0 @@
|
||||
#
|
||||
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
#
|
||||
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
# THE UNITED STATES.
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
#
|
||||
|
||||
THISDIR = glide
|
||||
SUBDIRS = oem src tests
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
@@ -17,9 +17,6 @@
|
||||
*
|
||||
* COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
*
|
||||
* $Header$
|
||||
* $Log$
|
||||
*
|
||||
* 1 7/25/97 9:05a Pgj
|
||||
* generate fxbldno.h which defines BUILD_NUMBER
|
||||
*
|
||||
@@ -29,7 +26,7 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
struct tm locTime;
|
||||
time_t sysTime;
|
||||
@@ -38,7 +35,7 @@ main(int argc, char **argv)
|
||||
time(&sysTime);
|
||||
locTime = *localtime(&sysTime);
|
||||
|
||||
if (build = getenv("BUILD_NUMBER")) {
|
||||
if ((build = getenv("BUILD_NUMBER")) != NULL) {
|
||||
printf("#define BUILD_NUMBER %s\n", build);
|
||||
} else {
|
||||
unsigned short magic;
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
#
|
||||
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
#
|
||||
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
# THE UNITED STATES.
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
|
||||
!if "$(FX_GLIDE_HW)" == "sst96"
|
||||
GLIDE_SRC_BASE = sst1
|
||||
!else
|
||||
GLIDE_SRC_BASE = $(FX_GLIDE_HW)
|
||||
!endif
|
||||
LCINCS = $(LCINCS) -I$(BUILD_ROOT)\$(GLIDE_SRC_BASE)\include \
|
||||
-I$(BUILD_ROOT)\$(GLIDE_SRC_BASE)\glide\src
|
||||
|
||||
!if "$(DEBUG)" == "1"
|
||||
LCDEFS = -DDEBUG=1
|
||||
!endif
|
||||
|
||||
CFILES = oeminit.c
|
||||
RCFILE = oeminit.rc
|
||||
HEADERS = oeminit.h
|
||||
PRIVATE_HEADERS = rcver.h
|
||||
LIBRARIES = fxoem2x.lib
|
||||
|
||||
INSTALL_DESTINATION = $(BUILD_ROOT)\$(GLIDE_SRC_BASE)
|
||||
|
||||
# Make a static link library for things like the diags.
|
||||
!if "$(FX_DLL_BUILD)" == "1"
|
||||
FX_DLL_LIBRARY = 1
|
||||
!else
|
||||
LCDEFS = $(LCDEFS) -DFX_STATIC_BUILD
|
||||
!endif
|
||||
|
||||
LCDEFS = $(LCDEFS)
|
||||
|
||||
!include $(BUILD_ROOT)\swlibs/include/nmake/3dfx.mak
|
||||
|
||||
!if "$(FX_TARGET)" == "WIN32"
|
||||
!if "$(FX_DLL_BUILD)" != ""
|
||||
fxoem2x.dll:
|
||||
!endif
|
||||
!endif
|
||||
|
||||
fxbldno.exe: fxbldno.c $(HEADERS) $(PRIVATE_HEADERS)
|
||||
$(CC) -o $@ fxbldno.c $(GCDEFS) $(LCDEFS) $(VCDEFS) $(LCOPTS) $(LDFLAGS)
|
||||
|
||||
fxbldno.h: fxbldno.exe
|
||||
fxbldno > fxbldno.h
|
||||
|
||||
oeminit.res: rcver.h fxbldno.h
|
||||
@@ -1,49 +0,0 @@
|
||||
#
|
||||
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
#
|
||||
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
# THE UNITED STATES.
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
|
||||
ifeq ($(FX_GLIDE_HW),sst96)
|
||||
GLIDE_SRC_BASE = sst1
|
||||
else
|
||||
GLIDE_SRC_BASE = $(FX_GLIDE_HW)
|
||||
endif
|
||||
LCINCS += -I$(BUILD_ROOT)\$(GLIDE_SRC_BASE)/include \
|
||||
-I$(BUILD_ROOT)/$(GLIDE_SRC_BASE)/glide/src
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
DBGOPTS = -DGLIDE_DEBUG -DGDBG_INFO_ON
|
||||
GLIDE_SANITY_ALL = 1
|
||||
endif
|
||||
|
||||
CFILES = oeminit.c
|
||||
|
||||
HEADERS = oeminit.h
|
||||
|
||||
INSTALL_DESTINATION = $(BUILD_ROOT)/$(GLIDE_SRC_BASE)
|
||||
|
||||
LIBRARIES = libfxoem2x.a
|
||||
|
||||
# Make a static link library for things like the diags.
|
||||
ifeq ($(FX_DLL_BUILD),1)
|
||||
FX_DLL_LIBRARY = 1
|
||||
else
|
||||
LCDEFS += -DFX_STATIC_BUILD
|
||||
endif
|
||||
|
||||
include $(BUILD_ROOT)/swlibs/include/make/3dfx.mak
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef __linux__
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
@@ -92,27 +92,30 @@ MyDebugPrintf(FILE* outputFile, const char* fmtString, ...)
|
||||
|
||||
debugDumpP = ((envStr != NULL) &&
|
||||
(atoi(envStr) >= 80));
|
||||
|
||||
|
||||
calledP = FXTRUE;
|
||||
}
|
||||
|
||||
if (debugDumpP) {
|
||||
va_list args;
|
||||
|
||||
|
||||
#if !DIRECTX
|
||||
va_start(args, fmtString);
|
||||
if (outputFile != NULL) vfprintf(outputFile, fmtString, args);
|
||||
va_end(args);
|
||||
#endif /* !DIRECTX */
|
||||
|
||||
|
||||
va_start(args, fmtString);
|
||||
#if __WIN32__
|
||||
{
|
||||
//char msgBuf[256];
|
||||
|
||||
vfprintf(stderr, fmtString, args);
|
||||
//vsprintf(msgBuf, fmtString, args);
|
||||
//OutputDebugString(msgBuf);
|
||||
char msgBuf[256];
|
||||
|
||||
vsprintf(msgBuf, fmtString, args);
|
||||
OutputDebugString(msgBuf);
|
||||
}
|
||||
#else
|
||||
vfprintf(stderr, fmtString, args);
|
||||
#endif
|
||||
va_end(args);
|
||||
}
|
||||
}
|
||||
@@ -159,7 +162,7 @@ GlideRes2String(GrScreenResolution_t res)
|
||||
|
||||
static const char*
|
||||
GlideRefresh2String(GrScreenRefresh_t refresh)
|
||||
{
|
||||
{
|
||||
static const char* refreshStrings[] = {
|
||||
"60", "70", "72", "75", "80", "90", "100", "85", "120"
|
||||
};
|
||||
@@ -368,5 +371,3 @@ FX_EXPORT FxU32 FX_CSTYLE fxoemControl(FxU32 mode)
|
||||
return 1;
|
||||
#undef FN_NAME
|
||||
} /* fxoemRestoreVideo */
|
||||
|
||||
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*/
|
||||
|
||||
#define OFFICIAL 1
|
||||
@@ -26,7 +23,6 @@
|
||||
|
||||
#include <fxver.h>
|
||||
#include "rcver.h"
|
||||
#include "fxbldno.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
@@ -18,9 +18,13 @@
|
||||
* COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
*/
|
||||
|
||||
/*#include "fxbldno.h"*/
|
||||
|
||||
#define MANVERSION 2
|
||||
#define MANREVISION 53
|
||||
|
||||
#define BUILD_NUMBER 40405
|
||||
|
||||
#ifndef GLIDE3
|
||||
#define VERSIONSTR "2.53\0"
|
||||
#else
|
||||
|
||||
286
glide2x/cvg/glide/src/Makefile.DJ
Normal file
286
glide2x/cvg/glide/src/Makefile.DJ
Normal file
@@ -0,0 +1,286 @@
|
||||
# DOS/DJGPP makefile for Glide2/CVG
|
||||
#
|
||||
# Copyright (c) 2003 - Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# CPU optimize for the given processor.
|
||||
# default = -mtune=pentium
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
# default = no
|
||||
# USE_X86=1 use assembler triangle specializations; req by CVG
|
||||
# default = yes
|
||||
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
|
||||
# capabilities are still checked at run-time to avoid
|
||||
# crashes.
|
||||
# default = no
|
||||
# USE_MMX=1 allow MMX specializations.
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# all: build everything
|
||||
# glide2x: build Glide2x lib
|
||||
# clean: remove object files
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
.PHONY: all glide2x clean realclean
|
||||
.INTERMEDIATE: fxgasm.exe
|
||||
|
||||
###############################################################################
|
||||
# general defines (user settable?)
|
||||
###############################################################################
|
||||
|
||||
GLIDE_LIB = libglide2x.a
|
||||
GLIDE_DXE = glide2x.dxe
|
||||
GLIDE_IMP = libglide2i.a
|
||||
|
||||
FX_GLIDE_SW = ../../../swlibs
|
||||
GLIDE_LIBDIR = ../../lib
|
||||
|
||||
###############################################################################
|
||||
# tools
|
||||
###############################################################################
|
||||
|
||||
CC = gcc
|
||||
AS = nasm
|
||||
LD = $(CC)
|
||||
AR = ar
|
||||
DXE3GEN = dxe3gen
|
||||
|
||||
#for cross-builds
|
||||
HOST_CC = gcc
|
||||
|
||||
UNLINK = rm -f $(1)
|
||||
|
||||
###############################################################################
|
||||
# defines
|
||||
###############################################################################
|
||||
|
||||
# platform
|
||||
CDEFS = -D__DOS__ -D__DOS32__ -DINIT_DOS -D__3Dfx_PCI_CFG__
|
||||
|
||||
# general
|
||||
CDEFS += -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=1 -DGLIDE_TRI_CULLING=1 -DGLIDE_DEFAULT_GAMMA=1.3f -DGLIDE_LIB=1
|
||||
|
||||
# workaround for CVGs with broken tsus which cannot send commands to multiple
|
||||
# tmus using chipfield. chipfield will always be set to 0xf
|
||||
CDEFS += -DGLIDE_CHIP_BROADCAST=1
|
||||
# special sli buffer clears
|
||||
CDEFS += -DGLIDE_BLIT_CLEAR=1
|
||||
|
||||
# subsystem
|
||||
CDEFS += -DCVG
|
||||
|
||||
# debug
|
||||
ifdef DEBUG
|
||||
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
|
||||
endif
|
||||
|
||||
override USE_FIFO = 1
|
||||
#override USE_X86 = 1
|
||||
|
||||
ifeq ($(USE_X86),1)
|
||||
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1
|
||||
override USE_FIFO = 1
|
||||
CDEFS += -DHAVE_XDRAWTRI_ASM=1
|
||||
override USE_DRAWTRI_ASM = 1
|
||||
else
|
||||
CDEFS += -DGLIDE_USE_C_TRISETUP=1
|
||||
endif
|
||||
|
||||
# fifo
|
||||
ifeq ($(USE_FIFO),1)
|
||||
CDEFS += -DUSE_PACKET_FIFO=1 -DGLIDE_PACKET3_TRI_SETUP=1
|
||||
endif
|
||||
|
||||
# shameless plug and splash screen
|
||||
#CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
|
||||
|
||||
###############################################################################
|
||||
# flags
|
||||
###############################################################################
|
||||
|
||||
# librarian
|
||||
ARFLAGS = rus
|
||||
|
||||
# assembler
|
||||
ASFLAGS = -O2 -fcoff -D__DJGPP__ --prefix _
|
||||
ASFLAGS += $(CDEFS)
|
||||
|
||||
# compiler
|
||||
CFLAGS = -Wall
|
||||
CFLAGS += -I. -I../../incsrc -I../../init
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
|
||||
CFLAGS += $(CDEFS)
|
||||
|
||||
# cpu optimized triangle
|
||||
ifeq ($(USE_MMX),1)
|
||||
CFLAGS += -DGL_MMX
|
||||
override USE_X86 = 1
|
||||
endif
|
||||
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
CFLAGS += -DGL_AMD3D
|
||||
override USE_X86 = 1
|
||||
endif
|
||||
|
||||
ifeq ($(USE_X86),1)
|
||||
OPTFLAGS ?= -O1 -ffast-math -mtune=pentium
|
||||
else
|
||||
OPTFLAGS ?= -O1 -ffast-math
|
||||
endif
|
||||
|
||||
# optflags
|
||||
CFLAGS += $(OPTFLAGS)
|
||||
|
||||
# for cross-builds
|
||||
HOST_CFLAGS=$(filter-out -mcpu=% -mtune=% -march=%,$(CFLAGS))
|
||||
|
||||
###############################################################################
|
||||
# objects
|
||||
###############################################################################
|
||||
|
||||
GLIDE_OBJECTS = \
|
||||
fifo.o \
|
||||
gsplash.o \
|
||||
g3df.o \
|
||||
gu.o \
|
||||
guclip.o \
|
||||
gpci.o \
|
||||
gump.o \
|
||||
diglide.o \
|
||||
disst.o \
|
||||
ditex.o \
|
||||
gbanner.o \
|
||||
gerror.o \
|
||||
gmovie.o \
|
||||
digutex.o \
|
||||
ddgump.o \
|
||||
gaa.o \
|
||||
gdraw.o \
|
||||
gglide.o \
|
||||
glfb.o \
|
||||
gsst.o \
|
||||
gtex.o \
|
||||
gtexdl.o \
|
||||
gutex.o \
|
||||
cpuid.o \
|
||||
fpu.o \
|
||||
xtexdl_def.o
|
||||
|
||||
ifeq ($(USE_DRAWTRI_ASM),1)
|
||||
GLIDE_OBJECTS += xdrawtri.o
|
||||
endif
|
||||
ifeq ($(USE_X86),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_def.o
|
||||
ifeq ($(USE_MMX),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xtexdl_mmx.o
|
||||
endif
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_3dnow.o \
|
||||
xtexdl_3dnow.o
|
||||
endif
|
||||
else
|
||||
GLIDE_OBJECTS += \
|
||||
gxdraw.o
|
||||
endif
|
||||
|
||||
GLIDE_OBJECTS += \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxmsr.o \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxpci.o \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxdpmi2.o \
|
||||
../../init/canopus.o \
|
||||
../../init/dac.o \
|
||||
../../init/gamma.o \
|
||||
../../init/gdebug.o \
|
||||
../../init/info.o \
|
||||
../../init/parse.o \
|
||||
../../init/print.o \
|
||||
../../init/sli.o \
|
||||
../../init/sst1init.o \
|
||||
../../init/util.o \
|
||||
../../init/video.o \
|
||||
../../init/fxremap.o
|
||||
|
||||
###############################################################################
|
||||
# rules
|
||||
###############################################################################
|
||||
|
||||
.c.o:
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
|
||||
###############################################################################
|
||||
# main
|
||||
###############################################################################
|
||||
all: glide2x
|
||||
|
||||
glide2x: $(GLIDE_LIBDIR)/$(GLIDE_LIB) $(GLIDE_LIBDIR)/$(GLIDE_DXE) $(GLIDE_LIBDIR)/$(GLIDE_IMP)
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_LIB): $(GLIDE_OBJECTS)
|
||||
$(AR) $(ARFLAGS) $@ $^
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_DXE) $(GLIDE_LIBDIR)/$(GLIDE_IMP): $(GLIDE_OBJECTS)
|
||||
-$(DXE3GEN) -o $(GLIDE_LIBDIR)/$(GLIDE_DXE) -Y $(GLIDE_LIBDIR)/$(GLIDE_IMP) -E _gr -E _gu -E _ConvertAndDownloadRle -U $^
|
||||
|
||||
###############################################################################
|
||||
# rules(2)
|
||||
###############################################################################
|
||||
|
||||
#cpuid.o: cpudtect.asm
|
||||
# $(AS) -o $@ $(ASFLAGS) $<
|
||||
xdraw2_def.o: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xtexdl_def.o: xtexdl.c
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
xtexdl_mmx.o: xtexdl.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_MMX=1 $<
|
||||
xdraw2_3dnow.o: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xtexdl_3dnow.o: xtexdl.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xdrawtri.o: xdrawtri.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
|
||||
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
|
||||
|
||||
# cross-compile workaround:
|
||||
ifneq ($(COMSPEC),)
|
||||
RUN_FXGASM=fxgasm.exe
|
||||
else
|
||||
RUN_FXGASM=./fxgasm.exe
|
||||
endif
|
||||
|
||||
fxinline.h: fxgasm.exe
|
||||
$(RUN_FXGASM) -inline > $@
|
||||
|
||||
fxgasm.h: fxgasm.exe
|
||||
$(RUN_FXGASM) -hex > $@
|
||||
|
||||
fxgasm.exe: fxgasm.c
|
||||
$(HOST_CC) -o $@ $(HOST_CFLAGS) $<
|
||||
|
||||
###############################################################################
|
||||
# clean, realclean
|
||||
###############################################################################
|
||||
|
||||
clean:
|
||||
-$(call UNLINK,*.o)
|
||||
-$(call UNLINK,../../init/*.o)
|
||||
-$(call UNLINK,$(FX_GLIDE_SW)/newpci/pcilib/*.o)
|
||||
-$(call UNLINK,fxinline.h)
|
||||
-$(call UNLINK,fxgasm.h)
|
||||
-$(call UNLINK,../oem/oeminit.o)
|
||||
|
||||
realclean: clean
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_LIB))
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DXE))
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_IMP))
|
||||
@@ -1,8 +1,6 @@
|
||||
# Linux makefile for Glide2/CVG
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2004 - Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
@@ -14,13 +12,10 @@
|
||||
# Copyright (c) 2006 - Guillem Jover <guillem@hadrons.org>
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = cvg
|
||||
# CPU optimize for the given processor.
|
||||
# default = 6 (PentiumPro)
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
@@ -43,8 +38,6 @@
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
|
||||
|
||||
.PHONY: all glide2x clean realclean
|
||||
.INTERMEDIATE: fxgasm
|
||||
.SUFFIXES: .lo
|
||||
@@ -60,10 +53,10 @@ GLIDE_VERSION_MINOR = 53
|
||||
|
||||
GLIDE_LIB = libglide.a
|
||||
GLIDE_SO = libglide.so
|
||||
GLIDE_SO_X= libglide2x.so
|
||||
GLIDE_SONAME = $(GLIDE_SO).$(GLIDE_VERSION_MAJOR)
|
||||
GLIDE_SHARED = $(GLIDE_SONAME).$(GLIDE_VERSION_MINOR)
|
||||
|
||||
FX_GLIDE_HW ?= cvg
|
||||
FX_GLIDE_SW = ../../../swlibs
|
||||
GLIDE_LIBDIR = ../../lib
|
||||
|
||||
@@ -92,7 +85,7 @@ CDEFS += -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=1 -DGLIDE_TRI_CULLING=1 -DGLI
|
||||
# special sli buffer clears
|
||||
CDEFS += -DGLIDE_BLIT_CLEAR=1
|
||||
|
||||
# workaround for CVGs with broken tsus which cannot send commands to multiple
|
||||
# workaround for CVGs with broken tsus which cannot send commands to multiple
|
||||
# tmus using chipfield. chipfield will always be set to 0xf
|
||||
CDEFS += -DGLIDE_CHIP_BROADCAST=1
|
||||
|
||||
@@ -110,6 +103,8 @@ override USE_FIFO = 1
|
||||
ifeq ($(USE_X86),1)
|
||||
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1
|
||||
override USE_FIFO = 1
|
||||
CDEFS += -DHAVE_XDRAWTRI_ASM=1
|
||||
override USE_DRAWTRI_ASM = 1
|
||||
else
|
||||
CDEFS += -DGLIDE_USE_C_TRISETUP=1
|
||||
endif
|
||||
@@ -134,7 +129,7 @@ ASFLAGS = -O6 -felf -D__linux__
|
||||
ASFLAGS += $(CDEFS)
|
||||
|
||||
# compiler
|
||||
CFLAGS = -Wall -W
|
||||
CFLAGS = -Wall
|
||||
CFLAGS += -I. -I../../incsrc -I../../init
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
|
||||
CFLAGS += $(CDEFS)
|
||||
@@ -154,7 +149,6 @@ ifeq ($(USE_X86),1)
|
||||
CFLAGS += -DGL_X86
|
||||
OPTFLAGS ?= -O2 -ffast-math
|
||||
else
|
||||
CFLAGS += -DGLIDE_USE_C_TRISETUP
|
||||
OPTFLAGS ?= -O2 -ffast-math
|
||||
endif
|
||||
|
||||
@@ -193,6 +187,9 @@ GLIDE_OBJECTS = \
|
||||
fpu.o \
|
||||
xtexdl_def.o
|
||||
|
||||
ifeq ($(USE_DRAWTRI_ASM),1)
|
||||
GLIDE_OBJECTS += xdrawtri.o
|
||||
endif
|
||||
ifeq ($(USE_X86),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_def.o
|
||||
@@ -246,16 +243,20 @@ GLIDE_OBJECTS += \
|
||||
###############################################################################
|
||||
all: glide2x fxoem2x
|
||||
|
||||
glide2x: $(GLIDE_LIBDIR)/$(GLIDE_LIB) $(GLIDE_LIBDIR)/$(GLIDE_SO)
|
||||
glide2x: $(GLIDE_LIBDIR)/$(GLIDE_LIB) $(GLIDE_LIBDIR)/$(GLIDE_SO) $(GLIDE_LIBDIR)/$(GLIDE_SONAME) $(GLIDE_LIBDIR)/$(GLIDE_SO_X)
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_LIB): $(GLIDE_OBJECTS)
|
||||
$(AR) $(ARFLAGS) $@ $^
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_SO): $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
|
||||
ln -fs $(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SO)
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_SONAME): $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
|
||||
ln -fs $(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SONAME)
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_SO_X): $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
|
||||
ln -fs $(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SO_X)
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_SHARED): $(GLIDE_OBJECTS:.o=.lo)
|
||||
$(CC) -o $@ -shared -Wl,-soname,$(GLIDE_SONAME) $^ $(LDFLAGS) $(LDLIBS)
|
||||
$(CC) -o $@ -shared -Wl,--no-undefined -Wl,-soname,$(GLIDE_SONAME) $^ $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
ifeq ($(FXOEM2X),1)
|
||||
$(GLIDE_LIBDIR)/libfxoem2x.so: ../oem/oeminit.o
|
||||
@@ -283,6 +284,8 @@ xdraw2_3dnow.o: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xtexdl_3dnow.o: xtexdl.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xdrawtri.o: xdrawtri.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
|
||||
#cpuid.lo: cpuid.o
|
||||
# $(CP) $< $@
|
||||
@@ -296,6 +299,8 @@ xdraw2_3dnow.lo: xdraw2_3dnow.o
|
||||
$(CP) $< $@
|
||||
xtexdl_3dnow.lo: xtexdl_3dnow.o
|
||||
$(CP) $< $@
|
||||
xdrawtri.lo: xdrawtri.o
|
||||
$(CP) $< $@
|
||||
|
||||
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
|
||||
|
||||
@@ -315,7 +320,9 @@ fxgasm: fxgasm.c
|
||||
clean:
|
||||
-$(RM) *.o *.lo
|
||||
-$(RM) ../../init/*.o ../../init/*.lo
|
||||
-$(RM) ../oem/*.o ../oem/*.lo
|
||||
-$(RM) $(FX_GLIDE_SW)/newpci/pcilib/*.o $(FX_GLIDE_SW)/newpci/pcilib/*.lo
|
||||
-$(RM) $(FX_GLIDE_SW)/fxmisc/*.o $(FX_GLIDE_SW)/fxmisc/*.lo
|
||||
-$(RM) fxinline.h
|
||||
-$(RM) fxgasm.h
|
||||
|
||||
@@ -323,3 +330,5 @@ realclean: clean
|
||||
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
|
||||
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SO)
|
||||
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SONAME)
|
||||
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SO_X)
|
||||
356
glide2x/cvg/glide/src/Makefile.mingw
Normal file
356
glide2x/cvg/glide/src/Makefile.mingw
Normal file
@@ -0,0 +1,356 @@
|
||||
# Win32 makefile for Glide2/CVG
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2004
|
||||
#
|
||||
# Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# Hiroshi Morii
|
||||
# Email : koolsmoky@users.sourceforge.net
|
||||
# Web : http://www.3dfxzone.it/koolsmoky
|
||||
#
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# CROSS cross-compiler toolchain prefix
|
||||
# Needed when cross-compiling e.g. on Linux,
|
||||
# as opposed to compiling on native Windows.
|
||||
# default = i686-pc-mingw32-
|
||||
# (Note that a trailing '-' is necessary.)
|
||||
#
|
||||
# Environment variables:
|
||||
# CPU optimize for the given processor.
|
||||
# default = -mtune=pentium
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
# default = no
|
||||
# USE_X86=1 use assembler triangle specializations; req by CVG
|
||||
# default = yes
|
||||
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
|
||||
# capabilities are still checked at run-time to avoid
|
||||
# crashes.
|
||||
# default = no
|
||||
# USE_MMX=1 allow MMX specializations.
|
||||
# default = no
|
||||
# FXOEM2X=1 build fxoem2x.dll
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# all: build everything
|
||||
# glide2x: build Glide2x lib
|
||||
# clean: remove object files
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
.PHONY: all glide2x clean realclean
|
||||
.INTERMEDIATE: fxgasm.exe
|
||||
.SUFFIXES: .c .obj .rc .res
|
||||
|
||||
###############################################################################
|
||||
# general defines (user settable?)
|
||||
###############################################################################
|
||||
|
||||
GLIDE_RES = glide.res
|
||||
GLIDE_DLL = glide2x.dll
|
||||
GLIDE_DEF = glide2x.def
|
||||
GLIDE_IMP = libglide2x.dll.a
|
||||
|
||||
FX_GLIDE_SW = ../../../swlibs
|
||||
GLIDE_LIBDIR = ../../lib
|
||||
|
||||
###############################################################################
|
||||
# tools
|
||||
###############################################################################
|
||||
|
||||
# default cross-toolchain prefix
|
||||
DEF_CROSS=i686-pc-mingw32-
|
||||
#DEF_CROSS=i686-w64-mingw32-
|
||||
|
||||
# detect if running under unix by finding 'rm' in $PATH :
|
||||
ifeq ($(wildcard $(addsuffix /rm,$(subst :, ,$(PATH)))),)
|
||||
WINMODE= 1
|
||||
UNLINK = del $(subst /,\,$(1))
|
||||
HOST_CC = $(CC)
|
||||
else
|
||||
WINMODE= 0
|
||||
UNLINK = $(RM) $(1)
|
||||
ifeq ($(CROSS),)
|
||||
CROSS=$(DEF_CROSS)
|
||||
endif
|
||||
endif
|
||||
|
||||
CC = $(CROSS)gcc
|
||||
AS = nasm
|
||||
LD = $(CC)
|
||||
RC = $(CROSS)windres
|
||||
DLLTOOL = $(CROSS)dlltool
|
||||
STRIP = $(CROSS)strip
|
||||
|
||||
ifeq ($(WINMODE),1)
|
||||
HOST_CC = $(CC)
|
||||
else
|
||||
#for cross-builds
|
||||
HOST_CC = gcc
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# defines
|
||||
###############################################################################
|
||||
|
||||
# platform
|
||||
CDEFS = -D__WIN32__ -DDIRECTX -DFX_DLL_ENABLE -D__3Dfx_PCI_CFG__
|
||||
# MSVC doesn't define WINNT, but MinGW does. The Glide
|
||||
# source uses WINNT for its own purposes, so undefine it.
|
||||
CDEFS += -UWINNT
|
||||
|
||||
# general
|
||||
CDEFS += -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=1 -DGLIDE_TRI_CULLING=1 -DGLIDE_DEFAULT_GAMMA=1.3f -DGLIDE_LIB=1
|
||||
#CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE3_SCALER
|
||||
|
||||
# special sli buffer clears
|
||||
CDEFS += -DGLIDE_BLIT_CLEAR=1
|
||||
|
||||
# workaround for CVGs with broken tsus which cannot send commands to multiple
|
||||
# tmus using chipfield. chipfield will always be set to 0xf
|
||||
CDEFS += -DGLIDE_CHIP_BROADCAST=1
|
||||
|
||||
# subsystem
|
||||
CDEFS += -DCVG
|
||||
|
||||
# debug
|
||||
ifdef DEBUG
|
||||
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
|
||||
endif
|
||||
|
||||
override USE_FIFO = 1
|
||||
#override USE_X86 = 1
|
||||
|
||||
ifeq ($(USE_X86),1)
|
||||
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1
|
||||
override USE_FIFO = 1
|
||||
CDEFS += -DHAVE_XDRAWTRI_ASM=1
|
||||
override USE_DRAWTRI_ASM = 1
|
||||
else
|
||||
CDEFS += -DGLIDE_USE_C_TRISETUP=1
|
||||
endif
|
||||
|
||||
# fifo
|
||||
ifeq ($(USE_FIFO),1)
|
||||
CDEFS += -DUSE_PACKET_FIFO=1 -DGLIDE_PACKET3_TRI_SETUP=1
|
||||
endif
|
||||
|
||||
# shameless plug and splash screen
|
||||
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
|
||||
|
||||
###############################################################################
|
||||
# flags
|
||||
###############################################################################
|
||||
|
||||
# linker
|
||||
LDFLAGS = -shared -m32 -Wl,--enable-auto-image-base -Wl,--no-undefined
|
||||
# -Xlinker --output-def -Xlinker $(GLIDE_LIBDIR)/$(GLIDE_DEF)
|
||||
# -Xlinker --out-implib -Xlinker $(GLIDE_LIBDIR)/$(GLIDE_IMP)
|
||||
DLLTOOL_FLAGS = --as-flags=--32 -m i386 -U
|
||||
#DLLTOOL_FLAGS+= -k
|
||||
|
||||
# assembler
|
||||
ASFLAGS = -O2 -fwin32 -D__WIN32__ --prefix _
|
||||
ASFLAGS += $(CDEFS)
|
||||
|
||||
# resource compiler
|
||||
RCFLAGS = --output-format=coff --target=pe-i386
|
||||
|
||||
# compiler
|
||||
CFLAGS = -m32 -Wall
|
||||
|
||||
LDLIBS = -luser32 -lkernel32 -ladvapi32
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g
|
||||
else
|
||||
CPU ?= -mtune=pentium
|
||||
CFLAGS += -DNDEBUG -O2 -ffast-math $(CPU)
|
||||
endif
|
||||
|
||||
CFLAGS += -I. -I../../incsrc -I../../init
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
|
||||
CFLAGS += $(CDEFS)
|
||||
|
||||
# cpu optimized triangle
|
||||
ifeq ($(USE_MMX),1)
|
||||
CFLAGS += -DGL_MMX
|
||||
override USE_X86 = 1
|
||||
endif
|
||||
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
CFLAGS += -DGL_AMD3D
|
||||
override USE_X86 = 1
|
||||
endif
|
||||
|
||||
ifeq ($(WINMODE),1)
|
||||
HOST_CFLAGS=$(CFLAGS)
|
||||
else
|
||||
# for cross-builds
|
||||
HOST_CFLAGS=$(filter-out -mcpu=% -mtune=% -DFX_DLL_ENABLE -march=%,$(CFLAGS))
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# objects
|
||||
###############################################################################
|
||||
|
||||
GLIDE_OBJECTS = \
|
||||
fifo.o \
|
||||
gsplash.o \
|
||||
g3df.o \
|
||||
gu.o \
|
||||
guclip.o \
|
||||
gpci.o \
|
||||
gump.o \
|
||||
diglide.o \
|
||||
disst.o \
|
||||
ditex.o \
|
||||
gbanner.o \
|
||||
gerror.o \
|
||||
gmovie.o \
|
||||
digutex.o \
|
||||
ddgump.o \
|
||||
gaa.o \
|
||||
gdraw.o \
|
||||
gglide.o \
|
||||
glfb.o \
|
||||
gsst.o \
|
||||
gtex.o \
|
||||
gtexdl.o \
|
||||
gutex.o \
|
||||
cpuid.o \
|
||||
fpu.o \
|
||||
xtexdl_def.o
|
||||
|
||||
ifeq ($(USE_DRAWTRI_ASM),1)
|
||||
GLIDE_OBJECTS += xdrawtri.o
|
||||
endif
|
||||
ifeq ($(USE_X86),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_def.o
|
||||
ifeq ($(USE_MMX),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xtexdl_mmx.o
|
||||
endif
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_3dnow.o \
|
||||
xtexdl_3dnow.o
|
||||
endif
|
||||
else
|
||||
GLIDE_OBJECTS += \
|
||||
gxdraw.o
|
||||
endif
|
||||
|
||||
GLIDE_OBJECTS += \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxpci.o \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxw32.o \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxvxd.o \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxnt.o \
|
||||
$(FX_GLIDE_SW)/newpci/pcilib/fxmsr.o \
|
||||
../../init/canopus.o \
|
||||
../../init/dac.o \
|
||||
../../init/gamma.o \
|
||||
../../init/gdebug.o \
|
||||
../../init/info.o \
|
||||
../../init/parse.o \
|
||||
../../init/print.o \
|
||||
../../init/sli.o \
|
||||
../../init/sst1init.o \
|
||||
../../init/util.o \
|
||||
../../init/video.o \
|
||||
../../init/fxremap.o
|
||||
|
||||
###############################################################################
|
||||
# rules
|
||||
###############################################################################
|
||||
|
||||
.c.o:
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
.rc.res:
|
||||
$(RC) -o $@ $(RCFLAGS) $(CDEFS) -I$(FX_GLIDE_SW)/fxmisc $<
|
||||
|
||||
###############################################################################
|
||||
# main
|
||||
###############################################################################
|
||||
all: glide2x fxoem2x
|
||||
|
||||
glide2x: $(GLIDE_LIBDIR)/$(GLIDE_DLL) $(GLIDE_LIBDIR)/$(GLIDE_IMP)
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_DEF): $(GLIDE_LIBDIR)/$(GLIDE_DLL)
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES)
|
||||
$(LD) -o $@ $(LDFLAGS) -Xlinker --output-def -Xlinker $(GLIDE_LIBDIR)/$(GLIDE_DEF) \
|
||||
$(GLIDE_OBJECTS) $(LDLIBS) $(GLIDE_RES)
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_IMP): $(GLIDE_LIBDIR)/$(GLIDE_DLL)
|
||||
$(DLLTOOL) $(DLLTOOL_FLAGS) --dllname $(GLIDE_DLL) --input-def $(GLIDE_LIBDIR)/$(GLIDE_DEF) --output-lib $@
|
||||
|
||||
fxoem2x: $(GLIDE_LIBDIR)/fxoem2x.dll
|
||||
|
||||
ifeq ($(FXOEM2X),1)
|
||||
$(GLIDE_LIBDIR)/fxoem2x.dll: ../oem/oeminit.o ../oem/oeminit.res
|
||||
# $(LD) -o $@ $(LDFLAGS) ../oem/oeminit.o $(LDLIBS) ../oem/oeminit.res
|
||||
else
|
||||
$(GLIDE_LIBDIR)/fxoem2x.dll:
|
||||
# $(warning FxOem2x not enabled... Skipping fxoem2x.dll)
|
||||
endif
|
||||
|
||||
strip:
|
||||
$(STRIP) $(GLIDE_LIBDIR)/$(GLIDE_DLL)
|
||||
#ifeq ($(FXOEM2X),1)
|
||||
# $(STRIP) $(GLIDE_LIBDIR)/fxoem2x.dll
|
||||
#endif
|
||||
|
||||
###############################################################################
|
||||
# rules(2)
|
||||
###############################################################################
|
||||
|
||||
#cpuid.o: cpudtect.asm
|
||||
# $(AS) -o $@ $(ASFLAGS) $<
|
||||
xdraw2_def.o: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xtexdl_def.o: xtexdl.c
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
xtexdl_mmx.o: xtexdl.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_MMX=1 $<
|
||||
xdraw2_3dnow.o: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xtexdl_3dnow.o: xtexdl.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xdrawtri.o: xdrawtri.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -D__MINGW32__ $<
|
||||
|
||||
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
|
||||
|
||||
fxinline.h: fxgasm.exe
|
||||
./$< -inline > $@
|
||||
|
||||
fxgasm.h: fxgasm.exe
|
||||
./$< -hex > $@
|
||||
|
||||
fxgasm.exe: fxgasm.c
|
||||
$(HOST_CC) -o $@ $(HOST_CFLAGS) $<
|
||||
|
||||
###############################################################################
|
||||
# clean, realclean
|
||||
###############################################################################
|
||||
|
||||
clean:
|
||||
-$(call UNLINK,*.res)
|
||||
-$(call UNLINK,*.o)
|
||||
-$(call UNLINK,../../init/*.o)
|
||||
-$(call UNLINK,$(FX_GLIDE_SW)/newpci/pcilib/*.o)
|
||||
-$(call UNLINK,fxinline.h)
|
||||
-$(call UNLINK,fxgasm.h)
|
||||
-$(call UNLINK,../oem/oeminit.o)
|
||||
-$(call UNLINK,../oem/oeminit.res)
|
||||
|
||||
realclean: clean
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DLL))
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_IMP))
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DEF))
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/fxoem2x.dll)
|
||||
@@ -1,4 +1,4 @@
|
||||
# Win32 makefile for Glide2/CVG and Texus2
|
||||
# Win32 makefile for Glide2/CVG
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2004
|
||||
@@ -12,13 +12,10 @@
|
||||
# Web : http://www.3dfxzone.it/koolsmoky
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = cvg
|
||||
# CPU optimize for the given processor.
|
||||
# default = 6 (PentiumPro)
|
||||
# DEBUG=1 disable optimizations and build for debug.
|
||||
@@ -29,12 +26,10 @@
|
||||
# capabilities are still checked at run-time to avoid
|
||||
# crashes.
|
||||
# default = no
|
||||
# USE_MMX=1 allow MMX specializations.
|
||||
# default = no
|
||||
# TEXUS2=1 embed Texus2 functions into Glide2.
|
||||
# USE_MMX=1 allow MMX specializations.
|
||||
# default = no
|
||||
# FXOEM2X=1 build fxoem2x.dll
|
||||
# default = no
|
||||
# FXOEM2X=1 build fxoem2x.dll
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# all: build everything
|
||||
@@ -43,8 +38,6 @@
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
|
||||
|
||||
.PHONY: all glide2x clean realclean
|
||||
.INTERMEDIATE: fxgasm.exe
|
||||
.SUFFIXES: .c .obj .rc .res
|
||||
@@ -56,12 +49,9 @@
|
||||
GLIDE_RES = glide.res
|
||||
GLIDE_DLL = glide2x.dll
|
||||
GLIDE_IMP = glide2x.lib
|
||||
TEXUS_EXE = texus2.exe
|
||||
|
||||
FX_GLIDE_HW ?= cvg
|
||||
FX_GLIDE_SW = ../../../swlibs
|
||||
GLIDE_LIBDIR = ../../lib
|
||||
TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
|
||||
|
||||
###############################################################################
|
||||
# tools
|
||||
@@ -92,7 +82,7 @@ CDEFS += -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=1 -DGLIDE_TRI_CULLING=1 -DGLI
|
||||
# special sli buffer clears
|
||||
CDEFS += -DGLIDE_BLIT_CLEAR=1
|
||||
|
||||
# workaround for CVGs with broken tsus which cannot send commands to multiple
|
||||
# workaround for CVGs with broken tsus which cannot send commands to multiple
|
||||
# tmus using chipfield. chipfield will always be set to 0xf
|
||||
CDEFS += -DGLIDE_CHIP_BROADCAST=1
|
||||
|
||||
@@ -110,6 +100,8 @@ override USE_FIFO = 1
|
||||
ifeq ($(USE_X86),1)
|
||||
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1
|
||||
override USE_FIFO = 1
|
||||
CDEFS += -DHAVE_XDRAWTRI_ASM=1
|
||||
override USE_DRAWTRI_ASM = 1
|
||||
else
|
||||
CDEFS += -DGLIDE_USE_C_TRISETUP=1
|
||||
endif
|
||||
@@ -122,10 +114,6 @@ endif
|
||||
# other
|
||||
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
|
||||
|
||||
ifeq ($(TEXUS2),1)
|
||||
CDEFS += -DHAVE_TEXUS2
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# flags
|
||||
###############################################################################
|
||||
@@ -153,7 +141,6 @@ endif
|
||||
|
||||
CFLAGS += -I. -I../../incsrc -I../../init
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib
|
||||
CFLAGS += $(CDEFS)
|
||||
|
||||
# cpu optimized triangle
|
||||
@@ -199,6 +186,9 @@ GLIDE_OBJECTS = \
|
||||
fpu.obj \
|
||||
xtexdl_def.obj
|
||||
|
||||
ifeq ($(USE_DRAWTRI_ASM),1)
|
||||
GLIDE_OBJECTS += xdrawtri.obj
|
||||
endif
|
||||
ifeq ($(USE_X86),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_def.obj
|
||||
@@ -209,7 +199,7 @@ endif
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_3dnow.obj \
|
||||
xtexdl_3dnow.obj
|
||||
xtexdl_3dnow.obj
|
||||
endif
|
||||
else
|
||||
GLIDE_OBJECTS += \
|
||||
@@ -235,35 +225,6 @@ GLIDE_OBJECTS += \
|
||||
../../init/video.obj \
|
||||
../../init/fxremap.obj
|
||||
|
||||
TEXUS_SOURCES = \
|
||||
$(FX_GLIDE_SW)/texus2/lib/texuslib.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/clamp.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/read.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/resample.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/mipmap.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/quantize.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/ncc.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/nccnnet.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/pal256.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/pal6666.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/dequant.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/view.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/util.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/diffuse.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/write.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/tga.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/3df.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/ppm.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/rgt.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/txs.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/codec.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/eigen.c \
|
||||
$(FX_GLIDE_SW)/texus2/lib/bitcoder.c
|
||||
|
||||
ifeq ($(TEXUS2),1)
|
||||
GLIDE_OBJECTS += $(TEXUS_SOURCES:.c=.obj)
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# rules
|
||||
###############################################################################
|
||||
@@ -276,20 +237,13 @@ endif
|
||||
###############################################################################
|
||||
# main
|
||||
###############################################################################
|
||||
all: glide2x $(TEXUS_EXEDIR)/$(TEXUS_EXE) fxoem2x
|
||||
all: glide2x fxoem2x
|
||||
|
||||
glide2x: $(GLIDE_LIBDIR)/$(GLIDE_DLL)
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES)
|
||||
$(LD) -out:$@ $(LDFLAGS) $(GLIDE_OBJECTS) $(LDLIBS) $(GLIDE_RES)
|
||||
|
||||
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_IMP)
|
||||
#ifeq ($(TEXUS2),1)
|
||||
# $(CC) -o $@ $(CFLAGS) $^
|
||||
#else
|
||||
# $(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
|
||||
#endif
|
||||
|
||||
fxoem2x: $(GLIDE_LIBDIR)/fxoem2x.dll
|
||||
|
||||
ifeq ($(FXOEM2X),1)
|
||||
@@ -316,14 +270,16 @@ xdraw2_3dnow.obj: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xtexdl_3dnow.obj: xtexdl.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xdrawtri.obj: xdrawtri.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
|
||||
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
|
||||
|
||||
fxinline.h: fxgasm.exe
|
||||
./$< -inline > $@
|
||||
$< -inline > $@
|
||||
|
||||
fxgasm.h: fxgasm.exe
|
||||
./$< -hex > $@
|
||||
$< -hex > $@
|
||||
|
||||
fxgasm.exe: fxgasm.c
|
||||
$(CC) -o $@ $(CFLAGS) $<
|
||||
@@ -338,7 +294,6 @@ clean:
|
||||
-$(call UNLINK,$(FX_GLIDE_SW)/newpci/pcilib/*.obj)
|
||||
-$(call UNLINK,fxinline.h)
|
||||
-$(call UNLINK,fxgasm.h)
|
||||
-$(call UNLINK,$(FX_GLIDE_SW)/texus2/lib/*.obj)
|
||||
-$(call UNLINK,../oem/oeminit.obj)
|
||||
-$(call UNLINK,../oem/oeminit.res)
|
||||
|
||||
@@ -346,7 +301,6 @@ realclean: clean
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/glide2x.exp)
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DLL))
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_IMP))
|
||||
-$(call UNLINK,$(TEXUS_EXEDIR)/$(TEXUS_EXE))
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/fxoem2x.exp)
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/fxoem2x.dll)
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/fxoem2x.lib)
|
||||
|
||||
@@ -17,12 +17,6 @@
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
#
|
||||
# $Header$
|
||||
# $Log$
|
||||
# Revision 1.1.1.1 1999/12/07 21:49:08 joseph
|
||||
# Initial checkin into SourceForge.
|
||||
#
|
||||
#
|
||||
# 2 3/04/97 9:10p Dow
|
||||
# Neutered mutiplatform multiheaded monster.
|
||||
#
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
;; THE UNITED STATES.
|
||||
;;
|
||||
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
;;
|
||||
;; $Header$
|
||||
;; $Log$
|
||||
;
|
||||
; 4 5/28/97 8:23a Peter
|
||||
; Merge w/ original glide source
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/*
|
||||
* CPU detection code
|
||||
*
|
||||
* $Header$
|
||||
* $Log$
|
||||
*
|
||||
* Revision 1.1.2.2 2006/09/02 03:12:29 guillemj
|
||||
* Backport glide3 fix for PIC compilation with gcc 4.1 from Hans de Goede.
|
||||
*
|
||||
* Revision 1.1.2.1 2004/12/12 15:16:02 koolsmoky
|
||||
* new cpuid
|
||||
*
|
||||
@@ -32,14 +34,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cpuid.h"
|
||||
|
||||
typedef unsigned long word32;
|
||||
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3)))
|
||||
typedef unsigned int __attribute__((__may_alias__)) word32;
|
||||
#else
|
||||
typedef unsigned int word32;
|
||||
#endif
|
||||
|
||||
/* These are the bit flags that get set on calling cpuid
|
||||
* with register eax set to 1
|
||||
@@ -86,7 +91,6 @@ typedef unsigned long word32;
|
||||
static jmp_buf j;
|
||||
|
||||
|
||||
|
||||
/* Desc: signal handler
|
||||
*
|
||||
* In : signal number
|
||||
@@ -100,7 +104,6 @@ static void handler (int signal)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Desc: check if CPU has specific feature
|
||||
*
|
||||
* In : feature request
|
||||
@@ -134,7 +137,6 @@ static int check_feature (int feature)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Desc: perform (possibly faulting) instructions in a safe manner
|
||||
*
|
||||
* In : feature request
|
||||
@@ -181,7 +183,6 @@ static int has_feature (int feature)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Desc: get CPU info
|
||||
*
|
||||
* In : pointer to _p_info
|
||||
@@ -233,7 +234,7 @@ int _cpuid (_p_info *pinfo)
|
||||
movl %%edx, %0 \n\
|
||||
0: \n\
|
||||
":"=g"(dwExt), "=g"(dwId), "=g"(dwFeature),
|
||||
"=g"(((long *)Ident)[0]), "=g"(((long *)Ident)[1]), "=g"(((long *)Ident)[2])
|
||||
"=g"(((word32 *)Ident)[0]), "=g"(((word32 *)Ident)[1]), "=g"(((word32 *)Ident)[2])
|
||||
::"%eax", "%ecx", "%edx");
|
||||
#else
|
||||
_asm
|
||||
@@ -314,7 +315,6 @@ notamd:
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if CPUTEST
|
||||
#include <stdio.h>
|
||||
/* Desc:
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.2.2.2 2005/04/26 00:02:44 koolsmoky
|
||||
** Use grDrawTriangle where TRISETUP is not necessary.
|
||||
**
|
||||
** Revision 1.2.2.1 2005/01/22 14:52:01 koolsmoky
|
||||
** enabled packed argb for cmd packet type 3
|
||||
**
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.2.4 2006/09/02 03:13:53 guillemj
|
||||
** Remove redundant definition of single_precision_asm and double_precision_asm,
|
||||
** to fix the code not building from source.
|
||||
**
|
||||
** Revision 1.1.1.1.2.3 2005/01/22 14:52:01 koolsmoky
|
||||
** enabled packed argb for cmd packet type 3
|
||||
**
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 11 2/20/98 5:31p Peter
|
||||
** crybaby glide
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.2.1 2004/12/23 20:45:56 koolsmoky
|
||||
** converted to nasm syntax
|
||||
** added x86 asm, 3dnow! triangle and mmx, 3dnow! texture download optimizations
|
||||
**
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:08 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 17 1/13/98 12:42p Atai
|
||||
* fixed grtexinfo, grVertexLayout, and draw triangle
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 14 1/08/98 4:58p Atai
|
||||
* tex table broadcast, grVertexLayout enable/disable, stq, and some
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 20 6/06/98 12:06p Peter
|
||||
** gmt's trilinear hell bug
|
||||
@@ -666,9 +663,9 @@ GR_DIENTRY(grTexDownloadMipMapLevel, void,
|
||||
FxU16 rle_line[256];
|
||||
FxU16 *rle_line_end;
|
||||
|
||||
#if (GLIDE_PLATFORM & (GLIDE_OS_WIN32 | GLIDE_OS_MACOS | GLIDE_OS_UNIX))
|
||||
#if (GLIDE_PLATFORM & (GLIDE_OS_WIN32 | GLIDE_OS_MACOS | GLIDE_OS_UNIX)) || defined(__DJGPP__)
|
||||
void rle_decode_line_asm(FxU16 *tlut,FxU8 *src,FxU16 *dest)
|
||||
{
|
||||
/* don't do anything just shut up the compiler */
|
||||
}
|
||||
#endif /* (GLIDE_PLATFORM & (GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) */
|
||||
#endif
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.2.1 2005/04/23 18:23:46 koolsmoky
|
||||
** changes to support calling conventions in asm files
|
||||
**
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:08 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
/*
|
||||
* FPU handling code
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This routine sets the precision to single which effects all
|
||||
* adds, mults, and divs.
|
||||
*/
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86)
|
||||
void single_precision_asm()
|
||||
{
|
||||
#if defined(__MSC__)
|
||||
@@ -47,7 +44,7 @@ void single_precision_asm()
|
||||
* This routine sets the precision to double which effects all
|
||||
* adds, mults, and divs.
|
||||
*/
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86)
|
||||
void double_precision_asm()
|
||||
{
|
||||
#if defined(__MSC__)
|
||||
@@ -66,10 +63,10 @@ void double_precision_asm()
|
||||
asm("push %eax\n"
|
||||
"fnclex\n"
|
||||
"fstcw (%esp)\n"
|
||||
"movw (%esp), %eax\n"
|
||||
"movl (%esp), %eax\n"
|
||||
"and $0x0000fcff, %eax\n"
|
||||
"or $0x000002ff, %eax\n"
|
||||
"mov %eax, (%esp)\n"
|
||||
"movl %eax, (%esp)\n"
|
||||
"fldcw (%esp)\n"
|
||||
"pop %eax");
|
||||
#else
|
||||
@@ -82,4 +79,3 @@ void double_precision_asm()
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
*
|
||||
* COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
*
|
||||
* $Header$
|
||||
* $Log$
|
||||
*
|
||||
* 1 7/25/97 9:05a Pgj
|
||||
* generate fxbldno.h which defines BUILD_NUMBER
|
||||
*
|
||||
@@ -29,7 +26,7 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
struct tm locTime;
|
||||
time_t sysTime;
|
||||
@@ -38,7 +35,7 @@ main(int argc, char **argv)
|
||||
time(&sysTime);
|
||||
locTime = *localtime(&sysTime);
|
||||
|
||||
if (build = getenv("BUILD_NUMBER")) {
|
||||
if ((build = getenv("BUILD_NUMBER")) != NULL) {
|
||||
printf("#define BUILD_NUMBER %s\n", build);
|
||||
} else {
|
||||
unsigned short magic;
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Revision$
|
||||
** $Date$
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
@@ -53,8 +50,9 @@
|
||||
else printf("%s\tequ %10d\n",pname,((int)&o)-(int)&p)
|
||||
|
||||
#define SIZEOF(p,pname) if (hex) \
|
||||
printf("SIZEOF_%s\tequ %08lxh\n",pname,sizeof(p)); \
|
||||
else printf("SIZEOF_%s\tequ %10ld\n",pname,sizeof(p))
|
||||
printf("SIZEOF_%s\tequ %08lxh\n",pname,(unsigned long)sizeof(p)); \
|
||||
else printf("SIZEOF_%s\tequ %10lu\n",pname,(unsigned long)sizeof(p))
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
@@ -70,7 +68,7 @@ main (int argc, char **argv)
|
||||
|
||||
if (argc > 1) {
|
||||
if (strcmp("-inline", argv[1]) == 0) {
|
||||
SstRegs dummyRegs = { 0x00UL };
|
||||
SstRegs dummyRegs = { 0x00UL }; /* silence VC6 */
|
||||
|
||||
printf("#ifndef __FX_INLINE_H__\n");
|
||||
printf("#define __FX_INLINE_H__\n");
|
||||
@@ -78,17 +76,14 @@ main (int argc, char **argv)
|
||||
|
||||
#if GLIDE_DISPATCH_SETUP
|
||||
printf("#define kCurGCOffset 0x%lXUL\n",
|
||||
offsetof(struct _GlideRoot_s, curGC));
|
||||
(unsigned long)offsetof(struct _GlideRoot_s, curGC));
|
||||
|
||||
printf("#define kTriProcOffset 0x%lXUL\n",
|
||||
offsetof(struct GrGC_s, curArchProcs.triSetupProc));
|
||||
printf("#define kTriProcOffsetClean %d\n",
|
||||
offsetof(struct GrGC_s, curArchProcs.triSetupProc));
|
||||
(unsigned long)offsetof(struct GrGC_s, curArchProcs.triSetupProc));
|
||||
#endif /* GLIDE_DISPATCH_SETUP */
|
||||
|
||||
printf("/* The # of 2-byte entries in the hw fog table */\n");
|
||||
printf("#define kInternalFogTableEntryCount 0x%lXUL\n",
|
||||
sizeof(dummyRegs.fogTable) >> 1);
|
||||
printf("#define kInternalFogTableEntryCount 0x%X\n",
|
||||
(unsigned int)sizeof(dummyRegs.fogTable) >> 1);
|
||||
|
||||
printf("\n");
|
||||
printf("#endif /* __FX_INLINE_H__ */\n");
|
||||
@@ -109,6 +104,9 @@ main (int argc, char **argv)
|
||||
OFFSET (gc,tex_ptr,"tex_ptr\t\t");
|
||||
OFFSET (gc,state.cull_mode,"cull_mode\t");
|
||||
OFFSET (gc, regDataList,"regDataList\t");
|
||||
#ifdef GLIDE_DEBUG
|
||||
OFFSET (gc,checkPtr,"checkPtr\t\t");
|
||||
#endif
|
||||
OFFSET (gc, tsuDataList,"tsuDataList\t");
|
||||
OFFSET (gc, cmdTransportInfo.triPacketHdr, "triPacketHdr");
|
||||
OFFSET (gc, cmdTransportInfo.cullStripHdr, "cullStripHdr");
|
||||
@@ -129,6 +127,10 @@ main (int argc, char **argv)
|
||||
OFFSET (gc, cmdTransportInfo.fifoLfbP, "fifoLfbP");
|
||||
OFFSET (gc, cmdTransportInfo.lfbLockCount, "lfbLockCount");
|
||||
|
||||
#if GLIDE_DISPATCH_SETUP
|
||||
OFFSET (gc,curArchProcs.triSetupProc,"kTriProcOffset\t\t");
|
||||
#endif
|
||||
|
||||
SIZEOF (gr.GCs[0].state,"GrState\t");
|
||||
SIZEOF (gr.hwConfig,"GrHwConfiguration");
|
||||
SIZEOF (gr.GCs[0],"GC\t");
|
||||
@@ -155,8 +157,7 @@ main (int argc, char **argv)
|
||||
NEWLINE;
|
||||
|
||||
HEADER ("GrVertex");
|
||||
{
|
||||
GrVertex v;
|
||||
{ GrVertex v;
|
||||
|
||||
OFFSET(v, x, "x");
|
||||
OFFSET(v, y, "y");
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.2.2.4 2005/04/23 18:23:46 koolsmoky
|
||||
** changes to support calling conventions in asm files
|
||||
**
|
||||
** Revision 1.2.2.3 2005/01/22 14:52:01 koolsmoky
|
||||
** enabled packed argb for cmd packet type 3
|
||||
**
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log:
|
||||
** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce
|
||||
** branching.
|
||||
** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.2.2 2006/12/03 04:49:19 guillemj
|
||||
** Backport "sequence point" fix for string upper code from glide3x.
|
||||
**
|
||||
@@ -64,30 +62,26 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <3dfx.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
#ifdef __linux__
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
extern const int _grMipMapHostWH[GR_ASPECT_1x8 + 1][GR_LOD_1 + 1][2];
|
||||
extern FxU32 _gr_aspect_index_table[];
|
||||
extern FxU32 _grMipMapHostSize[4][16];
|
||||
|
||||
static FxU16 ReadDataShort(FILE *);
|
||||
static FxU32 ReadDataLong(FILE *);
|
||||
static void Read8Bit(FxU8 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
|
||||
static void Read16Bit(FxU16 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
|
||||
static FxBool ReadDataShort(FILE *, FxU16 *data);
|
||||
static FxBool ReadDataLong(FILE *, FxU32 *data);
|
||||
static FxBool Read8Bit(FxU8 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
|
||||
static FxBool Read16Bit(FxU16 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
|
||||
|
||||
#if ((GLIDE_PLATFORM & (GLIDE_OS_DOS32 | GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) != 0)
|
||||
const char *openmode = "rb";
|
||||
static const char *openmode = "rb";
|
||||
#else
|
||||
const char *openmode = "r";
|
||||
static const char *openmode = "r";
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
@@ -167,11 +161,9 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
|
||||
};
|
||||
|
||||
GDBG_INFO(81,"gu3dfGetInfo(%s,0x%x)\n",FileName,Info);
|
||||
/*
|
||||
** open the filen
|
||||
*/
|
||||
if((image_file = fopen(FileName, openmode)) == NULL) return FXFALSE;
|
||||
if (!_grGet3dfHeader(image_file, buffer, sizeof(buffer))) return FXFALSE;
|
||||
|
||||
if ((image_file = fopen(FileName, openmode)) == NULL) return FXFALSE;
|
||||
if (!_grGet3dfHeader(image_file, buffer, sizeof(buffer))) goto _loc1;
|
||||
|
||||
/*
|
||||
** grab statistics out of the header
|
||||
@@ -180,14 +172,13 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
|
||||
version,
|
||||
color_format,
|
||||
&small_lod, &large_lod,
|
||||
&aspect_width, &aspect_height) == 0)
|
||||
return FXFALSE;
|
||||
&aspect_width, &aspect_height) != 6)
|
||||
goto _loc1;
|
||||
|
||||
/*
|
||||
** determine aspect ratio, height, and width
|
||||
*/
|
||||
i = 0;
|
||||
ratio_found = FXFALSE;
|
||||
while ((i < 4) && (!ratio_found)) {
|
||||
if ((aspect_width << i) == aspect_height) {
|
||||
Info->header.aspect_ratio = wh_aspect_table[i];
|
||||
@@ -206,7 +197,7 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
|
||||
|
||||
i++;
|
||||
}
|
||||
if (!ratio_found) return FXFALSE;
|
||||
if (!ratio_found) goto _loc1;
|
||||
|
||||
/*
|
||||
** determine height and width of the mip map
|
||||
@@ -309,13 +300,13 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
|
||||
{
|
||||
char *tempStr = (char*)color_format;
|
||||
while (*tempStr != '\0') {
|
||||
*tempStr = toupper(*tempStr);
|
||||
if (*tempStr >= 'a' && *tempStr <= 'z')
|
||||
*tempStr -= ('a'-'A');
|
||||
tempStr++;
|
||||
}
|
||||
}
|
||||
|
||||
i = 0;
|
||||
format_found = FXFALSE;
|
||||
while ((cftable[i].name != 0) && (!format_found)) {
|
||||
if (strcmp(color_format, cftable[i].name) == 0) {
|
||||
Info->header.format = cftable[i].fmt;
|
||||
@@ -328,7 +319,8 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
|
||||
/*
|
||||
** close the input file
|
||||
*/
|
||||
if (image_file != NULL) fclose(image_file);
|
||||
_loc1:
|
||||
fclose(image_file);
|
||||
|
||||
if (format_found) {
|
||||
FxI32 lod;
|
||||
@@ -352,11 +344,9 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
char buffer[100] = "";
|
||||
|
||||
GDBG_INFO(81,"gu3dfLoad(%s,0x%x)\n",filename,info);
|
||||
/*
|
||||
** open the file
|
||||
*/
|
||||
|
||||
if ((image_file = fopen(filename, openmode)) == NULL) return FXFALSE;
|
||||
if (!_grGet3dfHeader(image_file, buffer, sizeof(buffer))) return FXFALSE;
|
||||
if (!_grGet3dfHeader(image_file, buffer, sizeof(buffer))) goto _loc1;
|
||||
|
||||
/*
|
||||
** If necessary, read in the YIQ decompression table
|
||||
@@ -368,37 +358,50 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
** read in Y
|
||||
*/
|
||||
for (index = 0; index < 16; index++)
|
||||
info->table.nccTable.yRGB[index] = ((FxI16) ReadDataShort(image_file)) & 0xFF;
|
||||
{
|
||||
FxU16 val;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
info->table.nccTable.yRGB[index] = val & 0xFF;
|
||||
}
|
||||
|
||||
/*
|
||||
** read in I
|
||||
*/
|
||||
for (index = 0; index < 4; index++) {
|
||||
info->table.nccTable.iRGB[index][0] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
info->table.nccTable.iRGB[index][1] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
info->table.nccTable.iRGB[index][2] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
FxU16 val;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
info->table.nccTable.iRGB[index][0] = val & 0x1FF;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
info->table.nccTable.iRGB[index][1] = val & 0x1FF;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
info->table.nccTable.iRGB[index][2] = val & 0x1FF;
|
||||
}
|
||||
|
||||
/*
|
||||
** read in Q
|
||||
*/
|
||||
for (index = 0; index < 4; index++) {
|
||||
info->table.nccTable.qRGB[index][0] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
info->table.nccTable.qRGB[index][1] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
info->table.nccTable.qRGB[index][2] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
FxU16 val;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
info->table.nccTable.qRGB[index][0] = val & 0x1FF;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
info->table.nccTable.qRGB[index][1] = val & 0x1FF;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
info->table.nccTable.qRGB[index][2] = val & 0x1FF;
|
||||
}
|
||||
|
||||
/*
|
||||
** pack the table Y entries
|
||||
*/
|
||||
for (index = 0; index < 4; index++) {
|
||||
for (index = 0; index < 4; index++)
|
||||
{
|
||||
FxU32 packedvalue;
|
||||
|
||||
packedvalue = ((FxU32) info->table.nccTable.yRGB[index*4+0]);
|
||||
packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+1]) << 8;
|
||||
packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+2]) << 16;
|
||||
packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+3]) << 24;
|
||||
|
||||
|
||||
info->table.nccTable.packed_data[index] = packedvalue;
|
||||
}
|
||||
|
||||
@@ -436,7 +439,11 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
(info->header.format == GR_TEXFMT_AP_88)) {
|
||||
FxU32 i;
|
||||
for(i = 0; i < 256; i++)
|
||||
info->table.palette.data[i] = ReadDataLong(image_file);
|
||||
{
|
||||
FxU32 val;
|
||||
if (!ReadDataLong(image_file, &val)) goto _loc1;
|
||||
info->table.palette.data[i] = val;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -450,10 +457,11 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
case GR_TEXFMT_YIQ_422:
|
||||
case GR_TEXFMT_RGB_332:
|
||||
case GR_TEXFMT_P_8:
|
||||
Read8Bit(info->data, image_file,
|
||||
if(!Read8Bit(info->data, image_file,
|
||||
info->header.small_lod,
|
||||
info->header.large_lod,
|
||||
info->header.aspect_ratio);
|
||||
info->header.aspect_ratio))
|
||||
goto _loc1;
|
||||
break;
|
||||
|
||||
case GR_TEXFMT_RGB_565:
|
||||
@@ -463,21 +471,20 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
case GR_TEXFMT_ARGB_4444:
|
||||
case GR_TEXFMT_ALPHA_INTENSITY_88:
|
||||
case GR_TEXFMT_AP_88:
|
||||
Read16Bit(info->data, image_file,
|
||||
if(!Read16Bit(info->data, image_file,
|
||||
info->header.small_lod,
|
||||
info->header.large_lod,
|
||||
info->header.aspect_ratio);
|
||||
info->header.aspect_ratio))
|
||||
goto _loc1;
|
||||
break;
|
||||
|
||||
default:
|
||||
_loc1:
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
** close the file
|
||||
*/
|
||||
fclose(image_file);
|
||||
|
||||
return FXTRUE;
|
||||
}
|
||||
|
||||
@@ -486,21 +493,23 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
**
|
||||
** Read in an 8-bit texture map, unpacked.
|
||||
*/
|
||||
static void
|
||||
static FxBool
|
||||
Read8Bit(FxU8 *data, FILE *image_file,
|
||||
int small_lod, int large_lod,
|
||||
GrAspectRatio_t aspect_ratio)
|
||||
{
|
||||
int lod;
|
||||
int width, height;
|
||||
FxU32 cnt;
|
||||
|
||||
for (lod = large_lod; lod <= small_lod; lod++) {
|
||||
width = _grMipMapHostWH[aspect_ratio][lod][0];
|
||||
height = _grMipMapHostWH[aspect_ratio][lod][1];
|
||||
cnt = (FxU32)_grMipMapHostWH[aspect_ratio][lod][0] *
|
||||
(FxU32)_grMipMapHostWH[aspect_ratio][lod][1];
|
||||
|
||||
fread(data, sizeof(char), width*height, image_file);
|
||||
data += width*height;
|
||||
if (fread(data, 1, cnt, image_file) != cnt)
|
||||
return FXFALSE;
|
||||
data += cnt;
|
||||
}
|
||||
return FXTRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -508,55 +517,66 @@ Read8Bit(FxU8 *data, FILE *image_file,
|
||||
**
|
||||
** Read in a 16-bit texture map, unpacked.
|
||||
*/
|
||||
static void Read16Bit(FxU16 *data, FILE *image_file,
|
||||
static FxBool Read16Bit(FxU16 *data, FILE *image_file,
|
||||
int small_lod, int large_lod,
|
||||
GrAspectRatio_t aspect_ratio)
|
||||
{
|
||||
int index;
|
||||
FxU32 idx, cnt;
|
||||
int lod;
|
||||
int width, height;
|
||||
|
||||
for (lod = large_lod; lod <= small_lod; lod++) {
|
||||
width = _grMipMapHostWH[aspect_ratio][lod][0];
|
||||
height = _grMipMapHostWH[aspect_ratio][lod][1];
|
||||
cnt = (FxU32)_grMipMapHostWH[aspect_ratio][lod][0] *
|
||||
(FxU32)_grMipMapHostWH[aspect_ratio][lod][1];
|
||||
|
||||
for (index = 0; index < (width * height); index++) {
|
||||
*data = ReadDataShort(image_file);
|
||||
for (idx = 0; idx < cnt; idx++) {
|
||||
if (!ReadDataShort(image_file,data))
|
||||
return FXFALSE;
|
||||
data++;
|
||||
}
|
||||
}
|
||||
return FXTRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
** FxU16 ReadDataShort
|
||||
*/
|
||||
static FxU16 ReadDataShort(FILE *fp)
|
||||
static FxBool ReadDataShort(FILE *fp, FxU16 *data)
|
||||
{
|
||||
FxU16 b1 = (FxU16)getc(fp);
|
||||
FxU16 b2 = (FxU16)getc(fp);
|
||||
|
||||
#define kShiftB1 8
|
||||
#define kShiftB2 0
|
||||
FxU16 value;
|
||||
int b;
|
||||
|
||||
return (((b1 & 0xFF) << kShiftB1) | ((b2 & 0xFF) << kShiftB2));
|
||||
/*
|
||||
** read in the MSB
|
||||
*/
|
||||
b = getc (fp);
|
||||
if (b == EOF) return FXFALSE;
|
||||
value = (FxU16) ((b&0xFF)<<8);
|
||||
|
||||
/*
|
||||
** read in the LSB
|
||||
*/
|
||||
b = getc (fp);
|
||||
if (b == EOF) return FXFALSE;
|
||||
value |= (FxU16) (b & 0x00FF);
|
||||
|
||||
*data = value;
|
||||
return FXTRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
** ReadDataLong
|
||||
*/
|
||||
static FxU32 ReadDataLong(FILE *fp)
|
||||
static FxBool ReadDataLong(FILE *fp, FxU32 *data)
|
||||
{
|
||||
FxU32 data;
|
||||
FxU8 byte[4];
|
||||
|
||||
fread(byte, 4, 1, fp);
|
||||
data = (((FxU32) byte[0]) << 24) |
|
||||
if (fread(byte, 1, 4, fp) != 4)
|
||||
return FXFALSE;
|
||||
|
||||
*data = (((FxU32) byte[0]) << 24) |
|
||||
(((FxU32) byte[1]) << 16) |
|
||||
(((FxU32) byte[2]) << 8) |
|
||||
((FxU32) byte[3]);
|
||||
|
||||
return data;
|
||||
return FXTRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.2.3 2007/05/19 08:29:25 koolsmoky
|
||||
** packed rgb fixes
|
||||
**
|
||||
** Revision 1.1.1.1.2.1 2005/01/22 14:52:01 koolsmoky
|
||||
** enabled packed argb for cmd packet type 3
|
||||
**
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 17 1/05/98 6:06p Atai
|
||||
* glide extension stuff
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.4.2.4 2005/04/25 23:53:59 koolsmoky
|
||||
** Fix grDrawTriangle calling convention for Linux.
|
||||
** Thanks to Ozkan Sezer <sezeroz@gmail.com>.
|
||||
**
|
||||
** Revision 1.4.2.3 2005/04/23 18:27:26 koolsmoky
|
||||
** fixed grDrawTriangle triangle dispatch code
|
||||
**
|
||||
@@ -93,7 +95,6 @@
|
||||
* 77 11/15/97 7:43p Peter
|
||||
* more comdex silliness
|
||||
*
|
||||
**
|
||||
*/
|
||||
#include <memory.h>
|
||||
|
||||
@@ -648,7 +649,8 @@ all_done: /* come here on degenerate lines */
|
||||
/*---------------------------------------------------------------------------
|
||||
** grDrawTriangle
|
||||
*/
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32) && !GLIDE_USE_C_TRISETUP && !defined(GLIDE_DEBUG)
|
||||
#ifndef HAVE_XDRAWTRI_ASM /* grDrawTriangle() not in asm */
|
||||
#if defined(_MSC_VER) && !GLIDE_USE_C_TRISETUP && !defined(GLIDE_DEBUG)
|
||||
__declspec(naked)
|
||||
#endif
|
||||
GR_ENTRY(grDrawTriangle, void, (const GrVertex *a, const GrVertex *b, const GrVertex *c))
|
||||
@@ -692,8 +694,8 @@ GR_ENTRY(grDrawTriangle, void, (const GrVertex *a, const GrVertex *b, const GrVe
|
||||
|
||||
all_done:
|
||||
GR_END();
|
||||
#else
|
||||
#if defined(__MSC__)
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
{
|
||||
__asm {
|
||||
mov edx, [_GlideRoot + kCurGCOffset];
|
||||
@@ -701,59 +703,13 @@ all_done:
|
||||
jmp eax;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined( __linux__ )
|
||||
|
||||
/* Here's the basic strategy for this dispatch code:
|
||||
* We jump to _GlideRoot.curGC->archDispatchProcs.triSetupProc
|
||||
* which contains code that looks like a function, we leave the
|
||||
* paramters passed to grDrawTriangle on the stack and the dispatched
|
||||
* function picks them up. However we have to compensate for
|
||||
* the compiler pushing anything on the stack. The following describes
|
||||
* why and when we have to pop.
|
||||
*
|
||||
* BIG_OPT: gcc pushes a frame pointer to maintain things, BIG_OPT
|
||||
* turns on -fomit-frame-pointer so we don't have to pop it.
|
||||
*
|
||||
* PIC: When using position independant code gcc stores eip in ebx
|
||||
* so it saves ebx from the previous call automatically.
|
||||
* Therefore, once we have the jump address we have to pop ebx
|
||||
* to restore the stack.
|
||||
*
|
||||
* The syntax is further complicated by the fact that gcc can (and will)
|
||||
* emit code between the asm statements, so they all need to be in a single
|
||||
* asm statement, wrapped with #ifdef's. This means we have fun with
|
||||
* deciding if we need to list trashed registers and when we need commas
|
||||
* between them.
|
||||
*/
|
||||
|
||||
asm (
|
||||
#if defined(PIC)
|
||||
"popl %%ebx\n\t"
|
||||
#endif
|
||||
#if !defined(BIG_OPT)
|
||||
"popl %%ebp\n\t"
|
||||
#endif
|
||||
"jmp *%0"
|
||||
: /* no outputs */
|
||||
: "m" (_GlideRoot.curGC->curArchProcs.triSetupProc)
|
||||
#if defined (PIC) || !defined (BIG_OPT)
|
||||
:
|
||||
#endif
|
||||
#if defined (PIC)
|
||||
"ebx"
|
||||
#endif
|
||||
#if defined (PIC) && !defined (BIG_OPT)
|
||||
,
|
||||
#endif
|
||||
#if !defined(BIG_OPT)
|
||||
"ebp"
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
#else
|
||||
#error "Write triangle proc dispatch for this compiler"
|
||||
#endif
|
||||
#undef FN_NAME
|
||||
} /* grDrawTriangle */
|
||||
#endif /* HAVE_XDRAWTRI_ASM */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grDrawPlanarPolygon
|
||||
|
||||
@@ -17,13 +17,6 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:10 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 28 3/14/98 1:07p Peter
|
||||
** mac port happiness
|
||||
**
|
||||
@@ -180,7 +173,7 @@ _grErrorDefaultCallback( const char *s, FxBool fatal )
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __DOS__
|
||||
#if defined(__DOS__) && defined(__WATCOMC__)
|
||||
int _guHeapCheck( void )
|
||||
{
|
||||
int i = _heapchk();
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.2.2.6 2007/05/19 08:37:25 koolsmoky
|
||||
** packed rgb fixes
|
||||
** force 4x4 dither with alpha dither subtraction
|
||||
**
|
||||
** Revision 1.2.2.5 2005/01/22 14:52:02 koolsmoky
|
||||
** enabled packed argb for cmd packet type 3
|
||||
**
|
||||
@@ -155,7 +157,6 @@
|
||||
*
|
||||
* 131 1/08/98 7:09p Peter
|
||||
* real hw stuff modulo makefile change
|
||||
*
|
||||
**
|
||||
*/
|
||||
|
||||
@@ -170,9 +171,6 @@
|
||||
#include "fxglide.h"
|
||||
#include "fxinline.h"
|
||||
|
||||
#include "rcver.h"
|
||||
static char glideIdent[] = "@#%" VERSIONSTR ;
|
||||
|
||||
#if GLIDE_HW_TRI_SETUP
|
||||
static void
|
||||
_grUpdateTriPacketHdr(FxU32 paramMask,
|
||||
@@ -196,9 +194,6 @@ GR_STATE_ENTRY(grAlphaBlendFunction, void,
|
||||
GDBG_INFO_MORE(gc->myLevel, "(%d,%d,%d,%d)\n",
|
||||
rgb_sf, rgb_df, alpha_sf, alpha_df);
|
||||
|
||||
/* Watcom warning suppressor */
|
||||
glideIdent[0] = glideIdent[0];
|
||||
|
||||
alphamode = gc->state.fbi_config.alphaMode;
|
||||
if (alpha_sf != GR_BLEND_ONE && alpha_sf != GR_BLEND_ZERO) {
|
||||
GR_CHECK_W(myName, 1, "unsupported alpha source blend function");
|
||||
@@ -533,7 +528,7 @@ GR_ENTRY(grBufferClear, void, (GrColor_t color, GrAlpha_t alpha, FxU16 depth))
|
||||
{
|
||||
GR_SET_EXPECTED_SIZE(sizeof(FxU32), 1);
|
||||
GR_SET(BROADCAST_ID, hw, bltSize,
|
||||
((((((tileHi - tileLow) * gc->hwDep.cvgDep.xTilePages) - 1) << 16) | (0x1000 >> 3)) - 1));
|
||||
(((((tileHi - tileLow) * gc->hwDep.cvgDep.xTilePages) - 1) << 16) | 511));/* 511 == (0x1000 >> 3) - 1 */
|
||||
GR_CHECK_SIZE();
|
||||
}
|
||||
|
||||
@@ -773,9 +768,11 @@ GR_ENTRY(grBufferSwap, void, (int swapInterval))
|
||||
#endif /* (GLIDE_PLATFORM & GLIDE_HW_CVG) */
|
||||
|
||||
#if ((GLIDE_PLATFORM & GLIDE_HW_CVG) || (GLIDE_PLATFORM & GLIDE_HW_H3))
|
||||
#ifdef GLIDE_PLUG
|
||||
/* optionally display the 3Dfx powerfield logo overlay */
|
||||
if (_GlideRoot.environment.shamelessPlug) _grShamelessPlug();
|
||||
|
||||
#endif
|
||||
|
||||
/* check for environmental override.
|
||||
*
|
||||
* NB: If we are sli, the application passes in 0, and the user has
|
||||
@@ -836,27 +833,25 @@ GR_ENTRY(grBufferSwap, void, (int swapInterval))
|
||||
}
|
||||
|
||||
#ifdef GLIDE_DEBUG
|
||||
{
|
||||
if ((FxI32)_GlideRoot.environment.snapshot > 0) {
|
||||
static char saveDBG[GDBG_MAX_LEVELS];
|
||||
int i;
|
||||
|
||||
/* turn off tracing after frame 0 and the snapshot frame */
|
||||
if ((_GlideRoot.stats.bufferSwaps == 0) ||
|
||||
(_GlideRoot.stats.bufferSwaps == _GlideRoot.environment.snapshot + 3)) {
|
||||
GDBG_PRINTF(FN_NAME": FX_SNAPSHOT (%ld)\n", _GlideRoot.stats.bufferSwaps);
|
||||
for (i = 1; i < GDBG_MAX_LEVELS; i++) {
|
||||
if (_GlideRoot.stats.bufferSwaps == 0) saveDBG[i] = (char)GDBG_GET_DEBUGLEVEL(i);
|
||||
GDBG_SET_DEBUGLEVEL(i, 0);
|
||||
}
|
||||
if ((FxI32)_GlideRoot.environment.snapshot > 0) {
|
||||
static char saveDBG[GDBG_MAX_LEVELS];
|
||||
int i;
|
||||
|
||||
/* turn off tracing after frame 0 and the snapshot frame */
|
||||
if ((_GlideRoot.stats.bufferSwaps == 0) ||
|
||||
(_GlideRoot.stats.bufferSwaps == _GlideRoot.environment.snapshot + 3)) {
|
||||
GDBG_PRINTF(FN_NAME": FX_SNAPSHOT (%ld)\n", _GlideRoot.stats.bufferSwaps);
|
||||
for (i = 1; i < GDBG_MAX_LEVELS; i++) {
|
||||
if (_GlideRoot.stats.bufferSwaps == 0) saveDBG[i] = (char)GDBG_GET_DEBUGLEVEL(i);
|
||||
GDBG_SET_DEBUGLEVEL(i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* turn on tracing after the snapshot frame */
|
||||
if (_GlideRoot.stats.bufferSwaps == _GlideRoot.environment.snapshot) {
|
||||
GDBG_PRINTF(FN_NAME": FX_SNAPSHOT (%ld)\n", _GlideRoot.stats.bufferSwaps);
|
||||
for (i = 1; i < GDBG_MAX_LEVELS; i++) {
|
||||
GDBG_SET_DEBUGLEVEL(i, saveDBG[i]);
|
||||
}
|
||||
/* turn on tracing after the snapshot frame */
|
||||
if (_GlideRoot.stats.bufferSwaps == _GlideRoot.environment.snapshot) {
|
||||
GDBG_PRINTF(FN_NAME": FX_SNAPSHOT (%ld)\n", _GlideRoot.stats.bufferSwaps);
|
||||
for (i = 1; i < GDBG_MAX_LEVELS; i++) {
|
||||
GDBG_SET_DEBUGLEVEL(i, saveDBG[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -879,7 +874,7 @@ GR_ENTRY(grBufferSwap, void, (int swapInterval))
|
||||
*bufPtrs[i] = (*bufPtrs[i] + 1) % numBufs;
|
||||
}
|
||||
|
||||
GDBG_INFO(gc->myLevel,
|
||||
GDBG_INFO(gc->myLevel,
|
||||
"\trenderBuf: 0x%X\n",
|
||||
gc->hwDep.cvgDep.renderBuf);
|
||||
}
|
||||
@@ -1451,7 +1446,6 @@ GR_STATE_ENTRY(grDepthBufferMode, void, (GrDepthBufferMode_t mode))
|
||||
*/
|
||||
#ifdef GLIDE_DEBUG
|
||||
FxBool
|
||||
|
||||
_grCanSupportDepthBuffer(void)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
@@ -1734,8 +1728,8 @@ GR_ENTRY(grGlideShutdown, void, (void))
|
||||
for(i = 0; i < _GlideRoot.hwConfig.num_sst; i++) {
|
||||
if (_GlideRoot.GCs[i].hwInitP) {
|
||||
/*if (_GlideRoot.CPUType.family >= 6) {*/
|
||||
sst1InitCaching(_GlideRoot.GCs[i].base_ptr, FXFALSE);
|
||||
/*}*/
|
||||
sst1InitCaching(_GlideRoot.GCs[i].base_ptr, FXFALSE);
|
||||
/*}*/
|
||||
sst1InitShutdown(_GlideRoot.GCs[i].base_ptr);
|
||||
|
||||
_GlideRoot.GCs[i].hwInitP = FXFALSE;
|
||||
@@ -1897,7 +1891,7 @@ GR_STATE_ENTRY(grRenderBuffer, void, (GrBuffer_t buffer))
|
||||
fbzMode |= ((buffer == GR_BUFFER_FRONTBUFFER)
|
||||
? SST_DRAWBUFFER_FRONT
|
||||
: SST_DRAWBUFFER_BACK);
|
||||
|
||||
|
||||
GR_SET_EXPECTED_SIZE(sizeof(FxU32), 1);
|
||||
GR_SET(BROADCAST_ID, hw, fbzMode, fbzMode);
|
||||
GR_CHECK_SIZE();
|
||||
@@ -1912,7 +1906,7 @@ GR_STATE_ENTRY(grRenderBuffer, void, (GrBuffer_t buffer))
|
||||
*/
|
||||
{
|
||||
const FxU32 oldRenderBuf = gc->hwDep.cvgDep.renderBuf;
|
||||
|
||||
|
||||
gc->hwDep.cvgDep.renderBuf = ((buffer == GR_BUFFER_FRONTBUFFER)
|
||||
? gc->hwDep.cvgDep.frontBuf
|
||||
: gc->hwDep.cvgDep.backBuf);
|
||||
@@ -1920,7 +1914,7 @@ GR_STATE_ENTRY(grRenderBuffer, void, (GrBuffer_t buffer))
|
||||
(gc->hwDep.cvgDep.sliOriginBufCount != 0)) _grSliOriginClear();
|
||||
}
|
||||
#endif /* (GLIDE_PLATFORM & GLIDE_HW_CVG) && GLIDE_BLIT_CLEAR */
|
||||
|
||||
|
||||
GR_END();
|
||||
#undef FN_NAME
|
||||
} /* grRenderBuffer */
|
||||
|
||||
@@ -16,12 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:10 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 75 6/23/98 5:38p Peter
|
||||
** lfb hinting
|
||||
|
||||
@@ -16,15 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.2.1 2004/12/12 15:29:44 koolsmoky
|
||||
** cosmetics
|
||||
**
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:10 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
*/
|
||||
|
||||
#define OFFICIAL 1
|
||||
@@ -32,7 +23,6 @@
|
||||
|
||||
#include <fxver.h>
|
||||
#include "rcver.h"
|
||||
//#include "fxbldno.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 10 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
@@ -90,7 +87,7 @@ n** -----------------------------------------------------------------------
|
||||
/* Check for OS */
|
||||
#if defined(__IRIX__) || defined(__sparc__) || defined(__linux__)
|
||||
# define GLIDE_OS GLIDE_OS_UNIX
|
||||
#elif defined(__DOS__)
|
||||
#elif defined(__DOS__) || defined(__MSDOS__)
|
||||
# define GLIDE_OS GLIDE_OS_DOS32
|
||||
#elif defined(__WIN32__)
|
||||
# define GLIDE_OS GLIDE_OS_WIN32
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 11 1/07/98 11:18a Atai
|
||||
* remove GrMipMapInfo and GrGC.mm_table in glide3
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 6 8/30/97 5:59p Tarolli
|
||||
* cleanups
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.2.8 2007/06/23 08:42:10 koolsmoky
|
||||
** Removed duplicate disableDitherSub envars
|
||||
**
|
||||
** Revision 1.1.1.1.2.7 2005/04/25 23:58:41 koolsmoky
|
||||
** Fix _texDownloadProcs comma separator.
|
||||
** Thanks to Ozkan Sezer <sezeroz@gmail.com>.
|
||||
@@ -745,8 +746,16 @@ _GlideInitEnvironment(void)
|
||||
(((envStr = GETENV(__envVar)) == NULL) ? (__defVal) : atol(envStr))
|
||||
|
||||
_GlideRoot.environment.triBoundsCheck = (GETENV("FX_GLIDE_BOUNDS_CHECK") != NULL);
|
||||
#ifdef GLIDE_SPLASH
|
||||
_GlideRoot.environment.noSplash = (GETENV("FX_GLIDE_NO_SPLASH") != NULL);
|
||||
#else
|
||||
_GlideRoot.environment.noSplash = 1;
|
||||
#endif
|
||||
#ifdef GLIDE_PLUG
|
||||
_GlideRoot.environment.shamelessPlug = (GETENV("FX_GLIDE_SHAMELESS_PLUG") != NULL);
|
||||
#else
|
||||
_GlideRoot.environment.shamelessPlug = 0;
|
||||
#endif
|
||||
_GlideRoot.environment.ignoreReopen = (GETENV("FX_GLIDE_IGNORE_REOPEN") != NULL);
|
||||
_GlideRoot.environment.texLodDither = ((GETENV("FX_GLIDE_LOD_DITHER") == NULL)
|
||||
? 0x00UL
|
||||
@@ -806,13 +815,7 @@ _GlideInitEnvironment(void)
|
||||
const char* errStr = s;
|
||||
|
||||
if (pciGetErrorCode() == PCI_ERR_NOERR) {
|
||||
#ifndef __linux__
|
||||
sprintf(s, "%s: glide2x.dll expected %s, none detected\n",
|
||||
FN_NAME, GLIDE_DRIVER_NAME);
|
||||
#else
|
||||
sprintf(s, "%s: libglide2x.so expected %s, none detected\n",
|
||||
FN_NAME, GLIDE_DRIVER_NAME);
|
||||
#endif
|
||||
sprintf(s, "%s: expected %s, none detected\n", FN_NAME, GLIDE_DRIVER_NAME);
|
||||
} else {
|
||||
errStr = pciGetErrorString();
|
||||
}
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:11 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 26 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
@@ -95,6 +90,13 @@
|
||||
#include "fxglide.h"
|
||||
#include "fxinline.h"
|
||||
|
||||
#ifndef GLIDE_SPLASH
|
||||
GR_DIENTRY(grSplash,void,(float x,float y,float w,float h,FxU32 _frame)) {
|
||||
/* nothing */
|
||||
}
|
||||
|
||||
#else /* GLIDE_SPLASH */
|
||||
|
||||
/*-----------------------------
|
||||
Constants
|
||||
-----------------------------*/
|
||||
@@ -956,3 +958,4 @@ GR_DIENTRY(grSplash,void,(float x,float y,float w,float h,FxU32 _frame))
|
||||
|
||||
}
|
||||
|
||||
#endif /* GLIDE_SPLASH */
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.2.2.4 2005/01/22 14:52:02 koolsmoky
|
||||
** enabled packed argb for cmd packet type 3
|
||||
**
|
||||
** Revision 1.2.2.3 2005/01/13 16:09:06 koolsmoky
|
||||
** Restict calls to pciOpen() pciClose() when compiled with DIRECTX option. this fixes problems with the win32 miniport opened in exclusive mode.
|
||||
**
|
||||
@@ -632,8 +633,7 @@ __tryReOpen:
|
||||
** oem map board
|
||||
*/
|
||||
if (gc->oemInit) {
|
||||
FARPROC oemInitMapBoard = NULL;
|
||||
oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
|
||||
FARPROC oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
|
||||
if (oemInitMapBoard != NULL)
|
||||
oemInitMapBoard(&gc->oemi);
|
||||
else
|
||||
@@ -675,8 +675,8 @@ __tryReOpen:
|
||||
gc->oemi.vid.clkFreq24bpp = tvVidtiming.clkFreq24bpp;
|
||||
|
||||
if (gc->oemInit) {
|
||||
FARPROC oemInitVideoTiming = NULL;
|
||||
if (oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4")) {
|
||||
FARPROC oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4");
|
||||
if (oemInitVideoTiming) {
|
||||
if (oemInitVideoTiming(&gc->oemi.vid)) {
|
||||
/*
|
||||
** video timing is updated by oem dll
|
||||
@@ -791,10 +791,12 @@ __tryReOpen:
|
||||
FARPROC oemGet;
|
||||
FxI32 tv_connected = 0;
|
||||
FxI32 slimaster[2], slislave[2];
|
||||
if (oemInitSetVideo = GetProcAddress(gc->oemInit, "_fxoemInitSetVideo@4"))
|
||||
oemInitSetVideo = GetProcAddress(gc->oemInit, "_fxoemInitSetVideo@4");
|
||||
if (oemInitSetVideo)
|
||||
oemInitSetVideo(&gc->oemi);
|
||||
|
||||
if (oemGet = GetProcAddress(gc->oemInit, "_fxoemGet@12")) {
|
||||
oemGet = GetProcAddress(gc->oemInit, "_fxoemGet@12");
|
||||
if (oemGet) {
|
||||
oemGet(FX_OEM_TVOUT, 4, &tv_connected);
|
||||
/* Is tv connected to the board? */
|
||||
if (tv_connected) {
|
||||
@@ -1569,11 +1571,12 @@ __errSliExit:
|
||||
/* --------------------------------------------------------
|
||||
Splash Screen
|
||||
--------------------------------------------------------*/
|
||||
#ifdef GLIDE_SPLASH
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
|
||||
if (!_GlideRoot.environment.noSplash) {
|
||||
HMODULE newSplash;
|
||||
HMODULE newSplash = LoadLibrary("3dfxspl2.dll");
|
||||
|
||||
if (newSplash = LoadLibrary("3dfxspl2.dll")) {
|
||||
if (newSplash) {
|
||||
GrState glideState;
|
||||
FxBool didLoad;
|
||||
GrSplashProc fxSplash;
|
||||
@@ -1618,7 +1621,7 @@ __errSliExit:
|
||||
grGlideSetState((const void*)&glideState);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FreeLibrary(newSplash);
|
||||
}
|
||||
}
|
||||
@@ -1632,6 +1635,7 @@ __errSliExit:
|
||||
0);
|
||||
_GlideRoot.environment.noSplash = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
_GlideRoot.windowsInit = FXTRUE; /* to avoid race with grSstControl() */
|
||||
|
||||
@@ -1882,16 +1886,16 @@ GR_ENTRY(grSstControl, FxBool, (GrControl_t code))
|
||||
if (isValidP) sst1InitVgaPassCtrl(gc->base_ptr, passFlag);
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
|
||||
{
|
||||
FARPROC oemControl = NULL;
|
||||
if (gc->oemInit) {
|
||||
if ((oemControl = GetProcAddress(gc->oemInit, "_fxoemControl@4")))
|
||||
FARPROC oemControl = GetProcAddress(gc->oemInit, "_fxoemControl@4");
|
||||
if (oemControl)
|
||||
oemControl(code);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
GDBG_INFO(41, "%s: Returning TRUE\n", FN_NAME);
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 4 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 19 12/12/97 12:43p Atai
|
||||
* move i and dateElem into the set up loop
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 42 6/24/98 5:19p Peter
|
||||
** cleanedup version merged w/ banshee
|
||||
**
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.2.2.3 2005/04/23 18:33:33 koolsmoky
|
||||
** added workaround for 8bit wide texture downloads for old revision TMUs
|
||||
**
|
||||
** Revision 1.2.2.2 2005/01/22 14:52:02 koolsmoky
|
||||
** enabled packed argb for cmd packet type 3
|
||||
**
|
||||
@@ -504,7 +505,7 @@ GR_ENTRY(grTexDownloadMipMapLevelPartial,
|
||||
? 1 /* 16-bit texture */
|
||||
: 2); /* 8-bit texture */
|
||||
|
||||
if (max_s <= 0) max_s = 1;
|
||||
if (max_s < 1) max_s = 1;
|
||||
if (widthSel > 2) widthSel = 3;
|
||||
|
||||
_GlideRoot.stats.texBytes += max_s * (max_t - t + 1) * 4;
|
||||
@@ -553,7 +554,7 @@ GR_ENTRY(grTexDownloadMipMapLevelPartial,
|
||||
max_s = width >> ((format < GR_TEXFMT_16BIT)
|
||||
? 2 /* 8-bit texture */
|
||||
: 1); /* 16-bit texture */
|
||||
if (max_s <= 0) max_s = 1;
|
||||
if (max_s < 1) max_s = 1;
|
||||
|
||||
_GlideRoot.stats.texBytes += max_s * (max_t - t + 1) * 4;
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 14 12/18/97 2:13p Peter
|
||||
* fogTable cataclysm
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.2.2 2005/04/26 00:02:45 koolsmoky
|
||||
** Use grDrawTriangle where TRISETUP is not necessary.
|
||||
**
|
||||
** Revision 1.1.1.1.2.1 2005/01/22 14:52:02 koolsmoky
|
||||
** enabled packed argb for cmd packet type 3
|
||||
**
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 10 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
*/
|
||||
|
||||
/* Multipass drawing */
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 22 2/20/98 5:31p Peter
|
||||
** crybaby glide
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.2.2 2007/05/19 08:38:01 koolsmoky
|
||||
** packed rgb fixes
|
||||
**
|
||||
** Revision 1.1.1.1.2.1 2005/01/22 14:52:02 koolsmoky
|
||||
** enabled packed argb for cmd packet type 3
|
||||
**
|
||||
|
||||
@@ -1,314 +0,0 @@
|
||||
#
|
||||
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
#
|
||||
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
# THE UNITED STATES.
|
||||
#
|
||||
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
|
||||
TAG_REGEXP = $(BUILD_ROOT)\$(FX_GLIDE_HW)\glide\src\glide.rx
|
||||
|
||||
# Compile for specific hardware
|
||||
!if "$(FX_GLIDE_HW)" == "cvg"
|
||||
FX_GLIDE_REAL_HW= 1
|
||||
|
||||
!if "$(FX_GLIDE_CTRISETUP)" == ""
|
||||
FX_GLIDE_CTRISETUP = 0
|
||||
!endif
|
||||
|
||||
HWSPEC = fifo.c
|
||||
LCDEFS = $(LCDEFS) -DCVG \
|
||||
-DGLIDE_CHIP_BROADCAST=1 -DGLIDE_DEFAULT_GAMMA=1.3f
|
||||
LCDEFS = $(LCDEFS) \
|
||||
-DGLIDE_BLIT_CLEAR=1 \
|
||||
!else if "$(FX_GLIDE_HW)" == "h3"
|
||||
FX_GLIDE_REAL_HW= 1
|
||||
FX_GLIDE_NO_FIFO= 1
|
||||
FX_GLIDE_CTRISETUP = 1
|
||||
HWSPEC = fifo.c
|
||||
LCDEFS = $(LCDEFS) -DH3 \
|
||||
-DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKET3_TRI_SETUP=0
|
||||
!else
|
||||
!error "FX_GLIDE_HW == unknown value (h3|cvg)"
|
||||
!endif
|
||||
|
||||
|
||||
!if "$(FX_GLIDE_VTUNE)"!=""
|
||||
OTSOPTS = /Zi
|
||||
LLDOPTS = /DEBUG
|
||||
!endif
|
||||
|
||||
!if "$(DEBUG)" == "1"
|
||||
DBGOPTS = -DGLIDE_DEBUG -DGDBG_INFO_ON
|
||||
GLIDE_SANITY_ALL = 1
|
||||
!endif
|
||||
|
||||
!if "$(FX_COMPILER)" == "MICROSOFT"
|
||||
DBGOPTS = $(DBGOPTS) /WX
|
||||
!endif
|
||||
|
||||
!if "$(FX_GLIDE_HW)" == ""
|
||||
!error "FX_GLIDE_HW not defined"
|
||||
!endif
|
||||
|
||||
# Display Options
|
||||
DSPOPTS =
|
||||
SUBLIBRARIES =
|
||||
!if ("$(HAL_HW)" != "")
|
||||
DSPOPTS = $(DSPOPTS) -DHAL_HW=1
|
||||
SUBLIBRARIES = $(SUBLIBRARIES) $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\sst1init.lib
|
||||
!endif
|
||||
!if !defined(DSPOPTS)
|
||||
!error "Unknown HAL_* configuration"
|
||||
!endif
|
||||
|
||||
# GLIDE_HW_TRI_SETUP: Use the hw TSU for triangle rendering.
|
||||
!if "$(FX_GLIDE_SW_SETUP)" == "1"
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_HW_TRI_SETUP=0 -DGLIDE_TRI_CULLING=1
|
||||
FX_GLIDE_CTRISETUP = 1
|
||||
!else # HW Setup
|
||||
# Do culling test in sw for independent triangles
|
||||
CULL_MODE = -DGLIDE_TRI_CULLING=0
|
||||
!if "$(FX_GLIDE_HW_CULL)" != "1"
|
||||
CULL_MODE = -DGLIDE_TRI_CULLING=1
|
||||
!endif
|
||||
DSPOPTS = $(DSPOPTS) $(CULL_MODE)
|
||||
|
||||
# Send a single DWORD ARGB rather than 4 fp values, at
|
||||
# the cost of doing the conversion.
|
||||
!if "$(FX_GLIDE_PACK_RGB)" == "1"
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_PACKED_RGB=1
|
||||
!endif
|
||||
|
||||
!endif # HW Tri Setup
|
||||
|
||||
!if "$(FX_GLIDE_NO_FIFO)" != "1"
|
||||
FIFODEFS = -DUSE_PACKET_FIFO=1 \
|
||||
-DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKET3_TRI_SETUP=1 \
|
||||
|
||||
!if "$(FX_GLIDE_DEBUG_FIFO)" == "1"
|
||||
# GLIDE_USE_DEBUG_FIFO: Run w/ the small fifo to cause me/glide more stress
|
||||
# FIFO_ASSERT_FULL: Check hw depth/fifo a lot (slow)
|
||||
LCDEFS = $(LCDEFS) \
|
||||
-DGLIDE_USE_DEBUG_FIFO=1 -DFIFO_ASSERT_FULL=1 \
|
||||
-DASSERT_FAULT=0 #-DGLIDE_SANITY_SIZE=1
|
||||
!endif # FX_GLIDE_DEBUG_FIFO
|
||||
!else # FX_GLIDE_NO_FIFO == 1
|
||||
FX_GLIDE_CTRISETUP = 1
|
||||
FIFODEFS = -DGLIDE_HW_TRI_SETUP=1
|
||||
!endif
|
||||
|
||||
# Optimization Options
|
||||
# This is for turning on and off algorithmic optimizations,
|
||||
# not flags to the C compiler. Usually this involves
|
||||
# enabling/disabling assembly language code, but it can also
|
||||
# change the way C code works, or how C code generates data to be
|
||||
# used by various pieces of code.
|
||||
# Usually these are set with environment variables or arguments to
|
||||
# nmake.
|
||||
#
|
||||
|
||||
# Turn on/off assembly language trisetup code.
|
||||
# (C on is Assembly off) (A ssembly T ri S etup OPTS)
|
||||
!if "$(FX_GLIDE_CTRISETUP)" == "1"
|
||||
ASMTRISETUP =
|
||||
ATSOPTS = -DGLIDE_USE_C_TRISETUP
|
||||
CFILES = gxdraw.c
|
||||
!else
|
||||
ASMTRISETUP = xdraw2.asm
|
||||
DSPOPTS = $(DSPOPTS) -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_PACKED_RGB=0
|
||||
!endif
|
||||
|
||||
OPTOPTS = $(GRMOPTS) $(OTSOPTS) $(ATSOPTS)
|
||||
|
||||
# local defines, begin with basics and then add on
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_LIB
|
||||
|
||||
!if "$(FX_GLIDE_CRYBABY)" == "1"
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_CHECK_COMPATABILITY=1
|
||||
!endif
|
||||
|
||||
# Turn Off/On compilation of shameless plug
|
||||
!if "$(FX_GLIDE_NO_PLUG)" == "1"
|
||||
!else
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_PLUG
|
||||
!endif
|
||||
|
||||
# Turn Off/On splash screen
|
||||
!if "$(FX_GLIDE_NO_SPLASH)" == "1"
|
||||
!else
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_SPLASH
|
||||
!endif
|
||||
|
||||
!if "$(FX_PCI_TARGET)" == "NT"
|
||||
LCDEFS = $(LCDEFS) -DNT_BUILD
|
||||
!endif
|
||||
|
||||
#Glide 3 Stuff, for migration all
|
||||
!if "$(FX_GLIDE3)" != ""
|
||||
LCDEFS = $(LCDEFS) -DGLIDE3
|
||||
GLIDE3FILES = gstrip.c distrip.c distate.c diget.c
|
||||
!endif
|
||||
|
||||
#Glide 3. remove migration stuff
|
||||
!if "$(FX_GLIDE3_ALPHA)" != ""
|
||||
LCDEFS = $(LCDEFS) -DGLIDE3_ALPHA
|
||||
GLIDE3FILES = gstrip.c distrip.c distate.c diget.c
|
||||
!endif
|
||||
|
||||
!if defined(GLIDE_SANITY_ALL) || defined(GLIDE_SANITY_SIZE)
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_SANITY_SIZE
|
||||
!endif
|
||||
!if defined(GLIDE_SANITY_ALL) || defined(GLIDE_SANITY_ASSERT)
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_SANITY_ASSERT
|
||||
!endif
|
||||
|
||||
# Local Defs, Includes, and Options (C)
|
||||
LCINCS = $(LCINCS) -I$(BUILD_ROOT)\$(FX_GLIDE_HW)\include
|
||||
LCOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS)
|
||||
|
||||
# Local Defs, Includes, and Options (ASM)
|
||||
LADEFS = $(LADEFS) $(ASM_REGMAP_DEFS)
|
||||
LAINCS = -I$(BUILD_ROOT)\$(FX_GLIDE_HW)\include
|
||||
LAOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS) /Fl /Sa
|
||||
|
||||
AFILES = $(ASMTRISETUP) cpudtect.asm
|
||||
|
||||
# sources
|
||||
HEADERS = glide.h gump.h glidesys.h glideutl.h
|
||||
PRIVATE_HEADERS = fxglide.h gsstdef.h fxinline.h
|
||||
|
||||
INSTALL_DESTINATION = $(BUILD_ROOT)\$(FX_GLIDE_HW)
|
||||
|
||||
CFILES = $(CFILES) gsplash.c g3df.c gu.c guclip.c gpci.c gump.c\
|
||||
diglide.c disst.c ditex.c gbanner.c gerror.c\
|
||||
gmovie.c digutex.c ddgump.c gaa.c gdraw.c\
|
||||
gglide.c glfb.c gsst.c gtex.c gtexdl.c\
|
||||
gutex.c $(HWSPEC) $(GLIDE3FILES)
|
||||
|
||||
OFILES = $(CFILES:.c=.obj)
|
||||
|
||||
OTHER_CFILES = fxgasm.c fxbldno.c fxinline.h
|
||||
|
||||
CODFILES = $(CFILES:.c=.cod)
|
||||
|
||||
# targets
|
||||
LDIRT = fxgasm.obj fxgasm.exe fxgasm.h fxinline.h fxbldno.obj fxbldno.exe fxbldno.h
|
||||
|
||||
!if "$(FX_GLIDE3)" == "1"
|
||||
LIBRARIES = glide3x.lib
|
||||
!else
|
||||
LIBRARIES = glide2x.lib
|
||||
!endif
|
||||
RCFILE = glide.rc
|
||||
|
||||
# Make a static link library for things like the diags.
|
||||
!if "$(FX_DLL_BUILD)" == "1"
|
||||
FX_DLL_LIBRARY = 1
|
||||
!else
|
||||
LCDEFS = $(LCDEFS) -DFX_STATIC_BUILD
|
||||
!endif
|
||||
|
||||
|
||||
LCDEFS = $(LCDEFS) $(FIFODEFS)
|
||||
|
||||
!include $(BUILD_ROOT)\swlibs/include/nmake/3dfx.mak
|
||||
|
||||
codfiles: $(CODFILES)
|
||||
xdraw2.obj : xdraw2.asm xdraw2.inc fxgasm.h fxinline.h
|
||||
|
||||
ctags: $(CFILES)
|
||||
ctags $(CFILES)
|
||||
|
||||
gbanner.obj : banner.inc
|
||||
gsplash.obj : splshdat.c
|
||||
|
||||
!if "$(FX_TARGET)" == "WIN32"
|
||||
!if "$(FX_DLL_BUILD)" != ""
|
||||
glide2x.dll:
|
||||
del fxbldno.h
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!if "$(FX_TARGET)" == "DOS"
|
||||
!if "$(FX_DLL_BUILD)" != ""
|
||||
|
||||
glimport.obj: glimport.asm
|
||||
|
||||
IMPORT_DEPS = $(BUILD_ROOT)\swlibs\lib\dllload.lib \
|
||||
$(DLLLOADS) glimport.obj
|
||||
|
||||
glide2x.lib: $(IMPORT_DEPS)
|
||||
if exist glide2x.lib del glide2x.lib
|
||||
wlib glide2x.lib +$(BUILD_ROOT)\swlibs\lib\dllload.lib +glimport.obj
|
||||
!if "$(FX_WATCOM_REG_CALL)" != "1"
|
||||
wlib glide2x.lib +$(BUILD_ROOT)\swlibs\lib\dllloads.obj
|
||||
!endif
|
||||
if exist $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\glide2x.lib attrib -r $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\glide2x.lib
|
||||
if exist $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\glide2x.lib del $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\glide2x.lib
|
||||
xcopy /d /k /r /i /s /q glide2x.lib $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib
|
||||
attrib +r $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\glide2x.lib
|
||||
|
||||
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!if "$(FX_COMPILER)" == "WATCOM"
|
||||
#------------------------------------------------------------
|
||||
# special rul for makeing glideapi.obj under WATCOM
|
||||
#
|
||||
|
||||
glideapi.obj : glideapi.c
|
||||
set $(CC_ENV_VAR)=-d2 $(GCFLAGS) $(LCFLAGS) $(VCFLAGS)
|
||||
$(CC) glideapi.c
|
||||
!endif
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# special rules for making FXGASM.H
|
||||
#
|
||||
fxgasm.exe: fxgasm.c $(HEADERS) gsstdef.h fxglide.h Makefile
|
||||
!if "$(FX_COMPILER)" == "MICROSOFT"
|
||||
$(CC) -o $@ fxgasm.c $(GCDEFS) $(LCDEFS) $(VCDEFS) $(LCOPTS) \
|
||||
-I$(BUILD_ROOT)\$(FX_GLIDE_HW)\include -I$(BUILD_ROOT)\swlibs\include $(LDFLAGS)
|
||||
!else if "$(FX_COMPILER)" == "WATCOM"
|
||||
set WCC386=$(CFLAGS)
|
||||
wcl386 fxgasm.c
|
||||
!endif
|
||||
fxgasm.h: fxgasm.exe
|
||||
fxgasm -hex > fxgasm.h
|
||||
fxinline.h: fxgasm.exe
|
||||
fxgasm -inline > fxinline.h
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# special rules for making FXBLDNO.H
|
||||
#
|
||||
|
||||
fxbldno.exe: fxbldno.c $(HEADERS) $(PRIVATE_HEADERS)
|
||||
!if "$(FX_COMPILER)" == "MICROSOFT"
|
||||
$(CC) -o $@ fxbldno.c $(GCDEFS) $(LCDEFS) $(VCDEFS) $(LCOPTS) $(LDFLAGS)
|
||||
!else if "$(FX_COMPILER)" == "WATCOM"
|
||||
set WCC386=$(CFLAGS)
|
||||
wcl386 fxbldno.c
|
||||
!endif
|
||||
|
||||
fxbldno.h: fxbldno.exe
|
||||
fxbldno > fxbldno.h
|
||||
|
||||
glide.res: rcver.h fxbldno.h
|
||||
gglide.obj: rcver.h
|
||||
|
||||
!if "$(FX_GLIDE_CTRISETUP)" != "1"
|
||||
gdraw.obj: fxinline.h
|
||||
!endif
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
|
||||
#include "fxbldno.h"
|
||||
/*#include "fxbldno.h"*/
|
||||
|
||||
#define MANVERSION 2
|
||||
#define MANREVISION 56
|
||||
|
||||
//#define BUILD_NUMBER 40405
|
||||
#define BUILD_NUMBER 40405
|
||||
|
||||
#ifndef GLIDE3
|
||||
#define VERSIONSTR "2.56\0"
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:13 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 7 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
##
|
||||
## COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
##
|
||||
## $Header$
|
||||
## $Revision$
|
||||
## $Log$
|
||||
## Revision 1.2 1999/12/11 00:42:21 joseph
|
||||
## Changed \(.data) to .section .data to fix build errors with binutils 2.9.5.
|
||||
##
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
;;
|
||||
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
;;
|
||||
;; $Header$
|
||||
;; $Revision$
|
||||
;; $Log$
|
||||
;; Revision 1.1.1.1.2.4 2005/04/23 18:36:36 koolsmoky
|
||||
;; fixed 3dnow! and mmx optimizations
|
||||
;;
|
||||
;; Revision 1.1.1.1.2.3 2005/01/22 14:52:02 koolsmoky
|
||||
;; enabled packed argb for cmd packet type 3
|
||||
;;
|
||||
@@ -31,7 +31,6 @@
|
||||
;;
|
||||
;; Revision 1.1.1.1 1999/12/07 21:49:13 joseph
|
||||
;; Initial checkin into SourceForge.
|
||||
;;
|
||||
;;
|
||||
;; 7 5/18/98 12:16p Peter
|
||||
;; culling enabling
|
||||
@@ -88,7 +87,7 @@ extrn _FifoMakeRoom, 12
|
||||
%endif
|
||||
%ENDMACRO ; WRITE_MM1LOW_FIFO
|
||||
|
||||
segment DATA
|
||||
segment SEG_DATA
|
||||
One DD 1.0
|
||||
Area DD 0
|
||||
%IF GLIDE_PACKED_RGB
|
||||
@@ -96,7 +95,7 @@ segment DATA
|
||||
bias1 DD 0
|
||||
%ENDIF
|
||||
|
||||
segment CONST
|
||||
segment SEG_CONST
|
||||
$T2003 DD 12288.0
|
||||
$T2005 DD 1.0
|
||||
$T2006 DD 256.0
|
||||
@@ -125,7 +124,7 @@ Y equ 4
|
||||
;; enables/disables trisProcessed and trisDrawn counters
|
||||
%define STATS 1
|
||||
|
||||
segment TEXT
|
||||
segment SEG_TEXT
|
||||
|
||||
ALIGN 32
|
||||
PROC_TYPE _trisetup_cull
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
;;
|
||||
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
;;
|
||||
;; $Header$
|
||||
;; $Revision$
|
||||
;; $Log$
|
||||
;; Revision 1.1.1.1.2.4 2005/04/23 18:36:36 koolsmoky
|
||||
;; fixed 3dnow! and mmx optimizations
|
||||
;;
|
||||
;; Revision 1.1.1.1.2.3 2005/01/22 14:52:02 koolsmoky
|
||||
;; enabled packed argb for cmd packet type 3
|
||||
;;
|
||||
|
||||
@@ -17,12 +17,6 @@
|
||||
##
|
||||
## COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
##
|
||||
## $Header$
|
||||
## $Revision$
|
||||
## $Log$
|
||||
## Revision 1.1.1.1 1999/12/07 21:49:13 joseph
|
||||
## Initial checkin into SourceForge.
|
||||
##
|
||||
#
|
||||
# 2 10/30/97 6:53p Peter
|
||||
# first real cut at tri asm
|
||||
|
||||
46
glide2x/cvg/glide/src/xdrawtri.asm
Normal file
46
glide2x/cvg/glide/src/xdrawtri.asm
Normal file
@@ -0,0 +1,46 @@
|
||||
;; THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
;; PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
;; TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
;; INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
;; DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
;; THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
;; EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
;; FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
;;
|
||||
;; USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
;; RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
;; TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
;; AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
;; SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
;; THE UNITED STATES.
|
||||
;;
|
||||
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
|
||||
;; Adapted from gdraw.c:grDrawTriangle() for nasm
|
||||
|
||||
%include "xos.inc"
|
||||
|
||||
%include "fxgasm.h"
|
||||
|
||||
extrn _GlideRoot
|
||||
|
||||
segment SEG_TEXT
|
||||
|
||||
align 16
|
||||
proc grDrawTriangle, 12
|
||||
|
||||
;;mov edx, dword [_GlideRoot+curGC]
|
||||
;;mov eax, dword [edx+kTriProcOffset]
|
||||
mov eax, dword [_GlideRoot+curGC]
|
||||
jmp [eax + kTriProcOffset]
|
||||
endp
|
||||
align 16
|
||||
|
||||
%if XOS == XOS_WIN32
|
||||
%ifdef __MINGW32__
|
||||
; GNU LD fails with '_' prefix
|
||||
export grDrawTriangle@12
|
||||
%else
|
||||
export _grDrawTriangle@12
|
||||
%endif
|
||||
%endif ; _WIN32
|
||||
@@ -1,8 +1,10 @@
|
||||
;
|
||||
; compulsory header for glide3/xdraw* assembly specializations (NASM)
|
||||
;
|
||||
; $Header$
|
||||
; $Log$
|
||||
; Revision 1.1.2.1 2004/12/23 20:45:56 koolsmoky
|
||||
; converted to nasm syntax
|
||||
; added x86 asm, 3dnow! triangle and mmx, 3dnow! texture download optimizations
|
||||
;
|
||||
; Revision 1.1.2.3 2004/10/04 08:57:52 dborca
|
||||
; supporting DOS/OpenWatcom in Assembly files
|
||||
;
|
||||
@@ -74,7 +76,7 @@
|
||||
|
||||
%macro endp 0
|
||||
%ifnctx proc
|
||||
%error Mismatched `endp'/`proc'
|
||||
%error Mismatched ENDP/PROC
|
||||
%else
|
||||
%pop
|
||||
%endif
|
||||
@@ -105,9 +107,9 @@
|
||||
;---------------------------------------
|
||||
%if XOS == XOS_WIN32
|
||||
|
||||
%define TEXT .text align=32
|
||||
%define DATA .data align=32
|
||||
%define CONST .rdata align=32
|
||||
%define SEG_TEXT .text align=32
|
||||
%define SEG_DATA .data align=32
|
||||
%define SEG_CONST .rdata align=32
|
||||
|
||||
%macro GET_GC 0
|
||||
mov gc, [_GlideRoot + curGC]
|
||||
@@ -120,9 +122,9 @@
|
||||
;---------------------------------------
|
||||
%if XOS == XOS_DJGPP
|
||||
|
||||
%define TEXT .text
|
||||
%define DATA .data
|
||||
%define CONST .rodata
|
||||
%define SEG_TEXT .text
|
||||
%define SEG_DATA .data
|
||||
%define SEG_CONST .rodata
|
||||
|
||||
%macro GET_GC 0
|
||||
mov gc, [_GlideRoot + curGC]
|
||||
@@ -135,9 +137,9 @@
|
||||
;---------------------------------------
|
||||
%if XOS == XOS_LINUX
|
||||
|
||||
%define TEXT .text align=32
|
||||
%define DATA .data align=32
|
||||
%define CONST .rodata align=32
|
||||
%define SEG_TEXT .text align=32
|
||||
%define SEG_DATA .data align=32
|
||||
%define SEG_CONST .rodata align=32
|
||||
|
||||
%macro GET_GC 0
|
||||
mov gc, [_GlideRoot + curGC]
|
||||
@@ -150,9 +152,9 @@
|
||||
;---------------------------------------
|
||||
%if XOS == XOS_WATCD
|
||||
|
||||
%define TEXT _TEXT align=1 public use32 class=CODE FLAT
|
||||
%define DATA _DATA align=4 public use32 class=DATA FLAT
|
||||
%define CONST CONST2 align=4 public use32 class=DATA FLAT
|
||||
%define SEG_TEXT _TEXT align=1 public use32 class=CODE FLAT
|
||||
%define SEG_DATA _DATA align=4 public use32 class=DATA FLAT
|
||||
%define SEG_CONST CONST2 align=4 public use32 class=DATA FLAT
|
||||
|
||||
%macro GET_GC 0
|
||||
mov gc, [_GlideRoot + curGC]
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
;;
|
||||
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
;;
|
||||
;; $Header$
|
||||
;; $Revision$
|
||||
;; $Log$
|
||||
;; Revision 1.1.2.3 2007/06/23 08:48:00 koolsmoky
|
||||
;; removed unneeded emms calls
|
||||
;;
|
||||
;; Revision 1.1.2.2 2005/04/23 18:36:36 koolsmoky
|
||||
;; fixed 3dnow! and mmx optimizations
|
||||
;;
|
||||
@@ -120,7 +120,7 @@ _texData$ equ 24 + STACKOFFSET
|
||||
;
|
||||
;--------------------------------------------------------------------------
|
||||
|
||||
segment TEXT
|
||||
segment SEG_TEXT
|
||||
|
||||
ALIGN 32
|
||||
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.2.1 2004/12/23 20:45:56 koolsmoky
|
||||
** converted to nasm syntax
|
||||
** added x86 asm, 3dnow! triangle and mmx, 3dnow! texture download optimizations
|
||||
**
|
||||
** Revision 1.1.1.1 1999/12/07 21:42:38 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
|
||||
59
glide2x/cvg/glide/tests/Makefile.DJ
Normal file
59
glide2x/cvg/glide/tests/Makefile.DJ
Normal file
@@ -0,0 +1,59 @@
|
||||
# DOS/DJGPP tests makefile for Glide2
|
||||
#
|
||||
# Copyright (c) 2002 - Borca Daniel
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# CPU optimize for the given processor.
|
||||
# default = pentium
|
||||
# DXE=1 use DXE modules.
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
.PHONY: all clean
|
||||
.SUFFIXES: .c .o .exe
|
||||
.SECONDARY: tlib.o plib.o
|
||||
|
||||
FX_GLIDE_HW = cvg
|
||||
TOP = ../../..
|
||||
CPU ?= pentium
|
||||
|
||||
UNLINK = rm -f $(1)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -O2 -ffast-math -mtune=$(CPU)
|
||||
CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc
|
||||
CFLAGS += -I$(TOP)/swlibs/fxmisc
|
||||
CFLAGS += -D__DOS__ -DCVG
|
||||
CFLAGS += -D__DOS32__
|
||||
|
||||
LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib
|
||||
|
||||
ifdef DXE
|
||||
LDLIBS = -lglide2i
|
||||
else
|
||||
LDLIBS = -lglide2x
|
||||
endif
|
||||
|
||||
.c.o:
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
%.exe: tlib.o %.o
|
||||
$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
|
||||
qatest00.exe: tlib.o plib.o qatest00.o
|
||||
$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
clean:
|
||||
-$(call UNLINK,*.o)
|
||||
-$(call UNLINK,*.exe)
|
||||
54
glide2x/cvg/glide/tests/Makefile.linux
Normal file
54
glide2x/cvg/glide/tests/Makefile.linux
Normal file
@@ -0,0 +1,54 @@
|
||||
# Linux tests makefile for Glide2
|
||||
#
|
||||
# Copyright (c) 2002 - Borca Daniel
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# CPU optimize for the given processor.
|
||||
# default = pentium
|
||||
#
|
||||
# Targets:
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
.PHONY: all clean
|
||||
.SUFFIXES: .c .o .exe
|
||||
.SECONDARY: tlib.o plib.o linutil.o
|
||||
|
||||
FX_GLIDE_HW = cvg
|
||||
TOP = ../../..
|
||||
CPU ?= pentium
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -O2 -ffast-math -mtune=$(CPU)
|
||||
CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc -I$(TOP)/$(FX_GLIDE_HW)/init
|
||||
CFLAGS += -I$(TOP)/swlibs/fxmisc
|
||||
CFLAGS += -DCVG
|
||||
|
||||
LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib
|
||||
|
||||
LDLIBS = -lglide2x
|
||||
LDLIBS += -lm
|
||||
|
||||
.c.o:
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
%.exe: linutil.o tlib.o %.o
|
||||
$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
|
||||
linutil.o: $(TOP)/swlibs/fxmisc/linutil.c
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
|
||||
qatest00.exe: linutil.o tlib.o plib.o qatest00.o
|
||||
$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f *.exe
|
||||
49
glide2x/cvg/glide/tests/Makefile.win32
Normal file
49
glide2x/cvg/glide/tests/Makefile.win32
Normal file
@@ -0,0 +1,49 @@
|
||||
# Win32 tests makefile for Glide2
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2004 - Borca Daniel
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = cvg
|
||||
# CPU optimize for the given processor.
|
||||
# default = 6
|
||||
#
|
||||
# Targets:
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .obj .exe
|
||||
.SECONDARY: tlib.obj plib.obj
|
||||
|
||||
FX_GLIDE_HW ?= cvg
|
||||
TOP = ../../..
|
||||
CPU ?= 6
|
||||
|
||||
CC = cl
|
||||
CFLAGS = -nologo -W3 -D__MSC__=1 -DNDEBUG -G$(CPU) -O2 -MT
|
||||
CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc
|
||||
CFLAGS += -I$(TOP)/swlibs/fxmisc
|
||||
CFLAGS += -D__WIN32__ -DCVG
|
||||
|
||||
LD = link
|
||||
LDFLAGS = -nologo -opt:WIN98 -machine:IX86
|
||||
LDLIBS = user32.lib gdi32.lib $(TOP)/$(FX_GLIDE_HW)/lib/glide2x.lib
|
||||
|
||||
.c.obj:
|
||||
$(CC) -Fo$@ $(CFLAGS) -c $<
|
||||
%.exe: tlib.obj %.obj
|
||||
$(LD) -out:$@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
|
||||
qatest00.exe: tlib.obj plib.obj qatest00.obj
|
||||
$(LD) -out:$@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
@@ -21,9 +21,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -99,13 +96,13 @@ int main( int argc, char **argv)
|
||||
dstfname[0] = 0;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( (rv = tlGetOpt( argc, argv, "nrst", &match, &remArgs )) ) {
|
||||
while ((rv = tlGetOpt(argc, argv, "nrst", &match, &remArgs)) != 0) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -222,6 +219,7 @@ int main( int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
diff.data = NULL;
|
||||
diff.width = 0;
|
||||
diff.height = 0;
|
||||
|
||||
@@ -437,5 +435,3 @@ static void imageConvert( void *dst, void *src,
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -19,16 +19,13 @@
|
||||
**
|
||||
*/
|
||||
|
||||
#ifndef __linux__
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include <glide.h>
|
||||
@@ -71,13 +68,13 @@ int main( int argc, char **argv) {
|
||||
// GrFog_t fogtable[GR_FOG_TABLE_SIZE];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
while ((rv = tlGetOpt(argc, argv, "nr", &match, &remArgs)) != 0) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 1995, 3Dfx Interactive, Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
|
||||
# the contents of this file may not be disclosed to third parties, copied or
|
||||
# duplicated in any form, in whole or in part, without the prior written
|
||||
# permission of 3Dfx Interactive, Inc.
|
||||
#
|
||||
# RESTRICTED RIGHTS LEGEND:
|
||||
# Use, duplication or disclosure by the Government is subject to restrictions
|
||||
# as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
||||
# and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
||||
# successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
||||
# rights reserved under the Copyright Laws of the United States.
|
||||
#
|
||||
|
||||
|
||||
LDIRT= *.exe *.map *.sys *.obj *.lib
|
||||
|
||||
!ifdef FX_NO_GLIDE_SWDIAGS
|
||||
!include $(BUILD_ROOT_SWLIBS)/include/nmake/3dfx.mak
|
||||
!else
|
||||
!if "$(FX_GLIDE_DSP_TARGET)"=="SIM"
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_SIMULATOR
|
||||
LLDLIBS = $(LLDLIBS) $(BUILD_ROOT_SWLIBS)\lib\wing32.lib
|
||||
!endif
|
||||
|
||||
LCINCS = $(LCINCS) -I$(BUILD_ROOT_SST1)\include
|
||||
|
||||
!if "$(FX_COMPILER)"=="WATCOM"
|
||||
LIBOBJS = tlib.lib plib.lib
|
||||
!else
|
||||
LIBOBJS = tlib.obj plib.obj
|
||||
!endif
|
||||
|
||||
!if "$(FX_TARGET)"=="WIN32"
|
||||
FX_TARGET_MINOR=WIN95
|
||||
!endif
|
||||
|
||||
LLDLIBS = $(LLDLIBS) $(BUILD_ROOT_SST1)\lib\glide2x.lib $(LIBOBJS)
|
||||
|
||||
PRIVATE_HEADERS = tlib.h tlib.c plib.h plib.c tldata.inc
|
||||
|
||||
CFILES = display.c \
|
||||
test00.c \
|
||||
test01.c \
|
||||
test02.c \
|
||||
test03.c \
|
||||
test04.c \
|
||||
test05.c \
|
||||
test06.c \
|
||||
test07.c \
|
||||
test08.c \
|
||||
test09.c \
|
||||
test10.c \
|
||||
test11.c \
|
||||
test12.c \
|
||||
test13.c \
|
||||
test14.c \
|
||||
test15.c \
|
||||
test16.c \
|
||||
test17.c \
|
||||
test18.c \
|
||||
test19.c \
|
||||
test20.c \
|
||||
test21.c \
|
||||
test22.c \
|
||||
test23.c \
|
||||
test24.c \
|
||||
test25.c \
|
||||
test26.c \
|
||||
test27.c \
|
||||
test28.c \
|
||||
test29.c \
|
||||
qatest00.c \
|
||||
qatest01.c \
|
||||
h3dtst01.c \
|
||||
h3dtst02.c
|
||||
|
||||
PROGRAMS = $(CFILES:.c=.exe)
|
||||
|
||||
DATAFILES = alpha.3df decal1.3df lava.3df light.3df matt1.3df miro.3df \
|
||||
argb1555.3df argb4444.3df argb8332.3df argb8888.3df \
|
||||
ayiq.3df yiq.3df p8.3df ap88.3df rgb332.3df rgb565.3df
|
||||
|
||||
!include $(BUILD_ROOT_SWLIBS)/include/nmake/3dfx.mak
|
||||
|
||||
$(PROGRAMS): $(LLDLIBS)
|
||||
|
||||
!if "$(FX_COMPILER)"=="WATCOM"
|
||||
!if "$(FX_TARGET)"=="DOS"
|
||||
tlib.lib: tlib.obj
|
||||
wlib -b -c -n -q -p=512 tlib tlib.obj
|
||||
plib.lib: plib.obj
|
||||
wlib -b -c -n -q -p=512 plib plib.obj
|
||||
!else
|
||||
tlib.lib: tlib.obj
|
||||
wlib -b -c -n -q -p=512 tlib tlib.obj
|
||||
plib.lib: plib.obj
|
||||
wlib -b -c -n -q -p=512 plib plib.obj
|
||||
!endif
|
||||
!endif
|
||||
|
||||
test00: test00.exe
|
||||
test01: test01.exe
|
||||
test02: test02.exe
|
||||
test03: test03.exe
|
||||
test04: test04.exe
|
||||
test05: test05.exe
|
||||
test06: test06.exe
|
||||
test07: test07.exe
|
||||
test08: test08.exe
|
||||
test09: test09.exe
|
||||
test10: test10.exe
|
||||
test11: test11.exe
|
||||
test12: test12.exe
|
||||
test13: test13.exe
|
||||
test14: test14.exe
|
||||
test15: test15.exe
|
||||
test16: test16.exe
|
||||
test17: test17.exe
|
||||
test18: test18.exe
|
||||
test19: test19.exe
|
||||
test20: test20.exe
|
||||
test21: test21.exe
|
||||
test22: test22.exe
|
||||
test23: test23.exe
|
||||
test24: test24.exe
|
||||
test25: test25.exe
|
||||
test26: test26.exe
|
||||
test27: test27.exe
|
||||
test28: test28.exe
|
||||
test29: test29.exe
|
||||
test30: test30.exe
|
||||
test31: test31.exe
|
||||
qatest00: qatest00.exe
|
||||
qatest01: qatest01.exe
|
||||
h3dtst01: h3dtst01.exe
|
||||
h3dtst02: h3dtst02.exe
|
||||
|
||||
foo: foo.exe
|
||||
display:display.exe
|
||||
|
||||
!endif
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
CFLAGS = -I. -I/usr/include/glide
|
||||
|
||||
SRCS = $(wildcard test*.c)
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
EXECS = $(basename $(SRCS))
|
||||
LIB_OBJS = tlib.o
|
||||
|
||||
all: $(EXECS)
|
||||
|
||||
clean:
|
||||
rm $(EXECS) *.o
|
||||
|
||||
$(EXECS): $(OBJS) $(LIB_OBJS)
|
||||
$(CC) -o $@ $@.o $(LIB_OBJS) -lglide -lm
|
||||
@@ -1,77 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 1995, 3Dfx Interactive, Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
|
||||
# the contents of this file may not be disclosed to third parties, copied or
|
||||
# duplicated in any form, in whole or in part, without the prior written
|
||||
# permission of 3Dfx Interactive, Inc.
|
||||
#
|
||||
# RESTRICTED RIGHTS LEGEND:
|
||||
# Use, duplication or disclosure by the Government is subject to restrictions
|
||||
# as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
||||
# and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
||||
# successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
||||
# rights reserved under the Copyright Laws of the United States.
|
||||
#
|
||||
|
||||
|
||||
LDIRT= $(PROGRAMS)
|
||||
|
||||
GLIDE_ROOT = $(BUILD_ROOT)/$(FX_GLIDE_HW)
|
||||
|
||||
LIBOBJS = tlib.o plib.o
|
||||
|
||||
GLIDELIB = -L$(GLIDE_ROOT)/lib -lglide
|
||||
|
||||
LLDLIBS = $(LIBOBJS) $(GLIDELIB)
|
||||
|
||||
PRIVATE_HEADERS = tlib.h tlib.c plib.h plib.c tldata.inc
|
||||
|
||||
CFILES = display.c \
|
||||
test00.c \
|
||||
test01.c \
|
||||
test02.c \
|
||||
test03.c \
|
||||
test04.c \
|
||||
test05.c \
|
||||
test06.c \
|
||||
test07.c \
|
||||
test08.c \
|
||||
test09.c \
|
||||
test10.c \
|
||||
test11.c \
|
||||
test12.c \
|
||||
test13.c \
|
||||
test14.c \
|
||||
test15.c \
|
||||
test16.c \
|
||||
test17.c \
|
||||
test18.c \
|
||||
test19.c \
|
||||
test20.c \
|
||||
test21.c \
|
||||
test22.c \
|
||||
test23.c \
|
||||
test24.c \
|
||||
test25.c \
|
||||
test26.c \
|
||||
test27.c \
|
||||
test28.c \
|
||||
test29.c \
|
||||
qatest00.c \
|
||||
qatest01.c \
|
||||
h3dtst01.c \
|
||||
h3dtst02.c
|
||||
|
||||
PROGRAMS = $(CFILES:.c=)
|
||||
|
||||
DATAFILES = alpha.3df decal1.3df lava.3df light.3df matt1.3df miro.3df \
|
||||
argb1555.3df argb4444.3df argb8332.3df argb8888.3df \
|
||||
ayiq.3df yiq.3df p8.3df ap88.3df rgb332.3df rgb565.3df
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
|
||||
|
||||
$(PROGRAMS): $(LIBOBJS)
|
||||
|
||||
@@ -16,18 +16,10 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
**
|
||||
** $Revision$
|
||||
** $Date$
|
||||
**
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
@@ -55,7 +47,6 @@ static void prGetLod( GrTexInfo *lpTexInfo, GrLOD_t deLod, void *data );
|
||||
static void prPopLod( GrTexInfo *lpDeTexInfo, mipMapEnd_t deMipMapEnd );
|
||||
static void prPushLod( GrTexInfo *lpDeTexInfo, mipMapEnd_t deMipMapEnd );
|
||||
static FxU32 prGetTxMnAdd( hTexId_t deTexId, GrLOD_t deLod );
|
||||
static int prGetLodWidth( GrLOD_t lod, GrAspectRatio_t aspect );
|
||||
static int prGetLodHeight( GrLOD_t lod, GrAspectRatio_t aspect );
|
||||
static FxU32 prGetMultiMemBump( const GrTexInfo *const deTexInfo,
|
||||
GrTexBaseRange_t deTexBase,
|
||||
@@ -102,12 +93,14 @@ plTxMnLoadTxMngr( TlTexture* lpTexture )
|
||||
Arguments:
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
#if 0 /* NOT USED */
|
||||
static void
|
||||
prTxMnSetBeenPopd( hTexId_t deTexId, FxBool bBeenPopd )
|
||||
{
|
||||
SET_BEENPOPD( tlTxMnMngr[deTexId], bBeenPopd );
|
||||
SET_DIRTY( tlTxMnMngr[deTexId], FXTRUE ); /* just for messing with it */
|
||||
}
|
||||
#endif
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1333,6 +1326,7 @@ FxU32 prTexMultiMemRequired( FxU32 deMipMask, GrTexBaseRange_t deMultiSeg,
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
#if 0 /* NOT USED */
|
||||
static int
|
||||
prGetLodWidth( GrLOD_t lod, GrAspectRatio_t aspect )
|
||||
{
|
||||
@@ -1345,6 +1339,7 @@ prGetLodWidth( GrLOD_t lod, GrAspectRatio_t aspect )
|
||||
|
||||
return( val );
|
||||
}
|
||||
#endif
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
@@ -16,14 +16,8 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
**
|
||||
** $Revision$
|
||||
** $Date$
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _PLIB_H_
|
||||
#define _PLIB_H_
|
||||
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -63,7 +60,7 @@ static FxI32 g_nLodToDwnld;
|
||||
static FxBool g_bDoLodPrtlDwnld = FXFALSE;
|
||||
static FxI32 g_nLodPrtlFstRow;
|
||||
static FxI32 g_nLodPrtlLstRow;
|
||||
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
@@ -175,14 +172,14 @@ int main( int argc, char **argv) {
|
||||
fgVerts[2].a = 255.f, fgVerts[2].oow = 1.f;
|
||||
fgVerts[2].tmuvtx[0].sow = 0.f;
|
||||
fgVerts[2].tmuvtx[0].tow = 0.f;
|
||||
|
||||
|
||||
fgVerts[3].x = 0.f, fgVerts[3].y = 0.f;
|
||||
fgVerts[3].a = 255.f, fgVerts[3].oow = 1.f;
|
||||
fgVerts[3].tmuvtx[0].sow = 0.f;
|
||||
fgVerts[3].tmuvtx[0].tow = 0.f;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) )
|
||||
while ((rv = tlGetOpt(argc, argv, "nr", &match, &remArgs)) != 0)
|
||||
{
|
||||
if ( rv == -1 )
|
||||
{
|
||||
@@ -217,7 +214,7 @@ int main( int argc, char **argv) {
|
||||
printf( "Press A Key To Begin Test.\n" );
|
||||
tlGetCH();
|
||||
}
|
||||
|
||||
|
||||
/* Initialize Glide */
|
||||
grGlideInit();
|
||||
assert( grSstQueryHardware( &hwconfig ) );
|
||||
@@ -257,7 +254,7 @@ int main( int argc, char **argv) {
|
||||
/* done loading plTxMn */
|
||||
|
||||
// grTexFilterMode( GR_TMU0, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR );
|
||||
|
||||
|
||||
fxColorValue = (0x00FFFFFF | ( ((int) alpha) << 24 ) );
|
||||
grConstantColorValue(fxColorValue);
|
||||
|
||||
@@ -327,7 +324,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
tlConOutput("LOD Bias is %f\n", fBiasLevel);
|
||||
} /* done with the Con output stuff */
|
||||
|
||||
|
||||
/* do the Bg texture */
|
||||
if (bBgImage)
|
||||
{
|
||||
@@ -352,7 +349,7 @@ int main( int argc, char **argv) {
|
||||
grDrawTriangle( &bgVerts[0], &bgVerts[1], &bgVerts[3] );
|
||||
grDrawTriangle( &bgVerts[1], &bgVerts[2], &bgVerts[3] );
|
||||
} /* done with Bg txtre */
|
||||
|
||||
|
||||
/* Setup the system for the Fg Texture */
|
||||
switch( mipMapMode )
|
||||
{
|
||||
@@ -488,9 +485,9 @@ int main( int argc, char **argv) {
|
||||
tlGetDimsByConst(resolution,
|
||||
&scrWidth,
|
||||
&scrHeight );
|
||||
|
||||
|
||||
grClipWindow(0, 0, (FxU32) scrWidth, (FxU32) scrHeight);
|
||||
}
|
||||
}
|
||||
|
||||
/* handle any keyboard input */
|
||||
while( tlKbHit() )
|
||||
@@ -499,7 +496,7 @@ int main( int argc, char **argv) {
|
||||
{
|
||||
static int nCurrAlpha = -1;
|
||||
GrTexInfo tFgTexInfo;
|
||||
|
||||
|
||||
case '+':
|
||||
doScaleScreenSurf( hCurrFgTxtre, SCALE_OUT, tCurrScle );
|
||||
getFgVerts( hCurrFgTxtre, &fgVerts[0] );
|
||||
@@ -513,25 +510,25 @@ int main( int argc, char **argv) {
|
||||
case 'a':
|
||||
tlConClear();
|
||||
bVerboseMode = FXFALSE;
|
||||
tlConOutput("Verbose mode Off\n");
|
||||
tlConOutput("Verbose mode Off\n");
|
||||
nCurrAlpha = (nCurrAlpha == 0) ? 0 :
|
||||
(nCurrAlpha < 0) ? (int) alpha-1: --nCurrAlpha;
|
||||
(nCurrAlpha < 0) ? (int) alpha-1: nCurrAlpha-1;
|
||||
fxColorValue = ( 0x00FFFFFF | (nCurrAlpha << 24) );
|
||||
grConstantColorValue(fxColorValue);
|
||||
grConstantColorValue(fxColorValue);
|
||||
tlConOutput("Current fxColorValue is %-#8x\n", fxColorValue);
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
tlConClear();
|
||||
bVerboseMode = FXFALSE;
|
||||
tlConOutput("Verbose mode Off\n");
|
||||
tlConOutput("Verbose mode Off\n");
|
||||
nCurrAlpha = (nCurrAlpha == 255) ? 255 :
|
||||
(nCurrAlpha < 0) ? (int) alpha+1: ++nCurrAlpha;
|
||||
(nCurrAlpha < 0) ? (int) alpha+1: nCurrAlpha+1;
|
||||
fxColorValue = ( 0x00FFFFFF | (nCurrAlpha << 24) );
|
||||
grConstantColorValue(fxColorValue);
|
||||
grConstantColorValue(fxColorValue);
|
||||
tlConOutput("Current fxColorValue is %-#8x\n", fxColorValue);
|
||||
break;
|
||||
|
||||
|
||||
case 'b':
|
||||
mipMapMode++;
|
||||
mipMapMode%=5;
|
||||
@@ -559,7 +556,7 @@ int main( int argc, char **argv) {
|
||||
case 'd':
|
||||
tlConClear();
|
||||
bVerboseMode = FXFALSE;
|
||||
tlConOutput("Verbose mode Off\n");
|
||||
tlConOutput("Verbose mode Off\n");
|
||||
plTxMnSetMultiOffsetFix( plTxMnGetMultiOffsetFix() ? FXFALSE : FXTRUE );
|
||||
tlConOutput( plTxMnGetMultiOffsetFix() ? "Multibase offset fix in\n" :
|
||||
"Multibase offset fix NOT\n");
|
||||
@@ -569,7 +566,7 @@ int main( int argc, char **argv) {
|
||||
case 'D':
|
||||
tlConClear();
|
||||
bVerboseMode = FXFALSE;
|
||||
tlConOutput("Verbose mode Off\n");
|
||||
tlConOutput("Verbose mode Off\n");
|
||||
plTxMnSetMultiRevOrder( plTxMnGetMultiRevOrder() ? FXFALSE : FXTRUE );
|
||||
tlConOutput( plTxMnGetMultiRevOrder() ? "Multibase in rev order\n" :
|
||||
"Multibase in linear order\n");
|
||||
@@ -700,7 +697,7 @@ int main( int argc, char **argv) {
|
||||
hCurrFgTxtre = hFstFgTxtre;
|
||||
else
|
||||
++hCurrFgTxtre;
|
||||
|
||||
|
||||
getFgVerts( hCurrFgTxtre, &fgVerts[0] );
|
||||
break;
|
||||
|
||||
@@ -843,7 +840,7 @@ doLoadTexture( const char *lpzFileName, GrTexInfo *tEtTexInfo,
|
||||
lpTmpTexInfo->aspectRatio));
|
||||
ret = modf((double) lpSurfInfo->fEndX, &dNonFrac);
|
||||
lpSurfInfo->rEndX = (float) dNonFrac;
|
||||
|
||||
|
||||
lpSurfInfo->fStartY =
|
||||
((scrHeight - (float) getLodHeight(lpSurfInfo->currLod,
|
||||
lpTmpTexInfo->aspectRatio) )/2.f);
|
||||
@@ -867,7 +864,6 @@ doLoadTexture( const char *lpzFileName, GrTexInfo *tEtTexInfo,
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
getFgVerts( hTexId_t deTexId, GrVertex *deFgVerts )
|
||||
{
|
||||
@@ -880,7 +876,7 @@ getFgVerts( hTexId_t deTexId, GrVertex *deFgVerts )
|
||||
/* assumptions */
|
||||
assert( deTexId < NUMTEXTURES );
|
||||
assert( deFgVerts );
|
||||
|
||||
|
||||
/* parse the texture array for the right one */
|
||||
for ( i = 0; (i < NUMTEXTURES) && (theTextures[i].hTexture != deTexId) ; ++i );
|
||||
if (i == NUMTEXTURES)
|
||||
@@ -920,14 +916,13 @@ getFgVerts( hTexId_t deTexId, GrVertex *deFgVerts )
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt )
|
||||
{
|
||||
/* definitions */
|
||||
myTexture_t *lpTmpMyTxtre;
|
||||
surfInfo_t *lpSurfInfo;
|
||||
GrTexInfo *lpTexInfo;
|
||||
GrTexInfo *lpTexInfo;
|
||||
int i;
|
||||
int nNumScles;
|
||||
float fScleAmt;
|
||||
@@ -935,7 +930,7 @@ doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt
|
||||
GrAspectRatio_t tCurrAspct;
|
||||
double dNonFrac, ret;
|
||||
const float fScleLCD = 32.f; //least common scale denominator
|
||||
|
||||
|
||||
/* assumptions */
|
||||
assert( deTexId < NUMTEXTURES );
|
||||
|
||||
@@ -948,10 +943,10 @@ doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt
|
||||
lpTmpMyTxtre = &theTextures[i];
|
||||
lpSurfInfo = &lpTmpMyTxtre->surfInfo;
|
||||
lpTexInfo = &lpTmpMyTxtre->lpTlTexture->info;
|
||||
|
||||
|
||||
if ((lpSurfInfo->currLod == GR_LOD_1) && (deScleDir == SCALE_IN))
|
||||
return;
|
||||
|
||||
|
||||
if ((lpSurfInfo->currLod >= GR_LOD_32) && (deScleAmt > SCALE_8))
|
||||
deScleAmt = SCALE_8;
|
||||
|
||||
@@ -960,7 +955,7 @@ doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt
|
||||
|
||||
/* scale by a frac of the next LOD your are scaling to */
|
||||
tLodToScle = lpSurfInfo->currLod +1;
|
||||
|
||||
|
||||
tCurrAspct = lpTexInfo->aspectRatio; /* ease of read */
|
||||
fScleAmt = 0.0f; /* init then go */
|
||||
for ( i = 0; i < nNumScles; ++i)
|
||||
@@ -990,7 +985,6 @@ doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( !((deScleDir == SCALE_OUT) && /* is there somtin' to do */
|
||||
(getLodWidth(tLodToScle, tCurrAspct) == getLodWidth(tLodToScle -1, tCurrAspct))))
|
||||
{
|
||||
@@ -1008,13 +1002,11 @@ doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt
|
||||
(ret > 0.5f ? 1.0f : ret == 0.0f ? 0.0f : 0.5f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( !((deScleDir == SCALE_OUT) && /* is there somtin' to do */
|
||||
(getLodHeight(tLodToScle, tCurrAspct) == getLodHeight(tLodToScle -1, tCurrAspct))))
|
||||
{
|
||||
fScleAmt = ((float) getLodHeight(tLodToScle, tCurrAspct)) / fScleLCD / 2.f;
|
||||
|
||||
|
||||
lpSurfInfo->fStartY += deScleDir * fScleAmt;
|
||||
ret = modf((double) lpSurfInfo->fStartY, &dNonFrac);
|
||||
lpSurfInfo->rStartY = (float) dNonFrac +
|
||||
@@ -1031,7 +1023,6 @@ doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt
|
||||
} /* doScaleScreenSurf */
|
||||
|
||||
|
||||
|
||||
static int
|
||||
getLodWidth( GrLOD_t lod, GrAspectRatio_t aspect )
|
||||
{
|
||||
@@ -1046,7 +1037,6 @@ getLodWidth( GrLOD_t lod, GrAspectRatio_t aspect )
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
getLodHeight( GrLOD_t lod, GrAspectRatio_t aspect )
|
||||
{
|
||||
@@ -1061,7 +1051,6 @@ getLodHeight( GrLOD_t lod, GrAspectRatio_t aspect )
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
doUnloadTextures( )
|
||||
{
|
||||
@@ -1075,7 +1064,6 @@ doUnloadTextures( )
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
getLodToDwnld( )
|
||||
{
|
||||
@@ -1112,20 +1100,19 @@ getLodToDwnld( )
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
getLodPrtlToDwnld( )
|
||||
{
|
||||
/* definitions */
|
||||
char ch;
|
||||
int i;
|
||||
|
||||
|
||||
/* initializations */
|
||||
g_nLodToDwnld = 0x0;
|
||||
g_bDoLodPrtlDwnld = FXFALSE;
|
||||
g_nLodPrtlFstRow = 0x0;
|
||||
g_nLodPrtlLstRow = 0x0;
|
||||
|
||||
|
||||
/* code */
|
||||
tlConClear();
|
||||
grBufferClear( 0, 0, 0 );
|
||||
@@ -1173,7 +1160,7 @@ getLodPrtlToDwnld( )
|
||||
tlConOutput(" %d\n", g_nLodPrtlLstRow);
|
||||
tlConRender();
|
||||
grBufferSwap( 1 );
|
||||
|
||||
|
||||
if (((g_nLodPrtlFstRow >= 0x0) && (g_nLodPrtlFstRow < 0x100)) &&
|
||||
((g_nLodPrtlLstRow >= 0x0) && (g_nLodPrtlLstRow < 0x100)))
|
||||
g_bDoLodPrtlDwnld = FXTRUE;
|
||||
@@ -1182,19 +1169,18 @@ getLodPrtlToDwnld( )
|
||||
}
|
||||
else
|
||||
tlConOutput("invalid LOD\n");
|
||||
|
||||
|
||||
tlConRender();
|
||||
grBufferSwap( 1 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
doResetFgVerts( hTexId_t deTexId )
|
||||
{
|
||||
/* definitions */
|
||||
surfInfo_t *lpSurfInfo;
|
||||
GrTexInfo *lpTexInfo;
|
||||
GrTexInfo *lpTexInfo;
|
||||
int i;
|
||||
double ret, dNonFrac;
|
||||
|
||||
@@ -1222,7 +1208,7 @@ doResetFgVerts( hTexId_t deTexId )
|
||||
lpTexInfo->aspectRatio));
|
||||
ret = modf((double) lpSurfInfo->fEndX, &dNonFrac);
|
||||
lpSurfInfo->rEndX = (float) dNonFrac;
|
||||
|
||||
|
||||
lpSurfInfo->fStartY =
|
||||
((scrHeight - (float) getLodHeight(lpSurfInfo->currLod,
|
||||
lpTexInfo->aspectRatio) )/2.f);
|
||||
|
||||
@@ -18,16 +18,10 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Revision$
|
||||
** $Date$
|
||||
**
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -86,7 +80,7 @@ int main( int argc, char **argv)
|
||||
|
||||
/* Code */
|
||||
/* Process Command Line Arguments */
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
|
||||
@@ -16,18 +16,10 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
**
|
||||
** $Revision$
|
||||
** $Date$
|
||||
**
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -56,13 +48,13 @@ main( int argc, char **argv)
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while(( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) )) {
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -132,6 +124,6 @@ main( int argc, char **argv)
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -52,13 +49,13 @@ main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -148,7 +145,7 @@ main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -51,13 +48,13 @@ int main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -110,7 +107,6 @@ int main( int argc, char **argv) {
|
||||
FXFALSE );
|
||||
grConstantColorValue( 0xFFFFFF );
|
||||
|
||||
|
||||
tlConOutput( "Press a key to quit\n" );
|
||||
while( frames-- && tlOkToRender()) {
|
||||
int i;
|
||||
@@ -150,10 +146,5 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -51,13 +48,13 @@ int main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -145,7 +142,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -51,13 +48,13 @@ int main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -148,7 +145,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -53,13 +50,13 @@ main( int argc, char **argv)
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -182,10 +179,6 @@ main( int argc, char **argv)
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -51,13 +48,13 @@ int main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -179,7 +176,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/*
|
||||
**
|
||||
** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
@@ -21,9 +20,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -51,13 +47,13 @@ int main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -162,7 +158,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user