Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

46 update megaman title logo #49

Merged
merged 6 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added bin/TITLE.BIN
Binary file not shown.
Binary file modified fixtures/0-miku-body.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fixtures/0-weapons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fixtures/TITLE.BIN-005800-true.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fixtures/TITLE.BIN-007800-true.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fixtures/TITLE.BIN-00b000-true.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fixtures/TITLE.BIN-00f000-true.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { encodeModel } from "./src/EncodeModel";
import { encodeTexture, encodeCutScenes } from "./src/EncodeTexture";
import { encodeTitle } from "./src/EncodeTitle";
import { encodeRom } from "./src/EncodeRom";
import {
replaceCrusher,
Expand All @@ -19,6 +20,9 @@ import {
replaceDrillArm,
} from "./src/EncodeWeapon";

encodeTitle("miku/title.png");
// process.exit();

// Encode the Texture
encodeTexture(
// Body Texture
Expand Down
Binary file added miku/title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions src/EncodeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,6 @@ const encodeMesh = (
const u = uFloor > 255 ? 255 : uFloor < 0 ? 0 : uFloor;
const v = vFloor > 255 ? 255 : vFloor < 0 ? 0 : vFloor;

if (debugUV && u > 166 && u < 166 + 50 && v > 213 && v < 213 + 20) {
console.log(i);
console.log(uv[1], uv[2]);
console.log(u, v);
}

// Push the pixels to be referenced
pixels.push([u, v]);
}
Expand Down Expand Up @@ -661,7 +655,7 @@ const encodeModel = (
mesh[0x80 + i] = label[i];
}
headerOfs = 0x90;
encodeBody("miku/02_BODY.obj", 0, true);
encodeBody("miku/02_BODY.obj");
encodeBody("miku/03_HIPS.obj");
encodeBody("miku/10_LEG_RIGHT_TOP.obj");
encodeBody("miku/11_LEG_RIGHT_BOTTOM.obj");
Expand Down
6 changes: 6 additions & 0 deletions src/EncodeRom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ const encodeRom = () => {

const rom = readFileSync(sourceRom);

const mikuTitle = readFileSync("out/TITLE.BIN");
const title = readFileSync("bin/TITLE.BIN");

console.log("--- Replacing Title ---");
replaceInRom(rom, title, mikuTitle);

// Replace Textures
const mikuTexture = readFileSync("out/PL00T.BIN");
const pl00t = readFileSync("bin/PL00T.BIN");
Expand Down
Loading