add getting dir path from os

This commit is contained in:
matixezor 2021-03-16 20:15:48 +01:00
parent df796c0842
commit 2775ca1277

View File

@ -1,35 +1,36 @@
import os
from pygame import image
from config import main_path
main_path = os.path.dirname(os.getcwd())
WIDTH = 800
HEIGHT = 800
IMAGES = []
for img in ['grass_01', 'grass_02', 'grass_mine_01', 'grass_mine_02', 'grass_rock_01','grass_mine_02a','grass_mine_02a',
'grass_mine_02b','grass_mine_03a','grass_rock_02']:
IMAGES.append(image.load(main_path + 'images/Tiles/' + img + ".png"))
for img in [
'grass_01',
'grass_02',
'grass_mine_01',
'grass_mine_02',
'grass_mine_02a',
'grass_mine_02a',
'grass_mine_02b',
'grass_mine_03a',
'grass_rock_01',
'grass_rock_02',
]:
IMAGES.append(image.load(main_path + '/images/Tiles/' + img + ".png"))
ICON = main_path + 'images/mine_icon.png'
SAPPER_IDLE = image.load(main_path + 'images/sapper_idle/cpt_bomba.png')
ICON = main_path + '/images/mine_icon.png'
SAPPER_IDLE = image.load(main_path + '/images/sapper_idle/cpt_bomba.png')
SAPPER_RUNNING = []
"""for img in [
'sapper_run_01',
'sapper_run_02',
'sapper_run_03',
'sapper_run_04',
'sapper_run_05',
'sapper_run_06',
'sapper_run_07',
'sapper_run_08',
]:"""
for img in [
'cpt_bomba_left',
'cpt_bomba_right',
]:
SAPPER_RUNNING.append(image.load(main_path + 'images/sapper_idle/' + img + ".png"))
SAPPER_RUNNING.append(image.load(main_path + '/images/sapper_idle/' + img + ".png"))
DEFAULT_FIELD = [
[1, 3, 4, 5, 0, 1, 2, 3, 2, 0],