Commit Graph

591 Commits

Author SHA1 Message Date
NY00123 8085c8473d SW: Add the q16ang and q16horiz fields to SW_PACKET. These
will be filled by faketimerhandler with the current player's
most recent camq16ang and camq16horiz values, respectively.
2020-05-20 14:43:03 +02:00
NY00123 de0ed067f5 SW: Modify DoPlayerTurn/DoPlayerHorizon to make it possible
for them to modify the player's camq16ang/camq16horiz field
instead of q16ang/q16horiz. Additionally, pass to them the
change in angle/horiz via a parameter, as an alternative
to direct access to the corresponding player input field.
2020-05-20 14:43:03 +02:00
NY00123 1f9e319d39 SW - First step in tying player input to frame rate:
Add the camq16ang and camq16horiz fields to the player struct.
With the exception of DoPlayerTurn and DoPlayerHorizon, whenever
code in player.cpp updates player's q16ang/q16horiz, also write
the updated values to camq16ang/camq16horiz. These variables'
preceding values are never used in these functions.
2020-05-20 14:43:03 +02:00
NY00123 b447feef91 sw/src/game.cpp:LoadLevel: Rename q16ang -> ang 2020-05-20 14:43:03 +02:00
NY00123 a2a1642f3d SW: We can revert the change of siang to q16 now 2020-05-20 14:43:03 +02:00
NY00123 1d2aadd229 sw/src/draw.cpp:drawscreen: We can set the pp->si* fields just once,
a bit later.
2020-05-20 14:43:03 +02:00
NY00123 2d4766555c SW: Revert commented out horiz->q16horiz renames in DSPRINTF strings 2020-05-20 14:43:03 +02:00
NY00123 a8a47a9eb0 SW: Fix typo in DoPlayerTeleportToSprite, following the migration to q16 angles 2020-05-20 14:43:03 +02:00
NY00123 4a8ad9b550 Fix multiplayer desync after the change to q16 angle and horiz.
Note that this includes non-portable unaligned accesses, but this
already applies to surrounding code. Just add comments for now.
2020-05-20 14:43:03 +02:00
NY00123 6faa73286f SW: Trim q16 angle and horiz during demo playback/recording.
This uses the newly introduced PEDANTIC_MODE macro.
2020-05-20 14:43:03 +02:00
NY00123 8284fcba9a sw/src/player.cpp:DoPlayerTurn: Increase turning precision
with q16 angle. This uses the new NORM_Q16ANGLE macro.
2020-05-20 14:43:03 +02:00
NY00123 1a46afaf27 Fix compatibility with existing demo files after the migration
to q16 angle and horiz. The original SW_PACKET structure,
named OLD_SW_PACKET here, is used while accessing demo files.
2020-05-20 14:43:03 +02:00
Mitchell Richters 0431f5ffed SW: Refinements for Q16.16 implementation. 2020-05-20 14:43:03 +02:00
Mitchell Richters a4fdabd860 SW: Use Q16.16 for angle. 2020-05-20 14:43:03 +02:00
Mitchell Richters 2bf2055c65 SW: Use Q16.16 for horiz. 2020-05-20 14:43:03 +02:00
NY00123 c32a8cab29 SW: Revert the changes from JFSW commit 7d0deafe81b0ffa30d77cfe242e454f8b4487a1f
related to the definitions of RANDOM_NEG in bunny.cpp, ripper.cpp
and ripper2.cpp. Do so in a way that isn't re-introducing compiler
warnings. This partially fixes compatibility with demos made for SW 1.2.
Additionally, replace the 3 separate definitions of RANDOM_NEG
with a common one within game.h.

From-SVN: r8798
2020-05-20 14:43:03 +02:00
NY00123 00daf6295e SW: Fix a few memory access errors related to demo support
From-SVN: r8797
2020-05-20 14:43:03 +02:00
NY00123 6d537f6d75 Pack the struct SW_PACKET. While this makes demo playback
functional with existing demo files, the code is known
to be incompatible with demos made for SW 1.2.

From-SVN: r8792
2020-05-20 14:43:03 +02:00
Mitchell Richters 83936bf5eb Revert "SW: Improve main game loop."
This reverts commit e878c5bab8.

Revert "SW: Use Q16.16 for horiz."

This reverts commit f07a0ae01e.

Revert "SW: Use Q16.16 for angle."

This reverts commit 1ecc74c2ec.

Revert "SW: Minor repairs for Q16.16 implementation."

This reverts commit d78d046bad.

Revert "SW: Process input at frame rate."

This reverts commit c162014dab.

Revert "SW: Amendments to accommodate changes in master."

This reverts commit eaa51138ad.

Revert "SW: Fix incorrectly declared function input type."

This reverts commit 1cdd5b08d8.

Revert "SW: Amend scaleAdjustmentToInterval() with correct value for SW."

This reverts commit d4dd737cd5.

Revert "SW: Refinements to new input code."

This reverts commit 5ebc65a1fb.

Revert "SW: Adjust look and snap up/down keys and slightly tune PLAYER_TURN_AMOUNT."

This reverts commit 2852536dbf.

Revert "SW: Get PLAYER_TURN_SCALE to be just right."

This reverts commit 4630c8a0b7.

Revert "SW: Make map follow mode work better."

This reverts commit 8e94c48eff.

Revert "SW: Remove line accidentally left from 'MoveScrollMode2D()'."

This reverts commit 5db8047b41.

Revert "Fix multiplayer desync after the change to q16 angle and horiz."

This reverts commit 3bc46078b8.

Revert "SW: Revert commented out horiz->q16horiz renames in DSPRINTF strings"

This reverts commit 537313f620.

Revert "sw/src/draw.cpp:drawscreen: We can set the pp->si* fields just once,"

This reverts commit d2e9595980.

Revert "sw/src/game.cpp:LoadLevel: Rename q16ang -> ang"

This reverts commit a178961a3e.

Revert "SW: Minor tweaks."

This reverts commit 377ba68344.

Revert "SW: Further refine turning and optimise horizon adjustment."

This reverts commit 039022d9ac.

Revert "SW: Don't process input at frame rate if ScrollMode2D is true."

This reverts commit 1aa1e62c4d.

Revert "SW: Use a bit more Q16.16 in places."

This reverts commit 40ca656f38.

Revert "SW: Use the old interpolation path in drawscreen if player is dead"

This reverts commit 2d73466425.

Revert "SW: Smooth out 180 degree turn landing and replace some fix16_min/max with fix16_clamp."

This reverts commit 0996e87f79.

Revert "Change Next/Previous Weapon button handling for Shadow Warrior."

This reverts commit f6b8ca6a22.

Revert "SW: Make "Center_View" key return smoothly."

This reverts commit 23c401fbc2.

Revert "SW: Use the old interpolation path in drawscreen if player is dead"

This reverts commit 43ec16eb55.

Revert "Interpolation fixes for SW:"

This reverts commit ac8a7ecfbd.

Revert "SW: Reset the number of interpolations on level load"

This reverts commit 04bf8499e7.

Revert "Another change modifying saved game format in SW:"

This reverts commit e80888523e.

Revert "SW: Interpolate sector objects in non-demo, single player games."

This reverts commit 996ab77cf4.

Revert "- fixed merge errors in SW."

This reverts commit b8cfa94568.

Revert "- fix interpolation stutters when opening console for SW."

This reverts commit 99fdbfb6cb.

Revert "- reset buttonMap button states after returning from pause for SW (stops keys acting stuck down if down prior to pausing)."

This reverts commit 693b6955da.

Revert "SW: fix stupid input scaling bug"

This reverts commit 1c79e6e17c.

Revert "SW: Make vehicle input better."

This reverts commit 670a53c402.

Revert "SW: Change fix16_from_float() to fix16_from_int() that was changed in 4630c8a0b7 but should have been reverted in 377ba68344e34495638c6fa7685ff78c9a0ed6f8."

This reverts commit 423c9da071.

Revert "SW: Remove ScrollMode2D extern boolean and move into PLAYERp struct."

This reverts commit 31eb55c1fa.
2020-05-20 14:43:03 +02:00
Mitchell Richters 31eb55c1fa SW: Remove ScrollMode2D extern boolean and move into PLAYERp struct. 2020-05-19 12:55:32 +02:00
Mitchell Richters 423c9da071 SW: Change fix16_from_float() to fix16_from_int() that was changed in 4630c8a0b7 but should have been reverted in 377ba68344. 2020-05-19 12:55:32 +02:00
Mitchell Richters 670a53c402 SW: Make vehicle input better.
- Define new boolean 'on_vehicle' in PLAYERp struct for use with interpolating while on vehicle and other checks.
- Move horizon code back into separate DoPlayerHorizon() function. Adjusting horizon while in vehicle must come at the end of the DoPlayerOperate*() function.
- Make DoPlayerHorizon() accessible in game.cpp.
- Change code in DoPlayerHorizon() to process according how 'pp->on_vehicle' is set.
- Make scaleAdjustmentToInterval available outside of getinput().
- Don't process input at frame-rate while on a vehicle. Vehicle code is too difficult to process outside of the game's clock.

Partially based on NY00123's upstream implementation of tying player input to frame-rate.
2020-05-19 12:55:32 +02:00
Mitchell Richters 58bb2e149b SW: Fix broken interpolation pathway following changes in 43ec16eb55.
What 43ec16eb55 intends to do was already done via 2d73466425, however I applied the if statement in the opposite order so when it was cherry-picked again, the pathway was actually reversed - interpolating when alive and not when dead.

Rather than re-apply the opposite order, I've made the if statement match upstream for more consistency and to avoid further conflicts.
2020-05-15 15:00:58 +02:00
Richard C. Gobeille 1c79e6e17c SW: fix stupid input scaling bug 2020-05-11 21:27:29 +02:00
Mitchell Richters 8730bd9dda - allow game's clock to keep running while paused (restores interpolations/animations in menus). 2020-05-08 21:23:02 +02:00
Mitchell Richters ca994b31c9 SW: Set certain sync keys prior to checking them in the same function.
- Ensures action occurs within the requested frame and not the next.
2020-05-08 10:51:59 +02:00
Mitchell Richters 693b6955da - reset buttonMap button states after returning from pause for SW (stops keys acting stuck down if down prior to pausing). 2020-05-06 10:51:08 +02:00
Mitchell Richters 99fdbfb6cb - fix interpolation stutters when opening console for SW. 2020-05-06 10:51:08 +02:00
Christoph Oelckers b8cfa94568 - fixed merge errors in SW. 2020-05-04 00:04:54 +02:00
NY00123 996ab77cf4 SW: Interpolate sector objects in non-demo, single player games.
Let's see if this is breaking anything.

# Conflicts:
#	source/sw/src/draw.cpp
#	source/sw/src/game.cpp
#	source/sw/src/game.h
#	source/sw/src/interp.cpp
#	source/sw/src/track.cpp
2020-04-16 00:03:05 +02:00
NY00123 e80888523e Another change modifying saved game format in SW:
Increase MAXINTERPOLATIONS from 1024 to MAXSPRITES.

# Conflicts:
#	source/sw/src/interp.cpp
#	source/sw/src/interp.h
2020-04-16 00:03:04 +02:00
NY00123 04bf8499e7 SW: Reset the number of interpolations on level load 2020-04-16 00:03:04 +02:00
NY00123 ac8a7ecfbd Interpolation fixes for SW:
draw.cpp: Fix the lack of interpolation while walking on a sector
object, like the bus roof or the floor of the train in Seppuku Station.
track.cpp: Make sure the player's location and angle aren't mistakenly
interpolated while standing on a moving sector object as a consequence.

# Conflicts:
#	source/sw/src/track.cpp
2020-04-16 00:03:03 +02:00
NY00123 43ec16eb55 SW: Use the old interpolation path in drawscreen if player is dead
# Conflicts:
#	source/sw/src/draw.cpp
2020-04-16 00:03:02 +02:00
Mitchell Richters 23c401fbc2 SW: Make "Center_View" key return smoothly. 2020-04-14 00:00:22 +02:00
Mitchell Richters db428a4f03 All Games: Make more precise use of 'scaleAdjustmentToInterval()'.
- Inline function returns a double, therefore we should use it and not potentially truncate the mantissa.
- Use divisors to get true numbers of some floats (3.333 -> 10/3, etc).
- Remove a few brackets/parentheses where possible from what are already exceedingly bracketed lines.
2020-04-14 00:00:21 +02:00
Mitchell Richters f6b8ca6a22 Change Next/Previous Weapon button handling for Shadow Warrior.
- Makes consistent with Duke 3D, RR and Blood.
2020-04-13 23:59:49 +02:00
Mitchell Richters 0996e87f79 SW: Smooth out 180 degree turn landing and replace some fix16_min/max with fix16_clamp. 2020-04-13 23:59:17 +02:00
NY00123 2d73466425 SW: Use the old interpolation path in drawscreen if player is dead 2020-04-13 23:59:16 +02:00
NY00123 120abb1029 SW: With the input tied to frame rate, disable aiming while the
player is dead, and also disable horizontal aiming while on a ladder.
2020-04-13 23:59:15 +02:00
Mitchell Richters 40ca656f38 SW: Use a bit more Q16.16 in places. 2020-04-13 23:59:14 +02:00
Christoph Oelckers 156a225ff4 - renamed global palookup variable.
Since the same word gets used in text messages and local variables in the game code it is easier this way to search for it and facilitate its transition to the translation table management in PaletteContainer.
2020-04-13 23:58:46 +02:00
Christoph Oelckers fda4293013 - draw the movie franes outside of the tile system to reduce the palette maintenance.
The movie code has always been the part causing the most issues because it alters the palettes - the rest treats them as static data.
2020-04-13 23:58:45 +02:00
Christoph Oelckers fac004b4d2 - palette code cleanup 2020-04-13 23:58:44 +02:00
Christoph Oelckers 57cb22f135 - console code matching with GZDoom
Refactored the buttons to be definable locally per game for easier handling of differing input.
2020-04-12 08:30:41 +02:00
Christoph Oelckers 8e87674d4c - backend code matching with GZDoom 2020-04-12 08:30:40 +02:00
Christoph Oelckers 0ca4bbd0c4 - changed some menu related names to match GZDoom. 2020-04-12 08:30:40 +02:00
Christoph Oelckers 5584c726ba - file system update and adjustment. 2020-04-12 08:30:40 +02:00
Christoph Oelckers f671eb622f - migrated to GZDoom's utility code. 2020-04-12 08:30:39 +02:00
Christoph Oelckers 66ecb05eb8 - use Printf as the only command to print to the console.
All uses of OSD_Printf, initprintf etc. have been renamed.
2020-04-12 08:30:38 +02:00
Christoph Oelckers e2f5e8fe34 - renamed 'common' to 'core'.
We'll need 'common' for something else.
2020-04-12 08:30:36 +02:00
Mitchell Richters c750614211 SW: Workaround for map view showing 1px of non-border at the bottom. 2020-04-09 08:14:10 +02:00
Mitchell Richters 1aa1e62c4d SW: Don't process input at frame rate if ScrollMode2D is true.
- ScrollMode2D was running at the frame rate, turning off vsync made it unacceptable.
2020-04-06 21:28:36 +02:00
Mitchell Richters 039022d9ac SW: Further refine turning and optimise horizon adjustment.
- Move DoPlayerTurn() into getinput(). Vehicle code remains external for now.
- Remove horizAdjust boolean and always do horizon code in getinput(). Eliminates single off frame at start of a new level until DoPlayerMove() is called at least once.
2020-04-05 21:28:25 +02:00
Mitchell Richters 377ba68344 SW: Minor tweaks. 2020-04-05 21:28:25 +02:00
NY00123 a178961a3e sw/src/game.cpp:LoadLevel: Rename q16ang -> ang 2020-04-05 21:28:25 +02:00
NY00123 d2e9595980 sw/src/draw.cpp:drawscreen: We can set the pp->si* fields just once,
a bit later.
2020-04-05 21:28:25 +02:00
NY00123 537313f620 SW: Revert commented out horiz->q16horiz renames in DSPRINTF strings 2020-04-05 21:28:25 +02:00
NY00123 3bc46078b8 Fix multiplayer desync after the change to q16 angle and horiz.
Note that this includes non-portable unaligned accesses, but this
already applies to surrounding code. Just add comments for now.
2020-04-05 21:28:25 +02:00
Mitchell Richters 5db8047b41 SW: Remove line accidentally left from 'MoveScrollMode2D()'. 2020-04-02 08:18:23 +02:00
Mitchell Richters 8e94c48eff SW: Make map follow mode work better.
- Input was too fast following input code changes.
- Speed of input can now be changed with toggling the run key.
- Remove function 'MoveScrollMode2D()' and incorporate into 'getinput()' to reduce code duplication.
- Store map follow coordinates in PLAYERp struct and remove old globals.
2020-04-01 13:05:54 +02:00
Mitchell Richters 4630c8a0b7 SW: Get PLAYER_TURN_SCALE to be just right.
- Original value was 12 and was far, far too high following the Q16.16 implementation.
- Value of 3 is too fast.
- Value of 2 is too slow.
- Value of 2.4 (12 / 5) feels just right.
2020-03-31 23:15:09 +02:00
Mitchell Richters 2852536dbf SW: Adjust look and snap up/down keys and slightly tune PLAYER_TURN_AMOUNT.
- Look and snap up/down action was too aggressive and unlike vanilla, corrected.
- PLAYER_TURN_AMOUNT was slightly high, unbalancing the axes.
2020-03-31 08:58:56 +02:00
Mitchell Richters 5ebc65a1fb SW: Refinements to new input code.
- videoNextPage() moved to after restoring interpolations.
- Properly use Q16.16 in as many places as possible. This fixes the angle/X-axis issues.
- Remove unnecessary call to timerUpdate() in main loop, only needs calling once and is called by eventhandlers().
2020-03-30 16:20:25 +02:00
ny00123 28e69d0793 Revert the change of call to FAF_DrawRooms into a conditional one,
as done in r8766, since this breaks status bar output in tiled
overhead map with Polymost. Do add comment about this for now.

git-svn-id: https://svn.eduke32.com/eduke32@8779 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/draw.cpp
2020-03-30 09:55:30 +02:00
Mitchell Richters d4dd737cd5 SW: Amend scaleAdjustmentToInterval() with correct value for SW. 2020-03-30 09:52:14 +02:00
Mitchell Richters 1cdd5b08d8 SW: Fix incorrectly declared function input type. 2020-03-30 09:52:14 +02:00
Mitchell Richters eaa51138ad SW: Amendments to accommodate changes in master. 2020-03-30 09:52:14 +02:00
Mitchell Richters c162014dab SW: Process input at frame rate. 2020-03-30 09:52:14 +02:00
Mitchell Richters d78d046bad SW: Minor repairs for Q16.16 implementation. 2020-03-30 09:52:14 +02:00
Mitchell Richters 1ecc74c2ec SW: Use Q16.16 for angle. 2020-03-30 09:52:14 +02:00
Mitchell Richters f07a0ae01e SW: Use Q16.16 for horiz. 2020-03-30 09:52:14 +02:00
Mitchell Richters e878c5bab8 SW: Improve main game loop.
- Remove MoveLoop() as it's only ever called by RunLevel().
- Continuously call getinput() and domovethings() within the game's tic rate.
2020-03-30 09:52:14 +02:00
Christoph Oelckers 41545b644a - cleaned out most of the software renderer's static global variables. 2020-03-29 16:59:49 +02:00
Christoph Oelckers 621a9338e5 - render camera textures with the hardware renderer.
This removes the last active use case for the software renderer and allows rendering the camera views at a higher resolution.
For Shadow Warrior this necessitated a split of JS_DrawMirrors, because it processed cameras and mirrors in the same loop which cannot be done with the hardware renderer.
2020-03-29 14:01:46 +02:00
ny00123 da1d97ba9c sw/src/draw.cpp: Don't draw rooms if textured overhead map is drawn
later. This also turns out to fix a Polymost-specific bug revealed
in SVN r8711. Further remove a call to PicInView which does nothing.

git-svn-id: https://svn.eduke32.com/eduke32@8766 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:39:35 +01:00
Christoph Oelckers de2c07aa6a - revert all consolidation efforts between Duke and RR frontends.
Too many problems with different code.
2020-03-18 08:24:31 +01:00
Christoph Oelckers c9a69d96b2 - SW: copied fix from SWR to always spawn anime girls for the addons. 2020-03-08 20:53:04 +01:00
ny00123 d98bf9ba62 sw/src/draw.cpp:ResizeView: Make map zooming less dependent
on the frame rate

git-svn-id: https://svn.eduke32.com/eduke32@8700 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/draw.cpp
2020-03-08 08:02:01 +01:00
ny00123 68f249873c sw/src/weapon.cpp: Comment out unused MissileSeek and ComboMissileSeek
params, but leave them for documentation. Note that currently, the
only use of ComboMissileSeek is in the saveable_weapon_code array.

git-svn-id: https://svn.eduke32.com/eduke32@8698 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-07 19:49:24 +01:00
ny00123 cf093e9ea6 SW: Comment out function parameters accessed only in commented out code
git-svn-id: https://svn.eduke32.com/eduke32@8697 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-07 19:48:28 +01:00
ny00123 4842f18f1b SW: Mark function parameters as unused in cases we can't easily change
the functions' signatures (often due to being used as callbacks/hooks)

git-svn-id: https://svn.eduke32.com/eduke32@8696 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/jnstub.cpp
#	source/sw/src/menus.cpp
#	source/sw/src/panel.cpp
#	source/sw/src/text.cpp
2020-03-07 19:48:14 +01:00
ny00123 3e8dc4e509 SW: Remove a bunch of unused function parameters
git-svn-id: https://svn.eduke32.com/eduke32@8694 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/brooms.cpp
#	source/sw/src/draw.cpp
#	source/sw/src/game.cpp
#	source/sw/src/inv.cpp
#	source/sw/src/save.cpp
#	source/sw/src/spike.cpp
#	source/sw/src/text.cpp
#	source/sw/src/weapon.cpp
2020-03-07 19:45:38 +01:00
ny00123 f9155048fc sw/src/weapon.cpp: Remove conditional set of unused variable hsp
in InitMineShrap, as well as unused variable sp in TestDontStick

git-svn-id: https://svn.eduke32.com/eduke32@8693 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-07 19:38:46 +01:00
ny00123 9c7553c776 sw/src/weapon.cpp: Insert unused SHRAP structs into #if 0 blocks
git-svn-id: https://svn.eduke32.com/eduke32@8692 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-07 19:38:21 +01:00
Christoph Oelckers 73a4e0d1fe - made Blood's FullMap flag global and removed the hacks to show the full automap.
Also refactor show2dsector into a bit array to get rid of the bit shifting code at play here.
2020-03-07 19:30:18 +01:00
ny00123 14a2560d5f sw/src/player.cpp: Remove unused globals related to mouse status
git-svn-id: https://svn.eduke32.com/eduke32@8690 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-07 19:30:18 +01:00
ny00123 f5df1b5a19 sw/src/player.cpp: A bit more complicated cases of unused vars
git-svn-id: https://svn.eduke32.com/eduke32@8689 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-07 19:30:18 +01:00
ny00123 ed6e9df07c SW: Handle cases in which the result of an expression
with (possible) side-effects is written to an unused var.

git-svn-id: https://svn.eduke32.com/eduke32@8688 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/console.cpp
#	source/sw/src/jnstub.cpp
#	source/sw/src/save.cpp
#	source/sw/src/sounds.cpp
#	source/sw/src/swconfig.cpp
2020-03-07 19:30:18 +01:00
ny00123 d55871927a SW: Comment out unused vars, which would become
used if previously commented out code was uncommented
(including a few instances of uninitialized var reads).

git-svn-id: https://svn.eduke32.com/eduke32@8686 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/brooms.cpp
#	source/sw/src/cheats.cpp
#	source/sw/src/draw.cpp
#	source/sw/src/game.cpp
#	source/sw/src/jnstub.cpp
#	source/sw/src/menus.cpp
#	source/sw/src/rts.cpp
#	source/sw/src/sector.cpp
#	source/sw/src/setup.cpp
#	source/sw/src/sounds.cpp
#	source/sw/src/weapon.cpp
2020-03-07 19:30:17 +01:00
ny00123 896de8aa1c SW: Remove a ton of unused vars
git-svn-id: https://svn.eduke32.com/eduke32@8685 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/anim.cpp
#	source/sw/src/border.cpp
#	source/sw/src/brooms.cpp
#	source/sw/src/config.cpp
#	source/sw/src/console.cpp
#	source/sw/src/coolie.cpp
#	source/sw/src/draw.cpp
#	source/sw/src/game.cpp
#	source/sw/src/hornet.cpp
#	source/sw/src/jbhlp.cpp
#	source/sw/src/jnstub.cpp
#	source/sw/src/jsector.cpp
#	source/sw/src/menus.cpp
#	source/sw/src/miscactr.cpp
#	source/sw/src/network.cpp
#	source/sw/src/ninja.cpp
#	source/sw/src/player.cpp
#	source/sw/src/save.cpp
#	source/sw/src/serp.cpp
#	source/sw/src/setup.cpp
#	source/sw/src/sounds.cpp
#	source/sw/src/sprite.cpp
#	source/sw/src/swconfig.cpp
#	source/sw/src/weapon.cpp
2020-03-07 19:30:17 +01:00
Christoph Oelckers 2c203fbf80 - more consolidation between RR and Duke. 2020-03-06 19:29:13 +01:00
Christoph Oelckers 375bf639de - that was stupid. 2020-03-01 18:40:49 +01:00
Christoph Oelckers ee191f0681 - SW: map cheat partially reimplemented. 2020-03-01 16:33:06 +01:00
Christoph Oelckers 2e8ace603b - fixed SW sound crash. 2020-03-01 13:10:07 +01:00
Christoph Oelckers fde633041b - SW: fixed ownership of non-following sounds. 2020-03-01 10:59:53 +01:00
Christoph Oelckers 809d2fc555 - fixed SW: DoPlayerFall should only stop the scream sound, but nothing else. 2020-03-01 09:59:52 +01:00
Christoph Oelckers d6b17c0406 - fixed bad vector comparison in SW's sound code. 2020-03-01 09:18:23 +01:00
Christoph Oelckers 61fbbc56c0 - fixed intermittent ambient sounds in SW. 2020-02-29 17:55:31 +01:00
Christoph Oelckers 69e018d0c4 - added serialization of playing sounds.
For ambient sounds that can be cleanly restarted a new 'transient' flag was added so that these do not get written out.
Tested on SW so far, other games yet to do.
2020-02-29 12:33:35 +01:00
Christoph Oelckers 4414d59fbc - added a check to the player sound code to prevent the surfacing sound from blocking out other speech.
The start of the third level is badly timed and this will block the introduction line.
2020-02-29 09:30:12 +01:00
Christoph Oelckers 3855eb889e - SW: fixed ambient sound playback.
There was a coordinate and a restarting problem.
2020-02-27 23:11:03 +01:00
Christoph Oelckers ca18e70f2d - SW: Do not skip status bar when the menu is up. 2020-02-26 01:06:07 +01:00
Christoph Oelckers 864c3c5766 - SW: Fixed fortune cookie text display. 2020-02-25 21:03:38 +01:00
Christoph Oelckers 8c01061053 - SW: Explicitly call hud_size's callback to reinitialize the status bar when loading a savegame.
Since part of the bar's content is stored in a savegame it needs to be manually refreshed after loading or it may display garbage.
2020-02-25 20:51:58 +01:00
Christoph Oelckers 83adb81756 - call the proper functions to stop sounds in Shadow Warrior. 2020-02-23 17:13:18 +01:00
Christoph Oelckers c35a2e5f11 - do not hold persistent references to sound channels in SW's ambient sound code.
For robustness, channels should always be looked up when needed so that the sound engine is free to do with them as it needs.
2020-02-23 15:41:57 +01:00
Christoph Oelckers 9fab46b7d7 - initialize the secret hint system for each level. 2020-02-22 08:57:18 +01:00
Christoph Oelckers 7dc26a3162 - stop all playing sound when starting a new game.
- give all bonus screen sounds in Duke the CHANF_UI flag.
2020-02-17 19:43:58 +01:00
Christoph Oelckers a657b55b50 - give all cutscene sounds in SW the CHANF_UI flag. 2020-02-17 19:12:05 +01:00
Christoph Oelckers 3cd2b92dd1 - pause all game sounds while the menu or console are open and marked SW's UI sounds as such. 2020-02-16 20:08:04 +01:00
Christoph Oelckers 410f5a4545 - clean out stale sprite pointers in User when a sprite gets removed.
This was the main reason for those constant crashes, the game was accessing an invalid sprite, treating its data as valid.
Also added a few checks for valid targets in two places where it still crashed.
2020-02-14 21:44:59 +01:00
Christoph Oelckers 071a364d83 - SW: Stop all sound before starting a cutscene 2020-02-14 00:52:57 +01:00
Christoph Oelckers dff86c7e38 - removed some coordinate fudging for drawing SW's automap background
The current code does not need this
2020-02-14 00:41:36 +01:00
Christoph Oelckers 84bf6ad785 - unused code removed 2020-02-14 00:38:22 +01:00
Christoph Oelckers 844dcc22ae - SW: Don't allow level change via cheat when dead. 2020-02-14 00:37:15 +01:00
Christoph Oelckers 7909f29691 - allow starting Duke, NAM and WW2GI with the RedNukem-based game code for Redneck Rampage.
This mainly required some rework of the menu setup to be less explicit about the frontend's menu classes.
2020-02-12 20:25:59 +01:00
Christoph Oelckers a67c281290 - added StopFX function for Shadow Warrior.
Needed by an upstream change.
2020-02-11 19:28:25 +01:00
hendricks266 9269295102 SW: Don't restart the music when loading a save playing the same track
git-svn-id: https://svn.eduke32.com/eduke32@8627 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/game.cpp
#	source/sw/src/save.cpp
2020-02-11 18:21:58 +01:00
hendricks266 5d475c2788 SW: Add handleevents to end credits
From JFSW commit 0c651743f8371fade0231e9c3206ca25e6ae5269

git-svn-id: https://svn.eduke32.com/eduke32@8626 1a8010ca-5511-0410-912e-c29ae57300e0
2020-02-11 18:21:00 +01:00
hendricks266 0b23c14b9d SW: Fix potential blank 3DR logo
From JFSW commit 18d1c68893693e68d0ce7d41bd1eacbec5655d4f

git-svn-id: https://svn.eduke32.com/eduke32@8625 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/game.cpp
2020-02-11 18:20:59 +01:00
hendricks266 8e0407a425 SW: Fix potential buffer overrun in colormap
From JFSW commit 18d1c68893693e68d0ce7d41bd1eacbec5655d4f

git-svn-id: https://svn.eduke32.com/eduke32@8624 1a8010ca-5511-0410-912e-c29ae57300e0
2020-02-11 18:20:22 +01:00
Christoph Oelckers 41f2c62ed1 - use the original Build engine compatibility for Shadow Warrior.
The 'modern' code causes problems with the tank in the fourth map and probably elsewhere, too.
2020-02-10 22:38:17 +01:00
Christoph Oelckers a32bc350f1 - allow all keys to open the menu in Blood's demo loop. 2020-02-10 20:35:21 +01:00
Christoph Oelckers 1054356cef - fixed CD music playback in SW on maps with no MIDI defined. 2020-02-08 21:37:32 +01:00
Christoph Oelckers 803e57c3b3 - fixed: Reverb must be fully disabled when starting the SW intermission. 2020-02-05 20:25:18 +01:00
Christoph Oelckers d7e54f83de - fixed ShadowWarrior's 'map' CCMD. 2020-02-05 18:55:10 +01:00
Christoph Oelckers a90185bea9 - cleaned up the remaining dependencies on windows.h
This file now only gets included by code that really needs it.
2020-02-03 21:30:57 +01:00
hendricks266 060d19ae35 SW: Clamp tsprz of blood pool floor decals
git-svn-id: https://svn.eduke32.com/eduke32@8598 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/names2.h
2020-02-02 20:50:39 +01:00
hendricks266 364b41bd55 SW: Clamp tsprz of Bouncing Betty mines to their floorz if beneath the floor
This fixes their invisibility in Polymost.

git-svn-id: https://svn.eduke32.com/eduke32@8597 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/draw.cpp
2020-02-02 20:49:54 +01:00
Christoph Oelckers df36f27b32 - added a few missing voxel checks. 2020-02-02 20:48:40 +01:00
Christoph Oelckers ca21852945 - hook up -nologo. 2020-02-02 20:44:57 +01:00
hendricks266 5fdd69cbbb SW: Add Redux's workaround for glitchy fist HUD sprites in widescreen
git-svn-id: https://svn.eduke32.com/eduke32@8589 1a8010ca-5511-0410-912e-c29ae57300e0
2020-02-02 20:37:21 +01:00
alexey.lysiuk d0c58b8e64 - fixed: weapon names were printed instead of ammo in Shadow Warrior 2020-02-02 14:37:07 +02:00
Christoph Oelckers 4d7a43004c - use the new SW interpolation function for all games. 2020-02-02 10:27:47 +01:00
Christoph Oelckers f76d139207 - fixed SW's interpolation math. 2020-02-02 09:51:44 +01:00
Christoph Oelckers a594ba32d4 - added assignment to an unused scratch variable to the InitActor*Noise functions.
They are used a state identifiers but identical content-wise so MSVC's linker would merge them all together into one if some code wasn't added to make them different.
A global check for the scratch variable was added in a harmless place to ensure that whole program optimization algorithms won't optimize it out anyway after discovering that the variable is never used.
2020-02-02 08:53:28 +01:00
Christoph Oelckers 0e1eeea037 - use the game palette directly for palette lookups.
The setup here is far too messy for having a copy in a better format - it can be changed in some non-obvious places.
2020-02-01 23:05:43 +01:00
Christoph Oelckers 1cce5d8de2 - fixed RR was still generating input events when the game was paused. 2020-02-01 13:07:58 +01:00
Christoph Oelckers 77ad7dfb81 - fixed incomplete savegame restoration from inside the game.
This now quits the game loop instead of trying to set up the loaded level from inside it.
2020-02-01 10:50:40 +01:00
Christoph Oelckers 4bf519dcb0 - fixed copy/pasted broken 'map' CCMD. 2020-01-30 20:25:52 +01:00
Christoph Oelckers a32da009bd - moved V_Init2 in SW a little further up so that the cache calls are being made with an initialized renderer. 2020-01-29 19:06:26 +01:00
Christoph Oelckers 8657ecb35d - implemented 'map' CCMD for all games. 2020-01-28 11:20:30 +01:00
Christoph Oelckers 9ca1e56713 - added extended sound lookup as well plus menu options. 2020-01-27 22:29:45 +01:00
alexey.lysiuk 5510df77be - streamlined CMake configuration of game libraries
https://forum.zdoom.org/viewtopic.php?t=67121
2020-01-27 18:11:35 +01:00
Rachael Alexanderson 1c8c2543cb - fixed: Shadow Warrior: End sequence was still 'hung' 2020-01-27 11:11:21 -05:00
Christoph Oelckers 245aa5d3bc - reworked global palette state for robustness. 2020-01-26 10:58:00 +01:00
Christoph Oelckers fd1e63b996 - allow skipping in the end of game sequence. 2020-01-24 21:41:47 +01:00
Christoph Oelckers 08e69b1d2e - fixed missing messages in Shadow Warrior. 2020-01-24 19:51:06 +01:00
Rachael Alexanderson 69ebd9a95d - update shadow warrior's PutStringInfo to put newlines in the console automatically (it was this, or update every use of PutStringInfo to have them) 2020-01-23 13:05:09 -05:00