Commit graph

106 commits

Author SHA1 Message Date
Christoph Oelckers
ec66f39535 - replaced a few naked chars with better types. 2022-08-05 17:04:46 +02:00
Christoph Oelckers
9e6fe2cbaa - added workaround to render the crane in WT's 'Docks' map correctly.
This one violates engine specifications by creating overlapping walls when the crane is rotated.
2022-06-26 09:36:01 +02:00
Christoph Oelckers
aab13addb7 -renamed spritetype’s owner field to ‚intowner‘
Mainly for easier searching.
Also remove the duplicate ‚detail‘ field.
2022-05-24 00:30:41 +02:00
Christoph Oelckers
de1cbb9ee0 - fixed validation issue with maps that have a wall with nextwall == -1 and nextsector > -1.
In this case the bogus nextsector was not reset.
2022-02-15 22:47:53 +01:00
Christoph Oelckers
cf17cffb26 - missed one place where wall coordinates are set from map loading. 2022-02-15 22:18:23 +01:00
Christoph Oelckers
bc0e8b4a8d - use a method for setting wall coordinates when loading a map. 2022-02-15 22:18:23 +01:00
Christoph Oelckers
f44736a5b6 -use an access function for reading wall positions so that we have a non-modifiable value wherever this is possible. 2022-02-15 22:18:23 +01:00
Christoph Oelckers
89ef81da55 - renamed walltype::pos as preparation for refactoring.
no functional changes here
2022-02-15 22:18:22 +01:00
Christoph Oelckers
f98765ce95 - fixed handling of badly placed sprites in map validation code. 2022-01-29 12:33:11 +01:00
Christoph Oelckers
a13612ab9b - Blood: allow bad start spots to pass for modern maps.
These can have alternative start spot definitions.
The error will still be printed, though.
2022-01-13 00:21:15 +01:00
Christoph Oelckers
03cad0fe3b - consider slope sprites unavailable in map formats 5 and 6.
Exhumed has several sprites flagged with this combo - they all need to be treated as face sprites.
2022-01-04 17:18:25 +01:00
Christoph Oelckers
17de3a08e8 - deal with bad start sectors.
The engine will now try to find a proper sector in the map loader if there's a mismatch.
2022-01-01 10:39:59 +01:00
Christoph Oelckers
2bb7cecf27 - eliminated spritetype::clear.
Most uses were bad anyway, and the legitimate ones are just clearing the object.
2021-12-30 17:55:17 +01:00
Christoph Oelckers
5498699faf - use DCoreActor::sector() wherever possible. 2021-12-30 16:51:56 +01:00
Christoph Oelckers
f0b7fe4add - use setsector from DCoreActor.
Also did a bit of cleanup
2021-12-30 16:36:04 +01:00
Christoph Oelckers
c61d82cead - made RRRA E1L3 fix a bit more robust by neutralizing the unconnected one of the two walls.
Also fix thw 'warning C4456: declaration of 'i' hides previous local declaration' warning.
2021-12-30 10:09:13 +01:00
Christoph Oelckers
b1d8f92ded - added wall edge splitting for gl_seamless. 2021-12-30 09:58:44 +01:00
Christoph Oelckers
059412b75e - first batch of routing all write access to sectortype::ceilingz and floorz through a function interface.
We need this for implementing "precise" rendering to flag vertices as dirty.
2021-12-30 09:58:14 +01:00
Christoph Oelckers
00a7be545d - added a map preview to the user map browser. 2021-12-30 09:58:08 +01:00
Christoph Oelckers
ca9d73ffee - renamed some shadowing variables in common code. 2021-12-30 09:57:32 +01:00
Mitchell Richters
cecb8dc48e - Replace spritetypebase y with pos.Y calls. 2021-12-30 09:57:05 +01:00
Mitchell Richters
33ca55023f - Replace spritetypebase x with pos.X calls. 2021-12-30 09:57:05 +01:00
Mitchell Richters
b2ab64bb62 - Capitalise vec3_t z variable. 2021-12-30 09:57:03 +01:00
Mitchell Richters
68e2691be7 - Capitalise vec3_t y variable. 2021-12-30 09:57:03 +01:00
Mitchell Richters
c549cc5276 - Capitalise vec3_t x variable. 2021-12-30 09:57:02 +01:00
Mitchell Richters
118ceb18ca - Capitalise vec2_t y variable. 2021-12-30 09:57:02 +01:00
Mitchell Richters
3c9cd926ba - Capitalise vec2_t x variable. 2021-12-30 09:57:02 +01:00
Christoph Oelckers
785c7d4ceb - removed numsectors and numwalls entirely.
With Blood's Polymost mirror hack the risk of getting out of sync with the arrays was a genuine issue, so now only the array size counts.
2021-12-30 09:56:54 +01:00
Christoph Oelckers
df0c577cf4 - replaced most of numsectors, too. 2021-12-30 09:56:54 +01:00
Christoph Oelckers
f1c0298825 - replaced numwalls with wall.Size in several places. 2021-12-30 09:56:54 +01:00
Christoph Oelckers
65bc6e6aef - removed the now redundant wall() and sector() interator helper functions.
With both wall and sector now being TArrays they are not needed anymore.
2021-12-30 09:56:53 +01:00
Christoph Oelckers
756ed1c14b - removed the workaround to make Lunatic Fringe not glitch. 2021-12-30 09:56:52 +01:00
Christoph Oelckers
8b427e35c2 - stuff that needs FromInt 2021-12-30 09:56:51 +01:00
Christoph Oelckers
8f012d1beb - made wall flags type safe 2021-12-30 09:56:47 +01:00
Christoph Oelckers
6e32832428 - made sector ceiling/floor flags type safe.
- made sector flags type safe.
2021-12-30 09:56:46 +01:00
Christoph Oelckers
d0a06ae961 - deal with most of CSTAT_SECTOR_SKY and CSTAT_SECTOR_SLOPE 2021-12-30 09:56:45 +01:00
Christoph Oelckers
24a6d45f97 - minor slope math optimization.
May save one division and merges the '<< 5' into the main calculation.
2021-12-30 09:53:56 +01:00
Christoph Oelckers
5f18109371 - consolidated all getslope code into a single function.
This also caches a wall's length to avoid taking the square root every single time for a slope calculation.
2021-12-30 09:53:55 +01:00
Christoph Oelckers
dddf48fd3e - cleaned up and renamed buildtypes.h.
Content was reordered so that the file can contain the inlines belonging to the map data types that previously had to be stored elsewhere.
Also moved out of the Build folder because virtually everything in here can be traced to content available in Duke Nukem 3D's and Shadow Warrior's source releases.
2021-12-30 09:53:46 +01:00
Christoph Oelckers
4a5de6f56e - make sure that all changes of wall coordinates invalidate associated data.
walltype::move should be the preferred function to be used for this, otherwise walltype::moved needs to be called.
2021-12-30 09:53:11 +01:00
Mitchell Richters
95d60deecd - Rename remaining hw_sections*.* files to hw_sections.*. 2021-12-30 09:53:11 +01:00
Christoph Oelckers
fc41a2bd85 - renamed sections2 and sections2PerSector.
No more need for a '2'.
2021-12-30 09:53:10 +01:00
Christoph Oelckers
f6d852b5a0 - removed the old section builder 2021-12-30 09:53:09 +01:00
Christoph Oelckers
bb9313454d - removed SectorGeometry class. 2021-12-30 09:53:09 +01:00
Christoph Oelckers
4364e68d05 - automap work to transition to new sections. 2021-12-30 09:53:08 +01:00
Christoph Oelckers
69593fd5c7 - Triangulation WIP
# Conflicts:
#	source/core/sectorgeometry.cpp
2021-12-30 09:53:07 +01:00
Christoph Oelckers
ad018db80a - new section builder. 2021-12-30 09:53:06 +01:00
Christoph Oelckers
a733de618f - new section WIP. 2021-12-30 09:53:06 +01:00
Christoph Oelckers
1bf654036a - delete duplicated walls in RRRA E1L3 and E1L6. 2021-12-30 09:48:50 +01:00
Christoph Oelckers
5e09a43e91 - added auto-patcher for overlapping wall ranges.
This is for cases where the proper sector can be found by looking at the walls' point2 links.
2021-12-26 23:10:04 +01:00