Basic minimalistic frame pushing
This commit is contained in:
parent
bb3ecad17e
commit
3ad94771ec
|
@ -13,4 +13,6 @@ func (lvl *Level) AddLayer(z int, l *Layer) {
|
|||
lvl.Layers[z] = l
|
||||
}
|
||||
|
||||
func LoadLevel(filename string) Level
|
||||
func LoadLevel(filename string) *Level {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ var (
|
|||
func RenderFrame(f *Frame) {
|
||||
winMutex.Lock()
|
||||
if win != nil {
|
||||
win.Clear()
|
||||
//win.Clear()
|
||||
for k, _ := range f.Data {
|
||||
win.MovePrint(k, 0, string(f.Data[k]))
|
||||
}
|
||||
|
|
20
default.lvl
20
default.lvl
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
|
||||
"FPS": 10,
|
||||
"Layers": [
|
||||
{ "Z": 0, // Z-Level: 0 = frontmost
|
||||
|
||||
|
@ -10,8 +10,24 @@
|
|||
// v 5 = no motion
|
||||
"V": 1 // Characters / frame ()
|
||||
// TODO: H/V Ratio
|
||||
"data": "... base enc block" },
|
||||
"frames": [
|
||||
"data": "... base enc block"
|
||||
]
|
||||
}
|
||||
{ "Z": 1,
|
||||
"data": "..."}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
LevelDir
|
||||
+-- Manifest :)
|
||||
+-- Layer 1
|
||||
| +-- Manifest << layer dimension, orientation and speed, transparency char
|
||||
| +-- 1.frame << text, unix style lf
|
||||
| +-- 2.frame
|
||||
| | …
|
||||
| +-- <n>.frame
|
||||
+-- Layer 2
|
||||
| …
|
||||
+-- Layer <n>
|
||||
|
|
Loading…
Reference in New Issue
Block a user