284 Commits

Author SHA1 Message Date
Khralkatorrix
ee38094805 glide2x, glide3x: On MSVC, don't treat warning as error for glide tests.
Signed-off-by: Khralkatorrix <garuda2550@gmail.com>
2024-01-27 18:23:24 +03:00
Ozkan Sezer
6e79c3d9b7 add note to glide3x README about swlibs. 2022-12-25 14:02:40 +03:00
Jonathan Schleifer
d86e089d35 Fix compilation with MinGW
Change the 'extern inline' procedures in fxglide.h to 'static inline' .
2022-12-25 12:02:40 +01:00
Ozkan Sezer
7d4a1ddda1 h3/h5, minihwc: inline configmg code, remove win9x.asm. 2022-07-23 03:28:28 +03:00
Ozkan Sezer
5ba939612e sst1: sync glide2/3 versions of makefiles, minor reorganization in init. 2021-11-11 17:50:04 +03:00
Ozkan Sezer
85186e0206 remove irrelevant ssttype checks from individual hw code 2021-11-11 17:37:50 +03:00
Ozkan Sezer
587e01e573 do not include SST1 and SST96 init codes together. 2021-11-11 17:37:04 +03:00
Ozkan Sezer
a20bb982cc cvg, sst1: tweak another getenv() usage. 2021-11-11 17:33:40 +03:00
Ozkan Sezer
5ffccc63b8 cvg, sst1, sst96: cache the getenv() results in init code. 2021-11-11 17:33:32 +03:00
Ozkan Sezer
c9727c8829 shortened a few error messages 2021-11-11 17:33:02 +03:00
Ozkan Sezer
d254f7f28e reverted commit a6ceeebd00 from glide2x/h3 - not needed. 2021-08-08 23:55:50 +03:00
Ozkan Sezer
170185784e fxpci.c (pciOpen): commented out assert(0) for !busDetected case :
let the procedure return false with pciErrorCode == PCI_ERR_NO_BUS
2021-08-08 23:55:50 +03:00
Ozkan Sezer
a6ceeebd00 h3, h5, grGlideInit: return if _GlideRoot.hwConfig.num_sst == 0:
In case of error, _GlideInitEnvironment() calls GrErrorCallback() which is
supposed to be a noreturn function, but it really is not for non-windows..
Eww...
2021-08-08 23:55:10 +03:00
Ozkan Sezer
67ad843c88 removed dxe description from djgpp dxe builds 2021-08-08 23:55:04 +03:00
Ozkan Sezer
f7bcf2ba77 h3, minihwc.c: added missing string.h include 2021-08-08 23:55:02 +03:00
Ozkan Sezer
5e6b39fb2b h3/h5, hwcInit, GLIDE_INIT_HWC: set errorString in case of failure. 2021-08-08 20:23:02 +03:00
Ozkan Sezer
43fbe0bf3c minor warning fixes. 2021-02-02 11:11:10 +03:00
Ozkan Sezer
438ac12be4 fix typo from unintended search/replace 2020-11-27 11:44:50 +03:00
Ozkan Sezer
1f827a4602 glide2x/README: added note about cross-compiling on 64-bit hosts. 2020-10-07 23:00:50 +03:00
Ozkan Sezer
acddb52685 glide3x/sst1: replaced several [unsigned] long type usage with FxI32/FxU32
should fix issue noted at
e8f60ad8bb (commitcomment-40186242)

the glide2x tree in whole needs a similar massage..
2020-10-07 23:00:40 +03:00
Ozkan Sezer
fe35279d12 updated djgpp cross-build scripts 2020-07-08 15:10:00 +03:00
Ozkan Sezer
6d671089f6 added quick shell scripts for djgpp cross-compile. 2020-07-08 14:32:30 +03:00
sezero
1ceb326d78 added top-level 3DFX GLIDE Source Code General Public License file. 2019-09-11 11:11:50 +03:00
sezero
9fbf8482a8 swlibs: remove rest of the old makefiles
the old glide-devel-branch has them for reference.
2019-09-08 01:20:00 +03:00
sezero
f0adaa0423 glide2x: remove rest of the old makefiles
the old glide-devel-branch has them for reference.
2019-09-08 01:10:00 +03:00
sezero
0cfcfe0e88 glide2x: added new Makefiles for tests. 2019-09-08 00:28:00 +03:00
sezero
8522edee5c glide2x: allow disabling the splash screen and the shameless plug code. 2019-07-07 00:47:28 +03:00
sezero
8be8bb66b5 glide2x, sst1: use different lib directories for sst1 and sst96 targets,
just like we do in the glide3x/sst1 tree.
2019-07-06 23:44:02 +03:00
sezero
91669cea49 glide2x, sst1: use different lib directories for sst1 and sst96 targets,
just like we do in the glide3x/sst1 tree.
2019-07-06 23:33:10 +03:00
sezero
305fab3650 glide2x: initial makefiles to target DOS/DJGPP.
build-tested yet, will see if they actually run later.
2019-07-06 18:37:00 +03:00
sezero
a5e52f47f5 glide2x djgpp build fixes #7/7:
h3, dos_mode.c: backported a fix by Daniel Borca from commit 3e642e03.
2019-07-06 14:06:40 +03:00
sezero
671cee61eb glide2x djgpp build fixes #6/7:
h3, dos_mode.c: add missing includes.
2019-07-06 14:06:07 +03:00
sezero
7f50068a47 glide2x djgpp build fixes #5/7:
h3, minihwc.c, gdebug.c: minor warning fixes.
2019-07-06 14:05:50 +03:00
sezero
ccadf5f395 glide2x djgpp build fixes #4/7:
sst1: change Int10 handler code to build if GLIDE_DEBUG10 is defined
instead of just GLIDE_DEBUG. (same thing is done in glide3x/sst1 tree.)
the code is for watcom, but can actually be ported to djgpp if it is
really needed some day.
2019-07-06 14:05:35 +03:00
sezero
1096fc0efb glide2x djgpp build fixes #3/7:
enable rle_decode_line_asm() stub for djgpp builds too.
2019-07-06 14:05:18 +03:00
sezero
0e352d42c1 glide2x djgpp build fixes #2/7:
gerror.c: _guHeapCheck() is for watcom builds only due to _heapchk()
2019-07-06 14:05:04 +03:00
sezero
ee5fecf71f glide2x djgpp build fixes #1/7:
sst1, gerror.c: add proper dos includes for djgpp
2019-07-06 14:04:45 +03:00
sezero
26c95e24f6 glide2x, h3: added cinit from glide3x after removing napalm-only bits. 2019-07-06 14:03:26 +03:00
sezero
a0f4e5a4e6 sst1: a bit more style cleanup 2018-11-05 21:50:20 +03:00
sezero
347ccd8391 glide2x, sst1/sst96, init: added includes for djgpp 2018-11-05 19:41:28 +03:00
sezero
c468e627e7 sst1/sst96: some whitespace/style cleanup.
also removed commented out code from glide3x _grChromaRangeExt(),
guGammaCorrectionRGB() and grLoadGammaTable().

the djgpp dxe output is still exactly the same.
2018-11-05 19:35:55 +03:00
sezero
426c3988a3 glide2x, cvg: fix fxoem2x.dll build (in case it ever gets enabled.) 2018-09-12 14:00:02 +03:00
sezero
da8d31c9d5 Makefile.mingw: revise so that it works for both cross- and native-builds 2018-09-11 23:00:02 +03:00
sezero
50de6810a0 Makefile.wat: fix linkage of texus.exe if run with TEXUS2=1 2018-09-11 19:15:02 +03:00
sezero
cd39eb5320 fx64.h: Watcom 11.0 added "long long" support, adjust accordingly.
The legacy Watcom <= 10.5 code of 3dfx didn't compile using OpenWatcom.
2018-09-11 19:10:51 +03:00
sezero
99ee5eec74 Makefile.wat: revise so that watcom builds work on both linux and win32
- not tested on pure dos, and it shouldn't be a problem really..
- this needs to be done for Makefile.DJ and Makefile.mingw, too.
2018-09-11 17:21:04 +03:00
sezero
186bb19d28 tests, tlib.c: include conio.h for watcom builds 2018-09-11 17:20:01 +03:00
sezero
274d0d31c2 3dfx.h, glidesys.h: check __MSDOS__ along with __DOS__
Necessary when they are used for building 3rd-party programs.
__DOS__ is defined by Watcom, __MSDOS__ is defined by DJGPP.
2018-09-10 06:55:10 +03:00
sezero
01f2e823f7 Makefile.wat: use -bt=dos option for cross-builds to target dos correctly 2018-09-10 06:27:50 +03:00
sezero
fa2272350a Makefile.linux updates for XPATH usage: add and use X11LIBS variable. 2018-08-30 17:51:56 +03:00
sezero
4a33160a11 glide2x, sst1, Makefile.linux: updated XPATH usage to match glide3x tree
minor tidy-up in its glide3x counterpart.
2018-08-30 17:05:56 +03:00
sezero
c93f294492 sst1, init96.c: fixed minor warning in DEBUG builds 2018-08-30 17:04:05 +03:00
sezero
34fa903aea glide2x, cvg: fixed DEBUG builds. 2018-08-30 17:03:20 +03:00
sezero
2a770d57d5 cvg, gglide.c (grBufferClear): avoid parentheses warning.
binary output is identical.
2018-08-30 17:02:47 +03:00
sezero
a7b3d9290c glide3x, h5: remove gendate.h dependency.
BUILD_DATE is not used anywhare, at all.
2018-08-30 16:01:55 +03:00
sezero
e2dd1b0ba0 fxbldno.c: minor warning fixes. 2018-08-30 15:40:32 +03:00
sezero
11f9ba7f56 glide3x, Makefile.DJ: tweaked DXE descriptions. 2018-08-25 21:21:10 +03:00
sezero
5db23883e9 glide3x, Makefile.win32: reverted most parts of commit 8c917cb2 2018-08-25 21:20:30 +03:00
sezero
72028096b9 g3df.c: fix msvc build because of a sign-compare warning after 66386d5 2018-08-25 21:05:15 +03:00
sezero
ed0fb7ba52 h3/h5, lin_mode.c, linhwc.c (loadEnvFile): don't leak FILE* pointer 2018-08-24 23:10:40 +03:00
sezero
dbcbbb1313 sst1, sst1InitVoodooFile(): don't leak FILE* pointer in case of failure 2018-08-24 21:55:50 +03:00
sezero
db8ef4d0ef cvg,sst1, init: shortened a few messages. 2018-08-24 21:03:55 +03:00
sezero
575bafe6c9 glide3x: remove obsoleted README, and rename README.2 to README
also edit the Voodoo Rush entry to mention Macronix along with AT3D
2018-08-23 17:20:50 +03:00
sezero
e11ac4e5db h5, tests: rename Makefile.mgw to Makefile.mingw 2018-08-23 15:39:24 +03:00
sezero
0402d46e43 fxos.c, fxGethostname: fix a strict aliasing issue 2018-08-23 15:37:20 +03:00
sezero
cec38774f4 glide3x, tests: sbench depends on fxos.o for non-linux. 2018-08-23 15:20:02 +03:00
sezero
661f489f88 tests: conio.h or linutil.h includes are not needed
kbhit() and getch() are called from tlib
2018-08-23 14:33:50 +03:00
sezero
c430cef2b2 glide3x,tests,sbench.c: rename PI to FX_PI (avoid redefinition warnings) 2018-08-23 14:11:30 +03:00
sezero
4a72d2061d glide3x, tests, tlib.c: add missing DJGPP includes for cvg, h3 and sst1 2018-08-23 14:05:55 +03:00
sezero
eb40729806 glide3x: remove old makefiles, which are obsoleted for quite some time.
the master branch still has the old makefiles I guess, so, look at the
master branch if need reference.

update sst1 makefiles to store the libs under individual sst1 and sst96
directories.

update linux makefiles for XPATH variable usage.

rename makefile.linux to Makefile.linux under the tests directories.
2018-08-23 14:00:02 +03:00
sezero
bd3e0372c1 glide3x, tests, sbench.c: fix build errors:
sbench.c:300: error: lvalue required as left operand of assignment
sbench.c:301: error: lvalue required as left operand of assignment
sbench.c:375: error: lvalue required as left operand of assignment
sbench.c:376: error: lvalue required as left operand of assignment

I _think_ this is the correct fix: MSVC6 generates the same output
before and after this patch.
2018-08-23 03:47:50 +03:00
sezero
d565bf19ef glide3x, tests: more build fixes -- mostly for windows this time. 2018-08-23 01:20:20 +03:00
sezero
2ab9b505eb glide3x, tests: applied warning and build fixes from glide2x tree. 2018-08-23 00:28:02 +03:00
sezero
f2e22ecf56 glide2x, tests: minor tidy-up. 2018-08-22 22:55:40 +03:00
sezero
8574e105f2 glide2x,tests,display.c: silence 'diff.data' may be used uninitialized warning. 2018-08-22 22:44:50 +03:00
sezero
a4a70bba5b glide2x, tests: initialize firstTime to 1 instead of 0. 2018-08-22 22:20:10 +03:00
sezero
e649ca4613 glide2x, tests: comment out unused helper proc in plib.c 2018-08-22 22:02:28 +03:00
sezero
64b744733d glide2x, tests: fix out-of-bounds access to localVerts in test25.c 2018-08-22 21:55:02 +03:00
sezero
e7cc47e93e glide2x, tests: fix format warning test25.c 2018-08-22 21:36:33 +03:00
sezero
c6de03a346 glide2x, tests: fix warning from qatest00.c:
qatest00.c:517: warning: operation on 'nCurrAlpha' may be undefined
qatest00.c:528: warning: operation on 'nCurrAlpha' may be undefined
2018-08-22 21:32:40 +03:00
sezero
40230a559e glide2x, tests: replace exit()s with return 2018-08-22 20:33:33 +03:00
sezero
ffac0696a3 glide3x: applied commit fd64b6ac of guillemj to the sst1 testsuite. 2018-08-22 16:27:02 +03:00
sezero
1567a193fe glide2x, testsuite updates:
- style tidy-up in cvg and h3
- applied commit df4085a to sst1 tree
- there are suspicious -Wuninitialized warning fixes,
  will revisit them soon.
2018-08-22 16:15:37 +03:00
sezero
14c8945a32 tests, tlib.c, tlib.h: silence / fix warnings:
fix wrong error check in SimpleRleDecode() (thanks gcc -Wsign-compare).
fix some old wrong warning fixes in glide2x tree.
also remove ctype.h dependency and use a generic strupr().
2018-08-22 14:03:15 +03:00
sezero
e3612b4f58 add missing symlinks to Makefile.linux 2018-08-22 11:32:24 +03:00
sezero
b8c4edab9d glide2x: merge scanf() and fread() updates to g3df.c and gpci.c from glide3x 2018-08-22 03:15:56 +03:00
sezero
66386d5ac4 h5, g3df.c: fix wrong error fread() checks.
commit 4b63afa8 by jwrdegoede added fread() checks like:

 if(fread(buf,size,nelem,fp) != size*nelem) error();

however the check must be against nelem alone, and _not_
the total bytes.
2018-08-22 02:24:24 +03:00
sezero
c30be75227 g3df.c (ReadDataShort): slightly shortened by adapting from original glide2x/sst1 version. 2018-08-22 02:11:36 +03:00
sezero
7ced8d7f32 g3df.c: don't leak the FILE* in failure cases.
only h5 handled that but with inlined fclose() and FXFALSE returns.
used goto statements to simplify things.
2018-08-22 02:06:40 +03:00
sezero
5d1a34c31c h3, h5: fix a few uninitialized warnings 2018-08-21 14:05:50 +03:00
sezero
2d63cec195 h5, minihwc (hwcMapBoard): avoid shadowing a local var. 2018-08-21 12:55:02 +03:00
sezero
4a6f09253a fix my stupid typo from commit 85ec47f 2018-08-21 04:20:04 +03:00
sezero
85ec47f22b glide3x, h3/h5: changed threadValue stuff from FxU32 to unsigned long. 2018-08-21 04:11:28 +03:00
sezero
d04deb23d6 h5, minihwc (hwcMapBoard): make length const FxI32 type. 2018-08-21 04:10:50 +03:00
sezero
c4b365abdf h5, minihwc (hwcAAScreenShot): change fileNameNum to unsigned int type. 2018-08-21 04:10:24 +03:00
sezero
e4fc9db7db h3, minihwc (hwcInitRegisters): fix stupid printf/sprintf/FN_NAME typos
was there since the beginning.
2018-08-21 04:10:00 +03:00
sezero
537a15a2fc glide2x/cvg (grBufferClear): revert a parentheses warning fix from 2000
Building glide3x/cvg, gcc emits the following warning:
gglide.c: In function `grBufferClear':
gglide.c:733: warning: suggest parentheses around arithmetic in operand of |

... but glide2x/cvg is silent for it, because commit df4085a80 from
about 18 years ago added parentheses to silence it, like:

 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) | (0x1000 >> 3)) - 1));

... which seems wrong.  Substraction has precedence, therefore the
original code OR'ed the size by 511,  but the fixed code OR'ed the
size by 512 and then substracted 1 from the result.

Looking at sst1InitVideoBuffers() init/video.c: it sets sst->bltSize
like:

 ISET(sst->bltSize, ((pagesToFill-1)<<16) | 511);

Therefore, reverting this part of df4085a80 now.  We can live with the
warning.
2018-08-21 00:15:55 +03:00
sezero
46ca75c1dd glide2x, sst1: unused variable warning fixes. 2018-08-20 22:30:55 +03:00
sezero
36dc997a1d glide2x, sst1, gglide.c: warning fix:
gglide.c: In function `grAlphaCombine':
gglide.c:337: warning: suggest explicit braces to avoid ambiguous `else'
gglide.c: In function `grColorCombine':
gglide.c:917: warning: suggest explicit braces to avoid ambiguous `else'
2018-08-20 22:30:15 +03:00
sezero
d2c076b8ab fix some unused variable warnings 2018-08-20 20:55:32 +03:00
sezero
19c5f4e705 glide2x, cvg, oeminit.c: ifdef magic 2018-08-20 20:24:05 +03:00
sezero
ee6f124929 sst1: fix argc arg of main() 2018-08-20 20:16:20 +03:00
sezero
4d29b7f47f glide2x, sst1, ddgump.c: silence unitialized warnings. 2018-08-20 20:01:56 +03:00
sezero
8ee1de4bcf glide2x, h3, linhwc.c: fix a strict aliasing issue (same as in sst96.)
also make some stuff static.
2018-08-20 19:56:02 +03:00
sezero
c8f2b9f621 glide2x, sst1/cvg init: merge scanf updates from glide3x 2018-08-20 19:35:50 +03:00
sezero
c94050cb87 glide2x: added top-level makefiles. 2018-08-20 17:37:02 +03:00
sezero
3e2cc50867 glide3x,sst1 (sst1InitVoodooFile, INIT_LINUX): changed path separator to '/' 2018-08-20 17:01:36 +03:00
sezero
fa071d0a93 glide2x, sst1: fixed incompatible assignment warning for swapBuffers().
kept the original case in commented out form.
2018-08-20 16:40:57 +03:00
sezero
d39173dfd2 missed replacing an instance of '(char) NULL' with 0 2018-08-20 15:50:02 +03:00
sezero
ccf3cc1dc9 forgot renaming glide3x/sst1 version of makefile.linux 2018-08-20 15:10:00 +03:00
sezero
3be55b6512 fix "unknown conversion type character `v' in format" 2018-08-20 15:07:00 +03:00
sezero
0f6ca06167 rename makefile.linux -> Makefile.linux 2018-08-20 14:47:02 +03:00
sezero
61ebabbc40 glide2x: remove dependency on ctype.h functionality 2018-08-20 14:32:24 +03:00
sezero
103dec9ab9 glide2x,sst96: merged dborca commit 2506470 (Rush: fixed grLfbLock(AUXBUFFER)) 2018-08-20 14:00:02 +03:00
sezero
a5352b0145 glide2x, cvg, cpuid.c: fix strict aliasing issues with newer gcc 2018-08-20 13:45:01 +03:00
sezero
34b5d19350 remove a duplicated windows.h include 2018-08-20 11:40:15 +03:00
sezero
9ba0795fc7 glide2x: added experimental MinGW makefiles. 2018-08-20 10:23:10 +03:00
sezero
e9133561f1 glide2x, init96MapBoard: uncomment initAT3DGetHALData() (we do have initat3d.c) 2018-08-20 01:58:04 +03:00
sezero
5ebace29f9 more warning fixing and syncing glide2x init with glide3x 2018-08-20 01:34:20 +03:00
sezero
ece8c244f3 glide2x, cvg, sst1init: update P6FENCE macros from glide3 2018-08-20 01:33:24 +03:00
sezero
1488d68cff a bunch of warning fixes 2018-08-19 23:55:10 +03:00
sezero
ed2350c8f0 glide2x, sst1, vgdrvr.c: rename gamma() to sst1gamma() 2018-08-19 19:01:56 +03:00
sezero
54e3669349 glide2x, h3: added a Windows (MSVC6) makefile 2018-08-19 17:55:02 +03:00
sezero
ed11fcc3cc glide2x, h3: add windows build dependency 2018-08-19 17:51:00 +03:00
sezero
90d647cfa6 glide2x, h3, minihwc.c: minor warning fixes 2018-08-19 16:45:11 +03:00
sezero
ffb144a87e glide2x, h3, minihwc.c: more build fixes 2018-08-19 16:42:35 +03:00
sezero
415127f697 glide2x, h3, linhwc.c: update P6FENCE macros from glide3 2018-08-19 16:36:33 +03:00
sezero
2b2d13f32e glide2x, h3, gsst.c (grSstWinClose): restrict hwcUnmapBoard() call to linux
-- hwcUnmapBoard() is only in linhwc.c, not in minihwc.c.
2018-08-19 16:17:15 +03:00
sezero
e2a15684a1 glide2x, h3, minihwc.c: build fixes fixes from glide3 2018-08-19 16:15:01 +03:00
sezero
e0d29a1656 glide2x, h3, win_mode.c: build fixes / mysterious bug fixes from glide3 2018-08-19 16:13:40 +03:00
sezero
6d7be29632 glide2x, h3, gdebug.c: fix gdbg_msgfile initializer issue with mingw. 2018-08-19 16:11:01 +03:00
sezero
16f66e6d28 glide2x, cvg/h3: minor mikefile.linux updates 2018-08-19 16:09:13 +03:00
sezero
377f8d78a8 glide2x,cvg/sst1 init: #undef FX_DLL_ENABLE so we don't dllexport the syms 2018-08-19 13:40:20 +03:00
sezero
9f5fb2a342 glide2x, sst1: warning fixes. 2018-08-19 13:25:15 +03:00
sezero
4f59670015 glide2x, sst1/cvg: build fixes, warning fixes. 2018-08-19 12:41:50 +03:00
sezero
eb96ad7944 glide2x, grDrawTriangle() dispatch code for cvg and h3:
It fails to build for linux with the current compiler flags:

- static builds:
gdraw.c: In function `grDrawTriangle':
gdraw.c:757: error: bp cannot be used in asm here

- shared lib (-fPIC) builds:
gdraw.c: In function `grDrawTriangle':
gdraw.c:731: error: PIC register `ebx' clobbered in `asm'

Only if I use '-DBIG_OPT -fomit-frame-pointer', _then_ it builds into:

00000a20 <grDrawTriangle>:
     a20:	a1 2c 00 00 00       	mov    0x2c,%eax
     a25:	ff a0 50 03 00 00    	jmp    *0x350(%eax)
     a2b:	c3                   	ret
     a2c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

... which is good but only for static builds.  The PIC build still
fails with the above message with my gcc3.4 or gcc4.x.

So, I moved the x86 dispatch code to a new xdrawtri.asm, for linux,
and even for MSVC without any prologue/epilogue like the following:
  movl (_GlideRoot + curGC),%eax
  jmp  *kTriProcOffset(%eax)

Let's see how this goes.
2018-08-19 10:41:20 +03:00
sezero
d13007941b glide2x, sst1, grDrawTriangle(): directly use the proc from xdraw.asm.
this makes it more like the glide3x version, and fixes windows build
and linkage.  only Watcom build is special-cased: don't know the reason
why it was adjusted that way in gdraw.c but I kept it that way for now.
2018-08-18 22:32:02 +03:00
sezero
bc1d8f3932 glide2x, sst96: we have an initat3d.c now, so replaced that #if 0. 2018-08-18 22:26:11 +03:00
sezero
d917bb66ab glide2x, sst1: windows MSVC 6 build fixes in init 2018-08-18 22:16:37 +03:00
sezero
5672bdf2be glide2x, sst1: Makefile.win32 fix 2018-08-18 22:16:00 +03:00
sezero
5c3ead43e6 glide2x, cvg/h3, fxgasm.c: write kTriProcOffset into fxgasm.h, too. 2018-08-18 20:01:56 +03:00
sezero
6e6171b857 glide2x, cvg: build fixes for MSVC 6 2018-08-18 17:56:51 +03:00
sezero
14b3357ab8 glide2x, h3: converted asm to nasm syntax, adjusted fxgasm.c for it.
it builds for linux now. (not tested though..)
2018-08-18 17:15:02 +03:00
sezero
4e3b368794 glide2x, cvg, fxgasm.c: remove the old 'kTriProcOffsetClean' hack. 2018-08-18 13:23:40 +03:00
sezero
8a425599ef glide2x, sst1: converted asm to nasm syntax, adjusted fxgasm.c for it.
it builds for linux now. (not tested though..)
2018-08-18 13:00:24 +03:00
sezero
8080e4a845 glide2x, cvg, sst1: further makefile updates 2018-08-18 12:58:36 +03:00
sezero
3a00e0af75 glide2x, sst1, makefile.linux: gxdraw.c is needed even with USE_X86=1. 2018-08-18 12:30:50 +03:00
sezero
e42511abcc minor whitespace adjustment 2018-08-18 12:03:50 +03:00
sezero
bfad389fff glide2x, sst1: makefile.linux updates. 2018-08-18 10:10:04 +03:00
sezero
a23359fc29 more glide2x / makefile.linux updates:
remove duplicated -DGLIDE_USE_C_TRISETUP flags.
2018-08-18 10:03:50 +03:00
sezero
e9384d45a3 glide2x, h3: makefile.linux updates:
- there is no such thing as DRI with glide2x
- there are no xdraw3.asm is glide2x tree
- nasm support isn't there yet: gas sources
2018-08-18 01:55:10 +03:00
sezero
cdd969974a glide2x, sst1: remove generated file fxinline.h 2018-08-17 23:38:20 +03:00
sezero
eeb8c98bb9 glide2x,cvg,fpu.c: change movw to movl in double_precision_asm()
Otherwise we get the following warnings: (some compilers error.)

Assembler messages:
Warning: using `%ax' instead of `%eax' due to `w' suffix
2018-08-17 23:35:02 +03:00
sezero
23b0364245 glide2x, cvg: makefile.linux updates. 2018-08-17 23:28:11 +03:00
sezero
62cc477a02 cvg, rcver.h: comment out fxbldno.h and hard-code BUILD_NUMBER [glide2x] 2018-08-17 23:26:15 +03:00
sezero
60d8447b98 glide2x, h3,minihwc: add p6fence stuff for linux, gcc & co. 2018-08-17 23:21:50 +03:00
sezero
fe99a42068 missed doing this in commit 2ee4b4f5 2018-08-17 23:20:20 +03:00
sezero
8844a3f2e7 h3,h5: move CM_Get_DevNode_Key() call to asm so we don't need win9x ddk 2018-08-17 13:28:21 +03:00
sezero
e6797e4fd8 asm: rename TEXT, DATA, CONST macros to SEG_TEXT, SEG_DATA and SEG_CONST
Defining certain keywords in nasm makes it go haywire.
See, https://bugzilla.nasm.us/show_bug.cgi?id=3392505

$ cat 1.asm
%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

segment TEXT
segment DATA
segment CONST

$ nasm -E 1.asm
%line 4+1 1.asm

[segment _TEXT align=1 public use32 class=CODE FLAT]
[segment _DATA align=4 public use32 class=_DATA align=4 public use32 class=DATA FLAT FLAT]
[segment CONST2 align=4 public use32 class=_DATA align=4 public use32 class=_DATA align=4 public use32 class=DATA FLAT FLAT FLAT]

Either this (with nasm-2.0..nasm-2.09.xx), or it errors out with:
1.asm:6: error: interminable macro recursion
1.asm:7: error: interminable macro recursion
... which happens with nasm-2.10.xx-nasm-2.13.01

The glide3 tree uses this for Watcom builds / obj output format,
and the result is not what is intended.  After the renaming, it
works as expected:

$ cat 1.asm
%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

segment SEG_TEXT
segment SEG_DATA
segment SEG_CONST

$ nasm -E 1.asm
%line 4+1 1.asm

[segment _TEXT align=1 public use32 class=CODE FLAT]
[segment _DATA align=4 public use32 class=DATA FLAT]
[segment CONST2 align=4 public use32 class=DATA FLAT]
2018-08-16 21:11:10 +03:00
sezero
9d646ac504 cvg, sst1, Makefile.mingw: undefine WINNT for consistency. 2018-08-14 11:35:55 +03:00
sezero
8e9e9acbb1 h5, dos_mode.c: fixed watcom build
FX_CSTYLE wasn't being defined because of missing FX_DLL_DEFINITION.
DJGPP builds aren't affected.
2018-08-14 03:01:02 +03:00
sezero
1ee5e06295 h5, gpio.c: removed watcom workaround for building under dos 2018-08-14 02:40:55 +03:00
sezero
a1f750e924 h3,h5 gdraw.c (grDrawPoint): removed weird ifdef, kept standart version
don't know why it was needed. Visual Studio 6 generates identical output
for both cases, so it was for earlier versions??? huh...
2018-08-14 00:15:40 +03:00
sezero
902edc7a66 gdraw.c, Makefile.mingw: integrate new xdrawtri.asm to build.
h3 and h5 trees now build using MinGW.  will run-test later..
2018-08-13 23:24:02 +03:00
sezero
49be990209 h3, h5: added grDrawTriangle() implementation for MinGW using nasm
grDrawTriangle() for MSVC/x86 is a naked function, so doing it in C
code won't work.  new file: xdrawtri.asm
2018-08-13 23:20:24 +03:00
sezero
04bc43e39c MinGW makefiles 2018-08-13 23:10:00 +03:00
sezero
c195d7acdc remove all makefile.unix files (obsoleted for quite some time..) 2018-08-13 10:28:02 +03:00
sezero
84728cbfb0 sst96, init96.c: make the BufInfo bI[] array static 2018-08-12 21:00:20 +03:00
sezero
542a45b6e9 sst96: mingw inline asm for _inp, _outp, and _outpw. 2018-08-12 20:55:02 +03:00
sezero
b35c0478be sst1, init96.c: coding style tidy-up.
dxdrvr.c: add missing braces around BufDesc[] initializer
2018-08-12 20:10:51 +03:00
sezero
02a608c61c h3,h5, fxglide.h: restrict Unix version of TRISETUP macro to x86 family.
because the inline asm uses the 'd' constraint, and to my knowledge, it
is x86-specific.
2018-08-12 17:23:10 +03:00
sezero
21fa4b55f0 h5, fxglide.h: don't limit forward declaration of struct GrGC_s to gcc 2018-08-12 17:00:02 +03:00
sezero
3e461e9f67 h3,h5, fxglide.h: tidy-up preprocessor checks for TRISETUP macro 2018-08-12 16:47:50 +03:00
sezero
99f02c80e6 linux makefile updates 2018-08-12 15:51:28 +03:00
sezero
76d8804c33 updates to top-level makefiles 2018-08-12 13:37:50 +03:00
sezero
0ff42bceb5 makefile updates 2018-08-12 13:24:24 +03:00
sezero
0652ba3057 h3,h5, gdraw.c: adjust/tidy preprocessor conditions for grDrawTriangle()
and made h3 and h5 versions look more alike
2018-08-12 12:11:28 +03:00
sezero
41324bf11c h3, gdraw.c: apply grDrawPoint() change from h5 commit 9a64ace 2018-08-12 12:10:32 +03:00
sezero
789be06f0f h3, h5, fxgasm.c: write kTriProcOffset into fxgasm.h, too. 2018-08-11 22:30:21 +03:00
sezero
208cbf570f h5: revert fxglide.h part of shamelessness commit 4b715ac
(my commit 8b047bb missed it)
2018-08-11 22:30:21 +03:00
sezero
673403f9cf h5,fxglide.h: adjust USE_STANDARD_TLS_FUNC case of getThreadValueFast() for gcc 2018-08-11 22:30:21 +03:00
sezero
6c40713033 minihwc.c (EnumDisplayMonitors_func): fix warning: 'dllimport' attribute ignored
also make EnumDisplayMonitors_func a proper function pointer type.
2018-08-11 11:03:24 +03:00
sezero
32b399b380 gsfc.c: warning: operation on 'gc->state.shadow.auxBufferAddr' may be undefined 2018-08-11 10:29:20 +03:00
sezero
7bfd3b95f9 minor makefiles update 2018-08-11 02:29:50 +03:00
sezero
2a711e29fe h3, minihwc.c: fix p6Fence for MinGW. 2018-08-11 01:21:10 +03:00
sezero
3b522046d6 h3/minihwc (hwcShareContextData): copy over gcc inline asm support from h5. 2018-08-11 00:32:02 +03:00
sezero
898013970a h3, h5, minihwc: minor warning fixes. 2018-08-11 00:29:35 +03:00
sezero
ca1e7fd506 h3, h5, gdebug.c: fix gdbg_msgfile initializer issue with mingw. 2018-08-11 00:28:15 +03:00
sezero
ccbd5a7b41 h5, minihwc: use local _aligned_malloc implementation with mingw. 2018-08-11 00:26:31 +03:00
sezero
c62583a3ee h3, gthread.c: fix breakage after commiet 797d81af 2018-08-10 21:01:32 +03:00
sezero
93dcdb9390 h3,h5, gdraw.c: minor typo/whitespace fixes and some syncing. 2018-08-10 20:45:20 +03:00
sezero
797d81af4a h3, fxglide.h, gthread.c: copy over gcc compatibility changes from h5. 2018-08-10 20:38:57 +03:00
sezero
8a406cba3d h3, h5: gsfc.c: replace backslash path separators in include directive. 2018-08-10 20:38:32 +03:00
sezero
da4d6857ba sst1, xdraw.asm: don't add _ prefix to exported symbol name with mingw.
Otherwise GNU toolchain fails with the error message:
   "Cannot export _grDrawTriangle@12: symbol not found"

Learning something everyday.
2018-08-10 20:38:15 +03:00
sezero
b6d45d842c sst1, Makefile.win32: remove duplicated gxdraw.obj in objects list. 2018-08-10 20:37:55 +03:00
sezero
355dca22a1 fxvxd.c: gcc inline asm for _inp, _inpw, _inpd, _outp, _outpw, _outpd. 2018-08-10 20:37:33 +03:00
sezero
57230a2161 cvg, parse.c: fixed a format warning from mingw. 2018-08-10 20:37:17 +03:00
sezero
b594bf89aa sst1init.h: remove a weirdness from INIT_PRINTF definition for windows
gcc (mingw) emitted lots of 'left-hand operand of comma expression has
no effect' warnings for it..
2018-08-10 20:36:28 +03:00
sezero
043f38b035 restrict #pragma optimize to Visual Studio builds 2018-08-10 20:36:10 +03:00
sezero
f3ed63fc58 fix parens around truth value warnings. 2018-08-10 20:35:54 +03:00
sezero
d92d50efc8 oeminit.h: fix 'extra tokens at end of #endif directive' warning 2018-08-10 20:35:41 +03:00
sezero
2a7cfdfec7 warning fixes. 2018-08-09 21:50:10 +03:00
sezero
faf890d878 cvg, h5, cpuid.c: fixed strict aliasing issue with newer gcc versions. 2018-08-09 20:51:50 +03:00
sezero
5f69e69154 3dfx.h: minor update for Fx?32 types 2018-08-09 17:55:02 +03:00
sezero
6759df5ead cvg, makefile.linux: remove fxremap.o from objects.
fxremap() is called only in dos and windows builds.
2018-08-09 16:10:50 +03:00
sezero
7dbc64777a apply the commit 721b6fcf changes to h3info.h, too. [glide2x side] 2018-08-09 16:10:01 +03:00
sezero
5c6e58e4e2 apply the commit 721b6fcf changes to ddglobal.h and h3info.h, too. 2018-08-09 15:55:28 +03:00
sezero
b5a555a538 cvg,fxremap.c: only include sst1init.h (for INIT_PRINTF) for dos builds
for others, make INIT_PRINTF() in fxremap.c a nop.
2018-08-09 15:55:01 +03:00
sezero
b4c30b1693 h3cinit.c: made mode_table[] and vgaattr[] static const 2018-08-09 12:51:50 +03:00
sezero
721b6fcf1b cvg, fxremap: removed all unnecessary stuff, made it to use INIT_OUTPUT 2018-08-09 11:56:56 +03:00
sezero
43f6bbc977 cvginfo.h: remove top-level defines and forward declare struct sstregs.
It 'defined' FxU32 and FxBool for if __unix__ is defined and cvgregs.h
not included.  DJGPP does define __unix__, and this caused a mess with
one of my experiments.

I do not see the real need for this.  So, adding a forward declaration
of struct sstregs, replacing all SstRegs* with volatile struct sstregs*
serves the purpose. 3dfx.h (which typedefs FxU32 and FxBool) is always
included before cvginfo.h everywhere in the code, so, there is no need
for 'defining' FxU32 and FxBool here, either.

DJGPP build gives an identical DXE output before and after this change.
2018-08-09 11:50:02 +03:00
sezero
64bae86d19 cvg, fxremap: leave out lots of actually unused code from build.
glide code only calls fxremap() and not fxremap_main(), so silent
is always true, there is no cmdline processing, and nothing can
actually print to console. added a new FXREMAP_EXE ifdef in there
to filter things out.
2018-08-09 02:20:40 +03:00
sezero
43291704cb h5,dos_mode.c,lin_mode.c: made buildVideoModeData and setVideoModeSlave static.
whitespace tidy-up.
2018-08-08 23:55:32 +03:00
sezero
12d926449a cvg, gu.c: added guEncodeRLE16()
this function used to be exported by earlier versions of glide3x.dll in
voodoo2 reference drivers, but later it disappeared. it _is_ present in
glide3x.dll versions for all other voodoo boards, so added it here.
2018-08-08 23:04:10 +03:00
sezero
b62e3fd33c h5, fxglide.h: restored FX_EXPORT in GR_ENTRY definition.
koolsmoky commit 0b8571b (initial checkin of dos win32 glide) commented
it out for who knows why, and that resulted in two of the exports in the
dll to go missing, namely grCheckForRoom and guEncodeRLE16. they are now
back.
2018-08-08 22:39:10 +03:00
sezero
3c54cfde1e cvg,sst1 init: #undef FX_DLL_ENABLE so that we don't dllexport the symbols. 2018-08-08 22:38:50 +03:00
sezero
40ee824879 swlibs, fxpci: #undef FX_DLL_ENABLE, so that we don't dllexport the symbols. 2018-08-08 22:38:27 +03:00
sezero
bc18c519d7 gdebug.c: #undef FX_DLL_ENABLE, so that we don't dllexport the symbols. 2018-08-08 22:38:12 +03:00
sezero
1fe48886a8 gdebug.c: whitespace tidy-up. 2018-08-08 22:37:50 +03:00
sezero
de0e7ca28f fxdll.h: revert koolsmoky commit bab2f1c 'use dllimport for __MSC__ imports'
it was wrong, and was causing LNK4049 warnings.
2018-08-08 22:35:48 +03:00
sezero
1e89ef2670 cvg, Makefile.win32: missed replacing one path separator 2018-08-08 18:55:04 +03:00
sezero
8c917cb2a2 convert win32 Makefiles to crlf, convert path separators to backslash. 2018-08-08 14:56:02 +03:00
sezero
8adf484af7 h3, h5: last of the VC6 and ddraw.h compatibility stuff. 2018-08-08 14:25:50 +03:00
sezero
e710954c4e h5, minihwc.c: VC6 rejects pMinSW in the inline asm.
changed pMinSW mm0,mm3  to
    _asm _emit 0x0f _asm _emit 0xea  _asm _emit 0xc3
2018-08-08 11:10:02 +03:00
sezero
59d59bad72 h5, minihwc.c: VC6 doesn't have _aligned_malloc(). locally implemented. 2018-08-08 11:06:51 +03:00
sezero
380a78de05 h3, h5, minihwc: remove some unused stuff from win_mode.c. minor cleanup. 2018-08-08 10:50:10 +03:00
sezero
42c8b28993 Windows (VC6) build fixes, 03/##: HMONITOR type hack for h3 and h5. 2018-08-08 08:55:02 +03:00
sezero
d6fce294b4 h3, h5, minihwc: don't unconditionally define GDBG_INFO_ON in win_mode.c 2018-08-08 08:50:37 +03:00
sezero
0aa1e159bf Windows (VC6) build fixes, 02/##: grDrawLine() const issue.
this is a hack and need to be fixed properly by constifying other
procedures.
2018-08-08 08:47:00 +03:00
sezero
d6448ee662 Windows (VC6) build fixes, 01/## 2018-08-08 08:45:02 +03:00
sezero
29212e8a14 fxremap.c: warning fixes. 2018-08-07 12:04:40 +03:00
sezero
af4ebfce0c warning fixes and minor cleanup. 2018-08-07 11:58:55 +03:00
sezero
19efdba7e0 swlibs/fxmisc/fximg.c: -Wformat warning fixes 2018-08-07 11:57:45 +03:00
sezero
032b25b708 minor type corrections 2018-08-07 10:37:24 +03:00
sezero
d46910aa23 sst96.c (_grSst96Load32): fix a minor warning after commit 30ec8787 2018-08-06 17:00:02 +03:00
sezero
2ee4b4f583 h3, h5, minihwc: don't unconditionally define GDBG_INFO_ON in minihwc.c
several constifications.  exclude the debug stuff from release builds.
fixed that 'waxRegnames' typo in HWC_WAX_STORE and HWC_WAX_LOAD macros.
2018-08-06 14:10:02 +03:00
sezero
b33d69b0a3 cvg, fxremap.c: make almost everything static.
except for the two exported functions.
also replaced 'null' by 'NULL' (why that 'null' define I wonder..)
2018-08-06 14:00:50 +03:00
sezero
1f08466bc6 sst96: more of making several global vars static:
- initat3d.c: make ClockTableAT3D[] const and static.
- initad3d.c: make const vars  bPowerOff, bHighSpeed,
  and bBypass static.
2018-08-06 14:00:01 +03:00
sezero
30ec87871d sst96: exclude debug stuff from release-builds (regNames & co.) 2018-08-06 13:56:50 +03:00
sezero
f053d6b0cf sst96: constified iRegNames[] 2018-08-06 13:55:02 +03:00
sezero
ef5108ae49 sst96: vgdrvr.c, vg96drvr.c: minor whitespace cleanups. 2018-08-05 17:24:28 +03:00
sezero
9fee9e454d sst96: fix warnings introduced by commit 383731e84 2018-08-05 17:23:37 +03:00
sezero
46226e7d14 revert commit 16a4feb6, define INIT_ACCESS_DIRECT for SST96 DOS builds. 2018-08-05 12:04:04 +03:00
sezero
383731e840 make a few more global vars static. remove glideIdent[] from gglide.c (unused.) 2018-08-05 12:02:59 +03:00
sezero
08e1e599fd xos.inc: fixed 'unterminated string' warning from nasm. 2018-08-05 12:02:59 +03:00
sezero
4f81f1ed1b added a top-level README file. 2018-08-05 12:02:59 +03:00
sezero
ae760389ae glide2x/h3 (linhwc.c/minihwc.c): fix fenceVar with newer gcc versions.
from glide3x tree.
2018-08-05 12:02:59 +03:00
sezero
486276471e add missing Rush files to glide2x side. 2018-08-05 12:02:59 +03:00
sezero
1a273ba12a sst1 cleanup: remove non-existent h3drvr (FX_SST2) stuff [glide2x side] 2018-08-05 12:02:59 +03:00
sezero
8b047bb95c splash and shameless plug updates:
removed experimental splash stuff from h3/h5 for non-windows.
if either of GLIDE_SPLASH or GLIDE_PLUG aren't defined their
respective data are completey excluded from the binary image,
and their respective functions aren't called at all.
2018-08-05 12:02:59 +03:00
sezero
bbbb581698 add a sst96 subdirectory to sst1/lib/ 2018-08-05 12:02:59 +03:00
sezero
cb46d5b49c disable shameless plug overlay and splash screen in DOS builds.
reduces binary size and not really needed.
2018-08-05 12:02:59 +03:00
sezero
8bdf368c58 Makefile.DJ: define a DXE3GEN variable, defaulting to dxe3gen 2018-08-05 12:02:59 +03:00
sezero
720d0b125e DJGPP Makefile updates with some (ugly) cross-build workarounds. 2018-08-05 12:02:59 +03:00
sezero
35be4ad445 sst1 cleanup: remove non-existent h3drvr (FX_SST2) stuff 2018-08-05 12:02:59 +03:00
sezero
dc5f7d0065 commented out some unused static vars 2018-08-05 12:02:59 +03:00
sezero
9b83acbefd linux build fixes 2018-08-05 12:02:59 +03:00
sezero
bc892aff15 cvg: added -DGLIDE_CHIP_BROADCAST=1 and -DGLIDE_BLIT_CLEAR=1 among the CFLAGS.
Windows makefile has them, already.  The linux makefile used to have them but
magically lost them somehow in the glide-devel-branch. Let's see how it goes..
2018-08-05 12:02:59 +03:00
sezero
16a4feb6e6 sst1,initmcrx (initMCRXSetVideo): make Macronix Rush cards function under DOS
achieved by commenting out the INIT_ACCESS_DIRECT ifdef.  maybe just defining
INIT_ACCESS_DIRECT works too? that adds a initAT3DWait(100) call for the AT3D
cards. to be revisited / tested in future...
2018-08-05 12:02:59 +03:00
sezero
78a5774bc8 h5, minihwc.c (hwcInitRegisters): call h4InitPlls() if H4 is defined for v4/5
patch from Frank Sapone <emoaddict15@gmail.com> --- overclocking support with
SSTH3_GRXCLOCK for Voodoo 4/5 cards.
2018-08-05 12:02:59 +03:00
sezero
eea61facf8 h3/h5, linhwc.c, minihwc.c: fix fenceVar with newer gcc versions. build fixes. 2018-08-05 12:02:59 +03:00
sezero
dd7cb10225 cvg, rcver.h: comment out fxbldno.h and hard-code BUILD_NUMBER for now. 2018-08-05 12:02:59 +03:00
sezero
e8c99cbad5 swlibs/newpci/pcilib/fxpci.c (pciGetErrorString): unsigned casts to fix warning 2018-08-05 12:02:59 +03:00
sezero
4092b17053 3dfx.h: change FxI32 and FxU32 to be of long types for Windows and DOS. 2018-08-05 12:02:59 +03:00
sezero
e6d386eb3c sst1, initat3d.c: build / warning fixes. 2018-08-05 12:02:59 +03:00
sezero
8448392757 sst1, init96.c: remove static redeclaration of init96SetupRendering(). 2018-08-05 12:02:59 +03:00
sezero
c2eaa35f54 sst1, gxdraw.c: fix typo introduced by the gcc4.1 strict aliasing fixes 2018-08-05 12:02:59 +03:00
sezero
7415325040 h5, minihwc.h: fix misplaced HWC_EXT_INIT ifdef in struct hwcBoardInfo_s 2018-08-05 12:02:59 +03:00
sezero
5ca0c8b42f h5, gtexdl.c: commented out unused local var 'didcompress' 2018-08-05 12:02:59 +03:00
sezero
fdeb88fac5 h5, gdraw.c: fix build with newer gcc versions. 2018-08-05 12:02:59 +03:00
sezero
14e33eb51d h3, gthread.c: build fix 2018-08-05 12:02:59 +03:00
sezero
d257dd2bc2 h3cinit.c: removed an ugly hack for building under dos. 2018-08-05 12:02:59 +03:00
sezero
371f2af8ec gdebug.c: gdbg_set_file() fixes. 2018-08-05 12:02:59 +03:00
sezero
6a898856bb cvg, splshdat.c: fix missing braces in initializer warning 2018-08-05 12:02:59 +03:00
sezero
de08f2ebbf gsplash.c: changed type of fogTableSize to FxI32 2018-08-05 12:02:59 +03:00
sezero
dde408cf00 added missing newline at end of two files 2018-08-05 12:02:59 +03:00
sezero
76a8dc0416 removed dependency on ctype.h functionality. also simplified NULL usage. 2018-08-05 12:02:59 +03:00
sezero
4819e38cc4 cvg: replaced a build fix hack with a better one 2018-08-05 12:02:59 +03:00
sezero
4fd268232a replaced broken binary files as best as I can 2018-08-05 12:02:43 +03:00
sezero
ec57d92c97 remove two test binaries 2018-08-05 12:02:39 +03:00
sezero
968e385010 removed most of the cvs keywords.
in some files, added back last-revision logs which cvs2git removed:
feel more comfortable that way for now..

also removed all of the .cvsignore files.
2018-08-05 12:02:27 +03:00
sezero
367a3b66c4 fix stupid eol 2018-08-05 12:01:50 +03:00
sezero
2c11e03776 removed some static vars relying on cvs revision number (glide2x side) 2018-08-05 11:58:06 +03:00
sezero
d7086902f1 removed some static vars relying on cvs revision number. 2018-08-05 11:58:00 +03:00
1221 changed files with 23284 additions and 23668 deletions

255
LICENSE Normal file
View 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
View 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
View 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

View File

@@ -1,6 +1,4 @@
# Linux makefile for Glide2 and Texus2 # Linux makefile for Glide2
#
# $Id$
# #
# Copyright (c) 2003 - Daniel Borca # Copyright (c) 2003 - Daniel Borca
# Email : dborca@users.sourceforge.net # Email : dborca@users.sourceforge.net
@@ -9,7 +7,6 @@
# Copyright (c) 2006 - Guillem Jover <guillem@hadrons.org> # Copyright (c) 2006 - Guillem Jover <guillem@hadrons.org>
# #
# #
# Available options: # Available options:
# #
@@ -19,9 +16,9 @@
# DRI=1 Build DRI version. # DRI=1 Build DRI version.
# target = h3 # target = h3
# default = no # default = no
# XPATH specify X libraries path; needed by DRI. # XPATH specify X11 path; needed by SST96 and H3.
# target = h3 # default = /usr/X11R6
# default = /usr/X11R6/lib # X11LIBS X libraries path; default = $(XPATH)/lib
# H4=1 High speed Avenger/Napalm. # H4=1 High speed Avenger/Napalm.
# target = h3 # target = h3
# default = no # default = no
@@ -40,7 +37,7 @@
# target = cvg, h3 # target = cvg, h3
# default = no # default = no
# USE_MMX=1 (see USE_3DNOW) # USE_MMX=1 (see USE_3DNOW)
# target = h3 # target = cvg
# default = no # default = no
# #
# Targets: # Targets:
@@ -49,8 +46,6 @@
# realclean: remove all generated files # realclean: remove all generated files
# #
.PHONY: all clean realclean .PHONY: all clean realclean
.EXPORT_ALL_VARIABLES: .EXPORT_ALL_VARIABLES:
@@ -59,16 +54,16 @@ export BUILD_NUMBER = 40404
export FX_GLIDE_HW ?= h3 export FX_GLIDE_HW ?= h3
ifeq ($(FX_GLIDE_HW),sst96) ifeq ($(FX_GLIDE_HW),sst96)
G3_DIR = sst1/glide/src G2_DIR = sst1/glide/src
else else
G3_DIR = $(FX_GLIDE_HW)/glide/src G2_DIR = $(FX_GLIDE_HW)/glide/src
endif endif
all: all:
make -f makefile.linux -C $(G3_DIR) make -f Makefile.linux -C $(G2_DIR)
clean: clean:
make -f makefile.linux -C $(G3_DIR) clean make -f Makefile.linux -C $(G2_DIR) clean
realclean: realclean:
make -f makefile.linux -C $(G3_DIR) realclean make -f Makefile.linux -C $(G2_DIR) realclean

67
glide2x/Makefile.mingw Normal file
View 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
View 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

View File

@@ -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 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 stored here within the glide2x cvs tree because it is also shared with
the glide3x branch. 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
View 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
View 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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -17,9 +17,6 @@
# #
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED # COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
# #
# $Revision$
# $Date$
#
# local defines, options, includes # local defines, options, includes
LCDEFS = LCDEFS =

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -17,9 +17,6 @@
* *
* COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED * COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
* *
* $Header$
* $Log$
*
* 1 7/25/97 9:05a Pgj * 1 7/25/97 9:05a Pgj
* generate fxbldno.h which defines BUILD_NUMBER * generate fxbldno.h which defines BUILD_NUMBER
* *
@@ -29,7 +26,7 @@
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
main(int argc, char **argv) int main(void)
{ {
struct tm locTime; struct tm locTime;
time_t sysTime; time_t sysTime;
@@ -38,7 +35,7 @@ main(int argc, char **argv)
time(&sysTime); time(&sysTime);
locTime = *localtime(&sysTime); locTime = *localtime(&sysTime);
if (build = getenv("BUILD_NUMBER")) { if ((build = getenv("BUILD_NUMBER")) != NULL) {
printf("#define BUILD_NUMBER %s\n", build); printf("#define BUILD_NUMBER %s\n", build);
} else { } else {
unsigned short magic; unsigned short magic;

View File

@@ -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

View File

@@ -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

View File

@@ -22,7 +22,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#ifndef __linux__ #ifdef _WIN32
#include <windows.h> #include <windows.h>
#endif #endif
@@ -92,27 +92,30 @@ MyDebugPrintf(FILE* outputFile, const char* fmtString, ...)
debugDumpP = ((envStr != NULL) && debugDumpP = ((envStr != NULL) &&
(atoi(envStr) >= 80)); (atoi(envStr) >= 80));
calledP = FXTRUE; calledP = FXTRUE;
} }
if (debugDumpP) { if (debugDumpP) {
va_list args; va_list args;
#if !DIRECTX #if !DIRECTX
va_start(args, fmtString); va_start(args, fmtString);
if (outputFile != NULL) vfprintf(outputFile, fmtString, args); if (outputFile != NULL) vfprintf(outputFile, fmtString, args);
va_end(args); va_end(args);
#endif /* !DIRECTX */ #endif /* !DIRECTX */
va_start(args, fmtString); va_start(args, fmtString);
#if __WIN32__
{ {
//char msgBuf[256]; char msgBuf[256];
vfprintf(stderr, fmtString, args); vsprintf(msgBuf, fmtString, args);
//vsprintf(msgBuf, fmtString, args); OutputDebugString(msgBuf);
//OutputDebugString(msgBuf);
} }
#else
vfprintf(stderr, fmtString, args);
#endif
va_end(args); va_end(args);
} }
} }
@@ -159,7 +162,7 @@ GlideRes2String(GrScreenResolution_t res)
static const char* static const char*
GlideRefresh2String(GrScreenRefresh_t refresh) GlideRefresh2String(GrScreenRefresh_t refresh)
{ {
static const char* refreshStrings[] = { static const char* refreshStrings[] = {
"60", "70", "72", "75", "80", "90", "100", "85", "120" "60", "70", "72", "75", "80", "90", "100", "85", "120"
}; };
@@ -368,5 +371,3 @@ FX_EXPORT FxU32 FX_CSTYLE fxoemControl(FxU32 mode)
return 1; return 1;
#undef FN_NAME #undef FN_NAME
} /* fxoemRestoreVideo */ } /* fxoemRestoreVideo */

View File

@@ -16,9 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** $Header$
** $Log$
*/ */
#define OFFICIAL 1 #define OFFICIAL 1
@@ -26,7 +23,6 @@
#include <fxver.h> #include <fxver.h>
#include "rcver.h" #include "rcver.h"
#include "fxbldno.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //

View File

@@ -18,9 +18,13 @@
* COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED * COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
*/ */
/*#include "fxbldno.h"*/
#define MANVERSION 2 #define MANVERSION 2
#define MANREVISION 53 #define MANREVISION 53
#define BUILD_NUMBER 40405
#ifndef GLIDE3 #ifndef GLIDE3
#define VERSIONSTR "2.53\0" #define VERSIONSTR "2.53\0"
#else #else

View 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))

View File

@@ -1,8 +1,6 @@
# Linux makefile for Glide2/CVG # Linux makefile for Glide2/CVG
# This makefile MUST be processed by GNU make!!! # This makefile MUST be processed by GNU make!!!
# #
# $Id$
#
# Copyright (c) 2004 - Daniel Borca # Copyright (c) 2004 - Daniel Borca
# Email : dborca@users.sourceforge.net # Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca # Web : http://www.geocities.com/dborca
@@ -14,13 +12,10 @@
# Copyright (c) 2006 - Guillem Jover <guillem@hadrons.org> # Copyright (c) 2006 - Guillem Jover <guillem@hadrons.org>
# #
# #
# Available options: # Available options:
# #
# Environment variables: # Environment variables:
# FX_GLIDE_HW build for the given ASIC (cvg).
# default = cvg
# CPU optimize for the given processor. # CPU optimize for the given processor.
# default = 6 (PentiumPro) # default = 6 (PentiumPro)
# DEBUG=1 disable optimizations and build for debug. # DEBUG=1 disable optimizations and build for debug.
@@ -43,8 +38,6 @@
# realclean: remove all generated files # realclean: remove all generated files
# #
.PHONY: all glide2x clean realclean .PHONY: all glide2x clean realclean
.INTERMEDIATE: fxgasm .INTERMEDIATE: fxgasm
.SUFFIXES: .lo .SUFFIXES: .lo
@@ -60,10 +53,10 @@ GLIDE_VERSION_MINOR = 53
GLIDE_LIB = libglide.a GLIDE_LIB = libglide.a
GLIDE_SO = libglide.so GLIDE_SO = libglide.so
GLIDE_SO_X= libglide2x.so
GLIDE_SONAME = $(GLIDE_SO).$(GLIDE_VERSION_MAJOR) GLIDE_SONAME = $(GLIDE_SO).$(GLIDE_VERSION_MAJOR)
GLIDE_SHARED = $(GLIDE_SONAME).$(GLIDE_VERSION_MINOR) GLIDE_SHARED = $(GLIDE_SONAME).$(GLIDE_VERSION_MINOR)
FX_GLIDE_HW ?= cvg
FX_GLIDE_SW = ../../../swlibs FX_GLIDE_SW = ../../../swlibs
GLIDE_LIBDIR = ../../lib 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 # special sli buffer clears
CDEFS += -DGLIDE_BLIT_CLEAR=1 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 # tmus using chipfield. chipfield will always be set to 0xf
CDEFS += -DGLIDE_CHIP_BROADCAST=1 CDEFS += -DGLIDE_CHIP_BROADCAST=1
@@ -110,6 +103,8 @@ override USE_FIFO = 1
ifeq ($(USE_X86),1) ifeq ($(USE_X86),1)
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1 CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1
override USE_FIFO = 1 override USE_FIFO = 1
CDEFS += -DHAVE_XDRAWTRI_ASM=1
override USE_DRAWTRI_ASM = 1
else else
CDEFS += -DGLIDE_USE_C_TRISETUP=1 CDEFS += -DGLIDE_USE_C_TRISETUP=1
endif endif
@@ -134,7 +129,7 @@ ASFLAGS = -O6 -felf -D__linux__
ASFLAGS += $(CDEFS) ASFLAGS += $(CDEFS)
# compiler # compiler
CFLAGS = -Wall -W CFLAGS = -Wall
CFLAGS += -I. -I../../incsrc -I../../init 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)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
CFLAGS += $(CDEFS) CFLAGS += $(CDEFS)
@@ -154,7 +149,6 @@ ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86 CFLAGS += -DGL_X86
OPTFLAGS ?= -O2 -ffast-math OPTFLAGS ?= -O2 -ffast-math
else else
CFLAGS += -DGLIDE_USE_C_TRISETUP
OPTFLAGS ?= -O2 -ffast-math OPTFLAGS ?= -O2 -ffast-math
endif endif
@@ -193,6 +187,9 @@ GLIDE_OBJECTS = \
fpu.o \ fpu.o \
xtexdl_def.o xtexdl_def.o
ifeq ($(USE_DRAWTRI_ASM),1)
GLIDE_OBJECTS += xdrawtri.o
endif
ifeq ($(USE_X86),1) ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \ GLIDE_OBJECTS += \
xdraw2_def.o xdraw2_def.o
@@ -246,16 +243,20 @@ GLIDE_OBJECTS += \
############################################################################### ###############################################################################
all: glide2x fxoem2x 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) $(GLIDE_LIBDIR)/$(GLIDE_LIB): $(GLIDE_OBJECTS)
$(AR) $(ARFLAGS) $@ $^ $(AR) $(ARFLAGS) $@ $^
$(GLIDE_LIBDIR)/$(GLIDE_SO): $(GLIDE_LIBDIR)/$(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SO): $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
ln -fs $(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SO) 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) $(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) ifeq ($(FXOEM2X),1)
$(GLIDE_LIBDIR)/libfxoem2x.so: ../oem/oeminit.o $(GLIDE_LIBDIR)/libfxoem2x.so: ../oem/oeminit.o
@@ -283,6 +284,8 @@ xdraw2_3dnow.o: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $< $(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_3dnow.o: xtexdl.asm xtexdl_3dnow.o: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $< $(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xdrawtri.o: xdrawtri.asm
$(AS) -o $@ $(ASFLAGS) $<
#cpuid.lo: cpuid.o #cpuid.lo: cpuid.o
# $(CP) $< $@ # $(CP) $< $@
@@ -296,6 +299,8 @@ xdraw2_3dnow.lo: xdraw2_3dnow.o
$(CP) $< $@ $(CP) $< $@
xtexdl_3dnow.lo: xtexdl_3dnow.o xtexdl_3dnow.lo: xtexdl_3dnow.o
$(CP) $< $@ $(CP) $< $@
xdrawtri.lo: xdrawtri.o
$(CP) $< $@
$(GLIDE_OBJECTS): fxinline.h fxgasm.h $(GLIDE_OBJECTS): fxinline.h fxgasm.h
@@ -315,7 +320,9 @@ fxgasm: fxgasm.c
clean: clean:
-$(RM) *.o *.lo -$(RM) *.o *.lo
-$(RM) ../../init/*.o ../../init/*.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)/newpci/pcilib/*.o $(FX_GLIDE_SW)/newpci/pcilib/*.lo
-$(RM) $(FX_GLIDE_SW)/fxmisc/*.o $(FX_GLIDE_SW)/fxmisc/*.lo
-$(RM) fxinline.h -$(RM) fxinline.h
-$(RM) fxgasm.h -$(RM) fxgasm.h
@@ -323,3 +330,5 @@ realclean: clean
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_LIB) -$(RM) $(GLIDE_LIBDIR)/$(GLIDE_LIB)
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SHARED) -$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SO) -$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SO)
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SONAME)
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SO_X)

View 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)

View File

@@ -1,4 +1,4 @@
# Win32 makefile for Glide2/CVG and Texus2 # Win32 makefile for Glide2/CVG
# This makefile MUST be processed by GNU make!!! # This makefile MUST be processed by GNU make!!!
# #
# Copyright (c) 2004 # Copyright (c) 2004
@@ -12,13 +12,10 @@
# Web : http://www.3dfxzone.it/koolsmoky # Web : http://www.3dfxzone.it/koolsmoky
# #
# #
# Available options: # Available options:
# #
# Environment variables: # Environment variables:
# FX_GLIDE_HW build for the given ASIC (cvg).
# default = cvg
# CPU optimize for the given processor. # CPU optimize for the given processor.
# default = 6 (PentiumPro) # default = 6 (PentiumPro)
# DEBUG=1 disable optimizations and build for debug. # DEBUG=1 disable optimizations and build for debug.
@@ -29,12 +26,10 @@
# capabilities are still checked at run-time to avoid # capabilities are still checked at run-time to avoid
# crashes. # crashes.
# default = no # default = no
# USE_MMX=1 allow MMX specializations. # USE_MMX=1 allow MMX specializations.
# default = no # default = no
# TEXUS2=1 embed Texus2 functions into Glide2. # FXOEM2X=1 build fxoem2x.dll
# default = no # default = no
# FXOEM2X=1 build fxoem2x.dll
# default = no
# #
# Targets: # Targets:
# all: build everything # all: build everything
@@ -43,8 +38,6 @@
# realclean: remove all generated files # realclean: remove all generated files
# #
.PHONY: all glide2x clean realclean .PHONY: all glide2x clean realclean
.INTERMEDIATE: fxgasm.exe .INTERMEDIATE: fxgasm.exe
.SUFFIXES: .c .obj .rc .res .SUFFIXES: .c .obj .rc .res
@@ -56,12 +49,9 @@
GLIDE_RES = glide.res GLIDE_RES = glide.res
GLIDE_DLL = glide2x.dll GLIDE_DLL = glide2x.dll
GLIDE_IMP = glide2x.lib GLIDE_IMP = glide2x.lib
TEXUS_EXE = texus2.exe
FX_GLIDE_HW ?= cvg
FX_GLIDE_SW = ../../../swlibs FX_GLIDE_SW = ../../../swlibs
GLIDE_LIBDIR = ../../lib GLIDE_LIBDIR = ../../lib
TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
############################################################################### ###############################################################################
# tools # tools
@@ -92,7 +82,7 @@ CDEFS += -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=1 -DGLIDE_TRI_CULLING=1 -DGLI
# special sli buffer clears # special sli buffer clears
CDEFS += -DGLIDE_BLIT_CLEAR=1 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 # tmus using chipfield. chipfield will always be set to 0xf
CDEFS += -DGLIDE_CHIP_BROADCAST=1 CDEFS += -DGLIDE_CHIP_BROADCAST=1
@@ -110,6 +100,8 @@ override USE_FIFO = 1
ifeq ($(USE_X86),1) ifeq ($(USE_X86),1)
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1 CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1
override USE_FIFO = 1 override USE_FIFO = 1
CDEFS += -DHAVE_XDRAWTRI_ASM=1
override USE_DRAWTRI_ASM = 1
else else
CDEFS += -DGLIDE_USE_C_TRISETUP=1 CDEFS += -DGLIDE_USE_C_TRISETUP=1
endif endif
@@ -122,10 +114,6 @@ endif
# other # other
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
ifeq ($(TEXUS2),1)
CDEFS += -DHAVE_TEXUS2
endif
############################################################################### ###############################################################################
# flags # flags
############################################################################### ###############################################################################
@@ -153,7 +141,6 @@ endif
CFLAGS += -I. -I../../incsrc -I../../init 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)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib
CFLAGS += $(CDEFS) CFLAGS += $(CDEFS)
# cpu optimized triangle # cpu optimized triangle
@@ -199,6 +186,9 @@ GLIDE_OBJECTS = \
fpu.obj \ fpu.obj \
xtexdl_def.obj xtexdl_def.obj
ifeq ($(USE_DRAWTRI_ASM),1)
GLIDE_OBJECTS += xdrawtri.obj
endif
ifeq ($(USE_X86),1) ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \ GLIDE_OBJECTS += \
xdraw2_def.obj xdraw2_def.obj
@@ -209,7 +199,7 @@ endif
ifeq ($(USE_3DNOW),1) ifeq ($(USE_3DNOW),1)
GLIDE_OBJECTS += \ GLIDE_OBJECTS += \
xdraw2_3dnow.obj \ xdraw2_3dnow.obj \
xtexdl_3dnow.obj xtexdl_3dnow.obj
endif endif
else else
GLIDE_OBJECTS += \ GLIDE_OBJECTS += \
@@ -235,35 +225,6 @@ GLIDE_OBJECTS += \
../../init/video.obj \ ../../init/video.obj \
../../init/fxremap.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 # rules
############################################################################### ###############################################################################
@@ -276,20 +237,13 @@ endif
############################################################################### ###############################################################################
# main # main
############################################################################### ###############################################################################
all: glide2x $(TEXUS_EXEDIR)/$(TEXUS_EXE) fxoem2x all: glide2x fxoem2x
glide2x: $(GLIDE_LIBDIR)/$(GLIDE_DLL) glide2x: $(GLIDE_LIBDIR)/$(GLIDE_DLL)
$(GLIDE_LIBDIR)/$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES) $(GLIDE_LIBDIR)/$(GLIDE_DLL): $(GLIDE_OBJECTS) $(GLIDE_RES)
$(LD) -out:$@ $(LDFLAGS) $(GLIDE_OBJECTS) $(LDLIBS) $(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 fxoem2x: $(GLIDE_LIBDIR)/fxoem2x.dll
ifeq ($(FXOEM2X),1) ifeq ($(FXOEM2X),1)
@@ -316,14 +270,16 @@ xdraw2_3dnow.obj: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $< $(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_3dnow.obj: xtexdl.asm xtexdl_3dnow.obj: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $< $(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xdrawtri.obj: xdrawtri.asm
$(AS) -o $@ $(ASFLAGS) $<
$(GLIDE_OBJECTS): fxinline.h fxgasm.h $(GLIDE_OBJECTS): fxinline.h fxgasm.h
fxinline.h: fxgasm.exe fxinline.h: fxgasm.exe
./$< -inline > $@ $< -inline > $@
fxgasm.h: fxgasm.exe fxgasm.h: fxgasm.exe
./$< -hex > $@ $< -hex > $@
fxgasm.exe: fxgasm.c fxgasm.exe: fxgasm.c
$(CC) -o $@ $(CFLAGS) $< $(CC) -o $@ $(CFLAGS) $<
@@ -338,7 +294,6 @@ clean:
-$(call UNLINK,$(FX_GLIDE_SW)/newpci/pcilib/*.obj) -$(call UNLINK,$(FX_GLIDE_SW)/newpci/pcilib/*.obj)
-$(call UNLINK,fxinline.h) -$(call UNLINK,fxinline.h)
-$(call UNLINK,fxgasm.h) -$(call UNLINK,fxgasm.h)
-$(call UNLINK,$(FX_GLIDE_SW)/texus2/lib/*.obj)
-$(call UNLINK,../oem/oeminit.obj) -$(call UNLINK,../oem/oeminit.obj)
-$(call UNLINK,../oem/oeminit.res) -$(call UNLINK,../oem/oeminit.res)
@@ -346,7 +301,6 @@ realclean: clean
-$(call UNLINK,$(GLIDE_LIBDIR)/glide2x.exp) -$(call UNLINK,$(GLIDE_LIBDIR)/glide2x.exp)
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DLL)) -$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DLL))
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_IMP)) -$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_IMP))
-$(call UNLINK,$(TEXUS_EXEDIR)/$(TEXUS_EXE))
-$(call UNLINK,$(GLIDE_LIBDIR)/fxoem2x.exp) -$(call UNLINK,$(GLIDE_LIBDIR)/fxoem2x.exp)
-$(call UNLINK,$(GLIDE_LIBDIR)/fxoem2x.dll) -$(call UNLINK,$(GLIDE_LIBDIR)/fxoem2x.dll)
-$(call UNLINK,$(GLIDE_LIBDIR)/fxoem2x.lib) -$(call UNLINK,$(GLIDE_LIBDIR)/fxoem2x.lib)

View File

@@ -17,12 +17,6 @@
# #
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED # 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 # 2 3/04/97 9:10p Dow
# Neutered mutiplatform multiheaded monster. # Neutered mutiplatform multiheaded monster.
# #

View File

@@ -16,9 +16,6 @@
;; THE UNITED STATES. ;; THE UNITED STATES.
;; ;;
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
;;
;; $Header$
;; $Log$
; ;
; 4 5/28/97 8:23a Peter ; 4 5/28/97 8:23a Peter
; Merge w/ original glide source ; Merge w/ original glide source

View File

@@ -1,8 +1,10 @@
/* /*
* CPU detection code * 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 * Revision 1.1.2.1 2004/12/12 15:16:02 koolsmoky
* new cpuid * new cpuid
* *
@@ -32,14 +34,17 @@
* *
*/ */
#include <signal.h> #include <signal.h>
#include <setjmp.h> #include <setjmp.h>
#include <string.h> #include <string.h>
#include "cpuid.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 /* These are the bit flags that get set on calling cpuid
* with register eax set to 1 * with register eax set to 1
@@ -86,7 +91,6 @@ typedef unsigned long word32;
static jmp_buf j; static jmp_buf j;
/* Desc: signal handler /* Desc: signal handler
* *
* In : signal number * In : signal number
@@ -100,7 +104,6 @@ static void handler (int signal)
} }
/* Desc: check if CPU has specific feature /* Desc: check if CPU has specific feature
* *
* In : feature request * In : feature request
@@ -134,7 +137,6 @@ static int check_feature (int feature)
#endif #endif
/* Desc: perform (possibly faulting) instructions in a safe manner /* Desc: perform (possibly faulting) instructions in a safe manner
* *
* In : feature request * In : feature request
@@ -181,7 +183,6 @@ static int has_feature (int feature)
} }
/* Desc: get CPU info /* Desc: get CPU info
* *
* In : pointer to _p_info * In : pointer to _p_info
@@ -233,7 +234,7 @@ int _cpuid (_p_info *pinfo)
movl %%edx, %0 \n\ movl %%edx, %0 \n\
0: \n\ 0: \n\
":"=g"(dwExt), "=g"(dwId), "=g"(dwFeature), ":"=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"); ::"%eax", "%ecx", "%edx");
#else #else
_asm _asm
@@ -314,7 +315,6 @@ notamd:
} }
#if CPUTEST #if CPUTEST
#include <stdio.h> #include <stdio.h>
/* Desc: /* Desc:

View File

@@ -17,8 +17,9 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.2.2.2 2005/04/26 00:02:44 koolsmoky
** $Log$ ** Use grDrawTriangle where TRISETUP is not necessary.
**
** Revision 1.2.2.1 2005/01/22 14:52:01 koolsmoky ** Revision 1.2.2.1 2005/01/22 14:52:01 koolsmoky
** enabled packed argb for cmd packet type 3 ** enabled packed argb for cmd packet type 3
** **

View File

@@ -17,8 +17,10 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.1.1.1.2.4 2006/09/02 03:13:53 guillemj
** $Log$ ** 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 ** Revision 1.1.1.1.2.3 2005/01/22 14:52:01 koolsmoky
** enabled packed argb for cmd packet type 3 ** enabled packed argb for cmd packet type 3
** **

View File

@@ -16,9 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** $Header$
** $Log$
** **
** 11 2/20/98 5:31p Peter ** 11 2/20/98 5:31p Peter
** crybaby glide ** crybaby glide

View File

@@ -17,8 +17,10 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.1.1.1.2.1 2004/12/23 20:45:56 koolsmoky
** $Log$ ** 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 ** Revision 1.1.1.1 1999/12/07 21:49:08 joseph
** Initial checkin into SourceForge. ** Initial checkin into SourceForge.
** **

View File

@@ -16,9 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** $Header$
** $Log$
* *
* 17 1/13/98 12:42p Atai * 17 1/13/98 12:42p Atai
* fixed grtexinfo, grVertexLayout, and draw triangle * fixed grtexinfo, grVertexLayout, and draw triangle

View File

@@ -16,9 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** $Header$
** $Log$
* *
* 14 1/08/98 4:58p Atai * 14 1/08/98 4:58p Atai
* tex table broadcast, grVertexLayout enable/disable, stq, and some * tex table broadcast, grVertexLayout enable/disable, stq, and some

View File

@@ -16,9 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** $Header$
** $Log$
** **
** 20 6/06/98 12:06p Peter ** 20 6/06/98 12:06p Peter
** gmt's trilinear hell bug ** gmt's trilinear hell bug
@@ -666,9 +663,9 @@ GR_DIENTRY(grTexDownloadMipMapLevel, void,
FxU16 rle_line[256]; FxU16 rle_line[256];
FxU16 *rle_line_end; 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) void rle_decode_line_asm(FxU16 *tlut,FxU8 *src,FxU16 *dest)
{ {
/* don't do anything just shut up the compiler */ /* don't do anything just shut up the compiler */
} }
#endif /* (GLIDE_PLATFORM & (GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) */ #endif

View File

@@ -17,8 +17,9 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.1.1.1.2.1 2005/04/23 18:23:46 koolsmoky
** $Log$ ** changes to support calling conventions in asm files
**
** Revision 1.1.1.1 1999/12/07 21:49:08 joseph ** Revision 1.1.1.1 1999/12/07 21:49:08 joseph
** Initial checkin into SourceForge. ** Initial checkin into SourceForge.
** **

View File

@@ -1,15 +1,12 @@
/* /*
* FPU handling code * FPU handling code
*
* $Id$
*
*/ */
/* /*
* This routine sets the precision to single which effects all * This routine sets the precision to single which effects all
* adds, mults, and divs. * adds, mults, and divs.
*/ */
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86)
void single_precision_asm() void single_precision_asm()
{ {
#if defined(__MSC__) #if defined(__MSC__)
@@ -47,7 +44,7 @@ void single_precision_asm()
* This routine sets the precision to double which effects all * This routine sets the precision to double which effects all
* adds, mults, and divs. * adds, mults, and divs.
*/ */
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86)
void double_precision_asm() void double_precision_asm()
{ {
#if defined(__MSC__) #if defined(__MSC__)
@@ -66,10 +63,10 @@ void double_precision_asm()
asm("push %eax\n" asm("push %eax\n"
"fnclex\n" "fnclex\n"
"fstcw (%esp)\n" "fstcw (%esp)\n"
"movw (%esp), %eax\n" "movl (%esp), %eax\n"
"and $0x0000fcff, %eax\n" "and $0x0000fcff, %eax\n"
"or $0x000002ff, %eax\n" "or $0x000002ff, %eax\n"
"mov %eax, (%esp)\n" "movl %eax, (%esp)\n"
"fldcw (%esp)\n" "fldcw (%esp)\n"
"pop %eax"); "pop %eax");
#else #else
@@ -82,4 +79,3 @@ void double_precision_asm()
{ {
} }
#endif #endif

View File

@@ -17,9 +17,6 @@
* *
* COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED * COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
* *
* $Header$
* $Log$
*
* 1 7/25/97 9:05a Pgj * 1 7/25/97 9:05a Pgj
* generate fxbldno.h which defines BUILD_NUMBER * generate fxbldno.h which defines BUILD_NUMBER
* *
@@ -29,7 +26,7 @@
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
main(int argc, char **argv) int main(void)
{ {
struct tm locTime; struct tm locTime;
time_t sysTime; time_t sysTime;
@@ -38,7 +35,7 @@ main(int argc, char **argv)
time(&sysTime); time(&sysTime);
locTime = *localtime(&sysTime); locTime = *localtime(&sysTime);
if (build = getenv("BUILD_NUMBER")) { if ((build = getenv("BUILD_NUMBER")) != NULL) {
printf("#define BUILD_NUMBER %s\n", build); printf("#define BUILD_NUMBER %s\n", build);
} else { } else {
unsigned short magic; unsigned short magic;

View File

@@ -16,9 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** $Revision$
** $Date$
*/ */
#include <stddef.h> #include <stddef.h>
@@ -53,8 +50,9 @@
else printf("%s\tequ %10d\n",pname,((int)&o)-(int)&p) else printf("%s\tequ %10d\n",pname,((int)&o)-(int)&p)
#define SIZEOF(p,pname) if (hex) \ #define SIZEOF(p,pname) if (hex) \
printf("SIZEOF_%s\tequ %08lxh\n",pname,sizeof(p)); \ printf("SIZEOF_%s\tequ %08lxh\n",pname,(unsigned long)sizeof(p)); \
else printf("SIZEOF_%s\tequ %10ld\n",pname,sizeof(p)) else printf("SIZEOF_%s\tequ %10lu\n",pname,(unsigned long)sizeof(p))
int int
main (int argc, char **argv) main (int argc, char **argv)
@@ -70,7 +68,7 @@ main (int argc, char **argv)
if (argc > 1) { if (argc > 1) {
if (strcmp("-inline", argv[1]) == 0) { if (strcmp("-inline", argv[1]) == 0) {
SstRegs dummyRegs = { 0x00UL }; SstRegs dummyRegs = { 0x00UL }; /* silence VC6 */
printf("#ifndef __FX_INLINE_H__\n"); printf("#ifndef __FX_INLINE_H__\n");
printf("#define __FX_INLINE_H__\n"); printf("#define __FX_INLINE_H__\n");
@@ -78,17 +76,14 @@ main (int argc, char **argv)
#if GLIDE_DISPATCH_SETUP #if GLIDE_DISPATCH_SETUP
printf("#define kCurGCOffset 0x%lXUL\n", printf("#define kCurGCOffset 0x%lXUL\n",
offsetof(struct _GlideRoot_s, curGC)); (unsigned long)offsetof(struct _GlideRoot_s, curGC));
printf("#define kTriProcOffset 0x%lXUL\n", printf("#define kTriProcOffset 0x%lXUL\n",
offsetof(struct GrGC_s, curArchProcs.triSetupProc)); (unsigned long)offsetof(struct GrGC_s, curArchProcs.triSetupProc));
printf("#define kTriProcOffsetClean %d\n",
offsetof(struct GrGC_s, curArchProcs.triSetupProc));
#endif /* GLIDE_DISPATCH_SETUP */ #endif /* GLIDE_DISPATCH_SETUP */
printf("/* The # of 2-byte entries in the hw fog table */\n"); printf("/* The # of 2-byte entries in the hw fog table */\n");
printf("#define kInternalFogTableEntryCount 0x%lXUL\n", printf("#define kInternalFogTableEntryCount 0x%X\n",
sizeof(dummyRegs.fogTable) >> 1); (unsigned int)sizeof(dummyRegs.fogTable) >> 1);
printf("\n"); printf("\n");
printf("#endif /* __FX_INLINE_H__ */\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,tex_ptr,"tex_ptr\t\t");
OFFSET (gc,state.cull_mode,"cull_mode\t"); OFFSET (gc,state.cull_mode,"cull_mode\t");
OFFSET (gc, regDataList,"regDataList\t"); OFFSET (gc, regDataList,"regDataList\t");
#ifdef GLIDE_DEBUG
OFFSET (gc,checkPtr,"checkPtr\t\t");
#endif
OFFSET (gc, tsuDataList,"tsuDataList\t"); OFFSET (gc, tsuDataList,"tsuDataList\t");
OFFSET (gc, cmdTransportInfo.triPacketHdr, "triPacketHdr"); OFFSET (gc, cmdTransportInfo.triPacketHdr, "triPacketHdr");
OFFSET (gc, cmdTransportInfo.cullStripHdr, "cullStripHdr"); OFFSET (gc, cmdTransportInfo.cullStripHdr, "cullStripHdr");
@@ -129,6 +127,10 @@ main (int argc, char **argv)
OFFSET (gc, cmdTransportInfo.fifoLfbP, "fifoLfbP"); OFFSET (gc, cmdTransportInfo.fifoLfbP, "fifoLfbP");
OFFSET (gc, cmdTransportInfo.lfbLockCount, "lfbLockCount"); 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.GCs[0].state,"GrState\t");
SIZEOF (gr.hwConfig,"GrHwConfiguration"); SIZEOF (gr.hwConfig,"GrHwConfiguration");
SIZEOF (gr.GCs[0],"GC\t"); SIZEOF (gr.GCs[0],"GC\t");
@@ -155,8 +157,7 @@ main (int argc, char **argv)
NEWLINE; NEWLINE;
HEADER ("GrVertex"); HEADER ("GrVertex");
{ { GrVertex v;
GrVertex v;
OFFSET(v, x, "x"); OFFSET(v, x, "x");
OFFSET(v, y, "y"); OFFSET(v, y, "y");

View File

@@ -17,8 +17,9 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.2.2.4 2005/04/23 18:23:46 koolsmoky
** $Log$ ** changes to support calling conventions in asm files
**
** Revision 1.2.2.3 2005/01/22 14:52:01 koolsmoky ** Revision 1.2.2.3 2005/01/22 14:52:01 koolsmoky
** enabled packed argb for cmd packet type 3 ** enabled packed argb for cmd packet type 3
** **

View File

@@ -17,8 +17,6 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** 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 ** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce
** branching. ** branching.
** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the

View File

@@ -17,8 +17,6 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$
** $Log$
** Revision 1.1.1.1.2.2 2006/12/03 04:49:19 guillemj ** Revision 1.1.1.1.2.2 2006/12/03 04:49:19 guillemj
** Backport "sequence point" fix for string upper code from glide3x. ** Backport "sequence point" fix for string upper code from glide3x.
** **
@@ -64,30 +62,26 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <ctype.h>
#include <3dfx.h> #include <3dfx.h>
#define FX_DLL_DEFINITION #define FX_DLL_DEFINITION
#include <fxdll.h> #include <fxdll.h>
#include <glide.h> #include <glide.h>
#include "fxglide.h" #include "fxglide.h"
#ifdef __linux__
#include <ctype.h>
#endif
extern const int _grMipMapHostWH[GR_ASPECT_1x8 + 1][GR_LOD_1 + 1][2]; extern const int _grMipMapHostWH[GR_ASPECT_1x8 + 1][GR_LOD_1 + 1][2];
extern FxU32 _gr_aspect_index_table[]; extern FxU32 _gr_aspect_index_table[];
extern FxU32 _grMipMapHostSize[4][16]; extern FxU32 _grMipMapHostSize[4][16];
static FxU16 ReadDataShort(FILE *); static FxBool ReadDataShort(FILE *, FxU16 *data);
static FxU32 ReadDataLong(FILE *); static FxBool ReadDataLong(FILE *, FxU32 *data);
static void Read8Bit(FxU8 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect); static FxBool 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 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) #if ((GLIDE_PLATFORM & (GLIDE_OS_DOS32 | GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) != 0)
const char *openmode = "rb"; static const char *openmode = "rb";
#else #else
const char *openmode = "r"; static const char *openmode = "r";
#endif #endif
typedef struct typedef struct
@@ -167,11 +161,9 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
}; };
GDBG_INFO(81,"gu3dfGetInfo(%s,0x%x)\n",FileName,Info); 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))) goto _loc1;
if((image_file = fopen(FileName, openmode)) == NULL) return FXFALSE;
if (!_grGet3dfHeader(image_file, buffer, sizeof(buffer))) return FXFALSE;
/* /*
** grab statistics out of the header ** grab statistics out of the header
@@ -180,14 +172,13 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
version, version,
color_format, color_format,
&small_lod, &large_lod, &small_lod, &large_lod,
&aspect_width, &aspect_height) == 0) &aspect_width, &aspect_height) != 6)
return FXFALSE; goto _loc1;
/* /*
** determine aspect ratio, height, and width ** determine aspect ratio, height, and width
*/ */
i = 0; i = 0;
ratio_found = FXFALSE;
while ((i < 4) && (!ratio_found)) { while ((i < 4) && (!ratio_found)) {
if ((aspect_width << i) == aspect_height) { if ((aspect_width << i) == aspect_height) {
Info->header.aspect_ratio = wh_aspect_table[i]; Info->header.aspect_ratio = wh_aspect_table[i];
@@ -206,7 +197,7 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
i++; i++;
} }
if (!ratio_found) return FXFALSE; if (!ratio_found) goto _loc1;
/* /*
** determine height and width of the mip map ** determine height and width of the mip map
@@ -309,13 +300,13 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
{ {
char *tempStr = (char*)color_format; char *tempStr = (char*)color_format;
while (*tempStr != '\0') { while (*tempStr != '\0') {
*tempStr = toupper(*tempStr); if (*tempStr >= 'a' && *tempStr <= 'z')
*tempStr -= ('a'-'A');
tempStr++; tempStr++;
} }
} }
i = 0; i = 0;
format_found = FXFALSE;
while ((cftable[i].name != 0) && (!format_found)) { while ((cftable[i].name != 0) && (!format_found)) {
if (strcmp(color_format, cftable[i].name) == 0) { if (strcmp(color_format, cftable[i].name) == 0) {
Info->header.format = cftable[i].fmt; Info->header.format = cftable[i].fmt;
@@ -328,7 +319,8 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
/* /*
** close the input file ** close the input file
*/ */
if (image_file != NULL) fclose(image_file); _loc1:
fclose(image_file);
if (format_found) { if (format_found) {
FxI32 lod; FxI32 lod;
@@ -352,11 +344,9 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
char buffer[100] = ""; char buffer[100] = "";
GDBG_INFO(81,"gu3dfLoad(%s,0x%x)\n",filename,info); GDBG_INFO(81,"gu3dfLoad(%s,0x%x)\n",filename,info);
/*
** open the file
*/
if ((image_file = fopen(filename, openmode)) == NULL) return FXFALSE; 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 ** If necessary, read in the YIQ decompression table
@@ -368,37 +358,50 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
** read in Y ** read in Y
*/ */
for (index = 0; index < 16; index++) 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 ** read in I
*/ */
for (index = 0; index < 4; index++) { for (index = 0; index < 4; index++) {
info->table.nccTable.iRGB[index][0] = ((FxI16) ReadDataShort(image_file)) & 0x1FF; FxU16 val;
info->table.nccTable.iRGB[index][1] = ((FxI16) ReadDataShort(image_file)) & 0x1FF; if (!ReadDataShort(image_file, &val)) goto _loc1;
info->table.nccTable.iRGB[index][2] = ((FxI16) ReadDataShort(image_file)) & 0x1FF; 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 ** read in Q
*/ */
for (index = 0; index < 4; index++) { for (index = 0; index < 4; index++) {
info->table.nccTable.qRGB[index][0] = ((FxI16) ReadDataShort(image_file)) & 0x1FF; FxU16 val;
info->table.nccTable.qRGB[index][1] = ((FxI16) ReadDataShort(image_file)) & 0x1FF; if (!ReadDataShort(image_file, &val)) goto _loc1;
info->table.nccTable.qRGB[index][2] = ((FxI16) ReadDataShort(image_file)) & 0x1FF; 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 ** pack the table Y entries
*/ */
for (index = 0; index < 4; index++) { for (index = 0; index < 4; index++)
{
FxU32 packedvalue; FxU32 packedvalue;
packedvalue = ((FxU32) info->table.nccTable.yRGB[index*4+0]); 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+1]) << 8;
packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+2]) << 16; packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+2]) << 16;
packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+3]) << 24; packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+3]) << 24;
info->table.nccTable.packed_data[index] = packedvalue; 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)) { (info->header.format == GR_TEXFMT_AP_88)) {
FxU32 i; FxU32 i;
for(i = 0; i < 256; 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_YIQ_422:
case GR_TEXFMT_RGB_332: case GR_TEXFMT_RGB_332:
case GR_TEXFMT_P_8: case GR_TEXFMT_P_8:
Read8Bit(info->data, image_file, if(!Read8Bit(info->data, image_file,
info->header.small_lod, info->header.small_lod,
info->header.large_lod, info->header.large_lod,
info->header.aspect_ratio); info->header.aspect_ratio))
goto _loc1;
break; break;
case GR_TEXFMT_RGB_565: 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_ARGB_4444:
case GR_TEXFMT_ALPHA_INTENSITY_88: case GR_TEXFMT_ALPHA_INTENSITY_88:
case GR_TEXFMT_AP_88: case GR_TEXFMT_AP_88:
Read16Bit(info->data, image_file, if(!Read16Bit(info->data, image_file,
info->header.small_lod, info->header.small_lod,
info->header.large_lod, info->header.large_lod,
info->header.aspect_ratio); info->header.aspect_ratio))
goto _loc1;
break; break;
default: default:
_loc1:
fclose(image_file);
return FXFALSE; return FXFALSE;
} }
/*
** close the file
*/
fclose(image_file); fclose(image_file);
return FXTRUE; return FXTRUE;
} }
@@ -486,21 +493,23 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
** **
** Read in an 8-bit texture map, unpacked. ** Read in an 8-bit texture map, unpacked.
*/ */
static void static FxBool
Read8Bit(FxU8 *data, FILE *image_file, Read8Bit(FxU8 *data, FILE *image_file,
int small_lod, int large_lod, int small_lod, int large_lod,
GrAspectRatio_t aspect_ratio) GrAspectRatio_t aspect_ratio)
{ {
int lod; int lod;
int width, height; FxU32 cnt;
for (lod = large_lod; lod <= small_lod; lod++) { for (lod = large_lod; lod <= small_lod; lod++) {
width = _grMipMapHostWH[aspect_ratio][lod][0]; cnt = (FxU32)_grMipMapHostWH[aspect_ratio][lod][0] *
height = _grMipMapHostWH[aspect_ratio][lod][1]; (FxU32)_grMipMapHostWH[aspect_ratio][lod][1];
fread(data, sizeof(char), width*height, image_file); if (fread(data, 1, cnt, image_file) != cnt)
data += width*height; return FXFALSE;
data += cnt;
} }
return FXTRUE;
} }
/* /*
@@ -508,55 +517,66 @@ Read8Bit(FxU8 *data, FILE *image_file,
** **
** Read in a 16-bit texture map, unpacked. ** 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, int small_lod, int large_lod,
GrAspectRatio_t aspect_ratio) GrAspectRatio_t aspect_ratio)
{ {
int index; FxU32 idx, cnt;
int lod; int lod;
int width, height;
for (lod = large_lod; lod <= small_lod; lod++) { for (lod = large_lod; lod <= small_lod; lod++) {
width = _grMipMapHostWH[aspect_ratio][lod][0]; cnt = (FxU32)_grMipMapHostWH[aspect_ratio][lod][0] *
height = _grMipMapHostWH[aspect_ratio][lod][1]; (FxU32)_grMipMapHostWH[aspect_ratio][lod][1];
for (index = 0; index < (width * height); index++) { for (idx = 0; idx < cnt; idx++) {
*data = ReadDataShort(image_file); if (!ReadDataShort(image_file,data))
return FXFALSE;
data++; data++;
} }
} }
return FXTRUE;
} }
/* /*
** FxU16 ReadDataShort ** FxU16 ReadDataShort
*/ */
static FxU16 ReadDataShort(FILE *fp) static FxBool ReadDataShort(FILE *fp, FxU16 *data)
{ {
FxU16 b1 = (FxU16)getc(fp); FxU16 value;
FxU16 b2 = (FxU16)getc(fp); int b;
#define kShiftB1 8
#define kShiftB2 0
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 ** ReadDataLong
*/ */
static FxU32 ReadDataLong(FILE *fp) static FxBool ReadDataLong(FILE *fp, FxU32 *data)
{ {
FxU32 data;
FxU8 byte[4]; FxU8 byte[4];
fread(byte, 4, 1, fp); if (fread(byte, 1, 4, fp) != 4)
data = (((FxU32) byte[0]) << 24) | return FXFALSE;
*data = (((FxU32) byte[0]) << 24) |
(((FxU32) byte[1]) << 16) | (((FxU32) byte[1]) << 16) |
(((FxU32) byte[2]) << 8) | (((FxU32) byte[2]) << 8) |
((FxU32) byte[3]); ((FxU32) byte[3]);
return data; return FXTRUE;
} }

View File

@@ -17,8 +17,9 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.1.1.1.2.3 2007/05/19 08:29:25 koolsmoky
** $Log$ ** packed rgb fixes
**
** Revision 1.1.1.1.2.1 2005/01/22 14:52:01 koolsmoky ** Revision 1.1.1.1.2.1 2005/01/22 14:52:01 koolsmoky
** enabled packed argb for cmd packet type 3 ** enabled packed argb for cmd packet type 3
** **

View File

@@ -16,9 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** $Header$
** $Log$
* *
* 17 1/05/98 6:06p Atai * 17 1/05/98 6:06p Atai
* glide extension stuff * glide extension stuff

View File

@@ -17,8 +17,10 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.4.2.4 2005/04/25 23:53:59 koolsmoky
** $Log$ ** 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 ** Revision 1.4.2.3 2005/04/23 18:27:26 koolsmoky
** fixed grDrawTriangle triangle dispatch code ** fixed grDrawTriangle triangle dispatch code
** **
@@ -93,7 +95,6 @@
* 77 11/15/97 7:43p Peter * 77 11/15/97 7:43p Peter
* more comdex silliness * more comdex silliness
* *
**
*/ */
#include <memory.h> #include <memory.h>
@@ -648,7 +649,8 @@ all_done: /* come here on degenerate lines */
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
** grDrawTriangle ** 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) __declspec(naked)
#endif #endif
GR_ENTRY(grDrawTriangle, void, (const GrVertex *a, const GrVertex *b, const GrVertex *c)) 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: all_done:
GR_END(); GR_END();
#else
#if defined(__MSC__) #elif defined(_MSC_VER)
{ {
__asm { __asm {
mov edx, [_GlideRoot + kCurGCOffset]; mov edx, [_GlideRoot + kCurGCOffset];
@@ -701,59 +703,13 @@ all_done:
jmp eax; jmp eax;
} }
} }
#endif
#if defined( __linux__ )
/* Here's the basic strategy for this dispatch code: #else
* We jump to _GlideRoot.curGC->archDispatchProcs.triSetupProc #error "Write triangle proc dispatch for this compiler"
* 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
#endif #endif
#undef FN_NAME #undef FN_NAME
} /* grDrawTriangle */ } /* grDrawTriangle */
#endif /* HAVE_XDRAWTRI_ASM */
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
** grDrawPlanarPolygon ** grDrawPlanarPolygon

View File

@@ -17,13 +17,6 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** 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 ** 28 3/14/98 1:07p Peter
** mac port happiness ** mac port happiness
** **
@@ -180,7 +173,7 @@ _grErrorDefaultCallback( const char *s, FxBool fatal )
} }
} }
#ifdef __DOS__ #if defined(__DOS__) && defined(__WATCOMC__)
int _guHeapCheck( void ) int _guHeapCheck( void )
{ {
int i = _heapchk(); int i = _heapchk();

View File

@@ -17,8 +17,10 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.2.2.6 2007/05/19 08:37:25 koolsmoky
** $Log$ ** packed rgb fixes
** force 4x4 dither with alpha dither subtraction
**
** Revision 1.2.2.5 2005/01/22 14:52:02 koolsmoky ** Revision 1.2.2.5 2005/01/22 14:52:02 koolsmoky
** enabled packed argb for cmd packet type 3 ** enabled packed argb for cmd packet type 3
** **
@@ -155,7 +157,6 @@
* *
* 131 1/08/98 7:09p Peter * 131 1/08/98 7:09p Peter
* real hw stuff modulo makefile change * real hw stuff modulo makefile change
*
** **
*/ */
@@ -170,9 +171,6 @@
#include "fxglide.h" #include "fxglide.h"
#include "fxinline.h" #include "fxinline.h"
#include "rcver.h"
static char glideIdent[] = "@#%" VERSIONSTR ;
#if GLIDE_HW_TRI_SETUP #if GLIDE_HW_TRI_SETUP
static void static void
_grUpdateTriPacketHdr(FxU32 paramMask, _grUpdateTriPacketHdr(FxU32 paramMask,
@@ -196,9 +194,6 @@ GR_STATE_ENTRY(grAlphaBlendFunction, void,
GDBG_INFO_MORE(gc->myLevel, "(%d,%d,%d,%d)\n", GDBG_INFO_MORE(gc->myLevel, "(%d,%d,%d,%d)\n",
rgb_sf, rgb_df, alpha_sf, alpha_df); rgb_sf, rgb_df, alpha_sf, alpha_df);
/* Watcom warning suppressor */
glideIdent[0] = glideIdent[0];
alphamode = gc->state.fbi_config.alphaMode; alphamode = gc->state.fbi_config.alphaMode;
if (alpha_sf != GR_BLEND_ONE && alpha_sf != GR_BLEND_ZERO) { if (alpha_sf != GR_BLEND_ONE && alpha_sf != GR_BLEND_ZERO) {
GR_CHECK_W(myName, 1, "unsupported alpha source blend function"); 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_EXPECTED_SIZE(sizeof(FxU32), 1);
GR_SET(BROADCAST_ID, hw, bltSize, 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(); GR_CHECK_SIZE();
} }
@@ -773,9 +768,11 @@ GR_ENTRY(grBufferSwap, void, (int swapInterval))
#endif /* (GLIDE_PLATFORM & GLIDE_HW_CVG) */ #endif /* (GLIDE_PLATFORM & GLIDE_HW_CVG) */
#if ((GLIDE_PLATFORM & GLIDE_HW_CVG) || (GLIDE_PLATFORM & GLIDE_HW_H3)) #if ((GLIDE_PLATFORM & GLIDE_HW_CVG) || (GLIDE_PLATFORM & GLIDE_HW_H3))
#ifdef GLIDE_PLUG
/* optionally display the 3Dfx powerfield logo overlay */ /* optionally display the 3Dfx powerfield logo overlay */
if (_GlideRoot.environment.shamelessPlug) _grShamelessPlug(); if (_GlideRoot.environment.shamelessPlug) _grShamelessPlug();
#endif
/* check for environmental override. /* check for environmental override.
* *
* NB: If we are sli, the application passes in 0, and the user has * 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 #ifdef GLIDE_DEBUG
{ if ((FxI32)_GlideRoot.environment.snapshot > 0) {
if ((FxI32)_GlideRoot.environment.snapshot > 0) { static char saveDBG[GDBG_MAX_LEVELS];
static char saveDBG[GDBG_MAX_LEVELS]; int i;
int i;
/* turn off tracing after frame 0 and the snapshot frame */
/* turn off tracing after frame 0 and the snapshot frame */ if ((_GlideRoot.stats.bufferSwaps == 0) ||
if ((_GlideRoot.stats.bufferSwaps == 0) || (_GlideRoot.stats.bufferSwaps == _GlideRoot.environment.snapshot + 3)) {
(_GlideRoot.stats.bufferSwaps == _GlideRoot.environment.snapshot + 3)) { GDBG_PRINTF(FN_NAME": FX_SNAPSHOT (%ld)\n", _GlideRoot.stats.bufferSwaps);
GDBG_PRINTF(FN_NAME": FX_SNAPSHOT (%ld)\n", _GlideRoot.stats.bufferSwaps); for (i = 1; i < GDBG_MAX_LEVELS; i++) {
for (i = 1; i < GDBG_MAX_LEVELS; i++) { if (_GlideRoot.stats.bufferSwaps == 0) saveDBG[i] = (char)GDBG_GET_DEBUGLEVEL(i);
if (_GlideRoot.stats.bufferSwaps == 0) saveDBG[i] = (char)GDBG_GET_DEBUGLEVEL(i); GDBG_SET_DEBUGLEVEL(i, 0);
GDBG_SET_DEBUGLEVEL(i, 0);
}
} }
}
/* turn on tracing after the snapshot frame */ /* turn on tracing after the snapshot frame */
if (_GlideRoot.stats.bufferSwaps == _GlideRoot.environment.snapshot) { if (_GlideRoot.stats.bufferSwaps == _GlideRoot.environment.snapshot) {
GDBG_PRINTF(FN_NAME": FX_SNAPSHOT (%ld)\n", _GlideRoot.stats.bufferSwaps); GDBG_PRINTF(FN_NAME": FX_SNAPSHOT (%ld)\n", _GlideRoot.stats.bufferSwaps);
for (i = 1; i < GDBG_MAX_LEVELS; i++) { for (i = 1; i < GDBG_MAX_LEVELS; i++) {
GDBG_SET_DEBUGLEVEL(i, saveDBG[i]); GDBG_SET_DEBUGLEVEL(i, saveDBG[i]);
}
} }
} }
} }
@@ -879,7 +874,7 @@ GR_ENTRY(grBufferSwap, void, (int swapInterval))
*bufPtrs[i] = (*bufPtrs[i] + 1) % numBufs; *bufPtrs[i] = (*bufPtrs[i] + 1) % numBufs;
} }
GDBG_INFO(gc->myLevel, GDBG_INFO(gc->myLevel,
"\trenderBuf: 0x%X\n", "\trenderBuf: 0x%X\n",
gc->hwDep.cvgDep.renderBuf); gc->hwDep.cvgDep.renderBuf);
} }
@@ -1451,7 +1446,6 @@ GR_STATE_ENTRY(grDepthBufferMode, void, (GrDepthBufferMode_t mode))
*/ */
#ifdef GLIDE_DEBUG #ifdef GLIDE_DEBUG
FxBool FxBool
_grCanSupportDepthBuffer(void) _grCanSupportDepthBuffer(void)
{ {
GR_DCL_GC; GR_DCL_GC;
@@ -1734,8 +1728,8 @@ GR_ENTRY(grGlideShutdown, void, (void))
for(i = 0; i < _GlideRoot.hwConfig.num_sst; i++) { for(i = 0; i < _GlideRoot.hwConfig.num_sst; i++) {
if (_GlideRoot.GCs[i].hwInitP) { if (_GlideRoot.GCs[i].hwInitP) {
/*if (_GlideRoot.CPUType.family >= 6) {*/ /*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); sst1InitShutdown(_GlideRoot.GCs[i].base_ptr);
_GlideRoot.GCs[i].hwInitP = FXFALSE; _GlideRoot.GCs[i].hwInitP = FXFALSE;
@@ -1897,7 +1891,7 @@ GR_STATE_ENTRY(grRenderBuffer, void, (GrBuffer_t buffer))
fbzMode |= ((buffer == GR_BUFFER_FRONTBUFFER) fbzMode |= ((buffer == GR_BUFFER_FRONTBUFFER)
? SST_DRAWBUFFER_FRONT ? SST_DRAWBUFFER_FRONT
: SST_DRAWBUFFER_BACK); : SST_DRAWBUFFER_BACK);
GR_SET_EXPECTED_SIZE(sizeof(FxU32), 1); GR_SET_EXPECTED_SIZE(sizeof(FxU32), 1);
GR_SET(BROADCAST_ID, hw, fbzMode, fbzMode); GR_SET(BROADCAST_ID, hw, fbzMode, fbzMode);
GR_CHECK_SIZE(); GR_CHECK_SIZE();
@@ -1912,7 +1906,7 @@ GR_STATE_ENTRY(grRenderBuffer, void, (GrBuffer_t buffer))
*/ */
{ {
const FxU32 oldRenderBuf = gc->hwDep.cvgDep.renderBuf; const FxU32 oldRenderBuf = gc->hwDep.cvgDep.renderBuf;
gc->hwDep.cvgDep.renderBuf = ((buffer == GR_BUFFER_FRONTBUFFER) gc->hwDep.cvgDep.renderBuf = ((buffer == GR_BUFFER_FRONTBUFFER)
? gc->hwDep.cvgDep.frontBuf ? gc->hwDep.cvgDep.frontBuf
: gc->hwDep.cvgDep.backBuf); : gc->hwDep.cvgDep.backBuf);
@@ -1920,7 +1914,7 @@ GR_STATE_ENTRY(grRenderBuffer, void, (GrBuffer_t buffer))
(gc->hwDep.cvgDep.sliOriginBufCount != 0)) _grSliOriginClear(); (gc->hwDep.cvgDep.sliOriginBufCount != 0)) _grSliOriginClear();
} }
#endif /* (GLIDE_PLATFORM & GLIDE_HW_CVG) && GLIDE_BLIT_CLEAR */ #endif /* (GLIDE_PLATFORM & GLIDE_HW_CVG) && GLIDE_BLIT_CLEAR */
GR_END(); GR_END();
#undef FN_NAME #undef FN_NAME
} /* grRenderBuffer */ } /* grRenderBuffer */

View File

@@ -16,12 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** 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 ** 75 6/23/98 5:38p Peter
** lfb hinting ** lfb hinting

View File

@@ -16,15 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** 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 #define OFFICIAL 1
@@ -32,7 +23,6 @@
#include <fxver.h> #include <fxver.h>
#include "rcver.h" #include "rcver.h"
//#include "fxbldno.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //

View File

@@ -16,9 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** $Header$
** $Log$
* *
* 10 12/09/97 12:20p Peter * 10 12/09/97 12:20p Peter
* mac glide port * mac glide port
@@ -90,7 +87,7 @@ n** -----------------------------------------------------------------------
/* Check for OS */ /* Check for OS */
#if defined(__IRIX__) || defined(__sparc__) || defined(__linux__) #if defined(__IRIX__) || defined(__sparc__) || defined(__linux__)
# define GLIDE_OS GLIDE_OS_UNIX # define GLIDE_OS GLIDE_OS_UNIX
#elif defined(__DOS__) #elif defined(__DOS__) || defined(__MSDOS__)
# define GLIDE_OS GLIDE_OS_DOS32 # define GLIDE_OS GLIDE_OS_DOS32
#elif defined(__WIN32__) #elif defined(__WIN32__)
# define GLIDE_OS GLIDE_OS_WIN32 # define GLIDE_OS GLIDE_OS_WIN32

View File

@@ -16,9 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** $Header$
** $Log$
* *
* 11 1/07/98 11:18a Atai * 11 1/07/98 11:18a Atai
* remove GrMipMapInfo and GrGC.mm_table in glide3 * remove GrMipMapInfo and GrGC.mm_table in glide3

View File

@@ -16,9 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** $Header$
** $Log$
* *
* 6 8/30/97 5:59p Tarolli * 6 8/30/97 5:59p Tarolli
* cleanups * cleanups

View File

@@ -17,8 +17,9 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.1.1.1.2.8 2007/06/23 08:42:10 koolsmoky
** $Log$ ** Removed duplicate disableDitherSub envars
**
** Revision 1.1.1.1.2.7 2005/04/25 23:58:41 koolsmoky ** Revision 1.1.1.1.2.7 2005/04/25 23:58:41 koolsmoky
** Fix _texDownloadProcs comma separator. ** Fix _texDownloadProcs comma separator.
** Thanks to Ozkan Sezer <sezeroz@gmail.com>. ** Thanks to Ozkan Sezer <sezeroz@gmail.com>.
@@ -745,8 +746,16 @@ _GlideInitEnvironment(void)
(((envStr = GETENV(__envVar)) == NULL) ? (__defVal) : atol(envStr)) (((envStr = GETENV(__envVar)) == NULL) ? (__defVal) : atol(envStr))
_GlideRoot.environment.triBoundsCheck = (GETENV("FX_GLIDE_BOUNDS_CHECK") != NULL); _GlideRoot.environment.triBoundsCheck = (GETENV("FX_GLIDE_BOUNDS_CHECK") != NULL);
#ifdef GLIDE_SPLASH
_GlideRoot.environment.noSplash = (GETENV("FX_GLIDE_NO_SPLASH") != NULL); _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); _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.ignoreReopen = (GETENV("FX_GLIDE_IGNORE_REOPEN") != NULL);
_GlideRoot.environment.texLodDither = ((GETENV("FX_GLIDE_LOD_DITHER") == NULL) _GlideRoot.environment.texLodDither = ((GETENV("FX_GLIDE_LOD_DITHER") == NULL)
? 0x00UL ? 0x00UL
@@ -806,13 +815,7 @@ _GlideInitEnvironment(void)
const char* errStr = s; const char* errStr = s;
if (pciGetErrorCode() == PCI_ERR_NOERR) { if (pciGetErrorCode() == PCI_ERR_NOERR) {
#ifndef __linux__ sprintf(s, "%s: expected %s, none detected\n", FN_NAME, GLIDE_DRIVER_NAME);
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
} else { } else {
errStr = pciGetErrorString(); errStr = pciGetErrorString();
} }

View File

@@ -17,11 +17,6 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** 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 ** 26 2/20/98 11:00a Peter
** removed glide3 from glid2 tree ** removed glide3 from glid2 tree
@@ -95,6 +90,13 @@
#include "fxglide.h" #include "fxglide.h"
#include "fxinline.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 Constants
-----------------------------*/ -----------------------------*/
@@ -956,3 +958,4 @@ GR_DIENTRY(grSplash,void,(float x,float y,float w,float h,FxU32 _frame))
} }
#endif /* GLIDE_SPLASH */

View File

@@ -17,8 +17,9 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.2.2.4 2005/01/22 14:52:02 koolsmoky
** $Log$ ** enabled packed argb for cmd packet type 3
**
** Revision 1.2.2.3 2005/01/13 16:09:06 koolsmoky ** 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. ** 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 ** oem map board
*/ */
if (gc->oemInit) { if (gc->oemInit) {
FARPROC oemInitMapBoard = NULL; FARPROC oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
if (oemInitMapBoard != NULL) if (oemInitMapBoard != NULL)
oemInitMapBoard(&gc->oemi); oemInitMapBoard(&gc->oemi);
else else
@@ -675,8 +675,8 @@ __tryReOpen:
gc->oemi.vid.clkFreq24bpp = tvVidtiming.clkFreq24bpp; gc->oemi.vid.clkFreq24bpp = tvVidtiming.clkFreq24bpp;
if (gc->oemInit) { if (gc->oemInit) {
FARPROC oemInitVideoTiming = NULL; FARPROC oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4");
if (oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4")) { if (oemInitVideoTiming) {
if (oemInitVideoTiming(&gc->oemi.vid)) { if (oemInitVideoTiming(&gc->oemi.vid)) {
/* /*
** video timing is updated by oem dll ** video timing is updated by oem dll
@@ -791,10 +791,12 @@ __tryReOpen:
FARPROC oemGet; FARPROC oemGet;
FxI32 tv_connected = 0; FxI32 tv_connected = 0;
FxI32 slimaster[2], slislave[2]; FxI32 slimaster[2], slislave[2];
if (oemInitSetVideo = GetProcAddress(gc->oemInit, "_fxoemInitSetVideo@4")) oemInitSetVideo = GetProcAddress(gc->oemInit, "_fxoemInitSetVideo@4");
if (oemInitSetVideo)
oemInitSetVideo(&gc->oemi); 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); oemGet(FX_OEM_TVOUT, 4, &tv_connected);
/* Is tv connected to the board? */ /* Is tv connected to the board? */
if (tv_connected) { if (tv_connected) {
@@ -1569,11 +1571,12 @@ __errSliExit:
/* -------------------------------------------------------- /* --------------------------------------------------------
Splash Screen Splash Screen
--------------------------------------------------------*/ --------------------------------------------------------*/
#ifdef GLIDE_SPLASH
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32) #if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
if (!_GlideRoot.environment.noSplash) { if (!_GlideRoot.environment.noSplash) {
HMODULE newSplash; HMODULE newSplash = LoadLibrary("3dfxspl2.dll");
if (newSplash = LoadLibrary("3dfxspl2.dll")) { if (newSplash) {
GrState glideState; GrState glideState;
FxBool didLoad; FxBool didLoad;
GrSplashProc fxSplash; GrSplashProc fxSplash;
@@ -1618,7 +1621,7 @@ __errSliExit:
grGlideSetState((const void*)&glideState); grGlideSetState((const void*)&glideState);
} }
} }
FreeLibrary(newSplash); FreeLibrary(newSplash);
} }
} }
@@ -1632,6 +1635,7 @@ __errSliExit:
0); 0);
_GlideRoot.environment.noSplash = 1; _GlideRoot.environment.noSplash = 1;
} }
#endif
_GlideRoot.windowsInit = FXTRUE; /* to avoid race with grSstControl() */ _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 (isValidP) sst1InitVgaPassCtrl(gc->base_ptr, passFlag);
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32) #if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
{ {
FARPROC oemControl = NULL;
if (gc->oemInit) { if (gc->oemInit) {
if ((oemControl = GetProcAddress(gc->oemInit, "_fxoemControl@4"))) FARPROC oemControl = GetProcAddress(gc->oemInit, "_fxoemControl@4");
if (oemControl)
oemControl(code); oemControl(code);
} }
} }
#endif #endif
} }
#endif #endif
} }
GDBG_INFO(41, "%s: Returning TRUE\n", FN_NAME); GDBG_INFO(41, "%s: Returning TRUE\n", FN_NAME);

View File

@@ -17,8 +17,6 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$
** $Log$
* *
* 4 5/27/97 1:16p Peter * 4 5/27/97 1:16p Peter
* Basic cvg, w/o cmd fifo stuff. * Basic cvg, w/o cmd fifo stuff.

View File

@@ -17,8 +17,6 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$
** $Log$
* *
* 19 12/12/97 12:43p Atai * 19 12/12/97 12:43p Atai
* move i and dateElem into the set up loop * move i and dateElem into the set up loop

View File

@@ -17,9 +17,6 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$
** $Log$
**
** 42 6/24/98 5:19p Peter ** 42 6/24/98 5:19p Peter
** cleanedup version merged w/ banshee ** cleanedup version merged w/ banshee
** **

View File

@@ -17,8 +17,9 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.2.2.3 2005/04/23 18:33:33 koolsmoky
** $Log$ ** added workaround for 8bit wide texture downloads for old revision TMUs
**
** Revision 1.2.2.2 2005/01/22 14:52:02 koolsmoky ** Revision 1.2.2.2 2005/01/22 14:52:02 koolsmoky
** enabled packed argb for cmd packet type 3 ** enabled packed argb for cmd packet type 3
** **
@@ -504,7 +505,7 @@ GR_ENTRY(grTexDownloadMipMapLevelPartial,
? 1 /* 16-bit texture */ ? 1 /* 16-bit texture */
: 2); /* 8-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; if (widthSel > 2) widthSel = 3;
_GlideRoot.stats.texBytes += max_s * (max_t - t + 1) * 4; _GlideRoot.stats.texBytes += max_s * (max_t - t + 1) * 4;
@@ -553,7 +554,7 @@ GR_ENTRY(grTexDownloadMipMapLevelPartial,
max_s = width >> ((format < GR_TEXFMT_16BIT) max_s = width >> ((format < GR_TEXFMT_16BIT)
? 2 /* 8-bit texture */ ? 2 /* 8-bit texture */
: 1); /* 16-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; _GlideRoot.stats.texBytes += max_s * (max_t - t + 1) * 4;

View File

@@ -17,8 +17,6 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$
** $Log$
* *
* 14 12/18/97 2:13p Peter * 14 12/18/97 2:13p Peter
* fogTable cataclysm * fogTable cataclysm

View File

@@ -17,8 +17,9 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.1.1.1.2.2 2005/04/26 00:02:45 koolsmoky
** $Log$ ** Use grDrawTriangle where TRISETUP is not necessary.
**
** Revision 1.1.1.1.2.1 2005/01/22 14:52:02 koolsmoky ** Revision 1.1.1.1.2.1 2005/01/22 14:52:02 koolsmoky
** enabled packed argb for cmd packet type 3 ** enabled packed argb for cmd packet type 3
** **

View File

@@ -17,8 +17,6 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$
** $Log$
* *
* 10 12/09/97 12:20p Peter * 10 12/09/97 12:20p Peter
* mac glide port * mac glide port

View File

@@ -16,10 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** $Header$
** $Log$
**
*/ */
/* Multipass drawing */ /* Multipass drawing */

View File

@@ -17,8 +17,6 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$
** $Log$
** **
** 22 2/20/98 5:31p Peter ** 22 2/20/98 5:31p Peter
** crybaby glide ** crybaby glide

View File

@@ -17,8 +17,9 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.1.1.1.2.2 2007/05/19 08:38:01 koolsmoky
** $Log$ ** packed rgb fixes
**
** Revision 1.1.1.1.2.1 2005/01/22 14:52:02 koolsmoky ** Revision 1.1.1.1.2.1 2005/01/22 14:52:02 koolsmoky
** enabled packed argb for cmd packet type 3 ** enabled packed argb for cmd packet type 3
** **

View File

@@ -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

View File

@@ -1,10 +1,9 @@
/*#include "fxbldno.h"*/
#include "fxbldno.h"
#define MANVERSION 2 #define MANVERSION 2
#define MANREVISION 56 #define MANREVISION 56
//#define BUILD_NUMBER 40405 #define BUILD_NUMBER 40405
#ifndef GLIDE3 #ifndef GLIDE3
#define VERSIONSTR "2.56\0" #define VERSIONSTR "2.56\0"

View File

@@ -17,11 +17,6 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** 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 ** 7 2/20/98 11:00a Peter
** removed glide3 from glid2 tree ** removed glide3 from glid2 tree

View File

@@ -16,9 +16,6 @@
## ##
## COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ## COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
## ##
## $Header$
## $Revision$
## $Log$
## Revision 1.2 1999/12/11 00:42:21 joseph ## Revision 1.2 1999/12/11 00:42:21 joseph
## Changed \(.data) to .section .data to fix build errors with binutils 2.9.5. ## Changed \(.data) to .section .data to fix build errors with binutils 2.9.5.
## ##

View File

@@ -16,9 +16,9 @@
;; ;;
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
;; ;;
;; $Header$ ;; Revision 1.1.1.1.2.4 2005/04/23 18:36:36 koolsmoky
;; $Revision$ ;; fixed 3dnow! and mmx optimizations
;; $Log$ ;;
;; Revision 1.1.1.1.2.3 2005/01/22 14:52:02 koolsmoky ;; Revision 1.1.1.1.2.3 2005/01/22 14:52:02 koolsmoky
;; enabled packed argb for cmd packet type 3 ;; enabled packed argb for cmd packet type 3
;; ;;
@@ -31,7 +31,6 @@
;; ;;
;; Revision 1.1.1.1 1999/12/07 21:49:13 joseph ;; Revision 1.1.1.1 1999/12/07 21:49:13 joseph
;; Initial checkin into SourceForge. ;; Initial checkin into SourceForge.
;;
;; ;;
;; 7 5/18/98 12:16p Peter ;; 7 5/18/98 12:16p Peter
;; culling enabling ;; culling enabling
@@ -88,7 +87,7 @@ extrn _FifoMakeRoom, 12
%endif %endif
%ENDMACRO ; WRITE_MM1LOW_FIFO %ENDMACRO ; WRITE_MM1LOW_FIFO
segment DATA segment SEG_DATA
One DD 1.0 One DD 1.0
Area DD 0 Area DD 0
%IF GLIDE_PACKED_RGB %IF GLIDE_PACKED_RGB
@@ -96,7 +95,7 @@ segment DATA
bias1 DD 0 bias1 DD 0
%ENDIF %ENDIF
segment CONST segment SEG_CONST
$T2003 DD 12288.0 $T2003 DD 12288.0
$T2005 DD 1.0 $T2005 DD 1.0
$T2006 DD 256.0 $T2006 DD 256.0
@@ -125,7 +124,7 @@ Y equ 4
;; enables/disables trisProcessed and trisDrawn counters ;; enables/disables trisProcessed and trisDrawn counters
%define STATS 1 %define STATS 1
segment TEXT segment SEG_TEXT
ALIGN 32 ALIGN 32
PROC_TYPE _trisetup_cull PROC_TYPE _trisetup_cull

View File

@@ -17,9 +17,9 @@
;; ;;
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
;; ;;
;; $Header$ ;; Revision 1.1.1.1.2.4 2005/04/23 18:36:36 koolsmoky
;; $Revision$ ;; fixed 3dnow! and mmx optimizations
;; $Log$ ;;
;; Revision 1.1.1.1.2.3 2005/01/22 14:52:02 koolsmoky ;; Revision 1.1.1.1.2.3 2005/01/22 14:52:02 koolsmoky
;; enabled packed argb for cmd packet type 3 ;; enabled packed argb for cmd packet type 3
;; ;;

View File

@@ -17,12 +17,6 @@
## ##
## COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ## 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 # 2 10/30/97 6:53p Peter
# first real cut at tri asm # first real cut at tri asm

View 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

View File

@@ -1,8 +1,10 @@
; ;
; compulsory header for glide3/xdraw* assembly specializations (NASM) ; compulsory header for glide3/xdraw* assembly specializations (NASM)
; ;
; $Header$ ; Revision 1.1.2.1 2004/12/23 20:45:56 koolsmoky
; $Log$ ; 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 ; Revision 1.1.2.3 2004/10/04 08:57:52 dborca
; supporting DOS/OpenWatcom in Assembly files ; supporting DOS/OpenWatcom in Assembly files
; ;
@@ -74,7 +76,7 @@
%macro endp 0 %macro endp 0
%ifnctx proc %ifnctx proc
%error Mismatched `endp'/`proc' %error Mismatched ENDP/PROC
%else %else
%pop %pop
%endif %endif
@@ -105,9 +107,9 @@
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_WIN32 %if XOS == XOS_WIN32
%define TEXT .text align=32 %define SEG_TEXT .text align=32
%define DATA .data align=32 %define SEG_DATA .data align=32
%define CONST .rdata align=32 %define SEG_CONST .rdata align=32
%macro GET_GC 0 %macro GET_GC 0
mov gc, [_GlideRoot + curGC] mov gc, [_GlideRoot + curGC]
@@ -120,9 +122,9 @@
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_DJGPP %if XOS == XOS_DJGPP
%define TEXT .text %define SEG_TEXT .text
%define DATA .data %define SEG_DATA .data
%define CONST .rodata %define SEG_CONST .rodata
%macro GET_GC 0 %macro GET_GC 0
mov gc, [_GlideRoot + curGC] mov gc, [_GlideRoot + curGC]
@@ -135,9 +137,9 @@
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_LINUX %if XOS == XOS_LINUX
%define TEXT .text align=32 %define SEG_TEXT .text align=32
%define DATA .data align=32 %define SEG_DATA .data align=32
%define CONST .rodata align=32 %define SEG_CONST .rodata align=32
%macro GET_GC 0 %macro GET_GC 0
mov gc, [_GlideRoot + curGC] mov gc, [_GlideRoot + curGC]
@@ -150,9 +152,9 @@
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_WATCD %if XOS == XOS_WATCD
%define TEXT _TEXT align=1 public use32 class=CODE FLAT %define SEG_TEXT _TEXT align=1 public use32 class=CODE FLAT
%define DATA _DATA align=4 public use32 class=DATA FLAT %define SEG_DATA _DATA align=4 public use32 class=DATA FLAT
%define CONST CONST2 align=4 public use32 class=DATA FLAT %define SEG_CONST CONST2 align=4 public use32 class=DATA FLAT
%macro GET_GC 0 %macro GET_GC 0
mov gc, [_GlideRoot + curGC] mov gc, [_GlideRoot + curGC]

View File

@@ -16,9 +16,9 @@
;; ;;
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
;; ;;
;; $Header$ ;; Revision 1.1.2.3 2007/06/23 08:48:00 koolsmoky
;; $Revision$ ;; removed unneeded emms calls
;; $Log$ ;;
;; Revision 1.1.2.2 2005/04/23 18:36:36 koolsmoky ;; Revision 1.1.2.2 2005/04/23 18:36:36 koolsmoky
;; fixed 3dnow! and mmx optimizations ;; fixed 3dnow! and mmx optimizations
;; ;;
@@ -120,7 +120,7 @@ _texData$ equ 24 + STACKOFFSET
; ;
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
segment TEXT segment SEG_TEXT
ALIGN 32 ALIGN 32

View File

@@ -17,8 +17,10 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.1.2.1 2004/12/23 20:45:56 koolsmoky
** $Log$ ** 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 ** Revision 1.1.1.1 1999/12/07 21:42:38 joseph
** Initial checkin into SourceForge. ** Initial checkin into SourceForge.
** **

View 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)

View 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

View 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)

View File

@@ -21,9 +21,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@@ -99,13 +96,13 @@ int main( int argc, char **argv)
dstfname[0] = 0; dstfname[0] = 0;
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while( (rv = tlGetOpt( argc, argv, "nrst", &match, &remArgs )) ) { while ((rv = tlGetOpt(argc, argv, "nrst", &match, &remArgs)) != 0) {
if ( rv == -1 ) { if ( rv == -1 ) {
printf( "Unrecognized command line argument\n" ); printf( "Unrecognized command line argument\n" );
printf( "%s %s\n", name, usage ); printf( "%s %s\n", name, usage );
printf( "Available resolutions:\n%s\n", printf( "Available resolutions:\n%s\n",
tlGetResolutionList() ); tlGetResolutionList() );
exit(1); exit(1);
} }
switch( match ) { switch( match ) {
case 'n': case 'n':
@@ -222,6 +219,7 @@ int main( int argc, char **argv)
} }
} }
diff.data = NULL;
diff.width = 0; diff.width = 0;
diff.height = 0; diff.height = 0;
@@ -437,5 +435,3 @@ static void imageConvert( void *dst, void *src,
return; return;
} }

View File

@@ -19,16 +19,13 @@
** **
*/ */
#ifndef __linux__ #ifdef _WIN32
#include <windows.h> #include <windows.h>
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <time.h> #include <time.h>

View File

@@ -22,9 +22,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <glide.h> #include <glide.h>
@@ -71,13 +68,13 @@ int main( int argc, char **argv) {
// GrFog_t fogtable[GR_FOG_TABLE_SIZE]; // GrFog_t fogtable[GR_FOG_TABLE_SIZE];
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) { while ((rv = tlGetOpt(argc, argv, "nr", &match, &remArgs)) != 0) {
if ( rv == -1 ) { if ( rv == -1 ) {
printf( "Unrecognized command line argument\n" ); printf( "Unrecognized command line argument\n" );
printf( "%s %s\n", name, usage ); printf( "%s %s\n", name, usage );
printf( "Available resolutions:\n%s\n", printf( "Available resolutions:\n%s\n",
tlGetResolutionList() ); tlGetResolutionList() );
exit(1); exit(1);
} }
switch( match ) { switch( match ) {
case 'n': case 'n':

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -16,18 +16,10 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
**
** $Revision$
** $Date$
**
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <assert.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 prPopLod( GrTexInfo *lpDeTexInfo, mipMapEnd_t deMipMapEnd );
static void prPushLod( GrTexInfo *lpDeTexInfo, mipMapEnd_t deMipMapEnd ); static void prPushLod( GrTexInfo *lpDeTexInfo, mipMapEnd_t deMipMapEnd );
static FxU32 prGetTxMnAdd( hTexId_t deTexId, GrLOD_t deLod ); 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 int prGetLodHeight( GrLOD_t lod, GrAspectRatio_t aspect );
static FxU32 prGetMultiMemBump( const GrTexInfo *const deTexInfo, static FxU32 prGetMultiMemBump( const GrTexInfo *const deTexInfo,
GrTexBaseRange_t deTexBase, GrTexBaseRange_t deTexBase,
@@ -102,12 +93,14 @@ plTxMnLoadTxMngr( TlTexture* lpTexture )
Arguments: Arguments:
Return: Return:
-------------------------------------------------------------------*/ -------------------------------------------------------------------*/
#if 0 /* NOT USED */
static void static void
prTxMnSetBeenPopd( hTexId_t deTexId, FxBool bBeenPopd ) prTxMnSetBeenPopd( hTexId_t deTexId, FxBool bBeenPopd )
{ {
SET_BEENPOPD( tlTxMnMngr[deTexId], bBeenPopd ); SET_BEENPOPD( tlTxMnMngr[deTexId], bBeenPopd );
SET_DIRTY( tlTxMnMngr[deTexId], FXTRUE ); /* just for messing with it */ 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 static int
prGetLodWidth( GrLOD_t lod, GrAspectRatio_t aspect ) prGetLodWidth( GrLOD_t lod, GrAspectRatio_t aspect )
{ {
@@ -1345,6 +1339,7 @@ prGetLodWidth( GrLOD_t lod, GrAspectRatio_t aspect )
return( val ); return( val );
} }
#endif
/*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/

View File

@@ -16,14 +16,8 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
**
** $Revision$
** $Date$
**
*/ */
#ifndef _PLIB_H_ #ifndef _PLIB_H_
#define _PLIB_H_ #define _PLIB_H_

View File

@@ -22,9 +22,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <math.h> #include <math.h>
#include <assert.h> #include <assert.h>
@@ -63,7 +60,7 @@ static FxI32 g_nLodToDwnld;
static FxBool g_bDoLodPrtlDwnld = FXFALSE; static FxBool g_bDoLodPrtlDwnld = FXFALSE;
static FxI32 g_nLodPrtlFstRow; static FxI32 g_nLodPrtlFstRow;
static FxI32 g_nLodPrtlLstRow; static FxI32 g_nLodPrtlLstRow;
int main( int argc, char **argv) { int main( int argc, char **argv) {
char match; char match;
char **remArgs; char **remArgs;
@@ -175,14 +172,14 @@ int main( int argc, char **argv) {
fgVerts[2].a = 255.f, fgVerts[2].oow = 1.f; fgVerts[2].a = 255.f, fgVerts[2].oow = 1.f;
fgVerts[2].tmuvtx[0].sow = 0.f; fgVerts[2].tmuvtx[0].sow = 0.f;
fgVerts[2].tmuvtx[0].tow = 0.f; fgVerts[2].tmuvtx[0].tow = 0.f;
fgVerts[3].x = 0.f, fgVerts[3].y = 0.f; fgVerts[3].x = 0.f, fgVerts[3].y = 0.f;
fgVerts[3].a = 255.f, fgVerts[3].oow = 1.f; fgVerts[3].a = 255.f, fgVerts[3].oow = 1.f;
fgVerts[3].tmuvtx[0].sow = 0.f; fgVerts[3].tmuvtx[0].sow = 0.f;
fgVerts[3].tmuvtx[0].tow = 0.f; fgVerts[3].tmuvtx[0].tow = 0.f;
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) while ((rv = tlGetOpt(argc, argv, "nr", &match, &remArgs)) != 0)
{ {
if ( rv == -1 ) if ( rv == -1 )
{ {
@@ -217,7 +214,7 @@ int main( int argc, char **argv) {
printf( "Press A Key To Begin Test.\n" ); printf( "Press A Key To Begin Test.\n" );
tlGetCH(); tlGetCH();
} }
/* Initialize Glide */ /* Initialize Glide */
grGlideInit(); grGlideInit();
assert( grSstQueryHardware( &hwconfig ) ); assert( grSstQueryHardware( &hwconfig ) );
@@ -257,7 +254,7 @@ int main( int argc, char **argv) {
/* done loading plTxMn */ /* done loading plTxMn */
// grTexFilterMode( GR_TMU0, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR ); // grTexFilterMode( GR_TMU0, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR );
fxColorValue = (0x00FFFFFF | ( ((int) alpha) << 24 ) ); fxColorValue = (0x00FFFFFF | ( ((int) alpha) << 24 ) );
grConstantColorValue(fxColorValue); grConstantColorValue(fxColorValue);
@@ -327,7 +324,7 @@ int main( int argc, char **argv) {
} }
tlConOutput("LOD Bias is %f\n", fBiasLevel); tlConOutput("LOD Bias is %f\n", fBiasLevel);
} /* done with the Con output stuff */ } /* done with the Con output stuff */
/* do the Bg texture */ /* do the Bg texture */
if (bBgImage) if (bBgImage)
{ {
@@ -352,7 +349,7 @@ int main( int argc, char **argv) {
grDrawTriangle( &bgVerts[0], &bgVerts[1], &bgVerts[3] ); grDrawTriangle( &bgVerts[0], &bgVerts[1], &bgVerts[3] );
grDrawTriangle( &bgVerts[1], &bgVerts[2], &bgVerts[3] ); grDrawTriangle( &bgVerts[1], &bgVerts[2], &bgVerts[3] );
} /* done with Bg txtre */ } /* done with Bg txtre */
/* Setup the system for the Fg Texture */ /* Setup the system for the Fg Texture */
switch( mipMapMode ) switch( mipMapMode )
{ {
@@ -488,9 +485,9 @@ int main( int argc, char **argv) {
tlGetDimsByConst(resolution, tlGetDimsByConst(resolution,
&scrWidth, &scrWidth,
&scrHeight ); &scrHeight );
grClipWindow(0, 0, (FxU32) scrWidth, (FxU32) scrHeight); grClipWindow(0, 0, (FxU32) scrWidth, (FxU32) scrHeight);
} }
/* handle any keyboard input */ /* handle any keyboard input */
while( tlKbHit() ) while( tlKbHit() )
@@ -499,7 +496,7 @@ int main( int argc, char **argv) {
{ {
static int nCurrAlpha = -1; static int nCurrAlpha = -1;
GrTexInfo tFgTexInfo; GrTexInfo tFgTexInfo;
case '+': case '+':
doScaleScreenSurf( hCurrFgTxtre, SCALE_OUT, tCurrScle ); doScaleScreenSurf( hCurrFgTxtre, SCALE_OUT, tCurrScle );
getFgVerts( hCurrFgTxtre, &fgVerts[0] ); getFgVerts( hCurrFgTxtre, &fgVerts[0] );
@@ -513,25 +510,25 @@ int main( int argc, char **argv) {
case 'a': case 'a':
tlConClear(); tlConClear();
bVerboseMode = FXFALSE; bVerboseMode = FXFALSE;
tlConOutput("Verbose mode Off\n"); tlConOutput("Verbose mode Off\n");
nCurrAlpha = (nCurrAlpha == 0) ? 0 : nCurrAlpha = (nCurrAlpha == 0) ? 0 :
(nCurrAlpha < 0) ? (int) alpha-1: --nCurrAlpha; (nCurrAlpha < 0) ? (int) alpha-1: nCurrAlpha-1;
fxColorValue = ( 0x00FFFFFF | (nCurrAlpha << 24) ); fxColorValue = ( 0x00FFFFFF | (nCurrAlpha << 24) );
grConstantColorValue(fxColorValue); grConstantColorValue(fxColorValue);
tlConOutput("Current fxColorValue is %-#8x\n", fxColorValue); tlConOutput("Current fxColorValue is %-#8x\n", fxColorValue);
break; break;
case 'A': case 'A':
tlConClear(); tlConClear();
bVerboseMode = FXFALSE; bVerboseMode = FXFALSE;
tlConOutput("Verbose mode Off\n"); tlConOutput("Verbose mode Off\n");
nCurrAlpha = (nCurrAlpha == 255) ? 255 : nCurrAlpha = (nCurrAlpha == 255) ? 255 :
(nCurrAlpha < 0) ? (int) alpha+1: ++nCurrAlpha; (nCurrAlpha < 0) ? (int) alpha+1: nCurrAlpha+1;
fxColorValue = ( 0x00FFFFFF | (nCurrAlpha << 24) ); fxColorValue = ( 0x00FFFFFF | (nCurrAlpha << 24) );
grConstantColorValue(fxColorValue); grConstantColorValue(fxColorValue);
tlConOutput("Current fxColorValue is %-#8x\n", fxColorValue); tlConOutput("Current fxColorValue is %-#8x\n", fxColorValue);
break; break;
case 'b': case 'b':
mipMapMode++; mipMapMode++;
mipMapMode%=5; mipMapMode%=5;
@@ -559,7 +556,7 @@ int main( int argc, char **argv) {
case 'd': case 'd':
tlConClear(); tlConClear();
bVerboseMode = FXFALSE; bVerboseMode = FXFALSE;
tlConOutput("Verbose mode Off\n"); tlConOutput("Verbose mode Off\n");
plTxMnSetMultiOffsetFix( plTxMnGetMultiOffsetFix() ? FXFALSE : FXTRUE ); plTxMnSetMultiOffsetFix( plTxMnGetMultiOffsetFix() ? FXFALSE : FXTRUE );
tlConOutput( plTxMnGetMultiOffsetFix() ? "Multibase offset fix in\n" : tlConOutput( plTxMnGetMultiOffsetFix() ? "Multibase offset fix in\n" :
"Multibase offset fix NOT\n"); "Multibase offset fix NOT\n");
@@ -569,7 +566,7 @@ int main( int argc, char **argv) {
case 'D': case 'D':
tlConClear(); tlConClear();
bVerboseMode = FXFALSE; bVerboseMode = FXFALSE;
tlConOutput("Verbose mode Off\n"); tlConOutput("Verbose mode Off\n");
plTxMnSetMultiRevOrder( plTxMnGetMultiRevOrder() ? FXFALSE : FXTRUE ); plTxMnSetMultiRevOrder( plTxMnGetMultiRevOrder() ? FXFALSE : FXTRUE );
tlConOutput( plTxMnGetMultiRevOrder() ? "Multibase in rev order\n" : tlConOutput( plTxMnGetMultiRevOrder() ? "Multibase in rev order\n" :
"Multibase in linear order\n"); "Multibase in linear order\n");
@@ -700,7 +697,7 @@ int main( int argc, char **argv) {
hCurrFgTxtre = hFstFgTxtre; hCurrFgTxtre = hFstFgTxtre;
else else
++hCurrFgTxtre; ++hCurrFgTxtre;
getFgVerts( hCurrFgTxtre, &fgVerts[0] ); getFgVerts( hCurrFgTxtre, &fgVerts[0] );
break; break;
@@ -843,7 +840,7 @@ doLoadTexture( const char *lpzFileName, GrTexInfo *tEtTexInfo,
lpTmpTexInfo->aspectRatio)); lpTmpTexInfo->aspectRatio));
ret = modf((double) lpSurfInfo->fEndX, &dNonFrac); ret = modf((double) lpSurfInfo->fEndX, &dNonFrac);
lpSurfInfo->rEndX = (float) dNonFrac; lpSurfInfo->rEndX = (float) dNonFrac;
lpSurfInfo->fStartY = lpSurfInfo->fStartY =
((scrHeight - (float) getLodHeight(lpSurfInfo->currLod, ((scrHeight - (float) getLodHeight(lpSurfInfo->currLod,
lpTmpTexInfo->aspectRatio) )/2.f); lpTmpTexInfo->aspectRatio) )/2.f);
@@ -867,7 +864,6 @@ doLoadTexture( const char *lpzFileName, GrTexInfo *tEtTexInfo,
} }
static void static void
getFgVerts( hTexId_t deTexId, GrVertex *deFgVerts ) getFgVerts( hTexId_t deTexId, GrVertex *deFgVerts )
{ {
@@ -880,7 +876,7 @@ getFgVerts( hTexId_t deTexId, GrVertex *deFgVerts )
/* assumptions */ /* assumptions */
assert( deTexId < NUMTEXTURES ); assert( deTexId < NUMTEXTURES );
assert( deFgVerts ); assert( deFgVerts );
/* parse the texture array for the right one */ /* parse the texture array for the right one */
for ( i = 0; (i < NUMTEXTURES) && (theTextures[i].hTexture != deTexId) ; ++i ); for ( i = 0; (i < NUMTEXTURES) && (theTextures[i].hTexture != deTexId) ; ++i );
if (i == NUMTEXTURES) if (i == NUMTEXTURES)
@@ -920,14 +916,13 @@ getFgVerts( hTexId_t deTexId, GrVertex *deFgVerts )
} }
static void static void
doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt ) doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt )
{ {
/* definitions */ /* definitions */
myTexture_t *lpTmpMyTxtre; myTexture_t *lpTmpMyTxtre;
surfInfo_t *lpSurfInfo; surfInfo_t *lpSurfInfo;
GrTexInfo *lpTexInfo; GrTexInfo *lpTexInfo;
int i; int i;
int nNumScles; int nNumScles;
float fScleAmt; float fScleAmt;
@@ -935,7 +930,7 @@ doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt
GrAspectRatio_t tCurrAspct; GrAspectRatio_t tCurrAspct;
double dNonFrac, ret; double dNonFrac, ret;
const float fScleLCD = 32.f; //least common scale denominator const float fScleLCD = 32.f; //least common scale denominator
/* assumptions */ /* assumptions */
assert( deTexId < NUMTEXTURES ); assert( deTexId < NUMTEXTURES );
@@ -948,10 +943,10 @@ doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt
lpTmpMyTxtre = &theTextures[i]; lpTmpMyTxtre = &theTextures[i];
lpSurfInfo = &lpTmpMyTxtre->surfInfo; lpSurfInfo = &lpTmpMyTxtre->surfInfo;
lpTexInfo = &lpTmpMyTxtre->lpTlTexture->info; lpTexInfo = &lpTmpMyTxtre->lpTlTexture->info;
if ((lpSurfInfo->currLod == GR_LOD_1) && (deScleDir == SCALE_IN)) if ((lpSurfInfo->currLod == GR_LOD_1) && (deScleDir == SCALE_IN))
return; return;
if ((lpSurfInfo->currLod >= GR_LOD_32) && (deScleAmt > SCALE_8)) if ((lpSurfInfo->currLod >= GR_LOD_32) && (deScleAmt > SCALE_8))
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 */ /* scale by a frac of the next LOD your are scaling to */
tLodToScle = lpSurfInfo->currLod +1; tLodToScle = lpSurfInfo->currLod +1;
tCurrAspct = lpTexInfo->aspectRatio; /* ease of read */ tCurrAspct = lpTexInfo->aspectRatio; /* ease of read */
fScleAmt = 0.0f; /* init then go */ fScleAmt = 0.0f; /* init then go */
for ( i = 0; i < nNumScles; ++i) 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 */ if ( !((deScleDir == SCALE_OUT) && /* is there somtin' to do */
(getLodWidth(tLodToScle, tCurrAspct) == getLodWidth(tLodToScle -1, tCurrAspct)))) (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); (ret > 0.5f ? 1.0f : ret == 0.0f ? 0.0f : 0.5f);
} }
if ( !((deScleDir == SCALE_OUT) && /* is there somtin' to do */ if ( !((deScleDir == SCALE_OUT) && /* is there somtin' to do */
(getLodHeight(tLodToScle, tCurrAspct) == getLodHeight(tLodToScle -1, tCurrAspct)))) (getLodHeight(tLodToScle, tCurrAspct) == getLodHeight(tLodToScle -1, tCurrAspct))))
{ {
fScleAmt = ((float) getLodHeight(tLodToScle, tCurrAspct)) / fScleLCD / 2.f; fScleAmt = ((float) getLodHeight(tLodToScle, tCurrAspct)) / fScleLCD / 2.f;
lpSurfInfo->fStartY += deScleDir * fScleAmt; lpSurfInfo->fStartY += deScleDir * fScleAmt;
ret = modf((double) lpSurfInfo->fStartY, &dNonFrac); ret = modf((double) lpSurfInfo->fStartY, &dNonFrac);
lpSurfInfo->rStartY = (float) dNonFrac + lpSurfInfo->rStartY = (float) dNonFrac +
@@ -1031,7 +1023,6 @@ doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deScleDir, ScaleAmt_t deScleAmt
} /* doScaleScreenSurf */ } /* doScaleScreenSurf */
static int static int
getLodWidth( GrLOD_t lod, GrAspectRatio_t aspect ) getLodWidth( GrLOD_t lod, GrAspectRatio_t aspect )
{ {
@@ -1046,7 +1037,6 @@ getLodWidth( GrLOD_t lod, GrAspectRatio_t aspect )
} }
static int static int
getLodHeight( GrLOD_t lod, GrAspectRatio_t aspect ) getLodHeight( GrLOD_t lod, GrAspectRatio_t aspect )
{ {
@@ -1061,7 +1051,6 @@ getLodHeight( GrLOD_t lod, GrAspectRatio_t aspect )
} }
static void static void
doUnloadTextures( ) doUnloadTextures( )
{ {
@@ -1075,7 +1064,6 @@ doUnloadTextures( )
} }
static void static void
getLodToDwnld( ) getLodToDwnld( )
{ {
@@ -1112,20 +1100,19 @@ getLodToDwnld( )
} }
static void static void
getLodPrtlToDwnld( ) getLodPrtlToDwnld( )
{ {
/* definitions */ /* definitions */
char ch; char ch;
int i; int i;
/* initializations */ /* initializations */
g_nLodToDwnld = 0x0; g_nLodToDwnld = 0x0;
g_bDoLodPrtlDwnld = FXFALSE; g_bDoLodPrtlDwnld = FXFALSE;
g_nLodPrtlFstRow = 0x0; g_nLodPrtlFstRow = 0x0;
g_nLodPrtlLstRow = 0x0; g_nLodPrtlLstRow = 0x0;
/* code */ /* code */
tlConClear(); tlConClear();
grBufferClear( 0, 0, 0 ); grBufferClear( 0, 0, 0 );
@@ -1173,7 +1160,7 @@ getLodPrtlToDwnld( )
tlConOutput(" %d\n", g_nLodPrtlLstRow); tlConOutput(" %d\n", g_nLodPrtlLstRow);
tlConRender(); tlConRender();
grBufferSwap( 1 ); grBufferSwap( 1 );
if (((g_nLodPrtlFstRow >= 0x0) && (g_nLodPrtlFstRow < 0x100)) && if (((g_nLodPrtlFstRow >= 0x0) && (g_nLodPrtlFstRow < 0x100)) &&
((g_nLodPrtlLstRow >= 0x0) && (g_nLodPrtlLstRow < 0x100))) ((g_nLodPrtlLstRow >= 0x0) && (g_nLodPrtlLstRow < 0x100)))
g_bDoLodPrtlDwnld = FXTRUE; g_bDoLodPrtlDwnld = FXTRUE;
@@ -1182,19 +1169,18 @@ getLodPrtlToDwnld( )
} }
else else
tlConOutput("invalid LOD\n"); tlConOutput("invalid LOD\n");
tlConRender(); tlConRender();
grBufferSwap( 1 ); grBufferSwap( 1 );
} }
static void static void
doResetFgVerts( hTexId_t deTexId ) doResetFgVerts( hTexId_t deTexId )
{ {
/* definitions */ /* definitions */
surfInfo_t *lpSurfInfo; surfInfo_t *lpSurfInfo;
GrTexInfo *lpTexInfo; GrTexInfo *lpTexInfo;
int i; int i;
double ret, dNonFrac; double ret, dNonFrac;
@@ -1222,7 +1208,7 @@ doResetFgVerts( hTexId_t deTexId )
lpTexInfo->aspectRatio)); lpTexInfo->aspectRatio));
ret = modf((double) lpSurfInfo->fEndX, &dNonFrac); ret = modf((double) lpSurfInfo->fEndX, &dNonFrac);
lpSurfInfo->rEndX = (float) dNonFrac; lpSurfInfo->rEndX = (float) dNonFrac;
lpSurfInfo->fStartY = lpSurfInfo->fStartY =
((scrHeight - (float) getLodHeight(lpSurfInfo->currLod, ((scrHeight - (float) getLodHeight(lpSurfInfo->currLod,
lpTexInfo->aspectRatio) )/2.f); lpTexInfo->aspectRatio) )/2.f);

View File

@@ -18,16 +18,10 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Revision$
** $Date$
**
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@@ -86,7 +80,7 @@ int main( int argc, char **argv)
/* Code */ /* Code */
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) { while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
if ( rv == -1 ) { if ( rv == -1 ) {
printf( "Unrecognized command line argument\n" ); printf( "Unrecognized command line argument\n" );
printf( "%s %s\n", name, usage ); printf( "%s %s\n", name, usage );

View File

@@ -16,18 +16,10 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
**
** $Revision$
** $Date$
**
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@@ -56,13 +48,13 @@ main( int argc, char **argv)
char filename[256]; char filename[256];
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while(( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) )) { while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
if ( rv == -1 ) { if ( rv == -1 ) {
printf( "Unrecognized command line argument\n" ); printf( "Unrecognized command line argument\n" );
printf( "%s %s\n", name, usage ); printf( "%s %s\n", name, usage );
printf( "Available resolutions:\n%s\n", printf( "Available resolutions:\n%s\n",
tlGetResolutionList() ); tlGetResolutionList() );
exit(1); return -1;
} }
switch( match ) { switch( match ) {
case 'n': case 'n':
@@ -132,6 +124,6 @@ main( int argc, char **argv)
} }
grGlideShutdown(); grGlideShutdown();
exit(0); return 0;
} }

View File

@@ -21,9 +21,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@@ -52,13 +49,13 @@ main( int argc, char **argv) {
char filename[256]; char filename[256];
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) { while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
if ( rv == -1 ) { if ( rv == -1 ) {
printf( "Unrecognized command line argument\n" ); printf( "Unrecognized command line argument\n" );
printf( "%s %s\n", name, usage ); printf( "%s %s\n", name, usage );
printf( "Available resolutions:\n%s\n", printf( "Available resolutions:\n%s\n",
tlGetResolutionList() ); tlGetResolutionList() );
exit(1); return -1;
} }
switch( match ) { switch( match ) {
case 'n': case 'n':
@@ -148,7 +145,7 @@ main( int argc, char **argv) {
} }
grGlideShutdown(); grGlideShutdown();
exit(0); return 0;
} }

View File

@@ -21,9 +21,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@@ -51,13 +48,13 @@ int main( int argc, char **argv) {
char filename[256]; char filename[256];
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) { while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
if ( rv == -1 ) { if ( rv == -1 ) {
printf( "Unrecognized command line argument\n" ); printf( "Unrecognized command line argument\n" );
printf( "%s %s\n", name, usage ); printf( "%s %s\n", name, usage );
printf( "Available resolutions:\n%s\n", printf( "Available resolutions:\n%s\n",
tlGetResolutionList() ); tlGetResolutionList() );
exit(1); return -1;
} }
switch( match ) { switch( match ) {
case 'n': case 'n':
@@ -110,7 +107,6 @@ int main( int argc, char **argv) {
FXFALSE ); FXFALSE );
grConstantColorValue( 0xFFFFFF ); grConstantColorValue( 0xFFFFFF );
tlConOutput( "Press a key to quit\n" ); tlConOutput( "Press a key to quit\n" );
while( frames-- && tlOkToRender()) { while( frames-- && tlOkToRender()) {
int i; int i;
@@ -150,10 +146,5 @@ int main( int argc, char **argv) {
} }
grGlideShutdown(); grGlideShutdown();
exit(0); return 0;
} }

View File

@@ -21,9 +21,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@@ -51,13 +48,13 @@ int main( int argc, char **argv) {
char filename[256]; char filename[256];
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) { while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
if ( rv == -1 ) { if ( rv == -1 ) {
printf( "Unrecognized command line argument\n" ); printf( "Unrecognized command line argument\n" );
printf( "%s %s\n", name, usage ); printf( "%s %s\n", name, usage );
printf( "Available resolutions:\n%s\n", printf( "Available resolutions:\n%s\n",
tlGetResolutionList() ); tlGetResolutionList() );
exit(1); return -1;
} }
switch( match ) { switch( match ) {
case 'n': case 'n':
@@ -145,7 +142,7 @@ int main( int argc, char **argv) {
} }
grGlideShutdown(); grGlideShutdown();
exit(0); return 0;
} }

View File

@@ -21,9 +21,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@@ -51,13 +48,13 @@ int main( int argc, char **argv) {
char filename[256]; char filename[256];
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) { while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
if ( rv == -1 ) { if ( rv == -1 ) {
printf( "Unrecognized command line argument\n" ); printf( "Unrecognized command line argument\n" );
printf( "%s %s\n", name, usage ); printf( "%s %s\n", name, usage );
printf( "Available resolutions:\n%s\n", printf( "Available resolutions:\n%s\n",
tlGetResolutionList() ); tlGetResolutionList() );
exit(1); return -1;
} }
switch( match ) { switch( match ) {
case 'n': case 'n':
@@ -148,7 +145,7 @@ int main( int argc, char **argv) {
} }
grGlideShutdown(); grGlideShutdown();
exit(0); return 0;
} }

View File

@@ -21,9 +21,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@@ -53,13 +50,13 @@ main( int argc, char **argv)
char filename[256]; char filename[256];
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) { while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
if ( rv == -1 ) { if ( rv == -1 ) {
printf( "Unrecognized command line argument\n" ); printf( "Unrecognized command line argument\n" );
printf( "%s %s\n", name, usage ); printf( "%s %s\n", name, usage );
printf( "Available resolutions:\n%s\n", printf( "Available resolutions:\n%s\n",
tlGetResolutionList() ); tlGetResolutionList() );
exit(1); return -1;
} }
switch( match ) { switch( match ) {
case 'n': case 'n':
@@ -182,10 +179,6 @@ main( int argc, char **argv)
} }
grGlideShutdown(); grGlideShutdown();
exit(0); return 0;
} }

View File

@@ -21,9 +21,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@@ -51,13 +48,13 @@ int main( int argc, char **argv) {
char filename[256]; char filename[256];
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) { while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
if ( rv == -1 ) { if ( rv == -1 ) {
printf( "Unrecognized command line argument\n" ); printf( "Unrecognized command line argument\n" );
printf( "%s %s\n", name, usage ); printf( "%s %s\n", name, usage );
printf( "Available resolutions:\n%s\n", printf( "Available resolutions:\n%s\n",
tlGetResolutionList() ); tlGetResolutionList() );
exit(1); return -1;
} }
switch( match ) { switch( match ) {
case 'n': case 'n':
@@ -179,7 +176,7 @@ int main( int argc, char **argv) {
} }
grGlideShutdown(); grGlideShutdown();
exit(0); return 0;
} }

View File

@@ -1,5 +1,4 @@
/* /*
**
** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY ** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT ** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX ** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
@@ -21,9 +20,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef __linux__
#include <conio.h>
#endif
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@@ -51,13 +47,13 @@ int main( int argc, char **argv) {
char filename[256]; char filename[256];
/* Process Command Line Arguments */ /* Process Command Line Arguments */
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) { while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
if ( rv == -1 ) { if ( rv == -1 ) {
printf( "Unrecognized command line argument\n" ); printf( "Unrecognized command line argument\n" );
printf( "%s %s\n", name, usage ); printf( "%s %s\n", name, usage );
printf( "Available resolutions:\n%s\n", printf( "Available resolutions:\n%s\n",
tlGetResolutionList() ); tlGetResolutionList() );
exit(1); return -1;
} }
switch( match ) { switch( match ) {
case 'n': case 'n':
@@ -162,7 +158,7 @@ int main( int argc, char **argv) {
} }
grGlideShutdown(); grGlideShutdown();
exit(0); return 0;
} }

Some files were not shown because too many files have changed in this diff Show More