Commit graph

430 commits

Author SHA1 Message Date
Christoph Oelckers
65a26d6779 - removed the string constructors from FSoundID.
Due to C++ conversion rules this was a bit too volatile. There's really not enough places where being able to pass a string directly into the sound API was beneficial - the two most frequent functions now got overloaded variants.
2022-11-24 23:52:52 +01:00
Christoph Oelckers
b89c4affae - removed the string assignment operators.
These all caught literal 0's as well
2022-11-24 23:52:52 +01:00
Christoph Oelckers
d173c0453c - handle all remaining places of sound ID conversions after removing the conversion operators. 2022-11-24 23:52:52 +01:00
Christoph Oelckers
160633a4a2 - migrate a large part of the sound code to FSoundIDs.
This has always been a wild mixture of IDs and ints.
2022-11-24 23:52:52 +01:00
Christoph Oelckers
6eab875ec2 - added option to show hub and episode names on the alt HUD.
Still very much work in progress because few mods have set this up.
CVARs default to off and are not exposed to the menu.
2022-10-26 17:44:51 +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
8aaab153fa - add a system interface for CheckCheatmode and moved some sound code to the backend. 2022-10-02 16:48:56 +02:00
Ed the Bat
88674b5ea0 Prevent Keyconf from adding duplicate playerclass 2022-08-17 21:12:10 +02:00
Magnus Norddahl
bb503950df Add canvastexture definition to animdefs.
Split canvas texture rendering from camera texture rendering.
2022-07-25 18:50:16 +02:00
Christoph Oelckers
e649357d4e - fixed return values of FTextureAnimator::AddAnim 2022-07-22 08:35:56 +02:00
Christoph Oelckers
f13e95ccbe - also allocate FDoorAnimation's frame table from the texture manager's memory arena.
The same lifetime rules as for the regular animations apply here.
2022-07-17 10:22:48 +02:00
Christoph Oelckers
6d635ce715 - optimized storage for animation definitions.
Instead of allocating everything on the heap as single blocks, use a value TArray and allocate the frame arrays from the texture manager's memory arena, since lifetime of the data is identical.
Most importantly this avoids using a variable size array at the end of the struct.
2022-07-17 10:15:09 +02:00
Christoph Oelckers
595975fcc7 - did a test compile as C++20 and fixed all warnings that got emitted. 2022-07-15 09:17:50 +02:00
Christoph Oelckers
2c7761926e - removed volatile type punning for clipping against line portals.
This now uses a common base for line_t and HWLinePortal.
2022-07-14 10:39:11 +02:00
Christoph Oelckers
316b9305a2 - fixed type of third argument of MBF21's MonsterMeleeAttack function.
This is a sound, not an int.
2022-06-16 10:31:39 +02:00
Christoph Oelckers
355219d614 - fixed several scale related floating point conversion warnings. 2022-06-15 22:15:36 +02:00
Christoph Oelckers
431c47c957 - fixed setup of ready state with Dehacked.
This needs to emulate the hard coded chainsaw sound when weapon states get reassigned.
2022-06-15 22:04:01 +02:00
Christoph Oelckers
c597ba2fef - made cutscenes at engine startup work. 2022-06-04 21:31:19 +02:00
Christoph Oelckers
26a377c009 - fixed undefined behavior with Dehacked's value parser.
From the looks of it MSVC's strtoul function does parse negative values, while GCC's does not. Since negative values are allowed for some properties this now uses strtoll and stores the value with 64 bit to preserve both the value range of signed int and unsigned int.
2022-06-04 09:23:46 +02:00
Christoph Oelckers
344c6348fd - sprite lightlevel cleanup and fixes.
* consolidated the getter functions on the game data side
* better handling of per-sprite lighting with fog
* allow negative values for additive per-sprite lighting.
* also fixed return type of UpdateWaterDepth.
2022-06-01 08:37:13 +02:00
Christoph Oelckers
da30b6f6f0 - fixed some GCC warnings 2022-06-01 08:37:00 +02:00
Christoph Oelckers
21c60c931e - warning fixes and cleanup from old startscreen branch. 2022-06-01 08:36:59 +02:00
Christoph Oelckers
1aa3a5ea16 - platform independent classes for start screen rendering.
These use the internal 2D drawer. Not hooked up yet.
2022-06-01 08:36:59 +02:00
Christoph Oelckers
e42256c7a8 - added texture class for handling the start. screen 2022-06-01 08:36:59 +02:00
Christoph Oelckers
cda6394a95 - added cutscene data parser
This covers:

game start
episode start
cluster start/end
level start/end
2022-05-31 15:02:52 +02:00
Christoph Oelckers
a9cba90647 - fixed MF_SHADOW handling for MBF21
This needs to alter the render style as well.
2022-05-23 00:10:59 +02:00
Christoph Oelckers
f1d017d0fa - compat_corpsegibs is still needed as a dummy MAPINFO flag. 2022-04-30 23:39:02 +02:00
Christoph Oelckers
c83344f5c2 - removed all remains of the corpsegibs flag and made vileghosts interactive
Ghosts are still off by default, but they will now be enabled when selecting the vanilla (strict) compatibility mode.
2022-04-29 00:28:34 +02:00
Christoph Oelckers
63bba40d7d - expose the ‚attenuatelights‘ map flag. 2022-04-29 00:02:11 +02:00
Christoph Oelckers
643e5c87fd - added an option to delete a terrain type from a texture.
Just define a texture's terrain to 'none'.
(A bit puzzling that such a feature did not exist yet...)
2022-04-28 08:42:12 +02:00
Christoph Oelckers
390bf58698 - first stage of migrating intermissions to screenjobs. 2022-04-26 20:50:35 +02:00
Christoph Oelckers
6cb035b7b2 - added workaround to Dehacked so that „Doom“ only replaces the music name
Of all these short strings this is the only one that occurs elsewhere as well.
2022-04-22 00:53:27 +02:00
Christoph Oelckers
346cae04be - disabled deletion of previous event handlers when using 'eventhandler' keyword in MAPINFO. 2022-04-17 13:25:07 +02:00
Christoph Oelckers
1c4d48f5f2 - added some fudging so that the Dehacked parser can properly deal with ConsumeAmmo.
This is a parameterized code pointer, so checking state functions for names won't work. Additionally, the handling was not correct for weapons with an ammo use other than 1.
2022-04-17 08:53:52 +02:00
Christoph Oelckers
bdab9c2d9d - fixed Dehacked drop items. 2022-04-15 23:10:53 +02:00
Christoph Oelckers
d0e1aea273 - fixed Dehacked check for A_ConsumeAmmo.
This must use the internal function name.
2022-04-14 12:21:24 +02:00
Christoph Oelckers
89999be49e - fix detection for misplaced | when creating the small fallback font
This needs doomtemplate set.
2022-04-04 00:05:06 +02:00
Major Cooke
421c40e929 Replaced GetTerrainDef with the global Terrains array. 2022-02-22 19:35:50 +01:00
Major Cooke
579c4152d2 Added GetTerrainDef and Sector variant of GetFloorTerrain.
- GetTerrainDef takes the raw number of the Terrains[] index. Can return null.
- GetFloorTerrain (Sector) gets the defs from the position given (either Sector.Floor or Sector.Ceiling).
2022-02-22 19:35:50 +01:00
Christoph Oelckers
bba806f43e - initialize FSwitchDef::QuestPanel when reading a Boom SWITCHES lump. 2022-02-15 17:22:05 +01:00
Christoph Oelckers
c48de5d8d3 - added a 'no MBF21' compatibility flag.
Turns out that there's a few old maps that have the extended line flags set but not the guard bit that forces their clearance.
Astrostein 1's first map is an example for this.
2022-02-14 20:00:06 +01:00
Rachael Alexanderson
08b5f95e07 Revert "Fixed: opaque blood decals did not respect the GAMEINFO's blood color. This fixes opaque blood decals not getting the correct color in Chex Quest, as an example."
This reverts commit ee0330b0b1.
2022-02-09 09:11:07 -05:00
nashmuhandes
ee0330b0b1 Fixed: opaque blood decals did not respect the GAMEINFO's blood color. This fixes opaque blood decals not getting the correct color in Chex Quest, as an example. 2022-02-09 07:26:06 -05:00
Nikolay Ambartsumov
df976e218e Add per-tier sidedef light levels to UDMF maps 2022-01-26 18:25:04 -05:00
nashmuhandes
f79bbed130 Merge branch 'master' of https://github.com/coelckers/gzdoom into lightmaps2 2022-01-20 14:19:45 +08:00
Xaser Acheron
25f28c4b50 fix mbf21 A_ConsumeAmmo taking 0 ammo instead of 1 if ammopershot field not set (need to amend the spec for this, argh) 2022-01-18 08:06:29 +01:00
Xaser Acheron
00d4442fc8 fix MBF21 A_WeaponMeleeAttack function name typo & args 2022-01-18 08:06:29 +01:00
Xaser Acheron
97859fd608 fix MBF21 GetSoundArg off-by-one: sound indices are 1-indexed in args because Killough 2022-01-18 08:06:29 +01:00
nashmuhandes
57112742fe Merge branch 'master' of https://github.com/coelckers/gzdoom into lightmaps2
# Conflicts:
#	src/common/rendering/gl/gl_shader.cpp
#	src/common/rendering/hwrenderer/data/buffers.h
#	src/common/rendering/v_video.h
2022-01-16 01:57:38 +08:00
Christoph Oelckers
49ab6612cb - fixed Dehacked parsing issues with weapon properties.
Due to a badly used string length check this code didn't really do what it was supposed to.
2022-01-07 00:31:57 +01:00