Commit graph

1776 commits

Author SHA1 Message Date
Christoph Oelckers
8c4cb75d8c - checkhitswitch_r 2021-11-29 00:56:20 +01:00
Christoph Oelckers
6d4365f3a2 - animatewalls_r 2021-11-29 00:56:20 +01:00
Christoph Oelckers
530c29973e - more walls in sectors_d.cpp 2021-11-29 00:56:20 +01:00
Christoph Oelckers
7268e779a7 - checkhitswitch_d 2021-11-29 00:56:19 +01:00
Christoph Oelckers
8cf3963901 - animatewalls_d 2021-11-29 00:56:19 +01:00
Christoph Oelckers
7615a52126 -operatesectors + operateforcefields. 2021-11-29 00:56:19 +01:00
Christoph Oelckers
60f16e8fb8 - handle_st09 2021-11-29 00:56:19 +01:00
Christoph Oelckers
463ce55d0b - premap 2021-11-29 00:56:19 +01:00
Christoph Oelckers
7a504e27d2 - premap_d 2021-11-29 00:56:19 +01:00
Christoph Oelckers
6b8e7b3fbc - RR: movement code 2021-11-29 00:56:18 +01:00
Christoph Oelckers
1953f0f599 - delete unused variables. 2021-11-29 00:56:18 +01:00
Christoph Oelckers
aee2668088 - RR shootWeapon 2021-11-29 00:56:18 +01:00
Christoph Oelckers
b97f8706ad - operateTripBomb 2021-11-29 00:56:18 +01:00
Christoph Oelckers
e88047fc45 - wall[] in shootknee, shootweapon and shootlaser. 2021-11-29 00:56:18 +01:00
Christoph Oelckers
81894fd831 - Duke: shootbloodsplat 2021-11-29 00:56:18 +01:00
Christoph Oelckers
2fa027a686 - RR: deal with wall[] in actor_lava.cpp 2021-11-29 00:56:17 +01:00
Christoph Oelckers
345d9c87b6 - RR: no more wall[] in actors_r.cpp 2021-11-29 00:55:41 +01:00
Christoph Oelckers
00edd16834 - Duke: get rid of the remaining wall[] references in actors_d.cpp 2021-11-29 00:55:41 +01:00
Christoph Oelckers
e0260bc709 - Duke/RR: weaponhitwall cleaned up (both variants) 2021-11-29 00:55:40 +01:00
Christoph Oelckers
5bb805663e - Duke/RR: cleaned up the rest of hitradius* as well
Using wallsofsector iterator plus defining local variables more locally.
2021-11-29 00:55:40 +01:00
Christoph Oelckers
63985ce6be - Duke/RR: redo the supremely ugly code to access the third point in hitradius* 2021-11-29 00:55:40 +01:00
Christoph Oelckers
68d653efe9 - made the same changes to hitradius_r
Also had to do some reformatting to get rid of the goto in there.
2021-11-29 00:55:40 +01:00
Christoph Oelckers
821f341e03 - use BFSSearch in hitradius_d 2021-11-29 00:55:39 +01:00
Christoph Oelckers
ad030d7e23 - Duke: SE20 + SE128 are wall-free
Also use symbolic constantfor SE_128 to make it easier to find.
2021-11-29 00:55:39 +01:00
Christoph Oelckers
010162261e - Duke: use utilities in handle_se19 2021-11-29 00:55:39 +01:00
Christoph Oelckers
312bf5bf95 - Duke: use wall utilities in bounce and queball 2021-11-29 00:55:39 +01:00
Christoph Oelckers
58a091067f - use provided sector/wall iterators in cacheit functions 2021-11-29 00:55:39 +01:00
Christoph Oelckers
2fe71a65a8 - added a few fallthrough annotations that were missed last time. 2021-11-29 00:55:31 +01:00
Mitch Richters
2a7d0e6fe3 - gi->AddExcludedEpisode(): Pass FString variable through as reference instead of by value. 2021-11-29 00:55:31 +01:00
Christoph Oelckers
01abe7b2ac - addressed most unused/uninitialized variable warnings from MSVC. 2021-11-29 00:55:30 +01:00
Christoph Oelckers
c6bd5c04c7 - fixed most warnings GCC pointed out in game code. 2021-11-29 00:55:29 +01:00
Christoph Oelckers
f7fdc5af41 - address several warnings reported by GCC 11. 2021-11-29 00:55:29 +01:00
Christoph Oelckers
dcccb0d653 - Duke: added [[fallthrough]] annotations wherever needed. 2021-11-29 00:55:29 +01:00
Mitch Richters
ec0203b89b - Duke: Don't truncate fistzoom to integer in animatefist(). 2021-11-29 00:55:16 +01:00
Mitch Richters
e491d15ff9 - Move InputScale() out of inputstate.cpp and into i_time.cpp as I_GetInputFrac() to make it available to GZDoom for potential future requirements.
* As part of this, feed the output of `I_GetInputFrac()` to `gi->GetInput()` instead of having each game's virtual override calling it locally.
2021-11-29 00:55:01 +01:00
Christoph Oelckers
5cda9d0858 - tabified two files in Duke that were missed somehow, plus some comment cleanup elsewhere. 2021-11-29 00:53:35 +01:00
Christoph Oelckers
aac02d52db - Duke/RR: fixed hitradius
The recent optimization did not update the sector pointer inside the loop
2021-11-15 00:18:52 +01:00
Christoph Oelckers
9b21233c98 - little bit of cleanup 2021-11-11 23:47:26 +01:00
Christoph Oelckers
2e3c212444 - Duke: moved the temtempsector* arrays into the only function using them 2021-11-11 23:32:49 +01:00
Christoph Oelckers
f109f6c857 - Duke/RR: fixed two bad assignments to wall 0. 2021-11-11 21:58:15 +01:00
Christoph Oelckers
f2e344a235 - removed magic flags added to sector indices in Polymost.
These are better done as separate function arguments.
2021-11-11 21:28:53 +01:00
Christoph Oelckers
94b2b0af31 - widen sector index in engineLoadBoard to 32 bit 2021-11-09 00:07:00 +01:00
Christoph Oelckers
2d91786516 - changed all sector variables being passed to pushmove to full ints 2021-11-08 23:18:40 +01:00
Christoph Oelckers
2e1ff313b0 - Duke: only use the main clipmove function and match clipmove_ex’s interface 2021-11-08 23:11:29 +01:00
Christoph Oelckers
066896db8e - warnings fix 2021-11-08 18:37:20 +01:00
Christoph Oelckers
6b6c3f26a5 - use wallsofsector in a few more places. 2021-11-07 18:08:22 +01:00
Christoph Oelckers
59df3b0e19 - added a little utility that allows iterating over the walls of a sector with C++ for's. 2021-11-07 17:27:05 +01:00
Christoph Oelckers
4b0ffe5443 - looks I missed a few shorts.
Now all local short variables are gone, except for 2 lotags arrays.
2021-11-07 16:58:48 +01:00
Christoph Oelckers
ae08ae1d8d - some leftover shorts plus utilities that ended up unused but may be useful later. 2021-11-07 16:46:23 +01:00
Christoph Oelckers
35b9318580 - Duke/RR: checked the rest of the code for shorts and replaced most local ones with ints. 2021-11-07 16:33:13 +01:00
Christoph Oelckers
3a73a9f8ed - Duke/RR: replaced more local short variables with ints. 2021-11-07 16:30:56 +01:00
Christoph Oelckers
98f57a7ad4 - use explicitly sized types for static const arrays. 2021-11-07 16:30:56 +01:00
Christoph Oelckers
fd2764dc6e - Duke: eliminated all local short variables in actors*.cpp. 2021-11-07 16:30:55 +01:00
Christoph Oelckers
9b2b34a026 - removed a few unneeded type casts. 2021-11-07 16:30:55 +01:00
Christoph Oelckers
15be44a931 - use explicitly sized types for static const arrays. 2021-11-07 16:30:55 +01:00
Christoph Oelckers
1eeb8864a4 - Duke/RR: eliminated all uses of 'char' outside of text management 2021-11-07 16:30:55 +01:00
Christoph Oelckers
e2faeec2ce renamed all signed and unsigned chars to int8_t/uint8_t. 2021-11-07 16:30:55 +01:00
Christoph Oelckers
0eba3335c6 - eliminated some leftover 16 bit values used for storing indices. 2021-11-07 16:30:44 +01:00
Christoph Oelckers
977d668bef - extended animatetarget to 32 bit. 2021-11-07 16:21:44 +01:00
Christoph Oelckers
f95af3368b - use ints in hitscan wrapper as well. 2021-11-07 16:20:59 +01:00
Christoph Oelckers
de7a06bea4 - Duke: extended neartag wrapper to use 32 bit integers as return values. 2021-11-07 16:20:59 +01:00
Christoph Oelckers
887279f8a5 - RR: Use int instead of short in bowling functions. 2021-11-07 16:20:59 +01:00
Christoph Oelckers
b13398c268 - quick global wall[] replacements. 2021-11-07 15:57:29 +01:00
Christoph Oelckers
a594e6465c - added nextSector access function to walltype and used it to eliminate a few more sector[] references. 2021-11-07 15:56:29 +01:00
Christoph Oelckers
0c64560fd8 - Duke: wall[] replacement in script code. 2021-11-07 15:00:08 +01:00
Christoph Oelckers
c8c8ca05d3 - Duke: sector[] handled in one more premap loop. 2021-11-07 15:00:08 +01:00
Christoph Oelckers
5eed73f7af - Duke/RR: sector[] replacement in spawn code. 2021-11-07 15:00:08 +01:00
Christoph Oelckers
ca5a014a2d - Duke: a few more sector[] replacements in precaching code. 2021-11-07 15:00:08 +01:00
Christoph Oelckers
2c1881530a - Duke: use a sector pointer in spawneffector. 2021-11-07 15:00:07 +01:00
Christoph Oelckers
c068054fa0 - RR: most sector[] accesses replaced by pointers in actors_r.cpp. 2021-11-07 15:00:07 +01:00
Christoph Oelckers
7749bcbedf - Duke: clean up actors_lava.cpp.
Use sector pointer variables and extend all arrays holding sector indices to 32 bit.
2021-11-07 15:00:07 +01:00
Christoph Oelckers
e0f3fa2aa0 -Duke: replaced sector array accesses in actors_d.cpp. 2021-11-07 15:00:07 +01:00
Christoph Oelckers
8c5e4a7fa9 - Duke: a large batch of quick'n easy sector[] replacements with pointers. 2021-11-07 15:00:07 +01:00
Christoph Oelckers
d45f687d4b - pass a sector pointer to floorspace/ceilingspace. 2021-11-07 15:00:06 +01:00
Christoph Oelckers
060da8ec1d - Duke: replaced most sector array accesses with pointers in actors.cpp.
This already helped to find one 16 bit value that stored a sector index.
2021-11-07 15:00:06 +01:00
Mitch Richters
bc9ea38aba - Duke: Fix issue where calculated value for old player variable return_to_center could have been negative, causing undefined behaviour. 2021-11-07 21:14:29 +11:00
Christoph Oelckers
9a1c80c464 - Duke: added a wrapper for player_struct::cursectnum to directly return the sector pointer.
This eliminates more than 10% of the existing direct references to the sector[] array.
2021-11-06 21:59:42 +01:00
Christoph Oelckers
c3cbd1b1eb - Duke: cleanup of cycler code.
Now uses a struct instead of an array with magic indices.
2021-11-06 21:53:15 +01:00
Christoph Oelckers
1c0e3d849b - addressed the updatesector related deprecation warnings with Duke. 2021-11-06 20:46:08 +01:00
Christoph Oelckers
d20aa47adf - made sector parameter of updatesectorz an int and deprecated the short version. 2021-11-06 19:27:51 +01:00
Christoph Oelckers
83fe41e71e - made updatesector receive a 32 bit int pointer and deprecated the 16 bit variant. 2021-11-06 15:53:16 +01:00
Christoph Oelckers
f2adeff8c1 - Duke: extended 3 arrays holding sector and wall indices to full ints.
Just to be prepared for the future.
2021-11-06 14:22:16 +01:00
Christoph Oelckers
f4cc5b5b89 - Duke: const-ify SE24 tile lists 2021-11-06 14:19:55 +01:00
Christoph Oelckers
c8d65a1f06 - use sector wrappers where easily doable with search and replace. 2021-11-06 14:19:55 +01:00
Christoph Oelckers
9e4afd543c - Duke/RR: Some quick wall[] replacements. 2021-11-06 14:19:55 +01:00
Christoph Oelckers
b548d9eca2 - a few more quick sector[] replacements. 2021-11-06 14:19:55 +01:00
Christoph Oelckers
bc56b5a28f - RR: cleaned up STAT_DESTRUCT init code a bit 2021-11-06 14:19:54 +01:00
Christoph Oelckers
8818a3f1cb - Duke: added a getSector method to DDukeActor. 2021-11-06 14:19:54 +01:00
Mitch Richters
3778327818 - Duke: Back up rotscrnang if script sets target to new value so we can interpolate the changes. 2021-11-06 17:57:37 +11:00
Mitch Richters
7499c84d0b - Add interpolatedhorizon() inlines to handle interpolating fixedhoriz objects without having to convert old and new values back to Q16.16 first. 2021-11-06 14:07:58 +11:00
Christoph Oelckers
389f760d45 - address C++20 deprecation warnings with enums in floating point arithmetic. 2021-11-02 23:32:31 +01:00
Mitch Richters
523285b9b0 - Duke (RR): Clean up some unnecessary FixedToFloat() usage with the fixedhoriz asbuildf() method. 2021-11-02 10:29:26 +11:00
Christoph Oelckers
86166f5e67 Revert "- xs_Float.h: Make all inlines return an unsigned value, and change previous unsigned inlines to signed."
Revert "- `xs_Float.h`: Add `getint()` getter to `_xs_doubleints` struct."
Revert "- SW: When adjusting horizon in `DoPlayerDeathHoriz()`, just use integer horizon values and not Q16.16."
Revert "- Duke (RR): Clean up some unnecessary `FixedToFloat()` usage with the `fixedhoriz` `asbuildf()` method."
Revert "- `binaryangle.h`: Use `constexpr` on inline functions where it was previously not possible to do so."
Revert "- `m_fixed.h`: Use `constexpr` on inline functions where it was previously not possible to do so."
Revert "- `xs_Float.h`: Convert header to `constexpr`."

This does nor work as it violates the constexpr rules for unions. The code will error out on compilation for accessing an inactive member of a union.
2021-11-01 20:25:38 +01:00
Mitch Richters
1363ed654c - Duke (RR): Clean up some unnecessary FixedToFloat() usage with the fixedhoriz asbuildf() method. 2021-11-01 23:37:32 +11:00
Mitch Richters
eb8b075727 - binaryangle.h: Change binangle bitshift operators to operate on signed value to properly handle angles > 1024. 2021-11-01 22:13:39 +11:00
Mitch Richters
a1570c185f - Duke: Remove posx/posy/posz variables and replace with points in the previously unionised pos vec3_t variable. 2021-10-31 17:52:52 +11:00
Mitch Richters
b02a6a3ec9 - Replace MIN() from templates.h with version provided in STL. 2021-10-30 10:36:15 +02:00
Mitch Richters
9894729fc2 - Replace MAX() from templates.h with version provided in STL.
# Conflicts:
#	source/common/textures/hw_ihwtexture.cpp
#	source/common/utility/templates.h
2021-10-30 10:36:02 +02:00
Christoph Oelckers
57b638f26f - use std::clamp instead of our homegrown version. 2021-10-30 10:35:00 +02:00
Christoph Oelckers
821f3d356b - renamed DDukeActor::GetIndex to GetSpriteIndex to bring it in line with the other games. 2021-10-24 09:22:35 +02:00
Christoph Oelckers
4d94fa9b03 - Duke/RR: strip trailing spaces off strings parsed in CON. 2021-10-19 21:49:02 +02:00
Christoph Oelckers
62d0d3712e - use a sprite flag to mark mapped sprites.
This avoids another global array which needs to be addressed by sprite index.
2021-10-14 15:09:43 +02:00
Christoph Oelckers
b1ac1ad585 - more changesprite* renaming. 2021-10-12 21:36:42 +02:00
Christoph Oelckers
2e37cc627c - function renaming for clarity and easier lookup. 2021-10-12 21:36:42 +02:00
Christoph Oelckers
948f194064 - fixed warnings in Duke. 2021-10-08 19:21:29 +02:00
Mitch Richters
61ba58c529 - Duke: Use DeferredGameStart() instead of ChangeLevel() in cheatLevel() to instantly warp to the targeted map, matching DOS behaviour.
* Fixes #529.
2021-10-05 08:50:05 +11:00
Christoph Oelckers
6be611fd94 - fixed merge. 2021-09-12 18:32:11 +02:00
Christoph Oelckers
fefc9e91da - rename weaponhit to DDukeActor.
Just make do with one name instead of aliasing it.
2021-08-30 08:12:39 +02:00
Christoph Oelckers
2b6bc414f5 - Duke: fixed a few places using a sprite index where a player index is needed. 2021-08-30 08:08:33 +02:00
Christoph Oelckers
0bd0923f44 - cleaned up some dirty code. 2021-08-30 08:07:40 +02:00
Christoph Oelckers
07eda3cb4a - Duke: don't process input when not in a game. 2021-08-30 08:06:26 +02:00
Christoph Oelckers
9a8ee00aec - set currentLevel before calling engineLoadBoard.
This is needed if the compatibility patcher needs to alter mapinfo data.
2021-07-27 22:12:29 +02:00
Mitchell Richters
1fa0863a52 - Duke: Amend af9f2f3eb6 to not reset the skill if incoming skill is -1; 2021-07-26 19:41:17 +10:00
Christoph Oelckers
dfb18ef9a9 - Duke/RR: Call Bowling lane reset code only when playing RR.
This may alter some tile references which will cause problems with hires replacements in Duke .
2021-07-25 12:43:03 +02:00
sirlemonhead
e4fb67bc25 Rides Again: Possible array index by -1 in Proj_DoHitscan(). Added check to prevent this. 2021-07-25 19:37:02 +10:00
Mitchell Richters
af9f2f3eb6 - Duke: Ensure gi->NextLevel() sets the skill level upon invocation. 2021-07-20 18:55:16 +10:00
Mitchell Richters
675356be1a - Ensure g_nextskill is used everywhere so that setting skill for next level works properly. 2021-07-20 18:51:34 +10:00
Mitchell Richters
33845c4a23 - Add skill CCMD to return player's current skill, while also being able to set skill for next game.
* Fixes #332.
2021-07-20 18:50:58 +10:00
Mitchell Richters
4ac1376b9f - Make naming of multiplayer episode exclusion stuff from d0e6a7ea29 more generic and exclude invalid episodes from "Duke It Out in DC", "Duke Nuclear Winter" and "Duke Caribbean". 2021-07-19 12:24:47 +10:00
Mitchell Richters
bcff74f5e4 Revert "- Duke: Restore a little bit of original code to make comparisons between us and the source easier."
This reverts commit 7607190dad.

* Not good in hindsight... We need the actual value from the backend to ensure we can match up against `WeaponSel_Next`/`WeaponSel_Prev`/`WeaponSel_Alt` as required.
2021-07-17 22:42:58 +10:00
Mitchell Richters
7607190dad - Duke: Restore a little bit of original code to make comparisons between us and the source easier. 2021-07-17 12:12:36 +10:00
Mitchell Richters
ec20f66eda - Duke/RR: Always ensure player's wantweaponfire is reset to -1 after switching weapon.
* Fixes #333.
2021-07-17 12:12:12 +10:00
Mitchell Richters
0bb0896985 - Duke: Fix BOSS2 (Cycloid Emperor) killing himself issue by removing some lines left behind from a2e3bb5725.
* Fixes #455.
2021-07-17 10:56:21 +10:00
Mitchell Richters
d0e6a7ea29 - Allow CON-based games to have multiplayer episodes filtered from menu.
* Fixes #461.
* Fixes #462.
2021-07-16 20:55:29 +02:00
Mitchell Richters
32283037ed - Use isWW2GI() in more places. 2021-07-11 12:42:33 +10:00
Mitchell Richters
b015bc0685 - Duke (RRRA): Fix alt weapon slot for CHICKEN_WEAPON and CROSSBOW_WEAPON.
* Fixes #440.
2021-06-24 18:56:12 +10:00
Christoph Oelckers
20ca676539 - RR: fixed crash in function that handles acts of mass destruction (like blowing up gas stations.)
With bad setups 'spr' could be left uninitialized. This crashed E1L1 of 'The Hickston Swamp' mod.
2021-06-11 23:20:50 +02:00
Christoph Oelckers
d270d75d74 - re-added line of code that got lost during refactoring. 2021-06-10 00:14:04 +02:00
Christoph Oelckers
4b35a30de5 - RR: fixed the bowling lane lights.
Tiles had not been made writable.
Also renamed a few bowling related things.
2021-06-09 23:53:05 +02:00
Christoph Oelckers
5b38343407 - fixed sprite exclusion logic in getzrange.
This was using the wrong flag.
2021-06-09 00:31:54 +02:00
Christoph Oelckers
dc846dcd49 - Duke: avoid clipping against self when executing script logic for floor sprites.
A good place to see the result is a kitchen knife in E4L2 that went missing due to the faulty check.
2021-06-01 21:21:39 +02:00
Christoph Oelckers
454816299e - reorganized loading of textures.
Due to dependencies on initializing some data in app_init it was not possible to cleanly set up the fonts.
This adds a game-side function for loading the entire palettes before starting with the texture data and another one for loading game-side texture data.
This now allows fully setting up the palettes before starting with the textures and to fully set up the textures before reading the .def files.

All this is needed because to properly initialize, the fonts need to be able to access the fully initialized texture state, including replacements and hires substitutions from the .def files.
2021-06-01 11:05:26 +02:00
Christoph Oelckers
9c60ab791b - implemented all needed font overrides for localization. 2021-05-31 21:20:31 +02:00
Christoph Oelckers
af781e0422 - moved all font setup out of the C++ code.
All internal fonts now get defined through FONTDEFS.
Also fixing a few offsets.
2021-05-31 21:20:31 +02:00
Christoph Oelckers
42b70a7d93 - added internationalized fonts.
This still needs a bit of fixing and tweaking but most is working.
2021-05-31 21:20:30 +02:00
Christoph Oelckers
db21313c96 - add some hackery to deal with WT's bosses.
This was the result of some gross change to the spawning code which suddenly changed the rules about minibosses.
To reduce the impact, it is only enabled for the "Alien World Order" maps.
2021-05-29 13:12:50 +02:00
Christoph Oelckers
e10bcf6294 - split the screen job code into a generic and a Raze specific part.
Preparations for porting this to GZDoom.
2021-05-22 01:35:50 +02:00
Christoph Oelckers
d572e56839 - removed the indirection for the global arrays.
No idea what part of EDuke32 needed this, but it is not necessary.
2021-05-21 14:32:01 +02:00
Christoph Oelckers
ec976d9db7 - RR: fixed double negation in pitch math when throwing dynamite. 2021-05-20 19:06:11 +02:00
Christoph Oelckers
f136330628 - removed the native versions of Duke's and RR's status bar. 2021-05-15 17:15:29 +02:00
Christoph Oelckers
781cb32dcf - fixed all issues with Duke's/RR's status bar. 2021-05-15 16:46:08 +02:00
Christoph Oelckers
f84f58e714 - ported Duke and RR status bars.
Compiles but not tested yet.
2021-05-15 14:27:32 +02:00
Christoph Oelckers
d311792e06 - engine side preparations for Duke Statusbar scriptification.
Mainly, gotweapon had to be reverted to a flat bool array to avoid implementing FixedBitArray for the VM.
Also adding a few new tile names and PushV for string arrays.
2021-05-15 10:44:35 +02:00
Christoph Oelckers
5a6121d424 - status bar interface work. 2021-05-15 10:25:38 +02:00
Christoph Oelckers
5ae1c334fa - Duke: fixed bad check in 'ifnotmoving' CON command. 2021-05-14 10:03:07 +02:00
Christoph Oelckers
cb2bc7967a - fixed the remaining warnings. 2021-05-12 21:50:01 +02:00
Christoph Oelckers
cf22a70d82 - fixed all warnings in Duke. 2021-05-12 21:50:01 +02:00
Christoph Oelckers
d097c8e635 - removed the non-functional and long abandoned level music alias feature.
With RMAPINFO such a hack is no longer needed for anything.
2021-05-12 21:48:40 +02:00
Christoph Oelckers
03289f5097 - silenced some warnings. 2021-05-12 21:47:32 +02:00
Christoph Oelckers
e40ed2262e - cleanup of 'gotpic' handling. 2021-05-10 20:13:28 +02:00
Christoph Oelckers
e74aca291c - position tweaking for Nam's skies.
Why is this such an utter mess to get skies placed correctly? :(
2021-05-10 20:13:28 +02:00
Cacodemon345
ce4b748ff0 Fix compilation with Clang on FreeBSD 2021-05-09 19:52:52 +02:00
Christoph Oelckers
43981bff85 - Duke: fixed mirror setup for new renderer.
A wall must be marked one-way to be used as a mirror.
2021-05-08 16:27:01 +02:00
Christoph Oelckers
de904d3052 . Duke: made the 'lonely effector' error non fatal.
Instead just move the bogus effector sprite out of the way.
2021-05-08 15:41:49 +02:00
Christoph Oelckers
c679f83f75 - make all games return to the main menu when the game is ended with F10.
Duke still went to the intro movies which was a bit problematic.
2021-05-04 11:32:09 +02:00
Christoph Oelckers
a303da37a9 - added a mapinfo dumper and used it to verify correctness of the data generated from game-native definitions.
Also simplified the levelnumber setup a bit.
2021-05-03 23:00:24 +02:00
Christoph Oelckers
7d77b2315f - merged the few remaining contents of mmulti.h into d_net.h 2021-05-03 19:01:00 +02:00
Christoph Oelckers
56fcf904b5 - Backend update from GZDoom. 2021-05-03 14:48:55 +02:00
Christoph Oelckers
8003ab6fa3 Merge branch 'scriptable_cutscenes' into newrenderer 2021-05-02 22:37:46 +02:00
Christoph Oelckers
c9791bc148 - renamed PlayerHorizon function to deconflict with the same-named struct 2021-05-02 21:56:45 +02:00
Christoph Oelckers
698d62bbc6 - merged FixMapInfo into loadcons.
No need to delay the remaining content. The reasons for the separate function no longer exist.
2021-05-02 19:41:24 +02:00
Christoph Oelckers
60d007fa93 - Duke: fixed non-scrolling SE24. 2021-05-02 19:32:20 +02:00
Christoph Oelckers
bb9d492db6 - migrated RRRA as well. 2021-05-02 14:01:10 +02:00
Christoph Oelckers
6f4e380728 - migrated RR's cutscene definitions.
Also turned several level-specific init options into map flags or map parameters.
2021-05-02 13:12:24 +02:00
Christoph Oelckers
dbd179be5c - RR progression fixes.
* E1L7 abuses an 'end the game' command to progress to E2L1, this needs special treatment.
* handle ENDGAME.MAP more cleanly by injecting an 'engine.con' into the compilation chain to define its map record. The main issue with this is that it needs to be defined before the regular CONs run.
* check the already defined 'clearinventory' and 'clearweapons' flags that are exposed through RMAPINFO (Duke/RR only so far.)
2021-05-02 10:55:22 +02:00
Christoph Oelckers
9bc210fe35 - fixed RR weapon clearing in E2L2 and RRRA E1L3. 2021-05-02 10:37:20 +02:00
Christoph Oelckers
1798380f23 - adapted map transition in Duke/RR.
There's still some issues which will be taken care of by adding map flags.
2021-05-02 10:35:43 +02:00
Christoph Oelckers
e9385ed4e8 - adapted Blood to the new level progression features and simplified several parts, particularly the clumsy retrieval of the next level.
Some cheats in Duke will not work correctly with this commit!
2021-05-02 09:08:57 +02:00
Christoph Oelckers
93bfc35ad6 - use the volumes to find the starting maps for the menu and the clusters for the cutscenes. 2021-05-02 01:01:30 +02:00
Christoph Oelckers
825963661b - migrated volumes to the new storage. 2021-05-02 00:35:56 +02:00
Christoph Oelckers
f3eb476fbf - minor cleanup. 2021-05-01 23:09:24 +02:00
Christoph Oelckers
13b21d3ed9 - removed script access to variables that no longer contain what they once did. 2021-05-01 23:08:51 +02:00
Christoph Oelckers
f732d4ec64 - added MAPINFO parser, based on GZDoom's.
This isn't hooked up yet, but all necessary structures and fields have been added so that selected pieces can be tested.
2021-05-01 22:52:28 +02:00
Christoph Oelckers
5b54e9c1ad - removed the 26 factor from Duke's par times.
What were they thinking?
2021-04-30 20:08:36 +02:00
Christoph Oelckers
5959543380 - hooked up SW's intermission handling. 2021-04-30 20:08:36 +02:00
Christoph Oelckers
aa148d602c - scriptified SW's 2D screens.
Compiles but not tested yet.
2021-04-30 20:08:35 +02:00
Christoph Oelckers
d5db898236 - fixed bad level number for weapon removal in RRRA. 2021-04-30 20:08:35 +02:00
Christoph Oelckers
fa2bcf563a - forgot to save these. 2021-04-30 20:08:35 +02:00
Christoph Oelckers
b65dfb6145 - check r_precache in all games. 2021-04-30 20:08:35 +02:00
Christoph Oelckers
eaf5e1fba5 - Cutscene support in Blood.
Intro tested, rest to do.
2021-04-30 20:08:34 +02:00
Christoph Oelckers
6d743ce921 - most of the summary screen is working 2021-04-30 20:08:33 +02:00
Christoph Oelckers
0dc6980e5c - made episode intro cutscenes a game independent feature.
So far only defined for Duke E4 but all the logic is outside the game code now and can be universally handled.
2021-04-30 20:08:33 +02:00
Christoph Oelckers
3c27ec8cbd - tested all of Duke's and RR's cutscenes. 2021-04-30 20:08:33 +02:00
Christoph Oelckers
1166b00af2 - switched intro movie playing over to the new system
Not tested yet.
2021-04-30 20:08:32 +02:00
Christoph Oelckers
e05f900315 - added the data structures to hold the cutscene data. 2021-04-30 20:08:31 +02:00
Christoph Oelckers
21aa5c9234 - added game flags for all supported add-ons. 2021-04-30 20:08:31 +02:00
Christoph Oelckers
88dfb93865 - redid Duke cutscene code to use functions, not classes as exports and added the missing screens.
Functions are better because they allow doing more in the internal setup code.
2021-04-30 20:08:31 +02:00
Christoph Oelckers
66799d9a6d - more screen job setup work.
* interface for movie player done.
* first cutscene definition done.
* all converted classes removed from C++ code.
2021-04-30 20:08:30 +02:00
Christoph Oelckers
4ff2010bd1 - moved the entire screen job management to the script side.
This isn't hooked up yet and lots of code is commented out, the games won't start with this commit.
2021-04-30 20:08:30 +02:00
Christoph Oelckers
d853b63a1a - RR summary screen 2021-04-30 20:08:29 +02:00
Christoph Oelckers
c07fcbee08 - migrated level summary screen. 2021-04-30 20:08:24 +02:00
Christoph Oelckers
7fbe153ae7 - more Duke screen porting. 2021-04-30 20:08:24 +02:00
Christoph Oelckers
b0163ff729 - made the end of E1 cutscene a bit more scripting friendly. 2021-04-30 20:08:24 +02:00
Christoph Oelckers
e75f0c17e4 - ported the TitleScreen class. 2021-04-30 20:08:23 +02:00
Christoph Oelckers
1022564cab - initial framework for scriptification of screen jobs. 2021-04-30 20:08:23 +02:00
Christoph Oelckers
4a7430c8e4 - got rid of JobDesc. 2021-04-30 20:08:23 +02:00
Christoph Oelckers
71e5f9b70f - changed screen job list to work without per-job completion callbacks.
They made things more complex than necessary and do not translate well to scripting.
2021-04-30 20:08:22 +02:00
Christoph Oelckers
fb5e2fe0c0 - use flags instead of bools. 2021-04-30 20:08:22 +02:00
Christoph Oelckers
af3eac8456 - simplified screen job setup where all elements can be skipped in one go. 2021-04-30 20:08:22 +02:00
Mitchell Richters
9bebd7fabf - Remove max ammo fudging for when showing the magazine amount for Duke since it overrides ammo maximums set from CON. 2021-04-26 12:35:07 +10:00
Christoph Oelckers
8c379f7a44 Merge branch 'master' into newrenderer 2021-04-25 11:33:47 +02:00
Christoph Oelckers
c05df44ad4 - fixed the check for RR's geometry effect.
This always got triggered for Duke which made the entire map render 3 times. The most obvious effect was reduced translucency.
2021-04-23 21:36:51 +02:00
Christoph Oelckers
3766c5aed0 - restored original palette handling for access cards that got broken in 242f958c41
Unlike all the other HUD sprites this one works differently.
2021-04-23 19:36:55 +02:00
Christoph Oelckers
bf23d6c3b0 - corrected level number for RR's summary screen. 2021-04-23 16:07:04 +02:00
Mitchell Richters
93edeac791 - Clean-up of input functions.
* Remove unused `getincanglef()`.
* Remove unused `getincangleq16()`.
* In `PlayerHorizon` struct, clamp value when setting target in `__settarget()`, not each public `settarget()` overload.
* Rename `PlayerAngle` method `applylook()` to `applyinput()`.
* Rename `PlayerHorizon` method `sethorizon()` to `applyinput()`.
* In `PlayerHorizon::applylook()`, slightly clean return to centre code so it doesn't do math if already at 0.
* In `PlayerAngle::applylook()`, slightly clean rotscrnang/look_ang code so it doesn't do math if already at 0 and reposition where mouse input is applied so that if input is applied, the player never enters a spin.
* In `Duke3d::player_struct::apply_seasick()`, use `buildfang()` method instead of scaling float to BAM within function.
2021-04-21 20:41:04 +10:00
Christoph Oelckers
f51872db25 Merge branch 'master' into newrenderer 2021-04-20 20:46:06 +02:00
Christoph Oelckers
aaad546729 - palookup. 2021-04-20 20:21:51 +02:00
Christoph Oelckers
9e40e49c2c - generalized the special key handling for skipping cutscenes. 2021-04-20 15:01:26 +02:00
Mitchell Richters
d34070b8ae - gameinput.h: Remove precise bool from horizsumfrac(), look_anghalf() and looking_arc() added in a4895cb270.
* It looks terrible to have low precision math versions of look_anghalf and looking_arc since we always interpolate `look_ang` now, so lets just not.
2021-04-20 21:12:17 +10:00
Mitchell Richters
2f696e1a95 Merge branch 'master' into newrenderer 2021-04-19 20:50:37 +10:00
Mitchell Richters
de06030ea0 - gameinput.cpp: Make sethorizon(), applylook() and calcviewpitch() class functions of PlayerHorizon and PlayerAngle where appropriate. 2021-04-19 20:50:10 +10:00
Mitchell Richters
4eaf05d95e - Duke: Fix bad vehicle speed clamp change from e79c6bacd3.
- Fixes #325.
- 🤦
2021-04-19 19:33:13 +10:00
Christoph Oelckers
82194bbf6b Merge branch 'master' into newrenderer
# Conflicts:
#	source/games/exhumed/src/2d.cpp
2021-04-17 13:22:30 +02:00
Christoph Oelckers
42b87362ee - When keeping around a dummy sprite, make sure that the engine's utilities cannot find it anymore.
This was causing issues with the master switch sprites in Duke that have to be kept for sound purposes.
Unfortunately, both hitscan and neartag are far too dumb to analyze sprites they may hit in any way and needed some help skipping such sprites.
2021-04-17 09:37:38 +02:00
Christoph Oelckers
2b9a527aba - added a 'Start' method to DScreenJob.
Since the menu pauses the ticker this is needed to perform initial setup before the first frame.
2021-04-16 23:29:53 +02:00
Christoph Oelckers
2942e011bf - cleaned up the screen job's fade handling, now that the jobs no longer depend on an external timer. 2021-04-16 21:27:54 +02:00
Christoph Oelckers
4950b556c9 - handled SW's screens. 2021-04-16 18:43:59 +02:00
Christoph Oelckers
9dff494e6c - handle all of RR's screens. 2021-04-16 17:38:05 +02:00
Christoph Oelckers
f4b089b776 - fixed bad sound checkin Duke's intermission. 2021-04-16 17:37:08 +02:00
Christoph Oelckers
7895d67b18 - ported the Duke intermission screen.
This also got its timing code thoroughly cleaned up.
2021-04-16 17:24:59 +02:00
Christoph Oelckers
a78af92959 - migrated the Duke end of episode animations. 2021-04-16 17:24:59 +02:00
Christoph Oelckers
2a2c85c082 - migrated Duke's intro images and the first episode's ending animation. 2021-04-16 17:24:59 +02:00
Christoph Oelckers
6ed1d5e678 - DBlackScreen and DImageScreen migrated to event-based handling. 2021-04-16 17:24:58 +02:00
Christoph Oelckers
dc8b72b2ce Merge branch 'master' into newrenderer2
# Conflicts:
#	source/games/duke/src/actors.cpp
#	source/games/duke/src/hudweapon_d.cpp
#	source/games/duke/src/hudweapon_r.cpp
#	source/games/duke/src/render.cpp
2021-04-15 19:34:03 +02:00
Christoph Oelckers
96d78ab9e6 - made DukeActor::s a pointer.
As a reference we would never be able to export this to scripting
2021-04-15 19:21:43 +02:00
Christoph Oelckers
61a6321cd6 - Exhumed: Change map command to start the level directly without going through the scrolling map. 2021-04-15 18:55:54 +02:00
Mitchell Richters
e79c6bacd3 - Duke: Clamp RRRA vehicle input in processVehicleInput(). 2021-04-15 18:59:07 +10:00
Mitchell Richters
2176435831 - Duke: Replace sprite z pos numeric values with correct enum values for each game. 2021-04-15 18:02:16 +10:00
Mitchell Richters
6cebd7fca2 Merge branch 'master' into newrenderer2 2021-04-15 18:01:26 +10:00
Mitchell Richters
aeb16e390c - Duke: Add resurrected flag to handle resurrection via cheating or when pissing in RR. 2021-04-15 18:00:58 +10:00
Mitchell Richters
d5b14a8de3 - Duke: Remove some direct array accesses in lieu of player_struct pointer. 2021-04-15 16:34:24 +10:00
Mitchell Richters
242f958c41 - Duke: Clean up some duplicated code in hudweapon_*.cpp files. 2021-04-15 15:49:36 +10:00
Mitchell Richters
a4895cb270 - All Games: Allow for HUD interpolation to be disabled.
* Requested by users, really don't know why...
* Interpolation values are guarded by the CVAR.
* For Blood, integer truncation is employed just like original game.
* For all games where more precise sine/cosine math has been utilised, no changes have been made.
2021-04-15 13:35:53 +10:00
Christoph Oelckers
f83e678ea0 - use the smooth ratio from the game logic in the renderer instead of calling I_GetTimeFrac again.
Unlike the higher level code this does not check for game over conditions.
2021-04-14 21:17:32 +02:00
Christoph Oelckers
798cf2f973 Merge branch 'newrenderer2' of https://github.com/coelckers/Raze-private into newrenderer2 2021-04-12 20:25:56 +02:00
Christoph Oelckers
9598b626c9 Merge branch 'master' into newrenderer2 2021-04-12 20:03:50 +02:00
Christoph Oelckers
1e40e93da4 - fixed the vertical offsets of the World Tour skies.
They were rendered too low.
2021-04-12 19:47:16 +02:00
Christoph Oelckers
42d02834b1 Merge branch 'master' into newrenderer2
# Conflicts:
#	source/build/include/build.h
#	source/build/src/polymost.cpp
#	source/build/src/voxmodel.cpp
#	source/core/gamecontrol.cpp
#	source/core/gamestruct.h
#	source/games/blood/src/animatesprite.cpp
#	source/games/blood/src/misc.h
#	source/games/blood/src/view.cpp
#	source/games/duke/src/render.cpp
#	source/games/sw/src/draw.cpp
#	source/games/sw/src/game.h
#	source/games/sw/src/jsector.cpp
#	source/glbackend/glbackend.cpp
2021-04-11 14:38:56 +02:00
Mitchell Richters
e959226914 - Fix RRRA bike/boat angle adjustments following changes in f343bd8d5e.
* Because we're wrapping a negative number around to be unsigned, we need to do that after we've done our bit-shift operations.
2021-04-11 18:34:07 +10:00
Christoph Oelckers
9fd3ab6b5e - fixed texture precaching.
After the migration to GZDoom's full backend this never created any textureds when precaching things.
2021-04-11 09:59:55 +02:00
Mitchell Richters
f343bd8d5e - Fix death camera issues stemming from f254eeb465.
* Adjustment in `__addadjustment()` needs to be signed.
* Output of `bvectangbam()` needs to be signed before Duke/SW left-shift the value.
2021-04-11 17:52:29 +10:00
Mitchell Richters
e76f63e2c0 - Consolidate all game interpolation code into inline functions. 2021-04-11 16:45:35 +10:00
Christoph Oelckers
b3bcedda6c - moved backend independent HUD code out of glbackend.cpp. 2021-04-11 08:40:18 +02:00
Mitchell Richters
f254eeb465 - binaryangle.h: Remove lookangle class and replace use with binangle.
* Added in fca846272e to deal with signed adjustments but its just not needed.
* Made better use of `binangle`/`fixedhoriz` class getters and setters than before as well.
2021-04-11 15:45:53 +10:00
Christoph Oelckers
a530dfbe35 Merge branch 'master' into newrenderer2 2021-04-08 18:52:54 +02:00
Christoph Oelckers
fc1fbfe8b3 - fixed .def 'music' parsing.
This was incomplete and just ignored Duke's special music, and the levelnum generation used an outdated formula so that it never managed to assign any music to the maps.
2021-04-08 16:35:26 +02:00
Christoph Oelckers
4cdc39c9b9 Merge branch 'master' into newrenderer2 2021-04-08 08:55:41 +02:00
Christoph Oelckers
68b7628f56 - RRRA: Sector effector type 156 is not supposed to scroll the floor texture. 2021-04-07 18:12:25 +02:00
Christoph Oelckers
e30dc82676 - Cleanup of the voxel code.
* moving polymost_voxdraw into polymost.cpp.
* consolidated all remaining voxel code in hw_voxels.cpp. All original Build voxel code is completely gone now, except for polymost_voxdraw, so this got moved out of the build/ folder.
* integrate Blood's voxel init code into the main function.
* some further cleanup was allowed as a result of this, so engineInit is gone now because these parts can now be done outside the games' app_init functions.
2021-04-05 18:05:43 +02:00
Christoph Oelckers
090b52f783 - fixed animatesprites call in Duke.
This passed z instead of angle.
2021-04-05 12:25:09 +02:00