Fix layer 0 bug
This commit is contained in:
parent
5a5457ebde
commit
642c76daea
|
@ -69,7 +69,7 @@ func (lvl *Level) Height() int {
|
||||||
for _, l := range lvl.Layers {
|
for _, l := range lvl.Layers {
|
||||||
for _, f := range l.Frames {
|
for _, f := range l.Frames {
|
||||||
if (len(f) + l.V) > max {
|
if (len(f) + l.V) > max {
|
||||||
max = len(f)
|
max = len(f) + l.V
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,8 +164,10 @@ func (lvl *Level) GetFrame(o, w, maxW, frameNo int) (ret *Frame) {
|
||||||
lW := layer.Width()
|
lW := layer.Width()
|
||||||
if !layer.Repeat {
|
if !layer.Repeat {
|
||||||
lW += maxW
|
lW += maxW
|
||||||
|
if layer.D != 0 {
|
||||||
off += maxW
|
off += maxW
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for off < 0 {
|
for off < 0 {
|
||||||
off += lW
|
off += lW
|
||||||
|
|
|
@ -31,6 +31,14 @@
|
||||||
"Speed": 2,
|
"Speed": 2,
|
||||||
"Repeat": true,
|
"Repeat": true,
|
||||||
"Transparent": " "
|
"Transparent": " "
|
||||||
|
},
|
||||||
|
"overlay": {
|
||||||
|
"Z-Index": 10,
|
||||||
|
"Direction": 0,
|
||||||
|
"Speed": 0,
|
||||||
|
"Repeat": false,
|
||||||
|
"V-Offset": 25,
|
||||||
|
"Transparent" : " "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
levels/locoworld/overlay/1.frame
Normal file
4
levels/locoworld/overlay/1.frame
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
.___________________.
|
||||||
|
| |
|
||||||
|
| gosl demo lvl |
|
||||||
|
|_________________|
|
Loading…
Reference in New Issue
Block a user