Commit Graph

51 Commits

Author SHA1 Message Date
Jonathan 1d8a0c1df3 clang-format pass 2022-07-28 06:14:54 -04:00
Jonathan 9c73416594 Squashed commit of the following:
change temp-named planeside_ to plane_flipped

commit 8b3938f5069837e76504a16ffd019a8682fd4325
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 05:35:05 2022 -0400

    fix compile errors/warnings

commit 0c19a922490a332a084ceb65bbb88368fecb40a1
Merge: 31edc84e a2451a41
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 05:30:54 2022 -0400

    Merge branch 'brushbsp' into paril/brushbsp_plane2

    # Conflicts:
    #	qbsp/portals.cc
    #	qbsp/tree.cc

commit 31edc84e5a0f16196aacb4e465657954a523ccf9
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 02:55:52 2022 -0400

    use std::map for the two other hashes (edge/vertex) for speed

commit a9bb68b6ea203226d21f73d42558ffe388fc3051
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 02:31:45 2022 -0400

    remove final uses of FindPlane

commit 951a2b1977f813751c93417901a775a7a0cb77f4
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 02:01:19 2022 -0400

    only set flipped status if we actually flipped; this seems to have no affect in practice, but it was wrong in theory

commit 97610203bebb115391ef39ea2b5c6400b9ce2d89
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 01:56:19 2022 -0400

    remove FindPositivePlane

commit d424afbb2cfa32669883f5aafcf34555169eec3e
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 01:22:10 2022 -0400

    side_t uses plane and side_ now

commit af883bc111049a8c6fcb12c8c888e17f03cf30ff
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 00:46:52 2022 -0400

    face_t uses internal plane

commit 1cd776c89b683b0af0d8a642eee7e54b5f54b559
Author: Jonathan <jonno.5000@gmail.com>
Date:   Tue Jul 26 22:59:47 2022 -0400

    node_t using plane directly, pulling planenum in when necessary

commit 8b34312ef9c3d416c011f2694a34fb9d5eba4faa
Author: Jonathan <jonno.5000@gmail.com>
Date:   Tue Jul 26 22:22:28 2022 -0400

    remove PLANENUM_LEAF, use a boolean for the separation
2022-07-27 05:38:50 -04:00
Eric Wasylishen f86a5343fb qbsp: rename options -> qbsp_options 2022-07-10 17:30:00 -06:00
Eric Wasylishen 97d360120b qbsp: use unique_ptr for node_t::facelist 2022-07-03 23:41:48 -06:00
Eric Wasylishen 40bba01b21 qbsp: brushbsp.cc import from qbsp3 2022-07-03 01:22:09 -06:00
Jonathan cf04f644e0 Merge branch 'type-cleanup' into brushbsp
# Conflicts:
#	common/bspinfo.cc
#	include/common/bspfile.hh
#	include/qbsp/map.hh
#	include/qbsp/wad.hh
#	qbsp/wad.cc
2022-06-27 06:44:45 -04:00
Jonathan 510023e089 step 1 of finishing the rewrite I started of the image subsystems.
- for Quake-likes, WADs will be added as file system archives directly when the first brush is encountered since the wad key is ready to go by that point.
- after loading the .map and before constructing the BSP, what I call secondary textures (animation frames for Quake-likes) are added to the list, and the BSP's miptex data is filled.
- BSP miptex data is now opaque to the BSP process; the BSP simply copies the raw miptex information from the input. This simplifies the BSP structures and reading/writing routines.
- the img subsystem supports reading from raw miptexes now, although in practice this only happens for Quake-likes atm
- instead of a "wal cache", maps now have a "meta cache" which stores the metadata information for all games instead of just Quake II
- texture meta can now be ref'd out rather than needing to be copied every time (mainly only a gain for the std::string)
- wad.cc/wad.hh is gone; wads are now pushed into the filesystem archive
- fixed broken wad_archive
- fs subsystem iterated on a little bit; supports marking archives as external (only used for wads currently; see `LoadTextureData`)
- load_tga has better error handling
- add in foot-gun protection to the BSP readers; now they assert on failure to read instead of silently propagating that error throughout the rest of the process
- bsputil uses img stuff now, so it should handle palettes better
2022-06-27 03:58:23 -04:00
Eric Wasylishen aabd1c27dc qbsp: face_t: make contents, lmshifts single sided
side_t: same, also remove contents (unused)
2022-06-24 01:14:11 -06:00
Eric Wasylishen afec0a947e qbsp: change bspbrush_t.sides from face_t to side_t 2022-06-24 00:43:40 -06:00
Eric Wasylishen fac5ea384d qbsp: rename bspbrush_t.faces to .sides 2022-06-24 00:21:55 -06:00
Eric Wasylishen 038651fca6 qbsp: rename brush_t -> bspbrush_t for consistency with qbsp3 2022-06-24 00:01:02 -06:00
Jonathan c62480c337 consistency rename; mtexinfo_t -> maptexinfo_t 2022-06-16 09:35:08 -04:00
Jonathan 1a88b46e8c RemapContentsForExport moved into gamedef
simplified gamedef stuff by checking which functions were still necessary, and no need to pass extended flags through at all now
detail type moved into Q1
2022-06-12 02:24:27 -04:00
Jonathan 10676603e9 move clip & origin into game-specific code
remove hint from brush; hint is technically a surface flag rather than a content flag, so we can infer it from the sides rather than needing to store it as a unique flag (we could still cache the result somewhere but this makes it consistent between q1 and q2)
2022-06-11 08:29:55 -04:00
Eric Wasylishen a1b8a38283 merge non-brush bsp specific changes from brushbsp branch 2022-05-11 01:58:53 -06:00
Eric Wasylishen 20a1b7b94b qbsp: szBSPName -> bsp_path, szMapName -> map_path 2022-04-17 13:41:23 -06:00
Eric Wasylishen 2e14909e84 qbsp.hh: remove map.hh include 2022-04-09 23:23:26 -06:00
Eric Wasylishen 9295181f84 qbsp.hh: remove brush.hh include 2022-04-09 23:15:21 -06:00
Eric Wasylishen a019088c2f Merge branch 'type-cleanup' into brushbsp 2022-04-02 21:05:46 -06:00
Jonathan c81e9ace28 remove old threading code entirely
add new parallel logging stuff in common/parallel which wraps parallel_for(_each) and provides automatic percentage indicator
fix issue with light not pulling in settings
move logging stuff into its own namespace and simplify
2022-03-01 10:28:59 -05:00
Eric Wasylishen 91f7d9adaa qbsp: remove surface_t 2022-02-21 00:05:48 -07:00
Eric Wasylishen 6b5b426636 qbsp: remove internal list in face_t 2022-02-07 00:02:51 -07:00
Jonathan ed325eedea surface faces now use list/vector 2022-02-06 11:39:22 -07:00
Jonathan dfd31d7441 make markfaces a vector to simplify usage 2022-01-25 00:13:12 -05:00
Jonathan 1764afb475 Revert "Revert "make brush::faces a vector""
This reverts commit 11d2d51165.

Fixes implementation - was swapped logic in brush bevels
2022-01-24 14:55:21 -05:00
Jonathan 11d2d51165 Revert "make brush::faces a vector"
This reverts commit 30c7ef94ac.

This was causing issues with bevel brushes in Q2 mode. Not sure why yet. Will attempt this again soonish.
2022-01-24 14:26:28 -05:00
Jonathan 5d6d7a71a2 Fix missing includes for list 2022-01-23 19:28:50 -05:00
Jonathan 75339df231 Simplify surface_t by using lists 2022-01-23 19:00:01 -05:00
Jonathan 8dbb18cc94 Use stem() instead of filename() when we're only wanting to change filename without extension 2022-01-22 17:55:37 -05:00
Jonathan 30c7ef94ac make brush::faces a vector 2022-01-17 09:49:10 -05:00
Jonathan 95b47db922 More qmat/qvec where appropriate
Add a json.hh file which includes common JSON serialization types
surfflags_t::extended uses booleans instead of a bitflag for simplicity
JSON serialization for surfflags
2021-10-19 21:15:00 -04:00
Jonathan e1290fd0f4 Snap normals/tangents/bitangents written from WriteNormals to save some bits
Texvec inherits mat<2, 4> now, since it's the most logical type for it to be based on.
2021-10-12 13:52:47 -04:00
Jonathan eb4bcf96dc -includeskip for Q2RTX
Fix missing fmt include
Default nexttexinfo to -1 to match other tools
Fmt support for bspversion_t, use that instead of a static function
Cleanup write functions
2021-10-09 14:14:49 -04:00
Jonathan 792951792c some more cleanup 2021-10-02 05:56:45 -04:00
Jonathan a6f6cc2d15 qvec now has an empty default initializer, for speed purposes; fixed up places that relied on this behavior
simplified constructor for qvec(T...) that uses fold expressions
simplified rgba_miptex_t
fixed a lot of broken winding_base_t behavior
merged all winding types into winding_base_t
removed now-empty files
2021-09-27 20:44:15 -04:00
Jonathan 49fd62b9f3 Lotta more file stuff. Have to think about fscanf though. 2021-09-19 22:20:39 -04:00
Jonathan 326626f127 Remove some old stuff
Cleanup/rework of logging system. I'm not too happy about it still, but, it's at least a bit easier to follow now.
Started cleanup of file-related stuff.
2021-09-19 18:17:28 -04:00
Jonathan 4e7542b111 Clang format pass
typedef -> using
include guards -> pragma once
typedef struct x { } y; -> struct y { }
some fixes to extremely old code that shouldn't be required any more
2021-09-14 02:32:26 -04:00
Jonathan 004fcb57c1 Content flags type, splitting up native and compiler flags.
Extreme WIP and likely not working properly. Need to rid all direct .native usages and direct them through target_version->game
2021-09-07 06:13:17 -04:00
Jonathan dad0e61f63 Fix for texinfo/miptex searching routines
surf flags now use the "native + extended" format that will eventually be used for brush contents. Q1 output seems identical, haven't tested Q2 yet.
2021-09-05 16:56:29 -04:00
Jonathan 3b656e6ef1 Cleanup & preserve texture name for q2bsp 2021-09-04 22:15:04 -04:00
Eric Wasylishen 16ad2b077a qbsp: -objexport debugging: Add another point where an .obj is dumped 2019-01-26 22:22:07 -07:00
Eric Wasylishen 8bfe9b4602 qbsp: exportobj.cc: helpers for exporting face/brush vectors 2017-07-23 14:15:10 -06:00
Eric Wasylishen 5f4520ee8b exportobj.cc: remove redundant #defines 2017-06-05 20:29:36 -06:00
Eric Wasylishen ac78efed98 qbsp: func_detail rewrite.
- Fix corrupt VIS issues when using func_detail
- func_detail no longer seals the map.
- add func_detail_illusionary entity type
- add func_detail key "_nosurfacefragment"
2017-06-05 14:09:31 -06:00
Eric Wasylishen 9034eb107a qbsp: move remaining headers to include directory 2017-04-20 19:52:06 -06:00
Eric Wasylishen e5f5b99584 qbsp: bounds check some array accesses 2016-11-02 16:52:12 -06:00
Eric Wasylishen 05447ee0b9 qbsp: use a mtexinfo_t for texinfo before writing to bsp 2016-11-02 16:45:41 -06:00
Eric Wasylishen a6468984bf all: finish c++ification 2016-10-17 19:52:17 -06:00
Eric Wasylishen 60c0b64906 qbsp: change mapdata_t to use std::vector 2016-03-20 14:02:31 -06:00