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