|
@@ -2,6 +2,37 @@ from memory_Context import * |
|
|
from gui_TextureDescription import * |
|
|
from gui_TextureDescription import * |
|
|
from llm import * |
|
|
from llm import * |
|
|
|
|
|
|
|
|
|
|
|
# Generate tile position |
|
|
|
|
|
# |
|
|
|
|
|
# Conditions: |
|
|
|
|
|
# 1. |
|
|
|
|
|
@llm_by_value |
|
|
|
|
|
def gui_generateTilePositions( |
|
|
|
|
|
c: memory_Context |
|
|
|
|
|
) -> memory_Context: |
|
|
|
|
|
if ( |
|
|
|
|
|
c.recentField == "windowHeight" or |
|
|
|
|
|
c.recentField == "windowWidth" |
|
|
|
|
|
): |
|
|
|
|
|
tds: list[gui_TextureDescription] = [] |
|
|
|
|
|
for id in range(0, c.tileImageCount): |
|
|
|
|
|
td = gui_createTextureDescription() |
|
|
|
|
|
td.fileName = c.tileImage |
|
|
|
|
|
td.height = c.tileImageHeight |
|
|
|
|
|
td.width = c.tileImageWidth |
|
|
|
|
|
td.x = id * c.tileImageWidth |
|
|
|
|
|
td.y = 0 |
|
|
|
|
|
tds.append(td) |
|
|
|
|
|
#} |
|
|
|
|
|
c.textureDescriptions = tds |
|
|
|
|
|
c.recentField = "textureDescriptions" |
|
|
|
|
|
return c |
|
|
|
|
|
#} |
|
|
|
|
|
|
|
|
|
|
|
c.recentField = "none" |
|
|
|
|
|
return c |
|
|
|
|
|
#} |
|
|
|
|
|
|
|
|
# Generate textures descriptions |
|
|
# Generate textures descriptions |
|
|
# |
|
|
# |
|
|
# Conditions: |
|
|
# Conditions: |
|
|