/* This file was generated by scramble.py. */
#line 1 "src/ladder.py"
#include "ladder.h"
#line 2
#include "bumpmap.h"
#include "rgba.h"
#line 6
Tile * ladder_create(void) {
    int w = 128;
    int h = 128;
    Tile * tile = tile_create("ladder", w, h);
#line 11
    for (int x = 0; x < 20; x += 1) {
        for (int y = 0; y < h; y += 1) {
            uint8_t * p = rgba_p(tile->rgba, x, y, w);
            float red = 1 - x / 40.0;
            float green = 0.9 - x / 40.0;
            float blue = 0;
            rgba_color(red, green, blue, p + 28 * 4);
            rgba_color(red, green, blue, p + 80 * 4);
        }
    }
#line 20
    for (int y = 0; y < 10; y += 1) {
        for (int x = 0; x < w; x += 1) {
            uint8_t * p = rgba_p(tile->rgba, x, y + 10, w);
            float red = 1 - y / 20.0;
            float green = 0.9 - y / 20.0;
            float blue = 0;
            for (int i = 0; i < 8; i += 1) {
                rgba_color(red, green, blue, p + 4 * w * i * 32);
            }
        }
    }
#line 29
    Bumpmap * bumpmap = bumpmap_create(w, h);
    bumpmap_perlin(bumpmap, 2.0, 8.0);
    bumpmap_light(bumpmap);
    bumpmap_mul_tile(bumpmap, tile, NULL, 0.1, 1);
    bumpmap_destroy(bumpmap);
#line 35
    land_image_set_rgba_data(tile->pic, tile->rgba);
    land_free(tile->rgba);
#line 38
    tile->climb = 1;
    return tile;
}
/* This file was generated by scramble.py. */
