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
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
6d743ce921
- most of the summary screen is working
2021-04-30 20:08:33 +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
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
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
Mitchell Richters
88695ef554
Merge branch 'master' into newrenderer2
2021-04-01 16:49:07 +11:00
Mitchell Richters
760c918e75
- Duke: Remove unnecessary int casts from gameexec.cpp
.
...
* Incoming vars are already int and called functions only accept an int so really just no need at all.
2021-03-31 20:07:36 +11:00
Mitchell Richters
16886895b0
- Duke: DoPlayer()
: Ensure SB_CENTERVIEW
bit is cleared when setting a horiz target from CON.
...
* Repairs horizon issues raised in https://forum.zdoom.org/viewtopic.php?f=340&p=1185365 .
2021-03-31 19:48:38 +11:00
Christoph Oelckers
5a0c8da6bf
- Duke: fixed some incorrect assignments in CON parser
2021-03-19 23:18:09 +01:00
Mitchell Richters
97159c20c1
- Duke: Leverage new spritetype
methods within Duke, removing bposx
/bposy
/bposz
from hittype.
2021-01-06 06:22:29 +11:00
Mitchell Richters
5124c0daec
- Amalgamate ksgn and sgn into Sgn in cmdlib.h, and remove pragmas.h.
2021-01-05 07:31:37 +11:00
Mitchell Richters
868aa7f07a
- Replace mulscale()
calls with MulScale()
from common.
2021-01-05 07:31:24 +11:00
Christoph Oelckers
7ad0750839
- grouped all of Duke's constant per-session state in a single struct.
...
Mainly done so later the script export can be done more easily.
This also renames a few of the affected variables for clarity.
2020-11-29 13:54:58 +01:00
Christoph Oelckers
a34f5debe8
- route the shared control CCMDs through the game interface instead of registering local variants for each game.
2020-11-29 13:35:09 +01:00
Christoph Oelckers
2cd3927613
- use floats for wall panning offsets.
2020-11-26 18:32:35 +01:00
Christoph Oelckers
d545eb7aa9
- make sector panning variables floats and added some convenience wrappers.
2020-11-26 18:32:35 +01:00
Christoph Oelckers
d60bc8be9f
- replaced all remaining uses of tilesiz[].y
2020-11-23 08:39:49 +01:00
Mitchell Richters
d934bfd985
- buildutils: Replace sintable[]
use within Duke's gameexec.cpp with bsin()
/bcos()
.
2020-11-22 21:18:04 +01:00
Mitchell Richters
6e3d414b3c
- inputstate.cpp: Move checkCrouchToggle()
from gameinput.ccp into ApplyGlobalInput()
and use static bool for crouch toggling vs. game-side bool.
2020-11-07 18:16:16 +11:00
Christoph Oelckers
d8e331ef0f
- changed Duke/RR palette handling to only retrieve the currently active palette right before rendering.
...
Storing this in the player_struct is pointless and a relic from having to use real hardware palette switches.
With this now just being a translation index being passed to the backend it can be cheaply retrieved right when used and nowhere else.
Also making some changes to how RRRA's psychedelic cactus handles the projection. This fixes issues with occasionally passing a bad matrix.
2020-11-05 07:31:48 +01:00
Christoph Oelckers
0eb10f0313
- newowner and related code.
2020-11-04 20:40:25 +01:00
Christoph Oelckers
d0db810ab0
- ud.camerasprite -> actor.
2020-11-04 20:40:08 +01:00
Christoph Oelckers
770897b8b9
- player.i, part 1
2020-11-04 20:39:42 +01:00
Christoph Oelckers
eb5cd98d9a
- fixed a few bad parameters.
2020-11-04 20:39:39 +01:00
Christoph Oelckers
36370b71e2
- wrapped neartag to return an actor.
2020-11-04 19:55:15 +01:00
Christoph Oelckers
635b53f78f
- RR-movement + dummyplayersprite
2020-11-04 19:55:13 +01:00
Christoph Oelckers
f598c16e03
- use the script interface where needed.
...
Later the scripts should only see some token representing an actor, not an index.
2020-11-04 08:24:17 +01:00
Christoph Oelckers
29b08b2115
- access_spritenum
2020-11-03 22:49:17 +01:00
Christoph Oelckers
32a7c2349e
- shoot interface transitioned/operateweapon mostly done.
2020-11-03 22:01:58 +01:00
Christoph Oelckers
1fcd5eef47
- CON game access interface done.
2020-11-03 19:21:44 +01:00
Christoph Oelckers
f5cccb0df2
- actorflag, actorfella, automap, animateaccess, holoduke spawn, initreactor.
...
# Conflicts:
# source/games/duke/src/game_misc.cpp
2020-11-03 19:21:43 +01:00
Christoph Oelckers
61013af910
- fixed three crashes found when testing WW2GI.
2020-11-03 19:21:43 +01:00
Christoph Oelckers
a514910aa4
- use an actor pointer in Get/SetGameVarID's parameters to weed out the ordering screwups.
2020-11-03 19:21:43 +01:00
Christoph Oelckers
de92287d0b
- fixed the messed up parameter order of OnEvent.
...
This should serve as a textbook example why passing around indices is a very, very bad idea!
2020-11-03 19:21:42 +01:00
Christoph Oelckers
ac58dd8017
- execute.
2020-11-03 07:06:30 +01:00
Christoph Oelckers
8f815f9391
- LoadActor.
2020-11-03 07:06:29 +01:00
Christoph Oelckers
da9c4d90a2
- parse - part 7.
2020-11-03 07:06:29 +01:00
Christoph Oelckers
38817c3bee
- parse - part 6.
2020-11-03 07:06:29 +01:00
Christoph Oelckers
aa3d1fdcad
- parse - part 5.
2020-11-03 07:06:29 +01:00
Christoph Oelckers
7438b57f23
- parse - part 4.
2020-11-03 07:06:29 +01:00
Christoph Oelckers
59d9138b77
- parse - part 3.
2020-11-03 07:06:28 +01:00
Christoph Oelckers
65fc6dd3c7
- parse - part 2.
2020-11-03 07:06:28 +01:00
Christoph Oelckers
8bdeb66dcb
- parse - part 1.
2020-11-03 07:06:28 +01:00
Christoph Oelckers
0fac102c26
- renamed variables in ifcansee.
2020-11-03 07:06:28 +01:00
Christoph Oelckers
83217ee620
- ifcansee.
2020-11-03 07:06:27 +01:00
Christoph Oelckers
83b47f60b3
- ifcanshoottarget.
2020-11-03 07:06:27 +01:00
Christoph Oelckers
ea9a8642b0
- doactor.
...
# Conflicts:
# source/games/duke/src/gameexec.cpp
2020-11-03 07:06:27 +01:00
Christoph Oelckers
4236f800f6
- operateactivators and operatemasterswitches.
2020-11-03 07:06:26 +01:00
Christoph Oelckers
3c19f8e44e
- the last remaining small functions in actors_d.cpp and actors_r.cpp.
2020-11-01 17:07:46 +01:00
Christoph Oelckers
e6e53d1954
- move, fakebubbaspawn and destroyit.
2020-11-01 17:07:46 +01:00
Christoph Oelckers
861342a278
- guts_d and guts_r.
2020-11-01 11:32:34 +01:00
Christoph Oelckers
90d1c5f7bb
- ifsquished.
2020-11-01 10:55:38 +01:00
Christoph Oelckers
31e5023004
- dodge, furthestcanseepoint, furthestangle.
2020-11-01 10:41:25 +01:00
Christoph Oelckers
c42ff35dc5
- hitradius
...
# Conflicts:
# source/games/duke/src/actors_d.cpp
# source/games/duke/src/actors_r.cpp
2020-10-31 13:24:31 +01:00
Christoph Oelckers
41e1e9b51c
- ifhitbyweapon.
...
# Conflicts:
# source/games/duke/src/actors_d.cpp
# source/games/duke/src/actors_r.cpp
2020-10-31 13:19:26 +01:00
Christoph Oelckers
34e39dd221
- pass spawner as an actor pointer to 'lotsofstuff'.
...
Allows doing this without using sprite indices.
2020-10-24 09:36:35 +02:00
Christoph Oelckers
d237471b79
- DoActor cleanup.
...
Using pointers instead of repeated array accesses now.
2020-10-24 07:25:25 +02:00
Christoph Oelckers
6f4a0c94e8
- something on player is now a pointer as well
2020-10-21 16:31:18 +02:00
Christoph Oelckers
72329eb01b
- wackedbyactor, too.
2020-10-21 16:31:18 +02:00
Christoph Oelckers
e94274a543
- holoduke_on is now a pointer as well.
2020-10-21 16:31:18 +02:00
Christoph Oelckers
d7604a3160
- made on_crane a pointer as well.
2020-10-21 16:31:17 +02:00
Christoph Oelckers
7c88de0b42
- made player.actorsqu a pointer and added the needed infrastructure for that.
2020-10-21 16:31:17 +02:00
Christoph Oelckers
3d36381752
- converted all stat iterators outside sector*.cpp.
2020-10-15 01:34:28 +02:00
Christoph Oelckers
758fab1804
- replaced several sector iterators in Duke code.
2020-10-15 01:34:27 +02:00
Christoph Oelckers
8e1c71b867
Merge branch 'InputContinuation'
2020-10-11 15:24:51 +02:00
Christoph Oelckers
fc82b3bc8a
- Duke: replaced the game type macros with inline functions.
2020-10-11 14:30:42 +02:00
Mitchell Richters
8f68e8b4a1
- Amend 2865fef7ed
as accidentally returned horizon as Build and not Q16.16.
2020-10-10 17:52:43 +11:00
Mitchell Richters
2865fef7ed
- Duke: Restore return_to_center
in gameexec.cpp dropped in 0ab3b33a6c
and redo based on new code.
2020-10-10 16:59:00 +11:00
Mitchell Richters
fca846272e
- gamecontrol: Initial setup of PlayerAngle
struct and deployment within Duke.
...
* Struct made up of binangle class units.
* Create signed clone of binangle for use with look_ang and rotscrnang.
* Append currently outgoing function names with `2` at the end to avoid conflict.
2020-10-07 23:13:29 +11:00
Mitchell Richters
f39939d114
- gamecontrol: Initial setup of PlayerHorizon
struct and deployment within Duke.
...
* Started with the most complicated game first.
* Struct made up of fixedhoriz class units.
* Append currently outgoing function names with `2` at the end to avoid conflict.
2020-10-07 17:12:48 +11:00
Mitchell Richters
09a05f354c
- Re-standardise horizon around 0 and not 100.
...
* Blood had this right. It makes sense that the horizon be based around as it's easier to work with.
* Removed all associated game math to deduct default horizon of 100 when doing weapon zvel etc, meaning actual horizon can just be used.
* Re-did return to center function to work on the already converted pitch. Return speed should be 1:1 with previous code.
2020-10-07 13:28:45 +11:00
Christoph Oelckers
5e6317b8b9
Merge remote-tracking branch 'remotes/Github_private/Blood_InputReworking'
2020-09-22 23:32:28 +02:00
Christoph Oelckers
2a2209b085
- cleanup and minor fixes.
2020-09-22 23:07:11 +02:00
Mitchell Richters
f806cdcec6
- Blood/Duke/RR/SW: Unify the player's angle/horizon helper functions.
2020-09-21 17:12:51 +10:00
Mitchell Richters
0ab3b33a6c
- Blood/Duke/RR/SW: Unify the player's horizon function.
...
* For Duke/SW, we continually apply `SB_CENTERVIEW` only if it was previously a toggled action, similar to Blood.
* For SW, we remove two SW-specific bits (`PF_LOCK_HORIZ` and `PF_LOOKING`) that are no longer needed.
* For Duke, we remove `return_to_center` and just use the `SB_CENTERVIEW` action bit as required.
* For `sethorizon()`, feature set and adjustment speeds are an averaged out accumulation across Duke/SW:
** GameTicRate is factored in for adjustment decisions to provide consistency for SW being the faster game.
** Adjustment amounts are half way between Duke/SW.
2020-09-20 20:01:36 +10:00
Christoph Oelckers
f5d14f826a
- added the SHOOT event and fixed some issues with poor code generation for the game data accessors.
...
They created different code depending on the passed index, this was changed to always emit the optional parameter, even when not needed, so that the interpreter does not need to second-guess.
2020-09-17 23:06:54 +02:00
Christoph Oelckers
8fa5d3d9d2
- added the remaining CON features from EDuke 2.x
...
Not everything will do something, though. This was some incredibly careless code operating without a safety net allowing uncontrolled write access to the map structure.
Most of the critical fields have been made read-only, which has been the only mode of access in the mods I checked.
Note that this does not enable scripting of the weapon sprite drawer, only the gameplay related features were done.
2020-09-17 23:06:54 +02:00
Christoph Oelckers
298949ceb8
- more compat.h cleanup
...
Its elimination is getting closer. :)
2020-09-08 18:48:18 +02:00
Christoph Oelckers
607d30ef8e
- fixed broken end of level timer in Duke.
...
Fixes #342
2020-09-05 17:56:35 +02:00
Christoph Oelckers
e5e8c02f1d
- WIP level transition refactored to a game independent event system.
2020-09-04 19:43:35 +02:00
Christoph Oelckers
03aad6559b
- added a global leveltimer variable to Duke.
...
This timer only gets incremented by the main game ticker when the playsim is running.
This timer gets used for all playsim-related timing and animations so that these are decoupled from imprecisions in the global timer.
2020-08-31 00:33:41 +02:00
Christoph Oelckers
fe7f3a2f9e
- handle the run key.
2020-08-29 00:57:07 +02:00
Christoph Oelckers
b9e0f493b2
- transitioned the 5 primary action keys: Open, Jump, Crouch and Fire/AltFire.
2020-08-28 23:25:08 +02:00
Mitchell Richters
afb09456e0
- Duke: Migrate away from using totalclock
and use new game-specific gameclock
with underlying timer code in common.
...
* Build timer still requires initialisation due to multiple `timerSetCallback()` that still need to work.
# Conflicts:
# source/core/menu/menu.cpp
# source/games/duke/src/game.cpp
2020-08-25 19:47:31 +02:00
Christoph Oelckers
a30933871e
- fixed most end of game cutscenes.
2020-08-05 22:36:39 +02:00
Christoph Oelckers
9dac66b6f0
- fudging for the broken FIRE animation.
...
Unfortunately the only thing that can be done here from inside the engine is to increase the likelihood of the animation actually starting.
Ideally the broken script should be replaced but with the way CON replacements are done this is not possible.
2020-08-01 17:54:38 +02:00
Christoph Oelckers
ecdc92e6b9
- copied some changes to kill count management from DukeGDX.
2020-07-27 20:53:31 +02:00
Christoph Oelckers
530debd24b
- properly increment the instruction pointer in 'endofgame'.
...
This made the bosses disappear after death, fixes #38
2020-07-26 21:28:42 +02:00
Christoph Oelckers
a0cc798c9c
- cleaned up the sound system interface to have consistent naming and no aliases.
2020-07-25 09:32:54 +02:00
Christoph Oelckers
be9094cb97
Silenced lots of warnings pointed out by XCode.
2020-07-23 17:02:59 +02:00
Christoph Oelckers
61f5247b71
-let's hope this will solve the pausing problem for good.
...
The checks for game pause were totally inconsistent, so now there is a utility function that tells whether the game is supposed to run or not.
pause can also take 3 values now - 0 for no pause, 1 for pause from opening the menu or console or 2 for hitting the pause button.
2020-07-21 22:46:26 +02:00
Christoph Oelckers
6227f9f7fd
- optimizations for better savegame performance.
2020-07-21 21:32:38 +02:00
Christoph Oelckers
7eb158bf72
- properly tabified everything.
2020-07-20 23:21:27 +02:00
Christoph Oelckers
06fa1391f5
- did some cleanup on the global variables.
2020-07-20 18:43:50 +02:00
Christoph Oelckers
c3fb679992
- more header cleanup work, macros.h is gone.
2020-07-20 18:43:49 +02:00
Christoph Oelckers
e70115ff5c
- put the CON interpreter into a class to get rid of its global variables.
2020-07-18 12:37:35 +02:00
Christoph Oelckers
43c4c5eb5e
- consolidated some parts common to the 3 input routines.
2020-07-16 22:49:26 +02:00
Christoph Oelckers
39a6ab6f0e
- input update - safety commit
2020-07-15 23:44:07 +02:00
Christoph Oelckers
915b566612
- another safety commit.
2020-07-07 17:56:20 +02:00
Christoph Oelckers
dd45749650
- got rid of m_level_number and m_volume_number.
...
These were only needed so that G_NewGame_EnterLevel could be called without parameters. Ouch!
2020-07-07 10:17:02 +02:00
Christoph Oelckers
e8ebeefaad
- started consolidating the struct types.h
2020-07-06 23:24:35 +02:00
Christoph Oelckers
642ae03d90
- use player_struct from JFDuke.
2020-07-06 23:05:48 +02:00
Christoph Oelckers
0d0f6854c3
- cleaned out another header file.
2020-07-06 22:54:26 +02:00
Christoph Oelckers
83bcfcfd0c
- Big cleanup.
2020-07-06 22:53:20 +02:00
Christoph Oelckers
f1babcee95
- more header cleanup.
2020-07-06 16:24:22 +02:00
Christoph Oelckers
f2380f8829
- constant cleanup.
2020-07-06 13:26:26 +02:00
Christoph Oelckers
2e98b2f8da
- quote cleanup.
2020-06-30 22:53:15 +02:00
Christoph Oelckers
22e4141395
- removed duplicate header.
2020-06-23 22:01:58 +02:00
Christoph Oelckers
913253bb0c
next...
2020-06-22 00:07:26 +02:00
Christoph Oelckers
c2d9f86832
- safety commit.
2020-06-21 23:46:27 +02:00
Christoph Oelckers
990cb2acb8
-'shoot' replaced.
...
# Conflicts:
# source/build/src/palette.cpp
2020-06-21 23:24:49 +02:00
Christoph Oelckers
26f3bc1857
- spawn function transitioned.
2020-06-21 23:21:10 +02:00
Christoph Oelckers
693b15a556
- use 4 byte entries for the script.
...
We no longer store pointers in here.
2020-06-21 23:17:51 +02:00
Christoph Oelckers
cb1824ca25
- store script code in a dynamic array.
...
# Conflicts:
# source/games/duke/src/zz_game.cpp
2020-06-21 23:17:50 +02:00
Christoph Oelckers
6b2fdf24fd
- cleanup after removing EDukes's script code.
...
# Conflicts:
# source/games/duke/src/zz_game.cpp
# source/games/duke/src/zz_gameexec.cpp
2020-06-21 23:07:46 +02:00
Christoph Oelckers
ed6262e0bf
- got rid of the old interpreter code.
2020-06-21 23:07:45 +02:00
Christoph Oelckers
b9deaba834
- all commands now get run by the original code.
2020-06-21 23:07:45 +02:00
Christoph Oelckers
1fd0c279d7
- fixed some bugs.
2020-06-21 23:07:45 +02:00
Christoph Oelckers
3651ab821e
- fall command, also some safety work for npt deleting sprites prematurely.
2020-06-21 23:07:44 +02:00
Christoph Oelckers
5c780e5c5f
- fixed mixed up tile numbers.
...
For consistency all shared numbers now use the TILE_ prefix.
2020-06-21 23:07:43 +02:00
Christoph Oelckers
1b135ecb0b
- step 1.
2020-06-21 23:07:42 +02:00
Christoph Oelckers
18d6a8e65d
- another safety commit.
...
# Conflicts:
# source/games/duke/src/zz_actors.cpp
2020-06-21 23:07:42 +02:00
Christoph Oelckers
e1c76e4c26
- safety commit.
...
# Conflicts:
# source/games/duke/src/zz_sbar.cpp
2020-06-21 23:07:42 +02:00
Christoph Oelckers
e007b9bceb
- safety commit
2020-06-21 23:07:41 +02:00
Christoph Oelckers
15c744f3da
- movement code of the VM transitioned
2020-06-21 23:07:41 +02:00
Christoph Oelckers
9c3189475a
- renamed unprocessed files and added missing WT firefly effect.
2020-06-21 22:38:05 +02:00
Christoph Oelckers
242f78de13
- make moveactors work and RR weapon name cleanup.
...
# Conflicts:
# source/games/duke/src/sbar.cpp
2020-06-21 22:38:04 +02:00
Christoph Oelckers
2cc4176ed8
- addweapon.
2020-06-21 22:36:07 +02:00
Christoph Oelckers
7493956613
- removed the dynamic weapon map indirection.
2020-06-21 22:36:07 +02:00
Christoph Oelckers
cb54a03d60
- wip
...
# Conflicts:
# source/games/duke/src/sbar.cpp
2020-06-21 22:36:07 +02:00
Christoph Oelckers
30cf62d9c2
- renamed all tile variables so that the engine can be reverted to the old constant setup instead of the mostly useless tile remapping feature.
...
If this is supposed to be made customizable it has to be done very differently.
# Conflicts:
# source/games/duke/src/game.cpp
# source/games/duke/src/sbar.cpp
2020-06-21 22:36:06 +02:00
Christoph Oelckers
bd6047a097
- started porting functions - using a simple one as the first case.
2020-06-21 22:36:05 +02:00
Christoph Oelckers
0596078978
- prepared folder for merging.
2020-06-21 22:18:12 +02:00
Christoph Oelckers
99958342a9
- prepare the branch for adding new commits
...
# Conflicts:
# source/core/gamecontrol.cpp
2020-06-21 20:59:16 +02:00
Christoph Oelckers
b8b38e075d
- moving to the right place.
2020-06-21 20:59:08 +02:00