Commit graph

120 commits

Author SHA1 Message Date
Christoph Oelckers
f1514bbc52 - alternative math for slope planes in hitscan. 2022-10-22 20:41:27 +02:00
Christoph Oelckers
74cf9a2ff2 - hitscan fully rewritten.
No traces of Build code left here! :)
2022-10-22 20:41:27 +02:00
Christoph Oelckers
116ba340b2 - further hitscan overhaul.
* added floating point sprite intersect handlers for all sprite types. Hopefully this code is more understandable than Build's original variant.
* cleaned up intersectSprite a bit and moved the geometry math into the utility header.
* made some minor corrections to neartag.
* moved SW's testpointinquad to the backend because it was useful here.
2022-10-22 20:41:26 +02:00
Mitchell Richters
6ca42dc08c - Slightly clean up calcChaseCamPos(). 2022-10-22 20:41:26 +02:00
Christoph Oelckers
6dd7fac902 - eliminated the sine table and moved tilehasmodelorvoxel to a different file to delete engine.cpp. 2022-10-22 12:17:04 +02:00
Christoph Oelckers
ef2f781e09 - rewrite from scratch of neartag. 2022-10-22 12:17:04 +02:00
Christoph Oelckers
dcd4ee133b - use a simpler method to calculate the intersection point in intersectSprite and fixed the distance check. 2022-10-22 12:17:03 +02:00
Christoph Oelckers
9c564db015 - replaced try_facespr_intersect with something independently written. 2022-10-22 12:17:03 +02:00
Christoph Oelckers
28a169d02d - cansee floating point rewrite using backend utilities. 2022-10-22 12:17:02 +02:00
Christoph Oelckers
6a1ff029b7 - floatified getslopeval and all related code. 2022-10-22 12:17:00 +02:00
Christoph Oelckers
ece8663f5e - floatified calcSlope and cleaned up the get*slope interface 2022-10-22 12:17:00 +02:00
Christoph Oelckers
bd9dfadf6d - use REPEAT_SCALE ih the wall/floorsprite getter functions. 2022-10-22 12:16:57 +02:00
Christoph Oelckers
b2d1988e50 - use engine utilities for the section builder’s inside check 2022-10-22 12:16:57 +02:00
Christoph Oelckers
ca8b9e9793 - overhauled getzrangepoint to use backend utilities 2022-10-22 12:09:54 +02:00
Christoph Oelckers
3c9a94dba8 - consolidated Duke’s ‚away from wall‘ check in the backend
This was also very useful in SW to avoid spawning ‚floating‘ footprints due to lack of an equivalent check in the original.
2022-10-21 00:00:02 +02:00
Mitchell Richters
53b32ea161 - Leverage walltype's delta() method in chase cam code. 2022-10-15 13:32:04 +02:00
Mitchell Richters
6716d0f2e9 - Floatify smoothratio for calcChaseCamPos(). 2022-10-15 13:32:02 +02:00
Christoph Oelckers
6b0b8f944c - floatified the height parameter of nextsectorneighborptr 2022-10-15 12:42:30 +02:00
Mitchell Richters
056bb9b0cd - Floatify chase cam code, providing an inline interface for legacy setup. 2022-10-15 12:16:53 +02:00
Mitchell Richters
977d8f8109 - Convert gi->chaseCamPos() to return a floating point DVector3 object. 2022-10-15 12:16:53 +02:00
Mitchell Richters
db5db7d9b3 - Turn DVector2 rotatepoint() into an inline using the vector's methods. 2022-10-15 12:16:53 +02:00
Christoph Oelckers
aa22e48036 - preparations for xvel wrapping.
Mainly providing alternative names for the spritetype members and redirecting all relevant access to those.
2022-10-14 23:02:11 +02:00
Christoph Oelckers
05f488ce3c - add more wrappers and use 'inittype' where the actual zvel member of spritetype is wanted.
This will avoid problems with search&replace later.
2022-10-14 20:31:56 +02:00
Christoph Oelckers
3f7b423a4a - zvel wrapping, part 1. 2022-10-14 20:31:55 +02:00
Christoph Oelckers
6ce01e24d2 - renamed walltype::delta and walltype::center 2022-10-13 22:54:42 +02:00
Christoph Oelckers
97223af592 - silenced a few conversion truncation warnings. 2022-10-12 15:49:07 +02:00
Christoph Oelckers
4d02cdcce9 - use explicit types in hitscan calls 2022-10-06 20:50:47 +02:00
Christoph Oelckers
3a9f9988f4 - redid clipinsidebox* functions.
* Completely rewritten to be less obtuse.
* Consolidated the two variants.
* Renamed to be clearer about what they do.
2022-10-05 18:31:45 +02:00
Christoph Oelckers
91f305125e - floatified GetWallSpritePosition and redirected get_wallspr_points to use it. 2022-10-05 18:29:04 +02:00
Christoph Oelckers
c712d594e0 - fully floatified GetFlatSpritePosition 2022-10-05 18:29:03 +02:00
Christoph Oelckers
55ade2eda4 - use int_hitpos() access function where applicable 2022-10-05 18:10:44 +02:00
Christoph Oelckers
296b5d7edd - renamed HitInfo::hitpos 2022-10-05 18:03:41 +02:00
Mitchell Richters
d28d6cd4cf - Utilise actor sprite's full precision in instances where angle was converted to Build and back again. 2022-10-05 00:36:30 +02:00
Christoph Oelckers
fe6fcdff1f - use DAngle for actors
Note that intangle needs to be kept - primarily for SW's ST tags.
2022-10-05 00:36:29 +02:00
Mitchell Richters
728edc182d - Remove last main usage of binangle outside of the game's input code. 2022-10-05 00:36:26 +02:00
Mitchell Richters
6167448f27 - Blood: Replace all uses of binangle with DAngle objects. 2022-10-05 00:36:24 +02:00
Mitchell Richters
c935fc2226 - Refactor chase cam positional code to use DAngle input rather than binangle.
* These changes still maintain Build's integer positional values in Q28.4/Q24.8, changing this will be done later on.
2022-10-05 00:36:22 +02:00
Christoph Oelckers
f54e4b8a9a - more int_ang() 2022-10-04 23:56:43 +02:00
Christoph Oelckers
33d5b54ce0 - use int_ang(). 2022-10-04 23:56:43 +02:00
Christoph Oelckers
735b9a8fed - renamed ang to __int_angle 2022-10-04 23:56:42 +02:00
Christoph Oelckers
a59a771209 - use floats for ceilingz/floorz storage. 2022-08-27 10:49:59 +02:00
Christoph Oelckers
c84d75b8bf - use inline access functions to read floorz/ceilingz. 2022-08-27 09:58:16 +02:00
Christoph Oelckers
0672572e63 - renamed sectortype::floorz and ceilingz as preparation for floatification 2022-08-27 09:47:48 +02:00
Christoph Oelckers
02ae6476de - changed the pos vector of spritetype to floating point. 2022-08-27 09:26:13 +02:00
Christoph Oelckers
c15aeec9f7 - late __int_pos additions 2022-08-26 19:53:11 +02:00
Christoph Oelckers
dc94dedc6b - renaming spritetype::pos 2022-08-26 19:53:10 +02:00
Christoph Oelckers
ad9931081e -fix some bugs, handle occurences in recently changed code 2022-08-26 19:53:10 +02:00
Christoph Oelckers
4d423004e9 - unlimited the displayable sprites.
Now with Polymost gone this can finally be done properly.
2022-08-07 10:25:15 +02:00
Christoph Oelckers
4f2170655c - animateoffs cleanup and consolidation
This was rewritten based on specs alone - it still doesn’t look that different due to its simplicity.
2022-08-05 23:32:16 +02:00
Christoph Oelckers
83c0ad55f2 - rewrote nextsectorneighborzptr with a better parameter interface 2022-08-05 18:43:48 +02:00