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