EditorAtlasPacker Fix incorrectly deducing zero height in some cases
(cherry picked from commit 46eebf11ca
)
This commit is contained in:
parent
a40b88dc2c
commit
d0a5580321
1 changed files with 2 additions and 2 deletions
|
@ -232,12 +232,12 @@ void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_h
|
||||||
const int *top_heights = bitmaps[i].top_heights.ptr();
|
const int *top_heights = bitmaps[i].top_heights.ptr();
|
||||||
const int *bottom_heights = bitmaps[i].bottom_heights.ptr();
|
const int *bottom_heights = bitmaps[i].bottom_heights.ptr();
|
||||||
|
|
||||||
for (int j = 0; j < atlas_w - w; j++) {
|
for (int j = 0; j <= atlas_w - w; j++) {
|
||||||
int height = 0;
|
int height = 0;
|
||||||
|
|
||||||
for (int k = 0; k < w; k++) {
|
for (int k = 0; k < w; k++) {
|
||||||
int pixmap_h = bottom_heights[k];
|
int pixmap_h = bottom_heights[k];
|
||||||
if (pixmap_h == -1) {
|
if (pixmap_h == 0x7FFFFFFF) {
|
||||||
continue; //no pixel here, anything is fine
|
continue; //no pixel here, anything is fine
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue