Commit Graph

55 Commits

Author SHA1 Message Date
Niek Schoemaker
aed7a1e051
Performance optimalizations and refactoring 2023-10-27 21:31:09 +02:00
dexyfex
44878ff70f
Merge pull request #210 from alexguirre/fix-drawables
Auto-calculate drawables blocks size fields
2023-08-21 14:40:50 +10:00
alexguirre
1dd9bc34a2 Auto-calculate drawables blocks size fields
`ShaderGroup.ShaderGroupBlocksSize` (aka `Unknown_30h`) contains the byte size divided by 16 of the ShaderGroup block and its children blocks, when they are packed contiguously in the resource file.

`DrawableBase.DrawableModelsBlocksSize` (aka `Unknown_9Ah`) is similar but with the size of the `DrawableModelsBlock`.

Incorrect values can cause crashes when the model is unloaded.

Discussed here https://discord.com/channels/329138547833700352/329142468102586368/1139264754767122533
2023-08-11 19:30:23 +02:00
Colton Fox
1b074b4389 Correctly calculate BVH item extents 2023-07-28 16:47:11 -04:00
dexy
12750ff595 CacheDat/XML conversion 2022-03-29 23:32:29 +11:00
dexy
8c037e24f0 Use FloatUtil.ToString everywhere possible to preserve exact values 2022-01-31 00:14:44 +11:00
dexy
4e1b31d957 Improved FloatUtil.ToString to use G7 where possible while preserving exact values 2022-01-30 23:52:14 +11:00
dexy
bc14a1fd22 Improved animations game replication and performance 2022-01-28 06:25:41 +11:00
dexy
8d257f6045 Added G9 specifier to FloatUtil.ToString to preserve exact values 2022-01-11 16:45:02 +11:00
Skylumz
0c62a04625 Implemented a lights editor in model viewer 2021-12-29 17:17:31 -05:00
dexy
e18cf990fe Moved entity light hash generation to YmapEntityDef and added Lights array to entity 2021-05-02 04:57:24 +10:00
dexy
a8e212135c OccludeModel and BoxOccluder editing basics 2021-04-30 02:15:23 +10:00
dexy
1f516a87b3 Changed DrawableModels into arrays and added DrawableModelsBlock 2020-03-14 22:23:40 +11:00
dexy
e48503e130 Changed DrawableModel.Geometries to array 2020-03-14 01:30:56 +11:00
dexy
c9b69bd6b7 Update to .net framework 4.8 and new csproj style, moved all CodeWalker project files into subfolder 2020-02-25 02:56:27 +11:00
dexy
5f481bfd6f Fixed BVH generation for BoundComposite 2020-01-27 16:58:53 +11:00
dexy
bd18610dca YLD/XML conversion 2020-01-24 02:55:48 +11:00
dexy
7bc7d9612a YFT/XML conversion progress 2020-01-23 18:36:34 +11:00
dexy
08d60877ee Added default attribute names for XML vectors reading 2020-01-22 02:45:27 +11:00
dexy
e44b2ef095 YFT/XML conversion progress 2020-01-21 03:12:36 +11:00
dexy
bec16ea42d YDR/YDD/XML conversion 2020-01-20 02:08:04 +11:00
dexy
c59047bdee DDS file import code, Texture unknowns research 2020-01-17 04:32:47 +11:00
dexy
2939e76118 YBN/XML conversion 2020-01-16 18:03:24 +11:00
dexy
3f24a234e6 Collisions editing progress 2020-01-13 23:31:27 +11:00
dexy
33dc83c0e0 Collisions editing progress 2020-01-06 22:17:51 +11:00
dexy
d85f5eddb2 Collisions editing beginnings 2020-01-02 00:16:49 +11:00
dexy
ab0e007cfe MLO editing progress 2019-12-28 16:01:09 +11:00
dexy
0aa220e0c2 Improved GameFileCache memory usage 2019-12-11 00:31:56 +11:00
dexy
d5c0bc2477 Collision detection refactoring and improvements 2019-12-10 18:33:45 +11:00
dexy
58d2293358 Collision detection refactoring and improvements 2019-12-09 22:33:36 +11:00
dexy
52f4563680 Change entity culling to use boxes instead of spheres 2019-12-06 22:36:11 +11:00
dexy
9a53c2147b Deferred shading 2019-12-04 00:52:22 +11:00
dexy
89035ef279 Cutscenes classes loading from XML 2019-11-23 03:57:00 +11:00
dexy
7e43271a67 Animations XML conversion 2019-11-14 18:58:20 +11:00
dexy
90142cb6da Peds form beginnings, new MetaNames, updated index field types for Bone, added EBoneFlags 2019-11-06 04:53:20 +11:00
dexy
4834b8c520 Fixed casing issues with MetaNames which probably was causing XML issues. Moved shader param names to new ShaderParamNames enum to preserve casing. Moved meta type names to new MetaTypeName enum to avoid polluting MetaNames. 2019-10-31 17:11:12 +11:00
dexy
8324e1ecda Added InvertTexcoordV option to FbxConverter class 2019-03-21 14:02:59 +11:00
dexy
bc1efebe5c FBX importer v1, fix for YNDs DLC loading, fix for renamed NG encrypted RPFs, RelFile MetaNames addition 2019-03-20 21:21:47 +11:00
dexyfex
08d1cdcdf3 Audio dat progress 2019-03-12 01:13:04 +11:00
dexy
3e2dd89702 Trying to generate hash for LOD lights 2019-01-26 21:00:13 +11:00
dexy
38b9b8fc0a Generate LOD Lights type added 2019-01-21 21:05:32 +11:00
dexy
6d8a785635 XML editing for audioconfig.dat4.rel 2019-01-20 16:54:42 +11:00
dexy
6533d842bc XML to audio dat.rel conversion progress 2019-01-19 14:28:45 +11:00
dexy
35d10a8e48 XML to audio dat.rel conversion progress 2019-01-19 04:31:13 +11:00
dexy
dce5c4d6ab CarColsFile parsing 2019-01-11 18:15:25 +11:00
dexy
0c4001fa4b Improved RenderableCache item invalidation, Added Performance Statistics window 2018-12-05 16:23:34 +11:00
dexyfex
e004a5ad18 Merge remote changes with local 2018-12-03 19:59:06 +11:00
Soloman
462e464c2f Ability to edit YTYP files and MLO Entity Defintions + Revisions to grass brush (#33)
* - Add ability to edit/add ytyp files to project.
- Add ability to edit/add ytyp archetype files to ytyp.
- Add ability to add/remove entities from mlo archetype defs.
- Add ability to save ytyp files.
- Add dialog popup before optimizing grass batches.
- Fix grass batches not being selected when chaning selection in project explorer.
- Merged with upstream/master.
- Squashed last 4 commits for PR cleanliness.

* Fixed windows forms reference error.

* - Added error checking to deleting mlo entities.
- Fixed various bugs with deleting mlo entities.
- Fixed edit archetype panel Asset Type box.
- Removed redundant/unnecessary.
- Removed backwards references between MCEntityDef and YmapEntityDef. All ymap entity to mcentity references are grabbed using indecies in the MloInstanceData class.
- Fixed "YmapMenu" not showing when selecting entities/mlo entities in project form.

Current bugs:
- Loading a ytyp file -- mlo entities are not editiable, and are created in the world.
- entitysets are not editable (properly).
- Removing an mloinstancedef from a ymap does not delete the mlo instance's gizmo from the world, and it's still selectable. (Although all references are lost, and I believe collected by the GC?)

* - Moved archetype initialization methods YmapFile.InitYmapEntityArchetypes(GameFileCache gfc)  and MloInstanceData.InitYmapEntityArchetypes(GameFileCache gfc)
- Added ability to load mlo instance defs through ymap files.
- Fixed add method for mlo archetypes.

* - Removed SetOrientationInv.
- Removed unreachable code + updated comment.
- Renamed CreateEntity to CreateYmapEntity, and renamed params for consistency.

* Split calls to CreateYmapEntity() and MloArchetype.AddEntity().

* Fixed redundant rotation inversions.

* - Added ability to select rooms.
- Changed tree view grouping for mlo entities.
- Fixed projectexplorer selection bugs.
- Added ability to toggle mlo entity sets.
- Fixed some change events when editing archetypes.
2018-12-03 19:54:04 +11:00
dexyfex
3b8b99551e Merge remote changes with local 2018-08-15 09:00:05 +10:00
Soloman N
6bce9acbcd Some revisions to grass brush.
- Made some changes to the way I check for deleting instances.
- Added a new bounding box check for painting grass.
- Made GetNewGrassBounds return a bounding box instead of our parameters
- Added new Expand method to bounding box util
- Added instance radius check and instance brush check to project form for possible future instance types (Props)
- Added grass brush gizmo
- Updated gui for grass instance batch panel
- Fixed bug with GoToPosition (with bounds)
2018-06-10 09:36:50 -04:00