Tweaked level.
Added/corrected some tiles. Added background color.
This commit is contained in:
parent
954a46f965
commit
c874a7d228
Binary file not shown.
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 9.2 KiB |
@ -7,8 +7,8 @@ x
|
||||
x x xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x
|
||||
x xxxxx S x x x x xxxxx x
|
||||
x xxxxxx x xxxxx x xxx x x x x
|
||||
x x xxxxxxxxx x x S xx x x
|
||||
x S S x x x xxxxxxxxxxx xxxxx xxxxxxxxxxxxx x xxxxx x
|
||||
x x xxxxxxxxx x x xxxxx S xx x x
|
||||
x S S x x x xxxxxxxxxxx xxx xxxxxxxxxxxxx x xxxxx x
|
||||
x xxxxxx xxxxxx xxxxx xxxxx xxxxxxx xxxxx S x x x x x x xxxxx x
|
||||
x x x xxxxxxxxxxx x x x xxx xx x
|
||||
x x x xxx x xxx x x x
|
||||
|
@ -98,11 +98,14 @@ pub const GameScene = struct {
|
||||
|
||||
const bounds = viewport.bounds;
|
||||
const background = renderer.textures.get("background_jungle").?;
|
||||
const backgroundColor = allegro.mapRgb(211, 229, 252);
|
||||
const backgroundDisplacementFactor = -0.01;
|
||||
|
||||
const backgroundCenter = self.game.playerPosition.x * backgroundDisplacementFactor;
|
||||
const backgroundLeft = @mod(backgroundCenter, 1.0) - 1;
|
||||
|
||||
allegro.clearToColor(backgroundColor);
|
||||
|
||||
background.drawScaled(bounds.min.x + backgroundLeft * bounds.width(), bounds.min.y, bounds.width(), bounds.height());
|
||||
background.drawScaled(bounds.min.x + (backgroundLeft + 1) * bounds.width(), bounds.min.y, bounds.width(), bounds.height());
|
||||
|
||||
@ -130,14 +133,14 @@ pub const GameScene = struct {
|
||||
switch (ordinals.count()) {
|
||||
0 => offset = 16,
|
||||
1 => {
|
||||
if (ordinals.right) offset = 0;
|
||||
if (ordinals.left) offset = 3;
|
||||
if (ordinals.right) offset = 12;
|
||||
if (ordinals.left) offset = 13;
|
||||
if (ordinals.top) offset = 15;
|
||||
if (ordinals.bottom) offset = 14;
|
||||
},
|
||||
2 => {
|
||||
if (ordinals.right and ordinals.left) offset = 1 + self.game.randomTileOffset(x, y, 2);
|
||||
if (ordinals.top and ordinals.bottom) offset = 12;
|
||||
if (ordinals.right and ordinals.left) offset = 0 + self.game.randomTileOffset(x, y, 4);
|
||||
if (ordinals.top and ordinals.bottom) offset = 20 + self.game.randomTileOffset(x, y, 2);
|
||||
if (ordinals.top and ordinals.left) offset = 9;
|
||||
if (ordinals.top and ordinals.right) offset = 8;
|
||||
if (ordinals.right and ordinals.bottom) offset = 4;
|
||||
|
Loading…
Reference in New Issue
Block a user