Dynamic map viewer psx
This commit is contained in:
parent
2b1f1a0191
commit
399017ab45
5 changed files with 201 additions and 63 deletions
15
inspect_l0.cjs
Normal file
15
inspect_l0.cjs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const jsonPath = 'psx-map-exporter/.output-render/L0/auto/L0.json';
|
||||
const cacheDir = 'psx-map-exporter/.cache/L0/sprites';
|
||||
const data = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
|
||||
const items = (data.items || []).filter(item => item.bundleAbsoluteOffset !== undefined && item.frameIndex !== undefined && item.width > 0).slice(0, 5);
|
||||
items.forEach(item => {
|
||||
const bundleHex = item.bundleAbsoluteOffset.toString(16).padStart(8, '0');
|
||||
const frameIdx = item.frameIndex.toString().padStart(3, '0');
|
||||
const fileName = `bundle_${bundleHex}/frame_${frameIdx}.png`;
|
||||
const fullPath = path.join(cacheDir, fileName);
|
||||
const exists = fs.existsSync(fullPath);
|
||||
console.log(`recordIndex: ${item.recordIndex}, bundleAbsoluteOffset: ${item.bundleAbsoluteOffset}, frameIndex: ${item.frameIndex}, width: ${item.width}, height: ${item.height}`);
|
||||
console.log(`File: ${fileName}, Exists: ${exists}`);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue