From fe29c83dd0edaf24d15dea9ff2a9aafcfd505ef5 Mon Sep 17 00:00:00 2001 From: Nathan Fritzler Date: Thu, 30 Jun 2022 10:16:27 -0600 Subject: [PATCH] These textures aren't used. --- ...te_texture__mcl_particles_nether_portal.py | 21 ---- ..._texture__mcl_particles_nether_portal_t.py | 21 ---- tools/create_texture__mcl_portals_portal.py | 114 ------------------ 3 files changed, 156 deletions(-) delete mode 100644 tools/create_texture__mcl_particles_nether_portal.py delete mode 100644 tools/create_texture__mcl_particles_nether_portal_t.py delete mode 100644 tools/create_texture__mcl_portals_portal.py diff --git a/tools/create_texture__mcl_particles_nether_portal.py b/tools/create_texture__mcl_particles_nether_portal.py deleted file mode 100644 index 162186eb2..000000000 --- a/tools/create_texture__mcl_particles_nether_portal.py +++ /dev/null @@ -1,21 +0,0 @@ -import png - -s = [ - '0000010', - '0101100', - '0010111', - '0101010', - '1010111', - '0001100', - '0010100', -] - -s = [[int(c) for c in row] for row in s] - -# R, G, B, Alpha (0xFF = opaque): -palette=[(0x00,0x00,0x00,0x00), (0xcf,0x00,0xcf,0xe0)] - -w = png.Writer(len(s[0]), len(s), palette=palette, bitdepth=1) -f = open('mcl_particles_nether_portal.png', 'wb') -w.write(f, s) - diff --git a/tools/create_texture__mcl_particles_nether_portal_t.py b/tools/create_texture__mcl_particles_nether_portal_t.py deleted file mode 100644 index f06198c82..000000000 --- a/tools/create_texture__mcl_particles_nether_portal_t.py +++ /dev/null @@ -1,21 +0,0 @@ -import png - -s = [ - '0010010', - '0101100', - '0010111', - '0101010', - '1010111', - '0101100', - '0010101', -] - -s = [[int(c) for c in row] for row in s] - -# R, G, B, Alpha (0xFF = opaque): -palette=[(0x00,0x00,0x00,0x00), (0x9f,0x00,0xdf,0x92)] - -w = png.Writer(len(s[0]), len(s), palette=palette, bitdepth=1) -f = open('mcl_particles_nether_portal_t.png', 'wb') -w.write(f, s) - diff --git a/tools/create_texture__mcl_portals_portal.py b/tools/create_texture__mcl_portals_portal.py deleted file mode 100644 index 6f0725f69..000000000 --- a/tools/create_texture__mcl_portals_portal.py +++ /dev/null @@ -1,114 +0,0 @@ -import png -w, h = 16, 128; -s = [[int(0) for c in range(w)] for c in range(h)] - -def drawpixel(x, y, t): - if (x >= 0) and (x < w) and (y >= 0) and (y < h): - if(t == 1): - s[y][x] = 1 - elif t==2: - s[y][x] = 1 - s[y][x] - elif t==3: - s[y][x] = s[y][x] + 1 - if s[y][x] > 3: - s[y][x] =s[y][x]-4 - -def circle(X1, Y1, R, t): - x = 0 - y = R - delta = 1 - 2 * R - error = 0 - while y >= 0: - if Y1%w + y < w: - drawpixel(X1 + x, Y1 + y, t) - if Y1%w - y >= 0: - drawpixel(X1 + x, Y1 - y, t) - if Y1%w + y < w: - drawpixel(X1 - x, Y1 + y, t) - if Y1%w - y >= 0: - drawpixel(X1 - x, Y1 - y, t) - error = 2 * (delta + y) - 1 - if ((delta < 0) and (error <= 0)): - x = x + 1 - delta = delta + 2 * x + 1 - elif ((delta > 0) and (error > 0)): - y = y - 1 - delta = delta - 2 * y + 1 - else: - x = x + 1 - y = y - 1 - delta = delta + 2 * (x - y) - -def line(y1, x1, y2, x2, v): - signx = 1 - signy = 1 - dx = x2 - x1 - dy = y2 - y1 - if dx < 0: - dx = - dx - signx = -1 - if dy < 0: - dy = - dy - signy = -1 - offsx = dx/2 - offsy = dy/2 - dir1 = 0 - if dx >= dy: - dir1 = 1 - for i in range(max(dx, dy)+1): - if(v == 1): - s[x1][y1] = 1 - elif v==2: - s[x1][y1] = 1 - s[x1][y1] - elif v==3 or (v==4 and ((x1^y1)&1)) or (v==5 and (((x1|y1)&1)==0)) or (v==7 and ((((x1+1)|y1)&1)==0)) or (v==8 and ((((x1+1)|(y1+1))&1)==0)) or (v==6 and (((x1|(y1+1))&1)==0)): - s[x1][y1] = s[x1][y1] + 1 - if s[x1][y1] > 3: - s[x1][y1] = s[x1][y1] - 4 - if dir1 == 1: - x1 += signx - offsy += dy - if offsy >= dx: - y1 += signy - offsy -= dx - else: - y1 += signy - offsx += dx - if offsx >= dy: - x1 += signx - offsx -= dy - -# R, G, B, Alpha (0xFF = opaque): -palette=[ - (0x30,0x03,0xaf,0xa4), - (0x4f,0x1c,0xaf,0xb4), - (0x7f,0x3d,0xa0,0xc8), - (0x6d,0x5d,0x99,0xb1) -] - -circles = h//w -maxr = w//2 -for i in [1,2,3,5,9,10,11,13]: - for c in range(circles): - q = ((circles-c-1)+i)%w - circle(maxr, maxr+c*w, q, 3) - - -linesperside = 2 -linestarts = round(w / linesperside) # 8 -lineoffset = round(w / linestarts) # 2 -wminus = w - 1 - -for j in range(linesperside): - for k in range(linestarts): - offset = k * w - for q in [0,1,3,4]: -# for q in [1]: - i = j*linestarts + ((k+q)%linestarts) - line(i, offset, wminus-i, offset+wminus, 5+(k&3)) - line(wminus, offset+i, 0, offset+wminus-i, 5+(k&3)) - - - -w = png.Writer(len(s[0]), len(s), palette=palette, bitdepth=2) -f = open('mcl_portals_portal.png', 'wb') -w.write(f, s)