Commit Graph

185 Commits

Author SHA1 Message Date
Garux 98f9023cdc minor tweaks 2021-03-11 10:57:17 +03:00
Garux 858ec974f7 * -saturation light switch, default = 1, affects lightmaps and vertex color; > 1 = saturate, 0 = grayscale, < 0 = complementary colors 2021-03-08 13:34:58 +03:00
Garux ac1dd904f1 * print available games on wrong -game and -format args 2021-03-08 13:32:16 +03:00
Garux 293fab0ffb manage color-to-byte conversions 2021-03-05 13:37:56 +03:00
Garux 39f5a2d060 use MinMax functions instead of raw math 2021-03-03 07:01:28 +03:00
Garux 9857bb955b more c++ math 2021-02-26 01:10:51 +03:00
Garux 4ce944444d rewrite q3map2 math in c++ 2021-02-25 19:41:43 +03:00
Garux 820dd5e21f bump MAX_IMAGES, MAX_MODELS 2021-02-10 00:20:32 +03:00
Garux 37c11990cb del struct StrBuf; CopiedString for mapShaderFile; 2021-02-09 13:03:48 +03:00
Garux b013f9954c simplify unlimited bsp entities code 2021-02-08 04:36:57 +03:00
Garux 92b2487875 fix string warnings 2021-02-08 01:33:36 +03:00
Garux ca34e8f38f enum class EFloodEntities 2021-02-07 07:34:57 +03:00
Garux 5fd7b340df * discard excess portals in the void (great optimization for maps with void areas in between of playable areas and non rectangular maps)
(excess portals there are effect of _blocksize)
	* optimize FloodPortals() (also fix stack depth crash in debug mode due to recursive calls)
	* fix xml_Select() of leaked entity (was selecting last map entity always)
	* xml_Select() leaked entity exactly in the beginning of leak line
2021-02-06 22:22:59 +03:00
Garux 2bf53ef643 fix overlook introduced in 36b63e1d2c 2021-01-30 16:50:40 +03:00
Garux 99a5ef0416 refactor entity key values routines 2021-01-30 16:23:31 +03:00
Garux 8425ce3c3e refactor foliage_t 2021-01-29 22:40:09 +03:00
Garux 762699287e refactor surfaceModel_t 2021-01-29 21:11:56 +03:00
Garux 276d1f5875 safe string in indexMap_t 2021-01-29 20:46:06 +03:00
Garux e11aede11a refactor surfaceType_t enum 2021-01-27 19:43:53 +03:00
Garux 1efff8cdfe refactor enum vstatus_t 2021-01-27 11:53:32 +03:00
Garux 62a0ae5623 prevent string overflows 2021-01-26 22:31:19 +03:00
Garux bdfd864670 refactor enums
credits for class BitFlags go to Jelvan <3
2021-01-25 01:33:56 +03:00
Garux 20b908e31b remove excess typedef struct declarations 2021-01-23 19:26:50 +03:00
Garux 54c38610bf use std::list<epair_t> 2021-01-23 17:25:47 +03:00
Garux 36b63e1d2c turn entities array to std::vector<entity_t> 2021-01-23 15:39:42 +03:00
Garux b0e62198ba use safe strings more 2021-01-21 18:41:16 +03:00
Garux 0ab896b84a remove MAC_STATIC hack 2021-01-21 16:17:23 +03:00
Garux f3c26c791f use safe strings more 2021-01-21 16:08:53 +03:00
Garux 15e4b8e850 manage model shaders remapping 2021-01-21 07:19:15 +03:00
Garux fe5c0879b4 remove -tmpin & -tmpout switches, as at best they were prepending tmp/ to absolute path 2021-01-20 12:48:10 +03:00
Garux 3b39a5754d prevent filename overflow in model .skin loader
strip model extension during filename construction
add variadic template operator to StringOutputStream for inline strings creation
2021-01-20 11:59:16 +03:00
Garux cfa502df6e safe string for globalCelShader 2021-01-19 22:40:58 +03:00
Garux c3437b7833 use safe strings in shaderInfo_s
turn ImageLoad() to expect extensionless path as input
2021-01-19 18:58:18 +03:00
Garux 9590d602d3 use String64 for shaderInfo_s::skyParmsImageBase
add variadic template operator to StringFixedSize for inline strings creation
2021-01-19 17:21:54 +03:00
Garux da3b05728c use safe string for shaderInfo_t.shader 2021-01-19 01:24:21 +03:00
Garux 13524d59ef fix the build 2021-01-16 15:10:59 +03:00
Garux ae9fe08159 * support -extlmhacksize N N input for non square lightmaps, for example -extlmhacksize 2048 1024
also enables this for -lightmapsize, legitimacy is questionable here
2020-06-14 15:49:16 +03:00
Garux c956102065 support variable number of key names in entity key value reading functions 2020-02-12 23:21:15 +03:00
Garux 433b9e776b manage entity key value reading routines 2020-02-07 15:49:29 +03:00
Garux 3409de2cb0 change EPAIR_STRCMP semantics 2020-02-04 03:50:33 +03:00
Garux eb70faddc8 use standard C bool type:
get rid of qfalse, qtrue aliases everywhere
replace qboolean in q3map2, q3data
redefine qboolean type in q2 tools, mbspc
2020-02-03 01:15:30 +03:00
Garux 25d94dbd2f add and use path_set_extension()
fix -bsp crash with .bsp sent as map path
	* fix: qer_editorimage, q3map_lightImage etc work with file names, containing period
(i.e. 'file.name.ext' names; don't StripExtension() twice in ImageLoad() for that)
2020-01-27 01:22:10 +03:00
Garux ad05e553b9 use realloc() instead of safe_malloc() + free()
add AUTOEXPAND_BY_REALLOC_ADD macro, use it
2020-01-23 05:01:44 +03:00
Garux 4d9a6cc2a9 const pointer in copy functions 2020-01-13 04:31:05 +03:00
Garux 5dc0244ef9 remove unused statistic variables 2020-01-13 00:39:55 +03:00
Thomas Köppe 23a166a4dd Change winding_t, winding_accu_t and brush_t to use flexible array members rather than fixed-sized arrays.
The arrays were always meant to be variably sized, and objects are only ever allocated dynamically. Object size computations are simplified with this change.

Flexible arrays were introduced in C99, so this change means that we will require a C99-conforming compiler henceforth.
2020-01-12 01:32:43 +03:00
Thomas Köppe 1e2ccf5f06 Use standard "offsetof" facility rather than manual code involving null pointer dereferences. 2020-01-12 00:49:05 +03:00
Garux 5d46d88d2d refactor autopk3.c
generalize Q_stricmp, Q_strncasecmp defines instead of local implementations
replace Q_strncpyz, Q_strcat, Q_strncat with strlcpy, strlcat versions: strcpyQ, strcatQ, strncatQ
fix ExtractFilePath, ExtractFileBase, ExtractFileExtension edge case (empty path string)
ExtractFileBase() : mimic StripExtension() logic
BeginMapShaderFile() : use 	ExtractFileBase(), 	ExtractFilePath()
2019-12-27 06:01:28 +03:00
Garux 853633efd1 move main.c::FixAAS()->convert_bsp.c 2019-12-20 17:39:04 +03:00
Thomas Debesse 68f8cabf95 split bsp conversion stuff from q3map2 2019-12-20 08:02:06 +03:00