Added the Grid, Camera, Level system

Basic player
Started (Barely) on the TextureManager
And other fixes
This commit is contained in:
Bram Verhulst
2024-03-11 03:29:44 +01:00
parent f7c2262e10
commit d6bb3add26
35 changed files with 991 additions and 62 deletions

View File

@@ -0,0 +1,30 @@
import os
from PIL import Image
def convert_to_32bit(file_path):
try:
# Open the image
image = Image.open(file_path)
# Convert to 32-bit color depth
if image.mode != 'RGBA':
image = image.convert('RGBA')
# Save the converted image
converted_file_path = file_path.replace('.png', '_32bit.png')
image.save(converted_file_path)
print(f"Conversion complete for '{file_path}'. Saved as '{converted_file_path}'")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
script_directory = os.path.dirname(os.path.realpath(__file__))
png_files = [f for f in os.listdir(script_directory) if f.lower().endswith('.png')]
if not png_files:
print("No .png files found in the script directory.")
else:
for file_name in png_files:
file_path = os.path.join(script_directory, file_name)
convert_to_32bit(file_path)