revert to old driver (ugly tree, will fix that later)
This commit is contained in:
3
glide3x/.cvsignore
Normal file
3
glide3x/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
makefile.autoconf.in
|
||||
aclocal.m4
|
||||
configure
|
||||
@@ -1,9 +1,12 @@
|
||||
# DOS / DJGPP makefile for Glide3 and Texus2
|
||||
# DOS/DJGPP makefile for Glide3 and Texus2
|
||||
#
|
||||
# Copyright (c) 2003 - Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
@@ -16,7 +19,7 @@
|
||||
# default = no
|
||||
# OPTFLAGS pass given optimization flags to compiler
|
||||
# target = sst1, sst96, cvg, h3, h5
|
||||
# default = -O2 -ffast-math (+ -mcpu=pentium if USE_X86=1)
|
||||
# default = -O2 -ffast-math
|
||||
# DEBUG=1 enable debugging checks and messages
|
||||
# target = sst1, sst96, cvg, h3, h5
|
||||
# default = no
|
||||
@@ -48,6 +51,7 @@
|
||||
#
|
||||
|
||||
|
||||
|
||||
.PHONY: all clean realclean
|
||||
|
||||
export BUILD_NUMBER = 40404
|
||||
@@ -61,7 +65,6 @@ endif
|
||||
|
||||
all:
|
||||
make -f Makefile.DJ -C $(G3_DIR)
|
||||
# USE_X86=1 USE_3DNOW=1 USE_MMX=1 USE_SSE=1 USE_SSE2=1
|
||||
|
||||
clean:
|
||||
make -f Makefile.DJ -C $(G3_DIR) clean
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
# DGA=1 Build DGA version (experimental).
|
||||
# target = h3, h5
|
||||
# default = no
|
||||
# XPATH specify X11 path; needed by SST96, and H3/H5 DRI and DGA.
|
||||
# default = /usr/X11R6
|
||||
# X11LIBS X libraries path; default = $(XPATH)/lib
|
||||
# XPATH specify X libraries path; needed by DRI and DGA.
|
||||
# target = h3, h5
|
||||
# default = /usr/X11R6/lib
|
||||
# H4=1 High speed Avenger/Napalm.
|
||||
# target = h3, h5
|
||||
# default = no
|
||||
@@ -73,10 +73,10 @@ G3_DIR = $(FX_GLIDE_HW)/glide3/src
|
||||
endif
|
||||
|
||||
all:
|
||||
make -f Makefile.linux -C $(G3_DIR)
|
||||
make -f makefile.linux -C $(G3_DIR)
|
||||
|
||||
clean:
|
||||
make -f Makefile.linux -C $(G3_DIR) clean
|
||||
make -f makefile.linux -C $(G3_DIR) clean
|
||||
|
||||
realclean:
|
||||
make -f Makefile.linux -C $(G3_DIR) realclean
|
||||
make -f makefile.linux -C $(G3_DIR) realclean
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
# Win32 makefile for Glide3 and Texus2, 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, h5).
|
||||
# default = h5
|
||||
# H4=1 High speed Avenger/Napalm.
|
||||
# target = h3, h5
|
||||
# default = no
|
||||
# OPTFLAGS pass given optimization flags to compiler
|
||||
# target = sst1, sst96, cvg, h3, h5
|
||||
# default = -O2 -ffast-math -mtune=pentium
|
||||
# DEBUG=1 enable debugging checks and messages
|
||||
# target = sst1, sst96, cvg, h3, h5
|
||||
# default = no
|
||||
# USE_X86=1 use assembler triangle specializations; req by CVG
|
||||
# target = sst1, sst96, cvg, h3, h5
|
||||
# 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, h5
|
||||
# default = no
|
||||
# USE_MMX=1 (see USE_3DNOW)
|
||||
# target = h5
|
||||
# default = no
|
||||
# USE_SSE=1 (see USE_3DNOW)
|
||||
# target = h5
|
||||
# default = no
|
||||
# USE_SSE2=1 (see USE_3DNOW)
|
||||
# target = h5
|
||||
# default = no
|
||||
# TEXUS2=1 embed Texus2 functions into Glide3.
|
||||
# target = sst1, sst96, cvg, h3, h5
|
||||
# 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 ?= h5
|
||||
|
||||
ifeq ($(FX_GLIDE_HW),sst96)
|
||||
G3_DIR = sst1/glide3/src
|
||||
else
|
||||
G3_DIR = $(FX_GLIDE_HW)/glide3/src
|
||||
endif
|
||||
|
||||
all:
|
||||
make -f Makefile.mingw -C $(G3_DIR)
|
||||
# USE_X86=1 USE_3DNOW=1 USE_MMX=1 USE_SSE=1 USE_SSE2=1
|
||||
|
||||
clean:
|
||||
make -f Makefile.mingw -C $(G3_DIR) clean
|
||||
|
||||
realclean:
|
||||
make -f Makefile.mingw -C $(G3_DIR) realclean
|
||||
@@ -1,12 +1,13 @@
|
||||
# DOS / OpenWatcom makefile for Glide3 and Texus2
|
||||
# OpenWatcom makefile for Glide3 and Texus2
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
# Building under native DOS is not supported:
|
||||
# only tested under Win32 or Linux
|
||||
#
|
||||
# Copyright (c) 2003 - Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
@@ -50,6 +51,8 @@
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
|
||||
|
||||
.PHONY: all clean realclean
|
||||
|
||||
export BUILD_NUMBER = 40404
|
||||
@@ -63,7 +66,6 @@ endif
|
||||
|
||||
all:
|
||||
make -f Makefile.wat -C $(G3_DIR)
|
||||
# USE_X86=1 USE_3DNOW=1 USE_MMX=1 USE_SSE=1 USE_SSE2=1
|
||||
|
||||
clean:
|
||||
make -f Makefile.wat -C $(G3_DIR) clean
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Win32 makefile for Glide3 and Texus2, using Visual Studio (cl.exe)
|
||||
# Win32 makefile for Glide3 and Texus2
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2003 - Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
@@ -49,6 +52,7 @@
|
||||
#
|
||||
|
||||
|
||||
|
||||
.PHONY: all clean realclean
|
||||
|
||||
export BUILD_NUMBER = 40404
|
||||
@@ -62,7 +66,6 @@ endif
|
||||
|
||||
all:
|
||||
make -f Makefile.win32 -C $(G3_DIR)
|
||||
# USE_X86=1 USE_3DNOW=1 USE_MMX=1 USE_SSE=1 USE_SSE2=1
|
||||
|
||||
clean:
|
||||
make -f Makefile.win32 -C $(G3_DIR) clean
|
||||
|
||||
144
glide3x/README
144
glide3x/README
@@ -1,124 +1,30 @@
|
||||
Glide3x (dec-2004):
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
Here are a few notes about building Glide3x from CVS.
|
||||
|
||||
sst1: Voodoo Graphics XOR Voodoo Rush
|
||||
Maintainers: Daniel Borca
|
||||
1.) Top Level Source Organization
|
||||
The Glide source trees are branched by platform. The platform
|
||||
names are internal names used at 3dfx. Since these names may not
|
||||
make sense to others here is a quick list.
|
||||
|
||||
Voodoo Graphics:
|
||||
----------------
|
||||
sst1: Voodoo Graphics
|
||||
sst96: Voodoo Rush
|
||||
cvg: Voodoo 2
|
||||
h3: Voodoo Banshee/Voodoo 3
|
||||
h5: The VSA-100 chip set used in the Voodoo4 and Voodoo5
|
||||
line of products.
|
||||
|
||||
DOS/DJGPP working
|
||||
Req: DJGPP 2.04
|
||||
Build: make -f Makefile.DJ FX_GLIDE_HW=sst1 [...]
|
||||
2.) The New Way of getting Glide from CVS.
|
||||
There is now a CVS module to get glide3 named Glide3. If you get
|
||||
this, you will get everything you need. All of the relevant
|
||||
projects, cvs, h3 and h5, are included, as well as swlibs.
|
||||
|
||||
DOS/OpenWatcom working
|
||||
Req: OpenWatcom 1.2
|
||||
Build: make -f Makefile.wat FX_GLIDE_HW=sst1 [...]
|
||||
3.) The Old Way of getting Glide from CVS.
|
||||
The top level module needed are glide3x and swlibs. The glide3x
|
||||
module has only the glide code, without swlibs.
|
||||
|
||||
Linux working
|
||||
Req: gcc
|
||||
Build: make -f Makefile.linux FX_GLIDE_HW=sst1 [...]
|
||||
|
||||
Win32 working
|
||||
Req: MSVC6 (cl 12.00.8168, link 6.00.8168)
|
||||
Build: make -f Makefile.win32 FX_GLIDE_HW=sst1 [...]
|
||||
|
||||
Voodoo Rush (AT3D / Macronix):
|
||||
-----------------------------
|
||||
|
||||
DOS/DJGPP working
|
||||
Req: DJGPP 2.04
|
||||
Build: make -f Makefile.DJ FX_GLIDE_HW=sst96 [...]
|
||||
|
||||
DOS/OpenWatcom working
|
||||
Req: OpenWatcom 1.2
|
||||
Build: make -f Makefile.wat FX_GLIDE_HW=sst96 [...]
|
||||
|
||||
Linux compiles, but seems to be broken...
|
||||
Req: gcc
|
||||
Build: make -f Makefile.linux FX_GLIDE_HW=sst96 [...]
|
||||
|
||||
Win32 working
|
||||
Req: MSVC6 (cl 12.00.8168, link 6.00.8168)
|
||||
Build: make -f Makefile.win32 FX_GLIDE_HW=sst96 [...]
|
||||
|
||||
|
||||
cvg: Voodoo^2
|
||||
Maintainers: Daniel Borca, Hiroshi Morii
|
||||
|
||||
Voodoo^2:
|
||||
---------
|
||||
|
||||
DOS/DJGPP working
|
||||
Req: DJGPP 2.04
|
||||
Build: make -f Makefile.DJ FX_GLIDE_HW=cvg [...]
|
||||
|
||||
DOS/OpenWatcom working
|
||||
Req: OpenWatcom 1.2
|
||||
Build: make -f Makefile.wat FX_GLIDE_HW=cvg [...]
|
||||
|
||||
Linux working
|
||||
Req: gcc
|
||||
Build: make -f Makefile.linux FX_GLIDE_HW=cvg [...]
|
||||
|
||||
Win32 working
|
||||
Req: MSVC6 (cl 12.00.8168, link 6.00.8168)
|
||||
Build: make -f Makefile.win32 FX_GLIDE_HW=cvg [...]
|
||||
|
||||
|
||||
h3: Voodoo Banshee, Voodoo3
|
||||
Maintainers: Daniel Borca, Guillem Jover
|
||||
|
||||
Voodoo Banshee, Voodoo3:
|
||||
------------------------
|
||||
|
||||
DOS/DJGPP working
|
||||
Req: DJGPP 2.04
|
||||
Build: make -f Makefile.DJ FX_GLIDE_HW=h3 [...]
|
||||
|
||||
DOS/OpenWatcom working
|
||||
Req: OpenWatcom 1.2
|
||||
Build: make -f Makefile.wat FX_GLIDE_HW=h3 [...]
|
||||
|
||||
Linux DRI working, DGA seems to be broken, CINIT broken
|
||||
Req: gcc
|
||||
Build: make -f Makefile.linux FX_GLIDE_HW=h3 [...]
|
||||
|
||||
Win32 working
|
||||
Req: MSVC6 (cl 13.00.9176, link 7.00.9210), 2KDDK?
|
||||
Build: make -f Makefile.win32 FX_GLIDE_HW=h3 [...]
|
||||
|
||||
|
||||
h5: Voodoo Banshee, Velocity 100/200, Voodoo3/4/5
|
||||
Maintainers: Hiroshi Morii, Daniel Borca, Guillem Jover
|
||||
|
||||
Voodoo Banshee, Velocity 100/200, Voodoo3/4/5:
|
||||
----------------------------------------------
|
||||
|
||||
DOS/DJGPP working
|
||||
Req: DJGPP 2.04
|
||||
Build: make -f Makefile.DJ FX_GLIDE_HW=h5 [...]
|
||||
|
||||
DOS/OpenWatcom working
|
||||
Req: OpenWatcom 1.2
|
||||
Build: make -f Makefile.wat FX_GLIDE_HW=h5 [...]
|
||||
|
||||
Linux DRI working, DGA seems to be broken, CINIT broken
|
||||
Req: gcc
|
||||
Build: make -f Makefile.linux FX_GLIDE_HW=h5 [...]
|
||||
|
||||
Win32 working
|
||||
Req: MSVC6 (cl 13.00.9176, link 7.00.9210), 2KDDK?
|
||||
Build: make -f Makefile.win32 FX_GLIDE_HW=h5 [...]
|
||||
|
||||
|
||||
Notes:
|
||||
1) All systems require nasm 0.98.38 and GNU make 3.80.
|
||||
2) grDrawPoint has type-punning problems (optimizations enabled) in
|
||||
sst1, sst96, cvg and h3 branches.
|
||||
3) V1 library cannot be used with VR (and vice-versa). Hence the XOR...
|
||||
4) In order to build, swlibs directory must be copied under glide3x.
|
||||
|
||||
|
||||
Have fun,
|
||||
Daniel Borca
|
||||
All glide source trees use a common set of libraries kept in the
|
||||
swlibs branch. In order to build any glide library the swlibs
|
||||
branch must be moved inside the glide3x directory. The swlibs
|
||||
branch is not stored here within the glide3x cvs tree because it
|
||||
is also shared with the glide2x branch. N.B.: If you use the CVS
|
||||
module Glide3, swlibs will be in the right place, and does not
|
||||
need to be moved.
|
||||
|
||||
123
glide3x/README.2
Normal file
123
glide3x/README.2
Normal file
@@ -0,0 +1,123 @@
|
||||
Glide3x (dec-2004):
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
sst1: Voodoo Graphics XOR Voodoo Rush
|
||||
Maintainers: Daniel Borca
|
||||
|
||||
Voodoo Graphics:
|
||||
----------------
|
||||
|
||||
DOS/DJGPP working
|
||||
Req: DJGPP 2.04
|
||||
Build: make -f Makefile.DJ FX_GLIDE_HW=sst1 [...]
|
||||
|
||||
DOS/OpenWatcom working
|
||||
Req: OpenWatcom 1.2
|
||||
Build: make -f Makefile.wat FX_GLIDE_HW=sst1 [...]
|
||||
|
||||
Linux working
|
||||
Req: gcc
|
||||
Build: make -f makefile.linux FX_GLIDE_HW=sst1 [...]
|
||||
|
||||
Win32 working
|
||||
Req: MSVC6 (cl 12.00.8168, link 6.00.8168)
|
||||
Build: make -f Makefile.win32 FX_GLIDE_HW=sst1 [...]
|
||||
|
||||
Voodoo Rush AT3D:
|
||||
-----------------
|
||||
|
||||
DOS/DJGPP working
|
||||
Req: DJGPP 2.04
|
||||
Build: make -f Makefile.DJ FX_GLIDE_HW=sst96 [...]
|
||||
|
||||
DOS/OpenWatcom working
|
||||
Req: OpenWatcom 1.2
|
||||
Build: make -f Makefile.wat FX_GLIDE_HW=sst96 [...]
|
||||
|
||||
Linux compiles, but seems to be broken...
|
||||
Req: gcc
|
||||
Build: make -f makefile.linux FX_GLIDE_HW=sst96 [...]
|
||||
|
||||
Win32 working
|
||||
Req: MSVC6 (cl 12.00.8168, link 6.00.8168)
|
||||
Build: make -f Makefile.win32 FX_GLIDE_HW=sst96 [...]
|
||||
|
||||
|
||||
cvg: Voodoo^2
|
||||
Maintainers: Daniel Borca, Hiroshi Morii
|
||||
|
||||
Voodoo^2:
|
||||
---------
|
||||
|
||||
DOS/DJGPP working
|
||||
Req: DJGPP 2.04
|
||||
Build: make -f Makefile.DJ FX_GLIDE_HW=cvg [...]
|
||||
|
||||
DOS/OpenWatcom working
|
||||
Req: OpenWatcom 1.2
|
||||
Build: make -f Makefile.wat FX_GLIDE_HW=cvg [...]
|
||||
|
||||
Linux working
|
||||
Req: gcc
|
||||
Build: make -f makefile.linux FX_GLIDE_HW=cvg [...]
|
||||
|
||||
Win32 working
|
||||
Req: MSVC6 (cl 12.00.8168, link 6.00.8168)
|
||||
Build: make -f Makefile.win32 FX_GLIDE_HW=cvg [...]
|
||||
|
||||
|
||||
h3: Voodoo Banshee, Voodoo3
|
||||
Maintainers: Daniel Borca, Guillem Jover
|
||||
|
||||
Voodoo Banshee, Voodoo3:
|
||||
------------------------
|
||||
|
||||
DOS/DJGPP working
|
||||
Req: DJGPP 2.04
|
||||
Build: make -f Makefile.DJ FX_GLIDE_HW=h3 [...]
|
||||
|
||||
DOS/OpenWatcom working
|
||||
Req: OpenWatcom 1.2
|
||||
Build: make -f Makefile.wat FX_GLIDE_HW=h3 [...]
|
||||
|
||||
Linux DRI working, DGA seems to be broken, CINIT broken
|
||||
Req: gcc
|
||||
Build: make -f makefile.linux FX_GLIDE_HW=h3 [...]
|
||||
|
||||
Win32 working
|
||||
Req: MSVC6 (cl 13.00.9176, link 7.00.9210), 2KDDK?
|
||||
Build: make -f Makefile.win32 FX_GLIDE_HW=h3 [...]
|
||||
|
||||
|
||||
h5: Voodoo Banshee, Velocity 100/200, Voodoo3/4/5
|
||||
Maintainers: Hiroshi Morii, Daniel Borca, Guillem Jover
|
||||
|
||||
Voodoo Banshee, Velocity 100/200, Voodoo3/4/5:
|
||||
----------------------------------------------
|
||||
|
||||
DOS/DJGPP working
|
||||
Req: DJGPP 2.04
|
||||
Build: make -f Makefile.DJ FX_GLIDE_HW=h5 [...]
|
||||
|
||||
DOS/OpenWatcom working
|
||||
Req: OpenWatcom 1.2
|
||||
Build: make -f Makefile.wat FX_GLIDE_HW=h5 [...]
|
||||
|
||||
Linux DRI working, DGA seems to be broken, CINIT broken
|
||||
Req: gcc
|
||||
Build: make -f makefile.linux FX_GLIDE_HW=h5 [...]
|
||||
|
||||
Win32 working
|
||||
Req: MSVC6 (cl 13.00.9176, link 7.00.9210), 2KDDK?
|
||||
Build: make -f Makefile.win32 FX_GLIDE_HW=h5 [...]
|
||||
|
||||
|
||||
Notes:
|
||||
1) All systems require nasm 0.98.38 and GNU make 3.80.
|
||||
2) grDrawPoint has type-punning problems (optimizations enabled) in
|
||||
sst1, sst96, cvg and h3 branches.
|
||||
3) V1 library cannot be used with VR (and vice-versa). Hence the XOR...
|
||||
|
||||
|
||||
Have fun,
|
||||
Daniel Borca
|
||||
@@ -1,9 +0,0 @@
|
||||
#! /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=h5 realclean
|
||||
make -f Makefile.DJ FX_GLIDE_HW=sst1 realclean
|
||||
make -f Makefile.DJ FX_GLIDE_HW=sst96 realclean
|
||||
test -L swlibs && rm swlibs
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#! /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_MMX=1 USE_3DNOW=1 USE_SSE=1 USE_SSE2=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_MMX=1 USE_3DNOW=1 USE_SSE=1 USE_SSE2=1 CC=i586-pc-msdosdjgpp-gcc AR=i586-pc-msdosdjgpp-ar
|
||||
make -f Makefile.DJ FX_GLIDE_HW=h5 clean
|
||||
make -f Makefile.DJ FX_GLIDE_HW=h5 H4=1 USE_X86=1 USE_MMX=1 USE_3DNOW=1 USE_SSE=1 USE_SSE2=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_MMX=1 USE_3DNOW=1 USE_SSE=1 USE_SSE2=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_MMX=1 USE_3DNOW=1 USE_SSE=1 USE_SSE2=1 CC=i586-pc-msdosdjgpp-gcc AR=i586-pc-msdosdjgpp-ar
|
||||
1
glide3x/cvg/.cvsignore
Normal file
1
glide3x/cvg/.cvsignore
Normal file
@@ -0,0 +1 @@
|
||||
makefile.autoconf.in
|
||||
26
glide3x/cvg/bin/makefile.linux
Normal file
26
glide3x/cvg/bin/makefile.linux
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# 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.linux.mak
|
||||
26
glide3x/cvg/binsrc/makefile.linux
Normal file
26
glide3x/cvg/binsrc/makefile.linux
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# 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.linux.mak
|
||||
|
||||
1
glide3x/cvg/glide3/.cvsignore
Normal file
1
glide3x/cvg/glide3/.cvsignore
Normal file
@@ -0,0 +1 @@
|
||||
makefile.autoconf.in
|
||||
27
glide3x/cvg/glide3/makefile.linux
Normal file
27
glide3x/cvg/glide3/makefile.linux
Normal file
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# 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 = glide3
|
||||
SUBDIRS = src tests
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.linux.mak
|
||||
1
glide3x/cvg/glide3/src/.cvsignore
Normal file
1
glide3x/cvg/glide3/src/.cvsignore
Normal file
@@ -0,0 +1 @@
|
||||
makefile.autoconf.in
|
||||
@@ -4,13 +4,18 @@
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = cvg
|
||||
# OPTFLAGS pass given optimization flags to compiler
|
||||
# default = -O2 -ffast-math (+ -mtune=pentium if USE_X86=1)
|
||||
# default = -O2 -ffast-math
|
||||
# DEBUG=1 enable debugging checks and messages
|
||||
# default = no
|
||||
# USE_X86=1 use assembler triangle specializations; req by CVG
|
||||
@@ -33,6 +38,8 @@
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
|
||||
|
||||
.PHONY: all glide3x clean realclean
|
||||
.INTERMEDIATE: fxgasm.exe
|
||||
|
||||
@@ -40,11 +47,12 @@
|
||||
# general defines (user settable?)
|
||||
###############################################################################
|
||||
|
||||
GLIDE_LIB = libglide3x.a
|
||||
GLIDE_LIB = libgld3x.a
|
||||
GLIDE_DXE = glide3x.dxe
|
||||
GLIDE_IMP = libglide3i.a
|
||||
GLIDE_IMP = libgld3i.a
|
||||
TEXUS_EXE = texus2.exe
|
||||
|
||||
FX_GLIDE_HW ?= cvg
|
||||
FX_GLIDE_SW = ../../../swlibs
|
||||
GLIDE_LIBDIR = ../../lib
|
||||
TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
|
||||
@@ -56,12 +64,14 @@ TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
|
||||
CC = gcc
|
||||
AS = nasm
|
||||
AR = ar
|
||||
DXE3GEN = dxe3gen
|
||||
|
||||
#for cross-builds
|
||||
HOST_CC = gcc
|
||||
HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe)
|
||||
|
||||
UNLINK = rm -f $(1)
|
||||
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
|
||||
UNLINK = del $(subst /,\,$(1))
|
||||
else
|
||||
UNLINK = $(RM) $(1)
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# defines
|
||||
@@ -75,12 +85,6 @@ CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=0 -DG
|
||||
#CDEFS += -DGLIDE3_SCALER
|
||||
CDEFS += -DGLIDE_DISPATCH_SETUP -DGLIDE_DISPATCH_DOWNLOAD
|
||||
|
||||
# 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
|
||||
|
||||
@@ -89,8 +93,8 @@ ifdef DEBUG
|
||||
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
|
||||
endif
|
||||
|
||||
# shameless plug and splash screen
|
||||
#CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
|
||||
# other
|
||||
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
|
||||
|
||||
ifeq ($(TEXUS2),1)
|
||||
CDEFS += -DHAVE_TEXUS2
|
||||
@@ -104,11 +108,11 @@ endif
|
||||
ARFLAGS = rus
|
||||
|
||||
# assembler
|
||||
ASFLAGS = -O2 -fcoff -D__DJGPP__ --prefix _
|
||||
ASFLAGS = -O6 -fcoff -D__DJGPP__ --prefix _
|
||||
ASFLAGS += $(CDEFS)
|
||||
|
||||
# compiler
|
||||
CFLAGS = -Wall
|
||||
CFLAGS = -Wall -W
|
||||
CFLAGS += -I. -I../../incsrc -I../../init
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib
|
||||
@@ -126,18 +130,15 @@ endif
|
||||
|
||||
ifeq ($(USE_X86),1)
|
||||
CFLAGS += -DGL_X86
|
||||
OPTFLAGS ?= -O1 -ffast-math -mtune=pentium
|
||||
OPTFLAGS ?= -O2 -ffast-math
|
||||
else
|
||||
CFLAGS += -DGLIDE_USE_C_TRISETUP
|
||||
OPTFLAGS ?= -O1 -ffast-math
|
||||
OPTFLAGS ?= -O2 -ffast-math
|
||||
endif
|
||||
|
||||
# optflags
|
||||
CFLAGS += $(OPTFLAGS)
|
||||
|
||||
# for cross-builds
|
||||
HOST_CFLAGS=$(filter-out -mcpu=% -mtune=% -march=%,$(CFLAGS))
|
||||
|
||||
###############################################################################
|
||||
# objects
|
||||
###############################################################################
|
||||
@@ -173,7 +174,7 @@ GLIDE_OBJECTS += \
|
||||
xdraw3_def.o
|
||||
ifeq ($(USE_MMX),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xtexdl_mmx.o
|
||||
xtexdl_mmx.obj
|
||||
endif
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
GLIDE_OBJECTS += \
|
||||
@@ -251,11 +252,15 @@ $(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 _tx -U $^
|
||||
ifeq ($(HAVEDXE3),)
|
||||
$(warning Missing DXE3 package... Skipping $(GLIDE_DXE))
|
||||
else
|
||||
-dxe3gen -o $(GLIDE_LIBDIR)/$(GLIDE_DXE) -Y $(GLIDE_LIBDIR)/$(GLIDE_IMP) -D "Glide3(cvg) DJGPP" -E _gr -E _gu -E _tx -U $^
|
||||
endif
|
||||
|
||||
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
ifeq ($(TEXUS2),1)
|
||||
$(CC) -o $@ -s $(CFLAGS) -L$(GLIDE_LIBDIR) $< -lglide3x
|
||||
$(CC) -o $@ -s $(CFLAGS) -L$(GLIDE_LIBDIR) $< -lgld3x
|
||||
else
|
||||
$(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
|
||||
endif
|
||||
@@ -272,7 +277,7 @@ xdraw3_def.o: xdraw3.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xtexdl_def.o: xtexdl.c
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
xtexdl_mmx.o: xtexdl.asm
|
||||
xtexdl_mmx.obj: xtexdl.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_MMX=1 $<
|
||||
xdraw2_3dnow.o: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
@@ -283,21 +288,14 @@ xtexdl_3dnow.o: xtexdl.asm
|
||||
|
||||
$(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 > $@
|
||||
$< -inline > $@
|
||||
|
||||
fxgasm.h: fxgasm.exe
|
||||
$(RUN_FXGASM) -hex > $@
|
||||
$< -hex > $@
|
||||
|
||||
fxgasm.exe: fxgasm.c
|
||||
$(HOST_CC) -o $@ $(HOST_CFLAGS) $<
|
||||
$(CC) -o $@ $(CFLAGS) $<
|
||||
|
||||
###############################################################################
|
||||
# clean, realclean
|
||||
|
||||
@@ -4,11 +4,16 @@
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = cvg
|
||||
# OPTFLAGS pass given optimization flags to compiler
|
||||
# default = -O2 -ffast-math
|
||||
# DEBUG=1 enable debugging checks and messages
|
||||
@@ -33,6 +38,8 @@
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
|
||||
|
||||
.PHONY: all glide3x clean realclean
|
||||
.INTERMEDIATE: fxgasm
|
||||
.SUFFIXES: .lo
|
||||
@@ -48,12 +55,12 @@ GLIDE_VERSION_MINOR = 10.0
|
||||
|
||||
GLIDE_LIB = libglide3.a
|
||||
GLIDE_SO = libglide3.so
|
||||
GLIDE_SO_X= libglide3x.so
|
||||
TEXUS_EXE = texus2
|
||||
|
||||
GLIDE_SONAME = $(GLIDE_SO).$(GLIDE_VERSION_MAJOR)
|
||||
GLIDE_SHARED = $(GLIDE_SONAME).$(GLIDE_VERSION_MINOR)
|
||||
|
||||
FX_GLIDE_HW ?= cvg
|
||||
FX_GLIDE_SW = ../../../swlibs
|
||||
GLIDE_LIBDIR = ../../lib
|
||||
TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
|
||||
@@ -81,12 +88,6 @@ CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=0 -DG
|
||||
CDEFS += -DGLIDE_DISPATCH_SETUP -DGLIDE_DISPATCH_DOWNLOAD
|
||||
LDLIBS += -lm
|
||||
|
||||
# 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
|
||||
|
||||
@@ -114,7 +115,7 @@ ASFLAGS = -O6 -felf -D__linux__
|
||||
ASFLAGS += $(CDEFS)
|
||||
|
||||
# compiler
|
||||
CFLAGS = -Wall
|
||||
CFLAGS = -Wall -W
|
||||
CFLAGS += -I. -I../../incsrc -I../../init
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib
|
||||
@@ -176,7 +177,7 @@ GLIDE_OBJECTS += \
|
||||
xdraw3_def.o
|
||||
ifeq ($(USE_MMX),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xtexdl_mmx.o
|
||||
xtexdl_mmx.obj
|
||||
endif
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
GLIDE_OBJECTS += \
|
||||
@@ -204,12 +205,11 @@ GLIDE_OBJECTS += \
|
||||
../../init/sli.o \
|
||||
../../init/sst1init.o \
|
||||
../../init/util.o \
|
||||
../../init/video.o
|
||||
# fxremap() not called in linux builds
|
||||
# ../../init/fxremap.o
|
||||
../../init/video.o \
|
||||
../../init/fxremap.o
|
||||
|
||||
# FIXME: these are to match the old library signature.
|
||||
# Should be checked if it's really needed.
|
||||
# FIXME: needed for now to match the old library signature, should be checked
|
||||
# if it's really needed.
|
||||
GLIDE_OBJECTS += \
|
||||
$(FX_GLIDE_SW)/fxmisc/fxos.o \
|
||||
$(FX_GLIDE_SW)/fxmisc/fximg.o
|
||||
@@ -257,20 +257,16 @@ endif
|
||||
###############################################################################
|
||||
all: glide3x $(TEXUS_EXEDIR)/$(TEXUS_EXE)
|
||||
|
||||
glide3x: $(GLIDE_LIBDIR)/$(GLIDE_LIB) $(GLIDE_LIBDIR)/$(GLIDE_SO) $(GLIDE_LIBDIR)/$(GLIDE_SONAME) $(GLIDE_LIBDIR)/$(GLIDE_SO_X)
|
||||
glide3x: $(GLIDE_LIBDIR)/$(GLIDE_LIB) $(GLIDE_LIBDIR)/$(GLIDE_SO)
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_LIB): $(GLIDE_OBJECTS)
|
||||
$(AR) $(ARFLAGS) $@ $^
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_SO): $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
|
||||
ln -fs $(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SO)
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_SONAME): $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
|
||||
ln -fs $(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SONAME)
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_SO_X): $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
|
||||
ln -fs $(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SO_X)
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_SHARED): $(GLIDE_OBJECTS:.o=.lo)
|
||||
$(CC) -o $@ -shared -Wl,--no-undefined -Wl,-soname,$(GLIDE_SONAME) $^ $(LDFLAGS) $(LDLIBS)
|
||||
$(CC) -o $@ -shared -Wl,-soname,$(GLIDE_SONAME) $^ $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
ifeq ($(TEXUS2),1)
|
||||
@@ -291,7 +287,7 @@ xdraw3_def.o: xdraw3.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xtexdl_def.o: xtexdl.c
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
xtexdl_mmx.o: xtexdl.asm
|
||||
xtexdl_mmx.obj: xtexdl.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_MMX=1 $<
|
||||
xdraw2_3dnow.o: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
@@ -308,8 +304,6 @@ xdraw3_def.lo: xdraw3_def.o
|
||||
$(CP) $< $@
|
||||
xtexdl_def.lo: xtexdl.c
|
||||
$(CC) -o $@ $(CFLAGS) -DPIC -fPIC -c $<
|
||||
xtexdl_mmx.lo: xtexdl_mmx.o
|
||||
$(CP) $< $@
|
||||
xdraw2_3dnow.lo: xdraw2_3dnow.o
|
||||
$(CP) $< $@
|
||||
xdraw3_3dnow.lo: xdraw3_3dnow.o
|
||||
@@ -333,7 +327,7 @@ fxgasm: fxgasm.c
|
||||
###############################################################################
|
||||
|
||||
clean:
|
||||
-$(RM) *.o *.lo
|
||||
-$(RM) *.o *.obj *.lo
|
||||
-$(RM) ../../init/*.o ../../init/*.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
|
||||
@@ -345,6 +339,4 @@ realclean: clean
|
||||
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
|
||||
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SO)
|
||||
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SONAME)
|
||||
-$(RM) $(GLIDE_LIBDIR)/$(GLIDE_SO_X)
|
||||
-$(RM) $(TEXUS_EXEDIR)/$(TEXUS_EXE)
|
||||
|
||||
@@ -1,372 +0,0 @@
|
||||
# Win32 makefile for Glide3/CVG and Texus2, using MinGW environment
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2004 - 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:
|
||||
# OPTFLAGS pass given optimization flags to compiler
|
||||
# default = -O2 -ffast-math -mtune=pentium
|
||||
# DEBUG=1 enable debugging checks and messages
|
||||
# default = no
|
||||
# USE_X86=1 use assembler triangle specializations; req by CVG
|
||||
# default = no
|
||||
# USE_MMX=1 allow MMX specializations. However, the true CPU
|
||||
# capabilities are still checked at run-time to avoid
|
||||
# crashes.
|
||||
# default = no
|
||||
# USE_3DNOW=1 allow 3DNow! specializations. However, the true CPU
|
||||
# capabilities are still checked at run-time to avoid
|
||||
# crashes.
|
||||
# default = no
|
||||
# TEXUS2=1 embed Texus2 functions into Glide3.
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# all: build everything
|
||||
# glide3x: build Glide3x lib
|
||||
# clean: remove object files
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
.PHONY: all glide3x clean realclean
|
||||
.INTERMEDIATE: fxgasm.exe
|
||||
.SUFFIXES: .c .obj .rc .res
|
||||
|
||||
###############################################################################
|
||||
# general defines (user settable?)
|
||||
###############################################################################
|
||||
|
||||
GLIDE_RES = glide.res
|
||||
GLIDE_DLL = glide3x.dll
|
||||
GLIDE_DEF = glide3x.def
|
||||
GLIDE_IMP = libglide3x.dll.a
|
||||
TEXUS_EXE = texus2.exe
|
||||
|
||||
FX_GLIDE_SW = ../../../swlibs
|
||||
GLIDE_LIBDIR = ../../lib
|
||||
TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
|
||||
|
||||
###############################################################################
|
||||
# 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 += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE3_VERTEX_LAYOUT=1 -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=0 -DGLIDE_PACKET3_TRI_SETUP=1 -DGLIDE_TRI_CULLING=1 -DUSE_PACKET_FIFO=1
|
||||
#CDEFS += -DGLIDE3_SCALER
|
||||
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=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
|
||||
|
||||
# shameless plug and splash screen
|
||||
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
|
||||
|
||||
ifeq ($(TEXUS2),1)
|
||||
CDEFS += -DHAVE_TEXUS2
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# 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
|
||||
OPTFLAGS ?=
|
||||
else
|
||||
OPTFLAGS ?= -O2 -ffast-math -mtune=pentium
|
||||
endif
|
||||
|
||||
|
||||
CFLAGS += -I. -I../../incsrc -I../../init
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib
|
||||
CFLAGS += $(CDEFS) $(OPTFLAGS)
|
||||
|
||||
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)
|
||||
CFLAGS += -DGL_X86
|
||||
else
|
||||
CFLAGS += -DGLIDE_USE_C_TRISETUP
|
||||
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 \
|
||||
distate.o \
|
||||
gstrip.o \
|
||||
distrip.o \
|
||||
diget.o \
|
||||
gsplash.o \
|
||||
g3df.o \
|
||||
gu.o \
|
||||
gpci.o \
|
||||
diglide.o \
|
||||
disst.o \
|
||||
ditex.o \
|
||||
gbanner.o \
|
||||
gerror.o \
|
||||
gaa.o \
|
||||
gdraw.o \
|
||||
gglide.o \
|
||||
glfb.o \
|
||||
gsst.o \
|
||||
gtex.o \
|
||||
gtexdl.o \
|
||||
xtexdl_def.o
|
||||
|
||||
ifeq ($(USE_X86),1)
|
||||
GLIDE_OBJECTS += \
|
||||
cpuid.o \
|
||||
xdraw2_def.o \
|
||||
xdraw3_def.o
|
||||
ifeq ($(USE_MMX),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xtexdl_mmx.o
|
||||
endif
|
||||
ifeq ($(USE_3DNOW),1)
|
||||
GLIDE_OBJECTS += \
|
||||
xdraw2_3dnow.o \
|
||||
xdraw3_3dnow.o \
|
||||
xtexdl_3dnow.o
|
||||
endif
|
||||
else
|
||||
GLIDE_OBJECTS += \
|
||||
gxdraw.o
|
||||
endif
|
||||
|
||||
GLIDE_OBJECTS += \
|
||||
digutex.o \
|
||||
$(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
|
||||
|
||||
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=.o)
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# rules
|
||||
###############################################################################
|
||||
|
||||
.c.o:
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
.rc.res:
|
||||
$(RC) -o $@ $(RCFLAGS) $(CDEFS) -I$(FX_GLIDE_SW)/fxmisc $<
|
||||
|
||||
###############################################################################
|
||||
# main
|
||||
###############################################################################
|
||||
all: glide3x $(TEXUS_EXEDIR)/$(TEXUS_EXE)
|
||||
|
||||
glide3x: $(GLIDE_LIBDIR)/$(GLIDE_DLL)
|
||||
|
||||
$(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 $@
|
||||
|
||||
$(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
|
||||
|
||||
strip:
|
||||
$(STRIP) $(GLIDE_LIBDIR)/$(GLIDE_DLL)
|
||||
#ifeq ($(TEXUS2),1)
|
||||
# $(STRIP) $(TEXUS_EXEDIR)/$(TEXUS_EXE)
|
||||
#endif
|
||||
|
||||
###############################################################################
|
||||
# rules(2)
|
||||
###############################################################################
|
||||
|
||||
#cpuid.o: cpudtect.asm
|
||||
# $(AS) -o $@ $(ASFLAGS) $<
|
||||
xdraw2_def.o: xdraw2.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xdraw3_def.o: xdraw3.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 $<
|
||||
xdraw3_3dnow.o: xdraw3.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
xtexdl_3dnow.o: xtexdl.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
|
||||
|
||||
$(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,*.o)
|
||||
-$(call UNLINK,../../init/*.o)
|
||||
-$(call UNLINK,$(FX_GLIDE_SW)/newpci/pcilib/*.o)
|
||||
-$(call UNLINK,fxinline.h)
|
||||
-$(call UNLINK,fxgasm.h)
|
||||
-$(call UNLINK,$(FX_GLIDE_SW)/texus2/lib/*.o)
|
||||
-$(call UNLINK,$(GLIDE_RES))
|
||||
|
||||
realclean: clean
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DLL))
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_IMP))
|
||||
-$(call UNLINK,$(GLIDE_LIBDIR)/$(GLIDE_DEF))
|
||||
-$(call UNLINK,$(TEXUS_EXEDIR)/$(TEXUS_EXE))
|
||||
@@ -1,17 +1,20 @@
|
||||
# OpenWatcom makefile for Glide3/CVG and Texus2
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
# Building under native DOS is not supported:
|
||||
# only tested under Win32 or Linux
|
||||
#
|
||||
# Copyright (c) 2004 - Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = cvg
|
||||
# OPTFLAGS pass given optimization flags to compiler
|
||||
# default = -ox -5s (Pentium, stack)
|
||||
# DEBUG=1 enable debugging checks and messages
|
||||
@@ -36,6 +39,8 @@
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
|
||||
|
||||
.PHONY: all glide3x clean realclean
|
||||
.INTERMEDIATE: fxgasm.exe wlib.lbc
|
||||
.SUFFIXES: .c .obj
|
||||
@@ -47,6 +52,7 @@
|
||||
GLIDE_LIB = glide3x.lib
|
||||
TEXUS_EXE = texus2.exe
|
||||
|
||||
FX_GLIDE_HW ?= cvg
|
||||
FX_GLIDE_SW = ../../../swlibs
|
||||
GLIDE_LIBDIR = ../../lib
|
||||
TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
|
||||
@@ -59,15 +65,10 @@ CC = wcl386
|
||||
AS = nasm
|
||||
AR = wlib
|
||||
|
||||
# detect if running under unix by finding 'rm' in $PATH :
|
||||
ifeq ($(wildcard $(addsuffix /rm,$(subst :, ,$(PATH)))),)
|
||||
DOSMODE= 1
|
||||
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
|
||||
UNLINK = del $(subst /,\,$(1))
|
||||
FIXPATH= $(subst /,\,$1)
|
||||
else
|
||||
DOSMODE= 0
|
||||
UNLINK = $(RM) $(1)
|
||||
FIXPATH= $1
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
@@ -82,12 +83,6 @@ CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=0 -DG
|
||||
#CDEFS += -DGLIDE3_SCALER
|
||||
CDEFS += -DGLIDE_DISPATCH_SETUP -DGLIDE_DISPATCH_DOWNLOAD
|
||||
|
||||
# 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
|
||||
|
||||
@@ -96,8 +91,8 @@ ifdef DEBUG
|
||||
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
|
||||
endif
|
||||
|
||||
# shameless plug and splash screen
|
||||
#CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
|
||||
# other
|
||||
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
|
||||
|
||||
ifeq ($(TEXUS2),1)
|
||||
CDEFS += -DHAVE_TEXUS2
|
||||
@@ -110,24 +105,17 @@ endif
|
||||
# librarian
|
||||
ARFLAGS = -c -fo -n -t -q
|
||||
|
||||
# linker
|
||||
# pick either of causeway, dos4g, dos32a or stub32a as link target
|
||||
LDFLAGS = -zq -k16384 -l=dos32a
|
||||
|
||||
# assembler
|
||||
ASFLAGS = -O6 -fobj -D__WATCOMD__ --prefix _
|
||||
ASFLAGS += $(CDEFS)
|
||||
|
||||
# compiler
|
||||
CFLAGS = -bt=dos -wx -zq
|
||||
# newer OpenWatcom versions enable W303 by default
|
||||
CFLAGS += -wcd=303
|
||||
INCPATH = -I. -I../../incsrc -I../../init
|
||||
INCPATH += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
|
||||
INCPATH += -I$(FX_GLIDE_SW)/texus2/lib
|
||||
CFLAGS = -wx
|
||||
CFLAGS += -I. -I../../incsrc -I../../init
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
|
||||
CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib
|
||||
OPTFLAGS ?= -ox -5s
|
||||
CFLAGS += $(CDEFS) $(OPTFLAGS)
|
||||
CFLAGS += $(call FIXPATH,$(INCPATH))
|
||||
|
||||
ifeq ($(USE_MMX),1)
|
||||
CFLAGS += -DGL_MMX
|
||||
@@ -145,6 +133,10 @@ else
|
||||
CFLAGS += -DGLIDE_USE_C_TRISETUP
|
||||
endif
|
||||
|
||||
# Watcom woes: pass parameters through environment vars
|
||||
export WCC386 = $(subst /,\,$(CFLAGS))
|
||||
export WCL386 = -zq
|
||||
|
||||
###############################################################################
|
||||
# objects
|
||||
###############################################################################
|
||||
@@ -245,7 +237,7 @@ endif
|
||||
###############################################################################
|
||||
|
||||
.c.obj:
|
||||
$(CC) $(CFLAGS) -fo=$@ -c $<
|
||||
$(CC) -fo=$@ -c $<
|
||||
|
||||
###############################################################################
|
||||
# main
|
||||
@@ -255,11 +247,11 @@ all: glide3x $(TEXUS_EXEDIR)/$(TEXUS_EXE)
|
||||
glide3x: $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
|
||||
$(GLIDE_LIBDIR)/$(GLIDE_LIB): wlib.lbc
|
||||
$(AR) $(ARFLAGS) -o $(call FIXPATH,$@) @wlib.lbc
|
||||
$(AR) $(ARFLAGS) -o $(subst /,\,$@) @wlib
|
||||
|
||||
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB)
|
||||
ifeq ($(TEXUS2),1)
|
||||
$(CC) $(CFLAGS) -fe=$(call FIXPATH,$@) $(LDFLAGS) $(call FIXPATH,$^)
|
||||
$(CC) -fe=$(subst /,\,$@) $(subst /,\,$^)
|
||||
else
|
||||
$(warning Texus2 not enabled... Skipping $(TEXUS_EXE))
|
||||
endif
|
||||
@@ -275,7 +267,7 @@ xdraw2_d.obj: xdraw2.asm
|
||||
xdraw3_d.obj: xdraw3.asm
|
||||
$(AS) -o $@ $(ASFLAGS) $<
|
||||
xtexdl_d.obj: xtexdl.c
|
||||
$(CC) $(CFLAGS) -fo=$@ -c $<
|
||||
$(CC) -fo=$@ -c $<
|
||||
xtexdl_mmx.obj: xtexdl.asm
|
||||
$(AS) -o $@ $(ASFLAGS) -DGL_MMX=1 $<
|
||||
xdraw2_3.obj: xdraw2.asm
|
||||
@@ -288,16 +280,15 @@ xtexdl_3.obj: xtexdl.asm
|
||||
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
|
||||
|
||||
fxinline.h: fxgasm.exe
|
||||
$(call FIXPATH,./$<) -inline > $@
|
||||
$< -inline > $@
|
||||
|
||||
fxgasm.h: fxgasm.exe
|
||||
$(call FIXPATH,./$<) -hex > $@
|
||||
$< -hex > $@
|
||||
|
||||
# -bt without args resets build target to host OS.
|
||||
fxgasm.exe: fxgasm.c
|
||||
$(CC) $(CFLAGS) -bt -fe=$@ $<
|
||||
$(CC) -fe=$@ $<
|
||||
|
||||
wlib.lbc: $(call FIXPATH,$(GLIDE_OBJECTS))
|
||||
wlib.lbc: $(subst /,\,$(GLIDE_OBJECTS))
|
||||
@echo $(addprefix +,$^) > wlib.lbc
|
||||
|
||||
###############################################################################
|
||||
@@ -306,7 +297,6 @@ wlib.lbc: $(call FIXPATH,$(GLIDE_OBJECTS))
|
||||
|
||||
clean:
|
||||
-$(call UNLINK,*.obj)
|
||||
-$(call UNLINK,*.o)
|
||||
-$(call UNLINK,../../init/*.obj)
|
||||
-$(call UNLINK,$(FX_GLIDE_SW)/newpci/pcilib/*.obj)
|
||||
-$(call UNLINK,fxinline.h)
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
# Win32 makefile for Glide3/CVG and Texus2, using Visual Studio (cl.exe)
|
||||
# Win32 makefile for Glide3/CVG and Texus2
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
#
|
||||
# Copyright (c) 2004 - Daniel Borca
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# FX_GLIDE_HW build for the given ASIC (cvg).
|
||||
# default = cvg
|
||||
# OPTFLAGS pass given optimization flags to compiler
|
||||
# default = -G6 -O2 (or -Od if DEBUG=1)
|
||||
# DEBUG=1 enable debugging checks and messages
|
||||
@@ -34,6 +39,8 @@
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
|
||||
|
||||
.PHONY: all glide3x clean realclean
|
||||
.INTERMEDIATE: fxgasm.exe
|
||||
.SUFFIXES: .c .obj .rc .res
|
||||
@@ -47,6 +54,7 @@ GLIDE_DLL = glide3x.dll
|
||||
GLIDE_IMP = glide3x.lib
|
||||
TEXUS_EXE = texus2.exe
|
||||
|
||||
FX_GLIDE_HW ?= cvg
|
||||
FX_GLIDE_SW = ../../../swlibs
|
||||
GLIDE_LIBDIR = ../../lib
|
||||
TEXUS_EXEDIR = $(FX_GLIDE_SW)/bin
|
||||
@@ -78,11 +86,12 @@ CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE3_VERTEX_LAYOUT=1 -DGLIDE_HW_TRI_SETUP=1
|
||||
#CDEFS += -DGLIDE3_SCALER
|
||||
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1
|
||||
|
||||
# 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
|
||||
# special sli buffer clears
|
||||
CDEFS += -DGLIDE_BLIT_CLEAR=1
|
||||
|
||||
# subsystem
|
||||
CDEFS += -DCVG
|
||||
@@ -294,10 +303,10 @@ xtexdl_3dnow.obj: xtexdl.asm
|
||||
$(GLIDE_OBJECTS): fxinline.h fxgasm.h
|
||||
|
||||
fxinline.h: fxgasm.exe
|
||||
.\$< -inline > $@
|
||||
./$< -inline > $@
|
||||
|
||||
fxgasm.h: fxgasm.exe
|
||||
.\$< -hex > $@
|
||||
./$< -hex > $@
|
||||
|
||||
fxgasm.exe: fxgasm.c
|
||||
$(CC) -o $@ $(CFLAGS) $<
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
*/
|
||||
|
||||
/* $Header$ */
|
||||
/* $Log$ */
|
||||
/* */
|
||||
/* 1 10/08/98 11:30a Brent */
|
||||
/* */
|
||||
/* 6 10/03/98 3:35p Peter */
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
;;
|
||||
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
;;
|
||||
;; Revision 1.1.1.1.8.1 2003/11/03 13:34:29 dborca
|
||||
;; Voodoo2 happiness (DJGPP & Linux)
|
||||
;;
|
||||
;; $Header$
|
||||
;; $Log$
|
||||
;; Revision 1.1.1.1 1999/12/07 21:42:30 joseph
|
||||
;; Initial checkin into SourceForge.
|
||||
;;
|
||||
@@ -54,7 +53,7 @@ CPUTypeP6 equ 6h
|
||||
|
||||
;;; References to external data:
|
||||
|
||||
segment SEG_TEXT
|
||||
segment TEXT
|
||||
;;
|
||||
;; _cpu_detect_asm - detect the type of CPU
|
||||
;;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/*
|
||||
* CPU detection code
|
||||
*
|
||||
* Revision 1.1.2.3 2005/08/13 21:06:56 jwrdegoede
|
||||
* Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
*
|
||||
* $Header$
|
||||
* $Log$
|
||||
* Revision 1.1.2.2 2005/05/11 14:42:15 jwrdegoede
|
||||
* Also fix gcc4 PIC compilation of cpuid.c for cvg
|
||||
*
|
||||
@@ -33,17 +32,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cpuid.h"
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3)))
|
||||
typedef unsigned int __attribute__((__may_alias__)) word32;
|
||||
#else
|
||||
typedef unsigned int word32;
|
||||
#endif
|
||||
|
||||
/* These are the bit flags that get set on calling cpuid
|
||||
* with register eax set to 1
|
||||
@@ -90,6 +86,7 @@ typedef unsigned int word32;
|
||||
static jmp_buf j;
|
||||
|
||||
|
||||
|
||||
/* Desc: signal handler
|
||||
*
|
||||
* In : signal number
|
||||
@@ -103,6 +100,7 @@ static void handler (int signal)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Desc: check if CPU has specific feature
|
||||
*
|
||||
* In : feature request
|
||||
@@ -136,6 +134,7 @@ static int check_feature (int feature)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Desc: perform (possibly faulting) instructions in a safe manner
|
||||
*
|
||||
* In : feature request
|
||||
@@ -182,6 +181,7 @@ static int has_feature (int feature)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Desc: get CPU info
|
||||
*
|
||||
* In : pointer to _p_info
|
||||
@@ -233,7 +233,7 @@ int _cpuid (_p_info *pinfo)
|
||||
movl %%edx, %0 \n\
|
||||
0: \n\
|
||||
":"=g"(dwExt), "=g"(dwId), "=g"(dwFeature),
|
||||
"=g"(((word32 *)Ident)[0]), "=g"(((word32 *)Ident)[1]), "=g"(((word32 *)Ident)[2])
|
||||
"=g"(((long *)Ident)[0]), "=g"(((long *)Ident)[1]), "=g"(((long *)Ident)[2])
|
||||
::"%eax", "%ecx", "%edx");
|
||||
#else
|
||||
_asm
|
||||
@@ -314,6 +314,7 @@ notamd:
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if CPUTEST
|
||||
#include <stdio.h>
|
||||
/* Desc:
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.4 2004/10/04 09:13:33 dborca
|
||||
** make sure SLI boards are correctly counted
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.3 2004/02/16 07:42:14 dborca
|
||||
** grSetNumPendingBuffers visible with grGetProcAddress
|
||||
**
|
||||
@@ -163,7 +162,7 @@
|
||||
|
||||
#include "fxinline.h"
|
||||
|
||||
static const FxU32 _grMemOffset[16] =
|
||||
const FxU32 _grMemOffset[16] =
|
||||
{
|
||||
35, /* 320x200 */
|
||||
40, /* 320x240 */
|
||||
@@ -183,7 +182,7 @@ static const FxU32 _grMemOffset[16] =
|
||||
70 /* 400x300 */
|
||||
};
|
||||
|
||||
static const FxU32 _grResolutionRefresh[16][9] =
|
||||
const FxU32 _grResolutionRefresh[16][9] =
|
||||
{
|
||||
{ /* 320x200 */
|
||||
0, /* 60 Hz */
|
||||
@@ -465,7 +464,10 @@ GR_DIENTRY(grGet, FxU32, (FxU32 pname, FxU32 plength, FxI32 *params))
|
||||
break;
|
||||
case GR_LFB_PIXEL_PIPE:
|
||||
if (plength == 4) {
|
||||
*params = FXTRUE;
|
||||
if (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type == GR_SSTTYPE_Voodoo2)
|
||||
*params = FXTRUE;
|
||||
else
|
||||
*params = FXFALSE;
|
||||
retVal = plength;
|
||||
}
|
||||
break;
|
||||
@@ -483,19 +485,50 @@ GR_DIENTRY(grGet, FxU32, (FxU32 pname, FxU32 plength, FxI32 *params))
|
||||
break;
|
||||
case GR_MEMORY_FB:
|
||||
if ((hwc) && (plength == 4)) {
|
||||
*params = hwc->SSTs[_GlideRoot.current_sst].sstBoard.VoodooConfig.fbRam << 20;
|
||||
switch(hwc->SSTs[_GlideRoot.current_sst].type) {
|
||||
case GR_SSTTYPE_VOODOO:
|
||||
case GR_SSTTYPE_Voodoo2:
|
||||
*params = hwc->SSTs[_GlideRoot.current_sst].sstBoard.VoodooConfig.fbRam << 20;
|
||||
break;
|
||||
case GR_SSTTYPE_SST96:
|
||||
*params = hwc->SSTs[_GlideRoot.current_sst].sstBoard.SST96Config.fbRam << 20;
|
||||
break;
|
||||
default:
|
||||
*params = 0; /* XXX UMA architecture */
|
||||
break;
|
||||
}
|
||||
retVal = plength;
|
||||
}
|
||||
break;
|
||||
case GR_MEMORY_TMU:
|
||||
if ((hwc) && (plength == 4)) {
|
||||
*params = hwc->SSTs[_GlideRoot.current_sst].sstBoard.VoodooConfig.tmuConfig[0].tmuRam << 20;
|
||||
switch(hwc->SSTs[_GlideRoot.current_sst].type) {
|
||||
case GR_SSTTYPE_VOODOO:
|
||||
case GR_SSTTYPE_Voodoo2:
|
||||
*params = hwc->SSTs[_GlideRoot.current_sst].sstBoard.VoodooConfig.tmuConfig[0].tmuRam << 20;
|
||||
break;
|
||||
case GR_SSTTYPE_SST96:
|
||||
*params = hwc->SSTs[_GlideRoot.current_sst].sstBoard.SST96Config.tmuConfig.tmuRam << 20;
|
||||
break;
|
||||
default:
|
||||
*params = 0; /* XXX UMA architecture */
|
||||
break;
|
||||
}
|
||||
retVal = plength;
|
||||
}
|
||||
break;
|
||||
case GR_MEMORY_UMA:
|
||||
if ((hwc) && (plength == 4)) {
|
||||
*params = 0; /* XXX non-UMA architecture */
|
||||
switch(hwc->SSTs[_GlideRoot.current_sst].type) {
|
||||
case GR_SSTTYPE_VOODOO:
|
||||
case GR_SSTTYPE_Voodoo2:
|
||||
case GR_SSTTYPE_SST96:
|
||||
*params = 0; /* XXX non-UMA architecture */
|
||||
break;
|
||||
default:
|
||||
retVal = FXFALSE; /* XXX TBD */
|
||||
break;
|
||||
}
|
||||
retVal = plength;
|
||||
}
|
||||
break;
|
||||
@@ -539,13 +572,35 @@ GR_DIENTRY(grGet, FxU32, (FxU32 pname, FxU32 plength, FxI32 *params))
|
||||
break;
|
||||
case GR_REVISION_FB:
|
||||
if ((hwc) && (plength == 4)) {
|
||||
*params = hwc->SSTs[_GlideRoot.current_sst].sstBoard.VoodooConfig.fbiRev;
|
||||
switch(hwc->SSTs[_GlideRoot.current_sst].type) {
|
||||
case GR_SSTTYPE_VOODOO:
|
||||
case GR_SSTTYPE_Voodoo2:
|
||||
*params = hwc->SSTs[_GlideRoot.current_sst].sstBoard.VoodooConfig.fbiRev;
|
||||
break;
|
||||
case GR_SSTTYPE_SST96:
|
||||
retVal = FXFALSE;
|
||||
break;
|
||||
default:
|
||||
retVal = FXFALSE;
|
||||
break;
|
||||
}
|
||||
retVal = plength;
|
||||
}
|
||||
break;
|
||||
case GR_REVISION_TMU:
|
||||
if ((hwc) && (plength == 4)) {
|
||||
*params = hwc->SSTs[_GlideRoot.current_sst].sstBoard.VoodooConfig.tmuConfig[_GlideRoot.current_sst].tmuRev;
|
||||
switch(hwc->SSTs[_GlideRoot.current_sst].type) {
|
||||
case GR_SSTTYPE_VOODOO:
|
||||
case GR_SSTTYPE_Voodoo2:
|
||||
*params = hwc->SSTs[_GlideRoot.current_sst].sstBoard.VoodooConfig.tmuConfig[_GlideRoot.current_sst].tmuRev;
|
||||
break;
|
||||
case GR_SSTTYPE_SST96:
|
||||
*params = hwc->SSTs[_GlideRoot.current_sst].sstBoard.SST96Config.tmuConfig.tmuRev;
|
||||
break;
|
||||
default:
|
||||
retVal = FXFALSE;
|
||||
break;
|
||||
}
|
||||
retVal = plength;
|
||||
}
|
||||
break;
|
||||
@@ -696,17 +751,34 @@ GR_DIENTRY(grGetString, const char *, (FxU32 pname))
|
||||
|
||||
switch(pname) {
|
||||
case GR_EXTENSION:
|
||||
return "CHROMARANGE TEXCHROMA TEXMIRROR PALETTE6666 FOGCOORD RESOLUTION";
|
||||
switch(_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type) {
|
||||
case GR_SSTTYPE_Banshee:
|
||||
case GR_SSTTYPE_Voodoo2:
|
||||
return "CHROMARANGE TEXCHROMA TEXMIRROR PALETTE6666 FOGCOORD RESOLUTION";
|
||||
break;
|
||||
|
||||
default:
|
||||
return "";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GR_HARDWARE:
|
||||
return "Voodoo2";
|
||||
break;
|
||||
case GR_RENDERER:
|
||||
return "Glide";
|
||||
break;
|
||||
case GR_VENDOR:
|
||||
return "3Dfx Interactive";
|
||||
break;
|
||||
case GR_VERSION:
|
||||
return VERSIONSTR;
|
||||
{
|
||||
return VERSIONSTR;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return "ERROR";
|
||||
break;
|
||||
} /* end switch */
|
||||
|
||||
#undef FN_NAME
|
||||
@@ -863,6 +935,7 @@ GR_DIENTRY(grGetProcAddress, GrProc, (char *procName))
|
||||
#define FN_NAME "grGetProcAddress"
|
||||
GrExtensionTuple *tuple;
|
||||
|
||||
if (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type == GR_SSTTYPE_Voodoo2) {
|
||||
if (!strcmp(procName, "grDrawTextureLineExt"))
|
||||
return (GrProc)_GlideRoot.deviceArchProcs.curLineProc;
|
||||
|
||||
@@ -874,6 +947,7 @@ GR_DIENTRY(grGetProcAddress, GrProc, (char *procName))
|
||||
}
|
||||
tuple++;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
#undef FN_NAME
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.1 2005/05/25 08:51:49 jwrdegoede
|
||||
** Add #ifdef GL_X86 around x86 specific code
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:42:30 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.1 2004/10/04 09:17:16 dborca
|
||||
** killed some warnings / compilation errors
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:42:30 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.1 2004/10/04 09:13:33 dborca
|
||||
** make sure SLI boards are correctly counted
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:42:30 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.4 2007/09/29 13:59:34 koolsmoky
|
||||
** completed grStippleMode and grStipplePattern
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.3 2004/03/08 07:42:21 dborca
|
||||
** Voodoo Rush fixes
|
||||
**
|
||||
@@ -410,6 +409,11 @@ GR_DIENTRY(grChromaRange, void , (GrColor_t color, GrColor_t range, GrChromaRang
|
||||
#define FN_NAME "grChromaRange"
|
||||
GR_BEGIN_NOFIFOCHECK("grChromaRange\n",85);
|
||||
|
||||
GR_CHECK_F(myName,
|
||||
((_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type != GR_SSTTYPE_Voodoo2) &&
|
||||
(_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type != GR_SSTTYPE_Banshee)),
|
||||
"grChromaRange not supported.");
|
||||
|
||||
INVALIDATE(chromaKey);
|
||||
INVALIDATE(chromaRange);
|
||||
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.1 2005/08/13 21:06:56 jwrdegoede
|
||||
** Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:42:31 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 1 10/08/98 11:30a Brent
|
||||
**
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.1 2005/08/13 21:06:56 jwrdegoede
|
||||
** Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:42:31 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
|
||||
@@ -16,14 +16,17 @@
|
||||
* THE UNITED STATES.
|
||||
*
|
||||
* COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** 1 10/08/98 11:30a Brent
|
||||
**
|
||||
** 2 7/24/98 1:41p Hohn
|
||||
*
|
||||
* $Header$
|
||||
* $Log$
|
||||
**
|
||||
** 1 10/08/98 11:30a Brent
|
||||
**
|
||||
** 2 7/24/98 1:41p Hohn
|
||||
*
|
||||
* 1 1/16/98 4:29p Atai
|
||||
* create glide 3 src
|
||||
*
|
||||
*
|
||||
* 1 7/25/97 9:05a Pgj
|
||||
* generate fxbldno.h which defines BUILD_NUMBER
|
||||
*
|
||||
@@ -33,7 +36,7 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
int main(void)
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct tm locTime;
|
||||
time_t sysTime;
|
||||
@@ -42,7 +45,7 @@ int main(void)
|
||||
time(&sysTime);
|
||||
locTime = *localtime(&sysTime);
|
||||
|
||||
if ((build = getenv("BUILD_NUMBER")) != NULL) {
|
||||
if (build = getenv("BUILD_NUMBER")) {
|
||||
printf("#define BUILD_NUMBER %s\n", build);
|
||||
} else {
|
||||
unsigned short magic;
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Revision$
|
||||
** $Date$
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
@@ -68,7 +71,7 @@ main (int argc, char **argv)
|
||||
|
||||
if (argc > 1) {
|
||||
if (strcmp("-inline", argv[1]) == 0) {
|
||||
SstRegs dummyRegs = { 0x00UL }; /* silence VC6 */
|
||||
SstRegs dummyRegs = { 0x00UL };
|
||||
|
||||
printf("#ifndef __FX_INLINE_H__\n");
|
||||
printf("#define __FX_INLINE_H__\n");
|
||||
|
||||
82
glide3x/cvg/glide3/src/fxgasm.h
Normal file
82
glide3x/cvg/glide3/src/fxgasm.h
Normal file
@@ -0,0 +1,82 @@
|
||||
|
||||
;----------------------------------------------------------------------
|
||||
; Assembler offsets for SSTREGS struct
|
||||
;----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
;----------------------------------------------------------------------
|
||||
; Assembler offsets for GC struct
|
||||
;----------------------------------------------------------------------
|
||||
|
||||
base_ptr equ 00000000h
|
||||
reg_ptr equ 00000004h
|
||||
lfb_ptr equ 0000000ch
|
||||
tex_ptr equ 00000008h
|
||||
cull_mode equ 000000d0h
|
||||
tsuDataList equ 00000014h
|
||||
triPacketHdr equ 00000358h
|
||||
cullStripHdr equ 0000035ch
|
||||
paramMask equ 00000360h
|
||||
triSetupProc equ 00000344h
|
||||
drawTrianglesProc equ 00000348h
|
||||
drawVertexList equ 0000034ch
|
||||
fifoStart equ 00000364h
|
||||
fifoEnd equ 00000368h
|
||||
fifoOffset equ 0000036ch
|
||||
fifoSize equ 00000370h
|
||||
fifoJmpHdr equ 00000374h
|
||||
fifoPtr equ 00000378h
|
||||
fifoRead equ 0000037ch
|
||||
fifoRoom equ 00000380h
|
||||
roomToReadPtr equ 00000384h
|
||||
roomToEnd equ 00000388h
|
||||
fifoLfbP equ 0000038ch
|
||||
lfbLockCount equ 00000390h
|
||||
vertexSize equ 00000278h
|
||||
vertexStride equ 00000274h
|
||||
invalid equ 00000280h
|
||||
CoordinateSpace equ 0000033ch
|
||||
paramIndex equ 000000d4h
|
||||
vp_hwidth equ 00000208h
|
||||
vp_hheight equ 0000020ch
|
||||
vp_hdepth equ 00000210h
|
||||
vp_ox equ 000001fch
|
||||
vp_oy equ 00000200h
|
||||
vp_oz equ 00000204h
|
||||
colorType equ 0000027ch
|
||||
wInfo_offset equ 00000228h
|
||||
qInfo_mode equ 0000025ch
|
||||
qInfo_offset equ 00000260h
|
||||
q0Info_offset equ 00000268h
|
||||
q1Info_offset equ 00000270h
|
||||
q0Info_mode equ 00000264h
|
||||
q1Info_mode equ 0000026ch
|
||||
tmu0_s_scale equ 00000144h
|
||||
tmu0_t_scale equ 00000148h
|
||||
tmu1_s_scale equ 00000184h
|
||||
tmu1_t_scale equ 00000188h
|
||||
SIZEOF_GrState equ 00000274h
|
||||
SIZEOF_GC equ 00000438h
|
||||
|
||||
|
||||
;----------------------------------------------------------------------
|
||||
; Assembler offsets for GlideRoot struct
|
||||
;----------------------------------------------------------------------
|
||||
|
||||
p6Fencer equ 00000000h
|
||||
current_sst equ 00000004h
|
||||
curGC equ 00000008h
|
||||
curTriSize equ 00000014h
|
||||
stats_linesDrawn equ 00000074h
|
||||
stats_otherTrisDrawn equ 00000080h
|
||||
trisProcessed equ 00000078h
|
||||
trisDrawn equ 0000007ch
|
||||
pool_f0 equ 00000020h
|
||||
pool_fHalf equ 00000024h
|
||||
pool_f1 equ 00000028h
|
||||
pool_f255 equ 0000002ch
|
||||
pool_fTemp1 equ 00000030h
|
||||
pool_fTemp2 equ 00000034h
|
||||
SIZEOF_GlideRoot equ 00001248h
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.15 2007/09/29 13:59:34 koolsmoky
|
||||
** completed grStippleMode and grStipplePattern
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.14 2006/01/16 21:22:41 jwrdegoede
|
||||
** Fix gcc 4.1 new type-punned ptr breaks antialias. warnings
|
||||
**
|
||||
|
||||
10
glide3x/cvg/glide3/src/fxinline.h
Normal file
10
glide3x/cvg/glide3/src/fxinline.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef __FX_INLINE_H__
|
||||
#define __FX_INLINE_H__
|
||||
|
||||
#define kCurGCOffset 0x8UL
|
||||
#define kTriProcOffset 0x344UL
|
||||
#define kGCStateInvalid 0x280UL
|
||||
/* The # of 2-byte entries in the hw fog table */
|
||||
#define kInternalFogTableEntryCount 0x40
|
||||
|
||||
#endif /* __FX_INLINE_H__ */
|
||||
@@ -17,6 +17,7 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log:
|
||||
** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce
|
||||
** branching.
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.5 2005/08/13 21:06:57 jwrdegoede
|
||||
** Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.4 2005/06/09 18:32:08 jwrdegoede
|
||||
** Fixed all warnings with gcc4 -Wall -W -Wno-unused-parameter, except for a couple I believe to be a gcc bug. This has been reported to gcc.
|
||||
**
|
||||
@@ -83,6 +82,7 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <3dfx.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
@@ -105,9 +105,9 @@ static FxBool Read8Bit(FxU8 *dst, FILE *image, int small_lod, int large_lod, GrA
|
||||
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)
|
||||
static const char *openmode = "rb";
|
||||
const char *openmode = "rb";
|
||||
#else
|
||||
static const char *openmode = "r";
|
||||
const char *openmode = "r";
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
@@ -203,9 +203,11 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
|
||||
};
|
||||
|
||||
GDBG_INFO(81,"gu3dfGetInfo(%s,0x%x)\n",FileName,Info);
|
||||
|
||||
if ((image_file = fopen(FileName, openmode)) == NULL) return FXFALSE;
|
||||
if (!_grGet3dfHeader(image_file, buffer, sizeof(buffer))) goto _loc1;
|
||||
/*
|
||||
** open the filen
|
||||
*/
|
||||
if((image_file = fopen(FileName, openmode)) == NULL) return FXFALSE;
|
||||
if (!_grGet3dfHeader(image_file, buffer, sizeof(buffer))) return FXFALSE;
|
||||
|
||||
/*
|
||||
** grab statistics out of the header
|
||||
@@ -215,12 +217,13 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
|
||||
color_format,
|
||||
&small_lod, &large_lod,
|
||||
&aspect_width, &aspect_height) != 6)
|
||||
goto _loc1;
|
||||
return FXFALSE;
|
||||
|
||||
/*
|
||||
** determine aspect ratio, height, and width
|
||||
*/
|
||||
i = 0;
|
||||
ratio_found = FXFALSE;
|
||||
while ((i < 4) && (!ratio_found)) {
|
||||
if ((aspect_width << i) == aspect_height) {
|
||||
Info->header.aspect_ratio = wh_aspect_table[i];
|
||||
@@ -239,7 +242,7 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
|
||||
|
||||
i++;
|
||||
}
|
||||
if (!ratio_found) goto _loc1;
|
||||
if (!ratio_found) return FXFALSE;
|
||||
|
||||
/*
|
||||
** determine height and width of the mip map
|
||||
@@ -404,13 +407,13 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
|
||||
{
|
||||
char *tempStr = (char*)color_format;
|
||||
while (*tempStr != '\0') {
|
||||
if (*tempStr >= 'a' && *tempStr <= 'z')
|
||||
*tempStr -= ('a'-'A');
|
||||
*tempStr = toupper(*tempStr);
|
||||
tempStr++;
|
||||
}
|
||||
}
|
||||
|
||||
i = 0;
|
||||
format_found = FXFALSE;
|
||||
while ((cftable[i].name != 0) && (!format_found)) {
|
||||
if (strcmp(color_format, cftable[i].name) == 0) {
|
||||
Info->header.format = cftable[i].fmt;
|
||||
@@ -423,8 +426,7 @@ GR_DIENTRY(gu3dfGetInfo, FxBool,
|
||||
/*
|
||||
** close the input file
|
||||
*/
|
||||
_loc1:
|
||||
fclose(image_file);
|
||||
if (image_file != NULL) fclose(image_file);
|
||||
|
||||
if (format_found) {
|
||||
FxI32 lod;
|
||||
@@ -456,9 +458,11 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
char buffer[100] = "";
|
||||
|
||||
GDBG_INFO(81,"gu3dfLoad(%s,0x%x)\n",filename,info);
|
||||
|
||||
/*
|
||||
** open the file
|
||||
*/
|
||||
if ((image_file = fopen(filename, openmode)) == NULL) return FXFALSE;
|
||||
if (!_grGet3dfHeader(image_file, buffer, sizeof(buffer))) goto _loc1;
|
||||
if (!_grGet3dfHeader(image_file, buffer, sizeof(buffer))) return FXFALSE;
|
||||
|
||||
/*
|
||||
** If necessary, read in the YIQ decompression table
|
||||
@@ -472,7 +476,11 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
for (index = 0; index < 16; index++)
|
||||
{
|
||||
FxU16 val;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
if (!ReadDataShort(image_file, &val))
|
||||
{
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
info->table.nccTable.yRGB[index] = val & 0xFF;
|
||||
}
|
||||
|
||||
@@ -481,11 +489,23 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
*/
|
||||
for (index = 0; index < 4; index++) {
|
||||
FxU16 val;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
if (!ReadDataShort(image_file, &val))
|
||||
{
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
info->table.nccTable.iRGB[index][0] = val & 0x1FF;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
if (!ReadDataShort(image_file, &val))
|
||||
{
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
info->table.nccTable.iRGB[index][1] = val & 0x1FF;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
if (!ReadDataShort(image_file, &val))
|
||||
{
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
info->table.nccTable.iRGB[index][2] = val & 0x1FF;
|
||||
}
|
||||
|
||||
@@ -494,11 +514,23 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
*/
|
||||
for (index = 0; index < 4; index++) {
|
||||
FxU16 val;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
if (!ReadDataShort(image_file, &val))
|
||||
{
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
info->table.nccTable.qRGB[index][0] = val & 0x1FF;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
if (!ReadDataShort(image_file, &val))
|
||||
{
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
info->table.nccTable.qRGB[index][1] = val & 0x1FF;
|
||||
if (!ReadDataShort(image_file, &val)) goto _loc1;
|
||||
if (!ReadDataShort(image_file, &val))
|
||||
{
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
info->table.nccTable.qRGB[index][2] = val & 0x1FF;
|
||||
}
|
||||
|
||||
@@ -513,7 +545,7 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+1]) << 8;
|
||||
packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+2]) << 16;
|
||||
packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+3]) << 24;
|
||||
|
||||
|
||||
info->table.nccTable.packed_data[index] = packedvalue;
|
||||
}
|
||||
|
||||
@@ -553,7 +585,11 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
for(i = 0; i < 256; i++)
|
||||
{
|
||||
FxU32 val;
|
||||
if (!ReadDataLong(image_file, &val)) goto _loc1;
|
||||
if (!ReadDataLong(image_file, &val))
|
||||
{
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
info->table.palette.data[i] = val;
|
||||
}
|
||||
}
|
||||
@@ -573,7 +609,10 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
G3_LOD_TRANSLATE(info->header.small_lod),
|
||||
G3_LOD_TRANSLATE(info->header.large_lod),
|
||||
G3_ASPECT_TRANSLATE(info->header.aspect_ratio)))
|
||||
goto _loc1;
|
||||
{
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case GR_TEXFMT_RGB_565:
|
||||
@@ -587,16 +626,21 @@ GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
G3_LOD_TRANSLATE(info->header.small_lod),
|
||||
G3_LOD_TRANSLATE(info->header.large_lod),
|
||||
G3_ASPECT_TRANSLATE(info->header.aspect_ratio)))
|
||||
goto _loc1;
|
||||
{
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
_loc1:
|
||||
fclose(image_file);
|
||||
return FXFALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
** close the file
|
||||
*/
|
||||
fclose(image_file);
|
||||
|
||||
return FXTRUE;
|
||||
}
|
||||
|
||||
@@ -611,15 +655,16 @@ Read8Bit(FxU8 *data, FILE *image_file,
|
||||
GrAspectRatio_t aspect_ratio)
|
||||
{
|
||||
int lod;
|
||||
FxU32 cnt;
|
||||
int width, height;
|
||||
|
||||
for (lod = large_lod; lod <= small_lod; lod++) {
|
||||
cnt = (FxU32)_grMipMapHostWH[aspect_ratio][lod][0] *
|
||||
(FxU32)_grMipMapHostWH[aspect_ratio][lod][1];
|
||||
width = _grMipMapHostWH[aspect_ratio][lod][0];
|
||||
height = _grMipMapHostWH[aspect_ratio][lod][1];
|
||||
|
||||
if (fread(data, 1, cnt, image_file) != cnt)
|
||||
if (fread(data, sizeof(char), width*height, image_file) !=
|
||||
(sizeof(char)*width*height))
|
||||
return FXFALSE;
|
||||
data += cnt;
|
||||
data += width*height;
|
||||
}
|
||||
return FXTRUE;
|
||||
}
|
||||
@@ -633,14 +678,15 @@ static FxBool Read16Bit(FxU16 *data, FILE *image_file,
|
||||
int small_lod, int large_lod,
|
||||
GrAspectRatio_t aspect_ratio)
|
||||
{
|
||||
FxU32 idx, cnt;
|
||||
int index;
|
||||
int lod;
|
||||
int width, height;
|
||||
|
||||
for (lod = large_lod; lod <= small_lod; lod++) {
|
||||
cnt = (FxU32)_grMipMapHostWH[aspect_ratio][lod][0] *
|
||||
(FxU32)_grMipMapHostWH[aspect_ratio][lod][1];
|
||||
width = _grMipMapHostWH[aspect_ratio][lod][0];
|
||||
height = _grMipMapHostWH[aspect_ratio][lod][1];
|
||||
|
||||
for (idx = 0; idx < cnt; idx++) {
|
||||
for (index = 0; index < (width * height); index++) {
|
||||
if (!ReadDataShort(image_file,data))
|
||||
return FXFALSE;
|
||||
data++;
|
||||
@@ -654,24 +700,24 @@ static FxBool Read16Bit(FxU16 *data, FILE *image_file,
|
||||
*/
|
||||
static FxBool ReadDataShort(FILE *fp, FxU16 *data)
|
||||
{
|
||||
FxU16 value;
|
||||
FxU16 b1, b2;
|
||||
int b;
|
||||
|
||||
/*
|
||||
** read in the MSB
|
||||
*/
|
||||
b = getc (fp);
|
||||
if (b == EOF) return FXFALSE;
|
||||
value = (FxU16) ((b&0xFF)<<8);
|
||||
b = getc(fp);
|
||||
if (b == EOF)
|
||||
return FXFALSE;
|
||||
b1 = b;
|
||||
|
||||
b = getc(fp);
|
||||
if (b == EOF)
|
||||
return FXFALSE;
|
||||
b2 = b;
|
||||
|
||||
#define kShiftB1 8
|
||||
#define kShiftB2 0
|
||||
|
||||
/*
|
||||
** read in the LSB
|
||||
*/
|
||||
b = getc (fp);
|
||||
if (b == EOF) return FXFALSE;
|
||||
value |= (FxU16) (b & 0x00FF);
|
||||
*data = ((b1 & 0xFF) << kShiftB1) | ((b2 & 0xFF) << kShiftB2);
|
||||
|
||||
*data = value;
|
||||
return FXTRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.5 2006/01/16 21:22:41 jwrdegoede
|
||||
** Fix gcc 4.1 new type-punned ptr breaks antialias. warnings
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.4 2005/08/13 21:06:57 jwrdegoede
|
||||
** Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
**
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 1 10/08/98 11:30a Brent
|
||||
**
|
||||
@@ -93,11 +96,13 @@
|
||||
|
||||
#ifdef GLIDE_PLUG
|
||||
#include "banner.inc"
|
||||
#endif
|
||||
|
||||
/* display the translucent 3Dfx powerfield logo */
|
||||
void
|
||||
_grShamelessPlug(void)
|
||||
{
|
||||
#ifdef GLIDE_PLUG
|
||||
GrState state;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("_grShamelessPlug", 80);
|
||||
@@ -183,5 +188,5 @@ _grShamelessPlug(void)
|
||||
grGlideSetState(&state);
|
||||
|
||||
GR_END();
|
||||
} /* _grShamelessPlug */
|
||||
#endif /* GLIDE_PLUG */
|
||||
} /* _grShamelessPlug */
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.7 2006/01/16 21:22:41 jwrdegoede
|
||||
** Fix gcc 4.1 new type-punned ptr breaks antialias. warnings
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.6 2005/08/13 21:06:57 jwrdegoede
|
||||
** Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
**
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.2 2005/06/09 18:32:08 jwrdegoede
|
||||
** Fixed all warnings with gcc4 -Wall -W -Wno-unused-parameter, except for a couple I believe to be a gcc bug. This has been reported to gcc.
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.1 2003/07/25 07:13:41 dborca
|
||||
** removed debris
|
||||
**
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.7 2007/09/29 13:59:34 koolsmoky
|
||||
** completed grStippleMode and grStipplePattern
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.6 2007/05/19 10:58:19 koolsmoky
|
||||
** force 4x4 dither with alpha dither subtraction
|
||||
**
|
||||
@@ -347,6 +346,9 @@
|
||||
#include "fxglide.h"
|
||||
#include "fxinline.h"
|
||||
|
||||
#include "rcver.h"
|
||||
static char glideIdent[] = "@#%" VERSIONSTR ;
|
||||
|
||||
#if GLIDE_HW_TRI_SETUP
|
||||
static void
|
||||
_grUpdateTriPacketHdr(FxU32 paramMask,
|
||||
@@ -370,6 +372,9 @@ GR_STATE_ENTRY(grAlphaBlendFunction, void,
|
||||
GDBG_INFO_MORE(gc->myLevel, "(%d,%d,%d,%d)\n",
|
||||
rgb_sf, rgb_df, alpha_sf, alpha_df);
|
||||
|
||||
/* Watcom warning suppressor */
|
||||
glideIdent[0] = glideIdent[0];
|
||||
|
||||
alphamode = gc->state.fbi_config.alphaMode;
|
||||
if (alpha_sf != GR_BLEND_ONE && alpha_sf != GR_BLEND_ZERO) {
|
||||
GR_CHECK_W(myName, 1, "unsupported alpha source blend function");
|
||||
@@ -731,7 +736,7 @@ GR_ENTRY(grBufferClear, void, (GrColor_t color, GrAlpha_t alpha, FxU32 depth))
|
||||
{
|
||||
GR_SET_EXPECTED_SIZE(sizeof(FxU32), 1);
|
||||
GR_SET(BROADCAST_ID, hw, bltSize,
|
||||
(((((tileHi - tileLow) * gc->hwDep.cvgDep.xTilePages) - 1) << 16) | 511));/* 511 == (0x1000 >> 3) - 1 */
|
||||
(((((tileHi - tileLow) * gc->hwDep.cvgDep.xTilePages) - 1) << 16) | (0x1000 >> 3) - 1));
|
||||
GR_CHECK_SIZE();
|
||||
}
|
||||
|
||||
@@ -972,10 +977,8 @@ GR_ENTRY(grBufferSwap, void, (FxU32 swapInterval))
|
||||
#endif /* (GLIDE_PLATFORM & GLIDE_HW_CVG) */
|
||||
|
||||
#if ((GLIDE_PLATFORM & GLIDE_HW_CVG) || (GLIDE_PLATFORM & GLIDE_HW_H3))
|
||||
#ifdef GLIDE_PLUG
|
||||
/* optionally display the 3Dfx powerfield logo overlay */
|
||||
if (_GlideRoot.environment.shamelessPlug) _grShamelessPlug();
|
||||
#endif
|
||||
|
||||
/* check for environmental override.
|
||||
*
|
||||
@@ -1838,7 +1841,7 @@ GR_STATE_ENTRY(grFogMode, void, (GrFogMode_t mode))
|
||||
|
||||
switch (mode & 0xFF) { /* switch based on lower 8 bits */
|
||||
case GR_FOG_DISABLE:
|
||||
break;
|
||||
break;
|
||||
|
||||
/*
|
||||
** disable in Glide 3.
|
||||
@@ -1946,7 +1949,7 @@ GR_ENTRY(grFogTable, void, (const GrFog_t fogtable[]))
|
||||
d0 = ((e1 - e0) << 2);
|
||||
|
||||
/* del1 in .2 format - don't access beyond end of table */
|
||||
d1 = ((j == iend) ? e1 : locTable[2]);
|
||||
d1 = ((j == iend) ? e1 : locTable[2]);
|
||||
d1 = (d1 - e1) << 2;
|
||||
|
||||
REG_GROUP_SET(hw, fogTable[j],
|
||||
@@ -2350,7 +2353,7 @@ GR_DDFUNC(_grUpdateParamIndex, void, (void))
|
||||
paramIndex |= STATE_REQUIRES_OOW_FBI;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Now we know everything that needs to be iterated. Prune back
|
||||
** the stuff that isn't explicitly different
|
||||
@@ -2390,7 +2393,7 @@ GR_DDFUNC(_grUpdateParamIndex, void, (void))
|
||||
(gc->state.vData.wInfo.mode == GR_PARAM_DISABLE))
|
||||
paramIndex &= ~STATE_REQUIRES_W_TMU0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Turn off ST for TMU1 if TMU0 is active and TMU1 is not different */
|
||||
@@ -2429,7 +2432,7 @@ GR_DDFUNC(_grUpdateParamIndex, void, (void))
|
||||
(gc->state.vData.wInfo.mode == GR_PARAM_DISABLE))
|
||||
paramIndex &= ~STATE_REQUIRES_W_TMU1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
/* Turn off W for TMU0 if we don't have a hint */
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.3 2007/05/19 11:06:28 koolsmoky
|
||||
** win32 build workaround
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.2 2005/08/13 21:06:57 jwrdegoede
|
||||
** Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
**
|
||||
@@ -1063,9 +1062,11 @@ GR_ENTRY(grLfbReadRegion, FxBool, (GrBuffer_t src_buffer,
|
||||
|
||||
/* Leading slop up to the start of a logical 0 tile */
|
||||
if (((unsigned long)srcData & kPageMask) != 0) {
|
||||
unsigned long tileSlopMask = ~0UL; // XXX was -1UL.
|
||||
unsigned long tileSlopMask = 0UL; // XXX was -1UL.
|
||||
FxU32 tileSlopAdjust = kTileSize;
|
||||
|
||||
tileSlopMask = ~tileSlopMask; // XXX
|
||||
|
||||
/* Do we have a partial 0 tile? */
|
||||
if (((unsigned long)srcData & kTileSize) == 0) {
|
||||
tilePtr = (const FxU32*)((unsigned long)srcData + kTileSize);
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:42:32 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
*/
|
||||
|
||||
#define OFFICIAL 1
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 1 10/08/98 11:30a Brent
|
||||
**
|
||||
@@ -96,7 +99,7 @@ n** -----------------------------------------------------------------------
|
||||
/* Check for OS */
|
||||
#if defined(__IRIX__) || defined(__sparc__) || defined(__linux__)
|
||||
# define GLIDE_OS GLIDE_OS_UNIX
|
||||
#elif defined(__DOS__) || defined(__MSDOS__)
|
||||
#elif defined(__DOS__)
|
||||
# define GLIDE_OS GLIDE_OS_DOS32
|
||||
#elif defined(__WIN32__)
|
||||
# define GLIDE_OS GLIDE_OS_WIN32
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 1 10/08/98 11:30a Brent
|
||||
**
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.9 2007/09/29 14:01:24 koolsmoky
|
||||
** removed false swapInterval envar checks
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.8 2005/08/13 21:06:57 jwrdegoede
|
||||
** Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
**
|
||||
@@ -313,10 +312,10 @@ static GrTexDownloadProc _texDownloadProcs[][2][4] =
|
||||
_grTexDownload_3DNow_MMX,
|
||||
_grTexDownload_3DNow_MMX,
|
||||
},
|
||||
},
|
||||
}
|
||||
#endif /* GL_AMD3D */
|
||||
#if GL_MMX
|
||||
{
|
||||
,{
|
||||
{
|
||||
_grTexDownload_Default_8_1,
|
||||
_grTexDownload_Default_8_2,
|
||||
@@ -329,7 +328,7 @@ static GrTexDownloadProc _texDownloadProcs[][2][4] =
|
||||
_grTexDownload_MMX,
|
||||
_grTexDownload_MMX,
|
||||
},
|
||||
},
|
||||
}
|
||||
#endif /* GL_MMX */
|
||||
};
|
||||
#endif /* GLIDE_DISPATCH_DOWNLOAD */
|
||||
@@ -731,16 +730,8 @@ _GlideInitEnvironment(void)
|
||||
(((envStr = GETENV(__envVar)) == NULL) ? (__defVal) : atol(envStr))
|
||||
|
||||
_GlideRoot.environment.triBoundsCheck = (GETENV("FX_GLIDE_BOUNDS_CHECK") != NULL);
|
||||
#ifdef GLIDE_SPLASH
|
||||
_GlideRoot.environment.noSplash = (GETENV("FX_GLIDE_NO_SPLASH") != NULL);
|
||||
#else
|
||||
_GlideRoot.environment.noSplash = 1;
|
||||
#endif
|
||||
#ifdef GLIDE_PLUG
|
||||
_GlideRoot.environment.shamelessPlug = (GETENV("FX_GLIDE_SHAMELESS_PLUG") != NULL);
|
||||
#else
|
||||
_GlideRoot.environment.shamelessPlug = 0;
|
||||
#endif
|
||||
_GlideRoot.environment.ignoreReopen = (GETENV("FX_GLIDE_IGNORE_REOPEN") != NULL);
|
||||
_GlideRoot.environment.texLodDither = ((GETENV("FX_GLIDE_LOD_DITHER") == NULL)
|
||||
? 0x00UL
|
||||
@@ -806,7 +797,8 @@ _GlideInitEnvironment(void)
|
||||
const char* errStr = s;
|
||||
|
||||
if (pciGetErrorCode() == PCI_ERR_NOERR) {
|
||||
sprintf(s, "%s: expected %s, none detected\n", FN_NAME, GLIDE_DRIVER_NAME);
|
||||
sprintf(s, "%s: glide3x.dll expected %s, none detected\n",
|
||||
FN_NAME, GLIDE_DRIVER_NAME);
|
||||
} else {
|
||||
errStr = pciGetErrorString();
|
||||
}
|
||||
@@ -827,3 +819,4 @@ _GlideInitEnvironment(void)
|
||||
_GlideRoot.initialized = hwDetectP; /* save this for the end */
|
||||
}
|
||||
} /* _GlideInitEnvironment */
|
||||
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.1 2005/06/09 18:32:08 jwrdegoede
|
||||
** Fixed all warnings with gcc4 -Wall -W -Wno-unused-parameter, except for a couple I believe to be a gcc bug. This has been reported to gcc.
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:42:33 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
@@ -129,13 +128,6 @@
|
||||
#include "fxglide.h"
|
||||
#include "fxinline.h"
|
||||
|
||||
#ifndef GLIDE_SPLASH
|
||||
GR_DIENTRY(grSplash,void,(float x,float y,float w,float h,FxU32 _frame)) {
|
||||
/* nothing */
|
||||
}
|
||||
|
||||
#else /* GLIDE_SPLASH */
|
||||
|
||||
/*-----------------------------
|
||||
Constants
|
||||
-----------------------------*/
|
||||
@@ -851,7 +843,7 @@ GR_DIENTRY(grSplash,void,(float x,float y,float w,float h,FxU32 _frame))
|
||||
{ 30.0f, 70.0f, -1000.0f },
|
||||
};
|
||||
GrFog_t *fogTable=0;
|
||||
FxI32 fogTableSize;
|
||||
int fogTableSize;
|
||||
int fadeInFrames, fadeOutFrames;
|
||||
#if defined(GLIDE3) && defined(GLIDE3_ALPHA)
|
||||
FxI32 wrange[2];
|
||||
@@ -1110,4 +1102,4 @@ GR_DIENTRY(grSplash,void,(float x,float y,float w,float h,FxU32 _frame))
|
||||
grVertexLayout(GR_PARAM_Q1, gc->state.vData.q1Info.offset ,
|
||||
gc->state.vData.q1Info.mode);
|
||||
}
|
||||
#endif /* GLIDE_SPLASH */
|
||||
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.8 2005/08/13 21:06:57 jwrdegoede
|
||||
** Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.7 2005/06/09 18:32:08 jwrdegoede
|
||||
** Fixed all warnings with gcc4 -Wall -W -Wno-unused-parameter, except for a couple I believe to be a gcc bug. This has been reported to gcc.
|
||||
**
|
||||
@@ -629,7 +628,8 @@ __tryReOpen:
|
||||
** oem map board
|
||||
*/
|
||||
if (gc->oemInit) {
|
||||
FARPROC oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
|
||||
FARPROC oemInitMapBoard = NULL;
|
||||
oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
|
||||
if (oemInitMapBoard != NULL)
|
||||
oemInitMapBoard(&gc->oemi);
|
||||
else
|
||||
@@ -671,8 +671,8 @@ __tryReOpen:
|
||||
gc->oemi.vid.clkFreq24bpp = tvVidtiming.clkFreq24bpp;
|
||||
|
||||
if (gc->oemInit) {
|
||||
FARPROC oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4");
|
||||
if (oemInitVideoTiming) {
|
||||
FARPROC oemInitVideoTiming = NULL;
|
||||
if (oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4")) {
|
||||
if (oemInitVideoTiming(&gc->oemi.vid)) {
|
||||
/*
|
||||
** video timing is updated by oem dll
|
||||
@@ -778,12 +778,10 @@ __tryReOpen:
|
||||
FARPROC oemGet;
|
||||
FxI32 tv_connected = 0;
|
||||
FxI32 slimaster[2], slislave[2];
|
||||
oemInitSetVideo = GetProcAddress(gc->oemInit, "_fxoemInitSetVideo@4");
|
||||
if (oemInitSetVideo)
|
||||
if (oemInitSetVideo = GetProcAddress(gc->oemInit, "_fxoemInitSetVideo@4"))
|
||||
oemInitSetVideo(&gc->oemi);
|
||||
|
||||
oemGet = GetProcAddress(gc->oemInit, "_fxoemGet@12");
|
||||
if (oemGet) {
|
||||
if (oemGet = GetProcAddress(gc->oemInit, "_fxoemGet@12")) {
|
||||
oemGet(FX_OEM_TVOUT, 4, &tv_connected);
|
||||
/* Is tv connected to the board? */
|
||||
if (tv_connected) {
|
||||
@@ -1226,7 +1224,7 @@ __errSliExit:
|
||||
|
||||
/* Place fifo in hw. Taking all of the remainging memory up to the
|
||||
* byte swizzling bit in the cmd fifo address.
|
||||
*/
|
||||
*/
|
||||
gc->cmdTransportInfo.fifoOffset = memEnd - fifoSize;
|
||||
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_H3)
|
||||
@@ -1408,12 +1406,11 @@ __errSliExit:
|
||||
const GrHwConfiguration* hwConfig = &_GlideRoot.hwConfig;
|
||||
FxU32 textureMode = (FxU32)SST_SEQ_8_DOWNLD;
|
||||
|
||||
/*
|
||||
if ((hwConfig->SSTs[_GlideRoot.current_sst].type == GR_SSTTYPE_VOODOO) &&
|
||||
(hwConfig->SSTs[_GlideRoot.current_sst].sstBoard.VoodooConfig.tmuConfig[tmu].tmuRev == 0)) {
|
||||
textureMode = 0;
|
||||
}
|
||||
*/
|
||||
|
||||
gc->state.tmu_config[tmu].textureMode = textureMode;
|
||||
gc->state.tmu_config[tmu].tLOD = 0x00000000;
|
||||
gc->state.tmu_config[tmu].tDetail = 0x00000000;
|
||||
@@ -1525,12 +1522,11 @@ __errSliExit:
|
||||
/* --------------------------------------------------------
|
||||
Splash Screen
|
||||
--------------------------------------------------------*/
|
||||
#ifdef GLIDE_SPLASH
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
|
||||
if (!_GlideRoot.environment.noSplash) {
|
||||
HMODULE newSplash = LoadLibrary("3dfxspl3.dll");
|
||||
HMODULE newSplash;
|
||||
|
||||
if (newSplash) {
|
||||
if (newSplash = LoadLibrary("3dfxspl3.dll")) {
|
||||
GrState glideState;
|
||||
FxBool didLoad;
|
||||
GrSplashProc fxSplash;
|
||||
@@ -1575,7 +1571,7 @@ __errSliExit:
|
||||
grGlideSetState((const void*)&glideState);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FreeLibrary(newSplash);
|
||||
}
|
||||
}
|
||||
@@ -1589,7 +1585,6 @@ __errSliExit:
|
||||
0);
|
||||
_GlideRoot.environment.noSplash = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
_GlideRoot.windowsInit = FXTRUE; /* to avoid race with grSstControl() */
|
||||
|
||||
@@ -1830,9 +1825,9 @@ _grSstControl(GrControl_t code)
|
||||
if (isValidP) sst1InitVgaPassCtrl(gc->base_ptr, passFlag);
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
|
||||
{
|
||||
FARPROC oemControl = NULL;
|
||||
if (gc->oemInit) {
|
||||
FARPROC oemControl = GetProcAddress(gc->oemInit, "_fxoemControl@4");
|
||||
if (oemControl)
|
||||
if ((oemControl = GetProcAddress(gc->oemInit, "_fxoemControl@4")))
|
||||
oemControl(code);
|
||||
}
|
||||
}
|
||||
@@ -2006,6 +2001,11 @@ GR_ENTRY(guGammaCorrectionRGB, void, (float r, float g, float b))
|
||||
GR_BEGIN_NOFIFOCHECK("guGammaCorrectionValue",80);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%g %g %g)\n",r, g, b);
|
||||
|
||||
GR_CHECK_F(myName,
|
||||
(_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type != GR_SSTTYPE_Voodoo2)
|
||||
|| (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type != GR_SSTTYPE_Voodoo2),
|
||||
"grGammaCorrectionRGB not supported.");
|
||||
|
||||
#if GLIDE_INIT_HAL
|
||||
fxHalInitGamma(hw, gamma);
|
||||
#else /* !GLIDE_INIT_HAL */
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 1 10/08/98 11:30a Brent
|
||||
**
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.2 2005/08/13 21:06:57 jwrdegoede
|
||||
** Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.1 2005/05/07 08:40:18 jwrdegoede
|
||||
** lvalue cast fixes for gcc4
|
||||
**
|
||||
@@ -125,7 +124,6 @@
|
||||
* DD code for strips
|
||||
**
|
||||
*/
|
||||
|
||||
#ifdef GLIDE3
|
||||
#include <3dfx.h>
|
||||
#include <glidesys.h>
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.1 2004/09/27 08:49:42 dborca
|
||||
** fixed debug paths
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:42:34 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.5 2005/08/13 21:06:57 jwrdegoede
|
||||
** Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.4 2004/09/27 08:51:05 dborca
|
||||
** reorg brackets
|
||||
**
|
||||
@@ -903,7 +902,7 @@ GR_ENTRY(grTexDownloadMipMapLevelPartial,
|
||||
? 1 /* 16-bit texture */
|
||||
: 2); /* 8-bit texture */
|
||||
|
||||
if (max_s < 1) max_s = 1;
|
||||
if (max_s <= 0) max_s = 1;
|
||||
if (widthSel > 2) widthSel = 3;
|
||||
|
||||
_GlideRoot.stats.texBytes += max_s * (max_t - t + 1) * 4;
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 1 10/08/98 11:30a Brent
|
||||
**
|
||||
@@ -72,7 +75,7 @@
|
||||
#include "fxinline.h"
|
||||
|
||||
|
||||
static const FxU32 _grResolutionXY[16][2] =
|
||||
const FxU32 _grResolutionXY[16][2] =
|
||||
{
|
||||
{ 320, 200 }, /* 320x200 */
|
||||
{ 320, 240 }, /* 320x240 */
|
||||
@@ -185,73 +188,6 @@ GR_DIENTRY(guFogGenerateLinear, void,
|
||||
}
|
||||
} /* guFogGenerateLinear */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: guEncodeRle
|
||||
Date: 3/5/96
|
||||
Implementor(s): jdt
|
||||
Library: Glide Utilities
|
||||
Description:
|
||||
Encode an RGB565 image into RLE16 format
|
||||
Arguments:
|
||||
dst - destination rle image data ( NULL for bytecount only )
|
||||
src - source rgb565 image data
|
||||
width - width of source data
|
||||
height - height of source data
|
||||
Return:
|
||||
number of bytes in encoded rle image
|
||||
-------------------------------------------------------------------*/
|
||||
GR_ENTRY( guEncodeRLE16, int, ( void *dst, void *src, FxU32 width, FxU32 height ))
|
||||
{
|
||||
int byteCount = 0;
|
||||
int sourceImageSizeInWords;
|
||||
FxU16 *srcPixels;
|
||||
FxU32 *dstPixels;
|
||||
|
||||
sourceImageSizeInWords = width * height;
|
||||
|
||||
srcPixels = src;
|
||||
|
||||
if ( dst ) {
|
||||
dstPixels = dst;
|
||||
while( sourceImageSizeInWords-- ) {
|
||||
short length = 1;
|
||||
short color = *srcPixels;
|
||||
int lookAhead = 1;
|
||||
|
||||
while( (sourceImageSizeInWords-length)&&
|
||||
(color == srcPixels[lookAhead]) ) {
|
||||
length++;
|
||||
lookAhead++;
|
||||
}
|
||||
|
||||
*dstPixels = ((((FxU32)length)<<16) | ((FxU32)color));
|
||||
dstPixels++;
|
||||
|
||||
byteCount+=4;
|
||||
|
||||
srcPixels+=length;
|
||||
sourceImageSizeInWords-=length;
|
||||
}
|
||||
} else {
|
||||
while( sourceImageSizeInWords-- ) {
|
||||
short length = 1;
|
||||
short color = *srcPixels;
|
||||
int lookAhead = 1;
|
||||
|
||||
while( (sourceImageSizeInWords-length)&&
|
||||
(color == srcPixels[lookAhead]) ) {
|
||||
length++;
|
||||
lookAhead++;
|
||||
}
|
||||
|
||||
byteCount+=4;
|
||||
srcPixels+=length;
|
||||
sourceImageSizeInWords-=length;
|
||||
}
|
||||
}
|
||||
return byteCount;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: guQueryResolutionXYExt
|
||||
Date: 02-July-97
|
||||
@@ -273,3 +209,9 @@ GR_DDFUNC(guQueryResolutionXY, void, (GrScreenResolution_t res, FxU32 *x, FxU32
|
||||
|
||||
#undef FN_NAME
|
||||
} /* guQueryResolutionXYExt */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 1 10/08/98 11:30a Brent
|
||||
**
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.2 2006/01/16 21:22:41 jwrdegoede
|
||||
** Fix gcc 4.1 new type-punned ptr breaks antialias. warnings
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.1 2005/06/17 14:18:49 jwrdegoede
|
||||
** Fix few warnings when USE_X86=1 is not set
|
||||
**
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
*/
|
||||
|
||||
/*#include "fxbldno.h"*/
|
||||
//#include "fxbldno.h"
|
||||
|
||||
#define MANVERSION 3
|
||||
#define MANREVISION 03
|
||||
@@ -26,7 +26,7 @@
|
||||
#define BUILD_NUMBER 40405
|
||||
|
||||
#ifndef GLIDE3
|
||||
#define VERSIONSTR "2.60\0"
|
||||
#define VERSIONSTR "2.44\0"
|
||||
#else
|
||||
#define VERSIONSTR "3.03\0"
|
||||
#endif
|
||||
|
||||
64
glide3x/cvg/glide3/src/rcver.h~
Normal file
64
glide3x/cvg/glide3/src/rcver.h~
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
** 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
|
||||
*/
|
||||
|
||||
#include "fxbldno.h"
|
||||
|
||||
#define MANVERSION 3
|
||||
#define MANREVISION 03
|
||||
|
||||
//#define BUILD_NUMBER 40405
|
||||
|
||||
#ifndef GLIDE3
|
||||
#define VERSIONSTR "2.44\0"
|
||||
#else
|
||||
#define VERSIONSTR "3.03\0"
|
||||
#endif
|
||||
|
||||
#ifdef SST1
|
||||
# define HWSTR "Voodoo Graphics(tm)\0"
|
||||
# ifdef NT_BUILD
|
||||
# define PRODNAME "Glide(tm) for Voodoo Graphics\251 and Windows\256 NT\0"
|
||||
# else
|
||||
# define PRODNAME "Glide(tm) for Voodoo Graphics\251 and Windows\256 95/98\0"
|
||||
# endif /* NT_BUILD */
|
||||
#elif defined(SST96)
|
||||
# define HWSTR " Voodoo Rush(tm)\0"
|
||||
# ifdef NT_BUILD
|
||||
# define PRODNAME "Glide(tm) for Voodoo Rush\251 and Windows\256 NT\0"
|
||||
# else
|
||||
# define PRODNAME "Glide(tm) for Voodoo Rush\251 and Windows\256 95/98\0"
|
||||
# endif /* NT_BUILD */
|
||||
#elif defined(CVG) || defined(VOODOO2)
|
||||
# define HWSTR " Voodoo^2(tm)\0"
|
||||
# ifdef NT_BUILD
|
||||
# define PRODNAME "Glide(tm) for Voodoo^2\251 and Windows\256 NT\0"
|
||||
# else
|
||||
# define PRODNAME "Glide(tm) for Voodoo^2\251 and Windows\256 95/98\0"
|
||||
# endif /* NT_BUILD */
|
||||
#elif defined(H3)
|
||||
# define HWSTR " Banshee(tm)\0"
|
||||
# ifdef NT_BUILD
|
||||
# define PRODNAME "Glide(tm) for Banshee\251 and Windows\256 NT\0"
|
||||
# else
|
||||
# define PRODNAME "Glide(tm) for Banshee\251 and Windows\256 95/98\0"
|
||||
# endif /* NT_BUILD */
|
||||
#else
|
||||
# define HWSTR "Unknown Chip\0"
|
||||
#endif
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.2 2007/05/19 11:06:47 koolsmoky
|
||||
** win32 build workaround
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1.8.1 2005/06/09 18:32:08 jwrdegoede
|
||||
** Fixed all warnings with gcc4 -Wall -W -Wno-unused-parameter, except for a couple I believe to be a gcc bug. This has been reported to gcc.
|
||||
**
|
||||
@@ -10681,7 +10680,7 @@ static Gu3dfInfo hilite_3dfinfo = {
|
||||
#endif
|
||||
GR_TEXFMT_INTENSITY_8 /* format */
|
||||
},
|
||||
{ { { 0x00 } } }, /* table */
|
||||
{ 0x00000000 }, /* table */
|
||||
NULL, /* data */
|
||||
0x00000ab0 /* mem_required */
|
||||
};
|
||||
@@ -12072,7 +12071,7 @@ static Gu3dfInfo shadow_3dfinfo = {
|
||||
#endif
|
||||
GR_TEXFMT_INTENSITY_8 /* format */
|
||||
},
|
||||
{ { { 0x00 } } }, /* table */
|
||||
{ 0x0000000 }, /* table */
|
||||
NULL, /* data */
|
||||
0x00000ab0 /* mem_required */
|
||||
};
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
*/
|
||||
|
||||
/* $Header$ */
|
||||
/* $Revision$ */
|
||||
/* $Log$ */
|
||||
/* */
|
||||
/* 1 10/08/98 11:30a Brent */
|
||||
/* */
|
||||
/* 5 10/07/98 9:43p Peter */
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
;;
|
||||
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
;;
|
||||
;; Revision 1.1.1.1.8.3 2004/11/25 19:11:02 koolsmoky
|
||||
;; set up 3dnow! triangle/vertex list routines
|
||||
;;
|
||||
;; $Header$
|
||||
;; $Revision$
|
||||
;; $Log$
|
||||
;; Revision 1.1.1.1.8.2 2004/10/04 09:19:25 dborca
|
||||
;; handle STDCALL correctly
|
||||
;;
|
||||
@@ -96,7 +96,7 @@ extrn _FifoMakeRoom
|
||||
|
||||
%ENDMACRO ; WRITE_MM1LOW_FIFO
|
||||
|
||||
segment SEG_DATA
|
||||
segment DATA
|
||||
One DD 1.0
|
||||
Area DD 0
|
||||
|
||||
@@ -119,7 +119,7 @@ _vc$ equ 12 + STKOFF
|
||||
X equ 0
|
||||
Y equ 4
|
||||
|
||||
segment SEG_CONST
|
||||
segment CONST
|
||||
T2003 DD 12288.0 ; 12288
|
||||
T2005 DD 1.0 ; 1
|
||||
T2006 DD 256.0 ; 256
|
||||
@@ -134,7 +134,7 @@ T2006 DD 256.0 ; 256
|
||||
|
||||
;--------------------------------------------------------------------------
|
||||
|
||||
segment SEG_TEXT
|
||||
segment TEXT
|
||||
|
||||
ALIGN 32
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
;;
|
||||
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
;;
|
||||
;; Revision 1.1.1.1.8.2 2005/01/13 15:46:50 koolsmoky
|
||||
;; prepare for packed rgb
|
||||
;;
|
||||
;; $Header$
|
||||
;; $Revision$
|
||||
;; $Log$
|
||||
;; Revision 1.1.1.1.8.1 2003/11/03 13:34:29 dborca
|
||||
;; Voodoo2 happiness (DJGPP & Linux)
|
||||
;;
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
*/
|
||||
|
||||
/* $Header$ */
|
||||
/* $Revision$ */
|
||||
/* $Log$ */
|
||||
/* */
|
||||
/* 2 10/30/97 6:53p Peter */
|
||||
/* first real cut at tri asm */
|
||||
/* */
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
extrn _GlideRoot
|
||||
extrn _FifoMakeRoom
|
||||
|
||||
segment SEG_CONST
|
||||
segment CONST
|
||||
ALIGN 8
|
||||
_F256_F256 DD 256.0, 256.0
|
||||
|
||||
segment SEG_DATA
|
||||
segment DATA
|
||||
ALIGN 8
|
||||
btab DD 0, 0, 0, 0, 0, 0, 0, 0
|
||||
atab DD 0, 0, 0, 0, 0, 0, 0, 0
|
||||
@@ -42,7 +42,7 @@ vSize DD 0
|
||||
strideinbytes DD 0
|
||||
vertices DD 0
|
||||
|
||||
segment SEG_TEXT
|
||||
segment TEXT
|
||||
|
||||
_pktype equ 20
|
||||
_type equ 24
|
||||
@@ -3805,14 +3805,14 @@ endp
|
||||
extrn _GlideRoot
|
||||
extrn _FifoMakeRoom
|
||||
|
||||
segment SEG_CONST
|
||||
segment CONST
|
||||
_F1 DD 1.0
|
||||
_F256 DD 256.0
|
||||
|
||||
_VPF1 DD 1.0
|
||||
_VPF256 DD 256.0
|
||||
|
||||
segment SEG_DATA
|
||||
segment DATA
|
||||
vSize DD 0
|
||||
ccoow DD 0
|
||||
packetVal DD 0
|
||||
@@ -3835,7 +3835,7 @@ xc DD 0
|
||||
yc DD 0
|
||||
zArea DD 0
|
||||
|
||||
segment SEG_TEXT
|
||||
segment TEXT
|
||||
%define _pktype 20
|
||||
%define _type 24
|
||||
%define _mode 28
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
;
|
||||
; compulsory header for glide3/xdraw* assembly specializations (NASM)
|
||||
;
|
||||
; Revision 1.1.2.3 2004/10/04 08:57:52 dborca
|
||||
; supporting DOS/OpenWatcom in Assembly files
|
||||
; $Header$
|
||||
; $Log$
|
||||
;
|
||||
; Revision 1.1.2.1 2003/06/07 09:53:25 dborca
|
||||
; initial checkin for NASM sources
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
%macro endp 0
|
||||
%ifnctx proc
|
||||
%error Mismatched ENDP/PROC
|
||||
%error Mismatched `endp'/`proc'
|
||||
%else
|
||||
%pop
|
||||
%endif
|
||||
@@ -102,9 +102,9 @@
|
||||
;---------------------------------------
|
||||
%if XOS == XOS_WIN32
|
||||
|
||||
%define SEG_TEXT .text align=32
|
||||
%define SEG_DATA .data align=32
|
||||
%define SEG_CONST .rdata align=32
|
||||
%define TEXT .text align=32
|
||||
%define DATA .data align=32
|
||||
%define CONST .rdata align=32
|
||||
|
||||
%macro GET_GC 0
|
||||
mov gc, [_GlideRoot + curGC]
|
||||
@@ -117,9 +117,9 @@
|
||||
;---------------------------------------
|
||||
%if XOS == XOS_DJGPP
|
||||
|
||||
%define SEG_TEXT .text
|
||||
%define SEG_DATA .data
|
||||
%define SEG_CONST .rodata
|
||||
%define TEXT .text
|
||||
%define DATA .data
|
||||
%define CONST .rodata
|
||||
|
||||
%macro GET_GC 0
|
||||
mov gc, [_GlideRoot + curGC]
|
||||
@@ -132,9 +132,9 @@
|
||||
;---------------------------------------
|
||||
%if XOS == XOS_LINUX
|
||||
|
||||
%define SEG_TEXT .text align=32
|
||||
%define SEG_DATA .data align=32
|
||||
%define SEG_CONST .rodata align=32
|
||||
%define TEXT .text align=32
|
||||
%define DATA .data align=32
|
||||
%define CONST .rodata align=32
|
||||
|
||||
%macro GET_GC 0
|
||||
mov gc, [_GlideRoot + curGC]
|
||||
@@ -147,9 +147,9 @@
|
||||
;---------------------------------------
|
||||
%if XOS == XOS_WATCD
|
||||
|
||||
%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
|
||||
%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
|
||||
|
||||
%macro GET_GC 0
|
||||
mov gc, [_GlideRoot + curGC]
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
*/
|
||||
|
||||
/* $Header$ */
|
||||
/* $Revision$ */
|
||||
/* $Log$ */
|
||||
/* */
|
||||
/* 1 10/08/98 11:30a Brent */
|
||||
/* */
|
||||
/* 3 10/07/98 9:43p Peter */
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
;;
|
||||
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
;;
|
||||
;; Revision 1.1.1.1.8.4 2007/06/23 08:50:57 koolsmoky
|
||||
;; removed unneeded emms calls
|
||||
;;
|
||||
;; $Header$
|
||||
;; $Revision$
|
||||
;; $Log$
|
||||
;; Revision 1.1.1.1.8.3 2005/06/09 18:32:08 jwrdegoede
|
||||
;; Fixed all warnings with gcc4 -Wall -W -Wno-unused-parameter, except for a couple I believe to be a gcc bug. This has been reported to gcc.
|
||||
;;
|
||||
@@ -123,7 +123,7 @@ _texData$ equ 24 + STACKOFFSET
|
||||
;
|
||||
;--------------------------------------------------------------------------
|
||||
|
||||
segment SEG_TEXT
|
||||
segment TEXT
|
||||
|
||||
ALIGN 32
|
||||
|
||||
@@ -342,7 +342,7 @@ endp
|
||||
;
|
||||
;--------------------------------------------------------------------------
|
||||
|
||||
segment SEG_TEXT
|
||||
segment TEXT
|
||||
|
||||
ALIGN 32
|
||||
|
||||
@@ -533,7 +533,7 @@ endp
|
||||
|
||||
|
||||
|
||||
;segment SEG_TEXT
|
||||
;segment TEXT
|
||||
|
||||
ALIGN 32
|
||||
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** Revision 1.1.1.1.8.1 2005/08/13 21:06:57 jwrdegoede
|
||||
** Last needed 64 bit fixes for h5/h3, complete 64 bit support for cvg
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:42:38 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
@@ -18,18 +21,17 @@
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .o .exe
|
||||
.SECONDARY: tlib.o fxos.o
|
||||
.SECONDARY: tlib.o
|
||||
|
||||
FX_GLIDE_HW = cvg
|
||||
TOP = ../../..
|
||||
CPU ?= pentium
|
||||
|
||||
UNLINK = rm -f $(1)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -O2 -ffast-math -mtune=$(CPU)
|
||||
CFLAGS = -Wall -O2 -ffast-math -mcpu=$(CPU)
|
||||
CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc
|
||||
CFLAGS += -I$(TOP)/swlibs/fxmisc
|
||||
CFLAGS += -D__DOS__ -DCVG
|
||||
@@ -38,9 +40,9 @@ CFLAGS += -D__DOS32__
|
||||
LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib
|
||||
|
||||
ifdef DXE
|
||||
LDLIBS = -lglide3i
|
||||
LDLIBS = -lgld3i
|
||||
else
|
||||
LDLIBS = -lglide3x
|
||||
LDLIBS = -lgld3x
|
||||
endif
|
||||
|
||||
.c.o:
|
||||
@@ -50,13 +52,3 @@ endif
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
|
||||
sbench.exe: sbench.o fxos.o tlib.o
|
||||
$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
fxos.o: $(TOP)/swlibs/fxmisc/fxos.c
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
|
||||
clean:
|
||||
-$(call UNLINK,*.o)
|
||||
-$(call UNLINK,*.exe)
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
@@ -16,16 +19,17 @@
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .o .exe
|
||||
.SECONDARY: tlib.o linutil.o
|
||||
.SECONDARY: tlib.o
|
||||
|
||||
FX_GLIDE_HW = cvg
|
||||
TOP = ../../..
|
||||
CPU ?= pentium
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -O2 -ffast-math -mtune=$(CPU)
|
||||
CFLAGS = -Wall -O2 -ffast-math -mcpu=$(CPU)
|
||||
CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc -I$(TOP)/$(FX_GLIDE_HW)/init
|
||||
CFLAGS += -I$(TOP)/swlibs/fxmisc
|
||||
CFLAGS += -DCVG
|
||||
@@ -37,15 +41,8 @@ LDLIBS += -lm
|
||||
|
||||
.c.o:
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
%.exe: linutil.o tlib.o %.o
|
||||
%.exe: $(TOP)/swlibs/fxmisc/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 $<
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f *.exe
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
# OpenWatcom tests makefile for Glide3
|
||||
# This makefile MUST be processed by GNU make!!!
|
||||
# Building under native DOS is not supported:
|
||||
# only tested under Win32 or Linux
|
||||
#
|
||||
# Copyright (c) 2004 - Borca Daniel
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
@@ -21,31 +22,20 @@
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .obj .exe
|
||||
.SECONDARY: tlib.obj fxos.obj
|
||||
.SECONDARY: tlib.obj
|
||||
|
||||
FX_GLIDE_HW = cvg
|
||||
TOP = ../../..
|
||||
|
||||
# detect if running under unix by finding 'rm' in $PATH :
|
||||
ifeq ($(wildcard $(addsuffix /rm,$(subst :, ,$(PATH)))),)
|
||||
DOSMODE= 1
|
||||
UNLINK = del $(subst /,\,$(1))
|
||||
FIXPATH= $(subst /,\,$1)
|
||||
else
|
||||
DOSMODE= 0
|
||||
UNLINK = $(RM) $(1)
|
||||
FIXPATH= $1
|
||||
endif
|
||||
|
||||
CC = wcl386
|
||||
CFLAGS = -bt=dos -wx -zq
|
||||
INCPATH = -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc
|
||||
INCPATH += -I$(TOP)/swlibs/fxmisc
|
||||
CFLAGS = -wx
|
||||
CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc
|
||||
CFLAGS += -I$(TOP)/swlibs/fxmisc
|
||||
CFLAGS += -D__DOS__ -DCVG
|
||||
CFLAGS += -D__DOS32__
|
||||
CFLAGS += $(call FIXPATH,$(INCPATH))
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -od -d2
|
||||
@@ -54,21 +44,18 @@ CPU ?= 5s
|
||||
CFLAGS += -ox -$(CPU)
|
||||
endif
|
||||
|
||||
# pick either of causeway, dos4g, dos32a or stub32a as link target
|
||||
LDFLAGS = -zq -k16384 -l=dos32a
|
||||
LDFLAGS = -k16384
|
||||
|
||||
LDLIBS = $(TOP)/$(FX_GLIDE_HW)/lib/glide3x.lib
|
||||
|
||||
# Watcom woes: pass parameters through environment vars
|
||||
export WCC386 = $(subst /,\,$(CFLAGS))
|
||||
export WCL386 = -zq
|
||||
|
||||
.c.obj:
|
||||
$(CC) $(CFLAGS) -fo=$@ -c $<
|
||||
$(CC) -fo=$@ -c $<
|
||||
%.exe: tlib.obj %.obj
|
||||
$(CC) -fe=$@ $(LDFLAGS) $^ $(call FIXPATH,$(LDLIBS))
|
||||
$(CC) -fe=$@ $(LDFLAGS) $^ $(subst /,\,$(LDLIBS))
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
|
||||
sbench.exe: sbench.obj fxos.obj tlib.obj
|
||||
$(CC) -fe=$@ $(LDFLAGS) $^ $(call FIXPATH,$(LDLIBS))
|
||||
|
||||
fxos.obj: $(call FIXPATH,$(TOP)/swlibs/fxmisc/fxos.c)
|
||||
$(CC) $(CFLAGS) -fo=$@ -c $<
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
# Email : dborca@users.sourceforge.net
|
||||
# Web : http://www.geocities.com/dborca
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
@@ -19,16 +22,17 @@
|
||||
# <file.exe> build a specific file
|
||||
#
|
||||
|
||||
|
||||
.PHONY: all
|
||||
.SUFFIXES: .c .obj .exe
|
||||
.SECONDARY: tlib.obj fxos.obj
|
||||
.SECONDARY: tlib.obj
|
||||
|
||||
FX_GLIDE_HW ?= cvg
|
||||
TOP = ../../..
|
||||
CPU ?= 6
|
||||
|
||||
CC = cl
|
||||
CFLAGS = -nologo -W3 -D__MSC__=1 -DNDEBUG -G$(CPU) -O2 -MT
|
||||
CFLAGS = -nologo -W3 -WX -D__MSC__=1 -DNDEBUG -G$(CPU) -O2 -MT
|
||||
CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc
|
||||
CFLAGS += -I$(TOP)/swlibs/fxmisc
|
||||
CFLAGS += -D__WIN32__ -DCVG
|
||||
@@ -44,9 +48,3 @@ LDLIBS = user32.lib gdi32.lib $(TOP)/$(FX_GLIDE_HW)/lib/glide3x.lib
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
|
||||
sbench.exe: sbench.obj fxos.obj tlib.obj
|
||||
$(LD) -out:$@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
fxos.obj: $(TOP)/swlibs/fxmisc/fxos.c
|
||||
$(CC) -Fo$@ $(CFLAGS) -c $<
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -27,6 +32,11 @@ static const char name[] = "display";
|
||||
static const char purpose[] = "display a 16 bit frame buffer (565 format) dump out";
|
||||
static const char usage[] = "-n <frames> -r <res> -s srcimage -t testimage";
|
||||
|
||||
static const char *renderBufferString[] = {
|
||||
"GR_BUFFER_FRONTBUFFER",
|
||||
"GR_BUFFER_BACKBUFFER "
|
||||
};
|
||||
|
||||
static const char *sourceFormatString[] = {
|
||||
"GR_LFB_SRC_FMT_565 ",
|
||||
"GR_LFB_SRC_FMT_555 ",
|
||||
@@ -51,8 +61,7 @@ static void imageConvert( void *dst,
|
||||
GrLfbSrcFmt_t format,
|
||||
FxU32 *bpp );
|
||||
|
||||
int main( int argc, char **argv)
|
||||
{
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -68,7 +77,7 @@ int main( int argc, char **argv)
|
||||
LFB_Img src, dst, diff;
|
||||
FxBool txtdisplay = FXTRUE;
|
||||
|
||||
void *image = NULL;
|
||||
void *image;
|
||||
FxU32 bpp;
|
||||
|
||||
GrLfbSrcFmt_t sourceFormat;
|
||||
@@ -80,13 +89,13 @@ int main( int argc, char **argv)
|
||||
dstfname[0] = 0;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrst", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrst", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -152,8 +161,8 @@ int main( int argc, char **argv)
|
||||
/* readng the LFB file header */
|
||||
fread(&src.signature, 4, 1, fp);
|
||||
if (src.signature != IMAGE_SRLE) {
|
||||
printf("%s file type incorrect\n", srcfname);
|
||||
return -1;
|
||||
printf("%s file type incorrect\n");
|
||||
return;
|
||||
}
|
||||
fread(&src.width, 2, 1, fp);
|
||||
fread(&src.height, 2, 1, fp);
|
||||
@@ -186,8 +195,8 @@ int main( int argc, char **argv)
|
||||
/* readng the LFB file header */
|
||||
fread(&dst.signature, 4, 1, fp);
|
||||
if (dst.signature != IMAGE_SRLE) {
|
||||
printf("%s file type incorrect\n", dstfname);
|
||||
return -1;
|
||||
printf("%s file type incorrect\n");
|
||||
return;
|
||||
}
|
||||
fread(&dst.width, 2, 1, fp);
|
||||
fread(&dst.height, 2, 1, fp);
|
||||
@@ -205,7 +214,6 @@ int main( int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
diff.data = NULL;
|
||||
diff.width = 0;
|
||||
diff.height = 0;
|
||||
|
||||
@@ -251,7 +259,7 @@ int main( int argc, char **argv)
|
||||
}
|
||||
if ( ( imageWidth > (FxU32)scrWidth ) ||
|
||||
( imageHeight > (FxU32)scrHeight ) )
|
||||
return -1;
|
||||
return;
|
||||
|
||||
while( frames-- ) {
|
||||
|
||||
@@ -343,7 +351,7 @@ int main( int argc, char **argv)
|
||||
if (srcfname[0] && dstfname[0])
|
||||
free(diff.data);
|
||||
free(image);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
15
glide3x/cvg/glide3/tests/makefile.distrib
Normal file
15
glide3x/cvg/glide3/tests/makefile.distrib
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
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) -lglide3 -lm
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
@@ -22,7 +27,7 @@ static const char name[] = "sbench";
|
||||
static const char purpose[] = "benchmark grDrawVertexArray for gouraud shaded triangle";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename> -l <primitive type> -v <vertex array size> -t <triangel size> -p -a";
|
||||
|
||||
void Usage(void)
|
||||
char *Usage(void)
|
||||
{
|
||||
printf (" -l <type> => primitive type\n");
|
||||
printf (" => 0 point\n");
|
||||
@@ -36,6 +41,7 @@ void Usage(void)
|
||||
printf (" -t <size> => triangle size\n");
|
||||
printf (" -p => packed color\n");
|
||||
printf (" -a => antialiased\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -59,7 +65,7 @@ setVertexXyzRgbaSt( FxFloat *v, FxFloat x, FxFloat y, FxFloat z,
|
||||
*(v+GR_VERTEX_TOW_TMU1_OFFSET) = t * 1.f;
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
main( int argc, char **argv)
|
||||
{
|
||||
char
|
||||
@@ -99,14 +105,14 @@ main( int argc, char **argv)
|
||||
FxU32 wrange[2];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while((rv = tlGetOpt(argc, argv, args, &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, args, &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
Usage();
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -275,15 +281,15 @@ main( int argc, char **argv)
|
||||
0.5f, 0.5f);
|
||||
|
||||
if (packedrgb) {
|
||||
*(FxU32*) &vPtrArray[v][GR_VERTEX_R_OFFSET] =
|
||||
(FxU32) vPtrArray[v][GR_VERTEX_R_OFFSET] =
|
||||
((unsigned char) (vPtrArray[v][GR_VERTEX_R_OFFSET]) << 16) |
|
||||
((unsigned char) (vPtrArray[v][GR_VERTEX_G_OFFSET]) << 8) |
|
||||
((unsigned char) (vPtrArray[v][GR_VERTEX_B_OFFSET]));
|
||||
*(FxU32*) &vPtrArray[v][GR_VERTEX_R_OFFSET] |= 0xff000000;
|
||||
(FxU32) vPtrArray[v][GR_VERTEX_R_OFFSET] |= 0xff000000;
|
||||
}
|
||||
}
|
||||
} else { /* listType == GR_TRIANGLE_FAN */
|
||||
#define FX_PI 3.1415f
|
||||
#define PI 3.1415f
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -301,7 +307,7 @@ main( int argc, char **argv)
|
||||
float
|
||||
theta;
|
||||
|
||||
theta = FX_PI - ((((float) v / (float) nVerts)) * FX_PI);
|
||||
theta = PI - ((((float) v / (float) nVerts)) * PI);
|
||||
|
||||
x = ((float) cos(theta) + 1.f) / 2.f;
|
||||
y = (float) sin(theta);
|
||||
@@ -320,7 +326,7 @@ main( int argc, char **argv)
|
||||
|
||||
float x, y;
|
||||
float area = tSize * tSize / 2;
|
||||
float r = (float)sqrt((vsize - 2) * area / FX_PI);
|
||||
float r = (float)sqrt((vsize - 2) * area / PI);
|
||||
|
||||
if (v == 0) {
|
||||
x = 0.5f;
|
||||
@@ -336,7 +342,7 @@ main( int argc, char **argv)
|
||||
float
|
||||
theta;
|
||||
|
||||
theta = FX_PI - ((((float) (v-1) / (float) (vsize - 2))) * 2.f * FX_PI);
|
||||
theta = PI - ((((float) (v-1) / (float) (vsize - 2))) * 2.f * PI);
|
||||
|
||||
x = (float) cos(theta) * r;
|
||||
y = (float) sin(theta) * r;
|
||||
@@ -350,11 +356,11 @@ main( int argc, char **argv)
|
||||
vPtrArray[v][GR_VERTEX_A_OFFSET] = 255.f;
|
||||
}
|
||||
if (packedrgb) {
|
||||
*(FxU32*) &vPtrArray[v][GR_VERTEX_R_OFFSET] =
|
||||
(FxU32) vPtrArray[v][GR_VERTEX_R_OFFSET] =
|
||||
((unsigned char) (vPtrArray[v][GR_VERTEX_R_OFFSET]) << 16) |
|
||||
((unsigned char) (vPtrArray[v][GR_VERTEX_G_OFFSET]) << 8) |
|
||||
((unsigned char) (vPtrArray[v][GR_VERTEX_B_OFFSET]));
|
||||
*(FxU32*) &vPtrArray[v][GR_VERTEX_R_OFFSET] |= 0xff000000;
|
||||
(FxU32) vPtrArray[v][GR_VERTEX_R_OFFSET] |= 0xff000000;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -421,5 +427,10 @@ main( int argc, char **argv)
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
} /* main */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
/*
|
||||
** Insert new header here
|
||||
**
|
||||
**
|
||||
** $Revision$
|
||||
** $Date$
|
||||
**
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -18,7 +27,7 @@ static const char name[] = "test00";
|
||||
static const char purpose[] = "Clear screen to blue";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int
|
||||
void
|
||||
main( int argc, char **argv)
|
||||
{
|
||||
char match;
|
||||
@@ -38,13 +47,13 @@ main( int argc, char **argv)
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -113,6 +122,6 @@ main( int argc, char **argv)
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
BIN
glide3x/cvg/glide3/tests/test00.exe
Normal file
BIN
glide3x/cvg/glide3/tests/test00.exe
Normal file
Binary file not shown.
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -19,7 +24,7 @@ static const char name[] = "test01";
|
||||
static const char purpose[] = "draws a diagonal line of points from top-left to bottom-right";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int
|
||||
void
|
||||
main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
@@ -38,13 +43,13 @@ main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -133,7 +138,7 @@ main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -19,7 +24,7 @@ static const char name[] = "test02";
|
||||
static const char purpose[] = "draws a parabolic envelope of lines";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -37,13 +42,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -136,7 +141,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -19,7 +24,7 @@ static const char name[] = "test03";
|
||||
static const char purpose[] = "draws gouraud shaded lines";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -37,13 +42,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -131,7 +136,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -19,7 +24,7 @@ static const char name[] = "test04";
|
||||
static const char purpose[] = "draws gouraud shaded triangle";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -37,13 +42,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -135,7 +140,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
BIN
glide3x/cvg/glide3/tests/test04a
Normal file
BIN
glide3x/cvg/glide3/tests/test04a
Normal file
Binary file not shown.
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -19,7 +24,7 @@ static const char name[] = "test04";
|
||||
static const char purpose[] = "draws gouraud shaded triangle";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -37,13 +42,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -136,7 +141,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -19,7 +24,7 @@ static const char name[] = "test05";
|
||||
static const char purpose[] = "renders two interpenetrating triangles with z-buffering";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int
|
||||
void
|
||||
main( int argc, char **argv)
|
||||
{
|
||||
char match;
|
||||
@@ -39,13 +44,13 @@ main( int argc, char **argv)
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -169,7 +174,7 @@ main( int argc, char **argv)
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -19,7 +24,7 @@ static const char name[] = "test06";
|
||||
static const char purpose[] = "renders two interpenetrating triangles with w-buffering";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -37,13 +42,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -167,7 +172,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -19,7 +24,7 @@ static const char name[] = "test07";
|
||||
static const char purpose[] = "alpha blending test";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -36,13 +41,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -148,7 +153,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -19,7 +24,7 @@ static const char name[] = "test08";
|
||||
static const char purpose[] = "fogging";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -30,7 +35,7 @@ int main( int argc, char **argv) {
|
||||
int frames = -1;
|
||||
FxBool scrgrab = FXFALSE;
|
||||
char filename[256];
|
||||
FxI32 ftsize = 0;
|
||||
int ftsize = 0;
|
||||
GrFog_t *fogtable = NULL;
|
||||
|
||||
/* Initialize Glide */
|
||||
@@ -38,13 +43,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -153,7 +158,7 @@ int main( int argc, char **argv) {
|
||||
|
||||
grGlideShutdown();
|
||||
free(fogtable);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -21,7 +26,7 @@ static const char purpose[] = "chromakey and chromarange - render a red and blue
|
||||
" triangle but chromakey one out";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -43,13 +48,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -185,7 +190,7 @@ int main( int argc, char **argv) {
|
||||
cnt = strcspn(filename, ".");
|
||||
strncpy(fname, filename, cnt);
|
||||
fname[cnt] = 0;
|
||||
sprintf(tmp,"_%d", subframe);
|
||||
sprintf(tmp,"_%d\0", subframe);
|
||||
strcat(fname, tmp);
|
||||
strcat(fname, filename+cnt);
|
||||
if (!tlScreenDump(fname, (FxU16)scrWidth, (FxU16)scrHeight))
|
||||
@@ -225,7 +230,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -21,7 +26,7 @@ static const char purpose[] = "culling test - render a red and blue"
|
||||
", blue negative";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -41,13 +46,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -149,7 +154,7 @@ int main( int argc, char **argv) {
|
||||
cnt = strcspn(filename, ".");
|
||||
strncpy(fname, filename, cnt);
|
||||
fname[cnt] = 0;
|
||||
sprintf(tmp,"_%d", subframe);
|
||||
sprintf(tmp,"_%d\0", subframe);
|
||||
strcat(fname, tmp);
|
||||
strcat(fname, filename+cnt);
|
||||
if (!tlScreenDump(fname, (FxU16)scrWidth, (FxU16)scrHeight))
|
||||
@@ -182,7 +187,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include <glide.h>
|
||||
@@ -22,7 +27,7 @@ static const char usage[] = "-n <frames> -r <res>";
|
||||
static int rRandom(int s, int e);
|
||||
static unsigned int iRandom (unsigned int maxr);
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -42,13 +47,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nr", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -133,7 +138,7 @@ int main( int argc, char **argv) {
|
||||
|
||||
if ( tlScaleX(1.0f) < 64.0 ||
|
||||
tlScaleY(1.0f) < 64.0 )
|
||||
return -1;
|
||||
return;
|
||||
|
||||
/* generate random start position */
|
||||
startX = (int)rRandom( 64, (int)tlScaleX(1.0f) - 65 );
|
||||
@@ -208,7 +213,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
static unsigned int randx = 1;
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include <glide.h>
|
||||
@@ -54,7 +59,7 @@ static const char *pixPipeString[] = {
|
||||
"PIXELPIPE ENABLED "
|
||||
};
|
||||
|
||||
int
|
||||
void
|
||||
main( int argc, char **argv)
|
||||
{
|
||||
char match;
|
||||
@@ -82,13 +87,13 @@ main( int argc, char **argv)
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nr", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -104,7 +109,7 @@ main( int argc, char **argv)
|
||||
|
||||
if ( resolution == GR_RESOLUTION_NONE ) {
|
||||
tlErrorMessage( "Error!: Frontbuffer rendering not supported in a window\n" );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
|
||||
tlSetScreen( scrWidth, scrHeight );
|
||||
@@ -321,7 +326,7 @@ main( int argc, char **argv)
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
} /* main */
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -20,7 +25,7 @@ static const char name[] = "test13";
|
||||
static const char purpose[] = "iterated alpha test - blue triangle fades towards one vertex\n";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -37,13 +42,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -155,5 +160,5 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include <glide.h>
|
||||
@@ -20,7 +25,7 @@ static const char purpose[] = "depth bias test: vary depth bias \n"
|
||||
"over time with two interpenetrating triangles";
|
||||
static const char usage[] = "-n <frames> -r <res>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -39,13 +44,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nr", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -166,5 +171,5 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include <glide.h>
|
||||
@@ -19,7 +24,7 @@ static const char name[] = "test15";
|
||||
static const char purpose[] = "clip rectangle testing - clip rectangle travels around screen";
|
||||
static const char usage[] = "-n <frames> -r <res>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -37,13 +42,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nr", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -199,5 +204,5 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -20,7 +25,7 @@ static const char name[] = "test16";
|
||||
static const char purpose[] = "test grShamelessPlug and grSplash";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -38,13 +43,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -186,5 +191,5 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ const char *textureModeNames[] = {
|
||||
"(ITRGB * TEXTURE)+WHITE SPECULAR"
|
||||
};
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -62,13 +62,13 @@ int main( int argc, char **argv) {
|
||||
FxU32 zrange[2];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -285,7 +285,7 @@ int main( int argc, char **argv) {
|
||||
cnt = strcspn(filename, ".");
|
||||
strncpy(fname, filename, cnt);
|
||||
fname[cnt] = 0;
|
||||
sprintf(tmp,"_%d", subframe);
|
||||
sprintf(tmp,"_%d\0", subframe);
|
||||
strcat(fname, tmp);
|
||||
strcat(fname, filename+cnt);
|
||||
if (!tlScreenDump(fname, (FxU16)scrWidth, (FxU16)scrHeight))
|
||||
@@ -313,5 +313,5 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -20,7 +25,7 @@ static const char name[] = "test18";
|
||||
static const char purpose[] = "alpha texture test";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -40,13 +45,13 @@ int main( int argc, char **argv) {
|
||||
assert( hwconfig = tlVoodooType() );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrd", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -241,5 +246,5 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <linutil.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -47,7 +52,7 @@ static int loadTexture( const char *filename,
|
||||
void *table );
|
||||
static GrTexTable_t texTableType( GrTextureFormat_t format );
|
||||
|
||||
int main( int argc, char **argv) {
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -70,13 +75,13 @@ int main( int argc, char **argv) {
|
||||
|
||||
strcpy(texfilename, "miro.3df");
|
||||
/* Process Command Line Arguments */
|
||||
while ((rv = tlGetOpt(argc, argv, "nrdt", &match, &remArgs)) != 0) {
|
||||
while( rv = tlGetOpt( argc, argv, "nrdt", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -291,7 +296,7 @@ int main( int argc, char **argv) {
|
||||
cnt = strcspn(filename, ".");
|
||||
strncpy(fname, filename, cnt);
|
||||
fname[cnt] = 0;
|
||||
sprintf(tmp,"_%d", subframe);
|
||||
sprintf(tmp,"_%d\0", subframe);
|
||||
strcat(fname, tmp);
|
||||
strcat(fname, filename+cnt);
|
||||
if (!tlScreenDump(fname, (FxU16)scrWidth, (FxU16)scrHeight))
|
||||
@@ -345,7 +350,7 @@ int main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user