You can add a method to produce texture square rather than diamond?
Closed this issue · 4 comments
lamo2k123 commented
You can add a method to produce texture square rather than diamond?
kevinhikaruevans commented
I've tried to read the tile into a square 32x32 image but I don't really know how to. I tried reading it pixel-by-pixel into a 32x32 bitmap, but it doesn't look right. Loading a diamond and rotating it 45 degrees would cause the image to be blurry (from interpolation) and not right.
Is there a program that reads the images into a square texture instead of diamond? I could copy the function that the program uses.
kevinhikaruevans commented
Hmm. I think it should be using texmaps.mul to read images instead of art.mul/artidx.mul. I'll need to work on this some more.
Seems like:
- texmaps = square (for land)
- art = diamonds (for static items)
lamo2k123 commented
Ok
kevinhikaruevans commented
I added texture.js.
So to get square land now, you can do:
const uodatareader = require('./index')({
baseDirectory: '../tmp/uo/'
});
const img = uodatareader.texture.loadTexture(2);
img.png().toFile('thing.png');