Skip to content

Commit 34c3c3e

Browse files
End-User-PersonEnd UserPiKeyArMainMemorydependabot[bot]
authored
GC Attach Rework (#241)
* WIP GCAttach adjustments for accuracy purposes * GC Models: Fixed bugs related to vertex/opaque mesh/transparent mesh label generation; WIP additions for struct compatibility. * Added WIP label generation for GC vertex position/normal/color/UV data and GC mesh parameter/primitive data. * GC Models: Adjusted generated labels for GC data, added more struct information * Converted all instances of BinaryWriter to use GetBytes where applicable, GCPrimitive is still WIP. * More WIP changes to GC model generation. Primitive generation is still broken with certain flag types. * Added 32-byte alignment to generated GC primitive data, fixed general primitive generation, primitive size calculation is still WIP. * Fixed primitive size generation for GC models, proper level chunks are still WIP. * Temporary fix for GC primitive lengths; now the value is pulled from existing data as it is read. Adjusted struct generation. * VMSEditor: Hack to dump PDATA from VMS upload files * VMSEditor: More UI tweaks * GameConfig: Add Lost World metadata to SADXPC * GameConfig: Add todo, update some items for SADXPC * SplitTools: Some workarounds for texlists that use uninitialized data * GameConfig: Add figure texlists to SADX X360 * Adding SAToolsInstaller. * Bump System.Net.Http from 4.3.0 to 4.3.4 in /SAToolsInstaller Bumps System.Net.Http from 4.3.0 to 4.3.4. --- updated-dependencies: - dependency-name: System.Net.Http dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Bump System.Text.Encodings.Web from 4.7.1 to 4.7.2 in /SAToolsInstaller Bumps [System.Text.Encodings.Web](https://github.com/dotnet/corefx) from 4.7.1 to 4.7.2. - [Release notes](https://github.com/dotnet/corefx/releases) - [Commits](https://github.com/dotnet/corefx/commits) --- updated-dependencies: - dependency-name: System.Text.Encodings.Web dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Bump System.Text.RegularExpressions in /SAToolsInstaller Bumps System.Text.RegularExpressions from 4.3.0 to 4.3.1. --- updated-dependencies: - dependency-name: System.Text.RegularExpressions dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * GameConfig, SA2ObjectDefinitions: Started updating SA2 PC objdefs; added support for Chao Boxes and some more skyboxes. * SAToolsInstaller: Replace AnyCPU with x86, update packages * SAToolsUpdater: Change configuration * Fixing objdefs for Pumpkin Hill and Wild Canyon. * SALVL: Object List Editor updated to check if objdefs file exists and prompt to create if the file doesn't exist. Also fixed objdef generation so duplicates should no longer appear. * GameConfig: Fixed SALVL crashes when attempting to view Tails vs. Eggman 2, Mission Street 2P, and Sonic vs. Shadow 2; added boss and Chao stages to project mode. * sa2lvl.ini formatting. * DataToolbox: Account for dup, dum and cut file extensions in NJA export * VMSEditor: Added lowercase conversion for Chao names * GameConfig: Added STG00 texlist (X360) * VMSEditor: Update Chao Editor UI, add more data * VMSEditor: Add Garden Save support and Chao Race record editor * SAToolsInstaller: Remove invalid references (?) * SAModel, SAEditorCommon: Add NJA-friendly landtable export, support for .dup and .dum NJAs * SADXSndSharp: Do not sort DAT entries on export * SALVL: Added support for editing GC materials. * Added "pathtag" to split for splitting single PathData. Added unused paths found for Emerald Coast, Lost World, and Final Egg to their GameConfig. * PLTool, SAEditorCommon: Fix opening files with less than 3 characters in the filename * Fix BigEndian nj/gj for SOA and PSO once and for all * SAToolsHub: Config Schema dev tool added. * SADXPC: Windy Valley metadata added. * SADXPC: Fogtable and Act item names updated. * SADXPC: Metadata added for Twinkle Park. * SADXPC: Speed Highway metadata mostly added. Some textures not added. * SADXPC: Red Mountain metadata added. Updated todo. * SADXPC: Sky Chase metadata added. * SADXPC: Icecap Metadata added. * SADXPC: Casinopolis metadata added. todo list updated. * SADXPC: Final Egg Metadata added. * SADXPC: Hot Shelter Metadata added. * SADXPC: ADC00_DLL updated with better descriptions for people models. todo list updated. * SADXPC: ADV02_DLL Model Metadata updated. todo list updated. * SADXPC: Past Model Metadata added. todo updated. * SADXPC: ADV0100 metadata added. todo list updated. * SADXPC: ADV0130_DLL model metadata added. todo updated. * SADXPC: Chaos boss fights updated (Animation common names, remaining keys using filenames updated). todo updated. * Added SA1 Tikal WeldList entry. * Split: Fixed missing . in dllexport split for animations * GameConfig: Added dummy INI files to allow SA2 PC character models to appear in SAMDL Project Mode's model list, sorted DLL split operations to be near their corresponding EXE split counterparts. * SAMDL: Add filter textbox to model select dialog * VMSEditor: Fix error reading Chao names from Upload Data * VMSEdtor: Updated VMI and Garden saving * VMS Editor: Add support for reading and writing DCI files * SplitTools: Added SAMDL meta support for NJS_MOTION and NJS_MOTION array (maybe?) * SAMDL: Reselect node after editing materials and model data * GameConfig: Fix MR Garden in SA1DC config for SALVL * DataToolbox: Resizable window * GameConfig: Added physics data to SA1DC * SplitEvent/SplitMiniEvent: Added custom output folder support; reworked how information is written during SplitEvent's command line process. * SA Tools Hub: Added "SA2 Cutscenes" project template for SA2PC; added compatibility with SplitEvent and SplitMiniEvent for project generation. * ArchiveTool: Fix ARCX usage description * SAModel: Add a method to relink parents for NJS_OBJECT * SAMDL, SAEditorCommon: Fix model hierarchy glitch after using Model Data Editor * SAMDL: Remove the Sibling pointer in nodes whose sibling is being deleted * SplitEvent: Fixed an error related to label generation for upgrade models; added the ability to extract internal texlist data; reworked label generation for mech parts and unknown model pointers. * SplitMiniEvent: Reworked codebase for ease of readability; added character flag data and Ninja Camera extraction support. * Added "SplitEventExtra" program to extract data found in the companion files used for SA2 cutscenes. * Replace all ICO files with standard format icons * Update resource files with icons * Updated SADXPC todo list. * Fixed formatting errors in SADXPC config files. * Disable ConfigSchemaBuilder in SA Tools Hub. Needs save feature and more bug testing. * GameConfig: Some additions/fixes for SADXPC * GameConfig: Some SADXPC updates * SAModel.Direct3D: Default material is semi-transparent * GameConfig: Update SADXPC split with some metadata * Adding Render option to SALVL. * SplitEvent: Added split compatibility to texture animation and reflection info in cutscenes; reworked how texture sizes are generated. * SplitEventExtra and SplitMiniEventExtra: Fixed several inconsistencies with generated data. * SplitEventExtra: Adjusted filename detection to apply the proper split operations. * SplitEvent: Added NJS_CAMERA split compatibility to DC and GC versions; all cutscene data should should be split now. * GameConfig: Added several missing texture assignments to SA2 PC split assets. * SplitEvent and SplitMiniEvent: Incorporated split capabilities from SplitEventExtra and SplitMiniEventExtra into their respective main program files; adjusted both to natively accommodate special cases. * GameConfig: Added more missing texture assignments to SA2 PC split data. * Removed SplitEventExtra program. * SplitTools: Further work on labels for NJS_MOTION, NJS_ACTION and LandTable * SlitTools: Move label data to a separate .cs file * SplitTools, SAMDL, SALVL: Add/update model and landtable label import and export * SAModel: Don't set landtable animation list name if the list is empty * SALVL, SAMDL: Clean up dialogs for labels * SplitTools: Some close and null checks for Label objects * DataToolbox: Add Label Tool * SAToolsHub: Added all cutscene-related file types to "PC - SA2 Cutscenes" project template; minor adjustments in the codebase to better distinguish between SA2 cutscene file versions. * SAModel, SplitTools: Move the texlist/texture filename hack to split * GameConfig: Update some animations, Speed Highway object definitions from Jesus_PK * ToolHub: Allow to set Category * ToolHub - GB ItemType: Use "Mod" instead of a list. * Updating ModInfo. Added ModID textbox and ModID Generation in Edit Project panel. New Projects will auto generate a mod ID using the game prefix and the project name. * SplitTools: Added compatibility for building the extra files for SA2 events and mini-events; splitEvent and buildEvent programs can be used universally for all cutscene files; started reworking SplitMiniEvent's code to clean up the file rebuild process. * SAModel: Added OptimizeShape check to remove duplicate shape keys exclusively for extracted SA2 cutscene shape motions. * SAEditorCommon: Cancelling model import in a death zone sets the default box * SALVL, SAMDL, SA2EventViewer: Remove the WndProc hook * CAMItem updated to reflect current information on Cameras. Editor values updated to make modification easier. PointHelper updated to use the proper translation methods. * Forgot to include the Klamath camera in ones that can display the Direct Position Point. * Fixed YZ Rotation handle models for consistency. TransformGizmo updated to properly reflect the camera orientation for Translations and Scaling. * SplitTools: Fixed an error with BuildEvent that prevented filename detection from working properly. * GameConfig, SA2ObjectDefinitions: Added project mode support for (most) common SA2 PC objects; restructured objdefs for container objects & adjusted name consistency. * Forgot to delete the old dash panel file, whoops. * Split: Removed references to splitMiniEvent; added its functionality to classes that use splitEvent * GameConfig: Added descriptions to most split categories found in various project files. * SplitEvent: Minor adjustments done to SplitEvent; improved file type detection to minimize errors with SplitEventExtra operations. * SplitEvent: Fixed an error with rebuilding screen effects; adjusted more information for the particles section. * SA2 Event Viewer: Added "Overall/Cutscene Frames" counter; adjusted formatting detection to read certain beta cutscenes. * SplitEvent: Adjusted format detection to read more of the unused SA2B beta cutscenes. * SA2CutsceneTextEditor: Adjusted format detection to fix an error when reading SA2: The Trial and SA2 Preview cutscene text files. * .NET 7.0 test * TextureEditor: Line endings for TextureInfo.cs * VRSharp: Add palette bank support * TextureEditor: Use VrSharp palettization * Revert ".NET 7.0 test" This reverts commit 67534bf. * Revert "Revert ".NET 7.0 test"" This reverts commit 704a463. * VrSharp: Set Target OS to Windows * SAToolsInstaller: Update to download .NET 7.0 instead of 5.0 * Update nugets * SA2 Event Tools: Several minor adjustments. +Cleaner checks implemented to discern between SA2 event formats. +Renamed certain data types found in SplitEvent and SplitEventExtra for further clarity. +It is now possible to build the compressed effect files for events if the original file isn't present in the same directory as its split information. * SplitEventExtra: Fixed some alignment issues for the build process. * Fix RingGroup * Whitespace * Update appveyor * GC Models: Fixed bugs related to vertex/opaque mesh/transparent mesh label generation; WIP additions for struct compatibility. * GC Models: Adjusted generated labels for GC data, added more struct information * Converted all instances of BinaryWriter to use GetBytes where applicable, GCPrimitive is still WIP. * Added 32-byte alignment to generated GC primitive data, fixed general primitive generation, primitive size calculation is still WIP. * Updated branch. * Added framework for GC NJA support. * General GC updates: * Added C struct generation to GC models * Removed some unused attributes from GC Material Editor * SA Tools Hub: Fixed errors related to C++ struct generation for "battlelandtable" and "motiontable" DLL types. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: End User <[email protected]> Co-authored-by: PiKeyAr <[email protected]> Co-authored-by: MainMemory <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: calephelis <[email protected]> Co-authored-by: ItsEasyActually <[email protected]> Co-authored-by: Shadow <[email protected]> Co-authored-by: Sora <[email protected]> Co-authored-by: SarahKirksey <[email protected]>
1 parent 21fc6a5 commit 34c3c3e

18 files changed

+3434
-888
lines changed

Libraries/SAEditorCommon/ModBuilding/DLLModGen.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public static class DLLModGen
2020
{
2121
static readonly Dictionary<string, string> typemap = new Dictionary<string, string>() {
2222
{ "landtable", "LandTable *" },
23+
{ "battlelandtable", "LandTable *" },
2324
{ "landtablearray", "LandTable **" },
2425
{ "model", "NJS_OBJECT *" },
2526
{ "modelarray", "NJS_OBJECT **" },
@@ -42,7 +43,8 @@ public static class DLLModGen
4243
{ "gcattacharray", "SA2B_Model **" },
4344
{ "texlist", "NJS_TEXLIST *" },
4445
{ "texlistarray", "NJS_TEXLIST **" },
45-
{ "animindexlist", "AnimationIndex *" }
46+
{ "animindexlist", "AnimationIndex *" },
47+
{ "motiontable", "MotionTable *" }
4648
};
4749

4850
private static void CheckItems(DllDataItemInfo item, DllIniData iniData, ref Dictionary<string, bool> defaultExportState)
@@ -397,6 +399,7 @@ public static void ExportCPP(DllIniData IniData,
397399
switch (item.Value.Type)
398400
{
399401
case "landtable":
402+
case "battlelandtable":
400403
LandTable tbl = LandTable.LoadFromFile(item.Key);
401404
texlists.Add(tbl.Name, tbl.TextureList);
402405
tbl.ToStructVariables(writer, landfmt, new List<string>());

Libraries/SAEditorCommon/UI/GCMaterialEditor.Designer.cs

+577-642
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Libraries/SAEditorCommon/UI/GCMaterialEditor.cs

+1-15
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,12 @@ private void SetControls(int index)
8080
// setting general
8181
diffuseColorBox.BackColor = materials[index].DiffuseColor;
8282
alphaDiffuseNumeric.Value = materials[index].DiffuseColor.A;
83-
if(textures != null && materials[index].TextureID < textures.Length) textureBox.Image = DrawPreviewImage(textures[materials[index].TextureID].Image);
83+
if (textures != null && materials[index].TextureID < textures.Length) textureBox.Image = DrawPreviewImage(textures[materials[index].TextureID].Image);
8484
filterModeDropDown.SelectedIndex = (int)materials[index].FilterMode;
8585
srcAlphaCombo.SelectedIndex = (int)materials[index].SourceAlpha;
8686
dstAlphaCombo.SelectedIndex = (int)materials[index].DestinationAlpha;
8787

8888
// setting flags
89-
pickStatusCheck.Checked = materials[index].PickStatus;
90-
superSampleCheck.Checked = materials[index].SuperSample;
9189
clampUCheck.Checked = materials[index].ClampU;
9290
clampVCheck.Checked = materials[index].ClampV;
9391
flipUCheck.Checked = materials[index].FlipU;
@@ -225,18 +223,6 @@ private void alphaDiffuseNumeric_ValueChanged(object sender, EventArgs e)
225223

226224
#region Flag Check Event Methods
227225

228-
private void pickStatusCheck_Click(object sender, EventArgs e)
229-
{
230-
materials[comboMaterial.SelectedIndex].PickStatus = pickStatusCheck.Checked;
231-
RaiseFormUpdated();
232-
}
233-
234-
private void superSampleCheck_Click(object sender, EventArgs e)
235-
{
236-
materials[comboMaterial.SelectedIndex].SuperSample = superSampleCheck.Checked;
237-
RaiseFormUpdated();
238-
}
239-
240226
private void clampUCheck_Click(object sender, EventArgs e)
241227
{
242228
materials[comboMaterial.SelectedIndex].ClampU = clampUCheck.Checked;

Libraries/SAEditorCommon/UI/GCModelDataEditor.Designer.cs

+592
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)