Fields
44 | {
45 | get { return fields; }
46 | //set { }
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/s4pe/Program.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 |
21 | namespace S4PIDemoFE
22 | {
23 | using System;
24 | using System.Configuration;
25 | using System.Windows.Forms;
26 | using S4PIDemoFE.Settings;
27 |
28 | static class Program
29 | {
30 | ///
31 | /// The main entry point for the application.
32 | ///
33 | [STAThread]
34 | static int Main(params string[] args)
35 | {
36 | Application.EnableVisualStyles();
37 | Application.SetCompatibleTextRenderingDefault(false);
38 | UpdateConfiguration();
39 | UpdateChecker.DailyCheck();
40 |
41 | Application.Run(new MainForm(args));
42 |
43 | return 0;
44 | }
45 |
46 | static void UpdateConfiguration()
47 | {
48 | if( Properties.Settings.Default.UpgradeRequired ) {
49 | // Bulk migrate settings from previous version
50 | try
51 | {
52 | Properties.Settings.Default.Upgrade();
53 | Properties.Settings.Default.Reload();
54 | }
55 | catch (ConfigurationException)
56 | {
57 | // Any problems, overwrite with current!
58 | Properties.Settings.Default.Reset();
59 | }
60 |
61 | // Prevent further upgrades
62 | Properties.Settings.Default.UpgradeRequired = false;
63 | Properties.Settings.Default.Save();
64 | }
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/s4pe/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 |
21 | using System.Reflection;
22 | using System.Runtime.CompilerServices;
23 | using System.Runtime.InteropServices;
24 |
25 | // General Information about an assembly is controlled through the following
26 | // set of attributes. Change these attribute values to modify the information
27 | // associated with an assembly.
28 | [assembly: AssemblyTitle("Sims4 Package Editor")]
29 | [assembly: AssemblyDescription("Editor for package files used by The Sims 4(tm)")]
30 | #if DEBUG
31 | [assembly: AssemblyConfiguration("[DEBUG]")]
32 | #else
33 | [assembly: AssemblyConfiguration("")]
34 | #endif
35 | [assembly: AssemblyCompany("Peter L Jones, Keyi Zhang")]
36 | [assembly: AssemblyProduct("Sims4")]
37 | [assembly: AssemblyCopyright("Copyright © 2011 Peter L Jones, 2014 Keyi Zhang. Released under GPL 3. See gpl-3.0.txt")]
38 | [assembly: AssemblyTrademark("")]
39 | [assembly: AssemblyCulture("")]
40 |
41 | // Setting ComVisible to false makes the types in this assembly not visible
42 | // to COM components. If you need to access a type in this assembly from
43 | // COM, set the ComVisible attribute to true on that type.
44 | [assembly: ComVisible(false)]
45 |
46 | // The following GUID is for the ID of the typelib if this project is exposed to COM
47 | [assembly: Guid("040a7487-5f02-4c33-bd8c-31117c1a2a93")]
48 |
49 | // Version information for an assembly consists of the following four values:
50 | //
51 | // Major Version
52 | // Minor Version
53 | // Build Number
54 | // Revision
55 | //
56 | //[assembly: AssemblyVersion("1.0.0.0")]
57 |
--------------------------------------------------------------------------------
/s4pe/Properties/AssemblyVersion.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 |
21 | using System.Reflection;
22 | using System.Runtime.CompilerServices;
23 | using System.Runtime.InteropServices;
24 | [assembly: AssemblyVersion("1409.20.0048.*")]
25 |
--------------------------------------------------------------------------------
/s4pe/Resources/s4pe.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s4ptacle/Sims4Tools/fff19365a12711879bad26481a393a6fbc62c465/s4pe/Resources/s4pe.ico
--------------------------------------------------------------------------------
/s4pe/Settings.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 |
21 | namespace S4PIDemoFE.Properties {
22 |
23 |
24 | // This class allows you to handle specific events on the settings class:
25 | // The SettingChanging event is raised before a setting's value is changed.
26 | // The PropertyChanged event is raised after a setting's value is changed.
27 | // The SettingsLoaded event is raised after the setting values are loaded.
28 | // The SettingsSaving event is raised before the setting values are saved.
29 | internal sealed partial class Settings {
30 |
31 | public Settings() {
32 | // // To add event handlers for saving and changing settings, uncomment the lines below:
33 | //
34 | // this.SettingChanging += this.SettingChangingEventHandler;
35 | //
36 | // this.SettingsSaving += this.SettingsSavingEventHandler;
37 | //
38 | }
39 |
40 | private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
41 | // Add code to handle the SettingChangingEvent event here.
42 | }
43 |
44 | private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
45 | // Add code to handle the SettingsSaving event here.
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/s4pe/Settings/Version.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2015 by the Sims 4 Tools development team *
3 | * *
4 | * Contributors: *
5 | * Peter L Jones (pljones@users.sf.net) *
6 | * Keyi Zhang *
7 | * Buzzler *
8 | * *
9 | * This file is part of the Sims 4 Package Interface (s4pi) *
10 | * *
11 | * s4pi is free software: you can redistribute it and/or modify *
12 | * it under the terms of the GNU General Public License as published by *
13 | * the Free Software Foundation, either version 3 of the License, or *
14 | * (at your option) any later version. *
15 | * *
16 | * s4pi is distributed in the hope that it will be useful, *
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 | * GNU General Public License for more details. *
20 | * *
21 | * You should have received a copy of the GNU General Public License *
22 | * along with s4pi. If not, see . *
23 | ***************************************************************************/
24 |
25 | namespace S4PIDemoFE.Settings
26 | {
27 | using System.Reflection;
28 | using s4pi.Interfaces;
29 |
30 | public static class Version
31 | {
32 | static readonly string timestamp;
33 | public static string CurrentVersion { get { return timestamp; } }
34 |
35 | static readonly string libraryTimestamp;
36 | public static string LibraryVersion { get { return libraryTimestamp; } }
37 |
38 | static Version()
39 | {
40 | timestamp = VersionFor(Assembly.GetEntryAssembly());
41 | libraryTimestamp = VersionFor(typeof(AApiVersionedFields).Assembly);
42 | }
43 |
44 | private static string VersionFor(Assembly a)
45 | {
46 | return "";
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/s4pe/Splash/Splash.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 |
21 | using System;
22 | using System.ComponentModel;
23 | using System.Drawing;
24 | using System.Windows.Forms;
25 |
26 | namespace S4PIDemoFE
27 | {
28 | public partial class Splash : Form
29 | {
30 | public Splash()
31 | {
32 | InitializeComponent();
33 | Bitmap icon = ((System.Drawing.Icon)(new ComponentResourceManager(typeof(MainForm)).GetObject("$this.Icon"))).ToBitmap();
34 | pictureBox1.Image = new Bitmap(icon, new Size(64, 64));
35 | }
36 |
37 | public Splash(string value)
38 | : this()
39 | {
40 | label.Text = value;
41 | }
42 |
43 | public string Message { get { return label.Text; } set { label.Text = value; } }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/s4pe/makedist-s3pe.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | set TargetName=s3pe
3 | set ConfigurationName=Release
4 | set base=%TargetName%
5 | rem -%ConfigurationName%
6 | set src=%TargetName%-Source
7 | set MAKENSIS=D:\Program Files (x86)\NSIS\makensis.exe
8 |
9 | set out=S:\Sims3\Tools\s3pe\
10 | set helpFolder=%out%HelpFiles
11 |
12 | set mydate=%date: =0%
13 | set dd=%mydate:~0,2%
14 | set mm=%mydate:~3,2%
15 | set yy=%mydate:~8,2%
16 | set mytime=%time: =0%
17 | set h=%mytime:~0,2%
18 | set m=%mytime:~3,2%
19 | set s=%mytime:~6,2%
20 | set suffix=%yy%-%mm%%dd%-%h%%m%
21 |
22 | if EXIST "%MAKENSIS%" goto gotNSIS
23 | echo "Could not find makensis."
24 | goto noNSIS
25 |
26 | :gotNSIS:
27 | set nsisv=/V3
28 |
29 | if x%ConfigurationName%==xRelease goto REL
30 | set pdb=
31 | goto noREL
32 | :REL:
33 | set pdb=-xr!*.pdb
34 | :noREL:
35 |
36 |
37 | rem there shouldn't be any to delete...
38 | del /q /f %out%%TargetName%*%suffix%.*
39 |
40 | pushd ..
41 | 7za a -r -t7z -mx9 -ms -xr!.?* -xr!*.suo -xr!zzOld -xr!bin -xr!obj -xr!Makefile -xr!*.Config -xr!"s3pe meshHelper*" "%out%%src%_%suffix%.7z" s3pe "s3pe Helpers"
42 | popd
43 |
44 | pushd bin\%ConfigurationName%
45 | echo %suffix% >%TargetName%-Version.txt
46 | attrib +r %TargetName%-Version.txt
47 | del /f /q HelpFiles
48 | xcopy "%helpFolder%\*" HelpFiles /s /i /y
49 | 7za a -r -t7z -mx9 -ms -xr!.?* -xr!*vshost* -xr!*.Config %pdb% "%out%%base%_%suffix%.7z" *
50 | del /f %TargetName%-Version.txt
51 | del /f /q HelpFiles
52 | popd
53 |
54 | 7za x -o"%base%-%suffix%" "%out%%base%_%suffix%.7z"
55 | pushd "%base%-%suffix%"
56 | (
57 | echo !cd %base%-%suffix%
58 | for %%f in (*) do echo File /a %%f
59 | pushd HelpFiles
60 | echo SetOutPath $INSTDIR\HelpFiles
61 | for %%f in (*) do echo File /a HelpFiles\%%f
62 | echo SetOutPath $INSTDIR
63 | popd
64 | pushd Helpers
65 | echo SetOutPath $INSTDIR\Helpers
66 | for %%f in (*) do echo File /a Helpers\%%f
67 | echo SetOutPath $INSTDIR
68 | popd
69 | dir /-c "..\%base%-%suffix%" | find " bytes" | for /f "tokens=3" %%f in ('find /v " free"') do @echo StrCpy $0 %%f
70 | ) > ..\INSTFILES.txt
71 |
72 | (
73 | for %%f in (*) do echo Delete $INSTDIR\%%f
74 | pushd HelpFiles
75 | for %%f in (*) do echo Delete $INSTDIR\HelpFiles\%%f
76 | echo RmDir HelpFiles
77 | popd
78 | pushd Helpers
79 | for %%f in (*) do echo Delete $INSTDIR\Helpers\%%f
80 | echo RmDir Helpers
81 | popd
82 | ) > UNINST.LOG
83 | attrib +r +h UNINST.LOG
84 | popd
85 |
86 | "%MAKENSIS%" "/DINSTFILES=INSTFILES.txt" "/DUNINSTFILES=UNINST.LOG" "/DVSN=%suffix%" %nsisv% mknsis.nsi "/XOutFile %out%%base%_%suffix%.exe"
87 |
88 | rmdir /s/q %base%-%suffix%
89 | del INSTFILES.txt
90 |
91 | :noNSIS:
92 | pause
93 |
--------------------------------------------------------------------------------
/s4pe/squishinterface_Win32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s4ptacle/Sims4Tools/fff19365a12711879bad26481a393a6fbc62c465/s4pe/squishinterface_Win32.dll
--------------------------------------------------------------------------------
/s4pe/squishinterface_x64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s4ptacle/Sims4Tools/fff19365a12711879bad26481a393a6fbc62c465/s4pe/squishinterface_x64.dll
--------------------------------------------------------------------------------
/s4pe/version.ini:
--------------------------------------------------------------------------------
1 | 0.4.3
--------------------------------------------------------------------------------
/s4pi Extras/DDSPanel/Resources/checkerboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s4ptacle/Sims4Tools/fff19365a12711879bad26481a393a6fbc62c465/s4pi Extras/DDSPanel/Resources/checkerboard.png
--------------------------------------------------------------------------------
/s4pi Extras/DDSPanel/ViewDDS-Licence.htm:
--------------------------------------------------------------------------------
1 | DDS File Type Plugin for Paint.NET
2 | //------------------------------------------------------------------------------
3 | /*
4 | @brief DDS File Type Plugin for Paint.NET
5 |
6 | @note Copyright (c) 2006 Dean Ashton http://www.dmashton.co.uk
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining
9 | a copy of this software and associated documentation files (the
10 | "Software"), to deal in the Software without restriction, including
11 | without limitation the rights to use, copy, modify, merge, publish,
12 | distribute, sublicense, and/or sell copies of the Software, and to
13 | permit persons to whom the Software is furnished to do so, subject to
14 | the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included
17 | in all copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 | **/
27 | //------------------------------------------------------------------------------
28 | Version 1.1
29 | Additional amendments by Delphy at ModTheSims
30 | Merged into a s3pe helper by Peter L Jones 2009
31 | Copyright (C) 2009 Peter L Jones and others
32 |
33 | Version 1.2
34 | Split into DLL for UserComponent and separate s3pe helper by Peter L Jones 2011
35 | Copyright (C) 2011 Peter L Jones
36 |
--------------------------------------------------------------------------------
/s4pi Extras/DDSPanel/squishinterface_Win32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s4ptacle/Sims4Tools/fff19365a12711879bad26481a393a6fbc62c465/s4pi Extras/DDSPanel/squishinterface_Win32.dll
--------------------------------------------------------------------------------
/s4pi Extras/DDSPanel/squishinterface_x64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s4ptacle/Sims4Tools/fff19365a12711879bad26481a393a6fbc62c465/s4pi Extras/DDSPanel/squishinterface_x64.dll
--------------------------------------------------------------------------------
/s4pi Extras/Extensions/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | // General Information about an assembly is controlled through the following
25 | // set of attributes. Change these attribute values to modify the information
26 | // associated with an assembly.
27 | [assembly: AssemblyTitle("s3pi Extensions List")]
28 | [assembly: AssemblyDescription("Maps Resource Type to file extension")]
29 | #if DEBUG
30 | [assembly: AssemblyConfiguration("[DEBUG]")]
31 | #else
32 | [assembly: AssemblyConfiguration("")]
33 | #endif
34 | [assembly: AssemblyCompany("Peter L Jones")]
35 | [assembly: AssemblyProduct("s3pi")]
36 | [assembly: AssemblyCopyright("Copyright © 2009 Peter L Jones. Released under GPL 3. See gpl-3.0.txt")]
37 | [assembly: AssemblyTrademark("")]
38 | [assembly: AssemblyCulture("")]
39 |
40 | // Setting ComVisible to false makes the types in this assembly not visible
41 | // to COM components. If you need to access a type in this assembly from
42 | // COM, set the ComVisible attribute to true on that type.
43 | [assembly: ComVisible(false)]
44 |
45 | // Version information for an assembly consists of the following four values:
46 | //
47 | // Major Version
48 | // Minor Version
49 | // Build Number
50 | // Revision
51 | //
52 | // You can specify all the values or you can default the Build and Revision Numbers
53 | // by using the '*' as shown below:
54 | // [assembly: AssemblyVersion("1.0.*")]
55 | //[assembly: AssemblyVersion("0.1.2.*")]
56 |
--------------------------------------------------------------------------------
/s4pi Extras/Helpers/Helpers/MSPaint.helper:
--------------------------------------------------------------------------------
1 | ResourceType: 0x2F7D0002 0x0580A2B4 0x0580A2B5 0x0580A2B6 0x0580A2CD 0x0580A2CE 0x0580A2CF 0x0589DC44 0x0589DC45 0x0589DC46 0x0589DC47 0x05B17698 0x05B17699 0x05B1769A 0x05B1B524 0x05B1B525 0x05B1B526 0x0668F635 0x2653E3C8 0x2653E3C9 0x2653E3CA 0x2D4284F0 0x2D4284F1 0x2D4284F2 0x2E75C764 0x2E75C765 0x2E75C766 0x2E75C767 0x2F7D0004 0x5DE9DBA0 0x5DE9DBA1 0x5DE9DBA2 0x626F60CC 0x626F60CD 0x626F60CE 0x6B6D837D 0x6B6D837E 0x6B6D837F 0xAD366F95 0xAD366F96 0xD84E7FC5 0xD84E7FC6 0xD84E7FC7 0xFCEAB65B
2 | Label: Paint
3 | Command: mspaint
4 | Arguments: "{}"
5 | Desc: Edit a pciture with MSPaint
6 |
--------------------------------------------------------------------------------
/s4pi Extras/Helpers/Helpers/Notepad.helper:
--------------------------------------------------------------------------------
1 | // Text/(pure) XML files
2 | ResourceType: 0x024A0E52 0x025C90A6 0x025C95B6 0x029E333B 0x02C9EFF2 0x024A0E52 0x02FAC0B6 0x0333406C 0x03B33DDF 0x0604ABDA 0x0A98EAF0 0x1F886EAD 0x2B6CAB5F 0x67771F5C 0x73E93EEB 0xA8D58BE5 0xD4D9FBE5 0xDD3223A7 0xDD6233D6 0xE5105066 0xE5105067 0xE5105068 0xF0FF5598
3 | Label: Notepad
4 | // Windows notepad is in the standard Windows PATH, so you don't need to say where it is:
5 | Command: notepad
6 | Arguments: "{}"
7 | Desc: Edit a Text file with Notepad
8 |
--------------------------------------------------------------------------------
/s4pi Extras/Helpers/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("s3pi Demo Plugins")]
9 | [assembly: AssemblyDescription("Associates external editors with resources")]
10 | #if DEBUG
11 | [assembly: AssemblyConfiguration("[DEBUG]")]
12 | #else
13 | [assembly: AssemblyConfiguration("")]
14 | #endif
15 | [assembly: AssemblyCompany("Peter L Jones")]
16 | [assembly: AssemblyProduct("s3pi")]
17 | [assembly: AssemblyCopyright("Copyright © 2009 Peter L Jones. Released under GPL 3. See gpl-3.0.txt")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 |
21 | // Setting ComVisible to false makes the types in this assembly not visible
22 | // to COM components. If you need to access a type in this assembly from
23 | // COM, set the ComVisible attribute to true on that type.
24 | [assembly: ComVisible(false)]
25 |
26 | // The following GUID is for the ID of the typelib if this project is exposed to COM
27 | [assembly: Guid("73425787-6c26-40c4-a7d6-b6b7e3a4e28e")]
28 |
29 | // Version information for an assembly consists of the following four values:
30 | //
31 | // Major Version
32 | // Minor Version
33 | // Build Number
34 | // Revision
35 | //
36 | // You can specify all the values or you can default the Build and Revision Numbers
37 | // by using the '*' as shown below:
38 | // [assembly: AssemblyVersion("1.0.*")]
39 | //[assembly: AssemblyVersion("1.0.0.0")]
40 | //[assembly: AssemblyFileVersion("1.0.0.0")]
41 |
--------------------------------------------------------------------------------
/s4pi Wrappers/AnimationResources/ClipResource.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s4ptacle/Sims4Tools/fff19365a12711879bad26481a393a6fbc62c465/s4pi Wrappers/AnimationResources/ClipResource.suo
--------------------------------------------------------------------------------
/s4pi Wrappers/AnimationResources/ClipResourceHandler.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 4 Package Interface (s4pi) *
6 | * *
7 | * s4pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s4pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s4pi. If not, see . *
19 | ***************************************************************************/
20 | using System.Collections.Generic;
21 | using s4pi.Interfaces;
22 |
23 | namespace s4pi.Animation
24 | {
25 | public class ClipResourceHandler : AResourceHandler
26 | {
27 | public ClipResourceHandler()
28 | {
29 | Add(typeof (ClipResource), new List {"0x6B20C4F3"});
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/s4pi Wrappers/AnimationResources/S3CLIP/CurveDataFlags.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 |
22 | namespace s4pi.Animation.S3CLIP
23 | {
24 | public struct CurveDataFlags
25 | {
26 | private Byte mRaw;
27 |
28 | public CurveDataFlags(byte raw)
29 | {
30 | mRaw = raw;
31 | }
32 |
33 |
34 | public CurveDataType Type
35 | {
36 | get { return (CurveDataType)((mRaw & 0x07) >> 0); }
37 | set
38 | {
39 | mRaw &= 0x1F;
40 | mRaw |= (byte)((byte)value << 0);
41 | }
42 | }
43 |
44 | public Boolean Static
45 | {
46 | get { return ((mRaw & 0x08) >> 3) == 1 ? true : false; }
47 | set
48 | {
49 | mRaw &= 0xF7;
50 | mRaw |= (byte)((value ? 1 : 0) << 3);
51 | }
52 | }
53 |
54 | public CurveDataFormat Format
55 | {
56 | get { return (CurveDataFormat)((mRaw & 0xF0) >> 4); }
57 | set
58 | {
59 | mRaw &= 0x0F;
60 | mRaw |= (byte)(((byte)value) << 4);
61 | }
62 | }
63 |
64 | public Byte Raw
65 | {
66 | get { return mRaw; }
67 | set { mRaw = value; }
68 | }
69 | }
70 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/AnimationResources/S3CLIP/CurveDataFormat.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | namespace s4pi.Animation.S3CLIP
21 | {
22 | public enum CurveDataFormat : byte
23 | {
24 | Indexed = 0x00,
25 | Packed = 0x01
26 | }
27 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/AnimationResources/S3CLIP/CurveDataInfo.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 |
22 | namespace s4pi.Animation.S3CLIP
23 | {
24 | public class CurveDataInfo
25 | {
26 | public CurveDataFlags Flags;
27 | public Int32 FrameCount;
28 | public UInt32 FrameDataOffset;
29 | public Single Offset;
30 | public Single Scale;
31 | public UInt32 TrackKey;
32 | public CurveType Type;
33 | }
34 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/AnimationResources/S3CLIP/CurveDataType.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | namespace s4pi.Animation.S3CLIP
21 | {
22 | public enum CurveDataType : byte
23 | {
24 | Float1 = 0x01,
25 | Float3 = 0x02,
26 | Float4 = 0x04
27 | }
28 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/AnimationResources/S3CLIP/CurveList.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 | using System.Collections.Generic;
22 | using System.IO;
23 | using s4pi.Interfaces;
24 |
25 | namespace s4pi.Animation.S3CLIP
26 | {
27 | public class CurveList : DependentList
28 | {
29 | public CurveList(EventHandler handler, IEnumerable ilt)
30 | : base(handler, ilt)
31 | {
32 | }
33 |
34 | public CurveList(EventHandler handler)
35 | : base(handler)
36 | {
37 | }
38 |
39 | #region Unused
40 |
41 | public override void Add()
42 | {
43 | throw new NotSupportedException();
44 | }
45 |
46 | protected override Curve CreateElement(Stream s)
47 | {
48 | throw new NotSupportedException();
49 | }
50 |
51 | protected override void WriteElement(Stream s, Curve element)
52 | {
53 | throw new NotSupportedException();
54 | }
55 |
56 | #endregion
57 | }
58 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/AnimationResources/S3CLIP/CurveType.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | namespace s4pi.Animation.S3CLIP
21 | {
22 | public enum CurveType
23 | {
24 | Position = 0x01,
25 | Orientation = 0x02
26 | }
27 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/AnimationResources/S3CLIP/TrackList.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 | using System.Collections.Generic;
22 | using System.IO;
23 | using s4pi.Interfaces;
24 |
25 | namespace s4pi.Animation.S3CLIP
26 | {
27 | public class TrackList : DependentList
28 | {
29 | public TrackList(EventHandler handler)
30 | : base(handler)
31 | {
32 | }
33 |
34 | public TrackList(EventHandler handler, IEnumerable ilt)
35 | : base(handler, ilt)
36 | {
37 | }
38 |
39 | public TrackList(EventHandler handler, long size)
40 | : base(handler, size)
41 | {
42 | }
43 |
44 | protected override Track CreateElement(Stream s)
45 | {
46 | throw new NotSupportedException();
47 | }
48 |
49 | protected override void WriteElement(Stream s, Track element)
50 | {
51 | throw new NotSupportedException();
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/CASPartResource/Handlers/Override.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | using s4pi.Interfaces;
6 |
7 | namespace CASPartResource.Handlers
8 | {
9 | public class Override : AHandlerElement, IEquatable
10 | {
11 | private byte region;
12 | private float layer;
13 |
14 | public Override(int apiVersion, EventHandler handler, Stream s)
15 | : base(apiVersion, handler)
16 | {
17 | var r = new BinaryReader(s);
18 | this.region = r.ReadByte();
19 | this.layer = r.ReadSingle();
20 | }
21 |
22 | public Override(int apiVersion, EventHandler handler) : base(apiVersion, handler)
23 | {
24 | }
25 |
26 | internal void UnParse(Stream s)
27 | {
28 | var w = new BinaryWriter(s);
29 | w.Write(this.region);
30 | w.Write(this.layer);
31 | }
32 |
33 | #region AHandlerElement Members
34 |
35 | public override int RecommendedApiVersion
36 | {
37 | get { return CASPartResource.recommendedApiVersion; }
38 | }
39 |
40 | public override List ContentFields
41 | {
42 | get { return GetContentFields(this.requestedApiVersion, this.GetType()); }
43 | }
44 |
45 | #endregion
46 |
47 | public bool Equals(Override other)
48 | {
49 | return this.region == other.region && Math.Abs(this.layer - other.layer) < 0.001;
50 | }
51 |
52 | [ElementPriority(0)]
53 | public byte Region
54 | {
55 | get { return this.region; }
56 | set
57 | {
58 | if (value != this.region)
59 | {
60 | this.OnElementChanged();
61 | this.region = value;
62 | }
63 | }
64 | }
65 |
66 | [ElementPriority(1)]
67 | public float Layer
68 | {
69 | get { return this.layer; }
70 | set
71 | {
72 | if (value != this.layer)
73 | {
74 | this.OnElementChanged();
75 | this.layer = value;
76 | }
77 | }
78 | }
79 |
80 | public string Value
81 | {
82 | get { return this.ValueBuilder; }
83 | }
84 | }
85 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/CASPartResource/Handlers/SwatchColor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Drawing;
4 | using System.IO;
5 |
6 | using s4pi.Interfaces;
7 |
8 | namespace CASPartResource.Handlers
9 | {
10 | public class SwatchColor : AHandlerElement, IEquatable
11 | {
12 | private Color color;
13 |
14 | public SwatchColor(int apiVersion, EventHandler handler, Stream s)
15 | : base(apiVersion, handler)
16 | {
17 | var r = new BinaryReader(s);
18 | this.color = Color.FromArgb(r.ReadInt32());
19 | }
20 |
21 | public SwatchColor(int apiVersion, EventHandler handler, Color color) : base(apiVersion, handler)
22 | {
23 | this.color = color;
24 | }
25 |
26 | public SwatchColor(int apiVersion, EventHandler handler) : base(apiVersion, handler)
27 | {
28 | }
29 |
30 | public void UnParse(Stream s)
31 | {
32 | var w = new BinaryWriter(s);
33 | w.Write(this.color.ToArgb());
34 | }
35 |
36 | #region AHandlerElement Members
37 |
38 | public override int RecommendedApiVersion
39 | {
40 | get { return CASPartResource.recommendedApiVersion; }
41 | }
42 |
43 | public override List ContentFields
44 | {
45 | get { return GetContentFields(this.requestedApiVersion, this.GetType()); }
46 | }
47 |
48 | #endregion
49 |
50 | public bool Equals(SwatchColor other)
51 | {
52 | return other.Equals(this.color);
53 | }
54 |
55 | public Color Color
56 | {
57 | get { return this.color; }
58 | set
59 | {
60 | if (!this.color.Equals(value))
61 | {
62 | this.color = value;
63 | this.OnElementChanged();
64 | }
65 | }
66 | }
67 |
68 | public string Value
69 | {
70 | get
71 | {
72 | {
73 | return string.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", this.color.A, this.color.R, this.color.G, this.color.B);
74 | }
75 | }
76 | }
77 | }
78 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/CASPartResource/Lists/LODBlockList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | using CASPartResource.Handlers;
5 |
6 | using s4pi.Interfaces;
7 |
8 | namespace CASPartResource.Lists
9 | {
10 | public class LODBlockList : DependentList
11 | {
12 | #region Attributes
13 |
14 | private readonly CountedTGIBlockList tgiList;
15 |
16 | #endregion
17 |
18 | #region Constructors
19 |
20 | public LODBlockList(EventHandler handler) : this(handler, new CountedTGIBlockList(handler))
21 | {
22 | }
23 |
24 | public LODBlockList(EventHandler handler, CountedTGIBlockList tgiList) : base(handler)
25 | {
26 | this.tgiList = tgiList;
27 | }
28 |
29 | public LODBlockList(EventHandler handler, Stream s, CountedTGIBlockList tgiList) : base(handler)
30 | {
31 | this.tgiList = tgiList;
32 | this.Parse(s);
33 | }
34 |
35 | #endregion
36 |
37 | #region Data I/O
38 |
39 | protected override void Parse(Stream s)
40 | {
41 | var r = new BinaryReader(s);
42 | var count = r.ReadByte();
43 | for (var i = 0; i < count; i++)
44 | {
45 | this.Add(new LODInfoEntry(1, this.handler, s, this.tgiList));
46 | }
47 | }
48 |
49 | public override void UnParse(Stream s)
50 | {
51 | var w = new BinaryWriter(s);
52 | w.Write((byte)this.Count);
53 | foreach (var unknownClass in this)
54 | {
55 | unknownClass.UnParse(s);
56 | }
57 | }
58 |
59 | protected override LODInfoEntry CreateElement(Stream s)
60 | {
61 | return new LODInfoEntry(1, this.handler, this.tgiList);
62 | }
63 |
64 | protected override void WriteElement(Stream s, LODInfoEntry element)
65 | {
66 | element.UnParse(s);
67 | }
68 |
69 | #endregion
70 | }
71 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/CASPartResource/Lists/OverrideList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | using CASPartResource.Handlers;
5 |
6 | using s4pi.Interfaces;
7 |
8 | namespace CASPartResource.Lists
9 | {
10 | public class OverrideList : DependentList
11 | {
12 | public OverrideList(EventHandler handler) : base(handler)
13 | {
14 | }
15 |
16 | public OverrideList(EventHandler handler, Stream s) : base(handler, s)
17 | {
18 | }
19 |
20 | #region Data I/O
21 |
22 | protected override void Parse(Stream s)
23 | {
24 | var r = new BinaryReader(s);
25 | var count = r.ReadByte();
26 | for (var i = 0; i < count; i++)
27 | {
28 | this.Add(new Override(CASPartResource.recommendedApiVersion, this.handler, s));
29 | }
30 | }
31 |
32 | public override void UnParse(Stream s)
33 | {
34 | var w = new BinaryWriter(s);
35 | w.Write((byte)this.Count);
36 | foreach (var Override in this)
37 | {
38 | Override.UnParse(s);
39 | }
40 | }
41 |
42 | #endregion
43 |
44 | protected override Override CreateElement(Stream s)
45 | {
46 | return new Override(CASPartResource.recommendedApiVersion, this.handler, s);
47 | }
48 |
49 | protected override void WriteElement(Stream s, Override element)
50 | {
51 | element.UnParse(s);
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/CASPartResource/Lists/SwatchColorList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.IO;
4 |
5 | using CASPartResource.Handlers;
6 |
7 | using s4pi.Interfaces;
8 |
9 | namespace CASPartResource.Lists
10 | {
11 | public class SwatchColorList : DependentList
12 | {
13 | public SwatchColorList(EventHandler handler) : base(handler)
14 | {
15 | }
16 |
17 | public SwatchColorList(EventHandler handler, Stream s) : base(handler)
18 | {
19 | this.Parse(s);
20 | }
21 |
22 | #region Data I/O
23 |
24 | protected override void Parse(Stream s)
25 | {
26 | var r = new BinaryReader(s);
27 | var count = r.ReadByte();
28 | for (var i = 0; i < count; i++)
29 | {
30 | this.Add(new SwatchColor(1, this.handler, s));
31 | }
32 | }
33 |
34 | public override void UnParse(Stream s)
35 | {
36 | var w = new BinaryWriter(s);
37 | w.Write((byte)this.Count);
38 | foreach (var color in this)
39 | {
40 | color.UnParse(s);
41 | }
42 | }
43 |
44 | protected override SwatchColor CreateElement(Stream s)
45 | {
46 | return new SwatchColor(1, this.handler, Color.Black);
47 | }
48 |
49 | protected override void WriteElement(Stream s, SwatchColor element)
50 | {
51 | element.UnParse(s);
52 | }
53 |
54 | #endregion
55 | }
56 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/CatalogResource/COBJResource.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2016 by the Sims 4 Tools development team *
3 | * *
4 | * Contributors: *
5 | * Inge Jones *
6 | * Buzzler *
7 | * *
8 | * This file is part of the Sims 4 Package Interface (s4pi) *
9 | * *
10 | * s4pi is free software: you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation, either version 3 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * s4pi is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with s4pi. If not, see . *
22 | ***************************************************************************/
23 |
24 | namespace CatalogResource
25 | {
26 | using System.Collections.Generic;
27 | using System.IO;
28 | using s4pi.Interfaces;
29 |
30 | public class COBJResource : AbstractCatalogResource
31 | {
32 | public COBJResource(int APIversion, Stream s)
33 | : base(APIversion, s)
34 | {
35 | }
36 | }
37 |
38 | public class COBJResourceHandler : AResourceHandler
39 | {
40 | public COBJResourceHandler()
41 | {
42 | this.Add(typeof(COBJResource), new List(new[] { "0x319E4F1D" }));
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/s4pi Wrappers/CatalogResource/Common/ArrayExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CatalogResource.Common
4 | {
5 | public static class ArrayExtensions
6 | {
7 | public static void ForEach(this Array array, Action action)
8 | {
9 | if (array.LongLength == 0) return;
10 | ArrayTraverse walker = new ArrayTraverse(array);
11 | do action(array, walker.Position);
12 | while (walker.Step());
13 | }
14 | }
15 |
16 | internal class ArrayTraverse
17 | {
18 | public int[] Position;
19 | private int[] maxLengths;
20 |
21 | public ArrayTraverse(Array array)
22 | {
23 | maxLengths = new int[array.Rank];
24 | for (int i = 0; i < array.Rank; ++i)
25 | {
26 | maxLengths[i] = array.GetLength(i) - 1;
27 | }
28 | Position = new int[array.Rank];
29 | }
30 |
31 | public bool Step()
32 | {
33 | for (int i = 0; i < Position.Length; ++i)
34 | {
35 | if (Position[i] < maxLengths[i])
36 | {
37 | Position[i]++;
38 | for (int j = 0; j < i; j++)
39 | {
40 | Position[j] = 0;
41 | }
42 | return true;
43 | }
44 | }
45 | return false;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/s4pi Wrappers/CatalogResource/Common/CatalogTag.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | using s4pi.Interfaces;
6 | using s4pi.Resource.Commons.CatalogTags;
7 |
8 | namespace CatalogResource.Common
9 | {
10 | public class CatalogTag : AHandlerElement, IEquatable
11 | {
12 | private Tag tag;
13 |
14 | #region Constructors
15 |
16 | public CatalogTag(int apiVersion, EventHandler handler, CatalogTag other)
17 | : this(apiVersion, handler, other.tag)
18 | {
19 | }
20 |
21 | public CatalogTag(int apiVersion, EventHandler handler)
22 | : base(apiVersion, handler)
23 | {
24 | this.MakeNew();
25 | }
26 |
27 | public CatalogTag(int apiVersion, EventHandler handler, Stream s)
28 | : base(apiVersion, handler)
29 | {
30 | this.Parse(s);
31 | }
32 |
33 | public CatalogTag(int apiVersion, EventHandler handler, Tag ctag)
34 | : base(apiVersion, handler)
35 | {
36 | this.tag = ctag;
37 | }
38 |
39 | public CatalogTag(int apiVersion, EventHandler handler, uint tagValue)
40 | : base(apiVersion, handler)
41 | {
42 | this.tag = CatalogTagRegistry.FetchTag(tagValue);
43 | }
44 |
45 | public bool Equals(CatalogTag other)
46 | {
47 | return this.tag == other.tag;
48 | }
49 |
50 | #endregion Constructors =========================================
51 |
52 | #region ContentFields
53 |
54 | [ElementPriority(1)]
55 | public Tag Tag
56 | {
57 | get { return this.tag; }
58 | set { if (this.tag != value) { this.tag = value; this.OnElementChanged(); } }
59 | }
60 |
61 | public override int RecommendedApiVersion
62 | {
63 | get { return CatalogCommon.kRecommendedApiVersion; }
64 | }
65 |
66 | public string Value { get { return this.ValueBuilder; } }
67 |
68 | public override List ContentFields
69 | {
70 | get { return GetContentFields(0, this.GetType()); }
71 | }
72 |
73 | #endregion ContentFields ========================================
74 |
75 | void Parse(Stream s)
76 | {
77 | var br = new BinaryReader(s);
78 | this.tag = CatalogTagRegistry.FetchTag(br.ReadUInt32());
79 | }
80 |
81 | public void UnParse(Stream s)
82 | {
83 | var bw = new BinaryWriter(s);
84 | bw.Write(this.Tag.ToUInt32());
85 | }
86 |
87 | private void MakeNew()
88 | {
89 | this.tag = new Tag();
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/s4pi Wrappers/CatalogResource/Common/CatalogTagList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | using s4pi.Interfaces;
6 |
7 | namespace CatalogResource.Common
8 | {
9 | public class CatalogTagList : DependentList
10 | {
11 | public CatalogTagList(EventHandler handler, long maxSize = -1)
12 | : base(handler, maxSize)
13 | {
14 | }
15 |
16 | public CatalogTagList(EventHandler handler, IEnumerable ilt, long maxSize = -1)
17 | : base(handler, ilt, maxSize)
18 | {
19 | }
20 |
21 | public CatalogTagList(EventHandler handler, Stream s, long maxSize = -1)
22 | : base(handler, s, maxSize)
23 | {
24 | }
25 |
26 | protected override CatalogTag CreateElement(Stream s)
27 | {
28 | return new CatalogTag(CatalogCommon.kRecommendedApiVersion, this.elementHandler, s);
29 | }
30 |
31 | protected override void WriteElement(Stream s, CatalogTag element)
32 | {
33 | element.UnParse(s);
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/CatalogResource/Common/ReferenceEqualityComparer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace CatalogResource.Common
5 | {
6 | ///
7 | /// Implementation of to compare objects by reference.
8 | /// Code from http://stackoverflow.com/a/11308879. All credits to Alex Burtsev.
9 | ///
10 | public class ReferenceEqualityComparer : EqualityComparer
11 | {
12 | public override bool Equals(object x, object y)
13 | {
14 | return ReferenceEquals(x, y);
15 | }
16 |
17 | public override int GetHashCode(object obj)
18 | {
19 | if (obj == null) return 0;
20 | return obj.GetHashCode();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/s4pi Wrappers/CatalogResource/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | // General Information about an assembly is controlled through the following
25 | // set of attributes. Change these attribute values to modify the information
26 | // associated with an assembly.
27 | [assembly: AssemblyTitle("s3pi Catalog Resource wrapper")]
28 | [assembly: AssemblyDescription("Wrapper for catalog entry resources.")]
29 | #if DEBUG
30 | [assembly: AssemblyConfiguration("[DEBUG]")]
31 | #else
32 | [assembly: AssemblyConfiguration("")]
33 | #endif
34 | [assembly: AssemblyCompany("Peter L Jones")]
35 | [assembly: AssemblyProduct("s3pi")]
36 | [assembly: AssemblyCopyright("Copyright © 2009 Peter L Jones. Released under GPL 3. See gpl-3.0.txt")]
37 | [assembly: AssemblyTrademark("")]
38 | [assembly: AssemblyCulture("")]
39 |
40 | // Setting ComVisible to false makes the types in this assembly not visible
41 | // to COM components. If you need to access a type in this assembly from
42 | // COM, set the ComVisible attribute to true on that type.
43 | [assembly: ComVisible(false)]
44 |
45 | // Version information for an assembly consists of the following four values:
46 | //
47 | // Major Version
48 | // Minor Version
49 | // Build Number
50 | // Revision
51 | //
52 | // You can specify all the values or you can default the Build and Revision Numbers
53 | // by using the '*' as shown below:
54 | // [assembly: AssemblyVersion("1.0.*")]
55 | //[assembly: AssemblyVersion("0.1.2.*")]
56 |
--------------------------------------------------------------------------------
/s4pi Wrappers/DataResource/DataFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace s4pi.DataResource
7 | {
8 | public static class DataResourceFlags
9 | {
10 | public enum FieldDataTypeFlags : uint
11 | {
12 | Boolean = 0x00000000,
13 | Int16 = 0x00000006,
14 | Unknown1 = 0x00000007,
15 | Unknown2 = 0x00000008,
16 | Float = 0x0000000A,
17 | VFX = 0x0000000B,
18 | Unknown3 = 0x0000000E,
19 | RGBColor = 0x00000010,
20 | ARGBColor = 0x00000011,
21 | DataInstance = 0x00000012,
22 | ImageInstance = 0x00000013,
23 | StringInstance = 0x00000014
24 | }
25 |
26 | public static Dictionary DataSizeTable
27 | {
28 | get
29 | {
30 | return new Dictionary()
31 | {
32 | {FieldDataTypeFlags.Boolean , 4},
33 | {FieldDataTypeFlags.Int16 , 4},
34 | {FieldDataTypeFlags.Unknown1 , 4},
35 | {FieldDataTypeFlags.Unknown2 , 8},
36 | {FieldDataTypeFlags.Float , 4},
37 | {FieldDataTypeFlags.VFX , 8},
38 | {FieldDataTypeFlags.Unknown3 , 8},
39 | {FieldDataTypeFlags.RGBColor , 12},
40 | {FieldDataTypeFlags.ARGBColor , 16},
41 | {FieldDataTypeFlags.DataInstance , 8},
42 | {FieldDataTypeFlags.ImageInstance , 16},
43 | {FieldDataTypeFlags.StringInstance , 4}
44 | };
45 | }
46 | }
47 |
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/s4pi Wrappers/DataResource/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("DataResource")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DataResource")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
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("e420cd12-fec0-4011-9215-436b90b22d3d")]
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 |
--------------------------------------------------------------------------------
/s4pi Wrappers/DataResource/Util.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace s4pi.DataResource
8 | {
9 | public static class Util
10 | {
11 | public const uint Zero32 = 0;
12 | public const uint NullOffset = 0x80000000;
13 |
14 | public static string GetString(BinaryReader r, long nameOffset)
15 | {
16 | if (nameOffset == Util.NullOffset) return "";
17 | long startPosition = r.BaseStream.Position;
18 | r.BaseStream.Position = nameOffset;
19 | List array = new List();
20 | byte c = r.ReadByte();
21 | while(c != 0x00)
22 | {
23 | array.Add(c);
24 | c = r.ReadByte();
25 | }
26 |
27 | r.BaseStream.Position = startPosition;
28 | return Encoding.ASCII.GetString(array.ToArray());
29 | }
30 |
31 | public static void WriteString(BinaryWriter w, string str)
32 | {
33 | byte[] array = new byte[str.Length + 1];
34 | Encoding.ASCII.GetBytes(str, 0, str.Length, array, 0);
35 | array[str.Length] = 0;
36 | w.Write(array);
37 | }
38 |
39 | public static bool GetOffset(BinaryReader r, out uint offset)
40 | {
41 | offset = r.ReadUInt32();
42 | if (offset == Util.NullOffset) return false;
43 | offset += (uint)r.BaseStream.Position - 4;
44 | return true;
45 | }
46 |
47 | public static void Padding(BinaryWriter w, long count)
48 | {
49 | for (int i = 0; i < count; i++) w.Write((byte)0);
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/s4pi Wrappers/GenericRCOLResource/IRCOLBlock.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 | using System.Collections.Generic;
22 | using System.IO;
23 |
24 | namespace s4pi.Interfaces
25 | {
26 | ///
27 | /// Defines the interface exposed by an RCOL block.
28 | ///
29 | public interface IRCOLBlock : IResource
30 | {
31 | ///
32 | /// The four byte tag for the RCOL block, may be null if none present
33 | ///
34 | [ElementPriority(2)]
35 | string Tag { get; }
36 |
37 | ///
38 | /// The ResourceType for the RCOL block, used to determine which specific RCOL handlers are available
39 | ///
40 | [ElementPriority(3)]
41 | uint ResourceType { get; }
42 |
43 | ///
44 | /// Writes the content of the RCOL block to a stream
45 | ///
46 | /// A stream containing the current content of the RCOL block
47 | Stream UnParse();
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/s4pi Wrappers/GenericRCOLResource/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | // General Information about an assembly is controlled through the following
25 | // set of attributes. Change these attribute values to modify the information
26 | // associated with an assembly.
27 | [assembly: AssemblyTitle("s3pi Generic RCOL Resource wrapper")]
28 | [assembly: AssemblyDescription("Wrapper for RCOL resources.")]
29 | #if DEBUG
30 | [assembly: AssemblyConfiguration("[DEBUG]")]
31 | #else
32 | [assembly: AssemblyConfiguration("")]
33 | #endif
34 | [assembly: AssemblyCompany("Peter L Jones")]
35 | [assembly: AssemblyProduct("s3pi")]
36 | [assembly: AssemblyCopyright("Copyright © 2009 Peter L Jones. Released under GPL 3. See gpl-3.0.txt")]
37 | [assembly: AssemblyTrademark("")]
38 | [assembly: AssemblyCulture("")]
39 |
40 | // Setting ComVisible to false makes the types in this assembly not visible
41 | // to COM components. If you need to access a type in this assembly from
42 | // COM, set the ComVisible attribute to true on that type.
43 | [assembly: ComVisible(false)]
44 |
45 | // Version information for an assembly consists of the following four values:
46 | //
47 | // Major Version
48 | // Minor Version
49 | // Build Number
50 | // Revision
51 | //
52 | // You can specify all the values or you can default the Build and Revision Numbers
53 | // by using the '*' as shown below:
54 | // [assembly: AssemblyVersion("1.0.*")]
55 | //[assembly: AssemblyVersion("0.1.2.*")]
56 |
--------------------------------------------------------------------------------
/s4pi Wrappers/GenericRCOLResource/RCOLResources.txt:
--------------------------------------------------------------------------------
1 | ;type
2 | ;tag (*=null)
3 | ;y=stand alone resource
4 | ;n=only embedded in a MODL or MLOD
5 | ;desc
6 | 0x015A1849 GEOM N Body Geometry ; lies! but the stand alone is not a GenericRCOL
7 | 0x01661233 MODL Y Object Geometry
8 | 0x01D0E6FB VBUF N Vertex Buffer
9 | 0x01D0E70F IBUF N Index Buffer
10 | 0x01D0E723 VRTF N Vertex Format
11 | 0x01D0E75D MATD Y Material definition
12 | 0x01D0E76B SKIN N Mesh skin
13 | 0x01D10F34 MLOD Y Object Geometry LODs
14 | 0x02019972 MTST Y Material set
15 | 0x021D7E8C TREE Y
16 | 0x0229684B VBUF N Vertex Buffer(Used in shadow meshes, no associated VRTF)
17 | 0x0229684F IBUF N Index Buffer(Used in shadow meshes)
18 | ;0x02D5DF13 Jazz Y Animation Sequences
19 | 0x033260E3 TkMk Y
20 | 0x0355E0A6 * Y Slot Adjusts
21 | 0x03B4C61D LITE Y
22 | 0x63A33EA7 ANIM Y
23 | 0x736884F1 VPXY Y Model Links
24 | 0xD3044521 RSLT Y Slot Definition
25 | 0xD382BF57 FTPT Y Model Footprint
26 |
--------------------------------------------------------------------------------
/s4pi Wrappers/ImageResource/ImageResources.txt:
--------------------------------------------------------------------------------
1 | 0x0580A2B4 THUM .png
2 | 0x0580A2B5 THUM .png
3 | 0x0580A2B6 THUM .png
4 | 0x0580A2CD SNAP .png
5 | 0x0580A2CE SNAP .png
6 | 0x0580A2CF SNAP .png
7 | 0x0589DC44 THUM .png
8 | 0x0589DC45 THUM .png
9 | 0x0589DC46 THUM .png
10 | 0x0589DC47 THUM .png
11 | 0x05B17698 THUM .png
12 | 0x05B17699 THUM .png
13 | 0x05B1769A THUM .png
14 | 0x05B1B524 THUM .png
15 | 0x05B1B525 THUM .png
16 | 0x05B1B526 THUM .png
17 | 0x0668F635 TWNI .png
18 | 0x2653E3C8 THUM .png
19 | 0x2653E3C9 THUM .png
20 | 0x2653E3CA THUM .png
21 | 0x2D4284F0 THUM .png
22 | 0x2D4284F1 THUM .png
23 | 0x2D4284F2 THUM .png
24 | 0x2E75C764 ICON .png
25 | 0x2E75C765 ICON .png
26 | 0x2E75C766 ICON .png
27 | 0x2E75C767 ICON .png
28 | 0x2F7D0002 IMAG .jpg
29 | 0x2F7D0004 IMAG .png
30 | 0x3C1AF1F2 THUM .png
31 | 0x5B282D45 THUM .png
32 | 0x5DE9DBA0 THUM .png
33 | 0x5DE9DBA1 THUM .png
34 | 0x5DE9DBA2 THUM .png
35 | 0x626F60CC THUM .png
36 | 0x626F60CD THUM .png
37 | 0x626F60CE THUM .png
38 | 0x6B6D837D SNAP .png
39 | 0x6B6D837E SNAP .png
40 | 0x6B6D837F SNAP .png
41 | 0x9C925813 THUM .png
42 | 0xAD366F95 THUM .png
43 | 0xAD366F96 THUM .png
44 | 0xCD9DE247 THUM .png
45 | 0xD84E7FC5 ICON .png
46 | 0xD84E7FC6 ICON .png
47 | 0xD84E7FC7 ICON .png
48 | 0xFCEAB65B THUM .png
49 |
--------------------------------------------------------------------------------
/s4pi Wrappers/ImageResource/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | // General Information about an assembly is controlled through the following
25 | // set of attributes. Change these attribute values to modify the information
26 | // associated with an assembly.
27 | [assembly: AssemblyTitle("s3pi Image Resource wrapper")]
28 | [assembly: AssemblyDescription("Wrapper for image resources.")]
29 | #if DEBUG
30 | [assembly: AssemblyConfiguration("[DEBUG]")]
31 | #else
32 | [assembly: AssemblyConfiguration("")]
33 | #endif
34 | [assembly: AssemblyCompany("Peter L Jones")]
35 | [assembly: AssemblyProduct("s3pi")]
36 | [assembly: AssemblyCopyright("Copyright © 2009 Peter L Jones. Released under GPL 3. See gpl-3.0.txt")]
37 | [assembly: AssemblyTrademark("")]
38 | [assembly: AssemblyCulture("")]
39 |
40 | // Setting ComVisible to false makes the types in this assembly not visible
41 | // to COM components. If you need to access a type in this assembly from
42 | // COM, set the ComVisible attribute to true on that type.
43 | [assembly: ComVisible(false)]
44 |
45 | // Version information for an assembly consists of the following four values:
46 | //
47 | // Major Version
48 | // Minor Version
49 | // Build Number
50 | // Revision
51 | //
52 | // You can specify all the values or you can default the Build and Revision Numbers
53 | // by using the '*' as shown below:
54 | // [assembly: AssemblyVersion("1.0.*")]
55 | //[assembly: AssemblyVersion("0.1.2.*")]
56 |
--------------------------------------------------------------------------------
/s4pi Wrappers/MeshChunks/OriginalAcknowledgements.txt:
--------------------------------------------------------------------------------
1 | Thanks to:
2 |
3 | Peter and Inge for the s3pi libraries which is the basis for this code,
4 | as well as the many patches Peter has made to the ModelResources
5 | http://www.simlogical.com
6 |
7 | ChaosMageX for his contributions of additional formats to the EffectResource module,
8 | and EffectCloning tool:
9 | http://www.modthesims.info/showthread.php?t=450194
10 |
11 |
--------------------------------------------------------------------------------
/s4pi Wrappers/MiscellaneousResource/ModelFlags.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2016 by the Sims 4 Tools development team *
3 | * *
4 | * Contributors: *
5 | * pbox *
6 | * Buzzler *
7 | * *
8 | * This file is part of the Sims 4 Package Interface (s4pi) *
9 | * *
10 | * s4pi is free software: you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation, either version 3 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * s4pi is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with s4pi. If not, see . *
22 | ***************************************************************************/
23 |
24 | using System;
25 |
26 | namespace s4pi.Miscellaneous
27 | {
28 | [Flags]
29 | public enum ModelFlags : uint
30 | {
31 | NONE = 0,
32 | USES_INSTANCED_SHADER = (1 << 0),
33 | VERTICAL_SCALING = (1 << 1),
34 | REQUIRES_PROCEDURAL_LIGHTMAP = (1 << 2),
35 | USES_TREE_INSTANCE_SHADER = (1 << 3),
36 | HORIZONTAL_SCALING = (1 << 4),
37 | IS_PORTAL = (1 << 5),
38 | USES_COUNTER_CUTOUT = (1 << 6),
39 | SHARE_TERRAIN_LIGHTMAP = (1 << 7),
40 | USES_WALL_LIGHTMAP = (1 << 8),
41 | USES_CUTOUT = (1 << 9),
42 | INSTANCE_WITH_FULL_TRANSFORM = (1 << 10),
43 | }
44 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/MiscellaneousResource/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("Sims 4 Miscellaneous Resource Wrapper")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Sims4Modding")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
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("1b9431d7-1aab-4f21-adcd-53a686a81b3a")]
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 |
--------------------------------------------------------------------------------
/s4pi Wrappers/MiscellaneousResource/WidthAndMappingFlags.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2016 by the Sims 4 Tools development team *
3 | * *
4 | * Contributors: *
5 | * pbox *
6 | * Buzzler *
7 | * *
8 | * This file is part of the Sims 4 Package Interface (s4pi) *
9 | * *
10 | * s4pi is free software: you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation, either version 3 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * s4pi is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with s4pi. If not, see . *
22 | ***************************************************************************/
23 |
24 | using System;
25 |
26 | namespace s4pi.Miscellaneous
27 | {
28 | [Flags]
29 | public enum WidthAndMappingFlags : byte
30 | {
31 | NONE = 0,
32 | WIDTH_CUTOUT_1 = (1 << 0),
33 | WIDTH_CUTOUT_2 = (1 << 1),
34 | WIDTH_CUTOUT_3 = (1 << 2),
35 | NO_OPAQUE = (1 << 3),
36 | IS_ARCHWAY = (1 << 4),
37 | SINGLE_TEXTURE_CUTOUT = (1 << 5),
38 | DIAGONAL_CUTOUT_MAPPING_IN_USE = (1 << 6),
39 | }
40 | }
--------------------------------------------------------------------------------
/s4pi Wrappers/NameMapResource/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | // General Information about an assembly is controlled through the following
25 | // set of attributes. Change these attribute values to modify the information
26 | // associated with an assembly.
27 | [assembly: AssemblyTitle("s3pi Name Map Resource wrapper")]
28 | [assembly: AssemblyDescription("Wrapper for 0x0166038C resources.")]
29 | #if DEBUG
30 | [assembly: AssemblyConfiguration("[DEBUG]")]
31 | #else
32 | [assembly: AssemblyConfiguration("")]
33 | #endif
34 | [assembly: AssemblyCompany("Peter L Jones")]
35 | [assembly: AssemblyProduct("s3pi")]
36 | [assembly: AssemblyCopyright("Copyright © 2009 Peter L Jones. Released under GPL 3. See gpl-3.0.txt")]
37 | [assembly: AssemblyTrademark("")]
38 | [assembly: AssemblyCulture("")]
39 |
40 | // Setting ComVisible to false makes the types in this assembly not visible
41 | // to COM components. If you need to access a type in this assembly from
42 | // COM, set the ComVisible attribute to true on that type.
43 | [assembly: ComVisible(false)]
44 |
45 | // Version information for an assembly consists of the following four values:
46 | //
47 | // Major Version
48 | // Minor Version
49 | // Build Number
50 | // Revision
51 | //
52 | // You can specify all the values or you can default the Build and Revision Numbers
53 | // by using the '*' as shown below:
54 | // [assembly: AssemblyVersion("1.0.*")]
55 | //[assembly: AssemblyVersion("0.1.2.*")]
56 |
--------------------------------------------------------------------------------
/s4pi Wrappers/ObjKeyResource/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | // General Information about an assembly is controlled through the following
25 | // set of attributes. Change these attribute values to modify the information
26 | // associated with an assembly.
27 | [assembly: AssemblyTitle("s3pi Catalog Resource wrapper")]
28 | [assembly: AssemblyDescription("Wrapper for catalog entry resources.")]
29 | #if DEBUG
30 | [assembly: AssemblyConfiguration("[DEBUG]")]
31 | #else
32 | [assembly: AssemblyConfiguration("")]
33 | #endif
34 | [assembly: AssemblyCompany("Peter L Jones")]
35 | [assembly: AssemblyProduct("s3pi")]
36 | [assembly: AssemblyCopyright("Copyright © 2009 Peter L Jones. Released under GPL 3. See gpl-3.0.txt")]
37 | [assembly: AssemblyTrademark("")]
38 | [assembly: AssemblyCulture("")]
39 |
40 | // Setting ComVisible to false makes the types in this assembly not visible
41 | // to COM components. If you need to access a type in this assembly from
42 | // COM, set the ComVisible attribute to true on that type.
43 | [assembly: ComVisible(false)]
44 |
45 | // Version information for an assembly consists of the following four values:
46 | //
47 | // Major Version
48 | // Minor Version
49 | // Build Number
50 | // Revision
51 | //
52 | // You can specify all the values or you can default the Build and Revision Numbers
53 | // by using the '*' as shown below:
54 | // [assembly: AssemblyVersion("1.0.*")]
55 | //[assembly: AssemblyVersion("0.1.2.*")]
56 |
--------------------------------------------------------------------------------
/s4pi Wrappers/TextResource/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("s3pi Text Resource wrapper")]
9 | [assembly: AssemblyDescription("Wrapper for text resources.")]
10 | #if DEBUG
11 | [assembly: AssemblyConfiguration("[DEBUG]")]
12 | #else
13 | [assembly: AssemblyConfiguration("")]
14 | #endif
15 | [assembly: AssemblyCompany("Peter L Jones")]
16 | [assembly: AssemblyProduct("s3pi")]
17 | [assembly: AssemblyCopyright("Copyright © 2009 Peter L Jones. Released under GPL 3. See gpl-3.0.txt")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 |
21 | // Setting ComVisible to false makes the types in this assembly not visible
22 | // to COM components. If you need to access a type in this assembly from
23 | // COM, set the ComVisible attribute to true on that type.
24 | [assembly: ComVisible(false)]
25 |
26 | // Version information for an assembly consists of the following four values:
27 | //
28 | // Major Version
29 | // Minor Version
30 | // Build Number
31 | // Revision
32 | //
33 | // You can specify all the values or you can default the Build and Revision Numbers
34 | // by using the '*' as shown below:
35 | // [assembly: AssemblyVersion("1.0.*")]
36 | //[assembly: AssemblyVersion("0.1.2.*")]
37 |
--------------------------------------------------------------------------------
/s4pi.Resource.Commons/CatalogTags/TagDocument.cs:
--------------------------------------------------------------------------------
1 | namespace s4pi.Resource.Commons.CatalogTags
2 | {
3 | using System.Xml.Serialization;
4 |
5 | [XmlRoot("M")]
6 | public class TagDocument
7 | {
8 | [XmlElement("C", ElementName = "C")]
9 | public TagListing[] Listings { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/s4pi.Resource.Commons/CatalogTags/TagListing.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace s4pi.Resource.Commons.CatalogTags
4 | {
5 | public class TagListing
6 | {
7 | [XmlAttribute("n")]
8 | public string Name { get; set; }
9 |
10 | [XmlArray("L", ElementName = "L")]
11 | [XmlArrayItem("T", typeof(Tag))]
12 | public Tag[] Elements { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/s4pi.Resource.Commons/Extensions/TagEnumerableExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 |
4 | using s4pi.Resource.Commons.CatalogTags;
5 |
6 | namespace s4pi.Resource.Commons.Extensions
7 | {
8 | internal static class TagEnumerableExtensions
9 | {
10 | public static object[] ToObjectArray(this IEnumerable tags)
11 | {
12 | return tags.Cast().ToArray();
13 | }
14 |
15 | public static IOrderedEnumerable Order(this IEnumerable tags)
16 | {
17 | return tags.OrderBy(t => t.Index).ThenBy(t => t.Value);
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/s4pi.Resource.Commons/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("s4pi.Resource.Commons")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("s4pi.Resource.Commons")]
13 | [assembly: AssemblyCopyright("Copyright © 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("9338e654-ee8b-43e9-a455-8709462ae9c6")]
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 |
--------------------------------------------------------------------------------
/s4pi.Resource.Commons/s4pi.Commons/Extensions/BinaryWriterExtensions.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2016 by the Sims 4 Tools development team *
3 | * *
4 | * Contributors: *
5 | * Buzzler *
6 | * *
7 | * This file is part of the Sims 4 Package Interface (s4pi) *
8 | * *
9 | * s4pi is free software: you can redistribute it and/or modify *
10 | * it under the terms of the GNU General Public License as published by *
11 | * the Free Software Foundation, either version 3 of the License, or *
12 | * (at your option) any later version. *
13 | * *
14 | * s4pi is distributed in the hope that it will be useful, *
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17 | * GNU General Public License for more details. *
18 | * *
19 | * You should have received a copy of the GNU General Public License *
20 | * along with s4pi. If not, see . *
21 | ***************************************************************************/
22 |
23 | namespace s4pi.Commons.Extensions
24 | {
25 | using System.IO;
26 |
27 | ///
28 | /// Extensions for the class.
29 | ///
30 | public static class BinaryWriterExtensions
31 | {
32 | ///
33 | /// Writes the specified number of empty bytes using the .
34 | ///
35 | public static void WriteEmptyBytes(this BinaryWriter writer, int count)
36 | {
37 | for (int i = 0; i < count; i++)
38 | {
39 | writer.Write((byte)0);
40 | }
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/s4pi.Resource.Commons/s4pi.Commons/Extensions/StringExtensions.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2016 by the Sims 4 Tools development team *
3 | * *
4 | * Contributors: *
5 | * Buzzler *
6 | * *
7 | * This file is part of the Sims 4 Package Interface (s4pi) *
8 | * *
9 | * s4pi is free software: you can redistribute it and/or modify *
10 | * it under the terms of the GNU General Public License as published by *
11 | * the Free Software Foundation, either version 3 of the License, or *
12 | * (at your option) any later version. *
13 | * *
14 | * s4pi is distributed in the hope that it will be useful, *
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17 | * GNU General Public License for more details. *
18 | * *
19 | * You should have received a copy of the GNU General Public License *
20 | * along with s4pi. If not, see . *
21 | ***************************************************************************/
22 |
23 | namespace s4pi.Commons.Extensions
24 | {
25 | using System;
26 |
27 | ///
28 | /// Extensions for the class.
29 | ///
30 | public static class StringExtensions
31 | {
32 | public static string FileExtension(this string fileName)
33 | {
34 | int index = fileName.LastIndexOf(".", StringComparison.Ordinal);
35 |
36 | if (index == -1)
37 | {
38 | return string.Empty;
39 | }
40 |
41 | string extension = fileName.Substring(index + 1);
42 |
43 | return extension;
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/s4pi.Resource.Commons/s4pi.Commons/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("s4pi.Commons")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("s4pi.Commons")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
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("945bf007-4a9d-4e26-b793-fb73eac1f686")]
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 |
--------------------------------------------------------------------------------
/s4pi.Resource.Commons/s4pi.Commons/s4pi.Commons.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {BDAC59C8-3ABF-439F-9C1C-5112CB22F4AD}
8 | Library
9 | Properties
10 | s4pi.Commons
11 | s4pi.Commons
12 | v4.0
13 | 512
14 |
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
56 |
--------------------------------------------------------------------------------
/s4pi/CreateAssemblyVersion/CreateAssemblyVersion.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | Debug
6 | 8.0.30703
7 | 2.0
8 | {114622FB-D6BF-4EA7-9BB9-FB06B5A01212}
9 | WinExe
10 | Properties
11 | CreateAssemblyVersion
12 | CreateAssemblyVersion
13 | v4.0
14 |
15 |
16 | 512
17 |
18 |
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 | AllRules.ruleset
27 | false
28 |
29 |
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 | AllRules.ruleset
37 | false
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
64 |
--------------------------------------------------------------------------------
/s4pi/CreateAssemblyVersion/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/s4pi/Interfaces/AResourceHandler.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 | using System.Collections.Generic;
22 |
23 | namespace s4pi.Interfaces
24 | {
25 | ///
26 | /// Used by WrapperDealer to identify "interesting" classes and assemblies.
27 | /// The class maps implementers of AResource to string representations of ResourceType.
28 | /// Hence each "wrapper" assembly can contain multiple wrapper types (Type key) each of which
29 | /// supports one or more ResourceTypes (List<string> value). The single
30 | /// AResourceHandler implementation summarises what the assembly provides.
31 | ///
32 | public abstract class AResourceHandler : Dictionary>, IResourceHandler
33 | {
34 | ///
35 | /// Create the content of the Dictionary
36 | ///
37 | public AResourceHandler() { }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/s4pi/Interfaces/ConstructorParametersAttribute.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 | using System.Collections.Generic;
22 |
23 | namespace s3pi.Interfaces
24 | {
25 | ///
26 | /// Specify the constructor parameters for a descendant of an abstract class
27 | ///
28 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
29 | [Obsolete("Use DependentList.Add(T instance) or DependendList.Add(Type concrete-of-T).")]
30 | public class ConstructorParametersAttribute : Attribute
31 | {
32 | ///
33 | /// The constructor parameters
34 | ///
35 | public readonly object[] parameters;
36 | ///
37 | /// Specify the constructor parameters for a descendant of an abstract class
38 | ///
39 | /// The constructor parameters
40 | public ConstructorParametersAttribute(object[] parameters) { this.parameters = parameters;}
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/s4pi/Interfaces/IApiVersion.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 |
22 | namespace s4pi.Interfaces
23 | {
24 | ///
25 | /// Support for API versioning
26 | ///
27 | public interface IApiVersion
28 | {
29 | ///
30 | /// The version of the API in use
31 | ///
32 | Int32 RequestedApiVersion { get; }
33 |
34 | ///
35 | /// The best supported version of the API available
36 | ///
37 | Int32 RecommendedApiVersion { get; }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/s4pi/Interfaces/IResource.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 | using System.Collections.Generic;
22 | using System.IO;
23 |
24 | namespace s4pi.Interfaces
25 | {
26 | ///
27 | /// Minimal resource interface
28 | ///
29 | public interface IResource : IApiVersion, IContentFields
30 | {
31 | ///
32 | /// The resource content as a .
33 | ///
34 | Stream Stream { get; }
35 | ///
36 | /// The resource content as a array
37 | ///
38 | byte[] AsBytes { get; }
39 |
40 | ///
41 | /// Raised if the resource is changed
42 | ///
43 | event EventHandler ResourceChanged;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/s4pi/Interfaces/IResourceHandler.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 | using System.Collections.Generic;
22 |
23 | namespace s4pi.Interfaces
24 | {
25 | ///
26 | /// Used by , which is used by WrapperDealer
27 | /// to identify "interesting" classes within assemblies
28 | ///
29 | interface IResourceHandler : IDictionary>
30 | {
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/s4pi/Interfaces/IResourceIndexEntry.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 | using System.IO;
22 |
23 | namespace s4pi.Interfaces
24 | {
25 | ///
26 | /// An index entry within a package
27 | ///
28 | public interface IResourceIndexEntry : IApiVersion, IContentFields, IResourceKey, IEquatable
29 | {
30 | ///
31 | /// If the resource was read from a package, the location in the package the resource was read from
32 | ///
33 | UInt32 Chunkoffset { get; set; }
34 | ///
35 | /// The number of bytes the resource uses within the package
36 | ///
37 | UInt32 Filesize { get; set; }
38 | ///
39 | /// The number of bytes the resource uses in memory
40 | ///
41 | UInt32 Memsize { get; set; }
42 | ///
43 | /// 0xFFFF if Filesize != Memsize, else 0x0000
44 | ///
45 | UInt16 Compressed { get; set; }
46 | ///
47 | /// Always 0x0001
48 | ///
49 | UInt16 Unknown2 { get; set; }
50 |
51 | ///
52 | /// A covering the index entry bytes
53 | ///
54 | Stream Stream { get; }
55 |
56 | ///
57 | /// True if the index entry has been deleted from the package index
58 | ///
59 | bool IsDeleted { get; set; }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/s4pi/Interfaces/IResourceKey.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 | using System.IO;
22 |
23 | namespace s4pi.Interfaces
24 | {
25 | ///
26 | /// Exposes a standard set of properties to identify a resource
27 | ///
28 | public interface IResourceKey : System.Collections.Generic.IEqualityComparer, IEquatable, IComparable
29 | {
30 | ///
31 | /// The "type" of the resource
32 | ///
33 | UInt32 ResourceType { get; set; }
34 | ///
35 | /// The "group" the resource is part of
36 | ///
37 | UInt32 ResourceGroup { get; set; }
38 | ///
39 | /// The "instance" number of the resource
40 | ///
41 | UInt64 Instance { get; set; }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/s4pi/Interfaces/IWrapperCloneable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace s4pi.Interfaces
7 | {
8 | ///
9 | /// Interface for self-clone wrapper
10 | ///
11 | /// Wrapper Type
12 | public interface IWrapperCloneable where T : AResource
13 | {
14 | ///
15 | /// Deep clone the wrapper object with built-in renumbering function
16 | ///
17 | /// Hash salt to renumber the fields
18 | /// If true, preset fields will be renumbered
19 | /// T
20 | T CloneWrapper(string hashsalt, bool renumber = true, bool isStandAlone = true);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/s4pi/Interfaces/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | // General Information about an assembly is controlled through the following
25 | // set of attributes. Change these attribute values to modify the information
26 | // associated with an assembly.
27 | [assembly: AssemblyTitle("s3pi public interface")]
28 | [assembly: AssemblyDescription("Interfaces and abstract classes for s3pi tools.")]
29 | #if DEBUG
30 | [assembly: AssemblyConfiguration("[DEBUG]")]
31 | #else
32 | [assembly: AssemblyConfiguration("")]
33 | #endif
34 | [assembly: AssemblyCompany("Peter L Jones")]
35 | [assembly: AssemblyProduct("s3pi")]
36 | [assembly: AssemblyCopyright("Copyright © 2009 Peter L Jones. Released under GPL 3. See gpl-3.0.txt")]
37 | [assembly: AssemblyTrademark("")]
38 | [assembly: AssemblyCulture("")]
39 |
40 | // Setting ComVisible to false makes the types in this assembly not visible
41 | // to COM components. If you need to access a type in this assembly from
42 | // COM, set the ComVisible attribute to true on that type.
43 | [assembly: ComVisible(false)]
44 |
45 | // Version information for an assembly consists of the following four values:
46 | //
47 | // Major Version
48 | // Minor Version
49 | // Build Number
50 | // Revision
51 | //
52 | // You can specify all the values or you can default the Build and Revision Numbers
53 | // by using the '*' as shown below:
54 | // [assembly: AssemblyVersion("1.0.*")]
55 | //[assembly: AssemblyVersion("0.1.3.0")]
56 |
--------------------------------------------------------------------------------
/s4pi/Package/Compression/DeflaterPending.cs:
--------------------------------------------------------------------------------
1 | // DeflaterPending.cs
2 | //
3 | // Copyright (C) 2001 Mike Krueger
4 | // Copyright (C) 2004 John Reilly
5 | //
6 | // This file was translated from java, it was part of the GNU Classpath
7 | // Copyright (C) 2001 Free Software Foundation, Inc.
8 | //
9 | // This program is free software; you can redistribute it and/or
10 | // modify it under the terms of the GNU General Public License
11 | // as published by the Free Software Foundation; either version 2
12 | // of the License, or (at your option) any later version.
13 | //
14 | // This program is distributed in the hope that it will be useful,
15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | // GNU General Public License for more details.
18 | //
19 | // You should have received a copy of the GNU General Public License
20 | // along with this program; if not, write to the Free Software
21 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 | //
23 | // Linking this library statically or dynamically with other modules is
24 | // making a combined work based on this library. Thus, the terms and
25 | // conditions of the GNU General Public License cover the whole
26 | // combination.
27 | //
28 | // As a special exception, the copyright holders of this library give you
29 | // permission to link this library with independent modules to produce an
30 | // executable, regardless of the license terms of these independent
31 | // modules, and to copy and distribute the resulting executable under
32 | // terms of your choice, provided that you also meet, for each linked
33 | // independent module, the terms and conditions of the license of that
34 | // module. An independent module is a module which is not derived from
35 | // or based on this library. If you modify this library, you may extend
36 | // this exception to your version of the library, but you are not
37 | // obligated to do so. If you do not wish to do so, delete this
38 | // exception statement from your version.
39 |
40 | namespace ICSharpCode.SharpZipLib.Zip.Compression
41 | {
42 |
43 | ///
44 | /// This class stores the pending output of the Deflater.
45 | ///
46 | /// author of the original java version : Jochen Hoenicke
47 | ///
48 | public class DeflaterPending : PendingBuffer
49 | {
50 | ///
51 | /// Construct instance with default buffer size
52 | ///
53 | public DeflaterPending() : base(DeflaterConstants.PENDING_BUF_SIZE)
54 | {
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/s4pi/Package/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("s3pi Package wrapper")]
9 | [assembly: AssemblyDescription("Wrapper for Sims 3 Package files.")]
10 | #if DEBUG
11 | [assembly: AssemblyConfiguration("[DEBUG]")]
12 | #else
13 | [assembly: AssemblyConfiguration("")]
14 | #endif
15 | [assembly: AssemblyCompany("Peter L Jones")]
16 | [assembly: AssemblyProduct("s3pi")]
17 | [assembly: AssemblyCopyright("Copyright © 2009 Peter L Jones. Released under GPL 3. See gpl-3.0.txt")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 |
21 | // Setting ComVisible to false makes the types in this assembly not visible
22 | // to COM components. If you need to access a type in this assembly from
23 | // COM, set the ComVisible attribute to true on that type.
24 | [assembly: ComVisible(false)]
25 |
26 | // Version information for an assembly consists of the following four values:
27 | //
28 | // Major Version
29 | // Minor Version
30 | // Build Number
31 | // Revision
32 | //
33 | // You can specify all the values or you can default the Build and Revision Numbers
34 | // by using the '*' as shown below:
35 | // [assembly: AssemblyVersion("1.0.*")]
36 | //[assembly: AssemblyVersion("0.1.3.0")]
37 |
--------------------------------------------------------------------------------
/s4pi/Settings/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 | using System.Runtime.InteropServices;
23 |
24 | // General Information about an assembly is controlled through the following
25 | // set of attributes. Change these attribute values to modify the information
26 | // associated with an assembly.
27 | [assembly: AssemblyTitle("s3pi library settings")]
28 | [assembly: AssemblyDescription("Runtime settings for s3pi.")]
29 | #if DEBUG
30 | [assembly: AssemblyConfiguration("[DEBUG]")]
31 | #else
32 | [assembly: AssemblyConfiguration("")]
33 | #endif
34 | [assembly: AssemblyCompany("Peter L Jones")]
35 | [assembly: AssemblyProduct("s3pi")]
36 | [assembly: AssemblyCopyright("Copyright © 2009 Peter L Jones. Released under GPL 3. See gpl-3.0.txt")]
37 | [assembly: AssemblyTrademark("")]
38 | [assembly: AssemblyCulture("")]
39 |
40 | // Setting ComVisible to false makes the types in this assembly not visible
41 | // to COM components. If you need to access a type in this assembly from
42 | // COM, set the ComVisible attribute to true on that type.
43 | [assembly: ComVisible(false)]
44 |
45 | // Version information for an assembly consists of the following four values:
46 | //
47 | // Major Version
48 | // Minor Version
49 | // Build Number
50 | // Revision
51 | //
52 | // You can specify all the values or you can default the Build and Revision Numbers
53 | // by using the '*' as shown below:
54 | // [assembly: AssemblyVersion("1.0.*")]
55 | //[assembly: AssemblyVersion("0.1.3.0")]
56 |
--------------------------------------------------------------------------------
/s4pi/Settings/Settings.cs:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | * Copyright (C) 2009, 2010 by Peter L Jones *
3 | * pljones@users.sf.net *
4 | * *
5 | * This file is part of the Sims 3 Package Interface (s3pi) *
6 | * *
7 | * s3pi is free software: you can redistribute it and/or modify *
8 | * it under the terms of the GNU General Public License as published by *
9 | * the Free Software Foundation, either version 3 of the License, or *
10 | * (at your option) any later version. *
11 | * *
12 | * s3pi is distributed in the hope that it will be useful, *
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 | * GNU General Public License for more details. *
16 | * *
17 | * You should have received a copy of the GNU General Public License *
18 | * along with s3pi. If not, see . *
19 | ***************************************************************************/
20 | using System;
21 | using System.Collections.Generic;
22 |
23 | namespace s4pi.Settings
24 | {
25 | ///
26 | /// Holds global settings, currently statically defined
27 | ///
28 | public static class Settings
29 | {
30 | static Settings()
31 | {
32 | // initialisation code, like read from settings file...
33 | }
34 |
35 | static bool checking = true;
36 | ///
37 | /// When true, run extra checks as part of normal operation.
38 | ///
39 | public static bool Checking { get { return checking; } }
40 |
41 | static bool asBytesWorkaround = true;
42 | ///
43 | /// When true, assume data is dirty regardless of tracking.
44 | ///
45 | public static bool AsBytesWorkaround { get { return asBytesWorkaround; } }
46 |
47 | static bool isTS4 = true;
48 | ///
49 | /// Indicate whether the wrapper should use TS4 format to decode files.
50 | ///
51 | public static bool IsTS4 { get { return isTS4; } }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/s4pi/buildAll/Acknowledgements.txt:
--------------------------------------------------------------------------------
1 | Acknowledgements for the s3pi library.
2 |
3 | Code copyright for most of the code in the library is mine - Peter L Jones.
4 | Exceptions to this are indicated in the source.
5 |
6 | However, without the input from all the people who have contributed
7 | knowledege about file formats - the Package and all the resources
8 | contained in it - there would be no s3pi library. There are two many people
9 | to name them all but my thanks goes out to everyone who works on adding
10 | to the wiki:
11 | http://www.simswiki.info/wiki.php?title=Tutorials:TS3_Advanced_Coding_Tutorials
12 |
13 | One name I have to mention specifically is Tiger, without whom the compression
14 | code would still run incredibly slowly (and have errors). Thanks for the code!
15 |
16 | Atavera has written some additional wrappers, not currently included in the
17 | s3pi binary distribution:
18 | http://code.google.com/p/s3pi-wrappers/
19 |
20 | Finally, thanks to ParsimoniousKate, Wes Howe, Karybdis and EA Games.
--------------------------------------------------------------------------------
/s4pi/buildAll/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/s4pi/makedist-s3pi.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | set TargetName=s3pi
3 | set ConfigurationName=Release
4 | set base=%TargetName%
5 | rem -%ConfigurationName%
6 | set src=%TargetName%-Source
7 | set help=..\s3pi Doc\Help\s3piHelp.chm
8 |
9 | set out=S:\Sims3\Tools\s3pi\
10 |
11 | set mydate=%date: =0%
12 | set dd=%mydate:~0,2%
13 | set mm=%mydate:~3,2%
14 | set yy=%mydate:~8,2%
15 | set mytime=%time: =0%
16 | set h=%mytime:~0,2%
17 | set m=%mytime:~3,2%
18 | set s=%mytime:~6,2%
19 | set suffix=%yy%-%mm%%dd%-%h%%m%
20 |
21 | set nsisv=/V3
22 |
23 | if x%ConfigurationName%==xRelease goto REL
24 | set pdb=
25 | goto noREL
26 | :REL:
27 | set pdb=-xr!*.pdb
28 | :noREL:
29 |
30 |
31 | rem there shouldn't be any to delete...
32 | del %out%%TargetName%*%suffix%.*
33 |
34 | pushd ..
35 | 7za a -r -t7z -mx9 -ms -xr!.?* -xr!*.suo -xr!bin -xr!obj -xr!xml -xr!Makefile "%out%%src%_%suffix%.7z" "CS System Classes" s3pi "s3pi Extras" "s3pi Wrappers"
36 | popd
37 |
38 |
39 | mkdir %base%
40 | copy "build\bin\%ConfigurationName%\*" %base%
41 | if exist "%help%" copy "%help%" %base%
42 |
43 | pushd %base%
44 | echo %suffix% >%TargetName%-Version.txt
45 | attrib +r %TargetName%-Version.txt
46 | 7za a -r -t7z -mx9 -ms -xr!.?* -xr!build.* %pdb% "%out%%base%_%suffix%.7z" *
47 | del /f %TargetName%-Version.txt
48 | popd
49 |
50 | rem 7za x -o"%base%-%suffix%" "%out%%base%_%suffix%.7z"
51 | rem No point copying anything but Release as we don't install this:
52 | rem copy ..\GetAssemblyInfo\bin\Release\GetAssemblyInfo.exe "%base%-%suffix%"
53 | rem "%PROGRAMFILES%\nsis\makensis" "/DTARGET=%base%-%suffix%" %nsisv% mknsis.nsi "/XOutFile %out%%base%_%suffix%.exe"
54 |
55 | rmdir /s/q %base%
56 | rem rmdir /s/q %base%-%suffix%
57 | pause
58 |
--------------------------------------------------------------------------------