Mitch Richters
5ec5321034
- gameinput.h/cpp: Abstract the angle/horizon adjustment math into a few inlines to avoid repetition and having to cast enums as doubles for C++20 compliance.
2021-11-06 14:07:53 +11:00
Mitch Richters
4c02663842
- PlayerAngle::applyinput()
: Re-add addition of +/- 1. when returning rotscrnang to 0 lost long, long ago.
2021-11-06 14:07:36 +11:00
Mitch Richters
ab99b6b29d
- PlayerHorizon::calcviewpitch()
: Make returning horizoff
to 0 speed uniform across all games.
2021-11-06 13:31:29 +11:00
Mitch Richters
91f6b2954c
- binangle
class: Tidy up missed C++20 warning fixed about enum used in floating-point arithmetic.
2021-11-06 10:27:04 +11:00
Mitch Richters
0eb4ff4ad2
- PlayerHorizon::calcviewpitch()
: Provide commentary on how numeric literals used in function came to be and place into an enum for clarity.
2021-11-06 10:27:00 +11:00
Mitch Richters
1df2ba80ed
- PlayerAngle::applyinput()
: Provide commentary on how numeric literals used in rotscrnang/look_ang/spin math came to be and place into an enum for clarity.
2021-11-06 10:26:54 +11:00
Mitch Richters
8e8dfa9f9a
- PlayerHorizon::applyinput()
: Provide commentary on how numeric literals used in aim/look up/down and return to centre math came to be and place into an enum for clarity.
2021-11-06 09:30:03 +11:00
Mitch Richters
c424f7c8dd
- processMovement()
. Remove cl_exhumedoldturn
CVAR and tidy up numeric literals in use.
...
* In our older codebase before the input code was refactored, Exhumed's turning was broken and was only applying the base factor of 12, significantly slower than the other games.
* Upon doing some testing in PCExhumed, I noticed their turning was faster as when the counter meets its target, the turn value is shifted left by 2, effectively making it 48: b90417ed8e/source/exhumed/src/player.cpp (L336-L337)
* Removed this CVAR because of this.
* Reworked turning code so that pressing left+right together cancel each other out and that pressing both doesn't call `updateTurnHeldAmt(scaleAdjust)` twice.
* Redid turn averages factoring in Exhumed's speeds, rounded off values and stored in an enum for clarity.
2021-11-06 09:28:47 +11:00
Christoph Oelckers
389f760d45
- address C++20 deprecation warnings with enums in floating point arithmetic.
2021-11-02 23:32:31 +01: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
f3a2de92a4
- binaryangle.h
: Use constexpr
on inline functions where it was previously not possible to do so.
2021-11-01 23:37:31 +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
0fe5ac6a56
- gameinput.h: Correctly use targetset()
in PlayerHorizon
and PlayerAngle
structs.
2021-10-30 17:30:01 +02:00
Mitch Richters
15c4d38694
- gameinput.h: Add initial structure for PlayerPosition
as companion to PlayerAngle
and PlayerHorizon
structs.
2021-10-30 17:30:01 +02:00
Mitch Richters
7ee4f49649
- gameinput.h: Remove some of the verticality from the PlayerHorizon
and PlayerAngle
structs.
2021-10-30 17:30:01 +02:00
Christoph Oelckers
6e0fbb2043
- removed templates.h includes.
2021-10-30 10:51:03 +02: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
Mitch Richters
879e2f3ce4
- Build: Promote sintable[]
array values to precision Blood uses in prep for replacing Blood's costable[]
.
2021-10-30 10:24:15 +02:00
Mitch Richters
3663c4c742
- Split out sine/cosine scaling from bsinf()
and bcosf()
into its own inline.
2021-10-30 10:24:14 +02:00
Mitch Richters
07fc3b77b1
- Privatise tosigned()
method in binangle
class.
2021-10-30 10:24:14 +02:00
Christoph Oelckers
f1b40b7878
- bumped savegame version for Exhumed.
2021-10-28 18:59:40 +02:00
Christoph Oelckers
c7d4779b7e
- fixed some warnings.
2021-10-26 18:54:43 +02:00
Christoph Oelckers
1214f8ba00
- properly macro-fy parsed strings from Blood's INI.
2021-10-19 21:49:03 +02:00
Christoph Oelckers
d2beee587d
- updated version.h.
2021-10-14 22:50:12 +02:00
Christoph Oelckers
562968262c
- moved spriteMass into DBloodActor
2021-10-14 19:01:10 +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
8d9d3d5f8f
- disabled palette emulation for the GLES backend.
...
Right now the shader does not support it and will require significant redesign to work well with the target hardware.
2021-10-13 00:09:18 +02:00
Christoph Oelckers
ff0c4359e0
- deleted unused inlines.
2021-10-11 23:03:11 +02:00
Hugo Locurcio
91ce22931d
Add cvars to control automap line alpha and thickness
...
This can be used to improve automap readability on high-resolution
displays.
2021-10-11 22:30:39 +02:00
Christoph Oelckers
83944a7191
- fixed uninitialized light index variable for floor sprites.
2021-10-11 22:28:26 +02:00
Christoph Oelckers
29769dd673
- fixed engine code warnings pointed out by XCode 13.
2021-10-08 19:06:41 +02:00
Christoph Oelckers
0d4e0d72fb
- fixed vertex generation when splitting walls by planes on old hardware.
2021-09-18 13:04:46 +02:00
Christoph Oelckers
e8187b4a99
- fixed bad serializers for vec2_t and vec3_t.
2021-09-12 18:42:58 +02:00
Christoph Oelckers
7f485bfab1
- split off the extended sprite flags into their own word.
...
Some code overwrites the cstat field entirely (thanks Duke, for being sloppy with this...!)
2021-09-12 18:26:35 +02:00
Christoph Oelckers
99ecfe133d
- flag sprites for automapping regardless of the 'automapping' variable's value.
...
Duke should show its floor sprites, too.
2021-09-12 18:22:38 +02:00
Kevin Caccamo
2297c9351a
Attempt to fix music replacement definitions again
...
Store per-map music replacements in a TMap, and perform the replacements after parsing the MAPINFO
2021-09-12 18:21:42 +02:00
Christoph Oelckers
6dcd7e2557
- do not crash on badly defined walls where the end point is missing.
2021-09-12 18:18:26 +02:00
Mitchell Richters
37f8fc8b0d
- Allow disabling of load screens like how they were before the move of ScreenJob from native code to ZScript.
2021-08-26 10:34:00 +10:00
Mitchell Richters
f44d695245
- Fix some warning messages in the defineqav
DEF parser.
2021-08-26 10:33:24 +10:00
Mitchell Richters
fd149e50ee
- Remove early return from GrpScan()
that was allowing addons to come through even if they weren't valid.
...
* Raze configured to only search $PROGDIR with a single `worldtour.grp` file would attempt to autoload even if its dependency CRC wasn't present. Attempted to re-arrange function but had mixed results. Removing this early return is what worked under all test cases.
2021-08-24 20:56:28 +10:00
Mitchell Richters
276c000f9f
- Blood: Add mechanism to be able to force QAV interpolation based on picnum for testing purposes and not for end-user usage.
2021-08-23 20:54:30 +10:00
Mitchell Richters
a920fc5aef
- Add support for first
and last
keyword for defineqav
parser when process interpolate ignore
block.
2021-08-23 15:34:30 +10:00
Mitchell Richters
23be5ffe8c
- Add support for all
keyword for defineqav
parser when process interpolate ignore
block, and ensure the lowest value can't be below 0.
2021-08-23 15:06:04 +10:00
Mitchell Richters
e68b793852
- Add some extra safety to defineqav
parser to ensure some unsupported actions can't be performed.
2021-08-23 14:19:33 +10:00
Mitchell Richters
ddc7b3d730
Merge branch 'master' into master
2021-08-23 11:40:05 +10:00
Mitchell Richters
1ee6fd76c4
Merge branch 'blood-qavrework'
...
# Conflicts:
# source/core/gamecvars.cpp
# source/core/gamecvars.h
# source/games/blood/src/weapon.cpp
2021-08-23 11:02:09 +10:00
Mitchell Richters
d7450e12f0
- Blood: Re-add interpolated weapon QAVs in an externalised, disabled-by-default fashion.
2021-08-23 10:55:08 +10:00
Mitchell Richters
916241dcdb
- Blood: Implement defineqav
DEF parser with hookup to game-side code.
2021-08-23 09:00:47 +10:00
Mitchell Richters
f67a09680e
- Blood: Rename CVAR cl_bloodhudinterp
to cl_bloodqavinterp
.
2021-08-21 19:55:02 +10:00
carnivoroussociety
db9a413f21
Added new cl_bloodvanillaenemies CVAR
...
GetClosestSpriteSectors(): If newSectCheckMethod is set, then always test midpoints at least once
Use new CVAR for tiny Caleb/burning cultists/Cerberus fixes
Do not use new GetClosestSpriteSectors() fix for teslaHit() if vanilla explosions is set
Do not use GetClosestSpriteSectors() fix for enemies sight scanning if vanilla enemies is set
2021-08-19 14:26:53 +10:00
carnivoroussociety
6606f0bc5a
Improved GetClosestSpriteSectors() detection
...
Enables/disables new sector searching behavior for dude owned explosions
Added new CVAR cl_bloodvanillaexplosions
Swap ExplosBehavior menu settings
2021-08-18 15:52:15 +02:00
Christoph Oelckers
a5e3a85c98
- changed palette lookup to consider the remapping of color 0 to 255.
...
This is to ensure that black maps to the proper index, even if there's duplicates.
2021-08-14 10:26:04 +02:00
Christoph Oelckers
bad2c2e55f
- backend update from GZDoom
...
* replacement of 'long' in string code.
* palette removal in V_GetColor.
* fixes to DShape2D buffer management.
2021-08-14 10:04:45 +02:00
Christoph Oelckers
5d3f7947bf
- avoid calling the node builder to triangulate degenerate sectors.
...
This tends to crash.
2021-08-14 09:48:05 +02:00
Christoph Oelckers
5aa27bad3b
- flag SW's cutscenes as 'boss death only'.
2021-08-13 22:25:13 +02:00
Mitchell Richters
4a70f6efd0
- Allow ticrate to be specified to timer code, while still defaulting to GameTicRate
. Move out I_GetBuildTime()
from common code to gamefuncs.h
as part of this.
...
* Allow specification of floating point ticrates as it's possible Blood's QAVs could have a fractional ticrate.
2021-08-05 14:52:55 +10:00
Mitchell Richters
17b2154e9a
- Blood: Expose legacy 1.0 weapon handling game option as a CVAR.
2021-08-03 00:47:05 +10:00
Mitchell Richters
a9b75e7e7d
- Blood: Put QAV interpolation code behind a CVAR for now until some final minor issues are resolved.
...
* Thanks to Dzierzan for testing and the reports.
2021-07-31 10:15:51 +10:00
Mitchell Richters
f6c7ed3984
- Blood: Restore originally intended isRunning
code that never worked behind two CVARs to offer an alternative playing experience.
...
* `cl_bloodvanillarun` enables/disables the `isRunning` code that affects AI, bobbing and swaying.
* `cl_bloodvanillabobbing` enables/disables the `isRunning` code that affects bobbing and swaying, allowing only the `isRunning` AI changes.
2021-07-31 10:14:56 +10:00
Mitchell Richters
a67c126129
- Blood: Extend 99508e6f15
to find picnum of previous frame in all previous frame's tile indices if the current frame's tile index doesn't match.
...
* Allows more interpolation magic.
* Revealed an issue with `interpolatedanglef()` that was undetected. Removed in place of a binangle version returned as floating point build.
2021-07-29 19:23:00 +10:00
Mitchell Richters
019922dcf1
- Fix constexpr issue with interpolatedanglef()
since fmod()
isn't available as constexpr.
2021-07-29 18:38:07 +10:00
Mitchell Richters
99508e6f15
- Blood: Perform interpolation between frames for each tile coordinate when there is more than one frame and the picnum between frames match.
2021-07-29 17:39:22 +10:00
Christoph Oelckers
bd23ea144c
- validate 'nextsector' fields on walls.
...
Build utterly relied on the map having these right and put the entire responsibility on the mapper.
There's maps, however which have bad values here causing either render glitches or crashes so these bad indices need to be fixed.
Two good examples where this causes problems are RR's E3L1 and the second map of SW's Last Warrior mod where this even glitches in Polymost.
2021-07-27 22:12:29 +02:00
Christoph Oelckers
1fde9f2173
- workaround to allow playing SW's Last Warrior mod in one go.
...
This disables the boss's death in L4 ending the game and just advances to the next level.
This seems to be the intent with this mod as the second episode starting at L5 is not defined and the first episode's subtitle advertises the full game.
2021-07-26 00:58:00 +02:00
Christoph Oelckers
a12dfbe1d8
- fixed bad operator grouping in cheat code.
2021-07-25 17:17:29 +02:00
Christoph Oelckers
5c5799c21f
- quote argument for sending cheats from the chat editor.
2021-07-25 12:48:27 +02: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
Christoph Oelckers
3864dcfc17
- adapted cheat input handler to treat spaces as '0' when entering parts of numeric fields.
2021-07-25 11:59:12 +02:00
Mitchell Richters
ef05eec531
- Change a68d5aae70
to not do a leading zero, but add an extra space of frameDelay
less than 10.
...
* Thanks, Graf. It's better :)
2021-07-24 17:51:14 +10:00
Christoph Oelckers
8e8b3a32fe
- fixed initialization pf upscale state properly.
...
This avoids indirectly calling FlushAll during startup.
2021-07-24 09:10:21 +02:00
Mitchell Richters
a68d5aae70
- Add leading zero to statFPS()
output (vid_fps
) so that the text doesn't bounce continually when alternating between 10 ms and <10 ms.
2021-07-24 15:40:47 +10:00
Mitchell Richters
c5f63b95e5
- Capitalise CPART07.AR_
and CPART15.AR_
in ProcessOptions()
. The original files are in capitals and this is important as POSIX systems are case-sensitive. We can't cater towards every use-case but this should cover most bases.
...
* Fixes #308 .
2021-07-20 19:06:45 +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
77630dcbc7
- Rename DeferedStartGame()
to DeferredStartGame()
.
2021-07-20 18:43:17 +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
ca65c4c9da
- Allow ticker to lock input to player's angle and horizon without having to force use of synchronised input.
2021-07-18 19:25:41 +10:00
Christoph Oelckers
4ee93de36c
- added 'endofgame' CCMD.
...
Not really good yet, but it does what's needed, i.e. write out the statistics for the current session.
2021-07-17 09:42:59 +02:00
Mitchell Richters
d77e143ee8
- allow palette emulation for indexed hightiles.
2021-07-17 07:40:13 +10:00
Christoph Oelckers
3e76f71f02
- support for indexed hightiles.
2021-07-17 07:40:05 +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
Christoph Oelckers
e3737d3330
- fixed texture lookup for hightile lookup.
...
Not all commands had the proper flags to also look in the root folder.
2021-07-13 08:38:24 +02:00
alexey.lysiuk
577c6cb374
- fixed crash when parsing malformed .def file
...
This fixes #439
2021-07-11 10:16:26 +03:00
Mitchell Richters
3e30869aeb
- Remove some remains of Redneck Deer Huntin'.
2021-07-11 12:44:31 +10:00
Mitchell Richters
32283037ed
- Use isWW2GI()
in more places.
2021-07-11 12:42:33 +10:00
Mitchell Richters
fe652c9348
- Use isNamWW2GI()
in more places.
2021-07-11 12:41:08 +10:00
Mitchell Richters
aa13b50504
- Use isRR()
in more places.
2021-07-11 12:40:46 +10:00
Mitchell Richters
6894be4ad1
- Use the new isSWALL()
wrapper everywhere.
2021-07-11 12:40:01 +10:00
Mitchell Richters
ffba10a7c5
- SW: Set default skill level to match original release and what the manual says is default.
2021-07-11 12:08:12 +10:00
Mitchell Richters
b5b9452adb
- Optimise fFindDistance2D()
to multiply by inverse rather than divide by a constant.
2021-07-10 22:08:48 +10:00
Mitchell Richters
5d7938c24e
- SW: Rename cl_smoothsway
to cl_swsmoothsway
and enable by default
2021-07-10 22:07:05 +10:00
Christoph Oelckers
62a5a720e8
- Check for maps with bad setup of their wall lists.
...
Lo Wang In Time's map 11 does not include wall 0 into its sector, which caused crashes when trying to triangulate this sector.
2021-07-06 10:29:24 +02:00
Christoph Oelckers
e5cb1976d3
- disable texture name truncation for textures/ directory.
...
Unlike Doom, a similar limit does not exist here and must not be enforced. Any texture from this folder needs to be usable by its full name without extension to be able to replace named tiles.
2021-07-05 22:39:24 +02:00
Christoph Oelckers
2af2d29084
- add hitscan only autoaim for SW.
2021-06-26 12:18:27 +02:00
Christoph Oelckers
e9b2bf9e4e
- shortened the message for not found game data and restrict to non-Windows systems.
2021-06-26 12:10:46 +02:00
Hugo Locurcio
a10018bc36
Display game data path when no game data files are found
...
This helps users find the location where they should place
game data files.
2021-06-26 12:06:35 +02:00
Christoph Oelckers
0f7d3d0cbb
- streamlined and fixed game startup with '-map' option.
...
* Blood: Initialize global pointers in app_init so that they are not NULL.
* consider Mapinfo data when checking for a given level name.
* removed redundant level name output.
2021-06-26 10:11:50 +02:00
Christoph Oelckers
63bc36e3c4
- renamed some constants.
...
Manually copied from NBlood because the underlying code has changed too much already.
2021-06-24 14:14:16 +02:00