mirror of
https://github.com/DramaticShape/DramaticShapeVoxelMod.git
synced 2026-08-12 08:01:09 +02:00
account for dpi issues on updated 3d battles
This commit is contained in:
+26
-22
@@ -1,5 +1,31 @@
|
||||
# Changelog
|
||||
|
||||
## 1.3.1
|
||||
|
||||
### Fixed
|
||||
|
||||
- **A staged battle on a phone stood some Pokémon three times the size of the
|
||||
square they were on.** A Pidgey towered over the arena while the mon beside
|
||||
it was the right size, which reads as a bug in one species and is not one.
|
||||
|
||||
Putting the paper back inside a battle pic (BattlePics, 1.3.0) needs the
|
||||
pic's pixels, and a LOVE Image does not hand them back -- so the pic is drawn
|
||||
into a canvas of its own size and the canvas is read. `newCanvas` takes the
|
||||
SURFACE's dpi scale when it is not told otherwise, `conf.lua` turns highdpi
|
||||
on for Android and iOS, and Android's display density is routinely 2.75. So
|
||||
`newCanvas(56, 56)` allocated a 154x154 texture there, the pic was magnified
|
||||
into it, and the readback came back at the magnified size. The rebuilt pic
|
||||
was 2.75x the artwork, the engine's pics layer drew it 1:1 because it trusts
|
||||
`getWidth()`, and the mon stood on its tile nearly three times too big.
|
||||
|
||||
Only a pic with an enclosed hole in it is rebuilt at all -- the rest are
|
||||
handed straight back untouched -- which is why it hit some species and not
|
||||
others, and why it never showed on desktop, where the dpi scale is already 1.
|
||||
The readback now asks for one texel per pic pixel, the way the engine's own
|
||||
`PixelCanvas` does for the same reason. The animated-tile atlas readback took
|
||||
the same fix: on a phone it would have come back magnified too, and every
|
||||
tile coordinate in it counts in eights from the top-left.
|
||||
|
||||
## 1.3.0
|
||||
|
||||
### Added
|
||||
@@ -32,28 +58,6 @@
|
||||
|
||||
### Fixed
|
||||
|
||||
- **A staged battle on a phone stood some Pokémon three times the size of the
|
||||
square they were on.** A Pidgey towered over the arena while the mon beside
|
||||
it was the right size, which reads as a bug in one species and is not one.
|
||||
|
||||
Putting the paper back inside a battle pic (BattlePics, below) needs the
|
||||
pic's pixels, and a LOVE Image does not hand them back -- so the pic is drawn
|
||||
into a canvas of its own size and the canvas is read. `newCanvas` takes the
|
||||
SURFACE's dpi scale when it is not told otherwise, `conf.lua` turns highdpi
|
||||
on for Android and iOS, and Android's display density is routinely 2.75. So
|
||||
`newCanvas(56, 56)` allocated a 154x154 texture there, the pic was magnified
|
||||
into it, and the readback came back at the magnified size. The rebuilt pic
|
||||
was 2.75x the artwork, the engine's pics layer drew it 1:1 because it trusts
|
||||
`getWidth()`, and the mon stood on its tile nearly three times too big.
|
||||
|
||||
Only a pic with an enclosed hole in it is rebuilt at all -- the rest are
|
||||
handed straight back untouched -- which is why it hit some species and not
|
||||
others, and why it never showed on desktop, where the dpi scale is already 1.
|
||||
The readback now asks for one texel per pic pixel, the way the engine's own
|
||||
`PixelCanvas` does for the same reason. The animated-tile atlas readback took
|
||||
the same fix: on a phone it would have come back magnified too, and every
|
||||
tile coordinate in it counts in eights from the top-left.
|
||||
|
||||
- **Battle pics were see-through, and it took a back sprite on a tiled floor
|
||||
to make it obvious.** Gen 1 pics are two-bit art whose lightest shade is
|
||||
white, and the decoded PNGs key that shade to alpha 0 -- which cost nothing
|
||||
|
||||
Reference in New Issue
Block a user