Commit Graph

853 Commits

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

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

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

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

 GR_SET(BROADCAST_ID, hw, bltSize,
 - ( ((((tileHi - tileLow) * gc->hwDep.cvgDep.xTilePages) - 1) << 16) | (0x1000 >> 3)  - 1));
 + ((((((tileHi - tileLow) * gc->hwDep.cvgDep.xTilePages) - 1) << 16) | (0x1000 >> 3)) - 1));

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

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

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

Therefore, reverting this part of df4085a80 now.  We can live with the
warning.
2018-08-21 00:15:55 +03:00
sezero
46ca75c1dd glide2x, sst1: unused variable warning fixes. 2018-08-20 22:30:55 +03:00
sezero
36dc997a1d glide2x, sst1, gglide.c: warning fix:
gglide.c: In function `grAlphaCombine':
gglide.c:337: warning: suggest explicit braces to avoid ambiguous `else'
gglide.c: In function `grColorCombine':
gglide.c:917: warning: suggest explicit braces to avoid ambiguous `else'
2018-08-20 22:30:15 +03:00
sezero
d2c076b8ab fix some unused variable warnings 2018-08-20 20:55:32 +03:00
sezero
19c5f4e705 glide2x, cvg, oeminit.c: ifdef magic 2018-08-20 20:24:05 +03:00
sezero
ee6f124929 sst1: fix argc arg of main() 2018-08-20 20:16:20 +03:00
sezero
4d29b7f47f glide2x, sst1, ddgump.c: silence unitialized warnings. 2018-08-20 20:01:56 +03:00
sezero
8ee1de4bcf glide2x, h3, linhwc.c: fix a strict aliasing issue (same as in sst96.)
also make some stuff static.
2018-08-20 19:56:02 +03:00
sezero
c8f2b9f621 glide2x, sst1/cvg init: merge scanf updates from glide3x 2018-08-20 19:35:50 +03:00
sezero
c94050cb87 glide2x: added top-level makefiles. 2018-08-20 17:37:02 +03:00
sezero
3e2cc50867 glide3x,sst1 (sst1InitVoodooFile, INIT_LINUX): changed path separator to '/' 2018-08-20 17:01:36 +03:00
sezero
fa071d0a93 glide2x, sst1: fixed incompatible assignment warning for swapBuffers().
kept the original case in commented out form.
2018-08-20 16:40:57 +03:00
sezero
d39173dfd2 missed replacing an instance of '(char) NULL' with 0 2018-08-20 15:50:02 +03:00
sezero
ccf3cc1dc9 forgot renaming glide3x/sst1 version of makefile.linux 2018-08-20 15:10:00 +03:00
sezero
3be55b6512 fix "unknown conversion type character `v' in format" 2018-08-20 15:07:00 +03:00
sezero
0f6ca06167 rename makefile.linux -> Makefile.linux 2018-08-20 14:47:02 +03:00
sezero
61ebabbc40 glide2x: remove dependency on ctype.h functionality 2018-08-20 14:32:24 +03:00
sezero
103dec9ab9 glide2x,sst96: merged dborca commit 2506470 (Rush: fixed grLfbLock(AUXBUFFER)) 2018-08-20 14:00:02 +03:00
sezero
a5352b0145 glide2x, cvg, cpuid.c: fix strict aliasing issues with newer gcc 2018-08-20 13:45:01 +03:00
sezero
34b5d19350 remove a duplicated windows.h include 2018-08-20 11:40:15 +03:00
sezero
9ba0795fc7 glide2x: added experimental MinGW makefiles. 2018-08-20 10:23:10 +03:00
sezero
e9133561f1 glide2x, init96MapBoard: uncomment initAT3DGetHALData() (we do have initat3d.c) 2018-08-20 01:58:04 +03:00
sezero
5ebace29f9 more warning fixing and syncing glide2x init with glide3x 2018-08-20 01:34:20 +03:00
sezero
ece8c244f3 glide2x, cvg, sst1init: update P6FENCE macros from glide3 2018-08-20 01:33:24 +03:00
sezero
1488d68cff a bunch of warning fixes 2018-08-19 23:55:10 +03:00
sezero
ed2350c8f0 glide2x, sst1, vgdrvr.c: rename gamma() to sst1gamma() 2018-08-19 19:01:56 +03:00
sezero
54e3669349 glide2x, h3: added a Windows (MSVC6) makefile 2018-08-19 17:55:02 +03:00