rebase; move to package, prepare header read io

This commit is contained in:
Downforce Agent 2024-08-12 20:20:20 -05:00
parent 0d00360b03
commit 9ba6580409
6 changed files with 28 additions and 16 deletions

View File

@ -4,7 +4,13 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="cf74c012-cc69-4732-ac79-9ddfcbf803ee" name="Changes" comment="help screen" />
<list default="true" id="cf74c012-cc69-4732-ac79-9ddfcbf803ee" name="Changes" comment="initial structuring">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/June.java" beforeDir="false" afterPath="$PROJECT_DIR$/net/screwgravity/vitality4j/June.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/META-INF/MANIFEST.MF" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/Scotty.java" beforeDir="false" afterPath="$PROJECT_DIR$/net/screwgravity/vitality4j/Scotty.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/standalone.java" beforeDir="false" afterPath="$PROJECT_DIR$/net/screwgravity/vitality4j/standalone.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -12,10 +18,11 @@
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="UPDATE_TYPE" value="REBASE" />
</component>
<component name="ProjectColorInfo"><![CDATA[{
"associatedIndex": 6
}]]></component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 6
}</component>
<component name="ProjectId" id="2kSX0H5aEqubJw0msd83khpA5nj" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
@ -26,6 +33,7 @@
"keyToString": {
"Application.Default CLI.executor": "Run",
"RunOnceActivity.ShowReadmeOnStart": "true",
"git-widget-placeholder": "master",
"kotlin-language-version-configured": "true",
"project.structure.last.edited": "Artifacts",
"project.structure.proportion": "0.15",
@ -79,6 +87,7 @@
<component name="VcsManagerConfiguration">
<MESSAGE value="eclipse compiler adjustments" />
<MESSAGE value="help screen" />
<option name="LAST_COMMIT_MESSAGE" value="help screen" />
<MESSAGE value="initial structuring" />
<option name="LAST_COMMIT_MESSAGE" value="initial structuring" />
</component>
</project>

View File

@ -0,0 +1,5 @@
package net.screwgravity.vitality4j;
public class June {
// todo
}

View File

@ -1,11 +1,10 @@
package net.screwgravity.vitality4j;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.zip.Deflater;
import java.io.RandomAccessFile;
public class Scotty {
@ -73,8 +72,9 @@ public class Scotty {
public PSARC(File location) { // existing
// todo: read psarc and set vars above
try {fromDisk = new RandomAccessFile(location, "read");} catch (
FileNotFoundException e) {throw new RuntimeException(e);
try {fromDisk = new RandomAccessFile(location, "read");} catch (FileNotFoundException e) {
if (standalone.fromTerminal) {System.out.println("File \"" + location.getAbsolutePath() +"\" not found.");System.exit(1);}
else {throw new RuntimeException(e);}
}
System.out.println();

View File

@ -1,4 +1,7 @@
package net.screwgravity.vitality4j;
public class standalone {
public static boolean fromTerminal = false;
public static final int[] version = new int[]{0, 0, 0};
// This is used when Vitality4J is run from the terminal.
// Don't make calls to anything in the standalone class when using Vitality4j as a library.
@ -6,6 +9,7 @@ public class standalone {
// This is useful incase the user wants a standalone psarc.exe replacement
// and/or for debugging purposes without another Java project as the interface.
public static void main (String[] args) {
fromTerminal = true;
if (args.length == 0) {
System.out.println(
"usage: vita4j [options] <file>\n" +

View File

@ -1,3 +0,0 @@
public class June {
// todo
}

View File

@ -1,3 +0,0 @@
Manifest-Version: 1.0
Main-Class: standalone