setup for 00-07 KAEK keys
This commit is contained in:
parent
e4c9035a34
commit
18bdd0f3eb
5 changed files with 85 additions and 7 deletions
|
@ -20,18 +20,24 @@ public class AppPreferences {
|
|||
String applicationKey3,
|
||||
String applicationKey4,
|
||||
String applicationKey5,
|
||||
String applicationKey6,
|
||||
String applicationKey7,
|
||||
String oceanKey0,
|
||||
String oceanKey1,
|
||||
String oceanKey2,
|
||||
String oceanKey3,
|
||||
String oceanKey4,
|
||||
String oceanKey5,
|
||||
String oceanKey6,
|
||||
String oceanKey7,
|
||||
String systemKey0,
|
||||
String systemKey1,
|
||||
String systemKey2,
|
||||
String systemKey3,
|
||||
String systemKey4,
|
||||
String systemKey5
|
||||
String systemKey5,
|
||||
String systemKey6,
|
||||
String systemKey7
|
||||
) {
|
||||
setXciHeaderKey(xciHeaderKey);
|
||||
setHeaderKey(headerKey);
|
||||
|
@ -42,6 +48,8 @@ public class AppPreferences {
|
|||
setApplicationKey(3, applicationKey3);
|
||||
setApplicationKey(4, applicationKey4);
|
||||
setApplicationKey(5, applicationKey5);
|
||||
setApplicationKey(6, applicationKey6);
|
||||
setApplicationKey(7, applicationKey7);
|
||||
|
||||
setOceanKey(0, oceanKey0);
|
||||
setOceanKey(1, oceanKey1);
|
||||
|
@ -49,6 +57,8 @@ public class AppPreferences {
|
|||
setOceanKey(3, oceanKey3);
|
||||
setOceanKey(4, oceanKey4);
|
||||
setOceanKey(5, oceanKey5);
|
||||
setOceanKey(6, oceanKey6);
|
||||
setOceanKey(7, oceanKey7);
|
||||
|
||||
setSystemKey(0, systemKey0);
|
||||
setSystemKey(1, systemKey1);
|
||||
|
@ -56,6 +66,8 @@ public class AppPreferences {
|
|||
setSystemKey(3, systemKey3);
|
||||
setSystemKey(4, systemKey4);
|
||||
setSystemKey(5, systemKey5);
|
||||
setSystemKey(6, systemKey6);
|
||||
setSystemKey(7, systemKey7);
|
||||
}
|
||||
|
||||
public String getRecentPath(){return preferences.get("recent_path", System.getProperty("user.home"));}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class NCAController implements TabController {
|
|||
this.selectedFile = file;
|
||||
HashMap<String, String> keysMap = new HashMap<>();
|
||||
keysMap.put("header_key", AppPreferences.getInstance().getHeaderKey());
|
||||
for (int i = 0; i < 6; i++){
|
||||
for (int i = 0; i < 8; i++){
|
||||
keysMap.put("key_area_key_application_0"+i, AppPreferences.getInstance().getApplicationKey(i));
|
||||
keysMap.put("key_area_key_ocean_0"+i, AppPreferences.getInstance().getOceanKey(i));
|
||||
keysMap.put("key_area_key_system_0"+i, AppPreferences.getInstance().getSystemKey(i));
|
||||
|
|
|
@ -28,18 +28,24 @@ public class SettingsController implements Initializable {
|
|||
keyApp3TF,
|
||||
keyApp4TF,
|
||||
keyApp5TF,
|
||||
keyApp6TF,
|
||||
keyApp7TF,
|
||||
keyOcean0TF,
|
||||
keyOcean1TF,
|
||||
keyOcean2TF,
|
||||
keyOcean3TF,
|
||||
keyOcean4TF,
|
||||
keyOcean5TF,
|
||||
keyOcean6TF,
|
||||
keyOcean7TF,
|
||||
keySys0TF,
|
||||
keySys1TF,
|
||||
keySys2TF,
|
||||
keySys3TF,
|
||||
keySys4TF,
|
||||
keySys5TF;
|
||||
keySys5TF,
|
||||
keySys6TF,
|
||||
keySys7TF;
|
||||
|
||||
@Override
|
||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||
|
@ -51,18 +57,24 @@ public class SettingsController implements Initializable {
|
|||
keyApp3TF.setText(AppPreferences.getInstance().getApplicationKey(3));
|
||||
keyApp4TF.setText(AppPreferences.getInstance().getApplicationKey(4));
|
||||
keyApp5TF.setText(AppPreferences.getInstance().getApplicationKey(5));
|
||||
keyApp6TF.setText(AppPreferences.getInstance().getApplicationKey(6));
|
||||
keyApp7TF.setText(AppPreferences.getInstance().getApplicationKey(7));
|
||||
keyOcean0TF.setText(AppPreferences.getInstance().getOceanKey(0));
|
||||
keyOcean1TF.setText(AppPreferences.getInstance().getOceanKey(1));
|
||||
keyOcean2TF.setText(AppPreferences.getInstance().getOceanKey(2));
|
||||
keyOcean3TF.setText(AppPreferences.getInstance().getOceanKey(3));
|
||||
keyOcean4TF.setText(AppPreferences.getInstance().getOceanKey(4));
|
||||
keyOcean5TF.setText(AppPreferences.getInstance().getOceanKey(5));
|
||||
keyOcean6TF.setText(AppPreferences.getInstance().getOceanKey(6));
|
||||
keyOcean7TF.setText(AppPreferences.getInstance().getOceanKey(7));
|
||||
keySys0TF.setText(AppPreferences.getInstance().getSystemKey(0));
|
||||
keySys1TF.setText(AppPreferences.getInstance().getSystemKey(1));
|
||||
keySys2TF.setText(AppPreferences.getInstance().getSystemKey(2));
|
||||
keySys3TF.setText(AppPreferences.getInstance().getSystemKey(3));
|
||||
keySys4TF.setText(AppPreferences.getInstance().getSystemKey(4));
|
||||
keySys5TF.setText(AppPreferences.getInstance().getSystemKey(5));
|
||||
keySys6TF.setText(AppPreferences.getInstance().getSystemKey(6));
|
||||
keySys7TF.setText(AppPreferences.getInstance().getSystemKey(7));
|
||||
|
||||
setTextValidation(xciHdrKeyTF);
|
||||
setTextValidation(hdrKeyTF);
|
||||
|
@ -72,18 +84,24 @@ public class SettingsController implements Initializable {
|
|||
setTextValidation(keyApp3TF);
|
||||
setTextValidation(keyApp4TF);
|
||||
setTextValidation(keyApp5TF);
|
||||
setTextValidation(keyApp6TF);
|
||||
setTextValidation(keyApp7TF);
|
||||
setTextValidation(keyOcean0TF);
|
||||
setTextValidation(keyOcean1TF);
|
||||
setTextValidation(keyOcean2TF);
|
||||
setTextValidation(keyOcean3TF);
|
||||
setTextValidation(keyOcean4TF);
|
||||
setTextValidation(keyOcean5TF);
|
||||
setTextValidation(keyOcean6TF);
|
||||
setTextValidation(keyOcean7TF);
|
||||
setTextValidation(keySys0TF);
|
||||
setTextValidation(keySys1TF);
|
||||
setTextValidation(keySys2TF);
|
||||
setTextValidation(keySys3TF);
|
||||
setTextValidation(keySys4TF);
|
||||
setTextValidation(keySys5TF);
|
||||
setTextValidation(keySys6TF);
|
||||
setTextValidation(keySys7TF);
|
||||
|
||||
importBtn.setOnAction(e->{
|
||||
FileChooser fileChooser = new FileChooser();
|
||||
|
@ -114,18 +132,24 @@ public class SettingsController implements Initializable {
|
|||
keyApp3TF.setText(fileMap.get("key_area_key_application_03"));
|
||||
keyApp4TF.setText(fileMap.get("key_area_key_application_04"));
|
||||
keyApp5TF.setText(fileMap.get("key_area_key_application_05"));
|
||||
keyApp6TF.setText(fileMap.get("key_area_key_application_06"));
|
||||
keyApp7TF.setText(fileMap.get("key_area_key_application_07"));
|
||||
keyOcean0TF.setText(fileMap.get("key_area_key_ocean_00"));
|
||||
keyOcean1TF.setText(fileMap.get("key_area_key_ocean_01"));
|
||||
keyOcean2TF.setText(fileMap.get("key_area_key_ocean_02"));
|
||||
keyOcean3TF.setText(fileMap.get("key_area_key_ocean_03"));
|
||||
keyOcean4TF.setText(fileMap.get("key_area_key_ocean_04"));
|
||||
keyOcean5TF.setText(fileMap.get("key_area_key_ocean_05"));
|
||||
keyOcean6TF.setText(fileMap.get("key_area_key_ocean_06"));
|
||||
keyOcean7TF.setText(fileMap.get("key_area_key_ocean_07"));
|
||||
keySys0TF.setText(fileMap.get("key_area_key_system_00"));
|
||||
keySys1TF.setText(fileMap.get("key_area_key_system_01"));
|
||||
keySys2TF.setText(fileMap.get("key_area_key_system_02"));
|
||||
keySys3TF.setText(fileMap.get("key_area_key_system_03"));
|
||||
keySys4TF.setText(fileMap.get("key_area_key_system_04"));
|
||||
keySys5TF.setText(fileMap.get("key_area_key_system_05"));
|
||||
keySys6TF.setText(fileMap.get("key_area_key_system_06"));
|
||||
keySys7TF.setText(fileMap.get("key_area_key_system_07"));
|
||||
}
|
||||
catch (IOException ioe){
|
||||
ioe.printStackTrace();
|
||||
|
@ -155,18 +179,24 @@ public class SettingsController implements Initializable {
|
|||
keyApp3TF.getText(),
|
||||
keyApp4TF.getText(),
|
||||
keyApp5TF.getText(),
|
||||
keyApp6TF.getText(),
|
||||
keyApp7TF.getText(),
|
||||
keyOcean0TF.getText(),
|
||||
keyOcean1TF.getText(),
|
||||
keyOcean2TF.getText(),
|
||||
keyOcean3TF.getText(),
|
||||
keyOcean4TF.getText(),
|
||||
keyOcean5TF.getText(),
|
||||
keyOcean6TF.getText(),
|
||||
keyOcean7TF.getText(),
|
||||
keySys0TF.getText(),
|
||||
keySys1TF.getText(),
|
||||
keySys2TF.getText(),
|
||||
keySys3TF.getText(),
|
||||
keySys4TF.getText(),
|
||||
keySys5TF.getText()
|
||||
keySys5TF.getText(),
|
||||
keySys6TF.getText(),
|
||||
keySys7TF.getText()
|
||||
);
|
||||
thisStage.close();
|
||||
});
|
||||
|
|
|
@ -159,7 +159,7 @@ public class NCAContentPFS0 {
|
|||
try{
|
||||
if (hashTableOffset > 0){
|
||||
while (counter < hashTableOffset) {
|
||||
pipedInputStream.read();
|
||||
pipedInputStream.read(); // todo: .skip()
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.shape.SVGPath?>
|
||||
|
||||
<AnchorPane prefHeight="600.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="konogonka.Settings.SettingsController">
|
||||
<AnchorPane prefHeight="600.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="konogonka.Settings.SettingsController">
|
||||
<children>
|
||||
<VBox AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
|
@ -80,6 +80,18 @@
|
|||
<TextField fx:id="keyApp5TF" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox spacing="5.0">
|
||||
<children>
|
||||
<Label text="key_area_key_application_06" />
|
||||
<TextField fx:id="keyApp6TF" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox spacing="5.0">
|
||||
<children>
|
||||
<Label text="key_area_key_application_07" />
|
||||
<TextField fx:id="keyApp7TF" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox spacing="5.0">
|
||||
<children>
|
||||
<Label text="key_area_key_ocean_00" />
|
||||
|
@ -116,6 +128,18 @@
|
|||
<TextField fx:id="keyOcean5TF" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox spacing="5.0">
|
||||
<children>
|
||||
<Label text="key_area_key_ocean_06" />
|
||||
<TextField fx:id="keyOcean6TF" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox spacing="5.0">
|
||||
<children>
|
||||
<Label text="key_area_key_ocean_07" />
|
||||
<TextField fx:id="keyOcean7TF" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox spacing="5.0">
|
||||
<children>
|
||||
<Label text="key_area_key_system_00" />
|
||||
|
@ -152,6 +176,18 @@
|
|||
<TextField fx:id="keySys5TF" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox spacing="5.0">
|
||||
<children>
|
||||
<Label text="key_area_key_system_06" />
|
||||
<TextField fx:id="keySys6TF" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox spacing="5.0">
|
||||
<children>
|
||||
<Label text="key_area_key_system_07" />
|
||||
<TextField fx:id="keySys7TF" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<Separator prefWidth="200.0" />
|
||||
</children>
|
||||
<padding>
|
||||
|
|
Loading…
Reference in a new issue