1414using System . Deployment . Application ;
1515using Microsoft . Win32 ;
1616using System . Runtime . InteropServices ;
17+ using Param_SFO ;
18+
1719
1820namespace PARAM . SFO_Editor
1921{
@@ -86,19 +88,10 @@ public void errormessage(int errorcount)
8688
8789 public static Param_SFO . PARAM_SFO psfo ;
8890
89- Playstation version ;
91+ public static Param_SFO . PARAM_SFO . Playstation version ;
9092
9193 System . Timers . Timer timer ;
9294
93- public enum Playstation
94- {
95- ps3 = 0 ,
96- psvita = 1 ,
97- ps4 = 2 ,
98- psp = 3 ,
99- unknown = 4 , //there will be a time i no longer support the scene this will be for ps5+ most probabbly
100- }
101-
10295 #region << For The Image Loop >>
10396
10497 public void RunTimer ( )
@@ -290,7 +283,7 @@ public static void DeleteDirectory(string target_dir)
290283 public void CreateSFX ( Param_SFO . PARAM_SFO psfo , SaveFileDialog dlg )
291284 {
292285 string FileHeader ;
293- if ( version == Form1 . Playstation . ps4 )
286+ if ( version == PARAM_SFO . Playstation . ps4 )
294287 {
295288 //list items we don't want to see in the SFX
296289 List < string > Blockeditems = new List < string > ( ) ;
@@ -599,7 +592,7 @@ private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
599592 while ( i == 0 )
600593 {
601594 #region << PS3 >>
602- if ( version == Playstation . ps3 )
595+ if ( version == Param_SFO . PARAM_SFO . Playstation . ps3 )
603596 {
604597
605598 if ( Directory . Exists ( MainPath + @"\C00\" ) && i == 0 )
@@ -637,7 +630,7 @@ private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
637630 try
638631 {
639632 #region << PS3 >>
640- if ( version == Playstation . ps3 )
633+ if ( version == PARAM_SFO . Playstation . ps3 )
641634 {
642635 if ( Directory . Exists ( MainPath + @"\C00\" ) && i == 1 )
643636 {
@@ -1063,7 +1056,7 @@ private void txtAddonData_TextChanged(object sender, EventArgs e)
10631056 }
10641057 if ( cbxAddon . SelectedItem . ToString ( ) == "ATTRIBUTE" )
10651058 {
1066- if ( version == Playstation . psvita )
1059+ if ( version == PARAM_SFO . Playstation . psvita )
10671060 {
10681061 Uncheck_Attribute_All ( ) ;
10691062
@@ -1452,7 +1445,7 @@ private void button2_Click(object sender, EventArgs e)
14521445 //if ps4 add pub tool info
14531446 //we do need to check if this is all valid
14541447
1455- if ( psfo . PlaystationVersion == Playstation . ps4 )
1448+ if ( psfo . PlaystationVersion == PARAM_SFO . Playstation . ps4 )
14561449 {
14571450 bool foundpubinfo = false ;
14581451 bool foundpubver = false ;
@@ -1612,7 +1605,7 @@ public void ReloadSFO()
16121605
16131606 version = psfo . PlaystationVersion ;
16141607
1615- if ( version == Playstation . ps4 )
1608+ if ( version == PARAM_SFO . Playstation . ps4 )
16161609 {
16171610 tbControl . TabPages . Add ( tbPS4 ) ;
16181611 tbControl . TabPages . Remove ( tbPS3 ) ;
@@ -1621,23 +1614,23 @@ public void ReloadSFO()
16211614 pictureBox2 . Visible = true ;
16221615 }
16231616
1624- if ( version == Playstation . ps3 )
1617+ if ( version == PARAM_SFO . Playstation . ps3 )
16251618 {
16261619 tbControl . TabPages . Remove ( tbPS4 ) ;
16271620 tbControl . TabPages . Add ( tbPS3 ) ;
16281621 tbControl . TabPages . Remove ( tbPSP ) ;
16291622 tbControl . TabPages . Remove ( tbPSVita ) ;
16301623 }
16311624
1632- if ( version == Playstation . psvita )
1625+ if ( version == PARAM_SFO . Playstation . psvita )
16331626 {
16341627 tbControl . TabPages . Remove ( tbPS4 ) ;
16351628 tbControl . TabPages . Remove ( tbPS3 ) ;
16361629 tbControl . TabPages . Remove ( tbPSP ) ;
16371630 tbControl . TabPages . Add ( tbPSVita ) ;
16381631 }
16391632
1640- if ( version == Playstation . psp )
1633+ if ( version == PARAM_SFO . Playstation . psp )
16411634 {
16421635 tbControl . TabPages . Remove ( tbPS4 ) ;
16431636 tbControl . TabPages . Remove ( tbPS3 ) ;
@@ -2116,7 +2109,7 @@ public void ReloadSFO()
21162109 int Val = 0 ;
21172110 int . TryParse ( t . Value . Trim ( ) , out Val ) ;
21182111 #region << PS4 >>
2119- if ( psfo . PlaystationVersion == Playstation . ps4 )
2112+ if ( psfo . PlaystationVersion == PARAM_SFO . Playstation . ps4 )
21202113 {
21212114 switch ( Val )
21222115 {
@@ -2131,7 +2124,7 @@ public void ReloadSFO()
21312124 }
21322125 #endregion << PS4 >>
21332126 #region << PSVita >>
2134- if ( psfo . PlaystationVersion == Playstation . psvita )
2127+ if ( psfo . PlaystationVersion == PARAM_SFO . Playstation . psvita )
21352128 {
21362129 switch ( Val )
21372130 {
@@ -2211,7 +2204,7 @@ public void ReloadSFO()
22112204 if ( t . Name == "BOOTABLE" )
22122205 {
22132206 #region << PS3 >>
2214- if ( version == Playstation . ps3 )
2207+ if ( version == PARAM_SFO . Playstation . ps3 )
22152208 {
22162209 chbBoot . Enabled = true ;
22172210 if ( t . Value . ToString ( ) == "0" )
@@ -2232,7 +2225,7 @@ public void ReloadSFO()
22322225
22332226 #endregion << PS3 >>
22342227 #region << PSP >>
2235- else if ( version == Playstation . psp )
2228+ else if ( version == PARAM_SFO . Playstation . psp )
22362229 {
22372230 cbxVitaBoot . Enabled = true ;
22382231 if ( t . Value . ToString ( ) == "0" )
@@ -2272,7 +2265,7 @@ public void ReloadSFO()
22722265 {
22732266 //we need to know what version of the sfo this is either ps3 / psvita(ps4)
22742267 //this id use for ps4 i geus vita can work 2
2275- if ( version == Playstation . ps4 )
2268+ if ( version == PARAM_SFO . Playstation . ps4 )
22762269 {
22772270 var hex = ( BitConverter . ToString ( t . ValueBuffer , 0 , Convert . ToInt32 ( t . Indextable . param_data_max_len ) ) ) . ToString ( ) . Replace ( "-" , string . Empty ) ;
22782271 var temp = Convert . ToInt32 ( hex ) . ToString ( "X4" ) ;
@@ -2281,7 +2274,7 @@ public void ReloadSFO()
22812274
22822275 txtCATEGORY . Text = ( ( Param_SFO . PARAM_SFO . DataTypes ) Convert . ToInt32 ( hex ) ) . ToString ( ) ;
22832276 }
2284- else if ( version == Playstation . ps3 )
2277+ else if ( version == PARAM_SFO . Playstation . ps3 )
22852278 //ps3
22862279 txtCATEGORY . Text = ( ( Param_SFO . PARAM_SFO . DataTypes ) BitConverter . ToUInt16 ( Encoding . UTF8 . GetBytes ( t . Value ) , 0 ) ) . ToString ( ) ;
22872280 else
@@ -2362,7 +2355,8 @@ public void ReloadSFO()
23622355 cbSystemVersion . Tag = t . Name ;
23632356 //we know its a psp
23642357 cbSystemVersion . Items . Add ( t . Value ) ;
2365- pbLogo . Image = Properties . Resources . PSP_Logo_PlayStation_Portable_logo ;
2358+ pbLogo . Image = Properties . Resources . PSP_Logo_Playstation_Portable_logo ;
2359+
23662360 AlreadyAdded . Add ( t . Name ) ;
23672361 cbSystemVersion . SelectedIndex = 0 ;
23682362 tbControl . TabPages . Remove ( tbPS4 ) ;
0 commit comments