Commit graph

20404 commits

Author SHA1 Message Date
Marisa Heit
b9501a7291 Fix definition order of ZScript structs
Do a first pass over the Structs array in CompileAllFields() to reorder them such that if a struct uses other structs, those structs will be resolved first.
2022-07-29 08:17:33 +02:00
Magnus Norddahl
742ae8c907 Fix viewpoint buffer not getting cleared when in the menus 2022-07-28 13:52:09 +02:00
Christoph Oelckers
aae85a1b91 - backported KDE detection from Raze. 2022-07-28 10:52:26 +02:00
Christoph Oelckers
5a63044141 - Project fix for Softpoly removal. 2022-07-28 10:51:55 +02:00
Christoph Oelckers
93e934c8d0 - removed the Softpoly backend.
Its only relevant use case has been to use the software renderer on hardware not capable of OpenGL 3.3, but a large chunk of that can now be serviced with GLES.
In addition it has ceased further development and has not received any of the recent 2D render features which further reduces its viability.
2022-07-28 10:31:56 +02:00
Marisa the Magician
9eb8d65cb1 Fix another incorrect mapping of texture indices for UE1 models. 2022-07-27 10:21:29 +02:00
Shiny Metagross
83077b6f95 Update models.cpp
- Removed a useless bool
- Fixed an issue with model containers having less models than their smf total models amount using the smaller amount
2022-07-27 07:38:50 +02:00
Magnus Norddahl
e2778ba442 Move TexMan.GetCanvas and GetTextureCanvas to common 2022-07-25 18:50:16 +02:00
Magnus Norddahl
753822359e Add support for multiple 2d drawer viewpoints in the same frame 2022-07-25 18:50:16 +02:00
Magnus Norddahl
6c3fd3cc4d Fix softpoly null pointer crash 2022-07-25 18:50:16 +02:00
Magnus Norddahl
fe3751a502 Fix renderdoc error message about not all textures getting bound 2022-07-25 18:50:16 +02:00
Magnus Norddahl
b8569fa29f Fix GC shutdown crash due to canvas objects not getting GC'ed at the end
Fix typo in Draw2D and add support for specifying the viewport size directly
2022-07-25 18:50:16 +02:00
Magnus Norddahl
6137ea12d1 Fix typo 2022-07-25 18:50:16 +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
Magnus Norddahl
aa083604e1 Fix variable arg bindings
Always clear the drawer
2022-07-25 18:50:16 +02:00
Magnus Norddahl
0049fea8d6 Add missing DrawText binding 2022-07-25 18:50:16 +02:00
Magnus Norddahl
4f0b02b396 Add a 2d drawer to canvas textures 2022-07-25 18:50:16 +02:00
Marisa the Magician
cd20d707d4 Fix incorrect mapping of texture indices for UE1 models. 2022-07-25 13:52:46 +02:00
nashmuhandes
351a4c9a5a Added PitchFromMomentum, UseActorPitch and UseActorRoll to VOXELDEF. Behaves exactly like their 3D model counterparts. Hardware renderer only. 2022-07-25 08:06:44 +02:00
Rachael Alexanderson
eb94f81a83
update badge again, one last time 2022-07-24 16:26:33 -04:00
alexey.lysiuk
b402aa24eb
- updated continuous integration badge in readme
[skip ci]
2022-07-24 10:10:42 +03:00
Ricardo Luís Vaz Silva
12660b0015 Add special case for relative includes from top-level files 2022-07-24 09:05:16 +02:00
Rachael Alexanderson
27d4fc28db - implement fix as suggested by user 'axet' fixes issue #1621 2022-07-23 19:00:59 -04:00
Christoph Oelckers
9875850c19 - got rid of the state variables in the model class entirely.
This is *not* the right way to reduce function parameter count. The data in question is far easier evaluated at the calling site and passed as a parameter.
2022-07-23 10:35:01 +02: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
Christoph Oelckers
0665a28253 - removed some redundant chaaracters from the Doom SmallFont.
The two Greek letters are not supposed to be used in allcaps, and the Cyrillic Ё has a remapping to the equivalent Latin letter.
2022-07-23 08:51:27 +02:00
Shiny Metagross
9ab6557822 A_ChangeModel now has generatorIndex
- To really take advantage of this function, I thought it would be useful to be able to add additional models if the user wants to. Let's say you got a player model at index 0. Your gun model has the same frames, but you don't want to duplicate the modeldef data. With generator index, you don't need to duplicate the data, just tell generator index to clone frame data from index 0.
- Implemented a little something to check if a negative skin or model index were passed, and prevent modders from pulling that off.
2022-07-22 17:11:59 +02:00
Shiny Metagross
fa6dfdf64c Update p_actionfunctions.cpp
Woah, this didn't work with custom inventory chains!
2022-07-22 17:11:59 +02:00
Shiny Metagross
69ee1eb0a2 Surfaceskin modification
- Made it so when rendering a model, it clones an smf to use so that data isn't overwritten
- Reimplemented the skin index property. This changes the behavior of this index if CMDL_USESURFACESKIN is activated
2022-07-22 17:11:59 +02:00
Shiny Metagross
ec3d81a34f More fixes
- Let's fill the holes of serialized data so it can properly be removed instead of leaving undefined behavior behind.
- Added CMDL_HIDEMODEL flag. This makes a model index invisible.
2022-07-22 17:11:59 +02:00
Shiny Metagross
11f342795b I did a no no
- This should fix it
2022-07-22 17:11:59 +02:00
Shiny Metagross
9805851bd8 Update p_actionfunctions.cpp
Uhh, maybe this is why mac builds failed
2022-07-22 17:11:59 +02:00
Shiny Metagross
9f2c7c850d Update p_actionfunctions.cpp
- Let's fix some of the compile warnings
- We don't want to include models that were already parsed by modelDef, or already in savedModelFiles
2022-07-22 17:11:59 +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
Shiny Metagross
5b8789977a Another fix, most serialization is working
- Changed some logic when giving an actor that doesn't have a modeldef a modeldef to make sure it knows it doesn't have one when cleared
- Fixed the serialization for modelData. Only problem now is that I was right about needing to push the models on load
2022-07-22 17:11:59 +02:00
Shiny Metagross
83a23c6525 Other updates
- Moved modelDef to modelData
- Replaced TArray.Deletes with TArray.Pop
- Made a few other optimizations in other places in the action function
2022-07-22 17:11:59 +02:00
Shiny Metagross
e827e9b086 TArrays to TObjPtr
- Made the 2 TArrays into a class called DActorModelData.
- Removed the skinindex and now just uses one index
- Replaced a bunch of nullptr for modelDef checking with NAME_None
- Added some garbage cleanup to A_ChangeModel itself, as well as removing memory of modelData that is no longer needed
- Attempted serialize code, putting up for review
2022-07-22 17:11:59 +02:00
Shiny Metagross
c304a8f974 Changed static arrays to TArrays
- Made the models and skins arrays TArrays
- The issue I described with models not always reverting to default properly was caused by the fact I was unintentionally overwriting smf data. Now intermediate TArrays store the data before the loop instead of overwriting anything
2022-07-22 17:11:59 +02:00
Shiny Metagross
5abadd3aab A_ChangeModeldef
-Added A_ChangeModelDef
A_ChangeModel(modeldef, modelpath, model, modelindex, skinpath, skin, skinid, flags)

This can change the modeldef, model and skins of an actor.

Currently, modelindex and skinindex accept indices from 0-15.

An actor MUST have a modeldef in order to use this function, either defined from modeldef, or given one through the modeldef parameter. You can pass "" to use the same modeldef. Likewise, passing "" for model or skin will just revert to the default model.

Available flags:
CMDL_WEAPONTOPLAYER - If used on a weapon, this instead change's the model on the player instead.

One issue I am aware of right now is that clearing a model by "" sort of works but is buggy. For now you can just manually set the model back using the names explicitly. However, I am stumped and I think getting more eyes on it would help.
2022-07-22 17:11:59 +02:00
Christoph Oelckers
e649357d4e - fixed return values of FTextureAnimator::AddAnim 2022-07-22 08:35:56 +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
d2454d4b3b - DirectInput cleanup
Removing ancient code that's only useful on pre-XP OSs.
2022-07-20 14:41:06 +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
Magnus Norddahl
89f5428a9a Fixes vulkan crash when multisampling is enabled 2022-07-16 17:51:44 +02:00
Christoph Oelckers
e4485b01f8 - removed redundant extern declarations from platform code. 2022-07-16 15:12:06 +02:00
Omar Polo
0f0b4b7620 fix gzdoom.pk3 not found error
Move the initialization before BaseFileSearch is called, otherwise
GameConfig is used not initialized and it doesn't find the gzdoom.pk3
file.

GameConfig used uninitalized was spotted by @LoneFox78.
2022-07-16 15:04:13 +02:00
Gutawer
937c22ff14
- add a method for filling a shape2d instead of using a texture (#1661)
Co-authored-by: Christoph Oelckers <coelckers@users.noreply.github.com>
2022-07-16 14:57:22 +02:00
Gutawer
ee0d90a983
- add stencil buffer support for 2d drawing (#1660)
Co-authored-by: Christoph Oelckers <coelckers@users.noreply.github.com>
2022-07-16 14:56:28 +02:00
Gutawer
1e27fac288 - add a system for setting all of 2D drawing's transform, not just shapes 2022-07-16 14:53:07 +02:00