Commit graph

15113 commits

Author SHA1 Message Date
Magnus Norddahl
b92e5fbf2a - move EmitRESULT to jit_call 2018-09-13 02:56:02 +02:00
Magnus Norddahl
fad8c9c7b4 - minor cleanups in header file 2018-09-13 02:38:51 +02:00
Magnus Norddahl
ef170883ef - split JitCompiler into multiple files 2018-09-13 02:29:04 +02:00
Magnus Norddahl
567a069df5
Merge pull request #569 from Gutawer/asmjit
Added strings and a few string opcodes
2018-09-13 00:58:44 +02:00
Jonathan Russell
b8bdc3b4c8 - added strings and a few string opcodes 2018-09-12 23:56:04 +01:00
Magnus Norddahl
afc3c6b562 - fix CALL_K and disable CALL 2018-09-12 21:58:31 +02:00
Magnus Norddahl
ced793b791 - implement OP_CALL and OP_CALL_K 2018-09-12 01:37:30 +02:00
Magnus Norddahl
981950fef0 - fix misc integer opcodes and remove mov statements when they have no effect 2018-09-11 23:31:32 +02:00
Magnus Norddahl
5fab45d275
Merge pull request #568 from Gutawer/asmjit
Changed the way EmitComparisonOpcode works to get rid of the temporary register that was used previously
2018-09-11 23:08:36 +02:00
Jonathan Russell
4d3c496121 - changed the way EmitComparisonOpcode works to get rid of the temporary register that was used previously 2018-09-11 21:48:02 +01:00
Magnus Norddahl
4d1cb258d6 - implement PARAM and PARAMI 2018-09-11 17:08:51 +02:00
Magnus Norddahl
6f55c76f05 - fix missing zero extend 2018-09-09 23:21:47 +02:00
Magnus Norddahl
4076ce791b - fix that the code for META and CLSS was swapped 2018-09-09 22:42:59 +02:00
Magnus Norddahl
19442732d4 - some jump fixes 2018-09-09 22:03:57 +02:00
Magnus Norddahl
b40cbfb22e - fix jump direction in EmitComparisonOpcode 2018-09-09 20:35:37 +02:00
Magnus Norddahl
773907d81e
Merge pull request #563 from Gutawer/asmjit
Add vector comparison opcodes
2018-09-03 00:48:24 +02:00
Jonathan Russell
eeb4419bc4 - more spelling mistakes... 2018-09-02 23:47:22 +01:00
Jonathan Russell
fdf17a5d8e - fix minor spelling error 2018-09-02 23:45:32 +01:00
Jonathan Russell
28f2311108 - add vector comparison opcodes 2018-09-02 23:44:25 +01:00
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
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
Rachael Alexanderson
7c4dd9408d - update french language translation from Tapwave 2018-08-31 18:01:51 -04: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
Rachael Alexanderson
e428f6948e - add menu sliders for vr_ipd and vr_screendist 2018-08-29 19:13:44 -04: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