Bill Currie
790f62a209
[image] Make WritePNG take settings from tex_t
...
This means that a tex_t object is passed in instead of just raw bytes
and width and height, but it means the texture can specify whether it's
flipped or uses BGR instead of RGB. This fixes the upside down
screenshots for vulkan.
2022-04-01 01:01:53 +09:00
Bill Currie
a29836cc2c
[quakefs] Return QFile pointer from QFS_NextFile(name)
...
QFS_NextFilename was renamed to QFS_NextFile to reflect the fact it now
returns a QFile pointer for the newly created file (as well as the
name). This necessitated updating WritePNG to take a file pointer
instead of a file name, with the advantage that WritePNGqfs is no longer
necessary and callers have much more control over the creation of the
file.
This makes QFS_NextFile much more secure against file system race
conditions and attacks (at least in theory). If nothing else, it will
make it more robust in a multi-threaded environment.
2022-03-31 17:27:04 +09:00
Bill Currie
0bb562f93f
Fix a bunch of float vs int bugs
...
Just those made me glad I tried compiling with clang: running into those
bugs would have lead to some serious headaches, I imagine.
2022-03-31 00:28:26 +09:00
Bill Currie
ec54c54226
[build] Fix some windows bitrot
2021-08-02 14:02:41 +09:00
Bill Currie
674ffa0941
[util] Make bsp_t counts size_t
...
and other bsp data counts unsigned, and clean up the resulting mess.
2021-08-01 21:54:05 +09:00
Bill Currie
0bfb60775e
[util] Ensure hunk allocs are cache alligned
...
This doesn't seem to make much difference in the vulkan renderer, but it
certainly doesn't hurt.
2021-02-03 13:19:19 +09:00
Bill Currie
0c1699fdbb
Fix a pile of double semicolons
2021-01-09 20:42:23 +09:00
Bill Currie
6eb6b6c0ba
Change pointer_t to unsigned and clean up the mess.
...
It doesn't make sense to have negative pointers. The size of the commit is
from enabling gcc's -Wtype-limits warning and cleaning up that mess too.
2012-12-21 21:53:13 +09:00
Bill Currie
23a38738fc
Massive whitespace cleanup.
...
Lots of trailing whitespace and otherwise blank lines.
2012-05-22 08:23:22 +09:00
Bill Currie
cc5140e3a1
Move min/max/bound and field_offset into better locations.
...
min/max bound into mathlib.h (they /are/ math functions, after all) and
field_offset into qtypes.h.
2011-12-24 10:04:33 +09:00
Bill Currie
a71acc9ae5
Move the essential init code into Sys_Init().
2011-09-11 14:56:47 +09:00
Bill Currie
0f7390dd60
Clean up all the "set but not used" warnings.
...
gcc on my system is failing to treat this specific warning as an error :/
2011-06-19 10:48:02 +09:00
Bill Currie
7fca21837a
fix some errors found by valgrind
2010-10-13 20:52:05 +09:00
Bill Currie
fe95805d86
various gcc 4.3 fixes
2008-07-19 05:40:57 +00:00
Bill Currie
df2bebde7e
more vc build patches from phrosy
2007-04-06 01:09:58 +00:00
Bill Currie
501180aaac
gcc-4.0 fixes. even found some bugs :) (names /not/ mangled this time)
2005-06-08 06:35:48 +00:00
Bill Currie
0d14a8f9f3
minor cleanup
...
This is an imperfect revision of history.
2004-11-12 03:21:00 +00:00
Bill Currie
4d2300ff11
finally support png
2004-05-01 04:14:59 +00:00
Bill Currie
2b26072c8f
open output file in binary mode
2004-03-19 00:38:35 +00:00
Bill Currie
3f91157b26
a little easier to read
2004-02-05 23:46:21 +00:00
Bill Currie
71196fedf6
make gcc more anal about prototypes, string constants and function
...
visibility (ie, global functions must have a prototype)
2003-01-06 18:28:13 +00:00
Bill Currie
122b0d81e7
values.h doesn't seem to be needed and doesn't exist on darwin anyway
2002-12-20 23:41:24 +00:00
Bill Currie
599b51b542
hmm, hadn't noticed "stdint.h"
2002-11-19 05:03:42 +00:00
Bill Currie
ac8acaacd7
need limits.h
2002-11-19 05:02:57 +00:00
Bill Currie
63dfd5e523
MAXINT isn't as portable as one would like
2002-11-19 05:01:39 +00:00
Bill Currie
0866f5d35f
nuke a bunch of commented out code
2002-11-18 23:22:52 +00:00
Bill Currie
b44d61e84b
use bspfile for reading the map
2002-11-18 22:46:53 +00:00
Bill Currie
b1184fc066
run through indent and do some cleanup
2002-11-18 22:14:31 +00:00
Bill Currie
2a1d8555d2
Import Matthew Wong's bsp2bmp utility using quakeio functions, creating an
...
image_t type for the line point drawing, ditching the raw and bmp formats
in favor of pcx (for now), and renaming to bsp2img. I plan on working on
getopt, bspfile and other image formats in the future as well as generally
cleaning up the code.
2002-11-18 20:48:29 +00:00