From 8dcf23523ecf201d446c18d9da4068a378020ca8 Mon Sep 17 00:00:00 2001 From: tkarrass Date: Mon, 8 Feb 2016 22:41:22 +0100 Subject: [PATCH] Fixed background bug, modified default level --- data/level.go | 6 ++++-- levels/locoworld/Manifest.json | 9 +++++---- levels/locoworld/fixed/1.frame | 4 ++-- levels/locoworld/fixed/2.frame | 14 ++++++++++++++ levels/locoworld/fixed/3.frame | 14 ++++++++++++++ levels/locoworld/fixed/4.frame | 14 ++++++++++++++ levels/locoworld/fixed/5.frame | 14 ++++++++++++++ levels/locoworld/fixed/6.frame | 14 ++++++++++++++ levels/locoworld/ground/1.frame | 15 --------------- levels/locoworld/ground/2.frame | 15 --------------- levels/locoworld/ground/3.frame | 15 --------------- levels/locoworld/ground/4.frame | 15 --------------- levels/locoworld/locomotive/1.frame | 25 +++++++++---------------- levels/locoworld/locomotive/2.frame | 25 +++++++++---------------- levels/locoworld/locomotive/3.frame | 25 +++++++++---------------- levels/locoworld/locomotive/4.frame | 25 +++++++++---------------- levels/locoworld/locomotive/5.frame | 25 +++++++++---------------- levels/locoworld/locomotive/6.frame | 25 +++++++++---------------- 18 files changed, 135 insertions(+), 164 deletions(-) create mode 100644 levels/locoworld/fixed/2.frame create mode 100644 levels/locoworld/fixed/3.frame create mode 100644 levels/locoworld/fixed/4.frame create mode 100644 levels/locoworld/fixed/5.frame create mode 100644 levels/locoworld/fixed/6.frame diff --git a/data/level.go b/data/level.go index c950470..5b8866f 100644 --- a/data/level.go +++ b/data/level.go @@ -154,6 +154,8 @@ func (lvl *Level) GetFrame(o, w, maxW, frameNo int) (ret *Frame) { switch layer.D { case 4: off = (frameNo * layer.S) + o + case 5: + off = o case 6: off = -(frameNo * layer.S) + o } @@ -176,10 +178,10 @@ func (lvl *Level) GetFrame(o, w, maxW, frameNo int) (ret *Frame) { ro := (off + col) % lW if 0 < ro && ro < len(r) && string(r[ro]) != layer.T { - ret.Data[row][col] = r[ro] + ret.Data[row+layer.V][col] = r[ro] } else { if zli == 0 { - ret.Data[row][col] = rune(' ') + ret.Data[row+layer.V][col] = rune(' ') } } } diff --git a/levels/locoworld/Manifest.json b/levels/locoworld/Manifest.json index a7c164d..195982d 100644 --- a/levels/locoworld/Manifest.json +++ b/levels/locoworld/Manifest.json @@ -3,22 +3,23 @@ "FPS": 25, "Layers" : { "locomotive": { - "Z-Index": 2, + "Z-Index": 1, "Direction": 4, "Speed": 3, "V-Offset": 7, "Repeat": false, - "Transparent": " " + "Transparent": "x" }, "ground": { - "Z-Index": 1, + "Z-Index": 2, "Direction": 6, "Speed": 1, + "V-Offset": 15, "Repeat": true, "Transparent": " " }, "front" : { - "Z-Index": 0, + "Z-Index": 3, "Direction": 6, "Speed": 2, "Repeat": false, diff --git a/levels/locoworld/fixed/1.frame b/levels/locoworld/fixed/1.frame index 53760fc..b9fc6d5 100644 --- a/levels/locoworld/fixed/1.frame +++ b/levels/locoworld/fixed/1.frame @@ -3,8 +3,8 @@ _,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-. + - _|_ - /\ / \ + ___ ___ _|_ + /\ V / \ __/ \ / \ / | __ __ / \ /\ /\ _/ \/ \ / \ / \ _ / \ / \ diff --git a/levels/locoworld/fixed/2.frame b/levels/locoworld/fixed/2.frame new file mode 100644 index 0000000..b9fc6d5 --- /dev/null +++ b/levels/locoworld/fixed/2.frame @@ -0,0 +1,14 @@ + +._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,- +_,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-. + + + + ___ ___ _|_ + /\ V / \ + __/ \ / \ + / | __ __ / \ /\ /\ + _/ \/ \ / \ / \ _ / \ / \ + __ / / \ /\ ___ / \/ \ / \ _ / \ ___ / \ + / \/ \ _/ \ / \ / \ \/ \ / \ / \ / / \ + / \ \ / \___/ \ / / \ / \ \ / \ + / \ / / \ / \ \ / \ diff --git a/levels/locoworld/fixed/3.frame b/levels/locoworld/fixed/3.frame new file mode 100644 index 0000000..b9fc6d5 --- /dev/null +++ b/levels/locoworld/fixed/3.frame @@ -0,0 +1,14 @@ + +._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,- +_,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-. + + + + ___ ___ _|_ + /\ V / \ + __/ \ / \ + / | __ __ / \ /\ /\ + _/ \/ \ / \ / \ _ / \ / \ + __ / / \ /\ ___ / \/ \ / \ _ / \ ___ / \ + / \/ \ _/ \ / \ / \ \/ \ / \ / \ / / \ + / \ \ / \___/ \ / / \ / \ \ / \ + / \ / / \ / \ \ / \ diff --git a/levels/locoworld/fixed/4.frame b/levels/locoworld/fixed/4.frame new file mode 100644 index 0000000..c6fe4c3 --- /dev/null +++ b/levels/locoworld/fixed/4.frame @@ -0,0 +1,14 @@ + +-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._, +,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._ + + + + __ __ _|_ + /\ / V \ / \ + __/ \ / \ + / | __ __ / \ /\ /\ + _/ \/ \ / \ / \ _ / \ / \ + __ / / \ /\ ___ / \/ \ / \ _ / \ ___ / \ + / \/ \ _/ \ / \ / \ \/ \ / \ / \ / / \ + / \ \ / \___/ \ / / \ / \ \ / \ + / \ / / \ / \ \ / \ diff --git a/levels/locoworld/fixed/5.frame b/levels/locoworld/fixed/5.frame new file mode 100644 index 0000000..ed48829 --- /dev/null +++ b/levels/locoworld/fixed/5.frame @@ -0,0 +1,14 @@ + +-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._, +,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._ + + + + ___ ___ _|_ + /\ V / \ + __/ \ / \ + / | __ __ / \ /\ /\ + _/ \/ \ / \ / \ _ / \ / \ + __ / / \ /\ ___ / \/ \ / \ _ / \ ___ / \ + / \/ \ _/ \ / \ / \ \/ \ / \ / \ / / \ + / \ \ / \___/ \ / / \ / \ \ / \ + / \ / / \ / \ \ / \ diff --git a/levels/locoworld/fixed/6.frame b/levels/locoworld/fixed/6.frame new file mode 100644 index 0000000..9187f69 --- /dev/null +++ b/levels/locoworld/fixed/6.frame @@ -0,0 +1,14 @@ + +-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._, +,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._,-._ + + + + .__ __, _|_ + /\ V / \ + __/ \ / \ + / | __ __ / \ /\ /\ + _/ \/ \ / \ / \ _ / \ / \ + __ / / \ /\ ___ / \/ \ / \ _ / \ ___ / \ + / \/ \ _/ \ / \ / \ \/ \ / \ / \ / / \ + / \ \ / \___/ \ / / \ / \ \ / \ + / \ / / \ / \ \ / \ diff --git a/levels/locoworld/ground/1.frame b/levels/locoworld/ground/1.frame index 7409386..340be8a 100644 --- a/levels/locoworld/ground/1.frame +++ b/levels/locoworld/ground/1.frame @@ -1,18 +1,3 @@ - - - - - - - - - - - - - - - * _o | / ===v=================--=================-==============--======-===========-==== diff --git a/levels/locoworld/ground/2.frame b/levels/locoworld/ground/2.frame index 06d5ccb..0dcea6d 100644 --- a/levels/locoworld/ground/2.frame +++ b/levels/locoworld/ground/2.frame @@ -1,18 +1,3 @@ - - - - - - - - - - - - - - - O _x | / ===v=================--=================-==============--======-===========-==== diff --git a/levels/locoworld/ground/3.frame b/levels/locoworld/ground/3.frame index 08005ae..69b80bd 100644 --- a/levels/locoworld/ground/3.frame +++ b/levels/locoworld/ground/3.frame @@ -1,18 +1,3 @@ - - - - - - - - - - - - - - - o * \ | ===v=================--=================-==============--======-===========-==== diff --git a/levels/locoworld/ground/4.frame b/levels/locoworld/ground/4.frame index 7399581..dac4ab3 100644 --- a/levels/locoworld/ground/4.frame +++ b/levels/locoworld/ground/4.frame @@ -1,18 +1,3 @@ - - - - - - - - - - - - - - - X p \ | ===v=================--=================-==============--======-===========-==== diff --git a/levels/locoworld/locomotive/1.frame b/levels/locoworld/locomotive/1.frame index 3afdc61..b21fb74 100644 --- a/levels/locoworld/locomotive/1.frame +++ b/levels/locoworld/locomotive/1.frame @@ -1,17 +1,10 @@ - - - - - - - - ==== ________ ___________ - _D _| |_______/ \__I_I_____===__|_________| - |(_)--- | H\________/ | | =|___ ___| _________________ - / | | H | | | | ||_| |_|| _| \_____A - | | | H |__--------------------| [___] | =| | - | ________|___H__/__|_____/[][]~\_______| | -| | - |/ | |-----------I_____I [][] [] D |=======|____|________________________|_ +xxxxxx====xxxxxxxx________xxxxxxxxxxxxxxxx___________ +xx_Dx_| |_______/ \__I_I_____===__|_________| +xxx|(_)--- | H\________/ | | =|___ ___|xxxxxx_________________ +xxx/ | | H | | | | ||_| |_||xxxxx_| \_____A +xx| | | H |__--------------------| [___] |xxx=| | +xx| ________|___H__/__|_____/[][]~\_______| |xxx-| | +xx|/ | |-----------I_____I [][] [] D |=======|____|________________________|_ __/ =| o |=-~~\ /~~\ /~~\ /~~\ ____Y___________|__|__________________________|_ - |/-=|___|= || || || |_____/~\___/ |_D__D__D_| |_D__D__D_| - \_/ \_O=====O=====O=====O/ \_/ \_/ \_/ \_/ \_/ +x|/-=|___|= || || || |_____/~\___/xxxxxxxxxx|_D__D__D_|xx|_D__D__D_| +xx\_/xxxxxx\_O=====O=====O=====O/xxxxxx\_/xxxxxxxxxxxxxxx\_/xxx\_/xxxx\_/xxx\_/ diff --git a/levels/locoworld/locomotive/2.frame b/levels/locoworld/locomotive/2.frame index 5191047..8fa3b43 100644 --- a/levels/locoworld/locomotive/2.frame +++ b/levels/locoworld/locomotive/2.frame @@ -1,17 +1,10 @@ - - - - - - - - ==== ________ ___________ - _D _| |_______/ \__I_I_____===__|_________| - |(_)--- | H\________/ | | =|___ ___| _________________ - / | | H | | | | ||_| |_|| _| \_____A - | | | H |__--------------------| [___] | =| | - | ________|___H__/__|_____/[][]~\_______| | -| | - |/ | |-----------I_____I [][] [] D |=======|____|________________________|_ +xxxxxx====xxxxxxxx________xxxxxxxxxxxxxxxx___________ +xx_Dx_| |_______/ \__I_I_____===__|_________| +xxx|(_)--- | H\________/ | | =|___ ___|xxxxxx_________________ +xxx/ | | H | | | | ||_| |_||xxxxx_| \_____A +xx| | | H |__--------------------| [___] |xxx=| | +xx| ________|___H__/__|_____/[][]~\_______| |xxx-| | +xx|/ | |-----------I_____I [][] [] D |=======|____|________________________|_ __/ =| o |=-~~\ /~~\ /~~\ /~~\ ____Y___________|__|__________________________|_ - |/-=|___|= O=====O=====O=====O|_____/~\___/ |_D__D__D_| |_D__D__D_| - \_/ \__/ \__/ \__/ \__/ \_/ \_/ \_/ \_/ \_/ +x|/-=|___|= O=====O=====O=====O|_____/~\___/xxxxxxxxxx|_D__D__D_|xx|_D__D__D_| +xx\_/xxxxxx\__/xx\__/xx\__/xx\__/xxxxxx\_/xxxxxxxxxxxxxxx\_/xxx\_/xxxx\_/xxx\_/ diff --git a/levels/locoworld/locomotive/3.frame b/levels/locoworld/locomotive/3.frame index 0e6322b..fc78bec 100644 --- a/levels/locoworld/locomotive/3.frame +++ b/levels/locoworld/locomotive/3.frame @@ -1,17 +1,10 @@ - - - - - - - - ==== ________ ___________ - _D _| |_______/ \__I_I_____===__|_________| - |(_)--- | H\________/ | | =|___ ___| _________________ - / | | H | | | | ||_| |_|| _| \_____A - | | | H |__--------------------| [___] | =| | - | ________|___H__/__|_____/[][]~\_______| | -| | - |/ | |-----------I_____I [][] [] D |=======|____|________________________|_ +xxxxxx====xxxxxxxx________xxxxxxxxxxxxxxxx___________ +xx_Dx_| |_______/ \__I_I_____===__|_________| +xxx|(_)--- | H\________/ | | =|___ ___|xxxxxx_________________ +xxx/ | | H | | | | ||_| |_||xxxxx_| \_____A +xx| | | H |__--------------------| [___] |xxx=| | +xx| ________|___H__/__|_____/[][]~\_______| |xxx-| | +xx|/ | |-----------I_____I [][] [] D |=======|____|________________________|_ __/ =| o |=-~O=====O=====O=====O\ ____Y___________|__|__________________________|_ - |/-=|___|= || || || |_____/~\___/ |_D__D__D_| |_D__D__D_| - \_/ \__/ \__/ \__/ \__/ \_/ \_/ \_/ \_/ \_/ +x|/-=|___|= || || || |_____/~\___/xxxxxxxxxx|_D__D__D_|xx|_D__D__D_| +xx\_/xxxxxx\__/xx\__/xx\__/xx\__/xxxxxx\_/xxxxxxxxxxxxxxx\_/xxx\_/xxxx\_/xxx\_/ diff --git a/levels/locoworld/locomotive/4.frame b/levels/locoworld/locomotive/4.frame index f232514..74e669f 100644 --- a/levels/locoworld/locomotive/4.frame +++ b/levels/locoworld/locomotive/4.frame @@ -1,17 +1,10 @@ - - - - - - - - ==== ________ ___________ - _D _| |_______/ \__I_I_____===__|_________| - |(_)--- | H\________/ | | =|___ ___| _________________ - / | | H | | | | ||_| |_|| _| \_____A - | | | H |__--------------------| [___] | =| | - | ________|___H__/__|_____/[][]~\_______| | -| | - |/ | |-----------I_____I [][] [] D |=======|____|________________________|_ +xxxxxx====xxxxxxxx________xxxxxxxxxxxxxxxx___________ +xx_Dx_| |_______/ \__I_I_____===__|_________| +xxx|(_)--- | H\________/ | | =|___ ___|xxxxxx_________________ +xxx/ | | H | | | | ||_| |_||xxxxx_| \_____A +xx| | | H |__--------------------| [___] |xxx=| | +xx| ________|___H__/__|_____/[][]~\_______| |xxx-| | +xx|/ | |-----------I_____I [][] [] D |=======|____|________________________|_ __/ =| o |=-O=====O=====O=====O \ ____Y___________|__|__________________________|_ - |/-=|___|= || || || |_____/~\___/ |_D__D__D_| |_D__D__D_| - \_/ \__/ \__/ \__/ \__/ \_/ \_/ \_/ \_/ \_/ +x|/-=|___|= || || || |_____/~\___/xxxxxxxxxx|_D__D__D_|xx|_D__D__D_| +xx\_/xxxxxx\__/xx\__/xx\__/xx\__/xxxxxx\_/xxxxxxxxxxxxxxx\_/xxx\_/xxxx\_/xxx\_/ diff --git a/levels/locoworld/locomotive/5.frame b/levels/locoworld/locomotive/5.frame index a94ab8c..836ad6b 100644 --- a/levels/locoworld/locomotive/5.frame +++ b/levels/locoworld/locomotive/5.frame @@ -1,17 +1,10 @@ - - - - - - - - ==== ________ ___________ - _D _| |_______/ \__I_I_____===__|_________| - |(_)--- | H\________/ | | =|___ ___| _________________ - / | | H | | | | ||_| |_|| _| \_____A - | | | H |__--------------------| [___] | =| | - | ________|___H__/__|_____/[][]~\_______| | -| | - |/ | |-----------I_____I [][] [] D |=======|____|________________________|_ +xxxxxx====xxxxxxxx________xxxxxxxxxxxxxxxx___________ +xx_Dx_| |_______/ \__I_I_____===__|_________| +xxx|(_)--- | H\________/ | | =|___ ___|xxxxxx_________________ +xxx/ | | H | | | | ||_| |_||xxxxx_| \_____A +xx| | | H |__--------------------| [___] |xxx=| | +xx| ________|___H__/__|_____/[][]~\_______| |xxx-| | +xx|/ | |-----------I_____I [][] [] D |=======|____|________________________|_ __/ =| o |=-~~\ /~~\ /~~\ /~~\ ____Y___________|__|__________________________|_ - |/-=|___|=O=====O=====O=====O |_____/~\___/ |_D__D__D_| |_D__D__D_| - \_/ \__/ \__/ \__/ \__/ \_/ \_/ \_/ \_/ \_/ +x|/-=|___|=O=====O=====O=====O |_____/~\___/xxxxxxxxxx|_D__D__D_|xx|_D__D__D_| +xx\_/xxxxxx\__/xx\__/xx\__/xx\__/xxxxxx\_/xxxxxxxxxxxxxxx\_/xxx\_/xxxx\_/xxx\_/ diff --git a/levels/locoworld/locomotive/6.frame b/levels/locoworld/locomotive/6.frame index c49798b..8dfe9b2 100644 --- a/levels/locoworld/locomotive/6.frame +++ b/levels/locoworld/locomotive/6.frame @@ -1,17 +1,10 @@ - - - - - - - - ==== ________ ___________ - _D _| |_______/ \__I_I_____===__|_________| - |(_)--- | H\________/ | | =|___ ___| _________________ - / | | H | | | | ||_| |_|| _| \_____A - | | | H |__--------------------| [___] | =| | - | ________|___H__/__|_____/[][]~\_______| | -| | - |/ | |-----------I_____I [][] [] D |=======|____|________________________|_ +xxxxxx====xxxxxxxx________xxxxxxxxxxxxxxxx___________ +xx_Dx_| |_______/ \__I_I_____===__|_________| +xxx|(_)--- | H\________/ | | =|___ ___|xxxxxx_________________ +xxx/ | | H | | | | ||_| |_||xxxxx_| \_____A +xx| | | H |__--------------------| [___] |xxx=| | +xx| ________|___H__/__|_____/[][]~\_______| |xxx-| | +xx|/ | |-----------I_____I [][] [] D |=======|____|________________________|_ __/ =| o |=-~~\ /~~\ /~~\ /~~\ ____Y___________|__|__________________________|_ - |/-=|___|= || || || |_____/~\___/ |_D__D__D_| |_D__D__D_| - \_/ \O=====O=====O=====O_/ \_/ \_/ \_/ \_/ \_/ +x|/-=|___|= || || || |_____/~\___/xxxxxxxxxx|_D__D__D_|xx|_D__D__D_| +xx\_/xxxxxx\O=====O=====O=====O_/xxxxxx\_/xxxxxxxxxxxxxxx\_/xxx\_/xxxx\_/xxx\_/