Yamagi Burmeister
0264c6d946
Remove DOGG compile time option.
...
Having OGG optional only complicates things and is unnecessary now that
the dependencies to libvorbis and libogg are gone.
2018-08-14 10:40:50 +02:00
Denis Pauk
49af62477a
rename gl_anisotropic to r_anisotropic
2018-08-10 23:33:46 +03:00
Denis Pauk
ba38bf4f88
Small cleanups
...
* Use window width as maximum value for spancount
* Reuse GLimp_Shutdown
2018-08-10 23:04:19 +03:00
Denis Pauk
6e8170e187
Check possible span scan step by zindex
2018-08-10 22:59:29 +03:00
Denis Pauk
59133c77aa
use zvalue_t for z values
2018-08-10 22:59:29 +03:00
Denis Pauk
48f67501fc
Fix pitch compare vid.width
2018-08-10 22:59:29 +03:00
Denis Pauk
6affc10ceb
use only one increment in loop
2018-08-10 22:59:29 +03:00
Denis Pauk
0d69454b54
revert nack a little
2018-08-10 22:59:29 +03:00
Denis Pauk
a3406b38a3
use memset for copy pixel to pixel range
2018-08-10 22:59:29 +03:00
Denis Pauk
51e09331e2
get rid extern aliastriangleparms
2018-08-10 22:59:28 +03:00
Denis Pauk
61d7b187c0
make more varibles local
2018-08-10 22:59:28 +03:00
Denis Pauk
3c89fec026
fix comments
2018-08-10 22:59:28 +03:00
Denis Pauk
861e47c26e
use short names for D_DrawTurbulentSpan
2018-08-10 22:59:28 +03:00
Denis Pauk
3ed798ae70
use func params instead static variables
2018-08-10 22:59:28 +03:00
Denis Pauk
f1b8571369
Use common step for span scanning
2018-08-10 22:59:28 +03:00
Denis Pauk
8905763c01
show * mark for used models/images in modellist/imagelist
2018-08-10 22:59:28 +03:00
Denis Pauk
1e3e853bc7
Optimize D_DrawSpans16 for horisontal/vertical spans
2018-08-10 22:59:28 +03:00
Denis Pauk
b46a615eb8
use more simple loop for vertical/horisontal spans
2018-08-10 22:59:28 +03:00
Denis Pauk
4093a49f0f
use const for ro parameters
2018-08-10 22:59:28 +03:00
Denis Pauk
e748ed1af8
move code for instert new span to list top to separate function
2018-08-10 22:59:28 +03:00
Denis Pauk
d9eb925b33
move Mod_RadiusFromBounds to shared code
2018-08-10 22:59:28 +03:00
Denis Pauk
78383add97
move varibales to scope
2018-08-10 22:59:28 +03:00
Yamagi Burmeister
be9942d516
Fix window handling when switch from gl to soft renderer.
...
Make sure that the window is destroyed at gl renderer shutdown and
recreated by the soft renderer. Don't deinitialize SDL in the
softrenderer, that's done by vid.c. And make sure that we start the soft
renderer with a clean GL state.
2018-08-10 12:19:15 +02:00
Yamagi Burmeister
e7fa5518a9
Replace zlib dependency by miniz single header library.
...
I've chosen the minimal invasive way for this:
* Import miniz and remove -lz linker flags.
* Create a short header minizconf.h roviding everything we need
originally defined by zconf.h and not provided by miniz.
* Replace zlib.h with miniz.h and minizconf.h.
2018-08-10 10:24:25 +02:00
Yamagi Burmeister
b802c4bc2e
Some cleanup now that ogg is the only music backend.
...
* Rename all cd* functions to ogg*.
* Rename the cd_shuffle cvar to ogg_shuffle.
* Remove some unnessecary #ifdef.
2018-08-08 15:17:21 +02:00
Yamagi Burmeister
79e8c1377b
Replace libvorbisfile with stb_vorbis single header lib.
...
This is (or at least should) work exactly the same a before but
saves us the dependencies to libogg, libvorbis and libvorbisfile.
2018-08-08 15:05:23 +02:00
Yamagi Burmeister
10bdaaec06
Move stb_image_write.h into vid. It's used there, only.
2018-08-07 11:45:26 +02:00
Yamagi Burmeister
1fcd0324e0
Move the icon into the vid interface.
...
It's only used there.
2018-08-07 10:30:11 +02:00
Yamagi Burmeister
d328aa9a9e
Move rev.h into the client.
2018-08-07 10:20:02 +02:00
Yamagi Burmeister
5bff7e1568
Move refresh.c into the client and rename to glimp_sdl.c.
...
The GL backends have been an integral part of the vid interface for
years.
2018-08-07 10:08:20 +02:00
Yamagi Burmeister
b805b4e044
Move vid.c and dependencies into the client.
...
The vid interface has been exclusive to the client for years, trace
that in the file hierarchy.
2018-08-07 10:00:21 +02:00
Yamagi Burmeister
61400d1ae8
Move input.c and input.h into the client and rename to sdl.c.
...
The input system backend was once used in the client and the renderers,
but for some years now it has been an integral part of the client only.
Move it there.
2018-08-07 09:43:34 +02:00
Yamagi Burmeister
956902538f
Move sound.c into the sound system source and rename to sdl.c.
...
The OpenAL backend was already part of the sound system source. And
there's no need for the SDL backend to be part of the generic backends.
2018-08-07 09:31:08 +02:00
Yamagi Burmeister
5501c38736
Move qal.c and qal.h to the other sound system sources.
...
The OpenAL backends used only by the sound system, there no need to
have them in the generic part of the sources.
2018-08-07 09:23:07 +02:00
Yamagi Burmeister
63350c418e
Clearify some FIXMEs and bump the renderer API.
...
The last commits did some bigger changes to the interaction between the
GL renderers and the client. The code is now SDL 2.0 conformant, window
and context creation are strictly distinct operations. SDL is only
initialized when necessary. Since this broke the client <-> renderer
API, bump it's version.
There a lot of things left to do for dark and cold winter evenings:
* The software renderer implements it's own window handling and
reinitialized SDL whenever vid_restart is called. This is highly
problematic.
* vid_fullscreen is abused to communicate changes to renderer config
throughout the code. That's a very ugly, messy and potential very
problematic hack. But not easy to remove.
* Some funtion calls between the client and the renderer are
unnecessary.
The changes to the client <-> renderer interaction fixed issue #302 .
2018-07-31 18:57:13 +02:00
Yamagi Burmeister
bef21c101e
General cleanup of vid.c
...
* Reformat code and reorder functions.
* Remove unnecessary stuff.
* Move everything possible into headers.
* Implement a clean fallback logic, gl3 -> gl1 -> soft.
2018-07-31 14:32:13 +02:00
Yamagi Burmeister
9a53a681bb
Apply the same cleanup to gl1_sdl.c as to gl3_sdl.c
...
* Sync both files as much as possible.
* Another round of general cleanup.
* Fix stencil tests.
* Simplify gamma handling, hardware gamma is now default.
* Support new client <-> renderer API.
2018-07-31 14:32:13 +02:00
Yamagi Burmeister
b8a062e36b
Cleanup and refactor gl3_sdl.c.
...
* Another round of general cleanup.
* Introduce gl3_libgl cvar to force a libGL.
* Fix stencil buffer tests.
* Further untangle window <-> context stuff.
The window is now fully at client side, the context at renderer side.
This is another break of the renderer API. And at least GL1 needs to
track this, it's broken for now.
2018-07-31 14:32:13 +02:00
Yamagi Burmeister
5db73a795b
General cleanup of refresh.c.
...
* Even more syntax and code style fixes.
* Rename functions to match their actual purpose.
* Fix comments.
* SDL initialization and shutdown is now client side only. With
SDL 1.2 finally gone there's no need to involve the renderers
in it.
This breaks the client <-> renderer API. I haven't bumped the API
version with this commit because there're likely more changes when
I'm going through the renderer side of things. The VID backend also
needs a lot of love...
It might be a good idea to move this SDL backend files into the client
and rename them. We'll decide that at a later time.
2018-07-31 14:32:13 +02:00
Yamagi Burmeister
3d9674f3b8
Remove last remnants of SDL 1.2 support troughout the code.
2018-07-31 14:32:13 +02:00
Yamagi Burmeister
ba4706c608
Remove SDL 1.2 from the software renderer.
2018-07-31 14:31:17 +02:00
Yamagi Burmeister
b9c8a8533e
Remove SDL 1.2 support from the menu.
2018-07-31 14:24:28 +02:00
Yamagi Burmeister
f03e95901f
Remove SDL 1.2 support from the GL3 SDL backend.
...
Do some minor cleanup, while here.
2018-07-31 14:24:28 +02:00
Yamagi Burmeister
0e512a8f5d
Some cleanup to the GL1 SDL backend now that's SDL 1.2 is gone.
2018-07-31 14:24:28 +02:00
Yamagi Burmeister
5ec3bcdb49
Let SDL calculate the gamma ramp now that X11GAMMA and SDL 1.2 are gone.
2018-07-31 14:24:28 +02:00
Yamagi Burmeister
1b68da9a0f
Remove SDL 1.2 from the GL1 SDL backend.
2018-07-31 14:24:28 +02:00
Yamagi Burmeister
15898a2330
Remove CDA support from code.
2018-07-31 14:24:28 +02:00
Yamagi Burmeister
759bc1be18
Remove X11GAMMA support from code.
...
This just deletes the X11GAMMA code. It doesn't make use of some
refactoring opportunities that're now possible. That will be done
at a later time.
2018-07-31 14:24:28 +02:00
Yamagi
38a499c335
Merge pull request #313 from 0lvin/edges_limits
...
Scale edge/surfaces/verts on outof....
2018-07-30 18:46:54 +02:00
Denis Pauk
cf4887c4ba
fix issue introduced in e5ef665e:Use more short code in *EdgeSearch
2018-07-30 15:47:00 +03:00
Denis Pauk
27cbd0d4e7
reorder copy vid_buffer to texture.
2018-07-29 15:29:00 +03:00
Denis Pauk
ea27c460f2
move trenslate palette based image to full color texture to separate function
2018-07-29 00:04:10 +03:00
Denis Pauk
a4b011c5fd
palette check
2018-07-28 13:57:08 +03:00
Denis Pauk
bec4c4accc
change code style
2018-07-25 21:33:10 +03:00
Denis Pauk
2b9b039139
make r_drawsurf local
2018-07-25 17:49:00 +03:00
Denis Pauk
aec8f3fc8b
make r_dlightframecount and surfrowbytes local
2018-07-25 17:06:23 +03:00
Denis Pauk
fcae2fcbcd
change messages
2018-07-25 15:16:32 +03:00
Denis Pauk
125d6db8b6
code clean up
2018-07-24 23:38:31 +03:00
Denis Pauk
e1a9e7e4e2
add auto reallocate
2018-07-24 17:49:14 +03:00
Denis Pauk
25cb7acda8
Restore allocate buffers on render init
2018-07-24 16:56:42 +03:00
Denis Pauk
a37d6cb07a
clean up code
2018-07-24 16:54:43 +03:00
Denis Pauk
6136900fac
little speedup
2018-07-24 00:16:31 +03:00
Denis Pauk
f9a77d2d66
Share same Mod_DecompressVis
2018-07-23 17:40:06 +03:00
Denis Pauk
ad771fdd99
more warnings
2018-07-23 17:06:39 +03:00
Denis Pauk
789cd0128a
use only allocated finalverts
2018-07-23 16:51:16 +03:00
Denis Pauk
1a5a0922c8
Set bigger limits
2018-07-23 00:34:34 +03:00
Denis Pauk
d36f19fda5
use only allocated surfaces
2018-07-22 17:20:33 +03:00
Denis Pauk
a57b1f9be0
use only allocated edges
2018-07-22 16:50:44 +03:00
Simon McVittie
b9aac1ad9b
Fix spelling of "information", and re-word a comment with multiple typos
2018-07-21 12:03:23 +01:00
Ricardo Garcia
d425f40eb6
Fix segfault in OGG_PlayTrack when ogg_enable is set to zero
2018-07-15 09:33:58 +02:00
Yamagi Burmeister
d96a46dc1f
Fix stupid bug when scaling the chat input.
...
The vertical offset must be multiplied with the scale. And not the
scale added onto it... This fixes issue #306 .
2018-06-25 09:41:57 +02:00
Yamagi Burmeister
1f4e90e0d3
Don't restart music if track 0 is requested and ogg_ignoretrack0 set.
2018-06-12 19:28:13 +02:00
Yamagi Burmeister
9cf029182a
Fix playback when cd_shuffle is 1
...
Until now, likely since we first introduced OGG/Vorbis playback 9 years
ago, in about 50% of all cases OGG_PlayTrack() was never called if
cd_shuffle was set 1, resulting in missing background music. Add the
missing call. :)
2018-06-12 18:52:36 +02:00
Yamagi Burmeister
653d2bad80
Fix build.
...
I wonder why I didn't catch this in sunday. For some reason a "make
clean ; make" cycle was necessary. Maybe a corner case that the header
dependencies didn't catch?
2018-06-12 18:42:21 +02:00
Yamagi Burmeister
4a602227d1
Fix shuffle playback and it's menu integration.
2018-06-12 18:22:35 +02:00
Yamagi Burmeister
2406597356
Mark everythings that's local to ogg.c as static.
2018-06-12 18:22:35 +02:00
Yamagi Burmeister
b586f84a3a
Combine the various ogg_* commands into a single "ogg" cmd.
...
While here remove unecessary ogg_init and ogg_shutdown commands. And
some more cleanup.
2018-06-12 18:22:35 +02:00
Yamagi Burmeister
750b37f288
Some general cleanup to the vorbis backend.
...
* Remove unneccessary global variables.
* Simplify initialization.
* Reorder functions.
2018-06-12 18:22:35 +02:00
Daniel Gibson
c3af040f0c
More ogg/vorbis refactoring, supports GOG-style tracks now
...
also removed lots of code.
Windows support still missing, needs Sys_IsDir() and Sys_IsFile().
2018-06-12 18:22:35 +02:00
Daniel Gibson
781e7c7e12
1. step in OGG refactoring: add OGG_PlayTrack(int track), remove others
2018-06-12 18:22:35 +02:00
Denis Pauk
e5ef665e09
Use more short code in *EdgeSearch
2018-05-20 13:55:04 +03:00
Denis Pauk
466364589d
Use constants for x/y/z shifts
2018-05-20 13:55:04 +03:00
Denis Pauk
2412363001
Add some comments from Fabien Sanglard article
2018-05-20 13:55:04 +03:00
Denis Pauk
1ea3fdc1a2
We have enough memory, skip Com_PageInMemory
2018-05-20 13:55:04 +03:00
Denis Pauk
b0b0265e4b
Move Surf Search to separate functions
2018-05-20 13:55:04 +03:00
Denis Pauk
4fd37b73ca
Define NUM_MIPS=4 instead hardcoded value
2018-05-20 13:55:04 +03:00
fabiensanglard
184ff91453
Added Unreal kernel filtering.
2018-05-20 13:55:04 +03:00
Denis Pauk
96a81f64f9
little speed up
2018-05-20 13:55:04 +03:00
Denis Pauk
f48e3e5b4d
Use real height/width instead warp dimensions
2018-05-20 13:55:04 +03:00
Daniel Gibson
1e3135d4fc
r_gunfov shouldn't be CVAR_USERINFO, only CVAR_ARCHIVE
...
this happens when you just copypaste and adapt r_lefthand
also did some minor changes to R_AliasDrawModel in the soft renderer
to make sure alias[xy]scale is reset properly in the early out cases
2018-04-27 23:42:27 +02:00
Daniel Gibson
12a8da7180
r_gunfov for the software renderer
2018-04-21 21:35:13 +02:00
Daniel Gibson
c59c1bfda1
Fix Rogue heatbeam rendering at high FOVs
2018-04-21 20:19:42 +02:00
Daniel Gibson
a5e97682a3
Weapon field of view independent of 'fov': r_gunfov cvar
...
At high 'fov' values the weapon looked quite distorted.
Now it's rendered with an independent FOV, which looks better.
Note that the 'fov' cvar sets fov_x, while this is based on fov_y
(which is calculated from fov_x), so it's indeed different values:
r_gunfov seems to correspond to fov 90.
We use r_gunfov 80 as default, because it looks better.
2018-04-21 18:23:32 +02:00
Denis Pauk
189a34e707
Add custom particle shape by sw_custom_particles.
...
0 - use rectangle (default shape)
1 - use hexagon
2018-04-13 23:29:56 +03:00
Denis Pauk
23d25db601
Little different shape of particle
2018-04-10 23:24:53 +03:00
Denis Pauk
14c934762d
use one function for any mip levels
2018-04-10 23:13:38 +03:00
Denis Pauk
cd6c686980
Use multiple for particle sizes
2018-04-10 23:09:36 +03:00
Denis Pauk
758ab07a38
look to height instead width
2018-04-10 23:06:54 +03:00
Denis Pauk
14af679b7e
Add size checks for WAL load
2018-04-10 22:59:13 +03:00
Denis Pauk
511b73baf9
Particle fixes from q2dos and kmquake
...
Authors: maraakate <emoaddict15@gmail.com>
Knightmare <knightmare66@yahoo.com>
2018-04-10 22:59:13 +03:00