Commit graph

375 commits

Author SHA1 Message Date
Areloch 21123bdc2f Merge pull request #2237 from JeffProgrammer/codeinterpreter_cleanup
Small Cleanup to CodeInterpreter
2018-04-30 22:52:12 -05:00
Areloch 287586469e Merge pull request #2242 from JeffProgrammer/ts_thisoptimization_hotfix
Interpreter Hotfix: Check for NULL on the thisObject before using it.
2018-04-30 22:51:52 -05:00
Azaezel 13334b4d5c Merge branch 'development' of https://github.com/GarageGames/Torque3D into memberMess
# Conflicts:
#	Engine/source/sfx/sfxSystem.cpp
2018-04-23 10:08:14 -05:00
Lukas Joergensen 6ebb05749e Don't automatically register objects, allow for modifications to the intial fields before register. This is necessary in order to set the fields before initialization such as TorqueScript does 2018-04-21 12:04:15 +02:00
Lukas Joergensen 870ee9fb5b Integrate new CInterface into the engine-console 2018-04-21 12:04:15 +02:00
Lukas Joergensen 2fe623b761 Pass structs by value, not by reference, in EngineAPI. This simplifies call-layout through EngineAPI 2018-04-21 09:23:38 +02:00
Lukas Joergensen 780e1dc73f Use FixedTuple in EngineTrampoline, to make memory-layout consistent 2018-04-21 09:22:12 +02:00
Lukas Joergensen fb412ff108 Add Type information for Properties in EngineXMLExport 2018-04-21 09:08:44 +02:00
Lukas Joergensen c1a234cae6 Fix EngineAPI xml generation, utilizing fixed_tuple for default args 2018-04-21 09:08:38 +02:00
Lukas Joergensen b0be06c33d Add initPersistFields to mPropertyTable 2018-04-21 09:03:04 +02:00
Lukas Joergensen 7d91d0a577 Eliminate ConsoleFunction and ConsoleMethod, replace with DefineEngineStringlyVariadic 2018-04-20 22:09:58 +02:00
Lukas Joergensen 6b524ae58a Eliminate ConsoleStaticMethod 2018-04-20 20:27:09 +02:00
Lukas Joergensen 2bbc716db6 Eliminate unnecessary uses of ConsoleFunction 2018-04-17 21:41:29 +02:00
Lukas Joergensen 6be736ff85 Eliminate DefineConsoleStaticMethod 2018-04-17 21:03:16 +02:00
Lukas Joergensen 76908eae3c Eliminate DefineConsoleMethod 2018-04-17 21:01:50 +02:00
Lukas Joergensen e718841467 Eliminate DefineConsoleFunction 2018-04-17 20:54:08 +02:00
Areloch bc1b506205 Merge pull request #2146 from Azaezel/specializationShenanigans
changes find, swap, for_each, and delete_pointer from global to t3d namespace
2018-04-17 03:02:03 -05:00
Jeff Hutchinson c6ec1f8d86 Added better script interpreter logging. 2018-04-14 10:59:09 -04:00
Jeff Hutchinson c75eecbf53 fix this pointer in op_callfunc_this 2018-04-12 23:14:57 -04:00
Jeff Hutchinson 12134ceb2b Check for NULL on the thisObject before using it. Also cleanup break to goto. 2018-04-10 22:21:40 -04:00
Jeff Hutchinson 5d8b367de8 Remove unused variables and cleanup precision warnings as dSprintf takes a U32 for the size of the buffer to use. 2018-04-02 23:38:17 -04:00
Glenn Smith b486ab73bd CodeBlock::getFunctionArgs used the wrong offsets 2018-03-30 02:28:04 -04:00
Glenn Smith 0ebd75604d Badly sized buffer in dumpConsoleClasses 2018-03-30 02:27:43 -04:00
Areloch ec4043604e Remove a now-unneeded fix for offsetof on new versions of Visual Studio. 2018-03-29 00:44:10 -05:00
Areloch 918509d59a Merge pull request #2225 from Azaezel/defineDistaste
stop linux/mac  undefined MSVC versioncheck spam.
2018-03-28 21:38:40 -05:00
Glenn Smith 18dee487f9 Use a circular buffer for getReturnBuffer because StringStack's would get clobbered too quickly 2018-03-28 20:55:09 -04:00
Glenn Smith 593680fb3f Move StringStack methods into the cpp file 2018-03-28 20:52:10 -04:00
Azaezel cbce2ee805 Merge branch 'development' of https://github.com/GarageGames/Torque3D into memberMess
# Conflicts:
#	Engine/source/console/consoleFunctions.cpp
2018-03-28 15:42:34 -05:00
Azaezel 04d767ab9b stop linux/mac undefined MSVC versioncheck spam. 2018-03-19 16:18:57 -05:00
Azaezel cd28a786b4 stop linux/mac undefined MSVC versioncheck spam. 2018-03-18 18:51:10 -05:00
Azaezel 9b8c950701 console membervar cleanup 2018-03-16 20:05:47 -05:00
Azaezel e80b66464e ast shadowvar cleanup 2018-03-16 20:04:14 -05:00
Azaezel 5282b37d9f shadowvar cleanup 2018-03-16 11:13:26 -05:00
Azaezel 46ac677906 local 'duplicates' of scratchbuffer global shifted to varBuffer 2018-03-15 15:36:38 -05:00
Azaezel f36826605f simobject, dictionary, stringtable, and taml clarificationsand cleanups 2018-03-13 17:30:33 -05:00
Azaezel 3c97471630 substitution statements conformed to standard class:mVar standard 2018-03-13 17:27:24 -05:00
Azaezel 2369645a5a simset::objectList to simset::mObjectList 2018-03-12 03:58:19 -05:00
Azaezel 2e7d406860 variable naming cleanup due to locals overriding in multiple places. objectname to mObjectName+ getName() refs in dictionary. 2018-03-12 02:36:52 -05:00
Glenn Smith 47d5b6ead7 As suggested, extract strlen calls from sizes into variables so it isn't called twice 2018-03-08 20:59:40 -05:00
Glenn Smith eab086e184 A buffer overflow in enumerateConsoleClassesByCategory 2018-03-08 00:51:52 -05:00
Glenn Smith d9a723d533 More cats and cpys in files that xcode doesn't see 2018-03-07 01:13:56 -05:00
Glenn Smith e6e97e660c Missed a couple +1s here and there 2018-03-07 00:44:46 -05:00
Glenn Smith c4533b4dc4 Actual buffer overflow bug found because of these fixes 2018-03-06 02:35:46 -05:00
Glenn Smith 79c34c68db Use strncpy instead of strcpy because again, buffer overflows 2018-03-06 02:35:33 -05:00
Glenn Smith 7769da9434 Use strncat instead of strcat to prevent some buffer overflows 2018-03-06 00:48:44 -05:00
Areloch 6497ea5c76 Merge branch 'development' into issue_2115 2018-02-14 01:43:34 -06:00
Areloch 897174f5ea Merge pull request #2159 from Azaezel/veryValid
exposes getters for typevalidators.
2018-02-14 01:40:42 -06:00
Areloch 7e00785b6e Merge branch 'development' into NetworkedFields 2018-02-14 00:11:32 -06:00
Marc Chapman 9d01f7a973 Remove nested CLASSDOC Macro 2018-02-05 23:02:02 +00:00
Bloodknight 20eefee3cd Merge branch 'development' into issue_2115 2018-02-05 15:59:33 +00:00
Jeff Hutchinson abc01fd377 Fix Torque3D 64bit DSOs.
Fix from Torque2D for 64bit string table entries.
2018-02-03 00:32:22 -05:00
Marc Chapman 0c65f9ee8e Phase 1: Add a #define test 2018-01-23 20:24:35 +00:00
Azaezel 3bc15057ed exposes getters for typevalidators.
example usage

FRangeValidator gravCoefFValidator(-10.f, 10.f);
   addFieldV( "gravityCoefficient", TYPEID< F32 >(), Offset(gravityCoefficient, ParticleData), &gravCoefFValidator,
      "Strength of gravity on the particles." ); <- clamps gravity within a -10 to 10 range when evaluating scriptt-set changes

mClamp(gravityCoefficient,gravCoefFValidator.getMin(),gravCoefFValidator.getMax()) for any calculations done on the source side would do the same at the point that is called, with a singularl lookup spot for the range.
2018-01-16 14:14:57 -06:00
Areloch 402ce9b251 Adds a new function for defining static console fields on NetObjects - addNetworkedField()
This lets you attach a 32 bit netMask to the field, so that when it is changed, it automatically flags the associated bitmasks on the netobject as dirty.

This is to shortcut having to flag certain masks being marked as dirty through protected fields and just simplify/streamline the code.
2018-01-16 00:47:53 -06:00
Azaezel 01f0d5cfca tAlgorythm fed namespace T3D for better library interoperability. resulted in the need to specify usage in... a few places. 2017-12-27 22:57:47 -06:00
Lukas Joergensen ae6b035f10 Improve console dump with additional information, such as array sizes and variadic function 2017-12-08 20:50:44 +01:00
Jeff Hutchinson d7287914c7 fix arg corruption on functioncall compilation. 2017-11-12 14:21:49 -05:00
Jeff Hutchinson c7e12d3be7 roll back changes to simFieldDictionary as it doesn't want to play nice and causing corruption 2017-11-12 13:39:14 -05:00
Areloch d666322a1b Merging 2017-11-05 22:33:32 -06:00
Areloch e023cf3a60 Merge pull request #2056 from Bloodknight/afx_merge_main
Afx merge main
2017-10-11 08:47:47 -05:00
Areloch 629a25185d Updates the VariableInspector, VariableGroup and VariableField objects to actually be useful. In addition to the original functionality of being able to have a var name passed in and search for all vars with that in it, it also lets you build out a completely custom Inspector.
Unlike the regular Inspector, which requires a specific object or objects, from which the fields are pulled from, this lets you manually create fields, which can tie into any given object and their fields, global vars, and also not only supports the engine types for fields, but also triggers a callback to script if a field type is not found allowing fully custom fields to be handled as needed.
2017-09-21 02:49:36 -05:00
Areloch 29edbd0cd2 Hotfix to make VS2017 15.3 play nice. Offsetof behavior - specifically buildin - is unreliable(and broken in debug), so explicitly defining it to use a reliable method for now. 2017-08-18 23:28:25 -05:00
rextimmy d617a1f748 Support for VS 15.3 update 2017-08-15 21:39:22 +10:00
Marc Chapman 8436dff732 enhanced-field-mgmt -- Enhancements to dynamic field handling that allow for name filtering and replacement limiting 2017-07-26 21:49:45 +01:00
Marc Chapman 39b62b1461 copy-on-reload -- The datablock copy op, ":" is modified to copy on reload as well as on creation.
reload-reset -- adds virtual method that is called when a datablock is reloaded.
2017-07-26 21:40:27 +01:00
Marc Chapman f9f05f154f datablock-temp-clone -- Implements creation of temporary datablock clones to allow late substitution of datablock fields. 2017-07-26 21:10:43 +01:00
Marc Chapman 0b84fccdd2 substitutions -- Implementation of special substitution statements on datablock fields. 2017-07-26 20:18:27 +01:00
Areloch 8c807485b1 Reworks the $Core::commonShaderPath variable usage to be a static variable in ShaderGen for efficiency(only one getVariable when shadergen is initialized), as well as implements the ability to set a default value, and ensures that it tries to set a path even if the pref variable is missing which is important for ported projects from older builds. 2017-07-24 00:40:27 -05:00
Areloch 0946950fa0 #if cleanup for the VS2017 workaround 2017-07-07 02:12:43 -05:00
Areloch 94f37daa52 Merge pull request #2030 from Areloch/2017TemplateFix
VS2017 compiler workaround
2017-07-05 22:29:23 -05:00
Areloch f1921c26dd Works around the regressive behavior in the VSC++ compiler for VS2017 where the variadic templates would not compile correctly. Issue should be patched in future versions, so for now it'll target the 1910 version specifically. 2017-06-28 23:58:56 -05:00
Areloch 25686ed4be Implementation of sRGB image support. Overhauls the linearization setup to utilize the sRGB image types, as well as refactors the use of ColorF and ColorI to be properly internally consistent. ColorIs are used only for front-facing/editing/UI settings, and ColorFs, now renamed to LinearColorF to reduce confusion of purpose, are used for color info in the engine itself. This avoids confusing and expensive conversions back and forth between types and avoids botches with linearity. Majority work done by @rextimmy 2017-06-23 11:36:20 -05:00
Areloch 2b8532f679 Merge pull request #2004 from Areloch/PragmaPack
Ups the #pragma pack call from 4 to 8 when using 64bit
2017-06-10 01:40:53 -05:00
Areloch d4d78ea5e4 Merge pull request #2008 from Areloch/ConsoleDumpAllocationFix
Console Classes dump allocation fix
2017-05-31 02:30:50 -05:00
Areloch c0f314101d Use the more stable method of checking the string by using the strlen call. 2017-05-31 02:27:28 -05:00
Areloch c05d49058f Cleans up a redundant include. 2017-05-15 01:02:15 -05:00
Areloch 2c5e70b1c9 Console Classes dump fix. It was running aground on having a case where there was a empty value for the 'usage' field in the class header. This would break the allocation because we're allocating nothing. This rejects it if the usage field is an empty string. 2017-05-14 17:51:13 -05:00
Areloch 431f121e35 ups the #pragma pack call from 4 to 8 when using 64bit, as per suggested settings. This shaves off a lot of compatibility warnings. 2017-05-08 19:13:10 -05:00
Phillip Khandeliants 959701208b Fixed V547: Bad C-string comparsion
This comparison of a string to an empty is meaningless, since in fact two pointers will be compared and the expression will always be false.
2017-04-27 12:03:44 +03:00
Areloch 124ecb2fe0 Merge pull request #1984 from FooBarbarians/fix-1912
Reordering initialization methods #1912
2017-04-26 01:11:51 -05:00
Masquara 15f67015d3 Reordering initialization methods #1912 2017-04-19 14:02:45 -04:00
Areloch 214aae7277 Removed the unneeded PPC And Altivec elements, and removed the LOCBUILD flag 2017-04-09 23:26:35 -05:00
Areloch bf229a9c0b Missed a bit. Readded an accidental removal, and cleaned up an extraneous endif 2017-04-08 21:06:47 -05:00
Areloch ed14b6fced Removes bits of code and includes that are based on old 360, xbox and PS3 flags that are no longer needed. 2017-04-08 20:30:57 -05:00
Thomas "elfprince13" Dickerson 849a1c1eb1 merged numerous changes from upstream 2017-03-03 21:17:07 -05:00
Thomas Dickerson 6963d35145 Merge branch 'development' into stringTableEmptyString 2017-01-24 12:35:34 -05:00
Areloch 713c93d328 Merge branch 'splashAndWindowIcons' of https://github.com/Areloch/Torque3D into development 2017-01-15 23:37:06 -06:00
Areloch 0c6174b045 Merge pull request #1920 from elfprince13/variadicConsoleTemplates
Variadic console templates
2017-01-12 23:32:03 -06:00
Thomas "elfprince13" Dickerson 27e2871b01 Replaced StringTable->insert("") with StringTable->EmptyString() 2017-01-11 23:36:04 -05:00
Thomas "elfprince13" Dickerson bcc5459818 whitespace 2017-01-11 23:34:46 -05:00
Thomas "elfprince13" Dickerson 332c06ae82 Replaced StringTable->insert("") with StringTable->EmptyString() 2017-01-11 23:21:29 -05:00
Thomas "elfprince13" Dickerson d64e2a7019 Removed constexpr use to support VS2013 2017-01-10 23:22:05 -05:00
Thomas "elfprince13" Dickerson 6bbb05e60e Removed constexpr use to support VS2013 2017-01-10 23:20:48 -05:00
Thomas "elfprince13" Dickerson 1c2b096a72 Whitespace consistency 2017-01-06 23:10:14 -05:00
Thomas "elfprince13" Dickerson 45ae5e71cb fixed lots of tabs and space 2017-01-06 18:04:28 -05:00
Thomas "elfprince13" Dickerson 1048b7d535 finished variadic conversion 2017-01-06 17:19:43 -05:00
Thomas "elfprince13" Dickerson 39bea37fa0 minor fixes, and converted the type table 2017-01-06 17:19:36 -05:00
Thomas "elfprince13" Dickerson 500383591c TSShapeConstruct commands converted 2017-01-06 17:19:27 -05:00
Thomas "elfprince13" Dickerson b215bfb933 executef converted 2017-01-06 17:19:16 -05:00
Thomas "elfprince13" Dickerson 62e3fae060 so many variadics. 2017-01-06 17:19:08 -05:00