Commit Graph

56 Commits

Author SHA1 Message Date
terminx 54bc64ea10 EDUKE32_STANDALONE guard some more Duke3D-specific behavior
git-svn-id: https://svn.eduke32.com/eduke32@7227 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:13:55 +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 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 71c06d5d95 Savegame cleanup
git-svn-id: https://svn.eduke32.com/eduke32@7112 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:31:45 +00:00
terminx 2b01ea19b1 Shut up a warning about potentially passing a null ptr to strlen() by way of a bad FILE ptr. The condition wasn't actually possible, but this is just as or more correct than it was before. This sure is a long commit message for something that only adds an 'else'.
git-svn-id: https://svn.eduke32.com/eduke32@7099 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:30:41 +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 e9797fe24d Remove redundant return statements
git-svn-id: https://svn.eduke32.com/eduke32@7069 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-16 06:08:42 +00:00
terminx fbbaeff95a Fix potential null pointer dereference
git-svn-id: https://svn.eduke32.com/eduke32@6996 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-07 05:19:50 +00:00
terminx c33d6a6e89 https://imgur.com/N2v8kjU
git-svn-id: https://svn.eduke32.com/eduke32@6989 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-03 00:43:31 +00:00
terminx dd1058c767 Actually fix savegame crash... probably.
git-svn-id: https://svn.eduke32.com/eduke32@6987 1a8010ca-5511-0410-912e-c29ae57300e0
2018-09-29 01:54:52 +00:00
terminx 220d86a583 Fix savegame crash issue
git-svn-id: https://svn.eduke32.com/eduke32@6983 1a8010ca-5511-0410-912e-c29ae57300e0
2018-09-28 04:27:48 +00:00
terminx 388a649ee5 Don't invalidate saves based on the compiled script CRC if the script hasn't been compiled yet
git-svn-id: https://svn.eduke32.com/eduke32@6973 1a8010ca-5511-0410-912e-c29ae57300e0
2018-09-01 19:36:10 +00:00
terminx f1cedd03f4 Remove compiled CON script from savegames in favor of storing a simple CRC32 value computed from the uncompiled CON text--this means that savegames can now only be loaded if the currently loaded CONs match what was in use when the game was saved.
git-svn-id: https://svn.eduke32.com/eduke32@6964 1a8010ca-5511-0410-912e-c29ae57300e0
2018-08-09 16:06:49 +00:00
hendricks266 bf043adb73 [facepalm emoji]
git-svn-id: https://svn.eduke32.com/eduke32@6962 1a8010ca-5511-0410-912e-c29ae57300e0
2018-08-02 01:21:19 +00:00
terminx ddd8b7e5bb Cheap fix for load game menu crash
git-svn-id: https://svn.eduke32.com/eduke32@6957 1a8010ca-5511-0410-912e-c29ae57300e0
2018-07-26 16:34:03 +00:00
hendricks266 cc999ff883 Fix warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct menusave_t'; use assignment or value-initialization instead [-Wclass-memaccess]
git-svn-id: https://svn.eduke32.com/eduke32@6950 1a8010ca-5511-0410-912e-c29ae57300e0
2018-07-23 02:55:56 +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
pogokeen 136dd514e1 Switched Duke3D to use new LZ4 dfwrite()/kdfread() implementations to improve compression/decompression speed.
SV_MINOR_VER is incremented as using this alternate compression algorithm is not backwards compatible with older saves/demos.

git-svn-id: https://svn.eduke32.com/eduke32@6789 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-23 21:41:02 +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 10d67bdf9e Menus: "Clean Up Obsolete Saves"
git-svn-id: https://svn.eduke32.com/eduke32@6749 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 03:55:41 +00:00
hendricks266 d3882d2c2c Autosave culling
git-svn-id: https://svn.eduke32.com/eduke32@6748 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 03:55:36 +00:00
hendricks266 210df6f92d Saves: Make the save filename counter automatically take the highest number present so as to not fill in gaps (which would make sorting inaccurate)
git-svn-id: https://svn.eduke32.com/eduke32@6747 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 03:55:32 +00:00
hendricks266 867b4db1a0 Menus: Delete key in save/load game menu
git-svn-id: https://svn.eduke32.com/eduke32@6745 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 03:55:25 +00:00
hendricks266 8019d8f6f0 Saves: Sort saves Z-A by filename and internally preserve the names of ones deemed unfit to display
git-svn-id: https://svn.eduke32.com/eduke32@6744 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 03:55:21 +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 3d8e1afba9 Saves: Add userbyteversion to savegame header and userdef
git-svn-id: https://svn.eduke32.com/eduke32@6741 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 03:55:07 +00:00
hendricks266 4c48a848a3 Saves: Overload ptrsize as a bitfield
git-svn-id: https://svn.eduke32.com/eduke32@6740 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 03:55:02 +00:00
hendricks266 f4ba85b600 Saves: Change header string to "E32SAVEGAME" (but still accept "EDuke32SAVE")
git-svn-id: https://svn.eduke32.com/eduke32@6739 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 03:54:58 +00:00
terminx 3b6bb3b7a3 Fix up CON to work with Q16.16 values
git-svn-id: https://svn.eduke32.com/eduke32@6727 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-07 04:21:31 +00:00
hendricks266 aa94f12666 Fix autoaim getting overwritten on load by whatever it was when the save was created.
git-svn-id: https://svn.eduke32.com/eduke32@6692 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-25 01:18:29 +00:00
hendricks266 e7cbf0b1a9 New events EVENT_PLAYLEVELMUSICSLOT and EVENT_CONTINUELEVELMUSICSLOT.
Called when a music track will be started from the beginning, and when the current track is continued after loading a save, etc.

The requested track is passed into PLAYLEVELMUSICSLOT via ud.m_volume_number and ud.m_level_number.

git-svn-id: https://svn.eduke32.com/eduke32@6624 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 11:14:08 +00:00
hendricks266 6470b51fb9 Properly save the currently playing music track in savegames.
Bump BYTEVERSION.

git-svn-id: https://svn.eduke32.com/eduke32@6620 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 11:13:49 +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 0ca09c08da CON: Add user_map and m_user_map read-only userdefs.
git-svn-id: https://svn.eduke32.com/eduke32@6616 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 11:13:30 +00:00
pogokeen 9c695d6bc4 Fix line spacing tab issue in rev 6570.
git-svn-id: https://svn.eduke32.com/eduke32@6571 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-19 00:03:12 +00:00
pogokeen 741305e976 Fix a number of cases where files opened with cache1d.cpp's kopen_internal() could be leaked.
git-svn-id: https://svn.eduke32.com/eduke32@6570 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-18 23:36:05 +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
pogokeen 59597982c5 Fixed file handle leak when loading a save game
git-svn-id: https://svn.eduke32.com/eduke32@6565 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-17 02:03:55 +00:00
terminx de5f16b1c5 Fix events added in recent commits
git-svn-id: https://svn.eduke32.com/eduke32@6537 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-02 09:24:55 +00:00
hendricks266 f9a90e6f33 Add anticipatory fields to ud; bump BYTEVERSION.
git-svn-id: https://svn.eduke32.com/eduke32@6531 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-01 06:19:15 +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 f808648079 Cleanups to handling of old save versions
git-svn-id: https://svn.eduke32.com/eduke32@6528 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-01 06:19:04 +00:00
hendricks266 bad61e3934 Replace arbitrary MAXGAMEEVENTS macro with the properly generated MAXEVENTS.
git-svn-id: https://svn.eduke32.com/eduke32@6503 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:28:54 +00:00
terminx c52e003e2a Fix issue with arrays, saved map states, and savegames
git-svn-id: https://svn.eduke32.com/eduke32@6492 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-31 02:09:25 +00:00
terminx 01d92aeed2 Syntax changes for gamevar and gamearray declarations:
Gamevar: default value and flags are now optional. A var declared without a value will default to 0 and a var declared without flags will default to global. Multiple flags can now be stacked one after another in a var declaration, and the most useful ones (GAMEVAR_PERPLAYER, GAMEVAR_PERACTOR, GAMEVAR_NODEFAULT, and GAMEVAR_NORESET) are now pre-defined tokens for easy use.

Gamearray: flags field now allows stacking of multiple flags as described above. Arrays can now be defined with specific data types, including int16_t, uint8_t, and a new bit-packed boolean data type. The tokens GAMEARRAY_RESTORE, GAMEARRAY_INT16, GAMEARRAY_UINT8, and GAMEARRAY_BOOLEAN are pre-defined for use of this feature.

This is all still pretty experimental.

git-svn-id: https://svn.eduke32.com/eduke32@6356 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-11 04:02:52 +00:00
terminx da0cc1b9bd Some work on CON arrays. Hopefully nothing is broken!
git-svn-id: https://svn.eduke32.com/eduke32@6343 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-08 19:41:43 +00:00