Commit graph

2861 commits

Author SHA1 Message Date
Yamagi
a98d533ae1 Add cl_r1q2_lighstyle, set to 0 for Vanilla Q2 dlight colors.
Since the first release Yamagi Quake II used the more fanzy R1Q2 colors
for some dynamic lights:

* In R1Q2 the rocket has orange light, matching the color of the fire
  trail and the generic explosion. Vanilla Quake II had yellow light,
  the same as the blaster and several muzzle flashs.
* In R1Q2 hyperblaster projectiles are emitting yellow light, like the
  normal blaster. That matches the projectile colors, the muzzle flash
  and the effect when hitting a wall. And it's more logical, since the
  hyperblaster is just a blaster on steroids. Vanilla Quake II had white
  / uncolored lights.

Add an option to revert to Vanilla Quake II colors, leave the R1Q2
colors as default. Closes #640.
2021-01-10 18:30:49 +01:00
Yamagi
7163d133cb
Merge pull request #638 from devnexen/vulkan_optional
Proposing to make vulkan support eventually optional.
2020-12-31 10:28:56 +01:00
Yamagi
faf6a91ace
Merge pull request #635 from 0lvin/ref_soft
Port improvements to soft and vulkan
2020-12-31 10:27:03 +01:00
Yamagi
69ba055c2c Minimal error checking for Sys_Mkdir() on windows. 2020-12-31 09:09:09 +01:00
Yamagi
60d881437b Minimal error handling for Sys_Mkdir() under unixlike platforms. 2020-12-31 08:55:09 +01:00
Yamagi
8e223b2743 Make sure that the config dir exists.
Since 1a913eb we're calling realpath() on every dir and bail out if the
real path isn't available. If the game is started the first time, the
configuration dir doesn't exist at the first realpath() call and the
game errors out. Always create the configuration dir when determining
it's path.

This didn't happen on Windows because the configuration dir was created
when opening stdout.txt right after we entered main().

TODO: Sys_Mkdir() should grow at leas a little bit error handling. We're
silently ending up in -portable mode if the configuration dir couldn't
created.
2020-12-30 18:45:16 +01:00
Denis Pauk
84aceda76d Use submodels directly from current map 2020-12-24 13:40:07 +02:00
Denis Pauk
4f9067e6b8 Reallocate models with huge current map 2020-12-23 23:29:29 +02:00
Denis Pauk
2c00502b0b Free Unused Image and Models only if we are near to limit 2020-12-23 21:35:27 +02:00
Denis Pauk
b0cc97e6f3 make cppcheck happy with R_RestoreMips
132: Array 'image->pixels[4]' accessed at index -1, which is out of bounds.
133,134: Shifting by a negative value is undefined behaviour.
2020-12-23 12:36:45 +02:00
Denis Pauk
004e5e250f Rearange code and make loadmodel local 2020-12-23 12:12:35 +02:00
David Carlier
8dc76d54d1 Proposing to make vulkan support eventually optional.
Still some alternative oses does not have vulkan support or not full (e.g. Raspberry).
2020-12-23 09:50:37 +00:00
Denis Pauk
462633d3d9 Vulkan: Calculate needed hunk size in Mod_LoadBrushModel()
Based on ec6d743d
2020-12-23 11:48:41 +02:00
Denis Pauk
278f9104cd Remove unused TargaHeader 2020-12-22 16:47:35 +02:00
Denis Pauk
3418280b06 Fix cppcheck warnings
src/common/cvar.c:160 Logical disjunction always evaluates to true: c >= '0' || c <= '9'. Are these conditions necessary? Did you intend to use && instead? Are the numbers correct? Are you comparing the correct variables?
src/common/cvar.c:141 The scope of the variable 'c' can be reduced.
src/common/cvar.c:517 The scope of the variable 'c' can be reduced.
src/common/shared/shared.c:1359 Either the condition '!value' is redundant or there is possible null pointer dereference: value.
src/common/shared/shared.c:1371 Either the condition '!value' is redundant or there is possible null pointer dereference: value.
src/common/shared/shared.c:1377 Either the condition '!value' is redundant or there is possible null pointer dereference: value.
src/client/refresh/soft/sw_main.c:1531 Variable 'err' is assigned a value that is never used.
2020-12-17 22:49:03 +02:00
Denis Pauk
a4181a0bdb Add m8 textures support(heretic2 mods) 2020-12-17 21:59:04 +02:00
Denis Pauk
f975a94c74 Add farsee flag to ref_soft 2020-12-17 00:05:45 +02:00
Denis Pauk
e23be99a49 Fix image shrink calls 2020-12-16 23:53:29 +02:00
Denis Pauk
2e93364940 Use SmoothColorImage as final filtering 2020-12-16 22:45:39 +02:00
Denis Pauk
be2e91e142 Sync LoadSP2, turret_driver_die, SP_info_player_intermission declarations
src/client/refresh/gl1/gl1_model.c:39:6: warning: type of ‘LoadSP2’ does not match original declaration [-Wlto-type-mismatch]
src/game/g_turret.c:29:6: warning: type of ‘infantry_die’ does not match original declaration [-Wlto-type-mismatch]
src/game/g_spawn.c:43:6: warning: type of ‘SP_info_player_intermission’ does not match original declaration [-Wlto-type-mismatch]
2020-12-16 22:44:38 +02:00
Denis Pauk
d190c3d143 soft: scale cinema raw images 2020-12-16 22:11:02 +02:00
Yamagi
983f7f6b4b Port some lightning fixes from gl3 to vk.
* Fix for skyboxes abused as lightsources, was #393.
* Don't reuse i as counter variable when calculating light points.
2020-12-16 09:19:28 +01:00
Denis Pauk
b7bdd0be72 Add vk_nolerp_list support 2020-12-12 14:45:04 +01:00
Denis Pauk
539fea96bb add vk_retexturing force flag 2020-12-12 14:45:04 +01:00
Denis Pauk
1a4d495028 Enable retexturing by default and dump real image sizes 2020-12-12 14:45:04 +01:00
Denis Pauk
e3b387f7e7 Scale up 8bit images 2020-12-12 14:45:04 +01:00
Denis Pauk
8e5f68bb68 Remove vk_round_down as regressed visual quality 2020-12-12 14:45:04 +01:00
Denis Pauk
0d57f47b9b restore near color value only for transparent images 2020-12-12 14:45:04 +01:00
Denis Pauk
d4df592572 remove redundant suballocate (vk_util has already suballicate buffers) 2020-12-12 14:45:04 +01:00
Denis Pauk
07c043d8ce rename gammatable to overbrightable and apply only to world models 2020-12-12 14:45:04 +01:00
Denis Pauk
67821d753b Port VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU flag check 2020-12-12 14:45:04 +01:00
Denis Pauk
ff82bb5a78 Port memory flags from VulkanMemoryAllocator 2020-12-12 14:45:04 +01:00
Denis Pauk
16eb7f5c27 Show memory types supported by device 2020-12-12 14:45:04 +01:00
Denis Pauk
03a20b2050 Mark non VK_PRESENT_MODE_FIFO_KHR as triple buffered 2020-12-12 14:45:04 +01:00
Yamagi
17357d8c5e Fix another printf format specifier under Windows. 2020-12-12 14:45:04 +01:00
Denis Pauk
16ae9af406 Fix unmap warning on swap buffers resize 2020-12-12 14:45:04 +01:00
Denis Pauk
fd327dcdae vk: scale cinema raw images 2020-12-12 14:45:04 +01:00
Denis Pauk
124b0c224f Add palette image scale{2,3}x 2020-12-12 14:45:04 +01:00
Denis Pauk
4183c14cfa Update license in vk_util 2020-12-12 14:45:04 +01:00
Denis Pauk
5a4554cfb5 Fix multiplayer -> player setup 2020-12-12 14:45:04 +01:00
Denis Pauk
39e69c90f0 Rework memory allocation 2020-12-12 14:45:04 +01:00
Denis Pauk
59e5c4fca5 Add gunfov and farsee in ref_vk 2020-12-12 14:45:04 +01:00
Denis Pauk
17c5e04d8f Reuse TGA loader from STB 2020-12-12 14:45:04 +01:00
Denis Pauk
17d9ff77a6 update function declarations prototypes 2020-12-12 14:45:04 +01:00
Denis Pauk
01918110d7 fix symbol collision 2020-12-12 14:45:04 +01:00
Yamagi
85b9f84b3d Don't link against the Vulkan loader, load it at runtime. 2020-12-12 14:45:04 +01:00
Yamagi
d936bad256 Use uintptr_t instead of uint64_t for better Windows compatibility. 2020-12-12 14:45:04 +01:00
Yamagi
c9d54381a5 Fix uint64_t printf() format string for Windows. 2020-12-12 14:45:04 +01:00
Yamagi
3e0c3efa74 Fix size_t printf() format strings under Windows. 2020-12-12 14:45:04 +01:00
Yamagi
a72cd9ea50 Add the vulkan renderer to the beginning fallback sequence.
The fallback sequence is now: vk -> gl3 -> gl1 -> soft -> failed.
2020-12-12 14:45:04 +01:00