├── .tfignore
├── 3DS
├── Resources
│ ├── jar.png
│ ├── edit.png
│ ├── film.png
│ ├── films.png
│ ├── image.png
│ ├── leaf.png
│ ├── point.png
│ ├── slide.png
│ ├── table.png
│ ├── zone.png
│ ├── image16.png
│ ├── t-shirt.png
│ ├── zone16.png
│ ├── light-bulb.png
│ ├── edit-language.png
│ ├── image-sunset.png
│ ├── images-stack.png
│ ├── t-shirt-gray.png
│ ├── tables-stacks.png
│ ├── weather-cloud.png
│ ├── zones-stack.png
│ ├── weather-clouds.png
│ ├── lighthouse-shine.png
│ └── preview_background.png
├── NintendoWare
│ ├── LYT1
│ │ ├── bnd1.cs
│ │ └── CLAN.cs
│ └── GFX
│ │ └── BoundingVolume.cs
├── UI
│ ├── BCLIMGenDialog.cs
│ ├── ThemeViewerNew.cs
│ ├── CLIMViewer.cs
│ ├── CGFXGenDialog.cs
│ ├── ThemeIconViewer.cs
│ ├── CSTMViewer.cs
│ ├── CFNTViewer.cs
│ ├── SAHTViewer.cs
│ ├── ThemeIconViewer.Designer.cs
│ ├── CLIMViewer.Designer.cs
│ ├── CSTMViewer.Designer.cs
│ └── DARCViewer.cs
├── SARCEFESFSFile.cs
├── GPU
│ └── PICA
│ │ └── FragmentLightSource.cs
├── DVLB.cs
├── Extensions.cs
├── Properties
│ └── AssemblyInfo.cs
├── N3DSPlugin.cs
└── ThemeIconFile.cs
├── Libraries
├── NAudio.dll
├── HashTable.saht
├── Tao.OpenGl.dll
├── Tao.Platform.Windows.dll
└── Microsoft.VisualBasic.PowerPacks.Vs.dll
├── NDS
├── Resources
│ ├── jar.png
│ ├── fruit.png
│ ├── leaf.png
│ ├── node.png
│ ├── point.png
│ ├── molecule.png
│ ├── color-swatch.png
│ ├── fruit-grape.png
│ ├── image-sunset.png
│ ├── images-stack.png
│ ├── lollypopanim.png
│ ├── color-swatches.png
│ └── image-sunset16.png
├── NDSPlugin.cs
├── UI
│ ├── Projects
│ │ ├── BannerTabPage.cs
│ │ └── BannerTabPage.Designer.cs
│ ├── NSBTXViewer.cs
│ ├── NSBTXViewer.Designer.cs
│ ├── NDSProjectDialog.cs
│ ├── TEX0Viewer.cs
│ ├── MDL0Viewer.Designer.cs
│ └── MDL0MaterialEditor.cs
├── NitroSystem
│ ├── SND
│ │ ├── SWAV.cs
│ │ └── SWAR.cs
│ └── G3D
│ │ └── NSBCA.cs
├── SND
│ ├── IMAADPCMConst.cs
│ └── IMAADPCMDecoder.cs
├── Properties
│ └── AssemblyInfo.cs
└── Nitro
│ └── CRC16.cs
├── GCNWii
├── Resources
│ └── image.png
├── UI
│ ├── TPLViewer.cs
│ ├── BTIViewer.cs
│ ├── BTIViewer.Designer.cs
│ ├── TPLViewer.Designer.cs
│ └── U8Viewer.cs
└── Properties
│ └── AssemblyInfo.cs
├── WiiU
├── Resources
│ └── image.png
├── UI
│ ├── FLIMViewer.cs
│ └── FLIMViewer.Designer.cs
└── Properties
│ └── AssemblyInfo.cs
├── MarioKart
├── Resources
│ ├── Cone.png
│ ├── start.png
│ ├── OBJ_2D01.png
│ ├── OBJ_2E01.png
│ ├── OBJ_3501.png
│ ├── OBJ_3801.png
│ ├── OBJ_3A01.png
│ ├── OBJ_3E01.png
│ ├── OBJ_3F01.png
│ ├── OBJ_4901.png
│ ├── OBJ_5901.png
│ ├── OBJ_6500.png
│ ├── OBJ_6700.png
│ ├── OBJ_6800.png
│ ├── OBJ_6B00.png
│ ├── OBJ_6E00.png
│ ├── OBJ_9101.png
│ ├── OBJ_9601.png
│ ├── OBJ_9801.png
│ ├── OBJ_9901.png
│ ├── OBJ_9B01.png
│ ├── OBJ_A401.png
│ ├── OBJ_A501.png
│ ├── OBJ_A601.png
│ ├── OBJ_A701.png
│ ├── OBJ_A801.png
│ ├── OBJ_A901.png
│ ├── OBJ_AC01.png
│ ├── OBJ_AF01.png
│ ├── OBJ_B001.png
│ ├── OBJ_C900.png
│ ├── OBJ_CB00.png
│ ├── OBJ_CD00.png
│ ├── OBJ_CE00.png
│ ├── OBJ_CF00.png
│ └── leaf-brown-pencil.png
├── KCLHeader.cs
├── MK64
│ ├── F3DEX.cs
│ └── MIO0.cs
├── UI
│ ├── MapViewer
│ │ ├── RenderGroup.cs
│ │ ├── MKDSAreaRenderGroup.cs
│ │ ├── MKDSRouteLineRenderGroup.cs
│ │ ├── MKDSCheckPointPoint1RenderGroup.cs
│ │ ├── MKDSCheckPointPoint2RenderGroup.cs
│ │ └── MKDSMiniGameEnemyPointLineRenderGroup.cs
│ └── KCLCollisionTypeSelector.cs
├── MarioKartPlugin.cs
├── Properties
│ └── AssemblyInfo.cs
├── MK7
│ └── KMP
│ │ ├── POTI.cs
│ │ ├── ITPT.cs
│ │ ├── ENPT.cs
│ │ ├── GLPT.cs
│ │ ├── KTPT.cs
│ │ ├── JGPT.cs
│ │ ├── ITPH.cs
│ │ ├── CKPT.cs
│ │ ├── CKPH.cs
│ │ └── GLPH.cs
└── MKDS
│ └── NKM
│ ├── PATH.cs
│ ├── MEPO.cs
│ └── IPOI.cs
├── CommonFiles
├── Resources
│ ├── control.png
│ └── control-pause.png
├── Properties
│ └── AssemblyInfo.cs
└── UI
│ └── WavePlayer.cs
├── EveryFileExplorer
├── Resources
│ ├── document.png
│ └── folder-open.png
├── Propeller_Box_Artwork_-_Super_Mario_3D_World.ico
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ └── AssemblyInfo.cs
└── Plugins
│ ├── PluginManager.cs
│ └── Plugin.cs
├── LibEveryFileExplorer
├── Resources
│ ├── folder.png
│ └── folder-open.png
├── Files
│ ├── IEmptyCreatable.cs
│ ├── IFileCreatable.cs
│ ├── IChildReactive.cs
│ ├── IViewable.cs
│ ├── IWriteable.cs
│ ├── IUseOtherFiles.cs
│ ├── IConvertable.cs
│ ├── SimpleFileSystem
│ │ ├── SFSFile.cs
│ │ └── EFESFSFile.cs
│ ├── EFEDiskFile.cs
│ ├── ViewableFile.cs
│ ├── FileFormat.cs
│ └── EFEFile.cs
├── Compression
│ ├── ICompressable.cs
│ └── CompressionFormat.cs
├── IO
│ ├── Serialization
│ │ ├── BinaryAttribute.cs
│ │ ├── BinaryIgnoreAttribute.cs
│ │ ├── BinaryStringEncodingAttribute.cs
│ │ ├── BinaryBOMAttribute.cs
│ │ ├── BinaryStringSignatureAttribute.cs
│ │ ├── BinaryStringNTAttribute.cs
│ │ ├── BinaryByteArraySignatureAttribute.cs
│ │ ├── BinaryFixedSizeAttribute.cs
│ │ ├── BinaryBooleanSizeAttribute.cs
│ │ └── BinaryFixedPointAttribute.cs
│ ├── SignatureNotCorrectException.cs
│ └── EndianBinaryWriterEx.cs
├── EFEPlugin.cs
├── UI
│ ├── MainMenu.cs
│ ├── GameDataSectionViewerBase.cs
│ └── ListViewNF.cs
├── ComponentModel
│ ├── PrettyArrayConverter.cs
│ ├── HexReversedAttribute.cs
│ └── ValueTypeTypeConverter.cs
├── 3D
│ ├── Triangle.cs
│ └── Polygon.cs
├── SND
│ ├── SNDUtil.cs
│ └── DSPADPCM.cs
├── HexUtil.cs
├── Math
│ └── MathUtil.cs
├── GameData
│ └── GameDataSection.cs
├── StaticDynamic.cs
├── Properties
│ └── AssemblyInfo.cs
├── GFX
│ ├── ColorFormat.cs
│ ├── PaletteUtil.cs
│ └── DTX.cs
├── EveryFileExplorerUtil.cs
└── Collections
│ ├── Matrix43.cs
│ └── Matrix33.cs
├── .gitignore
├── README.md
├── CommonCompressors
├── Properties
│ └── AssemblyInfo.cs
└── LZ11.cs
└── LegoPirates
├── Properties
└── AssemblyInfo.cs
└── UI
└── FMVViewer.designer.cs
/.tfignore:
--------------------------------------------------------------------------------
1 | \.git
--------------------------------------------------------------------------------
/3DS/Resources/jar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/jar.png
--------------------------------------------------------------------------------
/Libraries/NAudio.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/Libraries/NAudio.dll
--------------------------------------------------------------------------------
/NDS/Resources/jar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/jar.png
--------------------------------------------------------------------------------
/3DS/Resources/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/edit.png
--------------------------------------------------------------------------------
/3DS/Resources/film.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/film.png
--------------------------------------------------------------------------------
/3DS/Resources/films.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/films.png
--------------------------------------------------------------------------------
/3DS/Resources/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/image.png
--------------------------------------------------------------------------------
/3DS/Resources/leaf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/leaf.png
--------------------------------------------------------------------------------
/3DS/Resources/point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/point.png
--------------------------------------------------------------------------------
/3DS/Resources/slide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/slide.png
--------------------------------------------------------------------------------
/3DS/Resources/table.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/table.png
--------------------------------------------------------------------------------
/3DS/Resources/zone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/zone.png
--------------------------------------------------------------------------------
/NDS/Resources/fruit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/fruit.png
--------------------------------------------------------------------------------
/NDS/Resources/leaf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/leaf.png
--------------------------------------------------------------------------------
/NDS/Resources/node.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/node.png
--------------------------------------------------------------------------------
/NDS/Resources/point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/point.png
--------------------------------------------------------------------------------
/3DS/Resources/image16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/image16.png
--------------------------------------------------------------------------------
/3DS/Resources/t-shirt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/t-shirt.png
--------------------------------------------------------------------------------
/3DS/Resources/zone16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/zone16.png
--------------------------------------------------------------------------------
/GCNWii/Resources/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/GCNWii/Resources/image.png
--------------------------------------------------------------------------------
/Libraries/HashTable.saht:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/Libraries/HashTable.saht
--------------------------------------------------------------------------------
/Libraries/Tao.OpenGl.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/Libraries/Tao.OpenGl.dll
--------------------------------------------------------------------------------
/NDS/Resources/molecule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/molecule.png
--------------------------------------------------------------------------------
/WiiU/Resources/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/WiiU/Resources/image.png
--------------------------------------------------------------------------------
/3DS/Resources/light-bulb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/light-bulb.png
--------------------------------------------------------------------------------
/MarioKart/Resources/Cone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/Cone.png
--------------------------------------------------------------------------------
/3DS/Resources/edit-language.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/edit-language.png
--------------------------------------------------------------------------------
/3DS/Resources/image-sunset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/image-sunset.png
--------------------------------------------------------------------------------
/3DS/Resources/images-stack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/images-stack.png
--------------------------------------------------------------------------------
/3DS/Resources/t-shirt-gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/t-shirt-gray.png
--------------------------------------------------------------------------------
/3DS/Resources/tables-stacks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/tables-stacks.png
--------------------------------------------------------------------------------
/3DS/Resources/weather-cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/weather-cloud.png
--------------------------------------------------------------------------------
/3DS/Resources/zones-stack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/zones-stack.png
--------------------------------------------------------------------------------
/MarioKart/Resources/start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/start.png
--------------------------------------------------------------------------------
/NDS/Resources/color-swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/color-swatch.png
--------------------------------------------------------------------------------
/NDS/Resources/fruit-grape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/fruit-grape.png
--------------------------------------------------------------------------------
/NDS/Resources/image-sunset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/image-sunset.png
--------------------------------------------------------------------------------
/NDS/Resources/images-stack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/images-stack.png
--------------------------------------------------------------------------------
/NDS/Resources/lollypopanim.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/lollypopanim.png
--------------------------------------------------------------------------------
/3DS/Resources/weather-clouds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/weather-clouds.png
--------------------------------------------------------------------------------
/CommonFiles/Resources/control.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/CommonFiles/Resources/control.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_2D01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_2D01.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_2E01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_2E01.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_3501.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_3501.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_3801.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_3801.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_3A01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_3A01.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_3E01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_3E01.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_3F01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_3F01.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_4901.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_4901.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_5901.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_5901.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_6500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_6500.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_6700.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_6700.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_6800.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_6800.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_6B00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_6B00.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_6E00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_6E00.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_9101.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_9101.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_9601.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_9601.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_9801.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_9801.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_9901.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_9901.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_9B01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_9B01.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_A401.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_A401.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_A501.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_A501.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_A601.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_A601.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_A701.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_A701.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_A801.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_A801.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_A901.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_A901.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_AC01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_AC01.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_AF01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_AF01.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_B001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_B001.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_C900.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_C900.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_CB00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_CB00.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_CD00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_CD00.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_CE00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_CE00.png
--------------------------------------------------------------------------------
/MarioKart/Resources/OBJ_CF00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/OBJ_CF00.png
--------------------------------------------------------------------------------
/NDS/Resources/color-swatches.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/color-swatches.png
--------------------------------------------------------------------------------
/NDS/Resources/image-sunset16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/NDS/Resources/image-sunset16.png
--------------------------------------------------------------------------------
/3DS/Resources/lighthouse-shine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/lighthouse-shine.png
--------------------------------------------------------------------------------
/3DS/Resources/preview_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/3DS/Resources/preview_background.png
--------------------------------------------------------------------------------
/Libraries/Tao.Platform.Windows.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/Libraries/Tao.Platform.Windows.dll
--------------------------------------------------------------------------------
/CommonFiles/Resources/control-pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/CommonFiles/Resources/control-pause.png
--------------------------------------------------------------------------------
/EveryFileExplorer/Resources/document.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/EveryFileExplorer/Resources/document.png
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Resources/folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/LibEveryFileExplorer/Resources/folder.png
--------------------------------------------------------------------------------
/MarioKart/Resources/leaf-brown-pencil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/MarioKart/Resources/leaf-brown-pencil.png
--------------------------------------------------------------------------------
/EveryFileExplorer/Resources/folder-open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/EveryFileExplorer/Resources/folder-open.png
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Resources/folder-open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/LibEveryFileExplorer/Resources/folder-open.png
--------------------------------------------------------------------------------
/Libraries/Microsoft.VisualBasic.PowerPacks.Vs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/Libraries/Microsoft.VisualBasic.PowerPacks.Vs.dll
--------------------------------------------------------------------------------
/EveryFileExplorer/Propeller_Box_Artwork_-_Super_Mario_3D_World.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gericom/EveryFileExplorer/HEAD/EveryFileExplorer/Propeller_Box_Artwork_-_Super_Mario_3D_World.ico
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/IEmptyCreatable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Files
7 | {
8 | public interface IEmptyCreatable
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/IFileCreatable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Files
7 | {
8 | public interface IFileCreatable
9 | {
10 | bool CreateFromFile();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/EveryFileExplorer/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/IChildReactive.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Files
7 | {
8 | public interface IChildReactive
9 | {
10 | void OnChildSave(ViewableFile File);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Compression/ICompressable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Compression
7 | {
8 | public interface ICompressable
9 | {
10 | byte[] Compress(byte[] Data);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/IViewable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 |
7 | namespace LibEveryFileExplorer.Files
8 | {
9 | public interface IViewable
10 | {
11 | Form GetDialog();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/IWriteable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Files
7 | {
8 | public interface IWriteable
9 | {
10 | String GetSaveDefaultFileFilter();
11 | byte[] Write();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/IUseOtherFiles.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Files
7 | {
8 | public interface IUseOtherFiles
9 | {
10 | void FileOpened(ViewableFile File);
11 | void FileClosed(ViewableFile File);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/Serialization/BinaryAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.IO.Serialization
7 | {
8 | public abstract class BinaryAttribute : Attribute
9 | {
10 | public abstract Object Value { get; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/IConvertable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Files
7 | {
8 | public interface IConvertable
9 | {
10 | String GetConversionFileFilters();
11 | bool Convert(int FilterIndex, String Path);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/3DS/NintendoWare/LYT1/bnd1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using LibEveryFileExplorer.IO;
7 |
8 | namespace _3DS.NintendoWare.LYT1
9 | {
10 | public class bnd1 : pan1
11 | {
12 | public bnd1(EndianBinaryReader er)
13 | : base(er)
14 | {
15 |
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | Thumbs.db
2 | *.vsp
3 | *.psess
4 | *.obj
5 | *.exe
6 | *.pdb
7 | *.user
8 | *.aps
9 | *.pch
10 | *.vspscc
11 | *_i.c
12 | *_p.c
13 | *.ncb
14 | *.suo
15 | *.sln.docstates
16 | *.tlb
17 | *.tlh
18 | *.bak
19 | *.cache
20 | *.ilk
21 | *.log
22 | [Bb]in
23 | [Dd]ebug*/
24 | *.lib
25 | *.sbr
26 | obj/
27 | [Rr]elease*/
28 | _ReSharper*/
29 | [Tt]est[Rr]esult*
30 | *.vssscc
31 | $tf*/
32 | TestPlugin*/
--------------------------------------------------------------------------------
/3DS/UI/BCLIMGenDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace _3DS.UI
11 | {
12 | public partial class BCLIMGenDialog : Form
13 | {
14 | public BCLIMGenDialog()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/3DS/UI/ThemeViewerNew.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace _3DS.UI
11 | {
12 | public partial class ThemeViewerNew : Form
13 | {
14 | public ThemeViewerNew()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/NDS/NDSPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer;
6 | using LibEveryFileExplorer.Script;
7 | using System.IO;
8 | using CommonFiles;
9 | using LibEveryFileExplorer.IO;
10 |
11 | namespace NDS
12 | {
13 | public class NDSPlugin : EFEPlugin
14 | {
15 | public override void OnLoad()
16 | {
17 |
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/NDS/UI/Projects/BannerTabPage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace NDS.UI.Projects
11 | {
12 | public partial class BannerTabPage : UserControl
13 | {
14 | public BannerTabPage()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/EFEPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer
7 | {
8 | public abstract class EFEPlugin
9 | {
10 | ///
11 | /// Function which is called just after loading all plugins. (so everything is loaded already)
12 | /// Use it for debugging and initialization.
13 | ///
14 | public abstract void OnLoad();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/UI/MainMenu.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.UI
7 | {
8 | public class MainMenu : System.Windows.Forms.MainMenu {
9 | private System.ComponentModel.IContainer iContainer;
10 | public MainMenu(System.ComponentModel.IContainer iContainer)
11 | {
12 | // TODO: Complete member initialization
13 | this.iContainer = iContainer;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/ComponentModel/PrettyArrayConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.ComponentModel;
6 | using System.Globalization;
7 |
8 | namespace LibEveryFileExplorer.ComponentModel
9 | {
10 | public class PrettyArrayConverter : ArrayConverter
11 | {
12 | public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destType)
13 | {
14 | return "";
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/UI/GameDataSectionViewerBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using LibEveryFileExplorer.GameData;
10 |
11 | namespace LibEveryFileExplorer.UI
12 | {
13 | public partial class GameDataSectionViewerBase : UserControl
14 | {
15 | public GameDataSectionViewerBase()
16 | {
17 | InitializeComponent();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/3DS/SARCEFESFSFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Files.SimpleFileSystem;
6 |
7 | namespace _3DS
8 | {
9 | public class SARCEFESFSFile : EFESFSFile
10 | {
11 | public SARCEFESFSFile(SFSFile File)
12 | : base(File) { }
13 |
14 | public override byte[] FindFileRelative(string Path)
15 | {
16 | Path = Path.Replace("\\", "/");
17 | if (Path.TrimStart('/').StartsWith("../")) return null;
18 | return File.Parent.GetFileByID((int)SARC.GetHashFromName(Path, 0x65)).Data;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/GCNWii/UI/TPLViewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace GCNWii.UI
11 | {
12 | public partial class TPLViewer : Form
13 | {
14 | TPL Image;
15 | public TPLViewer(TPL Image)
16 | {
17 | this.Image = Image;
18 | InitializeComponent();
19 | }
20 |
21 | private void CLIMViewer_Load(object sender, EventArgs e)
22 | {
23 | pictureBox1.Image = Image.Textures[0].ToBitmap();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GCNWii/UI/BTIViewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using GCNWii.JSystem;
10 |
11 | namespace GCNWii.UI
12 | {
13 | public partial class BTIViewer : Form
14 | {
15 | BTI Image;
16 | public BTIViewer(BTI Image)
17 | {
18 | this.Image = Image;
19 | InitializeComponent();
20 | }
21 |
22 | private void CLIMViewer_Load(object sender, EventArgs e)
23 | {
24 | pictureBox1.Image = Image.ToBitmap();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/3DS/UI/CLIMViewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using _3DS.NintendoWare.LYT1;
10 |
11 | namespace _3DS.UI
12 | {
13 | public partial class CLIMViewer : Form
14 | {
15 | CLIM Image;
16 | public CLIMViewer(CLIM Image)
17 | {
18 | this.Image = Image;
19 | InitializeComponent();
20 | }
21 |
22 | private void CLIMViewer_Load(object sender, EventArgs e)
23 | {
24 | pictureBox1.Image = Image.ToBitmap();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/WiiU/UI/FLIMViewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using WiiU.NintendoWare.LYT2;
10 |
11 | namespace WiiU.UI
12 | {
13 | public partial class FLIMViewer : Form
14 | {
15 | FLIM Image;
16 | public FLIMViewer(FLIM Image)
17 | {
18 | this.Image = Image;
19 | InitializeComponent();
20 | }
21 |
22 | private void FLIMViewer_Load(object sender, EventArgs e)
23 | {
24 | pictureBox1.Image = Image.ToBitmap();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/Serialization/BinaryIgnoreAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.IO.Serialization
7 | {
8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
9 | public sealed class BinaryIgnoreAttribute : BinaryAttribute
10 | {
11 | readonly bool Ignore;
12 |
13 | public BinaryIgnoreAttribute(bool Ignore = true)
14 | {
15 | this.Ignore = Ignore;
16 | }
17 |
18 | public override object Value
19 | {
20 | get { return Ignore; }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/SimpleFileSystem/SFSFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Files.SimpleFileSystem
7 | {
8 | public class SFSFile
9 | {
10 | public SFSFile(Int32 Id, String Name, SFSDirectory Parent)
11 | {
12 | FileID = Id;
13 | FileName = Name;
14 | this.Parent = Parent;
15 | }
16 | public String FileName;
17 | public Int32 FileID;
18 | public Byte[] Data;
19 |
20 | public SFSDirectory Parent;
21 |
22 | public override string ToString()
23 | {
24 | return Parent.ToString() + FileName;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/Serialization/BinaryStringEncodingAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.IO.Serialization
7 | {
8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
9 | public sealed class BinaryStringEncodingAttribute : BinaryAttribute
10 | {
11 | readonly Encoding Type;
12 |
13 | public BinaryStringEncodingAttribute(Encoding Type)
14 | {
15 | this.Type = Type;
16 | }
17 |
18 | public override object Value
19 | {
20 | get { return Type; }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/3DS/UI/CGFXGenDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace _3DS.UI
11 | {
12 | public partial class CGFXGenDialog : Form
13 | {
14 | public String ModelName;
15 | public CGFXGenDialog()
16 | {
17 | InitializeComponent();
18 | ModelName = textBox1.Text;
19 | }
20 |
21 | private void textBox1_TextChanged(object sender, EventArgs e)
22 | {
23 | ModelName = textBox1.Text;
24 | if (textBox1.Text.Length == 0) button1.Enabled = false;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/ComponentModel/HexReversedAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.ComponentModel
7 | {
8 | [AttributeUsage(AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
9 | public sealed class HexReversedAttribute : Attribute
10 | {
11 | readonly bool hexReversed;
12 |
13 | // This is a positional argument
14 | public HexReversedAttribute(bool hexReversed = true)
15 | {
16 | this.hexReversed = hexReversed;
17 | }
18 |
19 | public bool HexReversed
20 | {
21 | get { return hexReversed; }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/MarioKart/KCLHeader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 |
7 | namespace MarioKart
8 | {
9 | public abstract class KCLHeader
10 | {
11 | public UInt32 VerticesOffset;
12 | public UInt32 NormalsOffset;
13 | public UInt32 PlanesOffset;//-0x10
14 | public UInt32 OctreeOffset;
15 | public Single Unknown1;
16 | public Vector3 OctreeOrigin;
17 | public UInt32 XMask;
18 | public UInt32 YMask;
19 | public UInt32 ZMask;
20 | public UInt32 CoordShift;
21 | public UInt32 YShift;
22 | public UInt32 ZShift;
23 | public Single Unknown2;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/Serialization/BinaryBOMAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.IO.Serialization
7 | {
8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
9 | public sealed class BinaryBOMAttribute : BinaryAttribute
10 | {
11 | readonly uint LittleEndianMark;
12 |
13 | public BinaryBOMAttribute(uint LittleEndianMark)
14 | {
15 | this.LittleEndianMark = LittleEndianMark;
16 | }
17 |
18 | public override object Value
19 | {
20 | get { return LittleEndianMark; }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/Serialization/BinaryStringSignatureAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.IO.Serialization
7 | {
8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
9 | public sealed class BinaryStringSignatureAttribute : BinaryAttribute
10 | {
11 | readonly String Signature;
12 |
13 | public BinaryStringSignatureAttribute(String Signature)
14 | {
15 | this.Signature = Signature;
16 | }
17 |
18 | public override object Value
19 | {
20 | get { return Signature; }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/NDS/UI/NSBTXViewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using NDS.NitroSystem.G3D;
10 |
11 | namespace NDS.UI
12 | {
13 | public partial class NSBTXViewer : Form
14 | {
15 | NSBTX Textures;
16 | public NSBTXViewer(NSBTX Textures)
17 | {
18 | this.Textures = Textures;
19 | InitializeComponent();
20 | Controls.Add(new TEX0Viewer(Textures.TexPlttSet) { Dock = DockStyle.Fill });
21 | }
22 |
23 | private void NSBTXViewer_Load(object sender, EventArgs e)
24 | {
25 |
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/Serialization/BinaryStringNTAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.IO.Serialization
7 | {
8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
9 | public sealed class BinaryStringNTAttribute : BinaryAttribute
10 | {
11 | readonly bool NullTerminated;
12 |
13 | public BinaryStringNTAttribute(bool NullTerminated = true)
14 | {
15 | this.NullTerminated = NullTerminated;
16 | }
17 |
18 | public override object Value
19 | {
20 | get { return NullTerminated; }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/Serialization/BinaryByteArraySignatureAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.IO.Serialization
7 | {
8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
9 | public sealed class BinaryByteArraySignatureAttribute : BinaryAttribute
10 | {
11 | readonly byte[] Signature;
12 |
13 | public BinaryByteArraySignatureAttribute(params byte[] Signature)
14 | {
15 | this.Signature = Signature;
16 | }
17 |
18 | public override object Value
19 | {
20 | get { return Signature; }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Every File Explorer
2 | ===================
3 |
4 | Every File Explorer is a dynamic tool to browse, edit, view, explore and modify files. It is plugin-based, so you can make your own plugins for it aswell!
5 |
6 |
Building
7 | Just open the project in Visual Studio, and build it. You may need to specify the path to the 2 dlls in the Libraries directory. Afterwards, copy them in the Plugins directory aswell. Don't forget to unblock it from external sources!
8 |
9 | Provided Plugins
10 | * 3DS
11 | * Common Compressors
12 | * Common Files
13 | * Lego Pirates of the Carribean
14 | * Mario Kart
15 | * NDS
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/Serialization/BinaryFixedSizeAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.IO.Serialization
7 | {
8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
9 | public sealed class BinaryFixedSizeAttribute : BinaryAttribute
10 | {
11 | readonly int Length;
12 |
13 | public BinaryFixedSizeAttribute(int Length)
14 | {
15 | if (Length <= 0) throw new ArgumentException("Length must be greater than 0!");
16 | this.Length = Length;
17 | }
18 |
19 | public override object Value
20 | {
21 | get { return Length; }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/3DS/UI/ThemeIconViewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace _3DS.UI
11 | {
12 | public partial class ThemeIconViewer : Form
13 | {
14 | ThemeIconFile themeIcon;
15 | public ThemeIconViewer(ThemeIconFile themeIcon)
16 | {
17 | this.themeIcon = themeIcon;
18 | InitializeComponent();
19 | }
20 |
21 | private void ThemeIconViewer_Load_1(object sender, EventArgs e)
22 | {
23 | pictureBox1.Image = themeIcon.getIconTexture();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MarioKart/MK64/F3DEX.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace MarioKart.MK64
7 | {
8 | public class F3DEX
9 | {
10 | public enum F3DEXCommand : byte
11 | {
12 | F3D_SPNOOP = 0x00,
13 | F3D_MTX = 0x01,
14 | F3D_RESERVED0 = 0x02,
15 | F3D_MOVEMEM = 0x03,
16 | F3D_VTX = 0x04,
17 | F3D_RESERVED1 = 0x05,
18 | F3D_DL = 0x06,
19 | F3D_RESERVED2 = 0x07,
20 | F3D_RESERVED3 = 0x08,
21 | F3D_SPRITE2D_BASE = 0x09,
22 |
23 | F3D_MOVEWORD = 0xBC,
24 | G_RDPLOADSYNC = 0xE6,
25 | G_RDPTILESYNC = 0xE8,
26 | G_LOADBLOCK = 0xF3,
27 | G_SETTILESIZE = 0xF4,
28 | G_SETTILE = 0xF5,
29 | G_SETTIMG = 0xFD
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/Serialization/BinaryBooleanSizeAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.IO.Serialization
7 | {
8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
9 | public sealed class BinaryBooleanSizeAttribute : BinaryAttribute
10 | {
11 | readonly BooleanSize Size;
12 |
13 | public BinaryBooleanSizeAttribute(BooleanSize Size)
14 | {
15 | this.Size = Size;
16 | }
17 |
18 | public override object Value
19 | {
20 | get { return Size; }
21 | }
22 | }
23 |
24 | public enum BooleanSize
25 | {
26 | U8,
27 | U16,
28 | U32
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/3D/Triangle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 |
7 | namespace LibEveryFileExplorer._3D
8 | {
9 | public class Triangle
10 | {
11 | public Triangle(Vector3 A, Vector3 B, Vector3 C)
12 | {
13 | PointA = A;
14 | PointB = B;
15 | PointC = C;
16 | }
17 |
18 | public Vector3 PointA { get; set; }
19 | public Vector3 PointB { get; set; }
20 | public Vector3 PointC { get; set; }
21 |
22 | public Vector3 Normal
23 | {
24 | get
25 | {
26 | Vector3 a = (PointB - PointA).Cross(PointC - PointA);
27 | return a / (float)System.Math.Sqrt(a.X * a.X + a.Y * a.Y + a.Z * a.Z);
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/SND/SNDUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.SND
7 | {
8 | public class SNDUtil
9 | {
10 | public static byte[] InterleaveChannels(params Int16[][] Channels)
11 | {
12 | if(Channels.Length == 0) return new byte[0];
13 | byte[] Result = new byte[Channels[0].Length * Channels.Length * 2];
14 | for (int i = 0; i < Channels[0].Length; i++)
15 | {
16 | for (int j = 0; j < Channels.Length; j++)
17 | {
18 | Result[i * 2 * Channels.Length + j * 2] = (byte)(Channels[j][i] & 0xFF);
19 | Result[i * 2 * Channels.Length + j * 2 + 1] = (byte)(Channels[j][i] >> 8);
20 | }
21 | }
22 | return Result;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Compression/CompressionFormat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Compression
7 | {
8 | public interface CompressionFormatBase
9 | {
10 | byte[] Decompress(byte[] Data);
11 | }
12 |
13 | public abstract class CompressionFormat : CompressionFormatBase where T : CompressionFormatIdentifier, new()
14 | {
15 | private static T _identifier = new T();
16 | public static T Identifier { get { return _identifier; } }
17 |
18 | public abstract byte[] Decompress(byte[] Data);
19 | }
20 |
21 | public abstract class CompressionFormatIdentifier
22 | {
23 | public abstract String GetCompressionDescription();
24 | public abstract bool IsFormat(byte[] Data);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/SignatureNotCorrectException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.IO
7 | {
8 | [Serializable]
9 | public class SignatureNotCorrectException : Exception
10 | {
11 | public string BadSignature { get; private set; }
12 | public string CorrectSignature { get; private set; }
13 | public long Offset { get; private set; }
14 | public SignatureNotCorrectException(string BadSignature, string CorrectSignature, long Offset)
15 | : base("Signature '" + BadSignature + "' at 0x" + Offset.ToString("X8") + " does not match '" + CorrectSignature + "'.")
16 | {
17 | this.BadSignature = BadSignature;
18 | this.CorrectSignature = CorrectSignature;
19 | this.Offset = Offset;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/NDS/NitroSystem/SND/SWAV.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.IO;
6 | using LibEveryFileExplorer.IO.Serialization;
7 | using LibEveryFileExplorer.Files;
8 |
9 | namespace NDS.NitroSystem.SND
10 | {
11 | public class SWAV : FileFormat//, IViewable
12 | {
13 | public SWAVHeader Header;
14 | public class SWAVHeader
15 | {
16 | public SWAVHeader(EndianBinaryReaderEx er)
17 | {
18 | er.ReadObject(this);
19 | }
20 | [BinaryStringSignature("SWAV")]
21 | [BinaryFixedSize(4)]
22 | public String Signature;
23 | [BinaryBOM(0xFFFE)]
24 | public UInt16 Endianness;
25 | public UInt16 Version;
26 | public UInt32 FileSize;
27 | public UInt16 HeaderSize;
28 | public UInt16 NrBlocks;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/3DS/UI/CSTMViewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using _3DS.NintendoWare.SND;
10 |
11 | namespace _3DS.UI
12 | {
13 | public partial class CSTMViewer : Form
14 | {
15 | CSTM Stream;
16 |
17 | public CSTMViewer(CSTM Stream)
18 | {
19 | this.Stream = Stream;
20 | InitializeComponent();
21 | }
22 |
23 | private void CSTMViewer_FormClosed(object sender, FormClosedEventArgs e)
24 | {
25 | wavePlayer1.Stop();
26 | }
27 |
28 | private void CSTMViewer_Load(object sender, EventArgs e)
29 | {
30 | //Not in the constructor, because it will cause problems when creating a bcstm
31 | wavePlayer1.SetWavFile(Stream.ToWave());
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/3DS/UI/CFNTViewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using _3DS.NintendoWare.FONT;
10 | using LibEveryFileExplorer.GFX;
11 |
12 | namespace _3DS.UI
13 | {
14 | public partial class CFNTViewer : Form
15 | {
16 | CFNT Font;
17 | BitmapFont f;
18 | public CFNTViewer(CFNT Font)
19 | {
20 | this.Font = Font;
21 | f = Font.GetBitmapFont();
22 | InitializeComponent();
23 | pictureBox1.Image = f.PrintToBitmap(textBox1.Text, new BitmapFont.FontRenderSettings());
24 | }
25 |
26 | private void textBox1_TextChanged(object sender, EventArgs e)
27 | {
28 | pictureBox1.Image = f.PrintToBitmap(textBox1.Text, new BitmapFont.FontRenderSettings());
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/UI/ListViewNF.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 |
7 | namespace LibEveryFileExplorer.UI
8 | {
9 | public class ListViewNF : System.Windows.Forms.ListView
10 | {
11 | public ListViewNF()
12 | {
13 | //Activate double buffering
14 | this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
15 |
16 | //Enable the OnNotifyMessage event so we get a chance to filter out
17 | // Windows messages before they get to the form's WndProc
18 | this.SetStyle(ControlStyles.EnableNotifyMessage, true);
19 | }
20 |
21 | protected override void OnNotifyMessage(Message m)
22 | {
23 | //Filter out the WM_ERASEBKGND message
24 | if (m.Msg != 0x14)
25 | {
26 | base.OnNotifyMessage(m);
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/MarioKart/UI/MapViewer/RenderGroup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 |
7 | namespace MarioKart.UI.MapViewer
8 | {
9 | public abstract class RenderGroup
10 | {
11 | //public abstract bool Createable { get; }
12 | public abstract bool Interactable { get; }
13 |
14 | public void Render(object[] Selection)
15 | {
16 | Render(Selection, false, -1);
17 | }
18 |
19 | public abstract void Render(object[] Selection, bool Picking, int PickingId);
20 |
21 | public virtual Object GetEntry(int Index) { throw new NotImplementedException(); }
22 |
23 | public virtual Vector3 GetPosition(int Index) { throw new NotImplementedException(); }
24 | public virtual void SetPosition(int Index, Vector3 Position, bool ValidY = false) { throw new NotImplementedException(); }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/3DS/GPU/PICA/FragmentLightSource.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 |
7 | namespace _3DS.GPU.PICA
8 | {
9 | public class FragmentLightSource
10 | {
11 | public Vector4 Ambient = new Vector4(0, 0, 0, 1);
12 | public Vector4 Diffuse = new Vector4(1, 1, 1, 1);//default white for light0, black for others
13 | public Vector4 Specular0 = new Vector4(1, 1, 1, 1);//default white for light0, black for others
14 | public Vector4 Specular1 = new Vector4(1, 1, 1, 1);//default white for light0, black for others
15 | public Vector4 Position = new Vector4(0, 0, 1, 0);
16 | public Vector3 SpotDirection = new Vector3(0, 0, -1);
17 |
18 | public Boolean Shadowed = false;
19 | public Boolean SpotEnabled = false;
20 | public Boolean DistanceAttenuationEnabled = false;
21 | public Boolean TwoSideDiffuse = false;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/3D/Polygon.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 | using System.Drawing;
7 |
8 | namespace LibEveryFileExplorer._3D
9 | {
10 | public class Polygon
11 | {
12 | public PolygonType PolyType;
13 | public Vector3[] Normals;
14 | public Vector2[] TexCoords;
15 | public Vector2[] TexCoords2;
16 | public Vector2[] TexCoords3;
17 | public Vector3[] Vertex;
18 | public Color[] Colors;
19 | public Polygon() { }
20 | public Polygon(PolygonType PolyType, Vector3[] Vertex, Vector3[] Normals, Vector2[] TexCoords, Color[] Colors = null)
21 | {
22 | this.PolyType = PolyType;
23 | this.Normals = Normals;
24 | this.TexCoords = TexCoords;
25 | this.Vertex = Vertex;
26 | this.Colors = Colors;
27 | }
28 | }
29 |
30 | public enum PolygonType
31 | {
32 | Triangle,
33 | Quad,
34 | TriangleStrip,
35 | QuadStrip
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/NDS/SND/IMAADPCMConst.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace NDS.SND
7 | {
8 | public class IMAADPCMConst
9 | {
10 | public static readonly int[] IndexTable =
11 | {
12 | -1, -1, -1, -1, 2, 4, 6, 8,
13 | -1, -1, -1, -1, 2, 4, 6, 8
14 | };
15 |
16 | public static readonly int[] StepTable =
17 | {
18 | 7, 8, 9, 10, 11, 12, 13, 14,
19 | 16, 17, 19, 21, 23, 25, 28,
20 | 31, 34, 37, 41, 45, 50, 55,
21 | 60, 66, 73, 80, 88, 97, 107,
22 | 118, 130, 143, 157, 173, 190, 209,
23 | 230, 253, 279, 307, 337, 371, 408,
24 | 449, 494, 544, 598, 658, 724, 796,
25 | 876, 963, 1060, 1166, 1282, 1411, 1552,
26 | 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327, 3660, 4026,
27 | 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630,
28 | 9493, 10442, 11487, 12635, 13899, 15289, 16818,
29 | 18500, 20350, 22385, 24623, 27086, 29794, 32767
30 | };
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/HexUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer
7 | {
8 | public class HexUtil
9 | {
10 | public static String GetHexReverse(sbyte Value)
11 | {
12 | return (Value & 0xFF).ToString("X2");
13 | }
14 | public static String GetHexReverse(byte Value)
15 | {
16 | return Value.ToString("X2");
17 | }
18 | public static String GetHexReverse(short Value)
19 | {
20 | return BitConverter.ToString(BitConverter.GetBytes(Value)).Replace("-", "");
21 | }
22 | public static String GetHexReverse(ushort Value)
23 | {
24 | return BitConverter.ToString(BitConverter.GetBytes(Value)).Replace("-", "");
25 | }
26 | public static String GetHexReverse(int Value)
27 | {
28 | return BitConverter.ToString(BitConverter.GetBytes(Value)).Replace("-", "");
29 | }
30 | public static String GetHexReverse(uint Value)
31 | {
32 | return BitConverter.ToString(BitConverter.GetBytes(Value)).Replace("-", "");
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Math/MathUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Math
7 | {
8 | public class MathUtil
9 | {
10 | public static int Clamp(int value, int min, int max)
11 | {
12 | if (value < min) value = min;
13 | if (value > max) value = max;
14 | return (short)value;
15 | }
16 |
17 | public static float RadToDeg(float Radians)
18 | {
19 | return Radians * (180f / (float)System.Math.PI);
20 | }
21 |
22 | public static double RadToDeg(double Radians)
23 | {
24 | return Radians * (180.0 / System.Math.PI);
25 | }
26 |
27 | public static float DegToRad(float Degrees)
28 | {
29 | return Degrees * ((float)System.Math.PI / 180f);
30 | }
31 |
32 | public static double DegToRad(double Degrees)
33 | {
34 | return Degrees * (System.Math.PI / 180.0);
35 | }
36 |
37 | public static int GetNearest2Power(float Value)
38 | {
39 | return (int)System.Math.Ceiling(System.Math.Log(Value, 2));
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/3DS/DVLB.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Files;
6 | using System.Drawing;
7 |
8 | namespace _3DS
9 | {
10 | public class DVLB : FileFormat
11 | {
12 | public class DVLBIdentifier : FileFormatIdentifier
13 | {
14 | public override string GetCategory()
15 | {
16 | return Category_Shaders;
17 | }
18 |
19 | public override string GetFileDescription()
20 | {
21 | return "DMP Vertex Linker Binary (DVLB)";
22 | }
23 |
24 | public override string GetFileFilter()
25 | {
26 | return "DMP Vertex Linker Binary (*.shbin)|*.shbin";
27 | }
28 |
29 | public override Bitmap GetIcon()
30 | {
31 | return null;
32 | }
33 |
34 | public override FormatMatch IsFormat(EFEFile File)
35 | {
36 | if (File.Data.Length > 4 && File.Data[0] == 'D' && File.Data[1] == 'V' && File.Data[2] == 'L' && File.Data[3] == 'B') return FormatMatch.Content;
37 | return FormatMatch.No;
38 | }
39 |
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/Serialization/BinaryFixedPointAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.IO.Serialization
7 | {
8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
9 | public sealed class BinaryFixedPointAttribute : BinaryAttribute
10 | {
11 | readonly uint Format;
12 |
13 | public BinaryFixedPointAttribute(bool Sign, int IntPart, int FracPart)
14 | {
15 | if(IntPart < 0 || FracPart < 0) throw new ArgumentException("IntPart and FracPart shoulf be greater or equal to 0!");
16 | if (IntPart + FracPart + (Sign ? 1 : 0) > 64 || IntPart + FracPart + (Sign ? 1 : 0) == 0) throw new ArgumentException("Total number of bits should be greater than 0 and smaller or equal to 64!");
17 | this.Format = (uint)(Sign ? 1 : 0) << 14 | (uint)(IntPart & 0x7F) << 7 | (uint)(FracPart & 0x7F);
18 | }
19 |
20 | public override object Value
21 | {
22 | get { return Format; }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/3DS/NintendoWare/LYT1/CLAN.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Files;
6 | using System.Drawing;
7 |
8 | namespace _3DS.NintendoWare.LYT1
9 | {
10 | public class CLAN : FileFormat
11 | {
12 | public class CLANIdentifier : FileFormatIdentifier
13 | {
14 | public override string GetCategory()
15 | {
16 | return Category_Animations;
17 | }
18 |
19 | public override string GetFileDescription()
20 | {
21 | return "CTR Layout Animation (CLAN)";
22 | }
23 |
24 | public override string GetFileFilter()
25 | {
26 | return "CTR Layout Animation (*.bclan)|*.bclan";
27 | }
28 |
29 | public override Bitmap GetIcon()
30 | {
31 | return null;
32 | }
33 |
34 | public override FormatMatch IsFormat(EFEFile File)
35 | {
36 | if (File.Data.Length > 4 && File.Data[0] == 'C' && File.Data[1] == 'L' && File.Data[2] == 'A' && File.Data[3] == 'N') return FormatMatch.Content;
37 | return FormatMatch.No;
38 | }
39 |
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/NDS/NitroSystem/G3D/NSBCA.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Files;
6 | using System.Drawing;
7 |
8 | namespace NDS.NitroSystem.G3D
9 | {
10 | public class NSBCA : FileFormat
11 | {
12 | public class NSBCAIdentifier : FileFormatIdentifier
13 | {
14 | public override string GetCategory()
15 | {
16 | return Category_Animations;
17 | }
18 |
19 | public override string GetFileDescription()
20 | {
21 | return "Nitro System Binary Character Animation (NSBCA)";
22 | }
23 |
24 | public override string GetFileFilter()
25 | {
26 | return "Nitro System Binary Character Animation (*.nsbca)|*.nsbca";
27 | }
28 |
29 | public override Bitmap GetIcon()
30 | {
31 | return Resource.lollypopanim;
32 | }
33 |
34 | public override FormatMatch IsFormat(EFEFile File)
35 | {
36 | if (File.Data.Length > 4 && File.Data[0] == 'B' && File.Data[1] == 'C' && File.Data[2] == 'A' && File.Data[3] == '0') return FormatMatch.Content;
37 | return FormatMatch.No;
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/EveryFileExplorer/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18063
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace EveryFileExplorer.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/ComponentModel/ValueTypeTypeConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.ComponentModel;
6 | using System.Collections;
7 | using System.Reflection;
8 |
9 | namespace LibEveryFileExplorer.ComponentModel
10 | {
11 | public class ValueTypeTypeConverter : ExpandableObjectConverter
12 | {
13 | public override bool GetCreateInstanceSupported(ITypeDescriptorContext context)
14 | {
15 | return true;
16 | }
17 |
18 | public override object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues)
19 | {
20 | if (propertyValues == null)
21 | throw new ArgumentNullException("propertyValues");
22 |
23 | object boxed = Activator.CreateInstance(context.PropertyDescriptor.PropertyType);
24 | foreach (DictionaryEntry entry in propertyValues)
25 | {
26 | PropertyInfo pi = context.PropertyDescriptor.PropertyType.GetProperty(entry.Key.ToString());
27 | if ((pi != null) && (pi.CanWrite))
28 | {
29 | pi.SetValue(boxed, Convert.ChangeType(entry.Value, pi.PropertyType), null);
30 | }
31 | }
32 | return boxed;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/GameData/GameDataSection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 | using System.IO;
7 | using LibEveryFileExplorer.IO;
8 |
9 | namespace LibEveryFileExplorer.GameData
10 | {
11 | public abstract class GameDataSection where T : GameDataSectionEntry
12 | {
13 | public String Signature;
14 | public UInt32 NrEntries;
15 | public List Entries = new List();
16 |
17 | public abstract String[] GetColumnNames();
18 | public ListViewItem[] GetListViewItems()
19 | {
20 | ListViewItem[] items = new ListViewItem[Entries.Count];
21 | for (int i = 0; i < NrEntries; i++)
22 | {
23 | items[i] = Entries[i].GetListViewItem();
24 | items[i].Text = i.ToString();
25 | }
26 | return items;
27 | }
28 | public T this[int index]
29 | {
30 | get { return Entries[index]; }
31 | set { Entries[index] = value; }
32 | }
33 | }
34 |
35 | public abstract class GameDataSectionEntry
36 | {
37 | public virtual void Write(EndianBinaryWriter er)
38 | {
39 | throw new NotImplementedException();
40 | }
41 |
42 | public abstract ListViewItem GetListViewItem();
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/StaticDynamic.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Dynamic;
6 | using System.Reflection;
7 |
8 | namespace LibEveryFileExplorer
9 | {
10 | public class StaticDynamic : DynamicObject
11 | {
12 | private Type _type;
13 | public StaticDynamic(Type type) { _type = type; }
14 |
15 | // Handle static properties
16 | public override bool TryGetMember(GetMemberBinder binder, out object result)
17 | {
18 | PropertyInfo prop = _type.GetProperty(binder.Name, BindingFlags.FlattenHierarchy | BindingFlags.Static | BindingFlags.Public);
19 | if (prop == null)
20 | {
21 | result = null;
22 | return false;
23 | }
24 |
25 | result = prop.GetValue(null, null);
26 | return true;
27 | }
28 |
29 | // Handle static methods
30 | public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
31 | {
32 | MethodInfo method = _type.GetMethod(binder.Name, BindingFlags.FlattenHierarchy | BindingFlags.Static | BindingFlags.Public);
33 | if (method == null)
34 | {
35 | result = null;
36 | return false;
37 | }
38 |
39 | result = method.Invoke(null, args);
40 | return true;
41 | }
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/MarioKart/MarioKartPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer;
6 | using LibEveryFileExplorer.Script;
7 | using System.IO;
8 | using CommonFiles;
9 | using LibEveryFileExplorer.IO;
10 |
11 | namespace MarioKart
12 | {
13 | public class MarioKartPlugin : EFEPlugin
14 | {
15 | public override void OnLoad()
16 | {
17 | EFEScript.RegisterCommand("MarioKart.MKDS.KCL.Generate", (Action>)MarioKart_MKDS_KCL_Generate);
18 | }
19 |
20 | public static void MarioKart_MKDS_KCL_Generate(String OBJPath, String OutPath, Dictionary TypeMapping)
21 | {
22 | MKDS.KCL k = new MKDS.KCL();
23 | OBJ o = new OBJ(File.ReadAllBytes(OBJPath));
24 | List matnames = new List();
25 | foreach (var v in o.Faces) if (!matnames.Contains(v.Material)) matnames.Add(v.Material);
26 | Dictionary Colli = new Dictionary();
27 | foreach (string s in matnames)
28 | {
29 | if (!TypeMapping.ContainsKey(s)) TypeMapping.Add(s, 0);
30 | Colli.Add(s, true);
31 | }
32 | k.FromOBJ(o, TypeMapping, Colli);
33 | File.Create(OutPath).Close();
34 | File.WriteAllBytes(OutPath, k.Write());
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/EveryFileExplorer/Plugins/PluginManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using System.Windows.Forms;
7 | using System.Reflection;
8 |
9 | namespace EveryFileExplorer.Plugins
10 | {
11 | public class PluginManager
12 | {
13 | public Plugin[] Plugins { get; private set; }
14 | public PluginManager()
15 | {
16 | string[] d = Directory.GetFiles(Path.GetDirectoryName(Application.ExecutablePath) + "\\Plugins\\", "*.dll", SearchOption.TopDirectoryOnly);
17 | List p = new List();
18 | foreach (var s in d)
19 | {
20 | try
21 | {
22 | AssemblyName.GetAssemblyName(s);
23 | }
24 | catch (BadImageFormatException)
25 | {
26 | continue;//This is not a .net assembly
27 | }
28 | Assembly ass = null;
29 | try
30 | {
31 | ass = Assembly.LoadFile(s);
32 | }
33 | catch (NotSupportedException e)
34 | {
35 | MessageBox.Show("Unblock " + AssemblyName.GetAssemblyName(s) + " from external sources!");
36 | }
37 | if (Plugin.IsPlugin(ass)) p.Add(new Plugin(ass));
38 | }
39 | Plugins = p.ToArray();
40 | foreach (var v in Plugins)
41 | {
42 | if (v.Initializer != null) v.Initializer.OnLoad();
43 | }
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/NDS/UI/Projects/BannerTabPage.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace NDS.UI.Projects
2 | {
3 | partial class BannerTabPage
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.SuspendLayout();
32 | //
33 | // BannerTabPage
34 | //
35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37 | this.Name = "BannerTabPage";
38 | this.Size = new System.Drawing.Size(348, 342);
39 | this.ResumeLayout(false);
40 |
41 | }
42 |
43 | #endregion
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/MarioKart/MK64/MIO0.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.IO;
6 |
7 | namespace MarioKart.MK64
8 | {
9 | public class MIO0
10 | {
11 | public static byte[] Decompress(byte[] Compressed)
12 | {
13 | if (Compressed[0] != 'M' || Compressed[1] != 'I' || Compressed[2] != 'O' || Compressed[3] != '0') return null;
14 | uint OutputSize = IOUtil.ReadU32BE(Compressed, 4);
15 | byte[] Result = new byte[OutputSize];
16 | uint CompOffs = IOUtil.ReadU32BE(Compressed, 8);
17 | uint RawOffs = IOUtil.ReadU32BE(Compressed, 12);
18 | uint HeaderOffs = 16;
19 | uint OutOffs = 0;
20 | while (true)
21 | {
22 | byte header = Compressed[HeaderOffs++];
23 | for (int i = 0; i < 8; i++)
24 | {
25 | if ((header & 0x80) != 0) Result[OutOffs++] = Compressed[RawOffs++];
26 | else
27 | {
28 | ushort data = IOUtil.ReadU16BE(Compressed, (int)CompOffs);
29 | CompOffs += 2;
30 | int offs = (data & 0xFFF) + 1;
31 | int length = (data >> 12) + 3;
32 | for (int j = 0; j < length; j++)
33 | {
34 | Result[OutOffs] = Result[OutOffs - offs];
35 | OutOffs++;
36 | }
37 | }
38 | if (OutOffs >= OutputSize) return Result;
39 | header <<= 1;
40 | }
41 | }
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/EFEDiskFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace LibEveryFileExplorer.Files
8 | {
9 | public class EFEDiskFile : EFEFile
10 | {
11 | public EFEDiskFile()
12 | {
13 | Name = "Untitled";
14 | Data = new byte[0];
15 | }
16 |
17 | public EFEDiskFile(String Path)
18 | {
19 | if (!File.Exists(Path)) throw new ArgumentException("File doesn't exist!");
20 | this.Path = Path;
21 | Name = System.IO.Path.GetFileName(Path);
22 | PrepareDataForUse(File.ReadAllBytes(Path));
23 | }
24 |
25 | public String Path { get; set; }
26 |
27 | public override void Save()
28 | {
29 | byte[] Data = GetDataForSave();
30 | File.Create(Path).Close();
31 | File.WriteAllBytes(Path, Data);
32 | }
33 |
34 | public override byte[] FindFileRelative(string Path)
35 | {
36 | Path = Path.Replace("/", "\\");
37 | String NewPath = System.IO.Path.GetDirectoryName(this.Path) + "\\" + Path;
38 | if (File.Exists(NewPath)) return File.ReadAllBytes(NewPath);
39 | return null;
40 | }
41 |
42 | public override bool Equals(object obj)
43 | {
44 | if (!(obj is EFEDiskFile)) return false;
45 | EFEDiskFile a = (EFEDiskFile)obj;
46 | if (a.Path == Path) return true;
47 | return false;
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/IO/EndianBinaryWriterEx.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace LibEveryFileExplorer.IO
8 | {
9 | public class EndianBinaryWriterEx : EndianBinaryWriter
10 | {
11 | public EndianBinaryWriterEx(Stream baseStream)
12 | : base(baseStream) { }
13 |
14 | public EndianBinaryWriterEx(Stream baseStream, Endianness endianness)
15 | : base(baseStream, endianness) { }
16 |
17 | private struct SizeSection
18 | {
19 | public long StartAddress;
20 | public int SizeOffset;
21 | }
22 |
23 | private Stack SizeSections = new Stack();
24 |
25 | public void BeginSizeSection(int SizeOffset = 0)
26 | {
27 | SizeSections.Push(new SizeSection() { StartAddress = BaseStream.Position, SizeOffset = SizeOffset });
28 | }
29 |
30 | public void EndSizeSection()
31 | {
32 | SizeSection s = SizeSections.Pop();
33 | uint length = (uint)(BaseStream.Position - s.StartAddress);
34 | long curpos = BaseStream.Position;
35 | BaseStream.Position = s.StartAddress + s.SizeOffset;
36 | Write(length);
37 | BaseStream.Position = curpos;
38 | }
39 |
40 | public void WritePadding(int Alignment, byte PadChar = 0)
41 | {
42 | while ((BaseStream.Position % Alignment) != 0) Write(PadChar);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/SimpleFileSystem/EFESFSFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Files.SimpleFileSystem
7 | {
8 | public class EFESFSFile : EFEFile
9 | {
10 | public EFESFSFile(SFSFile File)
11 | {
12 | this.File = File;
13 | this.Parent = Parent;
14 | if (Parent != null) Parent.Children.Add(this);
15 | Name = File.FileName;
16 | PrepareDataForUse(File.Data);
17 | }
18 |
19 | public SFSFile File { get; private set; }
20 |
21 | public override void Save()
22 | {
23 | File.Data = GetDataForSave();
24 | if (Parent != null)
25 | {
26 | ViewableFile v = EveryFileExplorerUtil.GetViewableFileFromFile(Parent);
27 | if (v.Dialog is IChildReactive) ((IChildReactive)v.Dialog).OnChildSave(EveryFileExplorerUtil.GetViewableFileFromFile(this));
28 | }
29 | }
30 |
31 | public override byte[] FindFileRelative(string Path)
32 | {
33 | Path = Path.Replace("\\", "/");
34 | var v = File.Parent.GetFileByPath(Path);
35 | if (v != null) return File.Parent.GetFileByPath(Path).Data;
36 | return null;
37 | }
38 |
39 | public override bool Equals(object obj)
40 | {
41 | if (!(obj is EFESFSFile)) return false;
42 | EFESFSFile a = (EFESFSFile)obj;
43 | if (a.File == File) return true;
44 | return false;
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/NDS/UI/NSBTXViewer.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace NDS.UI
2 | {
3 | partial class NSBTXViewer
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.SuspendLayout();
32 | //
33 | // NSBTXViewer
34 | //
35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37 | this.ClientSize = new System.Drawing.Size(667, 368);
38 | this.Name = "NSBTXViewer";
39 | this.Text = "NSBTXViewer";
40 | this.Load += new System.EventHandler(this.NSBTXViewer_Load);
41 | this.ResumeLayout(false);
42 |
43 | }
44 |
45 | #endregion
46 | }
47 | }
--------------------------------------------------------------------------------
/MarioKart/UI/MapViewer/MKDSAreaRenderGroup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using MarioKart.MKDS.NKM;
6 | using System.Drawing;
7 | using Tao.OpenGl;
8 | using LibEveryFileExplorer.Collections;
9 |
10 | namespace MarioKart.UI.MapViewer
11 | {
12 | public class MKDSAreaRenderGroup : RenderGroup
13 | {
14 | AREA Areas;
15 |
16 | public MKDSAreaRenderGroup(AREA Areas, Color AreaColor)
17 | {
18 | this.Areas = Areas;
19 | this.AreaColor = AreaColor;
20 | }
21 |
22 | public Color AreaColor { get; private set; }
23 |
24 | public override bool Interactable { get { return false; } }
25 |
26 | public override void Render(object[] Selection, bool Picking, int PickingId)
27 | {
28 | if (Picking) return;
29 | Gl.glColor4f(AreaColor.R / 255f, AreaColor.G / 255f, AreaColor.B / 255f, AreaColor.A / 255f);
30 | Gl.glBegin(Gl.GL_QUADS);
31 | foreach (var o in Areas.Entries)
32 | {
33 | Vector3[] cube = o.GetCube();
34 | //We're interested in points 0, 1, 5 and 3 (ground plane)
35 | Vector3 Point1 = cube[3];
36 | Vector3 Point2 = cube[5];
37 | Vector3 Point3 = cube[1];
38 | Vector3 Point4 = cube[0];
39 | Gl.glVertex2f(Point1.X, Point1.Z);
40 | Gl.glVertex2f(Point2.X, Point2.Z);
41 | Gl.glVertex2f(Point3.X, Point3.Z);
42 | Gl.glVertex2f(Point4.X, Point4.Z);
43 | }
44 | Gl.glEnd();
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/3DS/Extensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using System.Drawing;
7 | using LibEveryFileExplorer.IO;
8 |
9 | namespace _3DS
10 | {
11 | public static class Extensions
12 | {
13 | public static Color ReadColor8(this EndianBinaryReader er)
14 | {
15 | int r = er.ReadByte();
16 | int g = er.ReadByte();
17 | int b = er.ReadByte();
18 | int a = er.ReadByte();
19 | return Color.FromArgb(a, r, g, b);
20 | }
21 |
22 | public static Color ReadColor4Singles(this EndianBinaryReader er)
23 | {
24 | float R = er.ReadSingle();
25 | float G = er.ReadSingle();
26 | float B = er.ReadSingle();
27 | float A = er.ReadSingle();
28 |
29 | int r = (int)(0.5f + (R * 255f));
30 | int g = (int)(0.5f + (G * 255f));
31 | int b = (int)(0.5f + (B * 255f));
32 | int a = (int)(0.5f + (A * 255f));
33 |
34 | return Color.FromArgb(a, r, g, b);
35 | }
36 |
37 | public static void WriteColor8(this EndianBinaryWriter er, Color Value)
38 | {
39 | er.Write((byte)Value.R);
40 | er.Write((byte)Value.G);
41 | er.Write((byte)Value.B);
42 | er.Write((byte)Value.A);
43 | }
44 |
45 | public static void WriteColor4Singles(this EndianBinaryWriter er, Color Value)
46 | {
47 | er.Write((float)(Value.R / 255f));
48 | er.Write((float)(Value.G / 255f));
49 | er.Write((float)(Value.B / 255f));
50 | er.Write((float)(Value.A / 255f));
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/MarioKart/UI/MapViewer/MKDSRouteLineRenderGroup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using MarioKart.MKDS.NKM;
6 | using LibEveryFileExplorer.Collections;
7 | using System.Drawing;
8 | using Tao.OpenGl;
9 |
10 | namespace MarioKart.UI.MapViewer
11 | {
12 | public class MKDSRouteLineRenderGroup : RenderGroup
13 | {
14 | PATH Paths;
15 | POIT Points;
16 |
17 | public MKDSRouteLineRenderGroup(PATH Paths, POIT Points, Color LineColor)
18 | {
19 | this.Paths = Paths;
20 | this.Points = Points;
21 | this.LineColor = LineColor;
22 | }
23 |
24 | public Color LineColor { get; private set; }
25 |
26 | public override bool Interactable { get { return false; } }
27 |
28 | public override void Render(object[] Selection, bool Picking, int PickingId)
29 | {
30 | if (Picking) return;
31 | Gl.glLineWidth(1.5f);
32 | Gl.glColor3f(LineColor.R / 255f, LineColor.G / 255f, LineColor.B / 255f);
33 | int idx = 0;
34 | foreach (var o in Paths.Entries)
35 | {
36 | if (Points.NrEntries < o.NrPoit + idx) break;
37 | Gl.glBegin(Gl.GL_LINE_STRIP);
38 | for (int i = 0; i < o.NrPoit; i++)
39 | {
40 | Gl.glVertex2f(Points[idx + i].Position.X, Points[idx + i].Position.Z);
41 | if (!(i + 1 < o.NrPoit) && o.Loop)
42 | {
43 | Gl.glVertex2f(Points[idx].Position.X, Points[idx].Position.Z);
44 | }
45 | }
46 | Gl.glEnd();
47 | idx += o.NrPoit;
48 | }
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/WiiU/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Wii U Plugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Every File Explorer")]
13 | [assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014-2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("5be0e6c0-4011-448c-9c62-4e91d82a4508")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/NDS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Nintendo DS Plugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Every File Explorer")]
13 | [assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014-2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("36c51fde-f0be-452c-adcc-2cbbc16a707b")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/3DS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Nintendo 3DS Plugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Every File Explorer")]
13 | [assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014-2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("52cc8500-db45-4569-85c7-8e7a382adbe9")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MarioKart/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Mario Kart Plugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Every File Explorer")]
13 | [assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014-2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("a09a9bbe-838c-4edc-b9b8-d009db376bdb")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/NDS/SND/IMAADPCMDecoder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.IO;
6 | using LibEveryFileExplorer.Math;
7 |
8 | namespace NDS.SND
9 | {
10 | public class IMAADPCMDecoder
11 | {
12 | private bool IsInit = false;
13 | private int Last;
14 | private int Index;
15 |
16 | public IMAADPCMDecoder() { }
17 |
18 | public Int16[] GetWaveData(byte[] Data, int Offset, int Length)
19 | {
20 | List DataOut = new List();
21 | if (!IsInit)
22 | {
23 | Last = IOUtil.ReadS16LE(Data, Offset);
24 | Index = IOUtil.ReadS16LE(Data, Offset + 2) & 0x7F;
25 | Offset += 4;
26 | Length -= 4;
27 | DataOut.Add((short)Last);
28 | IsInit = true;
29 | }
30 | int end = Offset + Length;
31 | while (Offset < end)
32 | {
33 | byte sampd = Data[Offset++];
34 | for (int i = 0; i < 2; i++)
35 | {
36 | int val = (sampd >> (i * 4)) & 0xF;
37 |
38 | int diff =
39 | IMAADPCMConst.StepTable[Index] / 8 +
40 | IMAADPCMConst.StepTable[Index] / 4 * ((val >> 0) & 1) +
41 | IMAADPCMConst.StepTable[Index] / 2 * ((val >> 1) & 1) +
42 | IMAADPCMConst.StepTable[Index] * ((val >> 2) & 1);
43 |
44 | int samp = Last + diff * ((((val >> 3) & 1) == 1) ? -1 : 1);
45 | Last = (short)MathUtil.Clamp(samp, short.MinValue, short.MaxValue);
46 | Index = (short)MathUtil.Clamp(Index + IMAADPCMConst.IndexTable[val & 7], 0, 88);
47 | DataOut.Add((short)Last);
48 | }
49 | }
50 | return DataOut.ToArray();
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/CommonFiles/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Common Files Plugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Every File Explorer")]
13 | [assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014-2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("c993dbcd-fe83-4fdb-850d-710640b3fdd0")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/GCNWii/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Nintendo GC and Wii Plugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Every File Explorer")]
13 | [assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014-2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("fa8f2333-7020-4c96-842f-90a2af81dad4")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("LibEveryFileExplorer")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Every File Explorer")]
13 | [assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014-2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("c373fbf1-4043-43c7-8c4c-946445e1c19d")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CommonCompressors/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Common Compressors Plugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Every File Explorer")]
13 | [assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014-2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("287caaec-e539-44ce-8e11-bffcf4b45471")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/LegoPirates/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Lego Pirates of the Carribean Plugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Every File Explorer")]
13 | [assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014-2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("58dd297a-249a-47c8-8e66-266a1615799f")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/EveryFileExplorer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Every File Explorer")]
9 | [assembly: AssemblyDescription("Takes hacking to a higher level!")]
10 | [assembly: AssemblyConfiguration("Devbuild")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Every File Explorer")]
13 | [assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014-2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("33556173-9816-4c7a-960f-b1fffa0c01f6")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/ViewableFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 | using LibEveryFileExplorer.Files;
7 |
8 | namespace LibEveryFileExplorer.Files
9 | {
10 | public class ViewableFile
11 | {
12 | public ViewableFile(EFEFile File, Type Format, bool CreateNew = false)
13 | {
14 | if (!Format.GetInterfaces().Contains(typeof(IViewable))) throw new ArgumentException("This format is not viewable!");
15 | this.File = File;
16 | if (CreateNew) FileFormat = Format.InvokeMember("", System.Reflection.BindingFlags.CreateInstance, null, null, new object[0]);
17 | else FileFormat = Format.InvokeMember("", System.Reflection.BindingFlags.CreateInstance, null, null, new object[] { File.Data });
18 | Dialog = FileFormat.GetDialog();
19 | Dialog.Tag = this;
20 | Dialog.Text = File.Name;
21 | Dialog.FormClosing += new FormClosingEventHandler(Dialog_FormClosing);
22 | }
23 |
24 | void Dialog_FormClosing(object sender, FormClosingEventArgs e)
25 | {
26 | if (e.CloseReason == CloseReason.MdiFormClosing) EveryFileExplorerUtil.DisableFileDependencyDialog();
27 | if (DialogClosing != null) e.Cancel = !DialogClosing.Invoke(this);
28 | }
29 |
30 | public void ShowDialog(Form Parent)
31 | {
32 | Dialog.MdiParent = Parent;
33 | Dialog.Show();
34 | }
35 |
36 | public EFEFile File { get; private set; }
37 | public dynamic FileFormat { get; private set; }
38 | public Form Dialog { get; private set; }
39 | public delegate bool DialogClosingEventHandler(ViewableFile VFile);
40 | public event DialogClosingEventHandler DialogClosing;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/3DS/N3DSPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer;
6 | using LibEveryFileExplorer.Script;
7 | using _3DS.NintendoWare.GFX;
8 | using System.IO;
9 | using CommonFiles;
10 |
11 | namespace _3DS
12 | {
13 | public class N3DSPlugin : EFEPlugin
14 | {
15 | public override void OnLoad()
16 | {
17 | EFEScript.RegisterCommand("N3DS.NW4C.GFX.ToOBJ", (Action)N3DS_NW4C_GFX_ToOBJ);
18 | }
19 |
20 | public static void N3DS_NW4C_GFX_ToOBJ(String BCMDLPath, int ModelIdx, String OBJPath)
21 | {
22 | CGFX c = new CGFX(File.ReadAllBytes(BCMDLPath));
23 | if (c.Data.Models == null || c.Data.Models.Length <= ModelIdx) throw new Exception("Model does not exist in the specified CGFX file!");
24 | CMDL Model = c.Data.Models[ModelIdx];
25 | OBJ o = Model.ToOBJ();
26 | o.MTLPath = Path.GetFileNameWithoutExtension(OBJPath) + ".mtl";
27 | MTL m = Model.ToMTL(Path.GetFileNameWithoutExtension(OBJPath) + "_Tex");
28 | byte[] d = o.Write();
29 | byte[] d2 = m.Write();
30 | File.Create(OBJPath).Close();
31 | File.WriteAllBytes(OBJPath, d);
32 | File.Create(Path.ChangeExtension(OBJPath, "mtl")).Close();
33 | File.WriteAllBytes(Path.ChangeExtension(OBJPath, "mtl"), d2);
34 | Directory.CreateDirectory(Path.GetDirectoryName(OBJPath) + "\\" + Path.GetFileNameWithoutExtension(OBJPath) + "_Tex");
35 | foreach (var v in c.Data.Textures)
36 | {
37 | if (!(v is ImageTextureCtr)) continue;
38 | ((ImageTextureCtr)v).GetBitmap().Save(Path.GetDirectoryName(OBJPath) + "\\" + Path.GetFileNameWithoutExtension(OBJPath) + "_Tex\\" + v.Name + ".png");
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/MarioKart/MK7/KMP/POTI.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 | using System.IO;
7 | using LibEveryFileExplorer.Files;
8 | using LibEveryFileExplorer.IO;
9 |
10 | namespace MarioKart.MK7.KMP
11 | {
12 | public class POTI
13 | {
14 | public POTI()
15 | {
16 | Signature = "ITOP";
17 | }
18 | public POTI(EndianBinaryReader er)
19 | {
20 | Signature = er.ReadString(Encoding.ASCII, 4);
21 | if (Signature != "ITOP") throw new SignatureNotCorrectException(Signature, "ITOP", er.BaseStream.Position - 4);
22 | NrRoutes = er.ReadUInt16();
23 | NrPoints = er.ReadUInt16();
24 | for (int i = 0; i < NrRoutes; i++) Routes.Add(new POTIRoute(er));
25 | }
26 | public String Signature;
27 | public UInt16 NrRoutes;
28 | public UInt16 NrPoints;
29 |
30 | public List Routes = new List();
31 | public class POTIRoute
32 | {
33 | public POTIRoute(EndianBinaryReader er)
34 | {
35 | NrPoints = er.ReadUInt16();
36 | Setting1 = er.ReadByte();
37 | Setting2 = er.ReadByte();
38 | for (int i = 0; i < NrPoints; i++) Points.Add(new POTIPoint(er));
39 | }
40 | public UInt16 NrPoints;
41 | public Byte Setting1;
42 | public Byte Setting2;
43 |
44 | public List Points = new List();
45 | public class POTIPoint
46 | {
47 | public POTIPoint(EndianBinaryReader er)
48 | {
49 | Position = er.ReadVector3();
50 | Setting1 = er.ReadUInt16();
51 | Setting2 = er.ReadUInt16();
52 | }
53 | public Vector3 Position;
54 | public UInt16 Setting1;
55 | public UInt16 Setting2;
56 | }
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/SND/DSPADPCM.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Math;
6 |
7 | namespace LibEveryFileExplorer.SND
8 | {
9 | public class DSPADPCM
10 | {
11 | Int16[] Table;
12 | double Last1 = 0;
13 | double Last2 = 0;
14 | public DSPADPCM(Int16[] CoefTable)
15 | {
16 | Table = CoefTable;
17 | }
18 |
19 | public void UpdateLastSamples(short Prev1, short Prev2)
20 | {
21 | Last1 = Prev1;
22 | Last2 = Prev2;
23 | }
24 |
25 | public Int16[] GetWaveData(byte[] Data, int Offset, int Length)
26 | {
27 | List DataOut = new List();
28 |
29 | for (int i = Offset + 1; i < (Offset + Length); i += 8)
30 | {
31 | int Scale = 1 << (Data[i - 1] & 0xF);
32 | int Coef = (Data[i - 1] >> 4) & 0xF;
33 | double Coef1 = Table[Coef * 2];
34 | double Coef2 = Table[Coef * 2 + 1];
35 |
36 | for (int j = 0; j < 7; j++)
37 | {
38 | int high = Data[i + j] >> 4;
39 | int low = Data[i + j] & 0xF;
40 | if (high >= 8) high -= 16;
41 | if (low >= 8) low -= 16;
42 | double val = (((high * Scale) << 11) + 1024.0 + (Coef1 * Last1 + Coef2 * Last2)) / 2048.0; //>> 11;
43 | short samp = (short)MathUtil.Clamp((int)val, short.MinValue, short.MaxValue);
44 | DataOut.Add(samp);
45 | Last2 = Last1;
46 | Last1 = val;
47 | val = (((low * Scale) << 11) + 1024.0 + (Coef1 * Last1 + Coef2 * Last2)) / 2048.0;//>> 11;
48 | samp = (short)MathUtil.Clamp((int)val, short.MinValue, short.MaxValue);
49 | DataOut.Add(samp);
50 | Last2 = Last1;
51 | Last1 = val;
52 | }
53 | }
54 | return DataOut.ToArray();
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/MarioKart/MK7/KMP/ITPT.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 | using System.Windows.Forms;
7 | using System.IO;
8 | using LibEveryFileExplorer.GameData;
9 | using LibEveryFileExplorer.Files;
10 | using LibEveryFileExplorer;
11 | using LibEveryFileExplorer.Math;
12 | using LibEveryFileExplorer.IO;
13 |
14 | namespace MarioKart.MK7.KMP
15 | {
16 | public class ITPT : GameDataSection
17 | {
18 | public ITPT() { Signature = "TPTI"; }
19 | public ITPT(EndianBinaryReaderEx er)
20 | {
21 | Signature = er.ReadString(Encoding.ASCII, 4);
22 | if (Signature != "TPTI") throw new SignatureNotCorrectException(Signature, "TPTI", er.BaseStream.Position - 4);
23 | NrEntries = er.ReadUInt32();
24 | for (int i = 0; i < NrEntries; i++) Entries.Add(new ITPTEntry(er));
25 | }
26 |
27 | public override String[] GetColumnNames()
28 | {
29 | return new String[] {
30 | "ID",
31 | "X", "Y", "Z",
32 | "?",
33 | "?"
34 | };
35 | }
36 | public class ITPTEntry : GameDataSectionEntry
37 | {
38 | public ITPTEntry() { }
39 | public ITPTEntry(EndianBinaryReaderEx er)
40 | {
41 | er.ReadObject(this);
42 | }
43 |
44 | public override ListViewItem GetListViewItem()
45 | {
46 | ListViewItem m = new ListViewItem("");
47 | m.SubItems.Add(Position.X.ToString());
48 | m.SubItems.Add(Position.Y.ToString());
49 | m.SubItems.Add(Position.Z.ToString());
50 |
51 | m.SubItems.Add(Unknown1.ToString());
52 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown2));
53 | return m;
54 | }
55 | public Vector3 Position { get; set; }
56 | public Single Unknown1 { get; set; }
57 | public UInt32 Unknown2 { get; set; }
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/MarioKart/UI/MapViewer/MKDSCheckPointPoint1RenderGroup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using MarioKart.MKDS.NKM;
6 | using LibEveryFileExplorer.Collections;
7 | using System.Drawing;
8 | using Tao.OpenGl;
9 |
10 | namespace MarioKart.UI.MapViewer
11 | {
12 | public class MKDSCheckPointPoint1RenderGroup : RenderGroup
13 | {
14 | CPOI Checkpoints;
15 |
16 | public MKDSCheckPointPoint1RenderGroup(CPOI Checkpoints, Color PointColor)
17 | {
18 | this.Checkpoints = Checkpoints;
19 | this.PointColor = PointColor;
20 | }
21 |
22 | public Color PointColor { get; private set; }
23 |
24 | public override bool Interactable { get { return true; } }
25 |
26 | public override void Render(object[] Selection, bool Picking, int PickingId)
27 | {
28 | Gl.glPointSize((Picking ? 6f : 5));
29 |
30 | Gl.glBegin(Gl.GL_POINTS);
31 | if (!Picking) Gl.glColor3f(PointColor.R / 255f, PointColor.G / 255f, PointColor.B / 255f);
32 | int objidx = 1;
33 | foreach (var o in Checkpoints.Entries)
34 | {
35 | if (Picking)
36 | {
37 | Color c = Color.FromArgb(objidx | PickingId);
38 | Gl.glColor4f(c.R / 255f, c.G / 255f, c.B / 255f, 1);
39 | objidx++;
40 | }
41 | Gl.glVertex2f(o.Point1.X, o.Point1.Y);
42 | }
43 | Gl.glEnd();
44 | }
45 |
46 | public override object GetEntry(int Index)
47 | {
48 | return Checkpoints[Index];
49 | }
50 |
51 | public override Vector3 GetPosition(int Index)
52 | {
53 | return new Vector3(Checkpoints[Index].Point1.X, 0, Checkpoints[Index].Point1.Y);
54 | }
55 |
56 | public override void SetPosition(int Index, Vector3 Position, bool ValidY = false)
57 | {
58 | Checkpoints[Index].Point1 = new Vector2(Position.X, Position.Z);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/MarioKart/UI/MapViewer/MKDSCheckPointPoint2RenderGroup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using MarioKart.MKDS.NKM;
6 | using LibEveryFileExplorer.Collections;
7 | using System.Drawing;
8 | using Tao.OpenGl;
9 |
10 | namespace MarioKart.UI.MapViewer
11 | {
12 | public class MKDSCheckPointPoint2RenderGroup : RenderGroup
13 | {
14 | CPOI Checkpoints;
15 |
16 | public MKDSCheckPointPoint2RenderGroup(CPOI Checkpoints, Color PointColor)
17 | {
18 | this.Checkpoints = Checkpoints;
19 | this.PointColor = PointColor;
20 | }
21 |
22 | public Color PointColor { get; private set; }
23 |
24 | public override bool Interactable
25 | {
26 | get { return true; }
27 | }
28 |
29 | public override void Render(object[] Selection, bool Picking, int PickingId)
30 | {
31 | Gl.glPointSize((Picking ? 6f : 5));
32 |
33 | Gl.glBegin(Gl.GL_POINTS);
34 | if (!Picking) Gl.glColor3f(PointColor.R / 255f, PointColor.G / 255f, PointColor.B / 255f);
35 | int objidx = 1;
36 | foreach (var o in Checkpoints.Entries)
37 | {
38 | if (Picking)
39 | {
40 | Color c = Color.FromArgb(objidx | PickingId);
41 | Gl.glColor4f(c.R / 255f, c.G / 255f, c.B / 255f, 1);
42 | objidx++;
43 | }
44 | Gl.glVertex2f(o.Point2.X, o.Point2.Y);
45 | }
46 | Gl.glEnd();
47 | }
48 |
49 | public override object GetEntry(int Index)
50 | {
51 | return Checkpoints[Index];
52 | }
53 |
54 | public override Vector3 GetPosition(int Index)
55 | {
56 | return new Vector3(Checkpoints[Index].Point2.X, 0, Checkpoints[Index].Point2.Y);
57 | }
58 |
59 | public override void SetPosition(int Index, Vector3 Position, bool ValidY = false)
60 | {
61 | Checkpoints[Index].Point2 = new Vector2(Position.X, Position.Z);
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/GFX/ColorFormat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.GFX
7 | {
8 | public class ColorFormat
9 | {
10 | public readonly int AShift, ASize, RShift, RSize, GShift, GSize, BShift, BSize;
11 |
12 | public ColorFormat(int AShift, int ASize, int RShift, int RSize, int GShift, int GSize, int BShift, int BSize)
13 | {
14 | this.AShift = AShift;
15 | this.ASize = ASize;
16 | this.RShift = RShift;
17 | this.RSize = RSize;
18 | this.GShift = GShift;
19 | this.GSize = GSize;
20 | this.BShift = BShift;
21 | this.BSize = BSize;
22 | }
23 | //The naming is based on the bit order when read out in the correct endianness
24 | public static readonly ColorFormat ARGB8888 = new ColorFormat(24, 8, 16, 8, 8, 8, 0, 8);
25 |
26 | public static readonly ColorFormat ARGB3444 = new ColorFormat(12, 3, 8, 4, 4, 4, 0, 4);
27 |
28 | public static readonly ColorFormat RGBA8888 = new ColorFormat(0, 8, 24, 8, 16, 8, 8, 8);
29 |
30 | public static readonly ColorFormat RGBA4444 = new ColorFormat(0, 4, 12, 4, 8, 4, 4, 4);
31 |
32 | public static readonly ColorFormat RGB888 = new ColorFormat(0, 0, 16, 8, 8, 8, 0, 8);
33 |
34 | public static readonly ColorFormat RGB565 = new ColorFormat(0, 0, 11, 5, 5, 6, 0, 5);
35 |
36 | public static readonly ColorFormat ARGB1555 = new ColorFormat(15, 1, 10, 5, 5, 5, 0, 5);
37 | public static readonly ColorFormat XRGB1555 = new ColorFormat(0, 0, 10, 5, 5, 5, 0, 5);
38 |
39 | public static readonly ColorFormat ABGR1555 = new ColorFormat(15, 1, 0, 5, 5, 5, 10, 5);
40 | public static readonly ColorFormat XBGR1555 = new ColorFormat(0, 0, 0, 5, 5, 5, 10, 5);
41 |
42 | public static readonly ColorFormat RGBA5551 = new ColorFormat(0, 1, 11, 5, 6, 5, 1, 5);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/3DS/ThemeIconFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Files;
6 | using System.Drawing;
7 | using System.IO;
8 | using _3DS.UI;
9 |
10 | namespace _3DS
11 | {
12 | public class ThemeIconFile : FileFormat, IViewable
13 | {
14 | public ThemeIconFile(byte[] Data)
15 | {
16 | icon = Data;
17 | width = 48;
18 | height = 48;
19 | }
20 |
21 | int width;
22 | int height;
23 | byte[] icon;
24 |
25 | public Bitmap getIconTexture()
26 | {
27 | return GPU.Textures.ToBitmap(icon, width, height, GPU.Textures.ImageFormat.RGB565, true);
28 | }
29 |
30 | public System.Windows.Forms.Form GetDialog()
31 | {
32 | return new ThemeIconViewer(this);
33 | }
34 |
35 |
36 | public class ThemeIconIdentifier : FileFormatIdentifier
37 | {
38 | public override string GetCategory()
39 | {
40 | return "3DS Themes";
41 | }
42 |
43 | public override string GetFileDescription()
44 | {
45 | return "3DS System Menu Theme Icon";
46 | }
47 |
48 | public override string GetFileFilter()
49 | {
50 | return "3DS System Menu Icon (*.icn)|*.icn";
51 | }
52 |
53 | public override Bitmap GetIcon()
54 | {
55 | return null;
56 | }
57 |
58 | public override FormatMatch IsFormat(EFEFile File)
59 | {
60 | if (File.Name.EndsWith(".icn"))
61 | return FormatMatch.Extension;
62 | else
63 | return FormatMatch.No;
64 | }
65 |
66 | }
67 |
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/MarioKart/MK7/KMP/ENPT.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 | using System.Windows.Forms;
7 | using System.IO;
8 | using LibEveryFileExplorer.GameData;
9 | using LibEveryFileExplorer.Files;
10 | using LibEveryFileExplorer;
11 | using LibEveryFileExplorer.Math;
12 | using LibEveryFileExplorer.IO;
13 |
14 | namespace MarioKart.MK7.KMP
15 | {
16 | public class ENPT : GameDataSection
17 | {
18 | public ENPT() { Signature = "TPNE"; }
19 | public ENPT(EndianBinaryReaderEx er)
20 | {
21 | Signature = er.ReadString(Encoding.ASCII, 4);
22 | if (Signature != "TPNE") throw new SignatureNotCorrectException(Signature, "TPNE", er.BaseStream.Position - 4);
23 | NrEntries = er.ReadUInt32();
24 | for (int i = 0; i < NrEntries; i++) Entries.Add(new ENPTEntry(er));
25 | }
26 |
27 | public override String[] GetColumnNames()
28 | {
29 | return new String[] {
30 | "ID",
31 | "X", "Y", "Z",
32 | "?",
33 | "?",
34 | "?"
35 | };
36 | }
37 | public class ENPTEntry : GameDataSectionEntry
38 | {
39 | public ENPTEntry() { }
40 | public ENPTEntry(EndianBinaryReaderEx er)
41 | {
42 | er.ReadObject(this);
43 | }
44 |
45 | public override ListViewItem GetListViewItem()
46 | {
47 | ListViewItem m = new ListViewItem("");
48 | m.SubItems.Add(Position.X.ToString());
49 | m.SubItems.Add(Position.Y.ToString());
50 | m.SubItems.Add(Position.Z.ToString());
51 |
52 | m.SubItems.Add(Unknown1.ToString());
53 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown2));
54 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown3));
55 | return m;
56 | }
57 | public Vector3 Position { get; set; }
58 | public Single Unknown1 { get; set; }
59 | public UInt32 Unknown2 { get; set; }
60 | public UInt32 Unknown3 { get; set; }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/MarioKart/MK7/KMP/GLPT.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 | using System.Windows.Forms;
7 | using System.IO;
8 | using LibEveryFileExplorer.GameData;
9 | using LibEveryFileExplorer.Files;
10 | using LibEveryFileExplorer;
11 | using LibEveryFileExplorer.Math;
12 | using LibEveryFileExplorer.IO;
13 |
14 | namespace MarioKart.MK7.KMP
15 | {
16 | public class GLPT : GameDataSection
17 | {
18 | public GLPT() { Signature = "TPLG"; }
19 | public GLPT(EndianBinaryReaderEx er)
20 | {
21 | Signature = er.ReadString(Encoding.ASCII, 4);
22 | if (Signature != "TPLG") throw new SignatureNotCorrectException(Signature, "TPLG", er.BaseStream.Position - 4);
23 | NrEntries = er.ReadUInt32();
24 | for (int i = 0; i < NrEntries; i++) Entries.Add(new GLPTEntry(er));
25 | }
26 |
27 | public override String[] GetColumnNames()
28 | {
29 | return new String[] {
30 | "ID",
31 | "X", "Y", "Z",
32 | "?",
33 | "?",
34 | "?"
35 | };
36 | }
37 | public class GLPTEntry : GameDataSectionEntry
38 | {
39 | public GLPTEntry() { }
40 | public GLPTEntry(EndianBinaryReaderEx er)
41 | {
42 | er.ReadObject(this);
43 | }
44 |
45 | public override ListViewItem GetListViewItem()
46 | {
47 | ListViewItem m = new ListViewItem("");
48 | m.SubItems.Add(Position.X.ToString());
49 | m.SubItems.Add(Position.Y.ToString());
50 | m.SubItems.Add(Position.Z.ToString());
51 |
52 | m.SubItems.Add(Unknown1.ToString());
53 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown2));
54 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown3));
55 | return m;
56 | }
57 | public Vector3 Position { get; set; }
58 | public Single Unknown1 { get; set; }
59 | public UInt32 Unknown2 { get; set; }
60 | public UInt32 Unknown3 { get; set; }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/FileFormat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.ComponentModel;
6 | using System.Drawing;
7 |
8 | namespace LibEveryFileExplorer.Files
9 | {
10 | internal interface FileFormatBase { }
11 |
12 | public abstract class FileFormat : FileFormatBase where T : FileFormatIdentifier, new()
13 | {
14 | private static T _identifier = new T();
15 | public static T Identifier { get { return _identifier; } }
16 | }
17 |
18 | public abstract class FileFormatIdentifier
19 | {
20 | protected const String Category_Animations = "Animations";
21 | protected const String Category_Archives = "Archives";
22 | protected const String Category_Audio = "Audio";
23 | protected const String Category_Cells = "Cells";
24 | protected const String Category_Fonts = "Fonts";
25 | protected const String Category_Graphics = "Graphics";
26 | protected const String Category_Layouts = "Layouts";
27 | protected const String Category_Models = "Models";
28 | protected const String Category_Palettes = "Palettes";
29 | protected const String Category_Particles = "Particles";
30 | protected const String Category_Roms = "Roms";
31 | protected const String Category_Screens = "Screens";
32 | protected const String Category_Shaders = "Shaders";
33 | protected const String Category_Strings = "Strings";
34 | protected const String Category_Textures = "Textures";
35 | protected const String Category_Videos = "Videos";
36 |
37 | public abstract String GetCategory();
38 | public abstract String GetFileDescription();
39 | public abstract String GetFileFilter();
40 | public virtual Bitmap GetIcon() { return null; }
41 | public virtual Bitmap GetTreeIcon() { return null; }
42 | public abstract FormatMatch IsFormat(EFEFile File);
43 | }
44 |
45 | public enum FormatMatch
46 | {
47 | No,
48 | Extension,
49 | Content
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/MarioKart/MK7/KMP/KTPT.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 | using System.Windows.Forms;
7 | using System.IO;
8 | using LibEveryFileExplorer.GameData;
9 | using LibEveryFileExplorer.Files;
10 | using LibEveryFileExplorer;
11 | using LibEveryFileExplorer.Math;
12 | using LibEveryFileExplorer.IO;
13 |
14 | namespace MarioKart.MK7.KMP
15 | {
16 | public class KTPT : GameDataSection
17 | {
18 | public KTPT() { Signature = "TPTK"; }
19 | public KTPT(EndianBinaryReaderEx er)
20 | {
21 | Signature = er.ReadString(Encoding.ASCII, 4);
22 | if (Signature != "TPTK") throw new SignatureNotCorrectException(Signature, "TPTK", er.BaseStream.Position - 4);
23 | NrEntries = er.ReadUInt32();
24 | for (int i = 0; i < NrEntries; i++) Entries.Add(new KTPTEntry(er));
25 | }
26 |
27 | public override String[] GetColumnNames()
28 | {
29 | return new String[] {
30 | "ID",
31 | "X", "Y", "Z",
32 | "X Angle", "Y Angle", "Z Angle",
33 | "Index"
34 | };
35 | }
36 | public class KTPTEntry : GameDataSectionEntry
37 | {
38 | public KTPTEntry() { }
39 | public KTPTEntry(EndianBinaryReaderEx er)
40 | {
41 | er.ReadObject(this);
42 | Rotation = new Vector3(MathUtil.RadToDeg(Rotation.X), MathUtil.RadToDeg(Rotation.Y), MathUtil.RadToDeg(Rotation.Z));
43 | }
44 |
45 | public override ListViewItem GetListViewItem()
46 | {
47 | ListViewItem m = new ListViewItem("");
48 | m.SubItems.Add(Position.X.ToString());
49 | m.SubItems.Add(Position.Y.ToString());
50 | m.SubItems.Add(Position.Z.ToString());
51 |
52 | m.SubItems.Add(Rotation.X.ToString());
53 | m.SubItems.Add(Rotation.Y.ToString());
54 | m.SubItems.Add(Rotation.Z.ToString());
55 |
56 | m.SubItems.Add(Index.ToString());
57 | return m;
58 | }
59 | public Vector3 Position { get; set; }
60 | public Vector3 Rotation { get; set; }
61 | public UInt32 Index { get; set; }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/CommonCompressors/LZ11.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Compression;
6 | using System.Runtime.InteropServices;
7 |
8 | namespace CommonCompressors
9 | {
10 | public unsafe class LZ11 : CompressionFormat
11 | {
12 | public override byte[] Decompress(byte[] Data)
13 | {
14 | UInt32 leng = (uint)(Data[1] | (Data[2] << 8) | (Data[3] << 16));
15 | byte[] Result = new byte[leng];
16 | int Offs = 4;
17 | int dstoffs = 0;
18 | while (true)
19 | {
20 | byte header = Data[Offs++];
21 | for (int i = 0; i < 8; i++)
22 | {
23 | if ((header & 0x80) == 0) Result[dstoffs++] = Data[Offs++];
24 | else
25 | {
26 | byte a = Data[Offs++];
27 | int offs;
28 | int length;
29 | if ((a >> 4) == 0)
30 | {
31 | byte b = Data[Offs++];
32 | byte c = Data[Offs++];
33 | length = (((a & 0xF) << 4) | (b >> 4)) + 0x11;
34 | offs = (((b & 0xF) << 8) | c) + 1;
35 | }
36 | else if ((a >> 4) == 1)
37 | {
38 | byte b = Data[Offs++];
39 | byte c = Data[Offs++];
40 | byte d = Data[Offs++];
41 | length = (((a & 0xF) << 12) | (b << 4) | (c >> 4)) + 0x111;
42 | offs = (((c & 0xF) << 8) | d) + 1;
43 | }
44 | else
45 | {
46 | byte b = Data[Offs++];
47 | offs = (((a & 0xF) << 8) | b) + 1;
48 | length = (a >> 4) + 1;
49 | }
50 | for (int j = 0; j < length; j++)
51 | {
52 | Result[dstoffs] = Result[dstoffs - offs];
53 | dstoffs++;
54 | }
55 | }
56 | if (dstoffs >= leng) return Result;
57 | header <<= 1;
58 | }
59 | }
60 | }
61 |
62 | public class LZ11Identifier : CompressionFormatIdentifier
63 | {
64 | public override string GetCompressionDescription()
65 | {
66 | return "LZ11";
67 | }
68 |
69 | public override bool IsFormat(byte[] Data)
70 | {
71 | return Data.Length > 4 && Data[0] == 0x11;
72 | }
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/NDS/UI/NDSProjectDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using System.IO;
10 |
11 | namespace NDS.UI
12 | {
13 | public partial class NDSProjectDialog : Form
14 | {
15 | public String ProjectName { get; private set; }
16 | public String ProjectDir { get; private set; }
17 | public String NDSPath { get; private set; }
18 |
19 | public NDSProjectDialog()
20 | {
21 | InitializeComponent();
22 | openFileDialog1.Filter = Nitro.NDS.Identifier.GetFileFilter();
23 | }
24 |
25 | private void NDSProjectDialog_Load(object sender, EventArgs e)
26 | {
27 |
28 | }
29 |
30 | private void button3_Click(object sender, EventArgs e)
31 | {
32 | if (folderBrowserDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK
33 | && folderBrowserDialog1.SelectedPath.Length > 0)
34 | {
35 | if (new DirectoryInfo(folderBrowserDialog1.SelectedPath).GetFileSystemInfos().Length > 0)
36 | {
37 | MessageBox.Show("Please select an empty directory!");
38 | return;
39 | }
40 | ProjectDir = folderBrowserDialog1.SelectedPath;
41 | UpdatePaths();
42 | }
43 | }
44 |
45 | private void button4_Click(object sender, EventArgs e)
46 | {
47 | if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK
48 | && openFileDialog1.FileName.Length > 0)
49 | {
50 | NDSPath = openFileDialog1.FileName;
51 | UpdatePaths();
52 | }
53 | }
54 |
55 | void UpdatePaths()
56 | {
57 | textBox1.Text = ProjectDir;
58 | textBox2.Text = NDSPath;
59 | if (ProjectDir != null && ProjectDir.Length > 0 && NDSPath != null && NDSPath.Length > 0 && ProjectName != null && ProjectName.Length > 0)
60 | button2.Enabled = true;
61 | else button2.Enabled = false;
62 | }
63 |
64 | private void textBox3_TextChanged(object sender, EventArgs e)
65 | {
66 | ProjectName = textBox3.Text;
67 | UpdatePaths();
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/NDS/NitroSystem/SND/SWAR.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Files;
6 | using System.Drawing;
7 | using LibEveryFileExplorer.IO;
8 | using LibEveryFileExplorer.IO.Serialization;
9 |
10 | namespace NDS.NitroSystem.SND
11 | {
12 | public class SWAR : FileFormat//, IViewable
13 | {
14 | public SWARHeader Header;
15 | public class SWARHeader
16 | {
17 | public SWARHeader(EndianBinaryReaderEx er)
18 | {
19 | er.ReadObject(this);
20 | }
21 | [BinaryStringSignature("SWAR")]
22 | [BinaryFixedSize(4)]
23 | public String Signature;
24 | [BinaryBOM(0xFFFE)]
25 | public UInt16 Endianness;
26 | public UInt16 Version;
27 | public UInt32 FileSize;
28 | public UInt16 HeaderSize;
29 | public UInt16 NrBlocks;
30 | }
31 |
32 | public DATA Data;
33 | public class DATA
34 | {
35 | public DATA(EndianBinaryReaderEx er)
36 | {
37 | er.ReadObject(this);
38 | WaveInfoOffsets = er.ReadUInt32s((int)NrWaves);
39 |
40 | }
41 | [BinaryStringSignature("DATA")]
42 | [BinaryFixedSize(4)]
43 | public String Signature;
44 | public UInt32 SectionSize;
45 | [BinaryFixedSize(32)]
46 | public Byte[] Padding;
47 | public UInt32 NrWaves;
48 | [BinaryIgnore]
49 | public UInt32[] WaveInfoOffsets;
50 | }
51 | public class SWARIdentifier : FileFormatIdentifier
52 | {
53 | public override string GetCategory()
54 | {
55 | return Category_Archives;
56 | }
57 |
58 | public override string GetFileDescription()
59 | {
60 | return "Nitro Sound Wave Archive (SWAR)";
61 | }
62 |
63 | public override string GetFileFilter()
64 | {
65 | return "Nitro Sound Wave Archive (*.sdat)|*.sdat";
66 | }
67 |
68 | public override Bitmap GetIcon()
69 | {
70 | return null;
71 | }
72 |
73 | public override FormatMatch IsFormat(EFEFile File)
74 | {
75 | if (File.Data.Length > 4 && File.Data[0] == 'S' && File.Data[1] == 'W' && File.Data[2] == 'A' && File.Data[3] == 'R') return FormatMatch.Content;
76 | return FormatMatch.No;
77 | }
78 |
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/NDS/UI/TEX0Viewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using NDS.NitroSystem.G3D;
10 | using System.Drawing.Imaging;
11 |
12 | namespace NDS.UI
13 | {
14 | public partial class TEX0Viewer : UserControl
15 | {
16 | TEX0 Textures;
17 | public TEX0Viewer(TEX0 Textures)
18 | {
19 | this.Textures = Textures;
20 | InitializeComponent();
21 | }
22 |
23 | private void TEX0Viewer_Load(object sender, EventArgs e)
24 | {
25 | listBox1.BeginUpdate();
26 | listBox1.Items.Clear();
27 | for (int i = 0; i < Textures.dictTex.numEntry; i++)
28 | {
29 | listBox1.Items.Add(Textures.dictTex[i].Key);
30 | }
31 | listBox1.EndUpdate();
32 | listBox2.BeginUpdate();
33 | listBox2.Items.Clear();
34 | for (int i = 0; i < Textures.dictPltt.numEntry; i++)
35 | {
36 | listBox2.Items.Add(Textures.dictPltt[i].Key);
37 | }
38 | listBox2.EndUpdate();
39 | if (Textures.dictTex.numEntry != 0) listBox1.SelectedIndex = 0;
40 | }
41 |
42 | private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
43 | {
44 | var tex = Textures.dictTex[listBox1.SelectedIndex].Value;
45 | if (tex.Fmt != GPU.Textures.ImageFormat.DIRECT && listBox2.SelectedIndices.Count == 0)
46 | {
47 | if (Textures.dictPltt.numEntry != 0) listBox2.SelectedIndex = 0;
48 | return;
49 | }
50 | Bitmap b = null;
51 | try
52 | {
53 | b = tex.ToBitmap(Textures.dictPltt[listBox2.SelectedIndex].Value);
54 | toolStripButton1.Enabled = true;//export
55 | }
56 | catch
57 | {
58 | toolStripButton1.Enabled = false;//export
59 | }
60 | finally { pictureBox1.Image = b; }
61 | }
62 |
63 | private void toolStripButton1_Click(object sender, EventArgs e)
64 | {
65 | saveFileDialog1.FileName = Textures.dictTex[listBox1.SelectedIndex].Key + ".png";
66 | if (saveFileDialog1.ShowDialog() == DialogResult.OK
67 | && saveFileDialog1.FileName.Length > 0)
68 | {
69 | pictureBox1.Image.Save(saveFileDialog1.FileName, ImageFormat.Png);
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/MarioKart/MK7/KMP/JGPT.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 | using System.Windows.Forms;
7 | using System.IO;
8 | using LibEveryFileExplorer.GameData;
9 | using LibEveryFileExplorer.Files;
10 | using LibEveryFileExplorer;
11 | using LibEveryFileExplorer.Math;
12 | using LibEveryFileExplorer.IO;
13 |
14 | namespace MarioKart.MK7.KMP
15 | {
16 | public class JGPT : GameDataSection
17 | {
18 | public JGPT() { Signature = "TPGJ"; }
19 | public JGPT(EndianBinaryReaderEx er)
20 | {
21 | Signature = er.ReadString(Encoding.ASCII, 4);
22 | if (Signature != "TPGJ") throw new SignatureNotCorrectException(Signature, "TPGJ", er.BaseStream.Position - 4);
23 | NrEntries = er.ReadUInt32();
24 | for (int i = 0; i < NrEntries; i++) Entries.Add(new JGPTEntry(er));
25 | }
26 |
27 | public override String[] GetColumnNames()
28 | {
29 | return new String[] {
30 | "ID",
31 | "X", "Y", "Z",
32 | "X Angle", "Y Angle", "Z Angle",
33 | "Index",
34 | "?"
35 | };
36 | }
37 | public class JGPTEntry : GameDataSectionEntry
38 | {
39 | public JGPTEntry()
40 | {
41 | Index = 0;
42 | Unknown = 0xFFFF;
43 | }
44 | public JGPTEntry(EndianBinaryReaderEx er)
45 | {
46 | er.ReadObject(this);
47 | Rotation = new Vector3(MathUtil.RadToDeg(Rotation.X), MathUtil.RadToDeg(Rotation.Y), MathUtil.RadToDeg(Rotation.Z));
48 | }
49 |
50 | public override ListViewItem GetListViewItem()
51 | {
52 | ListViewItem m = new ListViewItem("");
53 | m.SubItems.Add(Position.X.ToString());
54 | m.SubItems.Add(Position.Y.ToString());
55 | m.SubItems.Add(Position.Z.ToString());
56 |
57 | m.SubItems.Add(Rotation.X.ToString());
58 | m.SubItems.Add(Rotation.Y.ToString());
59 | m.SubItems.Add(Rotation.Z.ToString());
60 |
61 | m.SubItems.Add(Index.ToString());
62 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown));
63 | return m;
64 | }
65 | public Vector3 Position { get; set; }
66 | public Vector3 Rotation { get; set; }
67 | public UInt16 Index { get; set; }
68 | public UInt16 Unknown { get; set; }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/3DS/NintendoWare/GFX/BoundingVolume.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using LibEveryFileExplorer.Collections;
7 | using LibEveryFileExplorer.IO;
8 |
9 | namespace _3DS.NintendoWare.GFX
10 | {
11 | public class BoundingVolume
12 | {
13 | public BoundingVolume() { }
14 | public BoundingVolume(EndianBinaryReader er)
15 | {
16 | Type = er.ReadUInt32();
17 | }
18 | public virtual void Write(EndianBinaryWriter er)
19 | {
20 | er.Write(Type);
21 | }
22 | public UInt32 Type;
23 | public static BoundingVolume FromStream(EndianBinaryReader er)
24 | {
25 | uint type = er.ReadUInt32();
26 | er.BaseStream.Position -= 4;
27 | switch (type)
28 | {
29 | case 0x80000000:
30 | return new OrientedBoundingBox(er);
31 | }
32 | return new BoundingVolume(er);
33 | }
34 | }
35 |
36 | public class AxisAlignedBoundingBox : BoundingVolume
37 | {
38 | public AxisAlignedBoundingBox(EndianBinaryReader er)
39 | : base(er)
40 | {
41 | CenterPosition = er.ReadVector3();
42 | Size = er.ReadVector3();
43 | }
44 | public override void Write(EndianBinaryWriter er)
45 | {
46 | base.Write(er);
47 | er.WriteVector3(CenterPosition);
48 | er.WriteVector3(Size);
49 | }
50 | public Vector3 CenterPosition;
51 | public Vector3 Size;
52 | }
53 |
54 | public class OrientedBoundingBox : BoundingVolume
55 | {
56 | public OrientedBoundingBox()
57 | : base()
58 | {
59 | Type = 0x80000000;
60 | //All to be set by the user
61 | CenterPosition = new Vector3(0, 0, 0);
62 | OrientationMatrix = new float[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
63 | Size = new Vector3(1, 1, 1);
64 | }
65 | public OrientedBoundingBox(EndianBinaryReader er)
66 | : base(er)
67 | {
68 | CenterPosition = er.ReadVector3();
69 | OrientationMatrix = er.ReadSingles(3 * 3);
70 | Size = er.ReadVector3();
71 | }
72 | public override void Write(EndianBinaryWriter er)
73 | {
74 | base.Write(er);
75 | er.WriteVector3(CenterPosition);
76 | er.Write(OrientationMatrix, 0, 3 * 3);
77 | er.WriteVector3(Size);
78 | }
79 | public Vector3 CenterPosition;
80 | public Single[] OrientationMatrix;//3x3
81 | public Vector3 Size;
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/3DS/UI/SAHTViewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace _3DS.UI
11 | {
12 | public partial class SAHTViewer : Form
13 | {
14 | public SARCHashTable HashTable;
15 | public SAHTViewer(SARCHashTable HashTable)
16 | {
17 | this.HashTable = HashTable;
18 | InitializeComponent();
19 | }
20 |
21 | private void SAHTViewer_Load(object sender, EventArgs e)
22 | {
23 | UpdateEntries();
24 | }
25 |
26 | private void listView1_SelectedIndexChanged(object sender, EventArgs e)
27 | {
28 | if (listView1.SelectedIndices.Count != 0) toolStripButton2.Enabled = true;
29 | else toolStripButton2.Enabled = false;
30 | }
31 |
32 | private void UpdateEntries()
33 | {
34 | listView1.BeginUpdate();
35 | listView1.Items.Clear();
36 | foreach (var v in HashTable.Entries)
37 | {
38 | listView1.Items.Add(new ListViewItem(new string[] { v.Name, "0x" + v.Hash.ToString("X8") }));
39 | }
40 | listView1.EndUpdate();
41 | }
42 |
43 | private void toolStripButton1_Click(object sender, EventArgs e)
44 | {
45 | String name = Microsoft.VisualBasic.Interaction.InputBox("Please give the name or path of the file:", "New Entry");
46 | if (name == null || name.Length == 0) return;
47 | if (HashTable.GetEntryByName(name) != null)
48 | {
49 | MessageBox.Show("This name is already in the table!");
50 | return;
51 | }
52 | HashTable.Entries.Add(new SARCHashTable.SAHTEntry(name));
53 | UpdateEntries();
54 | }
55 |
56 | private void toolStripButton2_Click(object sender, EventArgs e)
57 | {
58 | HashTable.Entries.RemoveAt(listView1.SelectedIndices[0]);
59 | UpdateEntries();
60 | }
61 |
62 | private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
63 | {
64 | List list = new List();
65 | foreach (var v in HashTable.Entries)
66 | {
67 | if (HashTable.GetEntryByHash(v.Hash) != v) continue;
68 | list.Add(v);
69 | }
70 | HashTable.Entries = list;
71 |
72 | HashTable.Entries.Sort((v1, v2) => v1.Name.CompareTo(v2.Name));
73 | UpdateEntries();
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/3DS/UI/ThemeIconViewer.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace _3DS.UI
2 | {
3 | partial class ThemeIconViewer
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
32 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
33 | this.SuspendLayout();
34 | //
35 | // pictureBox1
36 | //
37 | this.pictureBox1.BackgroundImage = global::_3DS.Resource.preview_background;
38 | this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
39 | this.pictureBox1.Location = new System.Drawing.Point(0, 0);
40 | this.pictureBox1.Name = "pictureBox1";
41 | this.pictureBox1.Size = new System.Drawing.Size(241, 129);
42 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
43 | this.pictureBox1.TabIndex = 0;
44 | this.pictureBox1.TabStop = false;
45 | //
46 | // ThemeIconViewer
47 | //
48 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
49 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
50 | this.ClientSize = new System.Drawing.Size(241, 129);
51 | this.Controls.Add(this.pictureBox1);
52 | this.Name = "ThemeIconViewer";
53 | this.Text = "ThemeIconViewer";
54 | this.Load += new System.EventHandler(this.ThemeIconViewer_Load_1);
55 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
56 | this.ResumeLayout(false);
57 |
58 | }
59 |
60 | #endregion
61 |
62 | private System.Windows.Forms.PictureBox pictureBox1;
63 | }
64 | }
--------------------------------------------------------------------------------
/3DS/UI/CLIMViewer.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace _3DS.UI
2 | {
3 | partial class CLIMViewer
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CLIMViewer));
32 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
33 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
34 | this.SuspendLayout();
35 | //
36 | // pictureBox1
37 | //
38 | this.pictureBox1.BackColor = System.Drawing.Color.White;
39 | this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
40 | this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
41 | this.pictureBox1.Location = new System.Drawing.Point(0, 0);
42 | this.pictureBox1.Name = "pictureBox1";
43 | this.pictureBox1.Size = new System.Drawing.Size(565, 386);
44 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
45 | this.pictureBox1.TabIndex = 0;
46 | this.pictureBox1.TabStop = false;
47 | //
48 | // CLIMViewer
49 | //
50 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
51 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
52 | this.ClientSize = new System.Drawing.Size(565, 386);
53 | this.Controls.Add(this.pictureBox1);
54 | this.Name = "CLIMViewer";
55 | this.Text = "CLIMViewer";
56 | this.Load += new System.EventHandler(this.CLIMViewer_Load);
57 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
58 | this.ResumeLayout(false);
59 |
60 | }
61 |
62 | #endregion
63 |
64 | private System.Windows.Forms.PictureBox pictureBox1;
65 | }
66 | }
--------------------------------------------------------------------------------
/GCNWii/UI/BTIViewer.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace GCNWii.UI
2 | {
3 | partial class BTIViewer
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BTIViewer));
32 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
33 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
34 | this.SuspendLayout();
35 | //
36 | // pictureBox1
37 | //
38 | this.pictureBox1.BackColor = System.Drawing.Color.White;
39 | this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
40 | this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
41 | this.pictureBox1.Location = new System.Drawing.Point(0, 0);
42 | this.pictureBox1.Name = "pictureBox1";
43 | this.pictureBox1.Size = new System.Drawing.Size(565, 386);
44 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
45 | this.pictureBox1.TabIndex = 0;
46 | this.pictureBox1.TabStop = false;
47 | //
48 | // CLIMViewer
49 | //
50 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
51 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
52 | this.ClientSize = new System.Drawing.Size(565, 386);
53 | this.Controls.Add(this.pictureBox1);
54 | this.Name = "CLIMViewer";
55 | this.Text = "CLIMViewer";
56 | this.Load += new System.EventHandler(this.CLIMViewer_Load);
57 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
58 | this.ResumeLayout(false);
59 |
60 | }
61 |
62 | #endregion
63 |
64 | private System.Windows.Forms.PictureBox pictureBox1;
65 | }
66 | }
--------------------------------------------------------------------------------
/GCNWii/UI/TPLViewer.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace GCNWii.UI
2 | {
3 | partial class TPLViewer
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BTIViewer));
32 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
33 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
34 | this.SuspendLayout();
35 | //
36 | // pictureBox1
37 | //
38 | this.pictureBox1.BackColor = System.Drawing.Color.White;
39 | this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
40 | this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
41 | this.pictureBox1.Location = new System.Drawing.Point(0, 0);
42 | this.pictureBox1.Name = "pictureBox1";
43 | this.pictureBox1.Size = new System.Drawing.Size(565, 386);
44 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
45 | this.pictureBox1.TabIndex = 0;
46 | this.pictureBox1.TabStop = false;
47 | //
48 | // CLIMViewer
49 | //
50 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
51 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
52 | this.ClientSize = new System.Drawing.Size(565, 386);
53 | this.Controls.Add(this.pictureBox1);
54 | this.Name = "CLIMViewer";
55 | this.Text = "CLIMViewer";
56 | this.Load += new System.EventHandler(this.CLIMViewer_Load);
57 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
58 | this.ResumeLayout(false);
59 |
60 | }
61 |
62 | #endregion
63 |
64 | private System.Windows.Forms.PictureBox pictureBox1;
65 | }
66 | }
--------------------------------------------------------------------------------
/WiiU/UI/FLIMViewer.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WiiU.UI
2 | {
3 | partial class FLIMViewer
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FLIMViewer));
32 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
33 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
34 | this.SuspendLayout();
35 | //
36 | // pictureBox1
37 | //
38 | this.pictureBox1.BackColor = System.Drawing.Color.White;
39 | this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
40 | this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
41 | this.pictureBox1.Location = new System.Drawing.Point(0, 0);
42 | this.pictureBox1.Name = "pictureBox1";
43 | this.pictureBox1.Size = new System.Drawing.Size(565, 386);
44 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
45 | this.pictureBox1.TabIndex = 0;
46 | this.pictureBox1.TabStop = false;
47 | //
48 | // FLIMViewer
49 | //
50 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
51 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
52 | this.ClientSize = new System.Drawing.Size(565, 386);
53 | this.Controls.Add(this.pictureBox1);
54 | this.Name = "FLIMViewer";
55 | this.Text = "FLIMViewer";
56 | this.Load += new System.EventHandler(this.FLIMViewer_Load);
57 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
58 | this.ResumeLayout(false);
59 |
60 | }
61 |
62 | #endregion
63 |
64 | private System.Windows.Forms.PictureBox pictureBox1;
65 | }
66 | }
--------------------------------------------------------------------------------
/NDS/UI/MDL0Viewer.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace NDS.UI
2 | {
3 | partial class MDL0Viewer
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.simpleOpenGlControl1 = new Tao.Platform.Windows.SimpleOpenGlControl();
32 | this.SuspendLayout();
33 | //
34 | // simpleOpenGlControl1
35 | //
36 | this.simpleOpenGlControl1.AccumBits = ((byte)(0));
37 | this.simpleOpenGlControl1.AutoCheckErrors = false;
38 | this.simpleOpenGlControl1.AutoFinish = false;
39 | this.simpleOpenGlControl1.AutoMakeCurrent = true;
40 | this.simpleOpenGlControl1.AutoSwapBuffers = true;
41 | this.simpleOpenGlControl1.BackColor = System.Drawing.Color.Black;
42 | this.simpleOpenGlControl1.ColorBits = ((byte)(32));
43 | this.simpleOpenGlControl1.DepthBits = ((byte)(32));
44 | this.simpleOpenGlControl1.Dock = System.Windows.Forms.DockStyle.Fill;
45 | this.simpleOpenGlControl1.Location = new System.Drawing.Point(0, 0);
46 | this.simpleOpenGlControl1.Name = "simpleOpenGlControl1";
47 | this.simpleOpenGlControl1.Size = new System.Drawing.Size(462, 357);
48 | this.simpleOpenGlControl1.StencilBits = ((byte)(8));
49 | this.simpleOpenGlControl1.TabIndex = 1;
50 | //
51 | // MDL0Viewer
52 | //
53 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
54 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
55 | this.Controls.Add(this.simpleOpenGlControl1);
56 | this.DoubleBuffered = true;
57 | this.Name = "MDL0Viewer";
58 | this.Size = new System.Drawing.Size(462, 357);
59 | this.Load += new System.EventHandler(this.MDL0Viewer_Load);
60 | this.ResumeLayout(false);
61 |
62 | }
63 |
64 | #endregion
65 |
66 | private Tao.Platform.Windows.SimpleOpenGlControl simpleOpenGlControl1;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/EveryFileExplorer/Plugins/Plugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Reflection;
6 | using LibEveryFileExplorer.Files;
7 | using LibEveryFileExplorer.Compression;
8 | using LibEveryFileExplorer;
9 |
10 | namespace EveryFileExplorer.Plugins
11 | {
12 | public class Plugin
13 | {
14 | public EFEPlugin Initializer;
15 |
16 | public String Name;
17 | public String Description;
18 | public String Version;
19 | public Type[] CompressionTypes;
20 | public Type[] FileFormatTypes;
21 | public Type[] ProjectTypes;
22 |
23 | public Plugin(Assembly Assembly)
24 | {
25 | Name = Assembly.GetCustomAttributes(typeof(AssemblyTitleAttribute), false).OfType().FirstOrDefault().Title;
26 | Description = Assembly.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false).OfType().FirstOrDefault().Description;
27 | try
28 | {
29 | Version = Assembly.GetCustomAttributes(typeof(AssemblyVersionAttribute), false).OfType().FirstOrDefault().Version;
30 | }
31 | catch
32 | {
33 | Version = null;
34 | }
35 | Type[] tt = Assembly.GetExportedTypes();
36 | List fe = new List();
37 | List ce = new List();
38 | List pe = new List();
39 | foreach (var t in tt)
40 | {
41 | if (!t.IsClass) continue;
42 | if (t.IsSubclassOf(typeof(EFEPlugin)))
43 | {
44 | Initializer = (EFEPlugin)t.InvokeMember(null, BindingFlags.CreateInstance, null, null, null);
45 | continue;
46 | }
47 | var v = t.GetInterfaces();
48 | if (v.Length != 0 && t.GetInterfaces()[0].Name == "FileFormatBase") fe.Add(t);
49 | else if (v.Length != 0 && t.GetInterfaces()[0].Name == "CompressionFormatBase") ce.Add(t);
50 | else if (v.Length != 0 && t.GetInterfaces()[0].Name == "ProjectBase") pe.Add(t);
51 | }
52 | FileFormatTypes = fe.ToArray();
53 | CompressionTypes = ce.ToArray();
54 | ProjectTypes = pe.ToArray();
55 | }
56 |
57 | public static bool IsPlugin(Assembly Assembly)
58 | {
59 | Type[] tt = Assembly.GetExportedTypes();
60 | foreach (var t in tt)
61 | {
62 | if (!t.IsClass) continue;
63 | var v = t.GetInterfaces();
64 | if (v.Length != 0 && (t.GetInterfaces()[0].Name == "FileFormatBase" || t.GetInterfaces()[0].Name == "CompressionFormatBase" || t.GetInterfaces()[0].Name == "ProjectBase")) return true;
65 | }
66 | return false;
67 | }
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/MarioKart/MK7/KMP/ITPH.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 | using System.Windows.Forms;
7 | using System.IO;
8 | using LibEveryFileExplorer.GameData;
9 | using LibEveryFileExplorer.Files;
10 | using LibEveryFileExplorer;
11 | using LibEveryFileExplorer.IO;
12 | using LibEveryFileExplorer.IO.Serialization;
13 |
14 | namespace MarioKart.MK7.KMP
15 | {
16 | public class ITPH : GameDataSection
17 | {
18 | public ITPH() { Signature = "HPTI"; }
19 | public ITPH(EndianBinaryReaderEx er)
20 | {
21 | Signature = er.ReadString(Encoding.ASCII, 4);
22 | if (Signature != "HPTI") throw new SignatureNotCorrectException(Signature, "HPTI", er.BaseStream.Position - 4);
23 | NrEntries = er.ReadUInt32();
24 | for (int i = 0; i < NrEntries; i++) Entries.Add(new ITPHEntry(er));
25 | }
26 |
27 | public override String[] GetColumnNames()
28 | {
29 | return new String[] {
30 | "ID",
31 | "Start",
32 | "Length",
33 | "Previous 1","Previous 2","Previous 3","Previous 4","Previous 5","Previous 6",
34 | "Next 1","Next 2","Next 3","Next 4","Next 5","Next 6"
35 | };
36 | }
37 | public class ITPHEntry : GameDataSectionEntry
38 | {
39 | public ITPHEntry()
40 | {
41 | Previous = new short[] { -1, -1, -1, -1, -1, -1 };
42 | Next = new short[] { -1, -1, -1, -1, -1, -1 };
43 | }
44 | public ITPHEntry(EndianBinaryReaderEx er)
45 | {
46 | er.ReadObject(this);
47 | }
48 |
49 | public override ListViewItem GetListViewItem()
50 | {
51 | ListViewItem m = new ListViewItem("");
52 | m.SubItems.Add(Start.ToString());
53 | m.SubItems.Add(Length.ToString());
54 | m.SubItems.Add(Previous[0].ToString());
55 | m.SubItems.Add(Previous[1].ToString());
56 | m.SubItems.Add(Previous[2].ToString());
57 | m.SubItems.Add(Previous[3].ToString());
58 | m.SubItems.Add(Previous[4].ToString());
59 | m.SubItems.Add(Previous[5].ToString());
60 | m.SubItems.Add(Next[0].ToString());
61 | m.SubItems.Add(Next[1].ToString());
62 | m.SubItems.Add(Next[2].ToString());
63 | m.SubItems.Add(Next[3].ToString());
64 | m.SubItems.Add(Next[4].ToString());
65 | m.SubItems.Add(Next[5].ToString());
66 | return m;
67 | }
68 | public UInt16 Start { get; set; }
69 | public UInt16 Length { get; set; }
70 | [BinaryFixedSize(6)]
71 | public Int16[] Previous { get; set; }//6
72 | [BinaryFixedSize(6)]
73 | public Int16[] Next { get; set; }//6
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/LegoPirates/UI/FMVViewer.designer.cs:
--------------------------------------------------------------------------------
1 | namespace LegoPirates.UI
2 | {
3 | partial class FMVViewer
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
32 | this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
33 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
34 | this.SuspendLayout();
35 | //
36 | // pictureBox1
37 | //
38 | this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
39 | this.pictureBox1.Location = new System.Drawing.Point(0, 0);
40 | this.pictureBox1.Name = "pictureBox1";
41 | this.pictureBox1.Size = new System.Drawing.Size(422, 326);
42 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
43 | this.pictureBox1.TabIndex = 0;
44 | this.pictureBox1.TabStop = false;
45 | //
46 | // backgroundWorker1
47 | //
48 | this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork);
49 | //
50 | // FMV
51 | //
52 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
53 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
54 | this.ClientSize = new System.Drawing.Size(422, 326);
55 | this.Controls.Add(this.pictureBox1);
56 | this.Name = "FMV";
57 | this.Text = "FMV";
58 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FMV_FormClosing);
59 | this.Load += new System.EventHandler(this.FMV_Load);
60 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
61 | this.ResumeLayout(false);
62 |
63 | }
64 |
65 | #endregion
66 |
67 | private System.Windows.Forms.PictureBox pictureBox1;
68 | private System.ComponentModel.BackgroundWorker backgroundWorker1;
69 | }
70 | }
--------------------------------------------------------------------------------
/MarioKart/MKDS/NKM/PATH.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.GameData;
6 | using System.IO;
7 | using LibEveryFileExplorer.Files;
8 | using LibEveryFileExplorer.Collections;
9 | using System.Windows.Forms;
10 | using LibEveryFileExplorer;
11 | using System.ComponentModel;
12 | using LibEveryFileExplorer.ComponentModel;
13 | using LibEveryFileExplorer.IO;
14 | using LibEveryFileExplorer.IO.Serialization;
15 |
16 | namespace MarioKart.MKDS.NKM
17 | {
18 | public class PATH : GameDataSection
19 | {
20 | public PATH() { Signature = "PATH"; }
21 | public PATH(EndianBinaryReaderEx er)
22 | {
23 | Signature = er.ReadString(Encoding.ASCII, 4);
24 | if (Signature != "PATH") throw new SignatureNotCorrectException(Signature, "PATH", er.BaseStream.Position - 4);
25 | NrEntries = er.ReadUInt32();
26 | for (int i = 0; i < NrEntries; i++) Entries.Add(new PATHEntry(er));
27 | }
28 |
29 | public void Write(EndianBinaryWriter er)
30 | {
31 | er.Write(Signature, Encoding.ASCII, false);
32 | NrEntries = (uint)Entries.Count;
33 | er.Write(NrEntries);
34 | for (int i = 0; i < NrEntries; i++) Entries[i].Write(er);
35 | }
36 |
37 | public override String[] GetColumnNames()
38 | {
39 | return new String[] {
40 | "ID",
41 | "Index",
42 | "Loop",
43 | "Nr Points"
44 | };
45 | }
46 |
47 | public class PATHEntry : GameDataSectionEntry
48 | {
49 | public PATHEntry()
50 | {
51 | Index = 0;
52 | Loop = false;
53 | NrPoit = 0;
54 | }
55 | public PATHEntry(EndianBinaryReaderEx er)
56 | {
57 | er.ReadObject(this);
58 | }
59 |
60 | public override void Write(EndianBinaryWriter er)
61 | {
62 | er.Write(Index);
63 | er.Write((Byte)(Loop ? 1 : 0));
64 | er.Write(NrPoit);
65 | }
66 |
67 | public override ListViewItem GetListViewItem()
68 | {
69 | ListViewItem m = new ListViewItem("");
70 | m.SubItems.Add(Index.ToString());
71 | m.SubItems.Add(Loop.ToString());
72 | m.SubItems.Add(NrPoit.ToString());
73 | return m;
74 | }
75 | [Category("Path")]
76 | public Byte Index { get; set; }
77 | [Category("Path")]
78 | [Description("Specifies whether this route loops or not.")]
79 | [BinaryBooleanSize(BooleanSize.U8)]
80 | public Boolean Loop { get; set; }
81 | [Category("Path"), DisplayName("Nr Poit")]
82 | [Description("The number of POIT entries that belong to this route.")]
83 | public Int16 NrPoit { get; set; }
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/MarioKart/MK7/KMP/CKPT.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 | using System.Windows.Forms;
7 | using System.IO;
8 | using LibEveryFileExplorer.GameData;
9 | using LibEveryFileExplorer.Files;
10 | using LibEveryFileExplorer;
11 | using LibEveryFileExplorer.IO;
12 |
13 | namespace MarioKart.MK7.KMP
14 | {
15 | public class CKPT : GameDataSection
16 | {
17 | public CKPT() { Signature = "TPKC"; }
18 | public CKPT(EndianBinaryReaderEx er)
19 | {
20 | Signature = er.ReadString(Encoding.ASCII, 4);
21 | if (Signature != "TPKC") throw new SignatureNotCorrectException(Signature, "TPKC", er.BaseStream.Position - 4);
22 | NrEntries = er.ReadUInt32();
23 | for (int i = 0; i < NrEntries; i++) Entries.Add(new CKPTEntry(er));
24 | }
25 |
26 | public override String[] GetColumnNames()
27 | {
28 | return new String[] {
29 | "ID",
30 | "X1", "Z1",
31 | "X2", "Z2",
32 | "Respawn Id",
33 | "Type",
34 | "Previous",
35 | "Next",
36 | "?",
37 | "?",
38 | "?",
39 | "?"
40 | };
41 | }
42 | public class CKPTEntry : GameDataSectionEntry
43 | {
44 | public CKPTEntry()
45 | {
46 | Type = 0xFF;
47 | Unknown2 = 0xFF;
48 | }
49 | public CKPTEntry(EndianBinaryReaderEx er)
50 | {
51 | er.ReadObject(this);
52 | }
53 |
54 | public override ListViewItem GetListViewItem()
55 | {
56 | ListViewItem m = new ListViewItem("");
57 | m.SubItems.Add(Point1.X.ToString());
58 | m.SubItems.Add(Point1.Y.ToString());
59 |
60 | m.SubItems.Add(Point2.X.ToString());
61 | m.SubItems.Add(Point2.Y.ToString());
62 |
63 | m.SubItems.Add(RespawnId.ToString());
64 | m.SubItems.Add(Type.ToString());
65 | m.SubItems.Add(Previous.ToString());
66 | m.SubItems.Add(Next.ToString());
67 |
68 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown1));
69 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown2));
70 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown3));
71 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown4));
72 | return m;
73 | }
74 | public Vector2 Point1 { get; set; }
75 | public Vector2 Point2 { get; set; }
76 | public Byte RespawnId { get; set; }
77 | public Byte Type { get; set; }
78 | public Byte Previous { get; set; }
79 | public Byte Next { get; set; }
80 | public Byte Unknown1 { get; set; }
81 | public Byte Unknown2 { get; set; }
82 | public Byte Unknown3 { get; set; }
83 | public Byte Unknown4 { get; set; }
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/NDS/UI/MDL0MaterialEditor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using NDS.NitroSystem.G3D;
10 | using LibEveryFileExplorer.GFX;
11 |
12 | namespace NDS.UI
13 | {
14 | public partial class MDL0MaterialEditor : UserControl
15 | {
16 | MDL0.Model.MaterialSet.Material Material;
17 | public MDL0MaterialEditor(MDL0.Model.MaterialSet.Material Material)
18 | {
19 | this.Material = Material;
20 | InitializeComponent();
21 | }
22 |
23 | private void MDL0MaterialEditor_Load(object sender, EventArgs e)
24 | {
25 | checkBox3.Checked = (Material.polyAttr & 1) != 0;
26 | checkBox4.Checked = (Material.polyAttr & 2) != 0;
27 | checkBox5.Checked = (Material.polyAttr & 4) != 0;
28 | checkBox6.Checked = (Material.polyAttr & 8) != 0;
29 | comboBox1.SelectedIndex = (int)((Material.polyAttr >> 4) & 0x3);
30 | comboBox2.SelectedIndex = (int)((Material.polyAttr >> 6) & 0x3);
31 | checkBox7.Checked = ((Material.polyAttr >> 11) & 0x1) == 1;
32 | checkBox8.Checked = ((Material.polyAttr >> 12) & 0x1) == 1;
33 | checkBox9.Checked = ((Material.polyAttr >> 13) & 0x1) == 1;
34 | comboBox3.SelectedIndex = (int)((Material.polyAttr >> 14) & 0x1);
35 | checkBox10.Checked = ((Material.polyAttr >> 15) & 0x1) == 1;
36 | trackBar1.Value = (int)((Material.polyAttr >> 16) & 31);
37 | trackBar2.Value = (int)((Material.polyAttr >> 24) & 63);
38 |
39 | checkBox1.Checked = (Material.diffAmb & 0x8000) != 0;
40 | button1.BackColor = Color.FromArgb((int)GFXUtil.ConvertColorFormat(Material.diffAmb & 0x7FFF, ColorFormat.XBGR1555, ColorFormat.ARGB8888));//(int)GFXUtil.XBGR1555ToArgb((ushort)(Material.diffAmb & 0x7FFF)));
41 | button2.BackColor = Color.FromArgb((int)GFXUtil.ConvertColorFormat((Material.diffAmb >> 16) & 0x7FFF, ColorFormat.XBGR1555, ColorFormat.ARGB8888));
42 |
43 | checkBox2.Checked = (Material.specEmi & 0x8000) != 0;
44 | button3.BackColor = Color.FromArgb((int)GFXUtil.ConvertColorFormat(Material.specEmi & 0x7FFF, ColorFormat.XBGR1555, ColorFormat.ARGB8888));
45 | button4.BackColor = Color.FromArgb((int)GFXUtil.ConvertColorFormat((Material.specEmi >> 16) & 0x7FFF, ColorFormat.XBGR1555, ColorFormat.ARGB8888));
46 |
47 | uint wrapS = (Material.texImageParam >> 16) & 1;
48 | if (wrapS != 0) wrapS += (Material.texImageParam >> 18) & 1;
49 | comboBox4.SelectedIndex = (int)wrapS;
50 | uint wrapT = (Material.texImageParam >> 17) & 1;
51 | if (wrapT != 0) wrapT += (Material.texImageParam >> 19) & 1;
52 | comboBox5.SelectedIndex = (int)wrapT;
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/MarioKart/MK7/KMP/CKPH.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 | using System.Windows.Forms;
7 | using System.IO;
8 | using LibEveryFileExplorer.GameData;
9 | using LibEveryFileExplorer.Files;
10 | using LibEveryFileExplorer;
11 | using LibEveryFileExplorer.IO;
12 | using LibEveryFileExplorer.IO.Serialization;
13 |
14 | namespace MarioKart.MK7.KMP
15 | {
16 | public class CKPH : GameDataSection
17 | {
18 | public CKPH() { Signature = "HPKC"; }
19 | public CKPH(EndianBinaryReaderEx er)
20 | {
21 | Signature = er.ReadString(Encoding.ASCII, 4);
22 | if (Signature != "HPKC") throw new SignatureNotCorrectException(Signature, "HPKC", er.BaseStream.Position - 4);
23 | NrEntries = er.ReadUInt32();
24 | for (int i = 0; i < NrEntries; i++) Entries.Add(new CKPHEntry(er));
25 | }
26 |
27 | public override String[] GetColumnNames()
28 | {
29 | return new String[] {
30 | "ID",
31 | "Start",
32 | "Length",
33 | "Previous 1","Previous 2","Previous 3","Previous 4","Previous 5","Previous 6",
34 | "Next 1","Next 2","Next 3","Next 4","Next 5","Next 6",
35 | "?"
36 | };
37 | }
38 | public class CKPHEntry : GameDataSectionEntry
39 | {
40 | public CKPHEntry()
41 | {
42 | Previous = new sbyte[] { -1, -1, -1, -1, -1, -1 };
43 | Next = new sbyte[] { -1, -1, -1, -1, -1, -1 };
44 | }
45 | public CKPHEntry(EndianBinaryReaderEx er)
46 | {
47 | er.ReadObject(this);
48 | }
49 |
50 | public override ListViewItem GetListViewItem()
51 | {
52 | ListViewItem m = new ListViewItem("");
53 | m.SubItems.Add(Start.ToString());
54 | m.SubItems.Add(Length.ToString());
55 | m.SubItems.Add(Previous[0].ToString());
56 | m.SubItems.Add(Previous[1].ToString());
57 | m.SubItems.Add(Previous[2].ToString());
58 | m.SubItems.Add(Previous[3].ToString());
59 | m.SubItems.Add(Previous[4].ToString());
60 | m.SubItems.Add(Previous[5].ToString());
61 | m.SubItems.Add(Next[0].ToString());
62 | m.SubItems.Add(Next[1].ToString());
63 | m.SubItems.Add(Next[2].ToString());
64 | m.SubItems.Add(Next[3].ToString());
65 | m.SubItems.Add(Next[4].ToString());
66 | m.SubItems.Add(Next[5].ToString());
67 |
68 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown));
69 | return m;
70 | }
71 | public Byte Start { get; set; }
72 | public Byte Length { get; set; }
73 | [BinaryFixedSize(6)]
74 | public SByte[] Previous { get; set; }//6
75 | [BinaryFixedSize(6)]
76 | public SByte[] Next { get; set; }//6
77 | public UInt16 Unknown { get; set; }
78 | }
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/EveryFileExplorerUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Drawing;
6 | using System.Windows.Forms;
7 | using LibEveryFileExplorer.Files;
8 | using System.Runtime.InteropServices;
9 |
10 | namespace LibEveryFileExplorer
11 | {
12 | public class EveryFileExplorerUtil
13 | {
14 | public static dynamic Program = ((dynamic)new LibEveryFileExplorer.StaticDynamic(System.Reflection.Assembly.GetEntryAssembly().GetType("EveryFileExplorer.Program")));
15 |
16 | public static void DisableFileDependencyDialog()
17 | {
18 | Program.FileManager.DisableFileDependencyDialog();
19 | }
20 |
21 | public static String[] GetFileCategories()
22 | {
23 | List s = new List();
24 | foreach (dynamic p in Program.PluginManager.Plugins)
25 | {
26 | foreach (Type t in p.FileFormatTypes)
27 | {
28 | dynamic q = new StaticDynamic(t);
29 | String v = q.Identifier.GetCategory();
30 | if (!s.Contains(v)) s.Add(v);
31 | }
32 | }
33 | s.Sort();
34 | s.Insert(0, "Folders");
35 | return s.ToArray();
36 | }
37 |
38 | public static Dictionary GetFileIcons()
39 | {
40 | Dictionary s = new Dictionary();
41 | foreach (dynamic p in Program.PluginManager.Plugins)
42 | {
43 | foreach (Type t in p.FileFormatTypes)
44 | {
45 | dynamic q = new StaticDynamic(t);
46 | Bitmap v = q.Identifier.GetIcon();
47 | if (v != null) s.Add(t.ToString(), v);
48 | }
49 | }
50 | return s;
51 | }
52 |
53 | public static ListViewItem GetFileItem(EFEFile File)
54 | {
55 | Type[] formats = Program.FileManager.GetPossibleFormats(File);
56 | ListViewItem i = new ListViewItem(File.Name);
57 | StringBuilder b = new StringBuilder(50);
58 | Win32Util.StrFormatByteSize(File.Data.Length, b, 50);
59 | i.SubItems.Add(b.ToString());
60 | if (formats.Length == 1)
61 | {
62 | i.ImageKey = formats[0].ToString();
63 | dynamic q = new StaticDynamic(formats[0]);
64 | i.Tag = q.Identifier.GetCategory();
65 | }
66 | if (File.IsCompressed) i.ForeColor = Color.Blue;
67 | return i;
68 | }
69 |
70 | public static void OpenFile(EFEFile File, EFEFile Parent = null)
71 | {
72 | Program.FileManager.OpenFile(File, Parent);
73 | }
74 |
75 | public static ViewableFile[] GetOpenFilesOfType(Type FileType)
76 | {
77 | return Program.FileManager.GetOpenFilesOfType(FileType);
78 | }
79 |
80 | public static ViewableFile GetViewableFileFromFile(EFEFile File)
81 | {
82 | return Program.FileManager.GetViewableFileFromFile(File);
83 | }
84 |
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Files/EFEFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using System.Runtime.InteropServices;
7 | using LibEveryFileExplorer.Compression;
8 |
9 | namespace LibEveryFileExplorer.Files
10 | {
11 | public abstract class EFEFile
12 | {
13 | public EFEFile()
14 | {
15 | Children = new List();
16 | }
17 |
18 | public CompressionFormatBase CompressionFormat { get; private set; }
19 |
20 | public byte[] Data { get; set; }
21 |
22 | public bool IsCompressed { get; private set; }
23 |
24 | public String Name { get; set; }
25 |
26 | public EFEFile Parent { get; set; }
27 |
28 | public List Children { get; private set; }
29 |
30 | public abstract void Save();
31 |
32 | protected void PrepareDataForUse(byte[] FileData)
33 | {
34 | List Compressions = new List();
35 | foreach (dynamic p in EveryFileExplorerUtil.Program.PluginManager.Plugins)
36 | {
37 | foreach (Type t in p.CompressionTypes)
38 | {
39 | dynamic c = new LibEveryFileExplorer.StaticDynamic(t);
40 | if (c.Identifier.IsFormat(FileData)) Compressions.Add(t);
41 | }
42 | }
43 | IsCompressed = false;
44 | CompressionFormat = null;
45 | if (Compressions.Count == 1)
46 | {
47 | CompressionFormatBase c = (CompressionFormatBase)Compressions[0].InvokeMember("", System.Reflection.BindingFlags.CreateInstance, null, null, new object[0]);
48 | try
49 | {
50 | byte[] Result = c.Decompress(FileData);
51 | IsCompressed = true;
52 | CompressionFormat = c;
53 | FileData = Result;
54 | }
55 | catch { }
56 | }
57 | else if (Compressions.Count > 1)
58 | {
59 | foreach (Type t in Compressions)
60 | {
61 | CompressionFormatBase c = (CompressionFormatBase)t.InvokeMember("", System.Reflection.BindingFlags.CreateInstance, null, null, new object[0]);
62 | try
63 | {
64 | byte[] Result = c.Decompress(FileData);
65 | IsCompressed = true;
66 | CompressionFormat = c;
67 | FileData = Result;
68 | break;
69 | }
70 | catch { }
71 | }
72 | }
73 | Data = FileData;
74 | }
75 |
76 | protected byte[] GetDataForSave()
77 | {
78 | if (IsCompressed)
79 | {
80 | if (CompressionFormat is ICompressable)
81 | {
82 | return ((ICompressable)CompressionFormat).Compress(Data);
83 | }
84 | else throw new Exception("This file uses a compression method that has no compression implemented!");
85 | }
86 | return Data;
87 | }
88 |
89 | public abstract byte[] FindFileRelative(String Path);
90 |
91 | public abstract override bool Equals(object obj);
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/GFX/PaletteUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Drawing;
6 |
7 | namespace LibEveryFileExplorer.GFX
8 | {
9 | public class PaletteUtil
10 | {
11 | //Very slow for big images!
12 | public static uint[] GeneratePalette(uint[] Colors, int NrOutputColors, int NrOutputBits = 8, bool FirstTransparent = false)
13 | {
14 | List UniqueColors = new List();
15 | if (NrOutputBits > 8) NrOutputBits = 8;
16 | if (NrOutputBits < 1) NrOutputBits = 1;
17 | uint mask = (uint)(~((1 << (8 - NrOutputBits)) - 1)) & 0xFF;
18 | foreach (uint color in Colors)
19 | {
20 | uint a = (color >> 24) & mask;
21 | if (a < 127) continue;
22 | uint r = (color >> 16) & mask;
23 | uint g = (color >> 8) & mask;
24 | uint b = (color >> 0) & mask;
25 | UniqueColors.Add(Color.FromArgb(255, (int)r, (int)g, (int)b));
26 | }
27 | UniqueColors = UniqueColors.Distinct().ToList();
28 | while (UniqueColors.Count > NrOutputColors - (FirstTransparent ? 1 : 0))
29 | {
30 | float mindiff = float.MaxValue;
31 | int amin = -1;
32 | int bmin = -1;
33 | for (int a = 0; a < UniqueColors.Count; a++)
34 | {
35 | for (int c = a + 1; c < UniqueColors.Count; c++)
36 | {
37 | //if (a == c) continue;
38 | float diff = ColorDifference(UniqueColors[a], UniqueColors[c]);
39 | if (diff < mindiff)
40 | {
41 | mindiff = diff;
42 | amin = a;
43 | bmin = c;
44 | //if (diff < 2) goto go;
45 | //if (diff < 30) goto go;
46 | if (diff < 700) goto go;
47 | //if (diff < 650) goto go;
48 | //if (diff < 900) goto go;//30) goto go;
49 | }
50 | }
51 | }
52 | go:
53 | Color e = ColorMean(UniqueColors[amin], UniqueColors[bmin]);
54 | UniqueColors.RemoveAt(amin);
55 | if (bmin > amin) bmin--;
56 | UniqueColors.RemoveAt(bmin);
57 | UniqueColors.Add(e);
58 | }
59 | if (FirstTransparent)// && Colors[0].A != 0)
60 | {
61 | UniqueColors.Insert(0, Color.Transparent);
62 | }
63 | UniqueColors.AddRange(new Color[NrOutputColors - UniqueColors.Count]);
64 | List Result = new List();
65 | foreach (Color c in UniqueColors)
66 | {
67 | Result.Add((uint)c.ToArgb());
68 | }
69 | return Result.ToArray();
70 | }
71 |
72 | private static int ColorDifference(Color a, Color b)
73 | {
74 | int rr = a.R - b.R;
75 | int gg = a.G - b.G;
76 | int bb = a.B - b.B;
77 | return rr * rr + gg * gg + bb * bb;
78 | }
79 |
80 | private static Color ColorMean(Color a, Color b)
81 | {
82 | return Color.FromArgb((a.R + b.R) / 2, (a.G + b.G) / 2, (a.B + b.B) / 2);
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Collections/Matrix43.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Collections
7 | {
8 | public struct Matrix43
9 | {
10 | public static readonly Matrix43 Identity = new Matrix43(new float[] { 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 });
11 |
12 | public Matrix43(params float[] Matrix)
13 | {
14 | if (Matrix == null || Matrix.Length != 12) throw new ArgumentException();
15 | row0 = new Vector3();
16 | row1 = new Vector3();
17 | row2 = new Vector3();
18 | row3 = new Vector3();
19 | for (int i = 0; i < 12; i++)
20 | {
21 | this[i / 3, i % 3] = Matrix[i];
22 | }
23 | }
24 |
25 | private Vector3 row0;
26 | private Vector3 row1;
27 | private Vector3 row2;
28 | private Vector3 row3;
29 |
30 | public float this[int index]
31 | {
32 | get { return this[index / 3, index % 3]; }
33 | set { this[index / 3, index % 3] = value; }
34 | }
35 |
36 | public float this[int row, int column]
37 | {
38 | get
39 | {
40 | switch (row)
41 | {
42 | case 0: return row0[column];
43 | case 1: return row1[column];
44 | case 2: return row2[column];
45 | case 3: return row3[column];
46 | }
47 | throw new IndexOutOfRangeException();
48 | }
49 | set
50 | {
51 | switch (row)
52 | {
53 | case 0: row0[column] = value; return;
54 | case 1: row1[column] = value; return;
55 | case 2: row2[column] = value; return;
56 | case 3: row3[column] = value; return;
57 | }
58 | throw new IndexOutOfRangeException();
59 | }
60 | }
61 |
62 | public static Matrix43 operator *(Matrix43 Left, Matrix43 Right)
63 | {
64 | Matrix44 l = new Matrix44(Left, new Vector4(0, 0, 0, 1));
65 | Matrix44 r = new Matrix44(Right, new Vector4(0, 0, 0, 1));
66 | Matrix44 Result = l * r;
67 | Matrix43 result2 = new Matrix43();
68 | for (int row = 0; row < 4; row++)
69 | {
70 | for (int col = 0; col < 3; col++)
71 | {
72 | result2[row, col] = Result[row,col];
73 | }
74 | }
75 | return result2;
76 | }
77 |
78 | public static Matrix43 operator *(Matrix43 Left, float Right)
79 | {
80 | for (int row = 0; row < 4; row++)
81 | {
82 | for (int col = 0; col < 3; col++)
83 | {
84 | Left[row, col] *= Right;
85 | }
86 | }
87 | return Left;
88 | }
89 |
90 | public static Matrix43 operator *(float Left, Matrix43 Right)
91 | {
92 | for (int row = 0; row < 4; row++)
93 | {
94 | for (int col = 0; col < 3; col++)
95 | {
96 | Right[row, col] *= Left;
97 | }
98 | }
99 | return Right;
100 | }
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/NDS/Nitro/CRC16.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace NDS.Nitro
7 | {
8 | public class CRC16
9 | {
10 | private readonly static ushort[] CRC16Table =
11 | {
12 | 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,
13 | 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440,
14 | 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40,
15 | 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841,
16 | 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40,
17 | 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41,
18 | 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641,
19 | 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040,
20 | 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240,
21 | 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441,
22 | 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41,
23 | 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840,
24 | 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41,
25 | 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40,
26 | 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640,
27 | 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041,
28 | 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240,
29 | 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441,
30 | 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41,
31 | 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840,
32 | 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41,
33 | 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40,
34 | 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640,
35 | 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041,
36 | 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241,
37 | 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440,
38 | 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40,
39 | 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841,
40 | 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40,
41 | 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41,
42 | 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641,
43 | 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040
44 | };
45 |
46 | public static ushort GetCRC16(byte[] Data)
47 | {
48 | ushort result = 0xFFFF;
49 | for (int i = 0; i < Data.Length; i++)
50 | {
51 | result = (ushort)((result >> 8) ^ CRC16Table[(result ^ Data[i]) & 0xFF]);
52 | }
53 | return (ushort)result;
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/MarioKart/MK7/KMP/GLPH.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.Collections;
6 | using System.Windows.Forms;
7 | using System.IO;
8 | using LibEveryFileExplorer.GameData;
9 | using LibEveryFileExplorer.Files;
10 | using LibEveryFileExplorer;
11 | using LibEveryFileExplorer.IO;
12 | using LibEveryFileExplorer.IO.Serialization;
13 |
14 | namespace MarioKart.MK7.KMP
15 | {
16 | public class GLPH : GameDataSection
17 | {
18 | public GLPH() { Signature = "HPLG"; }
19 | public GLPH(EndianBinaryReaderEx er)
20 | {
21 | Signature = er.ReadString(Encoding.ASCII, 4);
22 | if (Signature != "HPLG") throw new SignatureNotCorrectException(Signature, "HPLG", er.BaseStream.Position - 4);
23 | NrEntries = er.ReadUInt32();
24 | for (int i = 0; i < NrEntries; i++) Entries.Add(new GLPHEntry(er));
25 | }
26 |
27 | public override String[] GetColumnNames()
28 | {
29 | return new String[] {
30 | "ID",
31 | "Start",
32 | "Length",
33 | "Previous 1","Previous 2","Previous 3","Previous 4","Previous 5","Previous 6",
34 | "Next 1","Next 2","Next 3","Next 4","Next 5","Next 6",
35 | "?",
36 | "?"
37 | };
38 | }
39 | public class GLPHEntry : GameDataSectionEntry
40 | {
41 | public GLPHEntry()
42 | {
43 | Previous = new sbyte[] { -1, -1, -1, -1, -1, -1, -1, -1 };
44 | Next = new sbyte[] { -1, -1, -1, -1, -1, -1, -1, -1 };
45 | }
46 | public GLPHEntry(EndianBinaryReaderEx er)
47 | {
48 | er.ReadObject(this);
49 | }
50 |
51 | public override ListViewItem GetListViewItem()
52 | {
53 | ListViewItem m = new ListViewItem("");
54 | m.SubItems.Add(Start.ToString());
55 | m.SubItems.Add(Length.ToString());
56 | m.SubItems.Add(Previous[0].ToString());
57 | m.SubItems.Add(Previous[1].ToString());
58 | m.SubItems.Add(Previous[2].ToString());
59 | m.SubItems.Add(Previous[3].ToString());
60 | m.SubItems.Add(Previous[4].ToString());
61 | m.SubItems.Add(Previous[5].ToString());
62 | m.SubItems.Add(Next[0].ToString());
63 | m.SubItems.Add(Next[1].ToString());
64 | m.SubItems.Add(Next[2].ToString());
65 | m.SubItems.Add(Next[3].ToString());
66 | m.SubItems.Add(Next[4].ToString());
67 | m.SubItems.Add(Next[5].ToString());
68 |
69 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown1));
70 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown2));
71 | return m;
72 | }
73 | public Byte Start { get; set; }
74 | public Byte Length { get; set; }
75 | [BinaryFixedSize(6)]
76 | public SByte[] Previous { get; set; }//6
77 | [BinaryFixedSize(6)]
78 | public SByte[] Next { get; set; }//6
79 | public UInt32 Unknown1 { get; set; }
80 | public UInt32 Unknown2 { get; set; }
81 | }
82 | }
83 | }
--------------------------------------------------------------------------------
/3DS/UI/CSTMViewer.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace _3DS.UI
2 | {
3 | partial class CSTMViewer
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.groupBox1 = new System.Windows.Forms.GroupBox();
32 | this.wavePlayer1 = new CommonFiles.UI.WavePlayer();
33 | this.groupBox1.SuspendLayout();
34 | this.SuspendLayout();
35 | //
36 | // groupBox1
37 | //
38 | this.groupBox1.AutoSize = true;
39 | this.groupBox1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
40 | this.groupBox1.Controls.Add(this.wavePlayer1);
41 | this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
42 | this.groupBox1.Location = new System.Drawing.Point(0, 0);
43 | this.groupBox1.Name = "groupBox1";
44 | this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 6);
45 | this.groupBox1.Size = new System.Drawing.Size(397, 48);
46 | this.groupBox1.TabIndex = 1;
47 | this.groupBox1.TabStop = false;
48 | this.groupBox1.Text = "Preview";
49 | //
50 | // wavePlayer1
51 | //
52 | this.wavePlayer1.Dock = System.Windows.Forms.DockStyle.Top;
53 | this.wavePlayer1.Location = new System.Drawing.Point(3, 16);
54 | this.wavePlayer1.Name = "wavePlayer1";
55 | this.wavePlayer1.Size = new System.Drawing.Size(391, 26);
56 | this.wavePlayer1.TabIndex = 0;
57 | //
58 | // CSTMViewer
59 | //
60 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
61 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
62 | this.ClientSize = new System.Drawing.Size(397, 241);
63 | this.Controls.Add(this.groupBox1);
64 | this.Name = "CSTMViewer";
65 | this.Text = "CSTMViewer";
66 | this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.CSTMViewer_FormClosed);
67 | this.Load += new System.EventHandler(this.CSTMViewer_Load);
68 | this.groupBox1.ResumeLayout(false);
69 | this.ResumeLayout(false);
70 | this.PerformLayout();
71 |
72 | }
73 |
74 | #endregion
75 |
76 | private CommonFiles.UI.WavePlayer wavePlayer1;
77 | private System.Windows.Forms.GroupBox groupBox1;
78 | }
79 | }
--------------------------------------------------------------------------------
/MarioKart/MKDS/NKM/MEPO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.GameData;
6 | using System.IO;
7 | using LibEveryFileExplorer.Files;
8 | using LibEveryFileExplorer.Collections;
9 | using System.Windows.Forms;
10 | using LibEveryFileExplorer;
11 | using System.ComponentModel;
12 | using LibEveryFileExplorer.ComponentModel;
13 | using LibEveryFileExplorer.IO;
14 | using LibEveryFileExplorer.IO.Serialization;
15 |
16 | namespace MarioKart.MKDS.NKM
17 | {
18 | public class MEPO : GameDataSection
19 | {
20 | public MEPO() { Signature = "MEPO"; }
21 | public MEPO(EndianBinaryReaderEx er)
22 | {
23 | Signature = er.ReadString(Encoding.ASCII, 4);
24 | if (Signature != "MEPO") throw new SignatureNotCorrectException(Signature, "MEPO", er.BaseStream.Position - 4);
25 | NrEntries = er.ReadUInt32();
26 | for (int i = 0; i < NrEntries; i++) Entries.Add(new MEPOEntry(er));
27 | }
28 |
29 | public void Write(EndianBinaryWriter er)
30 | {
31 | er.Write(Signature, Encoding.ASCII, false);
32 | NrEntries = (uint)Entries.Count;
33 | er.Write(NrEntries);
34 | for (int i = 0; i < NrEntries; i++) Entries[i].Write(er);
35 | }
36 |
37 | public override String[] GetColumnNames()
38 | {
39 | return new String[] {
40 | "ID",
41 | "X", "Y", "Z",
42 | "Point Size",
43 | "Drifting",
44 | "?"
45 | };
46 | }
47 |
48 | public class MEPOEntry : GameDataSectionEntry
49 | {
50 | public MEPOEntry()
51 | {
52 |
53 | }
54 | public MEPOEntry(EndianBinaryReaderEx er)
55 | {
56 | er.ReadObject(this);
57 | }
58 |
59 | public override void Write(EndianBinaryWriter er)
60 | {
61 | er.WriteVecFx32(Position);
62 | er.WriteFx32(PointSize);
63 | er.Write(Drifting);
64 | er.Write(Unknown1);
65 | }
66 |
67 | public override ListViewItem GetListViewItem()
68 | {
69 | ListViewItem m = new ListViewItem("");
70 | m.SubItems.Add(Position.X.ToString("#####0.############"));
71 | m.SubItems.Add(Position.Y.ToString("#####0.############"));
72 | m.SubItems.Add(Position.Z.ToString("#####0.############"));
73 |
74 | m.SubItems.Add(PointSize.ToString("#####0.############"));
75 |
76 | m.SubItems.Add(Drifting.ToString());
77 |
78 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown1));
79 | return m;
80 | }
81 | [Category("Transformation")]
82 | [BinaryFixedPoint(true, 19, 12)]
83 | public Vector3 Position { get; set; }
84 | [Category("Enemy Point"), DisplayName("Point Size")]
85 | [BinaryFixedPoint(true, 19, 12)]
86 | public Single PointSize { get; set; }
87 | [Category("Enemy Point")]
88 | public Int32 Drifting { get; set; }
89 | [TypeConverter(typeof(HexTypeConverter)), HexReversed]
90 | public UInt32 Unknown1 { get; set; }
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/MarioKart/MKDS/NKM/IPOI.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using LibEveryFileExplorer.GameData;
6 | using System.IO;
7 | using LibEveryFileExplorer.Files;
8 | using LibEveryFileExplorer.Collections;
9 | using System.Windows.Forms;
10 | using LibEveryFileExplorer;
11 | using System.ComponentModel;
12 | using LibEveryFileExplorer.ComponentModel;
13 | using LibEveryFileExplorer.IO;
14 | using LibEveryFileExplorer.IO.Serialization;
15 |
16 | namespace MarioKart.MKDS.NKM
17 | {
18 | public class IPOI : GameDataSection
19 | {
20 | public IPOI() { Signature = "IPOI"; }
21 | public IPOI(EndianBinaryReaderEx er, UInt16 Version)
22 | {
23 | Signature = er.ReadString(Encoding.ASCII, 4);
24 | if (Signature != "IPOI") throw new SignatureNotCorrectException(Signature, "IPOI", er.BaseStream.Position - 4);
25 | NrEntries = er.ReadUInt32();
26 | for (int i = 0; i < NrEntries; i++) Entries.Add(new IPOIEntry(er, Version));
27 | }
28 |
29 | public void Write(EndianBinaryWriter er)
30 | {
31 | er.Write(Signature, Encoding.ASCII, false);
32 | NrEntries = (uint)Entries.Count;
33 | er.Write(NrEntries);
34 | for (int i = 0; i < NrEntries; i++) Entries[i].Write(er);
35 | }
36 |
37 | public override String[] GetColumnNames()
38 | {
39 | return new String[] {
40 | "ID",
41 | "X", "Y", "Z",
42 | "Point Size",
43 | "?"
44 | };
45 | }
46 |
47 | public class IPOIEntry : GameDataSectionEntry
48 | {
49 | private UInt16 Version = 37;
50 | public IPOIEntry()
51 | {
52 |
53 | }
54 | public IPOIEntry(EndianBinaryReaderEx er, UInt16 Version)
55 | {
56 | this.Version = Version;
57 | Position = er.ReadVecFx32();
58 | PointSize = er.ReadFx32();
59 | if (Version >= 34) Unknown2 = er.ReadUInt32();
60 | }
61 |
62 | public override void Write(EndianBinaryWriter er)
63 | {
64 | er.WriteVecFx32(Position);
65 | er.WriteFx32(PointSize);
66 | if (Version >= 34) er.Write(Unknown2);
67 | }
68 |
69 | public override ListViewItem GetListViewItem()
70 | {
71 | ListViewItem m = new ListViewItem("");
72 | m.SubItems.Add(Position.X.ToString("#####0.############"));
73 | m.SubItems.Add(Position.Y.ToString("#####0.############"));
74 | m.SubItems.Add(Position.Z.ToString("#####0.############"));
75 |
76 | m.SubItems.Add(PointSize.ToString("#####0.############"));
77 | m.SubItems.Add(HexUtil.GetHexReverse(Unknown2));
78 | return m;
79 | }
80 | [Category("Transformation")]
81 | [BinaryFixedPoint(true, 19, 12)]
82 | public Vector3 Position { get; set; }
83 | [Category("Item Point")]
84 | [BinaryFixedPoint(true, 19, 12)]
85 | public Single PointSize { get; set; }
86 | [TypeConverter(typeof(HexTypeConverter)), HexReversed]
87 | public UInt32 Unknown2 { get; set; }
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/MarioKart/UI/MapViewer/MKDSMiniGameEnemyPointLineRenderGroup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using MarioKart.MKDS.NKM;
6 | using System.Drawing;
7 | using Tao.OpenGl;
8 |
9 | namespace MarioKart.UI.MapViewer
10 | {
11 | public class MKDSMiniGameEnemyPointLineRenderGroup : RenderGroup
12 | {
13 | MEPO MiniGameEnemyPoints;
14 | MEPA MiniGameEnemyPointPaths;
15 |
16 | public MKDSMiniGameEnemyPointLineRenderGroup(MEPO MiniGameEnemyPoints, MEPA MiniGameEnemyPointPaths, Color LineColor)
17 | {
18 | this.MiniGameEnemyPoints = MiniGameEnemyPoints;
19 | this.MiniGameEnemyPointPaths = MiniGameEnemyPointPaths;
20 | this.LineColor = LineColor;
21 | }
22 |
23 | public Color LineColor { get; private set; }
24 |
25 | public override bool Interactable { get { return false; } }
26 |
27 | public override void Render(object[] Selection, bool Picking, int PickingId)
28 | {
29 | if (Picking) return;
30 | Gl.glLineWidth(1.5f);
31 | Gl.glBegin(Gl.GL_LINES);
32 | Gl.glColor3f(LineColor.R / 255f, LineColor.G / 255f, LineColor.B / 255f);
33 | for (int j = 0; j < MiniGameEnemyPointPaths.Entries.Count; j++)
34 | {
35 | if (MiniGameEnemyPoints.Entries.Count < MiniGameEnemyPointPaths[j].StartIndex + MiniGameEnemyPointPaths[j].Length) break;
36 | for (int i = MiniGameEnemyPointPaths[j].StartIndex; i < MiniGameEnemyPointPaths.Entries[j].StartIndex + MiniGameEnemyPointPaths[j].Length - 1; i++)
37 | {
38 | Gl.glVertex2f(MiniGameEnemyPoints[i].Position.X, MiniGameEnemyPoints[i].Position.Z);
39 | Gl.glVertex2f(MiniGameEnemyPoints[i + 1].Position.X, MiniGameEnemyPoints[i + 1].Position.Z);
40 | }
41 |
42 | for (int i = 0; i < 8; i++)
43 | {
44 | if (MiniGameEnemyPointPaths[j].GoesTo[i] == 0xFF || MiniGameEnemyPointPaths[j].GoesTo[i] >= MiniGameEnemyPoints.Entries.Count) continue;
45 | Gl.glVertex2f(MiniGameEnemyPoints[MiniGameEnemyPointPaths[j].StartIndex + MiniGameEnemyPointPaths[j].Length - 1].Position.X, MiniGameEnemyPoints[MiniGameEnemyPointPaths[j].StartIndex + MiniGameEnemyPointPaths[j].Length - 1].Position.Z);
46 | Gl.glVertex2f(MiniGameEnemyPoints[MiniGameEnemyPointPaths[j].GoesTo[i]].Position.X, MiniGameEnemyPoints[MiniGameEnemyPointPaths[j].GoesTo[i]].Position.Z);
47 | }
48 |
49 | for (int i = 0; i < 8; i++)
50 | {
51 | if (MiniGameEnemyPointPaths[j].ComesFrom[i] == 0xFF || MiniGameEnemyPointPaths[j].ComesFrom[i] >= MiniGameEnemyPoints.Entries.Count) continue;
52 | Gl.glVertex2f(MiniGameEnemyPoints[MiniGameEnemyPointPaths[j].StartIndex].Position.X, MiniGameEnemyPoints[MiniGameEnemyPointPaths[j].StartIndex].Position.Z);
53 | Gl.glVertex2f(MiniGameEnemyPoints[MiniGameEnemyPointPaths[j].ComesFrom[i]].Position.X, MiniGameEnemyPoints[MiniGameEnemyPointPaths[j].ComesFrom[i]].Position.Z);
54 | }
55 | }
56 | Gl.glEnd();
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/GCNWii/UI/U8Viewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using LibEveryFileExplorer.Files.SimpleFileSystem;
10 | using LibEveryFileExplorer.Files;
11 | using LibEveryFileExplorer;
12 |
13 | namespace GCNWii.UI
14 | {
15 | public partial class U8Viewer : Form
16 | {
17 | U8 Archive;
18 | SFSDirectory Root;
19 | public U8Viewer(U8 Archive)
20 | {
21 | Root = Archive.ToFileSystem();
22 | InitializeComponent();
23 | }
24 |
25 | private void SARCViewer_Load(object sender, EventArgs e)
26 | {
27 | fileBrowser1.UpdateDirectories(Root.GetTreeNodes());
28 | }
29 |
30 | private void fileBrowser1_OnDirectoryChanged(string Path)
31 | {
32 | var d = Root.GetDirectoryByPath(Path);
33 | fileBrowser1.UpdateContent(d.GetContent());
34 | }
35 |
36 | private void fileBrowser1_OnFileActivated(string Path)
37 | {
38 | var s = Root.GetFileByPath(Path);
39 | EveryFileExplorerUtil.OpenFile(new EFESFSFile(s), ((ViewableFile)Tag).File);
40 | }
41 |
42 | private void OnExport(object sender, EventArgs e)
43 | {
44 | var file = Root.GetFileByPath(fileBrowser1.SelectedPath);
45 | if (file == null) return;
46 | saveFileDialog1.Filter = System.IO.Path.GetExtension(fileBrowser1.SelectedPath).Replace(".", "").ToUpper() + " Files (*" + System.IO.Path.GetExtension(fileBrowser1.SelectedPath).ToLower() + ")|*" + System.IO.Path.GetExtension(fileBrowser1.SelectedPath).ToLower() + "|All Files (*.*)|*.*";
47 | saveFileDialog1.FileName = System.IO.Path.GetFileName(fileBrowser1.SelectedPath);
48 | if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK
49 | && saveFileDialog1.FileName.Length > 0)
50 | {
51 | System.IO.File.Create(saveFileDialog1.FileName).Close();
52 | System.IO.File.WriteAllBytes(saveFileDialog1.FileName, file.Data);
53 | }
54 | }
55 |
56 | private void fileBrowser1_OnSelectionChanged(object sender, EventArgs e)
57 | {
58 | menuExport.Enabled = !(fileBrowser1.SelectedPath == fileBrowser1.SelectedFolderPath);
59 | }
60 |
61 | private void fileBrowser1_OnRightClick(Point Location)
62 | {
63 | var dir = Root.GetDirectoryByPath(fileBrowser1.SelectedPath);
64 | if (dir != null)
65 | {
66 |
67 | }
68 | else
69 | {
70 | //var file = Root.GetFileByPath(fileBrowser1.SelectedPath);
71 | contextMenu1.Show(fileBrowser1, Location);
72 | }
73 | }
74 |
75 | private void menuExportDir_Click(object sender, EventArgs e)
76 | {
77 | var dir = Root.GetDirectoryByPath(fileBrowser1.SelectedFolderPath);
78 | if (folderBrowserDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK
79 | && folderBrowserDialog1.SelectedPath.Length > 0)
80 | {
81 | dir.Export(folderBrowserDialog1.SelectedPath);
82 | }
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/CommonFiles/UI/WavePlayer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using NAudio.Wave;
10 | using System.IO;
11 | using LibEveryFileExplorer.SND;
12 | using LibEveryFileExplorer.IO;
13 |
14 | namespace CommonFiles.UI
15 | {
16 | public partial class WavePlayer : UserControl
17 | {
18 | private WaveOut Output;
19 | private WaveStream Stream;
20 |
21 | private bool IsPlaying = false;
22 |
23 | public WavePlayer()
24 | {
25 | InitializeComponent();
26 | Output = new WaveOut();
27 | Output.NumberOfBuffers = 10;
28 | }
29 |
30 | public void SetWavFile(WAV Wave)
31 | {
32 | if (Wave.Wave.FMT.NrChannel > 2)
33 | {
34 | byte[] left = Wave.GetChannelData(0);
35 | byte[] right = Wave.GetChannelData(1);
36 | WAV wav2 = new WAV(SNDUtil.InterleaveChannels(IOUtil.ReadS16sLE(left, 0, left.Length / 2), IOUtil.ReadS16sLE(right, 0, right.Length / 2)), Wave.Wave.FMT.SampleRate, 16, 2);
37 | Stream = new WaveFileReader(new MemoryStream(wav2.Write()));
38 | }
39 | else
40 | {
41 | Stream = new WaveFileReader(new MemoryStream(Wave.Write()));
42 | }
43 | Output.Init(Stream);
44 | trackBar1.Maximum = (int)Math.Ceiling(Stream.TotalTime.TotalSeconds);
45 | }
46 |
47 | public void Stop()
48 | {
49 | Output.Stop();
50 | Stream.Close();
51 | Stream.Dispose();
52 | Stream = null;
53 | Output = new WaveOut();
54 | timer1.Stop();
55 | timer1.Enabled = false;
56 | }
57 |
58 | private void button1_Click(object sender, EventArgs e)
59 | {
60 | if (IsPlaying)
61 | {
62 | button1.Image = Resource.control;
63 | IsPlaying = false;
64 | Output.Pause();
65 | timer1.Stop();
66 | }
67 | else if (Output.PlaybackState == PlaybackState.Paused)
68 | {
69 | button1.Image = Resource.control_pause;
70 | Output.Resume();
71 | IsPlaying = true;
72 | timer1.Enabled = true;
73 | timer1.Start();
74 | }
75 | else
76 | {
77 | button1.Image = Resource.control_pause;
78 | Output.Play();
79 | IsPlaying = true;
80 | timer1.Enabled = true;
81 | timer1.Start();
82 | }
83 | }
84 |
85 | private void timer1_Tick(object sender, EventArgs e)
86 | {
87 | trackBar1.Value = (int)Math.Ceiling(Stream.CurrentTime.TotalSeconds);
88 | if (Stream.CurrentTime == Stream.TotalTime)
89 | {
90 | Output.Stop();
91 | trackBar1.Value = 0;
92 | Stream.Seek(0, SeekOrigin.Begin);
93 | IsPlaying = false;
94 | timer1.Stop();
95 | button1.Image = Resource.control;
96 | }
97 | }
98 |
99 | private void trackBar1_Scroll(object sender, EventArgs e)
100 | {
101 | Stream.CurrentTime = TimeSpan.FromSeconds(trackBar1.Value);
102 | }
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/3DS/UI/DARCViewer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using LibEveryFileExplorer.Files.SimpleFileSystem;
10 | using LibEveryFileExplorer.Files;
11 | using LibEveryFileExplorer;
12 | using _3DS.NintendoWare.LYT1;
13 |
14 | namespace _3DS.UI
15 | {
16 | public partial class DARCViewer : Form
17 | {
18 | DARC Archive;
19 | SFSDirectory Root;
20 | public DARCViewer(DARC Archive)
21 | {
22 | Root = Archive.ToFileSystem();
23 | InitializeComponent();
24 | }
25 |
26 | private void SARCViewer_Load(object sender, EventArgs e)
27 | {
28 | fileBrowser1.UpdateDirectories(Root.GetTreeNodes());
29 | }
30 |
31 | private void fileBrowser1_OnDirectoryChanged(string Path)
32 | {
33 | var d = Root.GetDirectoryByPath(Path);
34 | fileBrowser1.UpdateContent(d.GetContent());
35 | }
36 |
37 | private void fileBrowser1_OnFileActivated(string Path)
38 | {
39 | var s = Root.GetFileByPath(Path);
40 | EveryFileExplorerUtil.OpenFile(new EFESFSFile(s), ((ViewableFile)Tag).File);
41 | }
42 |
43 | private void OnExport(object sender, EventArgs e)
44 | {
45 | var file = Root.GetFileByPath(fileBrowser1.SelectedPath);
46 | if (file == null) return;
47 | saveFileDialog1.Filter = System.IO.Path.GetExtension(fileBrowser1.SelectedPath).Replace(".", "").ToUpper() + " Files (*" + System.IO.Path.GetExtension(fileBrowser1.SelectedPath).ToLower() + ")|*" + System.IO.Path.GetExtension(fileBrowser1.SelectedPath).ToLower() + "|All Files (*.*)|*.*";
48 | saveFileDialog1.FileName = System.IO.Path.GetFileName(fileBrowser1.SelectedPath);
49 | if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK
50 | && saveFileDialog1.FileName.Length > 0)
51 | {
52 | System.IO.File.Create(saveFileDialog1.FileName).Close();
53 | System.IO.File.WriteAllBytes(saveFileDialog1.FileName, file.Data);
54 | }
55 | }
56 |
57 | private void fileBrowser1_OnSelectionChanged(object sender, EventArgs e)
58 | {
59 | menuExport.Enabled = !(fileBrowser1.SelectedPath == fileBrowser1.SelectedFolderPath);
60 | }
61 |
62 | private void fileBrowser1_OnRightClick(Point Location)
63 | {
64 | var dir = Root.GetDirectoryByPath(fileBrowser1.SelectedPath);
65 | if (dir != null)
66 | {
67 |
68 | }
69 | else
70 | {
71 | //var file = Root.GetFileByPath(fileBrowser1.SelectedPath);
72 | contextMenu1.Show(fileBrowser1, Location);
73 | }
74 | }
75 |
76 | private void menuExportDir_Click(object sender, EventArgs e)
77 | {
78 | var dir = Root.GetDirectoryByPath(fileBrowser1.SelectedFolderPath);
79 | if (folderBrowserDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK
80 | && folderBrowserDialog1.SelectedPath.Length > 0)
81 | {
82 | dir.Export(folderBrowserDialog1.SelectedPath);
83 | }
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/GFX/DTX.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Drawing;
6 |
7 | namespace LibEveryFileExplorer.GFX
8 | {
9 | public class DTX
10 | {
11 | public static uint[] DecodeDTX1(ushort Color0, ushort Color1, uint Data)
12 | {
13 | uint[] Palette = new uint[4];
14 | Palette[0] = GFXUtil.ConvertColorFormat(Color0, ColorFormat.RGB565, ColorFormat.ARGB8888);
15 | Palette[1] = GFXUtil.ConvertColorFormat(Color1, ColorFormat.RGB565, ColorFormat.ARGB8888);
16 | Color a = Color.FromArgb((int)Palette[0]);
17 | Color b = Color.FromArgb((int)Palette[1]);
18 | if (Color0 > Color1)//1/3 and 2/3
19 | {
20 | Palette[2] = GFXUtil.ToColorFormat((a.R * 2 + b.R * 1) / 3, (a.G * 2 + b.G * 1) / 3, (a.B * 2 + b.B * 1) / 3, ColorFormat.ARGB8888);
21 | Palette[3] = GFXUtil.ToColorFormat((a.R * 1 + b.R * 2) / 3, (a.G * 1 + b.G * 2) / 3, (a.B * 1 + b.B * 2) / 3, ColorFormat.ARGB8888);
22 | }
23 | else//1/2 and transparent
24 | {
25 | Palette[2] = GFXUtil.ToColorFormat((a.R + b.R) / 2, (a.G + b.G) / 2, (a.B + b.B) / 2, ColorFormat.ARGB8888);
26 | Palette[3] = 0;
27 | }
28 |
29 | uint[] Result = new uint[4 * 4];
30 |
31 | int q = 30;
32 | for (int y = 0; y < 4; y++)
33 | {
34 | for (int x = 0; x < 4; x++)
35 | {
36 | Result[y * 4 + x] = Palette[(Data >> q) & 3];
37 | q -= 2;
38 | }
39 | }
40 | return Result;
41 | }
42 |
43 | public static uint[] DecodeDTX5(ushort Color0, ushort Color1, uint Data, ulong AData)
44 | {
45 | uint[] Result = DecodeDTX1(Color0, Color1, Data);
46 | byte[] AlphaPalette = new byte[8];
47 | AlphaPalette[0] = (byte)(AData & 0xFF);
48 | AlphaPalette[1] = (byte)((AData >> 8) & 0xFF);
49 | AData >>= 16;
50 | if (AlphaPalette[0] > AlphaPalette[1])
51 | {
52 | AlphaPalette[2] = (byte)((6 * AlphaPalette[0] + 1 * AlphaPalette[1]) / 7);
53 | AlphaPalette[3] = (byte)((5 * AlphaPalette[0] + 2 * AlphaPalette[1]) / 7);
54 | AlphaPalette[4] = (byte)((4 * AlphaPalette[0] + 3 * AlphaPalette[1]) / 7);
55 | AlphaPalette[5] = (byte)((3 * AlphaPalette[0] + 4 * AlphaPalette[1]) / 7);
56 | AlphaPalette[6] = (byte)((2 * AlphaPalette[0] + 5 * AlphaPalette[1]) / 7);
57 | AlphaPalette[7] = (byte)((1 * AlphaPalette[0] + 6 * AlphaPalette[1]) / 7);
58 | }
59 | else
60 | {
61 | AlphaPalette[2] = (byte)((4 * AlphaPalette[0] + 1 * AlphaPalette[1]) / 5);
62 | AlphaPalette[3] = (byte)((3 * AlphaPalette[0] + 2 * AlphaPalette[1]) / 5);
63 | AlphaPalette[4] = (byte)((2 * AlphaPalette[0] + 3 * AlphaPalette[1]) / 5);
64 | AlphaPalette[5] = (byte)((1 * AlphaPalette[0] + 4 * AlphaPalette[1]) / 5);
65 | AlphaPalette[6] = 0;
66 | AlphaPalette[7] = 255;
67 | }
68 | int aq = 45;
69 | for (int i = 0; i < 16; i++)
70 | {
71 | Result[i] = (Result[i] & 0xFFFFFF) | ((uint)AlphaPalette[(AData >> aq) & 7] << 24);
72 | aq -= 3;
73 | }
74 | return Result;
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/LibEveryFileExplorer/Collections/Matrix33.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace LibEveryFileExplorer.Collections
7 | {
8 | public struct Matrix33
9 | {
10 | public static readonly Matrix33 Identity = new Matrix33(new float[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 });
11 |
12 | public Matrix33(params float[] Matrix)
13 | {
14 | if (Matrix == null || Matrix.Length != 9) throw new ArgumentException();
15 | row0 = new Vector3();
16 | row1 = new Vector3();
17 | row2 = new Vector3();
18 | for (int i = 0; i < 9; i++)
19 | {
20 | this[i / 3, i % 3] = Matrix[i];
21 | }
22 | }
23 |
24 | private Vector3 row0;
25 | private Vector3 row1;
26 | private Vector3 row2;
27 |
28 | public float this[int index]
29 | {
30 | get { return this[index / 3, index % 3]; }
31 | set { this[index / 3, index % 3] = value; }
32 | }
33 |
34 | public float this[int row, int column]
35 | {
36 | get
37 | {
38 | switch (row)
39 | {
40 | case 0: return row0[column];
41 | case 1: return row1[column];
42 | case 2: return row2[column];
43 | }
44 | throw new IndexOutOfRangeException();
45 | }
46 | set
47 | {
48 | switch (row)
49 | {
50 | case 0: row0[column] = value; return;
51 | case 1: row1[column] = value; return;
52 | case 2: row2[column] = value; return;
53 | }
54 | throw new IndexOutOfRangeException();
55 | }
56 | }
57 |
58 | public static Matrix33 operator *(Matrix33 Left, Matrix33 Right)
59 | {
60 | Matrix33 result = new Matrix33();
61 | for (int row = 0; row < 3; row++)
62 | {
63 | for (int col = 0; col < 3; col++)
64 | {
65 | for (int inner = 0; inner < 3; inner++)
66 | {
67 | result[row, col] += Left[inner, col] * Right[row, inner];
68 | }
69 | }
70 | }
71 | return result;
72 | }
73 |
74 | public static Matrix33 operator *(Matrix33 Left, float Right)
75 | {
76 | for (int row = 0; row < 3; row++)
77 | {
78 | for (int col = 0; col < 3; col++)
79 | {
80 | Left[row, col] *= Right;
81 | }
82 | }
83 | return Left;
84 | }
85 |
86 | public static Matrix33 operator *(float Left, Matrix33 Right)
87 | {
88 | for (int row = 0; row < 3; row++)
89 | {
90 | for (int col = 0; col < 3; col++)
91 | {
92 | Right[row, col] *= Left;
93 | }
94 | }
95 | return Right;
96 | }
97 |
98 | public static Matrix33 CreateScale(Vector3 Scale)
99 | {
100 | Matrix33 result = Matrix33.Identity;
101 | result[0, 0] = Scale.X;
102 | result[1, 1] = Scale.Y;
103 | result[2, 2] = Scale.Z;
104 | return result;
105 | }
106 |
107 | public static explicit operator float[](Matrix33 Matrix)
108 | {
109 | float[] result = new float[9];
110 | for (int i = 0; i < 9; i++) result[i] = Matrix[i];
111 | return result;
112 | }
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/MarioKart/UI/KCLCollisionTypeSelector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using System.Globalization;
10 |
11 | namespace MarioKart.UI
12 | {
13 | public partial class KCLCollisionTypeSelector : Form
14 | {
15 | public Dictionary Mapping;
16 | public Dictionary Colli;
17 | public KCLCollisionTypeSelector(string[] names)
18 | {
19 | InitializeComponent();
20 | Mapping = new Dictionary();
21 | Colli = new Dictionary();
22 | for (int i = 0; i < names.Length; i++)
23 | {
24 | Mapping.Add(names[i], 0);
25 | Colli.Add(names[i], true);
26 | dataGridView1.Rows.Add(names[i], true, "0000");
27 | }
28 | if (Mapping.Count == 0)
29 | {
30 | Mapping.Add("Default", 0);
31 | Colli.Add("Default", true);
32 | dataGridView1.Rows.Add("Default", true, "0000");
33 | }
34 | }
35 |
36 | private void kclType_Load(object sender, EventArgs e)
37 | {
38 |
39 | }
40 |
41 | private void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
42 | {
43 | ushort hex;
44 | switch (e.ColumnIndex)
45 | {
46 | case 2:
47 | e.Cancel = !ushort.TryParse(e.FormattedValue.ToString(), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex);
48 | break;
49 | }
50 | }
51 |
52 | private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
53 | {
54 | switch (e.ColumnIndex)
55 | {
56 | case 1:
57 | Colli[dataGridView1.Rows[e.RowIndex].Cells[0].Value as string] = (bool)dataGridView1.Rows[e.RowIndex].Cells[1].Value;
58 | break;
59 | case 2:
60 | dataGridView1.Rows[e.RowIndex].Cells[2].Value = string.Format("{0:X4}", ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[2].Value as string, NumberStyles.HexNumber, CultureInfo.InvariantCulture));
61 | Mapping[dataGridView1.Rows[e.RowIndex].Cells[0].Value as string] = ushort.Parse(dataGridView1.Rows[e.RowIndex].Cells[2].Value as string, NumberStyles.HexNumber, CultureInfo.InvariantCulture);
62 | break;
63 | }
64 | }
65 |
66 | private void kclType_FormClosed(object sender, FormClosedEventArgs e)
67 | {
68 | this.DialogResult = DialogResult.OK;
69 | }
70 |
71 | private void kclType_FormClosing(object sender, FormClosingEventArgs e)
72 | {
73 | dataGridView1.EndEdit();
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------