mirror of
https://git.coom.tech/drummyfish/small3dlib.git
synced 2024-11-22 20:49:58 +01:00
Add const to tex datatype
This commit is contained in:
parent
cd7cf6ef01
commit
0eaf283a1b
15 changed files with 17 additions and 17 deletions
|
@ -4,7 +4,7 @@
|
||||||
#define CAT_TEXTURE_WIDTH 128
|
#define CAT_TEXTURE_WIDTH 128
|
||||||
#define CAT_TEXTURE_HEIGHT 128
|
#define CAT_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t catTexture[49152] = {
|
const uint8_t catTexture[49152] = {
|
||||||
251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,
|
251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,
|
||||||
255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,
|
255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,
|
||||||
255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,
|
255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,251,255,255,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define CHEST_TEXTURE_WIDTH 128
|
#define CHEST_TEXTURE_WIDTH 128
|
||||||
#define CHEST_TEXTURE_HEIGHT 128
|
#define CHEST_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t chestTexture[49152] = {
|
const uint8_t chestTexture[49152] = {
|
||||||
152,152,152,152,152,152,157,153,156,157,153,156,152,152,152,151,151,151,148,146,
|
152,152,152,152,152,152,157,153,156,157,153,156,152,152,152,151,151,151,148,146,
|
||||||
147,142,142,142,147,147,147,150,146,148,150,148,150,146,146,146,142,142,142,140,
|
147,142,142,142,147,147,147,150,146,148,150,148,150,146,146,146,142,142,142,140,
|
||||||
138,140,142,142,142,146,144,146,150,146,150,151,149,151,145,143,144,150,148,150,
|
138,140,142,142,142,146,144,146,150,146,150,151,149,151,145,143,144,150,148,150,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define CITY_TEXTURE_WIDTH 256
|
#define CITY_TEXTURE_WIDTH 256
|
||||||
#define CITY_TEXTURE_HEIGHT 256
|
#define CITY_TEXTURE_HEIGHT 256
|
||||||
|
|
||||||
uint8_t cityTexture[196608] = {
|
const uint8_t cityTexture[196608] = {
|
||||||
35,24,34,62,46,59,38,32,37,38,23,38,37,30,41,66,47,64,41,25,44,40,29,41,39,25,
|
35,24,34,62,46,59,38,32,37,38,23,38,37,30,41,66,47,64,41,25,44,40,29,41,39,25,
|
||||||
44,68,47,67,41,26,43,41,24,41,39,28,40,68,47,66,41,37,41,41,29,40,40,21,38,69,
|
44,68,47,67,41,26,43,41,24,41,39,28,40,68,47,66,41,37,41,41,29,40,40,21,38,69,
|
||||||
48,73,42,26,41,41,26,43,40,28,39,69,52,66,42,36,41,41,26,41,40,33,43,69,50,66,
|
48,73,42,26,41,41,26,43,40,28,39,69,52,66,42,36,41,41,26,41,40,33,43,69,50,66,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define GRASSNORMAL_TEXTURE_WIDTH 128
|
#define GRASSNORMAL_TEXTURE_WIDTH 128
|
||||||
#define GRASSNORMAL_TEXTURE_HEIGHT 128
|
#define GRASSNORMAL_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t grassNormalTexture[49152] = {
|
const uint8_t grassNormalTexture[49152] = {
|
||||||
141,154,240,163,160,245,170,171,247,164,168,249,160,163,246,161,166,244,166,166,
|
141,154,240,163,160,245,170,171,247,164,168,249,160,163,246,161,166,244,166,166,
|
||||||
246,154,161,243,154,160,246,157,150,246,159,158,246,147,153,246,164,156,243,158,
|
246,154,161,243,154,160,246,157,150,246,159,158,246,147,153,246,164,156,243,158,
|
||||||
165,246,148,149,243,153,149,243,152,146,241,151,164,238,171,167,244,160,165,245,
|
165,246,148,149,243,153,149,243,152,146,241,151,164,238,171,167,244,160,165,245,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define GRASS_TEXTURE_WIDTH 128
|
#define GRASS_TEXTURE_WIDTH 128
|
||||||
#define GRASS_TEXTURE_HEIGHT 128
|
#define GRASS_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t grassTexture[49152] = {
|
const uint8_t grassTexture[49152] = {
|
||||||
113,116,49,113,112,53,133,134,54,86,97,52,65,84,47,75,81,46,133,132,62,133,129,
|
113,116,49,113,112,53,133,134,54,86,97,52,65,84,47,75,81,46,133,132,62,133,129,
|
||||||
50,129,126,44,137,137,64,82,92,51,91,100,56,75,95,47,72,90,52,63,89,55,56,81,55,
|
50,129,126,44,137,137,64,82,92,51,91,100,56,75,95,47,72,90,52,63,89,55,56,81,55,
|
||||||
103,106,48,113,118,43,140,79,58,170,80,65,104,69,53,72,108,65,169,117,44,188,
|
103,106,48,113,118,43,140,79,58,170,80,65,104,69,53,72,108,65,169,117,44,188,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define HOUSE_TEXTURE_WIDTH 128
|
#define HOUSE_TEXTURE_WIDTH 128
|
||||||
#define HOUSE_TEXTURE_HEIGHT 128
|
#define HOUSE_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t houseTexture[49152] = {
|
const uint8_t houseTexture[49152] = {
|
||||||
137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,
|
137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,
|
||||||
137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,
|
137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,
|
||||||
137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,
|
137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,137,118,93,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define LEVEL1_TEXTURE_WIDTH 128
|
#define LEVEL1_TEXTURE_WIDTH 128
|
||||||
#define LEVEL1_TEXTURE_HEIGHT 128
|
#define LEVEL1_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t level1Texture[49152] = {
|
const uint8_t level1Texture[49152] = {
|
||||||
86,62,39,86,63,42,89,67,43,96,71,44,95,70,44,91,67,43,93,69,44,93,70,45,97,71,
|
86,62,39,86,63,42,89,67,43,96,71,44,95,70,44,91,67,43,93,69,44,93,70,45,97,71,
|
||||||
47,94,71,48,93,70,51,89,66,44,83,63,41,83,63,41,84,64,43,85,66,44,87,68,45,86,
|
47,94,71,48,93,70,51,89,66,44,83,63,41,83,63,41,84,64,43,85,66,44,87,68,45,86,
|
||||||
67,45,90,66,50,93,68,51,91,70,51,90,68,50,93,71,51,89,67,48,87,68,45,90,71,46,
|
67,45,90,66,50,93,68,51,91,70,51,90,68,50,93,71,51,89,67,48,87,68,45,90,71,46,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef LEVEL1_TEXTURE_H
|
#ifndef LEVEL1_TEXTURE_H
|
||||||
#define LEVEL1_TEXTURE_H
|
#define LEVEL1_TEXTURE_H
|
||||||
|
|
||||||
uint16_t level1Palette[256] = {
|
const uint16_t level1Palette[256] = {
|
||||||
0,4226,8452,12678,16936,21162,25388,29614,35921,40147,44373,48599,52857,57083,
|
0,4226,8452,12678,16936,21162,25388,29614,35921,40147,44373,48599,52857,57083,
|
||||||
61309,65535,4193,8418,12611,16836,21029,25254,29447,33672,37865,42090,46283,
|
61309,65535,4193,8418,12611,16836,21029,25254,29447,33672,37865,42090,46283,
|
||||||
50508,54701,58926,63119,65264,2177,6402,8579,12804,14981,19206,21383,25608,
|
50508,54701,58926,63119,65264,2177,6402,8579,12804,14981,19206,21383,25608,
|
||||||
|
@ -26,7 +26,7 @@ uint16_t level1Palette[256] = {
|
||||||
#define LEVEL1_TEXTURE_WIDTH 32
|
#define LEVEL1_TEXTURE_WIDTH 32
|
||||||
#define LEVEL1_TEXTURE_HEIGHT 32
|
#define LEVEL1_TEXTURE_HEIGHT 32
|
||||||
|
|
||||||
uint8_t level1Texture[1024] = {
|
const uint8_t level1Texture[1024] = {
|
||||||
20,20,21,20,20,20,20,20,20,20,20,21,21,22,22,21,21,20,21,21,21,21,21,20,21,21,
|
20,20,21,20,20,20,20,20,20,20,20,21,21,22,22,21,21,20,21,21,21,21,21,20,21,21,
|
||||||
21,21,21,20,20,20,26,26,24,20,25,25,25,25,25,25,25,24,25,25,24,25,25,21,21,25,
|
21,21,21,20,20,20,26,26,24,20,25,25,25,25,25,25,25,24,25,25,24,25,25,21,21,25,
|
||||||
26,25,24,24,25,25,26,26,26,26,26,25,22,22,22,20,25,25,22,22,22,22,22,22,22,22,
|
26,25,24,24,25,25,26,26,26,26,26,25,22,22,22,20,25,25,22,22,22,22,22,22,22,22,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define LEVEL2_TEXTURE_WIDTH 128
|
#define LEVEL2_TEXTURE_WIDTH 128
|
||||||
#define LEVEL2_TEXTURE_HEIGHT 128
|
#define LEVEL2_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t level2Texture[49152] = {
|
const uint8_t level2Texture[49152] = {
|
||||||
108,104,94,87,83,76,75,71,65,105,103,96,71,70,65,99,96,88,75,71,65,107,104,95,
|
108,104,94,87,83,76,75,71,65,105,103,96,71,70,65,99,96,88,75,71,65,107,104,95,
|
||||||
100,96,85,103,98,92,109,102,93,102,97,91,114,108,102,84,80,75,100,96,88,95,92,
|
100,96,85,103,98,92,109,102,93,102,97,91,114,108,102,84,80,75,100,96,88,95,92,
|
||||||
85,93,90,82,100,97,91,86,82,76,92,89,83,96,92,85,102,99,90,119,114,106,119,116,
|
85,93,90,82,100,97,91,86,82,76,92,89,83,96,92,85,102,99,90,119,114,106,119,116,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define LEVEL3_TEXTURE_WIDTH 128
|
#define LEVEL3_TEXTURE_WIDTH 128
|
||||||
#define LEVEL3_TEXTURE_HEIGHT 128
|
#define LEVEL3_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t level3Texture[49152] = {
|
const uint8_t level3Texture[49152] = {
|
||||||
140,136,133,113,109,106,122,118,115,118,114,111,116,112,109,117,113,110,133,130,
|
140,136,133,113,109,106,122,118,115,118,114,111,116,112,109,117,113,110,133,130,
|
||||||
127,127,123,120,121,119,120,125,123,124,153,151,152,139,137,138,153,151,152,115,
|
127,127,123,120,121,119,120,125,123,124,153,151,152,139,137,138,153,151,152,115,
|
||||||
113,114,122,120,121,121,119,120,151,151,151,167,167,167,157,157,157,156,156,156,
|
113,114,122,120,121,121,119,120,151,151,151,167,167,167,157,157,157,156,156,156,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define PLANT_TEXTURE_WIDTH 128
|
#define PLANT_TEXTURE_WIDTH 128
|
||||||
#define PLANT_TEXTURE_HEIGHT 128
|
#define PLANT_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t plantTexture[49152] = {
|
const uint8_t plantTexture[49152] = {
|
||||||
255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,
|
255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,
|
||||||
255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,
|
255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,
|
||||||
255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,
|
255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define SANDNORMAL_TEXTURE_WIDTH 128
|
#define SANDNORMAL_TEXTURE_WIDTH 128
|
||||||
#define SANDNORMAL_TEXTURE_HEIGHT 128
|
#define SANDNORMAL_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t sandNormalTexture[49152] = {
|
const uint8_t sandNormalTexture[49152] = {
|
||||||
148,109,251,147,113,251,152,117,251,152,132,251,140,144,251,128,149,248,106,141,
|
148,109,251,147,113,251,152,117,251,152,132,251,140,144,251,128,149,248,106,141,
|
||||||
250,99,134,250,98,128,251,104,124,252,116,121,253,128,122,254,138,125,253,145,
|
250,99,134,250,98,128,251,104,124,252,116,121,253,128,122,254,138,125,253,145,
|
||||||
131,252,149,142,251,148,151,250,143,157,249,135,165,248,125,172,246,109,177,243,
|
131,252,149,142,251,148,151,250,143,157,249,135,165,248,125,172,246,109,177,243,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define SAND_TEXTURE_WIDTH 128
|
#define SAND_TEXTURE_WIDTH 128
|
||||||
#define SAND_TEXTURE_HEIGHT 128
|
#define SAND_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t sandTexture[49152] = {
|
const uint8_t sandTexture[49152] = {
|
||||||
148,123,107,145,121,102,147,123,108,130,106,88,134,110,93,145,125,108,159,134,
|
148,123,107,145,121,102,147,123,108,130,106,88,134,110,93,145,125,108,159,134,
|
||||||
115,158,129,111,158,131,114,161,130,114,163,139,121,167,137,118,160,136,117,157,
|
115,158,129,111,158,131,114,161,130,114,163,139,121,167,137,118,160,136,117,157,
|
||||||
129,115,152,128,110,144,121,106,142,119,104,143,119,101,146,120,103,156,131,112,
|
129,115,152,128,110,144,121,106,142,119,104,143,119,101,146,120,103,156,131,112,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define TREE_TEXTURE_WIDTH 128
|
#define TREE_TEXTURE_WIDTH 128
|
||||||
#define TREE_TEXTURE_HEIGHT 128
|
#define TREE_TEXTURE_HEIGHT 128
|
||||||
|
|
||||||
uint8_t treeTexture[49152] = {
|
const uint8_t treeTexture[49152] = {
|
||||||
68,158,69,60,153,66,65,164,70,55,139,52,68,153,64,60,154,66,52,141,57,72,168,73,
|
68,158,69,60,153,66,65,164,70,55,139,52,68,153,64,60,154,66,52,141,57,72,168,73,
|
||||||
66,159,69,74,173,73,74,168,73,57,153,65,59,155,67,65,161,69,74,169,72,59,153,67,
|
66,159,69,74,173,73,74,168,73,57,153,65,59,155,67,65,161,69,74,169,72,59,153,67,
|
||||||
57,155,66,59,155,64,60,160,67,69,166,69,61,161,66,62,159,66,62,157,67,65,164,69,
|
57,155,66,59,155,64,60,160,67,69,166,69,61,161,66,62,159,66,62,157,67,65,164,69,
|
||||||
|
|
|
@ -115,7 +115,7 @@ for y in range(OUT_HEIGHT):
|
||||||
|
|
||||||
#-----------------------
|
#-----------------------
|
||||||
|
|
||||||
def printArray(array, name, sizeString, dataType="uint8_t"):
|
def printArray(array, name, sizeString, dataType="const uint8_t"):
|
||||||
print(dataType + " " + name + "[" + sizeString + "] = {")
|
print(dataType + " " + name + "[" + sizeString + "] = {")
|
||||||
arrayString = ""
|
arrayString = ""
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ if GUARDS:
|
||||||
print("#define " + NAME.upper() + "_TEXTURE_H\n")
|
print("#define " + NAME.upper() + "_TEXTURE_H\n")
|
||||||
|
|
||||||
if USE_PALETTE:
|
if USE_PALETTE:
|
||||||
printArray(paletteArray,NAME + "Palette",str(len(paletteArray)),"uint16_t" if USE_565 else "uint8_t")
|
printArray(paletteArray,NAME + "Palette",str(len(paletteArray)),"const uint16_t" if USE_565 else "const uint8_t")
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
print("#define " + NAME.upper() + "_TEXTURE_WIDTH " + str(OUT_WIDTH))
|
print("#define " + NAME.upper() + "_TEXTURE_WIDTH " + str(OUT_WIDTH))
|
||||||
|
|
Loading…
Reference in a new issue