Magnus Norddahl
168c274601
- remove some macros and add functions checking if a register needs to be copied
2018-09-02 15:36:39 +02:00
alexey.lysiuk
207988bb1b
- fixed crash when wipe type is set to none
2018-09-02 15:15:38 +03:00
Christoph Oelckers
b570f28597
- restored block of code that got deleted by a bad merge of a cherry-picked commit.
2018-09-02 12:43:13 +02:00
Christoph Oelckers
bec1825e8c
- fixed: The wipe textures need to be rendered with DTA_Masked set to false because they contain bogus alpha values where a stencil got rendered.
2018-09-02 12:30:40 +02:00
Christoph Oelckers
bec588eaf4
- moved the two remaining functions from gl_wipe.cpp to gl_framebuffer.cpp and deleted the file.
...
The single most hideous thing in the GL renderer is finally gone. :)
2018-09-02 12:03:18 +02:00
Christoph Oelckers
775ddfa0a8
- fixed the melt wipe.
2018-09-02 12:03:18 +02:00
Christoph Oelckers
6e0ed3e930
- crossfade wipe is working again.
...
The other two types still need work.
2018-09-02 12:03:17 +02:00
Christoph Oelckers
29a54c33b2
- temporarily disabled wipe code and removed old function stubs.
...
This still needs work.
# Conflicts:
# src/gl/data/gl_attributebuffer.cpp
2018-09-02 12:02:59 +02:00
Christoph Oelckers
e4a40c98ce
- wasn't saved
2018-09-02 12:02:36 +02:00
Christoph Oelckers
9af01c4667
- Untested wipe refactor
...
# Conflicts:
# src/gl/renderer/gl_renderer.cpp
# src/gl/system/gl_wipe.cpp
# src/hwrenderer/scene/hw_attributebuffer.cpp
2018-09-02 12:02:36 +02:00
Christoph Oelckers
ecf6e3f620
Sanitized the Being/End2D interface so that it can be used to keep the attribute buffer mapped while processing 2D commands.
...
For this to work the 2D mode has to be properly set and unset at the right places so that no double mapping occurs and no render operation can happen while in 2D mode.
# Conflicts:
# src/d_main.cpp
# src/v_video.h
2018-09-02 11:59:01 +02:00
Christoph Oelckers
2d1043d1d3
- added profiling for postprocessing code.
2018-09-02 11:35:02 +02:00
Magnus Norddahl
55955b9c22
Merge remote-tracking branch 'gzdoom/master' into asmjit
2018-09-02 03:46:06 +02:00
Magnus Norddahl
323d290c99
- implemented LBIT, SBIT, VTBL, SCOPE, NEW, NEW_K, THROW, EQA_R and EQA_K
2018-09-02 03:39:02 +02:00
Kevin Caccamo
55d1613ea4
Update usage of LastIndexOf
...
Now that LastIndexOf works properly, update the code that uses it to find OBJ models
Also, make UE1 model finder use LastIndexOf
2018-09-01 07:28:26 +02:00
Kevin Caccamo
a38b0813cf
Fix OBJ rendering in software renderers, and other things
...
Pass surf->vbStart to SetupFrame instead of 0, and pass 0 to DrawArrays instead of surf->vbStart.
Use a potentially faster method of modifying the OBJ file text buffer by modifying it directly.
Add RealignVector and FixUV methods to begin work on re-aligning OBJ models to the same orientation as MD3 models.
Re-align OBJ models to match MD3 models
Fix normal calculation for re-aligned OBJs
Ensure AddSkins does not go out of bounds of surfaceskinIDs
Do not precache skins that were replaced by the user.
Fix OBJs with a large number of materials not being fully rendered
Print a warning message if a material referenced by the OBJ could not be found.
Free surface triangles once they are no longer needed
Also, use continue instead of return so that surfaces after those with missing materials are still rendered.
Fail if a face side has no vertex reference. Vertex references are required for a valid OBJ.
Clean up OBJ model code
Remove commented code, mainly Printf's that aren't used any more.
Add more documentation comments, and tweak existing documentation comments
Replace ParseVector2 and ParseVector3 with a template ParseVector function
2018-09-01 07:28:26 +02:00
Kevin Caccamo
bb8c66b3a0
Fix rendering and parsing of OBJ models
...
Create a new surface for each 'usemtl' statement in the OBJ file, and fix memory errors caused by TriangulateQuad.
Calculate missing normals, and fix incorrect UV coordinates
Fix construction of vertex buffer for objects with multiple surfaces
Localize curMtl, curSurface, aggSurfFaceCount, and curSurfFaceCount to FOBJModel::Load(), since they are not used anywhere else.
Fix parsing of OBJs without UV references
Internally, I replaced hashtag line comments with C-style line comments, and I replaced each forward slash with newSideSep.
If no UV coordinates are available, add a default vector of (0,0).
Also, remove "this->" from ResolveIndex to make the code a bit cleaner, and fix a minor garbage issue I failed to notice earlier (normref would pick up garbage if there was no normal reference).
Ensure usemtl statements remain intact
It may be a bit inefficient, but I tried modifying the buffer directly, and I got memory corruption errors. In this case, it's a lot better to be safe than sorry.
2018-09-01 07:28:26 +02:00
Kevin Caccamo
1c15fb2408
Initial work on OBJ model support
...
What works:
- Parsing the model
- Constructing geometry (surfaces) for triangulated models
What doesn't:
- Rendering the model
- Building the vertex buffer
- Triangulating quads
2018-09-01 07:28:26 +02:00
ZippeyKeys12
c8e55fed46
Moved FConfigFile over to FileReader/FileWriter
...
Don't use new operator, use value instead
2018-08-31 14:29:37 +02:00
alexey.lysiuk
050d72724f
- fixed: always initialize active colors in special font
...
https://forum.zdoom.org/viewtopic.php?t=61859
2018-08-31 10:42:53 +03:00
Magnus Norddahl
ccd2f58fb4
- implement emitter functions for LKP_R, META, CLSS, LO, LO_R, LP, LP_R, SO, SO_R, SP, SP_R
...
- add emit code for throwing exceptions on null pointers
2018-08-31 06:57:30 +02:00
Magnus Norddahl
999b3833ff
- improve jit debug output slightly
2018-08-30 19:55:00 +02:00
Magnus Norddahl
bba422ffcc
- fix offsetting bug when loading address registers
2018-08-30 19:47:38 +02:00
Jonathan Russell
ea81ab4097
- added Screen.DrawThickLine for drawing lines with thickness
2018-08-30 19:21:57 +02:00
Magnus Norddahl
c7e14e63bc
- fix swapped operands in EmitSUBF_KR
2018-08-30 18:47:25 +02:00
Braden Obrzut
aaee655eba
- Added paths for all games on Steam for Linux since they now offer the ability to download all games for Proton/Wine.
...
- Check ~/.steam on Linux for the config since either they moved it at some point or my setup changed and that's where it is for me now.
2018-08-29 19:08:54 +02:00
Magnus Norddahl
4b22fa7bc8
- implement MODF_RR, MODF_RK and MODF_KR
2018-08-29 01:27:37 +02:00
Magnus Norddahl
a5719e73eb
- fix mul using wrong instruction
2018-08-29 01:07:36 +02:00
Magnus Norddahl
25e7042bc5
- implement BOUND opcodes and add logging the resulting assembly code if asmjit throws an exception
2018-08-26 14:27:46 +02:00
Rachael Alexanderson
4d3249496a
- fixed: sound from poly objects through portals will now propegate properly
2018-08-25 18:23:59 -04:00
Christoph Oelckers
5b7d3c91f9
- defaulted constructors and assignment operators of several trivial types.
2018-08-25 23:51:36 +02:00
Rachael Alexanderson
0c4e6f88a6
- bump ZScript version number to 3.6.0, since GZDoom 3.5.1 updated it and that's not yet reflected in the master.
2018-08-25 16:46:09 -04:00
Christoph Oelckers
d263f7bcc8
- removed most of the old LastIndexOf methods in FString, only leaving one for ZScript and clearly giving it a name that says it all. RIndexOf has been made the proper version of LastIndexOf internally now.
2018-08-25 20:54:16 +02:00
Christoph Oelckers
c04c48d157
- renamed RIndexOf to RightIndexOf
2018-08-25 20:39:58 +02:00
Kevin Caccamo
884de51b70
Add the "RIndexOf" method to FString, which works like String.lastIndexOf from JavaScript
...
RIndexOf returns the index where the substring starts, instead of the index where the substring ends - 1.
Deprecate the LastIndexOf method of StringStruct
2018-08-25 20:37:40 +02:00
Magnus Norddahl
7b886cc434
- implement a few more opcodes and fix some bugs
2018-08-25 13:38:45 +02:00
Magnus Norddahl
f84028eeae
- implemented pow, min, max
2018-08-24 23:17:35 +02:00
Magnus Norddahl
53943c4dd2
Merge remote-tracking branch 'gzdoom/master' into asmjit
2018-08-24 23:16:50 +02:00
Rachael Alexanderson
a99b71e19a
- disable survey code, 3.5.0's is over
2018-08-23 15:09:40 -04:00
Magnus Norddahl
eb9d2b54f3
Merge remote-tracking branch 'gzdoom/master' into asmjit
2018-08-23 18:20:23 +02:00
Magnus Norddahl
01ea329cd4
- only render visual portals if they are front facing
2018-08-23 18:19:53 +02:00
argv-minus-one
1d930b45cf
Add ZScript method LevelLocals.SphericalCoords
.
...
It computes spherical coordinates from one point in the world to another. Useful for checking whether one actor is inside another actor's view cone.
2018-08-21 08:22:16 +02:00
Magnus Norddahl
17813e4b3e
- implement ATAN2 and FLOP
2018-08-20 01:40:37 +02:00
Christopher Bruns
03fa1a12cb
Avoid overriding vr eye-specific buffer binding during 2D rendering.
2018-08-20 00:59:52 +02:00
Magnus Norddahl
38fa25d0c5
- implement DYNCAST*, TEST, TESTN and JMP opcodes
2018-08-20 00:44:48 +02:00
Christoph Oelckers
fad406c4c9
- got rid of FNameNoInit and made the default constructor of FName non-initializing.
...
This setup has been a constant source of problems so now I reviewed all uses of FName to make sure that everything that needs to be initialized is done manually.
This also merges the player_t constructor into the class definition as default values.
2018-08-19 08:19:19 +02:00
Magnus Norddahl
302d753d17
- convert JitCompile's switch into a class to enable easier code reuse
2018-08-19 01:46:56 +02:00
Magnus Norddahl
c17be9eb21
- fix clang compile error
2018-08-18 22:46:18 +02:00
Magnus Norddahl
3453f05f06
- implement throwing by storing exception information in a struct, then return from the jitted function and throw from c++
2018-08-18 22:41:18 +02:00
Jonathan Russell
d983ae66c7
- removed the ability to use printf-like formatting in emitAbortExceptionCall, it barely worked
2018-08-18 20:37:55 +01:00
Jonathan Russell
6424190cbf
- add first draft of abort exceptions
2018-08-18 18:03:18 +01:00
Magnus Norddahl
c89d8bb9bb
- call play sqrt when calculating lengths
2018-08-18 18:41:35 +02:00
Magnus Norddahl
b159b5667a
- fix 8 and 16 bit store
2018-08-18 18:21:52 +02:00
Magnus Norddahl
e557e8fac0
- destroy the jit runtime when all script functions are destroyed
2018-08-18 17:50:47 +02:00
alexey.lysiuk
34f2d8f310
- fixed typo in error message
2018-08-18 17:45:26 +03:00
alexey.lysiuk
12b8510574
- cleaned up inconsistent leading whitespaces
...
Bump copyright year as well
2018-08-18 16:05:33 +03:00
alexey.lysiuk
31bd7cfc04
- prohibit assignment of dynamic arrays
...
https://forum.zdoom.org/viewtopic.php?t=61682
2018-08-18 15:20:38 +03:00
Magnus Norddahl
9d68d43ce7
- disable all unimplemented opcodes in the switch to ensure 'Unknown VM opcode' fatal error is generated if CanJit has a bug
2018-08-18 13:18:52 +02:00
Magnus Norddahl
68b2cd58d8
Fix compile errors on macOS
2018-08-18 12:37:33 +02:00
alexey.lysiuk
d965c9aa76
- support static const arrays inside structs
...
https://forum.zdoom.org/viewtopic.php?t=61677
2018-08-18 13:00:33 +03:00
Jonathan Russell
6a40e092fe
- added remaining int arithmetic opcodes (and fixed float loading offset issue)
2018-08-17 22:06:12 +01:00
Marisa Kirisame
20b6db30d7
Added missing check for HITOWNER on bouncers with 0 damage.
2018-08-17 21:39:41 +02:00
Jonathan Russell
758ee5cbfb
- forgot to turn off debug switch in last commit
2018-08-17 19:15:27 +01:00
Jonathan Russell
08c0ac541f
- made absMaskInt const
2018-08-17 19:14:31 +01:00
Jonathan Russell
d137b3c94e
- implemented CMP_APPROX for OP_EQF_*, making ~== work for doubles
2018-08-17 19:08:19 +01:00
Marisa Kirisame
155afebb65
Add HITOWNER flag, when set, allows a projectile to collide with its shooter.
2018-08-17 19:47:12 +02:00
Chronos Ouroboros
079391e5ac
Updated CanJit's supported opcodes list.
2018-08-16 21:45:04 +02:00
Chronos Ouroboros
a8ce626708
Pointer addition opcodes must leave NULL pointers as they are.
2018-08-16 21:45:04 +02:00
Marisa Kirisame
02926a5567
Add "IsFinal" parameter for CheckReplacement.
...
If set to true it guarantees that the replacement is final and will not go through the rest of the replacement chain.
2018-08-16 21:44:21 +02:00
Marisa Kirisame
4e690b1f60
Fix SDL window "sticking" to the center of the screen after using vid_setsize.
2018-08-15 21:03:07 +02:00
Marisa Kirisame
e18b17217f
Added CheckReplacement to event handlers, a function inspired by its namesake in Unreal's Mutator class.
...
Performs runtime replacement of actor classes.
Takes priority over the "replaces" keyword in both DECORATE and ZScript.
2018-08-15 19:31:09 +02:00
Chronos Ouroboros
591783087d
Changed binary int ops to use a temporary register, fixed some opcodes.
...
For some reason, binary ops might reuse one of the input registers as the output register.
This is a problem for very obvious reasons.
2018-08-14 20:08:04 -03:00
Jonathan Russell
dc03cb7a80
- made CMP_CHECK checking compile time
2018-08-14 20:50:32 +01:00
Christoph Oelckers
96ec6b1dc6
- fixed FS camera for real.
2018-08-14 21:12:50 +02:00
Jonathan Russell
740415246e
- added exact floating point comparison opcodes
2018-08-14 18:32:17 +01:00
Jonathan Russell
167693f102
- implemented all integer comparison operators
2018-08-14 15:07:09 +01:00
Jonathan Russell
b30df47499
- adds OP_EQ_R, the first instruction using jumps
2018-08-14 13:02:56 +01:00
Magnus Norddahl
0ced612d2c
- add misc float opcodes
2018-08-14 01:07:30 +02:00
Jonathan Russell
cdb5a9d91e
- added most vector maths opcodes
2018-08-13 21:36:55 +01:00
Christoph Oelckers
57ed4df85e
- fixed FraggleScript's moving camera.
...
The logic here was a bit more complicated than I assumed but it was all buried in a heap of code that tried to deal with angular wraparounds in the BAM format.
2018-08-13 20:48:27 +02:00
Christoph Oelckers
c33f358894
- clear GLWF_TRANSLUCENT at the end of PutWall.
2018-08-13 20:48:27 +02:00
Chronos Ouroboros
cb28bbc72e
Fix floats and implement some more opcodes.
2018-08-13 13:07:36 -03:00
Magnus Norddahl
83d769f55c
- copy initial register values from the VM frame
2018-08-13 00:15:42 +02:00
argv-minus-one
a10f9526bc
Bump ZScript version to 3.5.0.
...
When GZDoom 3.5.0 was released, the ZScript version in the release commit was set to 3.5.0, but on master it was left at 3.4.0.
In the future, I suggest setting the ZScript version *before* making a release commit. Then master will remain up to date.
2018-08-12 10:01:27 +02:00
alexey.lysiuk
b6ff468aaf
- creation of dither texture no longer affects active unit
...
Red checkerboard was rendered upon startup instead of
* the first saved game's thumbnail
* the first game frame
2018-08-12 10:55:24 +03:00
Magnus Norddahl
7108fd6228
- implement most of the integer math opcodes
2018-08-12 04:34:57 +02:00
Magnus Norddahl
cbb945d8a7
- embed and use asmjit to JIT ZScript VM functions
2018-08-12 02:11:13 +02:00
Christoph Oelckers
19a5a2fd2b
- fixed dither math.
2018-08-11 09:27:35 +02:00
Rachael Alexanderson
ecdc485e05
- Allow specifying monitor bits-per-channel for dithering output. Not all displays are created equal, so this option is actually important for specifying the exact amount for your display.
2018-08-09 15:13:26 -04:00
Magnus Norddahl
d121fa21bf
- add gl_dither for toggling dithered output on and off
2018-08-08 21:58:23 +02:00
Christoph Oelckers
863b9fff8a
Make dither texture data constant
2018-08-08 08:43:46 +02:00
Rachael Alexanderson
24e2c3a611
- replace dither texture with a hand pre-calculated table)
2018-08-07 20:47:17 -04:00
Magnus Norddahl
31addbc859
- use a texture for the dither matrix
2018-08-08 00:54:12 +02:00
Marisa Kirisame
51b57cebb1
Additional blocking-related flags for Actor.LineTrace()
2018-08-05 09:42:40 -04:00
Marisa Kirisame
a2f7d36dc3
Fix model rendering only using interpolated yaw. Pitch and roll are now also interpolated.
2018-08-05 09:40:01 -04:00
Magnus Norddahl
48c83d36b5
- add post processing support to the software renderer and softpoly
2018-08-04 14:58:55 +02:00
David Carlier
1e11ce3bee
Texture data overlap occuring here, using memmove instead.
2018-08-04 09:21:55 +03:00
alexey.lysiuk
9d2b7e560b
- fixed compilation warning reported by MSVC
...
src\r_data\models\models_ue1.cpp(103): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data
2018-08-03 16:29:13 +03:00
alexey.lysiuk
eeec943cc0
- bump version number
2018-08-03 16:27:37 +03:00
Rachael Alexanderson
bd1e484c1e
- redo the menu a bit, add in some C++ support code to make it a little bit more flexible
...
- further tweaks. reduce clutter in custom resolution submenu by moving it to another
- add 'prevmenu' ccmd
2018-08-02 07:37:07 -04:00