Commit Graph

251 Commits

Author SHA1 Message Date
Christoph Oelckers ea631cb6ac - fixed some warnings 2019-09-19 14:18:44 +02:00
hendricks266 2081eff083 Patch from Nuke.YKT to fix TROR rendering in mirrors in Polymost
Includes "Fix screen tilt regression on mirror rendering"

git-svn-id: https://svn.eduke32.com/eduke32@7493 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:56:42 +02:00
hendricks266 ac8dabb0fb Rename net.* to network.*
git-svn-id: https://svn.eduke32.com/eduke32@7443 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 12:20:45 +02:00
terminx 2ec041b10e Use correct type in range-based loop
git-svn-id: https://svn.eduke32.com/eduke32@7407 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:19 +00:00
terminx db51740d3d Clean up a few uses of the hash table functions to account for hash_findcase() working properly now
git-svn-id: https://svn.eduke32.com/eduke32@7366 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:21 +00:00
hendricks266 7414f29348 Add buildvfs, abstraction layer for file I/O.
Currently it passes calls through to the system libraries as before.

Also adds an incomplete implementation on PhysFS.

git-svn-id: https://svn.eduke32.com/eduke32@7359 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-01 08:51:50 +00:00
terminx e0b5e32be2 Clean up a little bit of yxaspect and viewingrange variable cruft in G_DrawRooms()
git-svn-id: https://svn.eduke32.com/eduke32@7349 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-22 18:35:33 +00:00
terminx 10757aa836 PI -> fPI
git-svn-id: https://svn.eduke32.com/eduke32@7343 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-20 21:33:04 +00:00
terminx 8433d133b4 Patch from Fox:
Add a FOV option in the menu. Range from 75 to 120 degrees (at 4:3 resolution), default is 90.

New userdef "fov". Equals the FOV in 360 degrees.

Update Polymost projection hack, so it compensates for the FOV or height of the game view.

Fix FOV in Polymer when the full status bar is visible. Now the FOV depends of the width of the game view instead of the height.

git-svn-id: https://svn.eduke32.com/eduke32@7329 1a8010ca-5511-0410-912e-c29ae57300e0
2019-02-18 22:02:33 +00:00
hendricks266 9b17be7f3e CON: Add EVENT_DISPLAYROOMSCAMERATILE
git-svn-id: https://svn.eduke32.com/eduke32@7313 1a8010ca-5511-0410-912e-c29ae57300e0
2019-01-22 17:56:34 +00:00
terminx 6ca492918e Slightly revise framerate limiter and r_showfps 2 display
git-svn-id: https://svn.eduke32.com/eduke32@7304 1a8010ca-5511-0410-912e-c29ae57300e0
2019-01-12 00:21:53 +00:00
terminx 9a23ea148e Expand the list of options available for the framerate limiter, and add a separate option that controls an offset added to the limiter. This should allow the menu to cover all of the important use cases involving G-SYNC, FreeSync, and "Fast Sync".
git-svn-id: https://svn.eduke32.com/eduke32@7287 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-15 01:40:14 +00:00
terminx 06ac4f88b9 This fixes S_CheckSoundPlaying() and makes CON_IFSOUND work correctly in scripts that run during menus. These changes together fix the exchange between Duke and Lani at the end of episode 3 of Duke3D.
git-svn-id: https://svn.eduke32.com/eduke32@7279 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-15 01:39:25 +00:00
seventyfive 87cf4495bf - Packet code implementation (merge from private c/s repo), world updates are now synced through snapshots. See tag SVN_SyncPoint_Dec2018 on master of the other repo.
- "Scratch pad" sprites implementation, to avoid desyncs in sprite indexes, clients will insert temporary sprites which are cleared out when they receive the next snapshot from the server.
- Patches from Striker which fix player stomping frag counts, the accept button when hosting a game through the menu, and a "noffire" command line parameter.
- Patches from NY00123: t_data sync optimizations to improve some jittery behavior on the client side.

git-svn-id: https://svn.eduke32.com/eduke32@7242 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-08 00:40:39 +00:00
terminx c29ffec9cb Clean up A_InsertSprite() and the beginning of A_Spawn()
git-svn-id: https://svn.eduke32.com/eduke32@7234 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:14:33 +00:00
terminx 592ee52d2b Improve selection of a failsafe video mode if videoSetGameMode() fails at game startup
git-svn-id: https://svn.eduke32.com/eduke32@7221 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:13:14 +00:00
terminx 21958bc110 Minor start window cleanup. This ended up touching a bunch of other files due to variable renaming, but there are zero functional changes to anything but the startup window in this commit.
git-svn-id: https://svn.eduke32.com/eduke32@7219 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:13:02 +00:00
terminx 073987fa42 After parsing the cfg, fill in the default bindings for any control functions that are completely missing, with function unbound and key unused by anything else.
git-svn-id: https://svn.eduke32.com/eduke32@7212 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:12:21 +00:00
terminx ca1494262c Convert some unwieldly g_player[myconnectindex].ps->gm crap to references
git-svn-id: https://svn.eduke32.com/eduke32@7211 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:12:16 +00:00
terminx 0d652ae063 Switch VM_EventCommon to use references
git-svn-id: https://svn.eduke32.com/eduke32@7205 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:11:44 +00:00
terminx 9c0ee3d557 Use references in G_UpdatePlayerFromMenu() and G_BackToMenu() for readability
git-svn-id: https://svn.eduke32.com/eduke32@7184 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:09:09 +00:00
terminx 89fe17e673 This does nothing but fix indentation of a single block of code
git-svn-id: https://svn.eduke32.com/eduke32@7183 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:09:04 +00:00
terminx 52eed46aa9 Remove dead code that once opened a browser to the store page for Duke Nukem 3D: Megaton Edition on Steam
git-svn-id: https://svn.eduke32.com/eduke32@7182 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:08:59 +00:00
terminx a4182305d0 Clean up some of the remaining stuff in duke3d/src/config.cpp a bit. Not very meaningful changes... just things I saw when trying to decide how to tackle some of this mess.
git-svn-id: https://svn.eduke32.com/eduke32@7180 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:08:44 +00:00
terminx 86496a8126 CON structure member access readability cleanup
git-svn-id: https://svn.eduke32.com/eduke32@7169 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:07:38 +00:00
terminx e6955694e2 Fix a null pointer dereference in G_GameExit() so we don't crash while we're crashing
git-svn-id: https://svn.eduke32.com/eduke32@7162 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:06:58 +00:00
terminx 7c4ba73bfd Move CONTROL_ProcessBinds() call to P_GetInput()
git-svn-id: https://svn.eduke32.com/eduke32@7135 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:34:08 +00:00
terminx ad7d61baa1 Use range-based loops for simplicity
git-svn-id: https://svn.eduke32.com/eduke32@7130 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:33:40 +00:00
terminx ed2f9f247b Rework volume control to not completely suck
git-svn-id: https://svn.eduke32.com/eduke32@7122 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:32:50 +00:00
terminx 1c007c56c5 More sound work
git-svn-id: https://svn.eduke32.com/eduke32@7119 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:32:29 +00:00
terminx 374a09536d Add per-sound volume support to audiolib. This allows you to control the volume of sounds independently from the distance-based system exposed through CON. To use this, you must define your sounds via the .def syntax and set the "volume" property--default is 1.0.
git-svn-id: https://svn.eduke32.com/eduke32@7117 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:32:14 +00:00
terminx 98f42cba6f Add support for defining all sound parameters through the .def syntax, instead of just the filename
git-svn-id: https://svn.eduke32.com/eduke32@7116 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:32:05 +00:00
terminx 9613bbac33 Use std::min and std::max instead of min and max macros.
git-svn-id: https://svn.eduke32.com/eduke32@7078 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-16 06:09:54 +00:00
terminx e77325f2a4 Remove redundant assignments
git-svn-id: https://svn.eduke32.com/eduke32@7077 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-16 06:09:42 +00:00
terminx af728b2641 Remove a few useless forward declarations and const-ify a couple of function parameters. Yawn.
git-svn-id: https://svn.eduke32.com/eduke32@7070 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-16 06:08:50 +00:00
terminx 59214a2d78 Fix off-by-one error in currently not very useful dedicated server text console input
git-svn-id: https://svn.eduke32.com/eduke32@7046 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-07 05:23:48 +00:00
terminx d5381e701f Fix potential null pointer dereferencing
git-svn-id: https://svn.eduke32.com/eduke32@7004 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-07 05:20:28 +00:00
terminx 8b2d546774 Fix potential null pointer dereference in S_DefineAudioIfSupported() when passing filenames without extensions
git-svn-id: https://svn.eduke32.com/eduke32@6999 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-07 05:20:04 +00:00
terminx 2cb5d948e8 Move SE40 floor/ceilingstat and Z coordinate backups to global variables instead of allocating them on the stack.
git-svn-id: https://svn.eduke32.com/eduke32@6998 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-07 05:20:00 +00:00
terminx e6277dd8da Replace a bunch of fall-through comments with our fallthrough__ macro.
git-svn-id: https://svn.eduke32.com/eduke32@6976 1a8010ca-5511-0410-912e-c29ae57300e0
2018-09-04 05:57:41 +00:00
pogokeen 448dd1cd01 screens.cpp: Show average game update time over the last 100 game updates
git-svn-id: https://svn.eduke32.com/eduke32@6963 1a8010ca-5511-0410-912e-c29ae57300e0
2018-08-02 07:53:09 +00:00
hendricks266 104bdb131b Fix warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
git-svn-id: https://svn.eduke32.com/eduke32@6949 1a8010ca-5511-0410-912e-c29ae57300e0
2018-07-23 02:55:53 +00:00
terminx b2e788b7e9 EDUKE32_STANDALONE stuff
git-svn-id: https://svn.eduke32.com/eduke32@6942 1a8010ca-5511-0410-912e-c29ae57300e0
2018-07-21 00:18:03 +00:00
pogokeen 1df7127609 Support software renderer upscaling engine-side in sdlayer and sdlayer12 with various scaling factors (beyond just pixel doubling).
When glsurface is available, use GL to upscale the render buffer.
Additionally, fix build issues with sdlayer12 introduced by GLAD changes (r6656).

git-svn-id: https://svn.eduke32.com/eduke32@6939 1a8010ca-5511-0410-912e-c29ae57300e0
2018-07-14 21:36:44 +00:00
terminx 0dd623a7fe Don't spawn hardcoded Duke3D debris/guts/glass sprites when compiled as EDUKE32_STANDALONE
git-svn-id: https://svn.eduke32.com/eduke32@6911 1a8010ca-5511-0410-912e-c29ae57300e0
2018-06-09 20:36:31 +00:00
pogokeen e87b6b902f G_HandleMirror(): When choosing which mirror to render, only choose from mirrors that are potentially visible.
git-svn-id: https://svn.eduke32.com/eduke32@6887 1a8010ca-5511-0410-912e-c29ae57300e0
2018-05-17 00:35:26 +00:00
pogokeen 38e3784549 Incrementing ud.executions is now done in app_main() instead of CONFIG_WriteSetup() so that it is only incremented once per execution.
git-svn-id: https://svn.eduke32.com/eduke32@6884 1a8010ca-5511-0410-912e-c29ae57300e0
2018-05-08 17:32:19 +00:00
pogokeen 3ad44df555 ud.showfps > 2 now shows Game Update time and Game Update & Draw time (along with the min & max Game Update time) for easier performance analysis
git-svn-id: https://svn.eduke32.com/eduke32@6882 1a8010ca-5511-0410-912e-c29ae57300e0
2018-05-08 17:32:11 +00:00
terminx 2e45801d43 Add quick save and quick load to the keyboard configuration menu
git-svn-id: https://svn.eduke32.com/eduke32@6876 1a8010ca-5511-0410-912e-c29ae57300e0
2018-05-04 22:42:31 +00:00
hendricks266 00d1c5fc5b Bump the default cache size to 96 MiB.
git-svn-id: https://svn.eduke32.com/eduke32@6875 1a8010ca-5511-0410-912e-c29ae57300e0
2018-05-03 06:05:56 +00:00
terminx 4551b276a1 MSVC warning fix
git-svn-id: https://svn.eduke32.com/eduke32@6840 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-23 06:34:33 +00:00
terminx f952a77c9e Sound code tweaks
git-svn-id: https://svn.eduke32.com/eduke32@6836 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-21 06:04:39 +00:00
terminx 19c43b84b3 Function names
git-svn-id: https://svn.eduke32.com/eduke32@6831 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:03:47 +00:00
terminx e5bcc1cf81 More function name cleanup
git-svn-id: https://svn.eduke32.com/eduke32@6830 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:03:30 +00:00
terminx 1fd209444f Continuing the quest for clearer function names
git-svn-id: https://svn.eduke32.com/eduke32@6829 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:03:12 +00:00
terminx 0340e3cc0f Engine function name cleanup round 2
git-svn-id: https://svn.eduke32.com/eduke32@6828 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:02:51 +00:00
terminx ee63d2c070 Beginnings of baselayer.cpp/.h refactor. This is 99.9% renames.
git-svn-id: https://svn.eduke32.com/eduke32@6827 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:02:31 +00:00
terminx 55a436651a Remove a couple of unnecessary calls to S_ClearSoundLocks()
git-svn-id: https://svn.eduke32.com/eduke32@6815 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-06 01:42:58 +00:00
terminx 6acd592ae2 Fix up some dynamic tile remapping cruft in A_Spawn() for less branching
git-svn-id: https://svn.eduke32.com/eduke32@6810 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-06 01:42:33 +00:00
terminx 61215ef0ba Re-arrange some of the hard-coded stuff in A_Spawn(). Just re-organizations, no changes to the blocks that moved.
git-svn-id: https://svn.eduke32.com/eduke32@6800 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-04 20:47:55 +00:00
terminx d10dcd971c More EDUKE32_STANDALONE guarding. Next commit will merge some of the guarded blocks together for simplicity.
git-svn-id: https://svn.eduke32.com/eduke32@6799 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-04 20:47:48 +00:00
terminx fbf1d6ae08 Formatting
git-svn-id: https://svn.eduke32.com/eduke32@6790 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-02 21:59:59 +00:00
pogokeen a364b7bbfd Polymost palette-indexed texture rendering
git-svn-id: https://svn.eduke32.com/eduke32@6776 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-21 20:41:26 +00:00
hendricks266 1460dec6d8 In case a requested quick load upon death cannot be completed, perform a pistol start instead of doing nothing
git-svn-id: https://svn.eduke32.com/eduke32@6761 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-11 03:47:11 +00:00
terminx ae0b6e87be Display number of savegames to be deleted before removing, automatically remove old savegames from the install dir in EDUKE32_STANDALONE builds. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6754 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 05:15:11 +00:00
hendricks266 d04d0128e3 ReadSaveGameHeaders at start and close
git-svn-id: https://svn.eduke32.com/eduke32@6746 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 03:55:28 +00:00
hendricks266 b437636528 Saves: implement isAutoSave for headers
git-svn-id: https://svn.eduke32.com/eduke32@6743 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 03:55:17 +00:00
hendricks266 4158aa802a Improve r6723. Adds EVENT_LASTWEAPON.
Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6738 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 03:54:54 +00:00
terminx a22394db8d Backport some CON profiling stuff from Lunatic. Use "printtimes" in the console.
git-svn-id: https://svn.eduke32.com/eduke32@6736 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 00:29:41 +00:00
terminx ee37c04623 Remove attempt at being compatible with the original ranges of ang and horiz values, and introduce a q16 version of drawrooms (and showroom)
git-svn-id: https://svn.eduke32.com/eduke32@6735 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-07 12:02:03 +00:00
terminx a76750df55 Q16.16 for player angle, too
git-svn-id: https://svn.eduke32.com/eduke32@6725 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-07 04:21:18 +00:00
terminx 4d8bb170a3 Use Q16.16 fixed point for player horiz
git-svn-id: https://svn.eduke32.com/eduke32@6724 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-07 04:21:05 +00:00
terminx 7fa0abda26 Add gamefunc for switching to your last used weapon
git-svn-id: https://svn.eduke32.com/eduke32@6723 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-07 04:20:50 +00:00
hendricks266 cd5b23e855 Perform CON_SAVE after a frame is drawn
git-svn-id: https://svn.eduke32.com/eduke32@6721 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-06 10:25:11 +00:00
hendricks266 478165f00c Fix "too many sprites spawned" check
git-svn-id: https://svn.eduke32.com/eduke32@6716 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-03 06:37:16 +00:00
hendricks266 9deeb94f06 Invalidate TILE_SAVESHOT whenever it is overwritten, so that it updates properly in GL.
(Also remove a redundant call to the screenshot function.)

git-svn-id: https://svn.eduke32.com/eduke32@6703 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-26 14:46:48 +00:00
hendricks266 6f7313a46a Fix whitespace issues
git-svn-id: https://svn.eduke32.com/eduke32@6700 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-26 14:46:36 +00:00
hendricks266 dfffa5a9c5 Clear userquotes when returning to the menu.
git-svn-id: https://svn.eduke32.com/eduke32@6699 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-26 14:46:31 +00:00
hendricks266 3117dcf006 Save the player's map time before EVENT_ENDLEVELSCREEN, which happens regardless of whether the hardcoded bonus screen is displayed.
Make sure ud.displaybonusscreen is set to 1 if you want this to take place. The bonus screen can still be skipped by setting RETURN to -1 in EVENT_ENDLEVELSCREEN.

git-svn-id: https://svn.eduke32.com/eduke32@6694 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-25 01:18:36 +00:00
pogokeen 94246b5dd1 game.cpp: fixed GL vsync resetting issue due to system_getcvars() call coming before cvars were loaded
git-svn-id: https://svn.eduke32.com/eduke32@6682 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-22 01:05:18 +00:00
hendricks266 3ae7cb1de5 Replace bespoke CON/def module and clipmap filename array reallocing with a new class, GrowArray.
git-svn-id: https://svn.eduke32.com/eduke32@6673 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-17 22:30:39 +00:00
hendricks266 a8370e8d0c Keep individually specified RTS files and the rtsname cfg setting completely separate. This fixes a few issues.
git-svn-id: https://svn.eduke32.com/eduke32@6668 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-16 08:33:44 +00:00
pogokeen 3ca5f33c73 Moved to GLAD for dynamic GL/WGL and extension loading.
Refactored extension usage that became core in GL2, and adjusted some types for GL2 compatibility.

git-svn-id: https://svn.eduke32.com/eduke32@6656 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-16 06:38:21 +00:00
hendricks266 d68c9b45c6 Add "rtsname" token to grpinfo grammar.
git-svn-id: https://svn.eduke32.com/eduke32@6645 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-11 05:03:55 +00:00
hendricks266 d2fd7a2c30 Re-revise r6625.
git-svn-id: https://svn.eduke32.com/eduke32@6638 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-31 05:23:39 +00:00
terminx 3bc83a7ceb Revise r6625
git-svn-id: https://svn.eduke32.com/eduke32@6637 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-31 04:13:40 +00:00
hendricks266 12f1767de2 New userdef structure "shadow_pal"
Sets the black palette used for enemy shadows and for black rectangles in the menu. Default value is 4.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6626 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 11:14:17 +00:00
hendricks266 4bedc0c39d Fix overflow issue with tsprite shade of gibs.
Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6625 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 11:14:12 +00:00
hendricks266 d792054ce2 Refactor all calls to S_PlayMusic.
This allows as much of the control flow as possible to fail gracefully without interruping currently playing music.

git-svn-id: https://svn.eduke32.com/eduke32@6619 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 11:13:43 +00:00
hendricks266 c7edef4f43 New LOGO_FLAGS bits LOGO_NOHELP and LOGO_NOCREDITS.
LOGO_NOHELP: Remove the "Help" item in the main menu and the F1 key function.

LOGO_NOCREDITS: Remove the "Credits" item in the main menu.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6612 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 02:14:09 +00:00
hendricks266 b3fd642bf4 Replace "INT16_32768" macro with unsigned literal "32768u".
git-svn-id: https://svn.eduke32.com/eduke32@6600 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-28 04:30:34 +00:00
hendricks266 535b7c4d66 Display sprite shadows in Polymer if dynamic lighting is disabled.
Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6595 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-26 04:35:29 +00:00
hendricks266 a96613f496 Add "Alternate Weapon" key similar to Shadow Warrior Classic Redux.
When pressed it switches between pipebomb / detonator or shrinker / expander.

New event "EVENT_ALTWEAPON"

Akin to "EVENT_PREVIOUSWEAPON" and "EVENT_NEXTWEAPON". RETURN is set to 12.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6594 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-26 04:35:23 +00:00
hendricks266 8744a70dcf Fix the aspect of save thumbnails in Polymost / Polymer in widescreen.
Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6593 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-26 04:35:19 +00:00
hendricks266 150ddded12 New userdef structure: "statusbarflags", "statusbarrange", "statusbarcustom"
"statusbarflags" is a bitfield. Values are:
STATUSBAR_NONONE = 1
STATUSBAR_NOMINI = 2
STATUSBAR_NOFULL = 4
STATUSBAR_NOSHRINK = 8
STATUSBAR_NOFRAGBAR = 16
STATUSBAR_NOOVERLAY = 32
STATUSBAR_NOMODERN = 64
Default value is 8. In case you modify it, you also have to set the other status bar related userdefs in EVENT_SETDEFAULTS. Default values in EDuke32 are: screen_size = 4; statusbarmode = 1; althud = 1;

"statusbarrange" is used to add more alternatives for the status bar without breaking the option in the menu. If used, the mini status bar (screen_size = 4) will cycle through "statusbarcustom" when changing the screen size.

Also fix the size of the viewport when the screen is shrunk and the scale of the status bar is not 100%.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6587 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-26 04:34:51 +00:00
hendricks266 cf64b480f1 Add new events at various points that display hardcoded screens.
New event "EVENT_MAINMENUSCREEN"

Triggered before the main menu is displayed. Set RETURN to -1 to disable the screens that appear before the main menu.

New event "EVENT_NEWGAMESCREEN"

Triggered when a new game is started. Set RETURN to -1 to disable The Birth intro animation.

New event "EVENT_ENDLEVELSCREEN"

Triggered when a level ends. Set RETURN to -1 to disable the bonus and deathmatch score screens after a level ends.

New event "EVENT_EXITGAMESCREEN"

Triggered when a running game is ended. Set RETURN to -1 to disable the deathmatch score screen when you quit mid-game.

New event "EVENT_EXITPROGRAMSCREEN"

Triggered when the program is closed. Set RETURN to -1 to disable the shareware or TEN screen,sif they were enabled in LOGO_FLAGS.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6584 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-26 04:34:38 +00:00
hendricks266 9949a3cf5c When SE 17 can't find the next sector for the floor, use the heuristic added for ceilings in r3013 to determine the floorz, replacing the game exit added in r2971.
git-svn-id: https://svn.eduke32.com/eduke32@6582 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-18 04:28:55 +00:00
hendricks266 214109b506 Revert the parts of r3159 corresponding to redefining lotag and hitag as unsigned, so that they are once again signed.
Any issues in Duke's code relating to misunderstanding these types are now restricted to Duke itself rather than changing the engine and potentially introducing new issues in all Build games.

git-svn-id: https://svn.eduke32.com/eduke32@6581 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-15 23:13:50 +00:00
hendricks266 ecdb08eb68 Revert slight change to fall behavior of pickup sprites in r6500.
git-svn-id: https://svn.eduke32.com/eduke32@6580 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-15 17:46:28 +00:00
hendricks266 d9b0479343 ZDoom-style saves
git-svn-id: https://svn.eduke32.com/eduke32@6569 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-18 11:24:53 +00:00
hendricks266 9765526948 Move the modern status bar option into the screen size slider.
Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6553 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-12 05:13:42 +00:00
hendricks266 084c661fa0 New def tokens for "cutscene": "texturefilter", "forcefilter", "forcenofilter"
Changes the filtering for cutscenes. By default, ANMs are unfiltered and IVFs filtered regardless of the filtering option in the menu. Use “texturefilter” to use the same filtering as textures, “forcenofilter” to never use filtering and “forcefilter” to always use filtering.

cutscene <path> { texturefilter }

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6552 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-12 05:13:38 +00:00
hendricks266 45a8742e42 New def token for "cutscene": "aspect"
Overrides the aspect ratio for IVF files.

cutscene <path> { aspect <numerator> <denominator> }

Note: For ANMs, you can use rotatesprite and setaspect to draw TILE_ANIM (currently defined as 30716) in EVENT_CUTSCENE with a custom aspect.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6551 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-12 05:13:32 +00:00
hendricks266 4313460da7 Bump savegame name limits from 22 in memory and 19 in practice to 32 in memory and 30 in practice.
This bumps SV_MINOR_VER.

git-svn-id: https://svn.eduke32.com/eduke32@6529 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-01 06:19:09 +00:00
hendricks266 1c107bd877 CON: Add EVENT_RECOGSOUND.
Set RETURN to -1 to disable the sound played when an enemy awaken. You have to use a command to play a sound, because the bosses use globalsound.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6517 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:40 +00:00
hendricks266 c9981e76af CON: Add EVENT_DISPLAYEND and EVENT_DISPLAYROOMSEND.
EVENT_DISPLAYROOMSEND: Triggered right after the game world is rendered and before any sprite above the screen.
EVENT_DISPLAYEND: Triggered after the game draws everything above the screen, including menus. A counterpart to EVENT_DISPLAYSTART.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6512 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:23 +00:00
terminx 5df760b347 Small change to G_FPSLimit()
git-svn-id: https://svn.eduke32.com/eduke32@6501 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-22 05:23:38 +00:00
terminx 63d3f70258 Minor hard-coded Duke sprite cleanup
git-svn-id: https://svn.eduke32.com/eduke32@6500 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-22 05:23:33 +00:00
terminx 15b223840b Useless removal of a couple of redundant blocks of code
git-svn-id: https://svn.eduke32.com/eduke32@6499 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-22 05:23:28 +00:00
terminx fe9c6d25f4 Move autoexec.cfg execution to directly after settings.cfg execution
git-svn-id: https://svn.eduke32.com/eduke32@6498 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-22 05:23:23 +00:00
hendricks266 e979aa1ff4 Eliminate the need for cache1d to calculate and remember the CRC32 of every GRP loaded.
git-svn-id: https://svn.eduke32.com/eduke32@6489 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-30 03:48:28 +00:00
terminx 3b9587cfa2 Fix issue with savemapstate/loadmapstate and gamearrays
git-svn-id: https://svn.eduke32.com/eduke32@6487 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-16 21:17:47 +00:00
hendricks266 aea57fde17 Fix infinite loop when requesting to open an invalid map from the command line.
git-svn-id: https://svn.eduke32.com/eduke32@6483 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-16 03:32:26 +00:00
hendricks266 32d3ca1591 Some more standalone stuff.
git-svn-id: https://svn.eduke32.com/eduke32@6467 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-09 07:36:58 +00:00
hendricks266 60fcb6527c Menus: If you open the Help menu with the F1 key, make Help the selected item on the main menu, if applicable.
git-svn-id: https://svn.eduke32.com/eduke32@6466 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-09 07:36:55 +00:00
hendricks266 11ce89d294 Fix randomseed in multiplayer.
Merged from private network branch.

Patch by [IFOC]75, prepared by Striker.

git-svn-id: https://svn.eduke32.com/eduke32@6454 1a8010ca-5511-0410-912e-c29ae57300e0
2017-09-27 02:30:28 +00:00
terminx 389c71e185 uint64_t based FPS limiter
git-svn-id: https://svn.eduke32.com/eduke32@6441 1a8010ca-5511-0410-912e-c29ae57300e0
2017-09-19 19:10:39 +00:00
terminx dad337add8 Fix gcc 7.1.0 warnings
git-svn-id: https://svn.eduke32.com/eduke32@6370 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-18 20:53:41 +00:00
terminx fd19569099 Drop libpng and zlib in favor of a custom < 100 line .png writer and a drop-in zlib replacement called miniz.
git-svn-id: https://svn.eduke32.com/eduke32@6365 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-18 20:53:00 +00:00
terminx d703ac2c62 Fix issue with changing settings in the startup window
git-svn-id: https://svn.eduke32.com/eduke32@6359 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-12 04:10:37 +00:00
terminx 3706ac1b43 Allow scripts to change MAXSPRITESONSCREEN before calls to drawrooms() and friends
git-svn-id: https://svn.eduke32.com/eduke32@6347 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-08 19:42:11 +00:00
terminx c23b1fe076 Read setup again after compiling scripts
git-svn-id: https://svn.eduke32.com/eduke32@6339 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-08 05:18:51 +00:00
terminx a9e513ecaf Add OSD_PROTECTED flag, set when gamefunc_Show_Console has been undefined from CON. Currently just requires you hold down shift when pressing the console key to open the console.
git-svn-id: https://svn.eduke32.com/eduke32@6325 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-05 05:42:37 +00:00
hendricks266 0992cdb03f Menu stuff
git-svn-id: https://svn.eduke32.com/eduke32@6316 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-05 05:37:49 +00:00
hendricks266 150eb8fd7c Fix a small regression with actions and improve performance while we're at it.
git-svn-id: https://svn.eduke32.com/eduke32@6313 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-05 05:37:39 +00:00
hendricks266 0bf330b2c6 Revise r6305.
git-svn-id: https://svn.eduke32.com/eduke32@6308 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-28 10:55:41 +00:00
hendricks266 4a69eecc9f Optimize getofs_viewtype for precision and speed.
git-svn-id: https://svn.eduke32.com/eduke32@6307 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-27 11:01:38 +00:00
hendricks266 42a26b5f3c Add action viewtypes 12 (like 7 but not mirrored), 9, and 16.
git-svn-id: https://svn.eduke32.com/eduke32@6306 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-27 11:01:34 +00:00
hendricks266 ea0179bd9b Templatize getofs_viewtype functions.
git-svn-id: https://svn.eduke32.com/eduke32@6305 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-27 11:01:30 +00:00
hendricks266 f55758bc2e When calculating which rotation to use for CON action viewtype 7, offset the frame intervals by 15 degrees instead of 22.5, clearly a copypaste error from viewtypes 5 or 8. Now these are properly centered.
git-svn-id: https://svn.eduke32.com/eduke32@6304 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-27 11:01:26 +00:00
terminx c25aa4a790 OSD (console) cleanup
git-svn-id: https://svn.eduke32.com/eduke32@6297 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-27 02:24:14 +00:00
hendricks266 5f8c99c3a1 Let animsound value -1 stop all sounds.
git-svn-id: https://svn.eduke32.com/eduke32@6284 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-25 11:24:27 +00:00
hendricks266 018bc98ecb Game defs: Add sounds sub-token to cutscene token that functions identically to animsounds.
git-svn-id: https://svn.eduke32.com/eduke32@6283 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-25 11:24:23 +00:00
hendricks266 4db07ee9af Structify animsounds arrays.
git-svn-id: https://svn.eduke32.com/eduke32@6282 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-25 11:24:19 +00:00
hendricks266 aebd4c53c4 Game defs: Split Anim_Create out of Anim_Setup and use it for the cutscene token.
git-svn-id: https://svn.eduke32.com/eduke32@6280 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-25 11:24:10 +00:00
hendricks266 1baac86d72 Game defs: Try loading def modules even if the engine reports failure.
git-svn-id: https://svn.eduke32.com/eduke32@6278 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-25 11:24:02 +00:00
terminx 504b04067b Remove some Duke-specific screen displays from standalone builds
git-svn-id: https://svn.eduke32.com/eduke32@6271 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 21:18:06 +00:00
terminx 1069db7e1e Fix swapped EDUKE32_STANDALONE ifdefs for screenshot filenames
git-svn-id: https://svn.eduke32.com/eduke32@6268 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 21:17:46 +00:00
terminx ac2f2bd902 :(
git-svn-id: https://svn.eduke32.com/eduke32@6245 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 09:16:27 +00:00
terminx b73c449f31 Further reorganization of actor_t. BYTEVERSION bumped.
git-svn-id: https://svn.eduke32.com/eduke32@6239 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:59:39 +00:00
terminx eae02b26a1 Respect r_maxfps in menus and on startup/bonus/end screens
git-svn-id: https://svn.eduke32.com/eduke32@6237 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:59:26 +00:00
terminx 4489e110de More minor optimizations. Breaks savegames.
git-svn-id: https://svn.eduke32.com/eduke32@6236 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:59:19 +00:00
hendricks266 e2c44ae253 CON: Handle the save and savenn commands after the full tic is processed, instead of in the middle of it during execution. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6222 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-22 22:49:22 +00:00
hendricks266 334007d6c3 Optimize all menutext calls.
git-svn-id: https://svn.eduke32.com/eduke32@6208 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-19 23:07:18 +00:00
hendricks266 a10893d75f Change the way gamefuncs are handled to support and ignore entries named as the empty string.
git-svn-id: https://svn.eduke32.com/eduke32@6185 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-17 11:41:59 +00:00
terminx f394f1bc1e Fix window title in EDUKE32_STANDALONE builds. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6169 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-09 06:41:39 +00:00
hendricks266 576ff98f4d Improve what build information we print to the log at startup. New feature: compilers, their versions, and big-endianness. Removed: C++, as it is now mandatory.
git-svn-id: https://svn.eduke32.com/eduke32@6142 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-05 10:05:22 +00:00
hendricks266 f781f21ccd Address some longstanding warnings with printf when building with MinGW's GCC 6 and newer.
Building with said newer versions may fix the -Wodr warning when building for release.

git-svn-id: https://svn.eduke32.com/eduke32@6140 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-05 10:05:12 +00:00
terminx 9ed9efc4f6 Change screenshot base name to scrn0000 instead of duke0000 for standalone builds. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6121 1a8010ca-5511-0410-912e-c29ae57300e0
2017-04-24 04:35:01 +00:00
hendricks266 417b047cf3 Bring the previous commit into effect.
git-svn-id: https://svn.eduke32.com/eduke32@6056 1a8010ca-5511-0410-912e-c29ae57300e0
2017-02-01 10:20:54 +00:00