<commit_before>package export

import (
	"github.com/Nightgunner5/procedural/data"
	"image"
	"image/color"
	"image/draw"
)

func genMap(a *data.Area) *image.RGBA {
	r := data.NewRand(int64(a.ID))
	img := image.NewRGBA(image.Rect(0, 0, len(a.Tiles)<<3, len(a.Tiles[0])<<2))

	for x := range a.Tiles {
		for y := range a.Tiles[x] {
			t := a.Tiles[x][y]
			if t == nil || t.Terrain == nil {
				continue
			}

			if t.Teleport != nil {
				draw.Draw(img, image.Rect(x<<3, (y-1)<<2, (x+1)<<3, (y+1)<<2), image.Black, image.ZP, draw.Src)
				draw.Draw(img, image.Rect(x<<3+1, (y-1)<<2+1, (x+1)<<3-1, (y+1)<<2-1), image.White, image.ZP, draw.Src)
				continue
			}

			draw.Draw(img, image.Rect(x<<3, y<<2, (x+1)<<3, (y+1)<<2), image.NewUniform(color.RGBA{t.Terrain.R, t.Terrain.G, t.Terrain.B, 255}), image.ZP, draw.Src)
			if !t.Terrain.Passable {
				draw.Draw(img, image.Rect(x<<3, (y-1)<<2, (x+1)<<3, y<<2), image.NewUniform(color.RGBA{
					uint8(uint(t.Terrain.R) * 7 / 8),<commit_msg>add an extra tile of height to the top of images to avoid cutting off walls/grass/teleports at y=0<commit_after>package export

import (
	"github.com/Nightgunner5/procedural/data"
	"image"
	"image/color"
	"image/draw"
)

func genMap(a *data.Area) *image.RGBA {
	r := data.NewRand(int64(a.ID))
	img := image.NewRGBA(image.Rect(0, -1<<2, len(a.Tiles)<<3, len(a.Tiles[0])<<2))

	for x := range a.Tiles {
		for y := range a.Tiles[x] {
			t := a.Tiles[x][y]
			if t == nil || t.Terrain == nil {
				continue
			}

			if t.Teleport != nil {
				draw.Draw(img, image.Rect(x<<3, (y-1)<<2, (x+1)<<3, (y+1)<<2), image.Black, image.ZP, draw.Src)
				draw.Draw(img, image.Rect(x<<3+1, (y-1)<<2+1, (x+1)<<3-1, (y+1)<<2-1), image.White, image.ZP, draw.Src)
				continue
			}

			draw.Draw(img, image.Rect(x<<3, y<<2, (x+1)<<3, (y+1)<<2), image.NewUniform(color.RGBA{t.Terrain.R, t.Terrain.G, t.Terrain.B, 255}), image.ZP, draw.Src)
			if !t.Terrain.Passable {
				draw.Draw(img, image.Rect(x<<3, (y-1)<<2, (x+1)<<3, y<<2), image.NewUniform(color.RGBA{
					uint8(uint(t.Terrain.R) * 7 / 8),
{'fraction_non_alphanumeric': 0.2384876393601551, 'fraction_numerical': 0.043625787687833255, 'mean_word_length': 3.659142212189616, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1819100', 'n_tokens_mistral': 1072, 'n_tokens_neox': 967, 'n_words': 168}