mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-07-17 19:40:45 +00:00
feat: replace Minecraft logo with LCRE logo at 80% scale
Replace MenuTitle and MenuTitleSmall bitmaps in skinHDWin.swf and skinWin.swf with the custom LCRE (Legacy Console Edition Revelations) logo, scaled to 80% within the original bitmap canvas to avoid occlusion by the load/join menu. Add ReplaceLogo.java and ExtractFromArc.java tools for SWF bitmap replacement and arc file extraction. Keep original arc as .bak.
This commit is contained in:
42
tools/ExtractFromArc.java
Normal file
42
tools/ExtractFromArc.java
Normal file
@@ -0,0 +1,42 @@
|
||||
import java.io.*;
|
||||
import java.nio.file.*;
|
||||
|
||||
public class ExtractFromArc {
|
||||
public static void main(String[] args) throws Exception {
|
||||
if (args.length < 3) {
|
||||
System.out.println("Usage: ExtractFromArc <arc_file> <filename> <output_path>");
|
||||
System.exit(1);
|
||||
}
|
||||
String arcPath = args[0];
|
||||
String target = args[1];
|
||||
String outPath = args[2];
|
||||
|
||||
DataInputStream dis = new DataInputStream(new FileInputStream(arcPath));
|
||||
int numFiles = dis.readInt();
|
||||
int foundOffset = -1, foundSize = -1;
|
||||
for (int i = 0; i < numFiles; i++) {
|
||||
String name = dis.readUTF();
|
||||
int offset = dis.readInt();
|
||||
int size = dis.readInt();
|
||||
if (name.startsWith("*")) name = name.substring(1);
|
||||
if (name.equals(target)) {
|
||||
foundOffset = offset;
|
||||
foundSize = size;
|
||||
}
|
||||
}
|
||||
dis.close();
|
||||
|
||||
if (foundOffset == -1) {
|
||||
System.err.println("File not found in archive: " + target);
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
RandomAccessFile raf = new RandomAccessFile(arcPath, "r");
|
||||
raf.seek(foundOffset);
|
||||
byte[] data = new byte[foundSize];
|
||||
raf.readFully(data);
|
||||
raf.close();
|
||||
Files.write(Paths.get(outPath), data);
|
||||
System.out.println("Extracted " + target + " (" + foundSize + " bytes) -> " + outPath);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user