Commit graph

4011 commits

Author SHA1 Message Date
AzaezelX aa02e48c8d add safeties for enum math across define boundaries 2023-04-26 22:27:35 -05:00
bank 93cea86312
Fix buffer overflow in GuiTreeViewCtrl class.
When calculating test length (in method `GuiTreeViewCtrl::Item::getDisplayTextLength()`)
the code doesn't take into account the `ItemState::Marked`, which
adds additional char in `GuiTreeViewCtrl::Item::getDisplayText()` method.

This commit fixes warning printed into console when calling `dSprintf()`
as the buffer is now enough to fit all data.
2023-04-24 13:41:19 +03:00
AtomicWalrus c64c2212ad Fix for MacOS OGL 4.1 support
Workaround: MacOS does not have access to glClipControl.

Because the lower range of the 32F buffer is not available using this workaround, the improvements to depth behavior from depth reversal will be limited on MacOS. Behavior is equivalent to reversed depth on a 24UINT buffer; Better than stock, but not dramatically.
2023-04-15 15:21:49 -06:00
AtomicWalrus 75625dc679 Reverse depth & 32F buffer format
-Adds reversed depth projection model, dramatically increasing depth buffer effective resolution.
-Adds 32F depth 8U stencil format GFXFormatD32FS8X24 (following DX naming conventions). Note this is a 64-bit format, and likely not suitable for mobile platforms. Revert to GFXFormatD24S8 in renderManager.tscript for mobile & "ancient" platforms.
-Corrects alignment of texture type details array.
2023-04-14 20:13:28 -06:00
Brian Roberts 26adb11e49
Merge pull request #1008 from Azaezel/alpha41/timeTrouble
fileModifiedTime cleanups
2023-04-11 18:29:28 -05:00
AzaezelX 4c86d4d699 fileModifiedTime cleanups
leverage more windows-specific commands for  _CopyStatAttributes to among other things account for timezones when comparing vs the getTimeStamp() command
2023-04-08 21:05:24 -05:00
Brian Roberts 43b38bb8fb
Merge pull request #1007 from Azaezel/alpha41/miscFixes08-04-2023
misc warn fixes
2023-04-08 14:19:35 -05:00
AzaezelX a956264bbc misc warn fixes
parser had a few spots where it was throwing int compares to ints instead of bools for logical and/ors. not bitwise ones.
_dumpDirectories had a stray itterator dupe
2023-04-08 12:39:09 -05:00
Lukas Aldershaab 0550eb3109 Cleanup 2023-04-08 01:02:23 +02:00
Lukas Aldershaab be4f3e7f1b Prevent tests from never ending due to threading bug 2023-04-08 00:50:57 +02:00
Lukas Aldershaab 1d28ddf734 Cleanup and improve 2023-04-06 15:28:09 +02:00
Brian Roberts 7c67c2c326
Merge pull request #1003 from Azaezel/alpha41/safeLandings
address #96
2023-04-01 10:55:49 -05:00
AzaezelX 1fb4f57f6e adress #96 2023-03-30 14:19:50 -05:00
Brian Roberts 5c8be2bea5
Merge pull request #1001 from Azaezel/alpha41/springString
shift setWheelSpring script command to use a char*, not a  wheeledvehicleSpring*
2023-03-28 16:46:18 -05:00
AzaezelX 5d94728f58 confine pathshape callbacks to server 2023-03-26 22:08:55 -05:00
AzaezelX 0174cb215a report setWheelTire misfires like we do setWheelSpring 2023-03-26 11:54:46 -05:00
AzaezelX 416a35b2b9 shift setWheelSpring script command to use a char*, not a wheeledvehicle*
need to be able to tell what the attempted assignment is for reporting
2023-03-26 09:47:31 -05:00
Areloch b4f62a8005 Adds console methods to GuiInspectorField to ensure we can set the special edit variable name, type and callbacks for proper editor integration of script-managed types.
Adds default value for mVariableType to prevent bad data causing a crash.
2023-03-25 13:56:30 -05:00
Areloch a62024a677 Fixes the handling for special edit fields in the inspector to properly hook into the field's docs display 2023-03-21 19:48:25 -05:00
Brian Roberts 81bf7fc538
Merge pull request #996 from Azaezel/alpha41/furtherFontFixes
cut control chars for font population
2023-03-18 15:03:37 -05:00
Areloch 2f40b843d4 Adds expanded ability to create and insert specialized script-based inspector fields
Adds logic during the editor script initialization to let game modules have embedded tools
Changed setting to force prompt for target modules when creating things like datablocks to minimize confusion about where they save to
2023-03-18 02:22:47 -05:00
AzaezelX fd02044d20 cut control chars for font population
zip referenceablilty for font files
2023-03-17 23:02:27 -05:00
Brian Roberts bb44fa4bb7
Merge pull request #995 from Azaezel/alpha41/profileAugs
guiprofiles augs
2023-03-17 22:39:47 -05:00
AzaezelX 73e3b44e12 guiprofiles augs
guiprofiles now have additional options: borderSEL and borderERR in keeping with the fillcolor variants. fontColors now also takes an optional ERR entry on the backend, though that remains unleveraged at time of writing.
guiiconbuttonctrl now uses the expanded list in conjunction with renderFilledBorder
asset browser profiles now contain a AssetBrowserProtoProfile that type-profiles derive from for consistency in border selection, highlight, (and down the line error)  colors and border thickness while maintaining type-sepcific border color entries for general display
2023-03-16 17:21:07 -05:00
Brian Roberts 4489ebbf95
Merge pull request #992 from Azaezel/alpha41/methodSig
better callback filtering for getMethodSigs
2023-03-16 00:39:56 -05:00
AzaezelX 25e96b613b better callback filtering for getMethodSigs
add a bool filter to getMethodSigs so it can also return script commands

example code reminder note:

//MainMenuGui.getPrototypeList();
//MainMenuGui.getPrototypeDef("onAdd");
function simObject::getPrototypeList(%this)
{
      %methodArray = %this.getMethodSigs();
      %methodCount = %methodArray.count();
      for (%i=0;%i<%methodCount;%i++)
      {
         %methodDef = getRecord(%methodArray.getValue(%i),0);
         %methodName = strreplace(%methodDef,"::"," ");
         %methodName = getWord(strreplace(%methodName,"("," "),2);
         warn(%methodName);
      }
}

function simObject::getPrototypeDef(%this, %funcName)
{
      %methodArray = %this.getMethodSigs();
      %methodCount = %methodArray.count();
      for (%i=0;%i<%methodCount;%i++)
      {
         %methodDef = %methodArray.getValue(%i);
         %methodName = strreplace(%methodDef,"::"," ");
         %methodName = getWord(strreplace(%methodName,"("," "),2);
         if (%funcName $= %methodName)
            warn(%methodDef);
      }
}
2023-03-15 00:14:20 -05:00
AzaezelX 4a9f8e0709 get node utility methods by request
courtessy Steve_Yorkshire, tim-mgt
2023-03-12 15:19:44 -05:00
Brian Roberts 6cb34ab3e9
Merge pull request #988 from Azaezel/alpha41/getDirectoryList
fix getDirectoryList
2023-03-11 13:24:28 -06:00
AzaezelX 4572a0c774 fix getDirectoryList
used dStrcat (note: not dStrncat, so there the buffer destination size *is* the third var)
2023-03-11 12:48:57 -06:00
Brian Roberts bab419fd65
Merge pull request #986 from Azaezel/alpha41/assetCleanups
Alpha41/asset cleanups
2023-03-09 21:10:22 -06:00
Areloch 14d099ce37 Corrects logic handling the TypeString for the onInspect dynamic field behavior. 2023-03-08 13:01:52 -06:00
AzaezelX 7872f01689 since we do in fact allow arbitrary tack on variables to scriptobject derivatives, and thus tamls, reporting theres a non hardcoded variable entry is actively counterproductive to flexibility.
plus minor format fix
2023-03-07 16:10:46 -06:00
Brian Roberts 9eab4559fd
Merge pull request #984 from Azaezel/alpha41/safeArray
check whether or not mBitmapArrayRects.empty(). not simply if size()
2023-03-07 16:07:24 -06:00
Brian Roberts b257ac3d1e
Merge pull request #979 from mjunix/small-fixes
Small fixes
2023-03-06 19:31:07 -06:00
AzaezelX d6480cb63c check wether or not mBitmapArrayRects.empty(). not simply if size()
(cherry picked from commit fea81a4d57edff9c05bf397a5b21d8422838cc1c)
2023-03-06 15:29:40 -06:00
Johan Mattsson 0cbb4fc8a1
Use bitwise instead of logical OR 2023-03-05 12:14:17 +01:00
Johan Mattsson 5b8bfffdec
Fix operator 2023-03-05 12:12:57 +01:00
Johan Mattsson 70a464b3f4 Fix corruption of file encoding. 2023-03-05 11:56:47 +01:00
Johan Mattsson 77e808cc3a
Use correct calculation for dStrncat 2023-03-05 11:28:23 +01:00
Brian Roberts f1d42d3867
Merge pull request #983 from Areloch/GuiPanelDeGradient
Removes the unnecessary gradient effect from GuiPanel when rendered.
2023-03-04 21:32:49 -06:00
Areloch 197aa9f887 Removes the unnecessary gradient effect from GuiPanel when rendered. Now uses just the fill color like most all other gui controls 2023-03-04 21:26:55 -06:00
Brian Roberts 59ed9ee7b6
Merge pull request #982 from Areloch/OnInspectEditorLogic
Adds logic and handling for Inspected SimObjects to be able to injectnew InspectorGroups and InspectorFields when being inspected for editing.
2023-03-04 20:07:25 -06:00
Areloch 3991019912 Adds logic and handling for Inspected SimObjects to be able to inject new InspectorGroups and InspectorFields when being inspected for editing.
Allows for expanded editing capabilities of existing classes without needing to add static fields to classes
2023-03-04 19:04:44 -06:00
Johan Mattsson 2e1cfe9332
Fix potential index out of bounds 2023-03-04 22:05:43 +01:00
Johan Mattsson 2efd5f0acd
Fix potential index out of bounds 2023-03-04 22:03:17 +01:00
Johan Mattsson 11a9edd263
Release memory 2023-03-04 22:01:36 +01:00
Johan Mattsson e46e744dc7
Release memory 2023-03-04 21:59:17 +01:00
Johan Mattsson 3c0a251f71
Release memory 2023-03-04 21:58:16 +01:00
Johan Mattsson 390be98140
Release memory 2023-03-04 21:55:39 +01:00
Johan Mattsson 18ca6c406a
Prevent memory leak 2023-03-04 21:54:21 +01:00