Commit graph

459 commits

Author SHA1 Message Date
Hugo Locurcio
ffcfec66b3 Store kills/items/secrets in save comment only if visible on HUD
This prevents spoiling levels when the HUD information is disabled.

This change is not retroactive: it has no effect on existing savegames.
You need to save again for this change to have an effect.
2023-09-20 23:51:58 -04:00
Christoph Oelckers
23ffaaecb0 - changed last commit to not translate the text written to the savegame info.
This would be a bit problematic if it was transferred to other systems if the source language cannot be understood.
2023-09-16 11:45:00 +02:00
Hugo Locurcio
56c2bd018d Add more information in saved game comments
Save games now store kills/items/secrets and player health/armor
in the comment string, which is displayed in the save/load game menu.

This change is not retroactive: old savegames will not display
this information until they are overwritten.
2023-09-16 11:42:29 +02:00
Christoph Oelckers
ebb71cebf1 - put the entire filesystem code into a namespace and created some subdirectories. 2023-08-22 22:54:54 +02:00
Christoph Oelckers
2671394961 - only use standard types in WriteZip's API. 2023-08-22 21:49:55 +02:00
Christoph Oelckers
7fee89d1f5 - uncouple the file system from the engine's Printf function.
This is needed to use it in non GZDoom based projects.
2023-08-17 21:36:22 +02:00
nashmuhandes
1e0309ea10 - block the centerview CCMD if the player has TOTALLYFROZEN. This is deliberately done this way, instead of placing the check inside PlayerPawn::CheckPitch, because there may be other situations where we don't want to block the centering function (APowerFlight::EndEffect being one such case)
- also while I'm in this file, fix code styling for another one of my previous submissions
2023-08-09 09:17:20 -04:00
Mitchell Richters
f1f6e3a607 - Move invertmouse CVARs into common code.
* Removes duplication of CVAR definitions between Raze and GZDoom.
2023-04-04 17:11:28 +02:00
Christoph Oelckers
ee5b6e45f8 - made D_WriteUserInfoStrings memory safe.
Its callers are anything but for now but this function was the main blocker for refactoring so it had to come first.
2023-03-26 09:27:26 +02:00
Christoph Oelckers
7acf23f213 - fixed typo in string label. 2023-02-19 12:47:16 +01:00
Ricardo Luís Vaz Silva
854c57611f Fix Quicksave Rotation 2022-12-05 07:48:51 +01:00
Christoph Oelckers
ff37d710e2 - overhaul of savegame path management.
* use a different subfolder for each IWAD's saves.
* do not allow load and save CCMDs to escape the save folder. Absolute paths and '..' are being blocked now.
* unified savegame path and filename generation in one single function. All ad-hoc file name generation was replaced.
* -loadgame will also use the designated savegame folder now.
2022-11-05 13:28:31 +01:00
Christoph Oelckers
671b8696bb - made CVar declarations type safe again. 2022-10-22 09:29:38 +02:00
Christoph Oelckers
453688ccc6 - reworked CVARs to not use a linked list and to be initialized manually.
This solves two problems:

* The linked list is too slow, a map is better. A map cannot be used with statically allocated CVARs because order of initialization is undefined.
* The current CVAR system is an unordered mishmash of static variables and dynamically allocated ones and the means of identification are unsafe. With this everything is allocated on the heap so it can all be handled the same by the cleanup code.
2022-10-21 18:56:43 +02:00
Christoph Oelckers
b6c5232fea - try to keep the engine stable for as long as possible if a VM exception occurs in OnDestroy while running a cleanup.
This will still crash, but run long enough for the exception message to be visible.
2022-10-20 17:12:43 +02:00
Christoph Oelckers
8aaab153fa - add a system interface for CheckCheatmode and moved some sound code to the backend. 2022-10-02 16:48:56 +02:00
Christoph Oelckers
8e6bdd72fa - moved UpdateVRModes, AppActive and gamestate into the backend. 2022-10-02 14:28:40 +02:00
Rachael Alexanderson
03d76027cf - fix issue #1708 - respect user preferences when specifying custom save/config/screenshot paths 2022-08-14 15:03:20 -04:00
Christoph Oelckers
76c8214d67 - fixed destructive logic and memory allocation issues in RenderFrameModels.
This completely avoids modification of the model data, instead using local variables.
2022-07-23 10:10:15 +02:00
Shiny Metagross
6d00e4a3f3 Finished serializing
- Implemented an FString TArray which goes into save files that saves a model file and path, and when the game is loaded, spits back out the model to be Loaded when loading a save file
2022-07-22 17:11:59 +02:00
Rachael Alexanderson
f4f701a45c - add longsavemessages to simple menu. set longsavemessages default to false. 2022-07-21 13:22:52 -04:00
Christoph Oelckers
c597ba2fef - made cutscenes at engine startup work. 2022-06-04 21:31:19 +02:00
Christoph Oelckers
99d98cf79d - added cutscene creation code 2022-06-03 00:03:57 +02:00
Christoph Oelckers
082daccd2d - summary screen is working again
minus the initial wipe…
2022-04-26 20:50:36 +02:00
Christoph Oelckers
336c45aaa4 - SCreenjob fixes
Still doesn’r show anything but we got it all set up now.
2022-04-26 20:50:35 +02:00
Christoph Oelckers
1bb750c061 Screenjob WIP stuff 2022-04-26 20:50:35 +02:00
Christoph Oelckers
390bf58698 - first stage of migrating intermissions to screenjobs. 2022-04-26 20:50:35 +02:00
Christoph Oelckers
9898ee542c - route all accesses to gameaction from the backend through the sysCallbacks.
gameactions are frontend specific so this needs to be decoupled.
2022-04-26 20:50:34 +02:00
Major Cooke
421c40e929 Replaced GetTerrainDef with the global Terrains array. 2022-02-22 19:35:50 +01:00
Marisa Heit
e529f2d4d1 Revert "- be a bit more aggressive with the GC when not running the game loop."
This reverts commit b4d03501af.
2022-01-11 13:01:31 +01:00
Player701
2ce5b49cab - Exported the "paused" global variable to ZScript 2021-12-06 16:26:34 +01:00
Christoph Oelckers
77d74a11d1 - removed most templates.h includes. 2021-10-30 10:49:12 +02:00
Christoph Oelckers
1d0aed219e - replaced MIN/MAX in all non-common code. 2021-10-30 10:16:52 +02:00
Christoph Oelckers
b4d03501af - be a bit more aggressive with the GC when not running the game loop.
Since most CheckGC calls are within the main game ticker, the engine can accumulate a lot of data when creating/deleting objects in the menu or other UI parts and never manage to collect everything
2021-10-03 14:01:27 +02:00
alexey.lysiuk
dcfd72c766 - fixed crash after change level failure
https://forum.zdoom.org/viewtopic.php?t=72890
2021-08-06 15:02:00 +03:00
Christoph Oelckers
e47671c865 - make the title music only play once, unless a real demo is successfully played. 2021-05-17 11:41:43 +02:00
nashmuhandes
ff35ea9ac7 Don't print the weapon tag if the game is paused 2021-04-27 00:07:24 +02:00
alexey.lysiuk
d23755f76b - fixed missing 'player left the game' message 2021-02-15 11:18:06 +02:00
alexey.lysiuk
b8b93e0dd8 - fixed most of implicit fallthrough compilation warnings
src/common/console/c_console.cpp:1032:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/common/console/c_console.cpp:958:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/common/scripting/backend/codegen.cpp:2969:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/common/scripting/frontend/zcc_compile.cpp:2656:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/common/scripting/frontend/zcc_compile.cpp:521:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/common/scripting/jit/jit_math.cpp:966:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/d_main.cpp:1538:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/d_main.cpp:1549:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/d_main.cpp:3820:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/gameconfigfile.cpp:544:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/gamedata/p_xlat.cpp:193:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/gamedata/p_xlat.cpp:200:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/gamedata/p_xlat.cpp:210:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/g_game.cpp:1145:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/maploader/maploader.cpp:2142:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/menu/doommenu.cpp:159:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/m_cheat.cpp:109:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_ceiling.cpp:254:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_floor.cpp:322:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_floor.cpp:330:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_floor.cpp:344:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_plats.cpp:129:47: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_plats.cpp:284:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/p_acs.cpp:6302:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/p_acs.cpp:8111:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/p_spec.cpp:344:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/scripting/decorate/thingdef_parse.cpp:1343:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/scripting/zscript/zcc_compile_doom.cpp:298:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/wi_stuff.cpp:463:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
2020-10-31 13:37:51 +02:00
Christoph Oelckers
194824f810 - some fixes for the console.
* it is now possible to switch back to the main intro loop from the fullscreen console.
* do not distort the background of the fullscreen console. Always draw the console on top of what the main loop currently displays with a translucent black overlay.
* do not use the CONPIC for the fullscreen console as it tends to be more of a distraction than an asset when filling the entire screen.
* cleaned up c_console.cpp and moved several pieces of code unrelated to actual console management out of it.
2020-10-25 09:17:31 +01:00
Player701
69da5c23a3 - Fixed: Server CVars did not immediately revert to their saved values upon loading a save file.
https://forum.zdoom.org/viewtopic.php?f=2&t=70190
2020-10-17 09:23:39 +02:00
Christoph Oelckers
504f85e6d4 - moved date code to its own file. 2020-10-16 22:57:27 +02:00
Christoph Oelckers
92d630eb45 - keep mouse coordinates as floats for as long as possible. 2020-09-28 22:12:44 +02:00
Christoph Oelckers
51518d63a4 - cleanup of mouse input code and removal of all magic factors.
Sensitivity scaling of both axes is now exposed as a raw factor to the user instead of obscuring it behind an unclear 'prescale' boolean.
This also consolidates the coordinate processing code to prevent such discrepancies as were present here from happening again.
Migration code for old config settings is present so that this change does not affect existing configurations.
2020-09-28 21:13:34 +02:00
Christoph Oelckers
348f9ae68c - moved i_net into 'common' to bring it in line with Raze. 2020-09-27 12:30:54 +02:00
Christoph Oelckers
399388d177 - transmit the actual run mode in BT_RUN, because BT_SPEED was poorly designed. 2020-09-26 22:26:26 +02:00
3saster
5803b78147
Implemented Clock Class (#977)
* Simplified some stuff, made up-to-date

* Dealt with DST problems

* Made SystemTime.Format clearscope, as there is no reason for this function to be limited to the ui
2020-08-27 12:43:50 -04:00
Alexander Kromm (m8f)
83ffcbf692
autosave and make screenshot only if there is no other game actions (#1126)
In-game fix for this bug: https://forum.zdoom.org/viewtopic.php?f=43&t=59889&start=60#p1121698
because it may be also caused by other scripts or even manually.
2020-08-25 11:54:57 -04:00
Christoph Oelckers
75cd00a340 - fixed some issues with setup parts for ZScript in the wrong place.
This never showed on GZDoom as an error but on Raze which has no actor classes it caused incompletely set up class descriptors.
2020-06-14 18:35:58 +02:00
Christoph Oelckers
712d80006a - split game dependent parts out of menudef.cpp. 2020-06-14 00:27:32 +02:00