profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/monkape/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

monkape/homm3-unpacker 19

Parse HOMM3 game files

monkape/siteswap.js 18

Siteswaps in JavaScript.

monkape/sani.js 16

Juggling animator in JavaScript

monkape/Pigment 15

Slick Sublime Text theme that adapts!

monkape/sublime-text-config 8

The ultimate Sublime Text configuration

monkape/glupost 6

Declarative approach at gulp

monkape/tetris 5

NES tetris clone I made to explore the GameMaker engine

monkape/moveTo 2

A lightweight scroll animation javascript library without any dependency

issue commentmonkape/homm3-unpacker

Web Version | PNGs Downloader

Have you looked into the code? It's built with Vue but should be straightforward.

You just have to loop over Object.values(def.images).map(({data}) => data) and download the ArrayBuffers. The code to download already exists: https://github.com/monkape/homm3-unpacker/blob/142eb0c090fbd637749261118cfaf07ddfd60752/src/app.js#L124-L131


However, it might be more practical to batch extract via Node:

const fs = require("fs")

function read(path) {
   return new Promise((resolve, reject) => {
      fs.readFile(path, (error, data) => (error ? reject(error) : resolve(data)))
   }
}

async function unpack_frames(path, dir="./") {
   const file = await read(path)
   const def = unpackDEF(file)
   for (const [filename, image] of Object.entries(def.images)) {
      write(dir + filename, image.data)
   }
}
nowakprojects

comment created time in 2 months