diff --git a/Parser.py b/Parser.py index 6043093..3fa5c69 100644 --- a/Parser.py +++ b/Parser.py @@ -14,6 +14,9 @@ def __init__(self): self.unitConfig = ConfigParser.ConfigParser() self.unitConfig.read(self.mainConfig.get('main', 'unit_config_file')) + self.objectConfig = ConfigParser.ConfigParser() + self.objectConfig.read(self.mainConfig.get('main', 'object_config_file')) + self.loadConfigs() def loadConfigs(self): @@ -38,6 +41,7 @@ def isNumber(number): # Run for all, test to see if it is a number, and returns self.user = {} self.wall = {} self.unit = {} + self.object = {} for section in self.mainConfig.sections(): data = {} @@ -62,6 +66,12 @@ def isNumber(number): # Run for all, test to see if it is a number, and returns for option in self.unitConfig.options(section): data[isNumber(option)] = isNumber(self.unitConfig.get(section, option)) self.unit[section] = unitClasses(data) + + for section in self.objectConfig.sections(): + data = {} + for option in self.objectConfig.options(section): + data[isNumber(option)] = isNumber(self.objectConfig.get(section, option)) + self.object[section] = objectClasses(data) print 'END OF PARSER.PY!' @@ -77,6 +87,9 @@ def __init__(self, dictionary):#, name): self.drillTime = dictionary['drilltime'] self.conductor = dictionary['conductor'] self.texture = dictionary['texture'] + self.selectable = dictionary['select'] + self.dynamite = dictionary['dynamite'] + self.reinforce = dictionary['reinforce'] class unitClasses: def __init__(self, dictionary):#, name): @@ -92,3 +105,18 @@ def __init__(self, dictionary):#, name): self.digMulti = dictionary['digmulti'] self.reinforceMulti = dictionary['reinforcemulti'] self.shovelMulti = dictionary['shovelmulti'] + +class objectClasses: + def __init__(self, dictionary): + self.pickup = dictionary['pickup'] + self.eValue = dictionary['evalue'] + self.oValue = dictionary['ovalue'] + self.stableTime = dictionary['stabletime'] + self.charge = dictionary['charge'] + self.decharge = dictionary['decharge'] +#pickup: yes +#evalue: 0 +#ovalue: 0 +#stabletime: none +#charge: energy_crystal +#decharge: none \ No newline at end of file diff --git a/RR2.py b/RR2.py index 8554d9a..4757885 100644 --- a/RR2.py +++ b/RR2.py @@ -4,7 +4,7 @@ import gameMain import stratCam import fpsTest -import something2 +#import something4 parserClass = Parser.Parser() @@ -14,7 +14,8 @@ gameMain = gameMain.world(parserClass, mapLoaderClass, modelLoaderClass) -stratCam.CameraHandler(modelLoaderClass.mapX, modelLoaderClass.mapY, +stratCam.CameraHandler(parserClass, mapLoaderClass, modelLoaderClass, gameMain, + modelLoaderClass.mapX, modelLoaderClass.mapY, parserClass.userConfig.getfloat("control", "scrollborder"), parserClass.userConfig.getfloat("control", "zoominspeed"), parserClass.userConfig.getfloat("control", "zoomoutspeed"), @@ -22,6 +23,8 @@ parserClass.userConfig.getfloat("control", "zoommin")) #f = fpsTest.thirdPerson(parserClass, gameMain, mapLoaderClass, modelLoaderClass) -#s = something2.Nodes(mapLoaderClass, 10, 10) +#s = something4.grid(mapLoaderClass) +#s1 = something4.aStar(s.landMesh, mapLoaderClass) +#s1.moveTo((14,30)) -run() \ No newline at end of file +run() diff --git a/data/config/main.cfg b/data/config/main.cfg index 34fff70..2957f72 100644 --- a/data/config/main.cfg +++ b/data/config/main.cfg @@ -9,10 +9,11 @@ [main] includes: None tilesize: 64 -testing_map: data\maps\converted\ +testing_map: data\maps\ten\ wall_config_file: data\config\walls.cfg unit_config_file: data\config\unit.cfg user_config_file: data\config\user.cfg +object_config_file: data\config\object.cfg [wall_types] 0: ground @@ -29,4 +30,9 @@ user_config_file: data\config\user.cfg 11: recharge_seam [units] -0: rockraider \ No newline at end of file +0: rockraider + +[objects] +1: energy_crystal +2: ore +3: empty_crystal \ No newline at end of file diff --git a/data/config/walls.cfg b/data/config/walls.cfg index 70cc208..0011fbc 100644 --- a/data/config/walls.cfg +++ b/data/config/walls.cfg @@ -23,6 +23,9 @@ speed_coef: 1 drillTime: none conductor: no texture: data/models/world/textures/ground.png +select: yes +dynamite: 3 +reinforce: none [solid_rock] fullName: Solid Rock @@ -34,6 +37,9 @@ speed_coef: 0 drillTime: none conductor: no texture: data/models/world/textures/solidrock.png +select: no +dynamite: no +reinforce: none [hard_rock] fullName: Hard Rock @@ -45,6 +51,9 @@ speed_coef: 0 drillTime: 10 conductor: no texture: data/models/world/textures/hardrock.png +select: yes +dynamite: yes +reinforce: 3 [loose_rock] fullName: Loose Rock @@ -56,6 +65,9 @@ speed_coef: 0 drillTime: 4 conductor: no texture: data/models/world/textures/looserock.png +select: yes +dynamite: yes +reinforce: 3 [dirt] fullName: Dirt @@ -67,6 +79,9 @@ speed_coef: 0 drillTime: 4 conductor: no texture: data/models/world/textures/dirt.png +select: yes +dynamite: yes +reinforce: 3 [lava] fullName: Lava @@ -78,6 +93,9 @@ speed_coef: 1 drillTime: none conductor: no texture: data/models/world/textures/lava.png +select: no +dynamite: yes +reinforce: none [ore_seam] fullName: Ore Seam @@ -89,6 +107,9 @@ speed_coef: 0 drillTime: 10 conductor: no texture: data/models/world/textures/UNSET.png +select: yes +dynamite: yes +reinforce: none [water] fullName: Water @@ -100,6 +121,9 @@ speed_coef: 1 drillTime: none conductor: no texture: data/models/world/textures/water.png +select: no +dynamite: no +reinforce: none [energy_crystal_seam] fullName: Energy Crystal Seam @@ -111,6 +135,9 @@ speed_coef: 0 drillTime: 10 conductor: no texture: data/models/world/textures/ecseam.png +select: yes +dynamite: yes +reinforce: none [recharge_seam] fullName: Recharge Seam @@ -122,3 +149,6 @@ speed_coef: 0 drillTime: 4 conductor: no texture: data/models/world/textures/UNSET.png +select: yes +dynamite: no +reinforce: none \ No newline at end of file diff --git a/data/maps/ten/maps/Cror.map b/data/maps/ten/maps/Cror.map index e70fee9..96e5fff 100644 --- a/data/maps/ten/maps/Cror.map +++ b/data/maps/ten/maps/Cror.map @@ -1 +1,11 @@ -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ No newline at end of file +22222222221111111111 + + + + + + + + + +  \ No newline at end of file diff --git a/data/maps/ten/maps/Reda.map b/data/maps/ten/maps/Reda.map new file mode 100644 index 0000000..07ffea4 --- /dev/null +++ b/data/maps/ten/maps/Reda.map @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/data/maps/ten/maps/Renu.map b/data/maps/ten/maps/Renu.map new file mode 100644 index 0000000..d878312 Binary files /dev/null and b/data/maps/ten/maps/Renu.map differ diff --git a/data/models/world/dirt.egg b/data/models/world/dirt.egg deleted file mode 100644 index 9af7f43..0000000 --- a/data/models/world/dirt.egg +++ /dev/null @@ -1,267 +0,0 @@ - { Z-up } - - { "Egg laid by Chicken for Blender, version R91" } - - Material { - diffr {0.800000011921} - diffg {0.800000011921} - diffb {0.800000011921} - specr {0.25} - specg {0.25} - specb {0.25} - shininess {12.5} -} - DIRT.001 { - "./textures/dirt.png" - saved-result { 1 } - envtype { MODULATE } - minfilter { LINEAR } - magfilter { LINEAR } - wrap { REPEAT } -} - Cube { - { - { - 2.000000 0.000000 0.000000 0.000000 - 0.000000 2.000000 0.000000 0.000000 - 0.000000 0.000000 2.000000 0.000000 - 0.000000 0.000000 0.000000 1.000000 - } - } - Cube { - 0 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 1 { - 2.0 -2.0 0.0 - { - 1.000000 0.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 2 { - -2.00000023842 -1.99999964237 0.0 - { - 1.000000 1.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 3 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 4 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 5 { - -1.99999988079 2.0 4.0 - { - 1.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 6 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 7 { - 1.9999986887 -2.00000119209 4.0 - { - 0.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 8 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.000000 -0.707107 -0.707107 } - } - } - 9 { - 2.00000095367 1.99999892712 4.0 - { - 1.000000 0.000000 - { -0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 10 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 11 { - 2.0 -2.0 0.0 - { - 0.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 12 { - 2.0 -2.0 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 13 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 14 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.707107 0.000000 -0.707107 } - } - } - 15 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 1.000000 - { 0.000000 -0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 16 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 17 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 -1.000000 } - { 0.000000 1.000000 -0.000000 } - } - } - 18 { - -1.99999988079 2.0 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 19 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { 0.000000 0.707107 0.707107 } - } - } - 20 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.707107 0.000000 0.707107 } - } - } - 21 { - 2.0 1.99999988079 0.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 22 { - -1.99999928474 2.00000071526 0.0 - { - 1.000000 1.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 23 { - -1.99999988079 2.0 4.0 - { - 0.000000 1.000000 - { -0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - } - { - { DIRT.001 } - { Material } - { 0.000000 0.000000 -1.000000 - } - { 0 1 2 3 { Cube } } - } - { - { DIRT.001 } - { Material } - { 0.000000 -0.000000 1.000000 - } - { 4 5 6 7 { Cube } } - } - { - { DIRT.001 } - { Material } - { 1.000000 -0.000000 0.000000 - } - { 8 9 10 11 { Cube } } - } - { - { DIRT.001 } - { Material } - { -0.000000 -1.000000 -0.000000 - } - { 12 13 14 15 { Cube } } - } - { - { DIRT.001 } - { Material } - { -1.000000 0.000000 -0.000000 - } - { 16 17 18 19 { Cube } } - } - { - { DIRT.001 } - { Material } - { 0.000000 1.000000 0.000000 - } - { 20 21 22 23 { Cube } } - } -} \ No newline at end of file diff --git a/data/models/world/ecseam.egg b/data/models/world/ecseam.egg deleted file mode 100644 index cf40caa..0000000 --- a/data/models/world/ecseam.egg +++ /dev/null @@ -1,267 +0,0 @@ - { Z-up } - - { "Egg laid by Chicken for Blender, version R91" } - - Material { - diffr {0.800000011921} - diffg {0.800000011921} - diffb {0.800000011921} - specr {0.25} - specg {0.25} - specb {0.25} - shininess {12.5} -} - SOLIDROCK.001 { - "./textures/ecseam.png" - saved-result { 1 } - envtype { MODULATE } - minfilter { LINEAR } - magfilter { LINEAR } - wrap { REPEAT } -} - Cube { - { - { - 2.000000 0.000000 0.000000 0.000000 - 0.000000 2.000000 0.000000 0.000000 - 0.000000 0.000000 2.000000 0.000000 - 0.000000 0.000000 0.000000 1.000000 - } - } - Cube { - 0 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 1 { - 2.0 -2.0 0.0 - { - 1.000000 0.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 2 { - -2.00000023842 -1.99999964237 0.0 - { - 1.000000 1.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 3 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 4 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 5 { - -1.99999988079 2.0 4.0 - { - 1.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 6 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 7 { - 1.9999986887 -2.00000119209 4.0 - { - 0.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 8 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.000000 -0.707107 -0.707107 } - } - } - 9 { - 2.00000095367 1.99999892712 4.0 - { - 1.000000 0.000000 - { -0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 10 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 11 { - 2.0 -2.0 0.0 - { - 0.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 12 { - 2.0 -2.0 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 13 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 14 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.707107 0.000000 -0.707107 } - } - } - 15 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 1.000000 - { 0.000000 -0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 16 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 17 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 -1.000000 } - { 0.000000 1.000000 -0.000000 } - } - } - 18 { - -1.99999988079 2.0 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 19 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { 0.000000 0.707107 0.707107 } - } - } - 20 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.707107 0.000000 0.707107 } - } - } - 21 { - 2.0 1.99999988079 0.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 22 { - -1.99999928474 2.00000071526 0.0 - { - 1.000000 1.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 23 { - -1.99999988079 2.0 4.0 - { - 0.000000 1.000000 - { -0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - } - { - { SOLIDROCK.001 } - { Material } - { 0.000000 0.000000 -1.000000 - } - { 0 1 2 3 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { 0.000000 -0.000000 1.000000 - } - { 4 5 6 7 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { 1.000000 -0.000000 0.000000 - } - { 8 9 10 11 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { -0.000000 -1.000000 -0.000000 - } - { 12 13 14 15 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { -1.000000 0.000000 -0.000000 - } - { 16 17 18 19 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { 0.000000 1.000000 0.000000 - } - { 20 21 22 23 { Cube } } - } -} diff --git a/data/models/world/ground.blend b/data/models/world/ground.blend deleted file mode 100644 index 11a1b71..0000000 Binary files a/data/models/world/ground.blend and /dev/null differ diff --git a/data/models/world/ground.egg b/data/models/world/ground.egg deleted file mode 100644 index c0287e4..0000000 --- a/data/models/world/ground.egg +++ /dev/null @@ -1,61 +0,0 @@ - { Z-up } - - { "Egg laid by Chicken for Blender, version R91" } - GroundTex { - "./textures/ground.png" - saved-result { 1 } - envtype { MODULATE } - minfilter { LINEAR } - magfilter { LINEAR } - wrap { REPEAT } -} - Plane { - { - { - 2.000000 0.000000 0.000000 0.000000 - 0.000000 2.000000 0.000000 0.000000 - 0.000000 0.000000 2.000000 0.000000 - 0.000000 0.000000 0.000000 1.000000 - } - } - Plane { - 0 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 1 { - -1.99999928474 2.00000071526 0.0 - { - 1.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 2 { - -2.00000023842 -1.99999964237 0.0 - { - 1.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 3 { - 2.0 -2.0 0.0 - { - 0.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - } - { - { GroundTex } - { 0.000000 -0.000000 1.000000 - } - { 0 1 2 3 { Plane } } - } -} diff --git a/data/models/world/hardrock.blend b/data/models/world/hardrock.blend deleted file mode 100644 index 37fcb29..0000000 Binary files a/data/models/world/hardrock.blend and /dev/null differ diff --git a/data/models/world/hardrock.egg b/data/models/world/hardrock.egg deleted file mode 100644 index 2ca55d2..0000000 --- a/data/models/world/hardrock.egg +++ /dev/null @@ -1,267 +0,0 @@ - { Z-up } - - { "Egg laid by Chicken for Blender, version R91" } - - Material { - diffr {0.800000011921} - diffg {0.800000011921} - diffb {0.800000011921} - specr {0.25} - specg {0.25} - specb {0.25} - shininess {12.5} -} - HARDROCK.001 { - "./textures/hardrock.png" - saved-result { 1 } - envtype { MODULATE } - minfilter { LINEAR } - magfilter { LINEAR } - wrap { REPEAT } -} - Cube { - { - { - 2.000000 0.000000 0.000000 0.000000 - 0.000000 2.000000 0.000000 0.000000 - 0.000000 0.000000 2.000000 0.000000 - 0.000000 0.000000 0.000000 1.000000 - } - } - Cube { - 0 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 1 { - 2.0 -2.0 0.0 - { - 1.000000 0.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 2 { - -2.00000023842 -1.99999964237 0.0 - { - 1.000000 1.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 3 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 4 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 5 { - -1.99999988079 2.0 4.0 - { - 1.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 6 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 7 { - 1.9999986887 -2.00000119209 4.0 - { - 0.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 8 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.000000 -0.707107 -0.707107 } - } - } - 9 { - 2.00000095367 1.99999892712 4.0 - { - 1.000000 0.000000 - { -0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 10 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 11 { - 2.0 -2.0 0.0 - { - 0.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 12 { - 2.0 -2.0 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 13 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 14 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.707107 0.000000 -0.707107 } - } - } - 15 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 1.000000 - { 0.000000 -0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 16 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 17 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 -1.000000 } - { 0.000000 1.000000 -0.000000 } - } - } - 18 { - -1.99999988079 2.0 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 19 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { 0.000000 0.707107 0.707107 } - } - } - 20 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.707107 0.000000 0.707107 } - } - } - 21 { - 2.0 1.99999988079 0.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 22 { - -1.99999928474 2.00000071526 0.0 - { - 1.000000 1.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 23 { - -1.99999988079 2.0 4.0 - { - 0.000000 1.000000 - { -0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - } - { - { HARDROCK.001 } - { Material } - { 0.000000 0.000000 -1.000000 - } - { 0 1 2 3 { Cube } } - } - { - { HARDROCK.001 } - { Material } - { 0.000000 -0.000000 1.000000 - } - { 4 5 6 7 { Cube } } - } - { - { HARDROCK.001 } - { Material } - { 1.000000 -0.000000 0.000000 - } - { 8 9 10 11 { Cube } } - } - { - { HARDROCK.001 } - { Material } - { -0.000000 -1.000000 -0.000000 - } - { 12 13 14 15 { Cube } } - } - { - { HARDROCK.001 } - { Material } - { -1.000000 0.000000 -0.000000 - } - { 16 17 18 19 { Cube } } - } - { - { HARDROCK.001 } - { Material } - { 0.000000 1.000000 0.000000 - } - { 20 21 22 23 { Cube } } - } -} diff --git a/data/models/world/lava.egg b/data/models/world/lava.egg deleted file mode 100644 index 01b7b4c..0000000 --- a/data/models/world/lava.egg +++ /dev/null @@ -1,62 +0,0 @@ - { Z-up } - - { "Egg laid by Chicken for Blender, version R91" } - - Untitled { - "./textures/lava.png" - saved-result { 1 } - envtype { MODULATE } - minfilter { LINEAR } - magfilter { LINEAR } - wrap { REPEAT } -} - Plane { - { - { - 2.000000 0.000000 0.000000 0.000000 - 0.000000 2.000000 0.000000 0.000000 - 0.000000 0.000000 2.000000 0.000000 - 0.000000 0.000000 0.000000 1.000000 - } - } - Plane { - 0 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 1 { - -1.99999928474 2.00000071526 0.0 - { - 1.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 2 { - -2.00000023842 -1.99999964237 0.0 - { - 1.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 3 { - 2.0 -2.0 0.0 - { - 0.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - } - { - { Untitled } - { 0.000000 -0.000000 1.000000 - } - { 0 1 2 3 { Plane } } - } -} \ No newline at end of file diff --git a/data/models/world/looserock.egg b/data/models/world/looserock.egg deleted file mode 100644 index d379995..0000000 --- a/data/models/world/looserock.egg +++ /dev/null @@ -1,267 +0,0 @@ - { Z-up } - - { "Egg laid by Chicken for Blender, version R91" } - - Material { - diffr {0.800000011921} - diffg {0.800000011921} - diffb {0.800000011921} - specr {0.25} - specg {0.25} - specb {0.25} - shininess {12.5} -} - LOOSEROCK.001 { - "./textures/looserock.png" - saved-result { 1 } - envtype { MODULATE } - minfilter { LINEAR } - magfilter { LINEAR } - wrap { REPEAT } -} - Cube { - { - { - 2.000000 0.000000 0.000000 0.000000 - 0.000000 2.000000 0.000000 0.000000 - 0.000000 0.000000 2.000000 0.000000 - 0.000000 0.000000 0.000000 1.000000 - } - } - Cube { - 0 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 1 { - 2.0 -2.0 0.0 - { - 1.000000 0.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 2 { - -2.00000023842 -1.99999964237 0.0 - { - 1.000000 1.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 3 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 4 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 5 { - -1.99999988079 2.0 4.0 - { - 1.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 6 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 7 { - 1.9999986887 -2.00000119209 4.0 - { - 0.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 8 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.000000 -0.707107 -0.707107 } - } - } - 9 { - 2.00000095367 1.99999892712 4.0 - { - 1.000000 0.000000 - { -0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 10 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 11 { - 2.0 -2.0 0.0 - { - 0.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 12 { - 2.0 -2.0 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 13 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 14 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.707107 0.000000 -0.707107 } - } - } - 15 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 1.000000 - { 0.000000 -0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 16 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 17 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 -1.000000 } - { 0.000000 1.000000 -0.000000 } - } - } - 18 { - -1.99999988079 2.0 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 19 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { 0.000000 0.707107 0.707107 } - } - } - 20 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.707107 0.000000 0.707107 } - } - } - 21 { - 2.0 1.99999988079 0.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 22 { - -1.99999928474 2.00000071526 0.0 - { - 1.000000 1.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 23 { - -1.99999988079 2.0 4.0 - { - 0.000000 1.000000 - { -0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - } - { - { LOOSEROCK.001 } - { Material } - { 0.000000 0.000000 -1.000000 - } - { 0 1 2 3 { Cube } } - } - { - { LOOSEROCK.001 } - { Material } - { 0.000000 -0.000000 1.000000 - } - { 4 5 6 7 { Cube } } - } - { - { LOOSEROCK.001 } - { Material } - { 1.000000 -0.000000 0.000000 - } - { 8 9 10 11 { Cube } } - } - { - { LOOSEROCK.001 } - { Material } - { -0.000000 -1.000000 -0.000000 - } - { 12 13 14 15 { Cube } } - } - { - { LOOSEROCK.001 } - { Material } - { -1.000000 0.000000 -0.000000 - } - { 16 17 18 19 { Cube } } - } - { - { LOOSEROCK.001 } - { Material } - { 0.000000 1.000000 0.000000 - } - { 20 21 22 23 { Cube } } - } -} diff --git a/data/models/world/oreseam.egg b/data/models/world/oreseam.egg deleted file mode 100644 index b24e303..0000000 --- a/data/models/world/oreseam.egg +++ /dev/null @@ -1,267 +0,0 @@ - { Z-up } - - { "Egg laid by Chicken for Blender, version R91" } - - Material { - diffr {0.800000011921} - diffg {0.800000011921} - diffb {0.800000011921} - specr {0.25} - specg {0.25} - specb {0.25} - shininess {12.5} -} - SOLIDROCK.001 { - "./textures/oreseam.png" - saved-result { 1 } - envtype { MODULATE } - minfilter { LINEAR } - magfilter { LINEAR } - wrap { REPEAT } -} - Cube { - { - { - 2.000000 0.000000 0.000000 0.000000 - 0.000000 2.000000 0.000000 0.000000 - 0.000000 0.000000 2.000000 0.000000 - 0.000000 0.000000 0.000000 1.000000 - } - } - Cube { - 0 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 1 { - 2.0 -2.0 0.0 - { - 1.000000 0.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 2 { - -2.00000023842 -1.99999964237 0.0 - { - 1.000000 1.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 3 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 4 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 5 { - -1.99999988079 2.0 4.0 - { - 1.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 6 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 7 { - 1.9999986887 -2.00000119209 4.0 - { - 0.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 8 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.000000 -0.707107 -0.707107 } - } - } - 9 { - 2.00000095367 1.99999892712 4.0 - { - 1.000000 0.000000 - { -0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 10 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 11 { - 2.0 -2.0 0.0 - { - 0.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 12 { - 2.0 -2.0 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 13 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 14 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.707107 0.000000 -0.707107 } - } - } - 15 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 1.000000 - { 0.000000 -0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 16 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 17 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 -1.000000 } - { 0.000000 1.000000 -0.000000 } - } - } - 18 { - -1.99999988079 2.0 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 19 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { 0.000000 0.707107 0.707107 } - } - } - 20 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.707107 0.000000 0.707107 } - } - } - 21 { - 2.0 1.99999988079 0.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 22 { - -1.99999928474 2.00000071526 0.0 - { - 1.000000 1.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 23 { - -1.99999988079 2.0 4.0 - { - 0.000000 1.000000 - { -0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - } - { - { SOLIDROCK.001 } - { Material } - { 0.000000 0.000000 -1.000000 - } - { 0 1 2 3 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { 0.000000 -0.000000 1.000000 - } - { 4 5 6 7 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { 1.000000 -0.000000 0.000000 - } - { 8 9 10 11 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { -0.000000 -1.000000 -0.000000 - } - { 12 13 14 15 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { -1.000000 0.000000 -0.000000 - } - { 16 17 18 19 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { 0.000000 1.000000 0.000000 - } - { 20 21 22 23 { Cube } } - } -} diff --git a/data/models/world/rechargeseam.egg b/data/models/world/rechargeseam.egg deleted file mode 100644 index 6a0ee69..0000000 --- a/data/models/world/rechargeseam.egg +++ /dev/null @@ -1,267 +0,0 @@ - { Z-up } - - { "Egg laid by Chicken for Blender, version R91" } - - Material { - diffr {0.800000011921} - diffg {0.800000011921} - diffb {0.800000011921} - specr {0.25} - specg {0.25} - specb {0.25} - shininess {12.5} -} - SOLIDROCK.001 { - "./textures/rechargeseam.png" - saved-result { 1 } - envtype { MODULATE } - minfilter { LINEAR } - magfilter { LINEAR } - wrap { REPEAT } -} - Cube { - { - { - 2.000000 0.000000 0.000000 0.000000 - 0.000000 2.000000 0.000000 0.000000 - 0.000000 0.000000 2.000000 0.000000 - 0.000000 0.000000 0.000000 1.000000 - } - } - Cube { - 0 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 1 { - 2.0 -2.0 0.0 - { - 1.000000 0.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 2 { - -2.00000023842 -1.99999964237 0.0 - { - 1.000000 1.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 3 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 4 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 5 { - -1.99999988079 2.0 4.0 - { - 1.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 6 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 7 { - 1.9999986887 -2.00000119209 4.0 - { - 0.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 8 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.000000 -0.707107 -0.707107 } - } - } - 9 { - 2.00000095367 1.99999892712 4.0 - { - 1.000000 0.000000 - { -0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 10 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 11 { - 2.0 -2.0 0.0 - { - 0.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 12 { - 2.0 -2.0 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 13 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 14 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.707107 0.000000 -0.707107 } - } - } - 15 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 1.000000 - { 0.000000 -0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 16 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 17 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 -1.000000 } - { 0.000000 1.000000 -0.000000 } - } - } - 18 { - -1.99999988079 2.0 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 19 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { 0.000000 0.707107 0.707107 } - } - } - 20 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.707107 0.000000 0.707107 } - } - } - 21 { - 2.0 1.99999988079 0.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 22 { - -1.99999928474 2.00000071526 0.0 - { - 1.000000 1.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 23 { - -1.99999988079 2.0 4.0 - { - 0.000000 1.000000 - { -0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - } - { - { SOLIDROCK.001 } - { Material } - { 0.000000 0.000000 -1.000000 - } - { 0 1 2 3 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { 0.000000 -0.000000 1.000000 - } - { 4 5 6 7 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { 1.000000 -0.000000 0.000000 - } - { 8 9 10 11 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { -0.000000 -1.000000 -0.000000 - } - { 12 13 14 15 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { -1.000000 0.000000 -0.000000 - } - { 16 17 18 19 { Cube } } - } - { - { SOLIDROCK.001 } - { Material } - { 0.000000 1.000000 0.000000 - } - { 20 21 22 23 { Cube } } - } -} diff --git a/data/models/world/solidrock.blend b/data/models/world/solidrock.blend deleted file mode 100644 index 17a6003..0000000 Binary files a/data/models/world/solidrock.blend and /dev/null differ diff --git a/data/models/world/solidrock.egg b/data/models/world/solidrock.egg deleted file mode 100644 index 485160a..0000000 --- a/data/models/world/solidrock.egg +++ /dev/null @@ -1,267 +0,0 @@ - { Z-up } - - { "Egg laid by Chicken for Blender, version R91" } - - Material { - diffr {0.800000011921} - diffg {0.800000011921} - diffb {0.800000011921} - specr {0.25} - specg {0.25} - specb {0.25} - shininess {12.5} -} - Solid_Rock_Tex { - "./textures/solidrock.png" - saved-result { 1 } - envtype { MODULATE } - minfilter { LINEAR } - magfilter { LINEAR } - wrap { REPEAT } -} - Cube { - { - { - 2.000000 0.000000 0.000000 0.000000 - 0.000000 2.000000 0.000000 0.000000 - 0.000000 0.000000 2.000000 0.000000 - 0.000000 0.000000 0.000000 1.000000 - } - } - Cube { - 0 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 1 { - 2.0 -2.0 0.0 - { - 1.000000 0.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 2 { - -2.00000023842 -1.99999964237 0.0 - { - 1.000000 1.000000 - { 0.000000 1.000000 0.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 3 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { -0.707107 0.000000 -0.000000 } - } - } - 4 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 5 { - -1.99999988079 2.0 4.0 - { - 1.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 6 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.000000 -0.707107 -0.000000 } - } - } - 7 { - 1.9999986887 -2.00000119209 4.0 - { - 0.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 8 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 0.000000 0.707107 -0.707107 } - { -0.000000 -0.707107 -0.707107 } - } - } - 9 { - 2.00000095367 1.99999892712 4.0 - { - 1.000000 0.000000 - { -0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 10 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 11 { - 2.0 -2.0 0.0 - { - 0.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 12 { - 2.0 -2.0 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 13 { - 1.9999986887 -2.00000119209 4.0 - { - 1.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 14 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 1.000000 - { 0.707107 -0.000000 -0.707107 } - { -0.707107 0.000000 -0.707107 } - } - } - 15 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 1.000000 - { 0.000000 -0.000000 -1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - 16 { - -2.00000023842 -1.99999964237 0.0 - { - 0.000000 0.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 17 { - -2.00000071526 -1.99999928474 4.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 -1.000000 } - { 0.000000 1.000000 -0.000000 } - } - } - 18 { - -1.99999988079 2.0 4.0 - { - 1.000000 1.000000 - { 0.000000 0.000000 -1.000000 } - { 0.000000 1.000000 0.000000 } - } - } - 19 { - -1.99999928474 2.00000071526 0.0 - { - 0.000000 1.000000 - { 0.000000 0.707107 -0.707107 } - { 0.000000 0.707107 0.707107 } - } - } - 20 { - 2.00000095367 1.99999892712 4.0 - { - 0.000000 0.000000 - { 0.707107 -0.000000 0.707107 } - { -0.707107 0.000000 0.707107 } - } - } - 21 { - 2.0 1.99999988079 0.0 - { - 1.000000 0.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 22 { - -1.99999928474 2.00000071526 0.0 - { - 1.000000 1.000000 - { 0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 0.000000 } - } - } - 23 { - -1.99999988079 2.0 4.0 - { - 0.000000 1.000000 - { -0.000000 -0.000000 1.000000 } - { -1.000000 0.000000 -0.000000 } - } - } - } - { - { Solid_Rock_Tex } - { Material } - { 0.000000 0.000000 -1.000000 - } - { 0 1 2 3 { Cube } } - } - { - { Solid_Rock_Tex } - { Material } - { 0.000000 -0.000000 1.000000 - } - { 4 5 6 7 { Cube } } - } - { - { Solid_Rock_Tex } - { Material } - { 1.000000 -0.000000 0.000000 - } - { 8 9 10 11 { Cube } } - } - { - { Solid_Rock_Tex } - { Material } - { -0.000000 -1.000000 -0.000000 - } - { 12 13 14 15 { Cube } } - } - { - { Solid_Rock_Tex } - { Material } - { -1.000000 0.000000 -0.000000 - } - { 16 17 18 19 { Cube } } - } - { - { Solid_Rock_Tex } - { Material } - { 0.000000 1.000000 0.000000 - } - { 20 21 22 23 { Cube } } - } -} diff --git a/data/models/world/water.egg b/data/models/world/water.egg deleted file mode 100644 index 09866bf..0000000 --- a/data/models/world/water.egg +++ /dev/null @@ -1,62 +0,0 @@ - { Z-up } - - { "Egg laid by Chicken for Blender, version R91" } - - Untitled { - "./textures/water.png" - saved-result { 1 } - envtype { MODULATE } - minfilter { LINEAR } - magfilter { LINEAR } - wrap { REPEAT } -} - Plane { - { - { - 2.000000 0.000000 0.000000 0.000000 - 0.000000 2.000000 0.000000 0.000000 - 0.000000 0.000000 2.000000 0.000000 - 0.000000 0.000000 0.000000 1.000000 - } - } - Plane { - 0 { - 2.0 1.99999988079 0.0 - { - 0.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 1 { - -1.99999928474 2.00000071526 0.0 - { - 1.000000 0.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 2 { - -2.00000023842 -1.99999964237 0.0 - { - 1.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - 3 { - 2.0 -2.0 0.0 - { - 0.000000 1.000000 - { 1.000000 -0.000000 0.000000 } - { -0.000000 -1.000000 -0.000000 } - } - } - } - { - { Untitled } - { 0.000000 -0.000000 1.000000 - } - { 0 1 2 3 { Plane } } - } -} \ No newline at end of file diff --git a/gameMain.py b/gameMain.py index 6fc889b..ec61855 100644 --- a/gameMain.py +++ b/gameMain.py @@ -1,10 +1,9 @@ from direct.showbase.DirectObject import DirectObject -from pandac.PandaModules import AmbientLight, DirectionalLight, VBase4, VBase3, TextNode +from pandac.PandaModules import AmbientLight, DirectionalLight, VBase4, VBase3, TextNode, PointLight import direct.directbase.DirectStart from direct.gui.OnscreenText import OnscreenText from direct.task.Task import Task from pandac.PandaModules import Point2 -from pandac.PandaModules import CollisionHandlerEvent, CollisionNode, CollisionSphere, CollisionTraverser, BitMask32, CollisionRay, CollisionHandlerQueue from direct.interval.IntervalGlobal import * @@ -31,91 +30,18 @@ def __init__(self, parserClass, mapLoaderClass, modelLoaderClass): self.mapY = mapLoaderClass.mapConfigParser.getint("map", "height") self.accept("escape", sys.exit) - self.accept("s", self.randomChange, [parserClass, mapLoaderClass, modelLoaderClass]) - self.accept("mouse1", self.mouseClick, [mapLoaderClass]) - self.accept("q", self.changeTile, [mapLoaderClass.tileArray[self.tileSelected[1]][self.tileSelected[0]], 0, parserClass, modelLoaderClass, mapLoaderClass]) - print 'END OF GAMEMAIN.PY!' - - ############################################### - - - - #** Collision events ignition - base.cTrav = CollisionTraverser() - collisionHandler = CollisionHandlerEvent() - self.collisionHandler2 = CollisionHandlerQueue() - - #** Setting the ray collider - see step5.py for details - pickerNode=CollisionNode('mouseraycnode') - - pickerNP=base.camera.attachNewNode(pickerNode) - - self.pickerRay=CollisionRay() - pickerNode.addSolid(self.pickerRay) - - base.cTrav.showCollisions(render) - - #** This is new stuff: we set here a so called 'tag' for the ray - its purpose is to make the ray recognizable in a different event pattern matching situation from what we are used to use so far. Just note the first parameter is the main object grouping. See details below setting the patterns. - pickerNode.setTag('rays','ray1') - base.cTrav.addCollider(pickerNP, self.collisionHandler2) - - taskMgr.add(self.rayupdate, "blah") - - self.entries = [] - -# def mouseClick(self, status): -# if status == 'down': -# pickingEnabledOject.setScale(.9) -# snipstuff.info_message("You clicked '%s'!"%pickingEnabledOject.getName()) - -# if status == 'up': -# pickingEnabledOject.setScale(1.0) -# def destroyWall(self, firstTile, finalTileNumber, parserClass, modelLoaderClass, mapLoaderClass): -# if (self.tileSelected != (0,0)): -# self.changeTile(firstTile, finalTileNumber, parserClass, modelLoaderClass, mapLoaderClass) - - def rayupdate(self, task): - if base.mouseWatcherNode.hasMouse(): - self.entries = [] - for i in range(self.collisionHandler2.getNumEntries()): - entry = self.collisionHandler2.getEntry(i) - self.entries.append(entry) - self.entries.sort(lambda x,y: cmp(y.getSurfacePoint(render).getZ(), - x.getSurfacePoint(render).getZ())) - -# if (len(self.entries)>0): -# print self.entries[0].getIntoNode().getName() - - mpos=base.mouseWatcherNode.getMouse() - # this function will set our ray to shoot from the actual camera lenses off the 3d scene, passing by the mouse pointer position, making magically hit what is pointed by it in the 3d space - self.pickerRay.setFromLens(base.camNode, mpos.getX(),mpos.getY()) - return task.cont - - def mouseClick(self, mapLoaderClass): - if (len(self.entries)>0): - x = int(self.entries[0].getIntoNode().getName()[len(self.entries[0].getIntoNode().getName())-6:len(self.entries[0].getIntoNode().getName())-4]) - y = int(self.entries[0].getIntoNode().getName()[len(self.entries[0].getIntoNode().getName())-2:]) - - - if (mapLoaderClass.tileArray[y][x].walkable == True) or (mapLoaderClass.tileArray[y][x].drillTime != None): - print self.tileSelected - mapLoaderClass.tileArray[self.tileSelected[1]][self.tileSelected[0]].model.setColor(1,1,1,1) - - mapLoaderClass.tileArray[y][x].model.setColor(0.5,1,0.5,1) - self.tileSelected = (x, y) - - else: - self.tileSelected = (0,0) -# pos = Point2(base.mouseWatcherNode.getMouse()) -# pos.setX(pos.getX()*1.33) -# -# p3 = base.cam.getRelativePoint(render, point3d) -# -# print pos, p3 +## p = loader.loadModel('data/models/units/HS/HS2') +# p.reparentTo(render) +# p.setPos(10,10,10) +# plight = PointLight('plight') +# plight.setColor(VBase4(0.8, 0.8, 0.8, 1)) +# plnp = render.attachNewNode(plight) +# plnp.setPos(10, 20, 0) +# render.setLight(plnp) - ############################################################################### + print 'END OF GAMEMAIN.PY!' def tskCheckWalls(self, mapLoaderClass, parserClass, modelLoaderClass): for row in mapLoaderClass.tileArray: @@ -149,89 +75,87 @@ def tskCheckWalls(self, mapLoaderClass, parserClass, modelLoaderClass): (tile.solidMap[1] == False and tile.solidMap[3] == True and tile.solidMap[5] == True and - tile.solidMap[7] == False) or + tile.solidMap[7] == False)): - (tile.modelName[0:4] == 'none')): +# (tile.modelName[0:13] == 'solid no work')): self.changeTile(tile, 0, parserClass, modelLoaderClass, mapLoaderClass) return Task.cont - def randomChange(self, parserClass, mapLoaderClass, modelLoaderClass): - x = random.randint(1,8) - y = random.randint(1,8) - -# seq = Sequence() -# seq.append(Func(mapLoaderClass.tileArray[y][x].model.setColor, (0,1,0,1))) -# seq.append(Wait(1)) -# seq.append(Func(self.changeTile, mapLoaderClass.tileArray[y][x], 1, parserClass, modelLoaderClass, mapLoaderClass)) - -# seq.start() - - mapLoaderClass.tileArray[y][x] = self.changeTile(mapLoaderClass.tileArray[y][x], random.randint(0,1), parserClass, modelLoaderClass, mapLoaderClass) - - def changeTile(self, firstTile, finalTileNumber, parserClass, modelLoaderClass, mapLoaderClass): - def changer(firstTile, finalTileNumber, parserClass, modelLoaderClass, mapLoaderClass): - firstTile.model.detachNode() - - posX = firstTile.posX # Setting up values to be transferred to the next tile - posY = firstTile.posY - posZ = firstTile.posZ - cornerMap = firstTile.cornerMap - solidMap = firstTile.solidMap - - finalTileData = parserClass.wall[parserClass.main['wall_types'][finalTileNumber]] - - if (finalTileData.solid == False): - solidMap[4] == False - - elif (finalTileData.solid == True): - solidMap[4] == True - - finalTile = copy.copy(finalTileData) - finalTile.posX = posX - finalTile.posY = posY - finalTile.posZ = posZ - finalTile.cornerMap = cornerMap - finalTile.solidMap = solidMap - - finalTile.model = modelLoaderClass.makeModel(finalTile)#, mapLoaderClass) # From here on is reparenting and positioning the tile to the right place - - finalTile.model.reparentTo(render) - finalTile.model.setPos(finalTile.posX, finalTile.posY, 0) - finalTile.model.setCollideMask(0x1) - - tex = loader.loadTexture(finalTile.texture) - finalTile.model.setTexture(tex, 1) - - print finalTile.solid - return finalTile - +# def changeTile(self, firstTile, finalTileNumber, parserClass, modelLoaderClass, mapLoaderClass): +# def changer(firstTile, finalTileNumber, parserClass, modelLoaderClass, mapLoaderClass): +# firstTile.model.detachNode() +# +# posX = firstTile.posX # Setting up values to be transferred to the next tile +# posY = firstTile.posY +# posZ = firstTile.posZ +# cornerMap = firstTile.cornerMap +# solidMap = firstTile.solidMap +# +# finalTileData = parserClass.wall[parserClass.main['wall_types'][finalTileNumber]] +# +# if (finalTileData.solid == False): +# solidMap[4] == False +# +# elif (finalTileData.solid == True): +# solidMap[4] == True +# +# finalTile = copy.copy(finalTileData) +# finalTile.posX = posX +# finalTile.posY = posY +# finalTile.posZ = posZ +# finalTile.cornerMap = cornerMap +# finalTile.solidMap = solidMap +# +# finalTile.model = modelLoaderClass.makeModel(finalTile)#, mapLoaderClass) # From here on is reparenting and positioning the tile to the right place +# +# finalTile.model.reparentTo(render) +# finalTile.model.setPos(finalTile.posX, finalTile.posY, 0) +# finalTile.model.setCollideMask(0x1) +# +# tex = loader.loadTexture(finalTile.texture) +# finalTile.model.setTexture(tex, 1) +# +# print finalTile.solid +# return finalTile +# mapLoaderClass.tileArray[firstTile.posY/4][firstTile.posX/4] = changer(firstTile, finalTileNumber, parserClass, modelLoaderClass, mapLoaderClass) self.reloadSurround(mapLoaderClass.tileArray[firstTile.posY/4][firstTile.posX/4], mapLoaderClass, modelLoaderClass, parserClass) - def mineWall(self, unitNumber, firstTile, parserClass, modelLoaderClass, mapLoaderClass): + def mineWall(self, firstTile, parserClass, modelLoaderClass, mapLoaderClass): def changer(firstTile, finalTileNumber, parserClass, modelLoaderClass, mapLoaderClass): firstTile.model.detachNode() - posX = firstTile.posX # Setting up values to be transferred to the next tile - posY = firstTile.posY - posZ = firstTile.posZ - cornerMap = firstTile.cornerMap - solidMap = firstTile.solidMap +# posX = firstTile.posX # Setting up values to be transferred to the next tile +# posY = firstTile.posY +# posZ = firstTile.posZ +# cornerMap = firstTile.cornerMap +# solidMap = firstTile.solidMap +# reda = firstTile.reda +# renu = firstTile.renu finalTileData = parserClass.wall[parserClass.main['wall_types'][finalTileNumber]] +# finalTile = copy.copy(finalTileData) +# finalTile.posX = posX +# finalTile.posY = posY +# finalTile.posZ = posZ +# finalTile.cornerMap = cornerMap +# finalTile.solidMap = solidMap + + finalTile = copy.copy(parserClass.wall[parserClass.main['wall_types'][finalTileNumber]]) + finalTile.posX = firstTile.posX + finalTile.posY = firstTile.posY + finalTile.posZ = firstTile.posZ + finalTile.cornerMap = firstTile.cornerMap + finalTile.solidMap = firstTile.solidMap + finalTile.reda = 0 + finalTile.renu = 0 + if (finalTileData.solid == False): - solidMap[4] == False + finalTile.solidMap[4] == False elif (finalTileData.solid == True): - solidMap[4] == True - - finalTile = copy.copy(finalTileData) - finalTile.posX = posX - finalTile.posY = posY - finalTile.posZ = posZ - finalTile.cornerMap = cornerMap - finalTile.solidMap = solidMap + finalTile.solidMap[4] == True finalTile.model = modelLoaderClass.makeModel(finalTile)#, mapLoaderClass) # From here on is reparenting and positioning the tile to the right place @@ -242,7 +166,13 @@ def changer(firstTile, finalTileNumber, parserClass, modelLoaderClass, mapLoader tex = loader.loadTexture(finalTile.texture) finalTile.model.setTexture(tex, 1) - +# if (firstTile.cror % 2 == 1): +# print str((firstTile.cror + 1)/2)+' energy crystals' +# else: +# print str(firstTile.cror / 2)+' ore' +# + print parserClass.main['objects'][firstTile.reda], firstTile.renu + # print parserClass.object[parserClass.main['objects'][firstTile.reda]] return finalTile mapLoaderClass.tileArray[firstTile.posY/4][firstTile.posX/4] = changer(firstTile, 0, parserClass, modelLoaderClass, mapLoaderClass) diff --git a/mapLoader.py b/mapLoader.py index b5df271..1413e40 100644 --- a/mapLoader.py +++ b/mapLoader.py @@ -36,11 +36,17 @@ def ganerate_tile_array(self, ParserClass): surf = open(self.mapDir+"maps/Surf.map", "r") high = open(self.mapDir+"maps/High.map", "r") + reda = open(self.mapDir+"maps/Reda.map", "r") + renu = open(self.mapDir+"maps/Renu.map", "r") wallData = surf.read() # Turning the map file into a string mapFiles.append(wallData) highData = high.read() mapFiles.append(highData) + redaData = reda.read() + mapFiles.append(redaData) + renuData = renu.read() + mapFiles.append(renuData) for mapFile in mapFiles: if (len(mapFile) != (self.width*self.height)): @@ -53,6 +59,7 @@ def ganerate_tile_array(self, ParserClass): Ypos = 0 for tilenum in range(self.width * self.height): + print tilenum tilenum = tilenum +1 # Helps with maths (can't remeber how, but it does) wallStr = binascii.hexlify(wallData[tilenum-1]) # Converts the hex into a two character sting @@ -61,9 +68,17 @@ def ganerate_tile_array(self, ParserClass): highStr = binascii.hexlify(highData[tilenum-1]) # Same, but for the High.map file highInt = int('0x'+highStr, 0) + redaStr = binascii.hexlify(redaData[tilenum-1]) + redaInt = int('0x'+redaStr, 0) + + renuStr = binascii.hexlify(renuData[tilenum-1]) + renuInt = int('0x'+renuStr, 0) + if (tilenum == 0): # For only the first tile of the map (because otherwise everything is 1 char long) tempClass = copy.copy(ParserClass.wall[ParserClass.main['wall_types'][wallInt]]) tempClass.posZ = highInt + tempClass.reda = redaInt + tempClass.renu = renuInt row.append(tempClass) tilenum += 1 @@ -71,6 +86,8 @@ def ganerate_tile_array(self, ParserClass): elif (tilenum % self.width != 0): # If it is not the end of the row tempClass = copy.copy(ParserClass.wall[ParserClass.main['wall_types'][wallInt]]) tempClass.posZ = highInt + tempClass.reda = redaInt + tempClass.renu = renuInt row.append(tempClass) tilenum += 1 @@ -78,6 +95,8 @@ def ganerate_tile_array(self, ParserClass): elif (Xpos % self.width == 0): # If it is the end of the row tempClass = copy.copy(ParserClass.wall[ParserClass.main['wall_types'][wallInt]]) tempClass.posZ = highInt + tempClass.reda = redaInt + tempClass.renu = renuInt row.append(tempClass) tiles.append(row) diff --git a/modelLoader.py b/modelLoader.py index 7f28316..1eb6f50 100644 --- a/modelLoader.py +++ b/modelLoader.py @@ -434,18 +434,10 @@ def makeOtherCorner(v0, v1, v2, v3, v4, v5): tileData.solidMap[8] == True): # Another corner south and east makeOtherCorner(vertex7, vertex7, vertex1, vertex2, vertex2, vertex5) tileData.modelName = 'solid corner2 south, east '+x+', '+y - - elif (tileData.solidMap[1] == False and - tileData.solidMap[3] == False and - tileData.solidMap[5] == True and - tileData.solidMap[7] == True and - tileData.solidMap[8] == True): # A corner with solids north, and east - makeCorner(vertex5, vertex5, vertex6, vertex0, vertex2) - tileData.modelName = 'solid corner1 north, east '+x+', '+y else: makeFlat(vertex0, vertex2, vertex4, vertex6) - tileData.modelName = 'solid shouldn\'t work '+x+', '+y + tileData.modelName = 'solid no work '+x+', '+y geom = Geom(data) try: diff --git a/stratCam.py b/stratCam.py index 8891c66..eef92b1 100644 --- a/stratCam.py +++ b/stratCam.py @@ -9,6 +9,8 @@ from pandac.PandaModules import Point3,Vec3,Vec4,BitMask32 from direct.task.Task import Task +from pandac.PandaModules import CollisionHandlerEvent, CollisionNode, CollisionSphere, CollisionTraverser, BitMask32, CollisionRay, CollisionHandlerQueue + # Last modified: 10/2/2009 # This class takes over control of the camera and sets up a Real Time Strategy game type camera control system. The user can move the camera three # ways. If the mouse cursor is moved to the edge of the screen, the camera will pan in that direction. If the right mouse button is held down, the @@ -31,7 +33,7 @@ class CameraHandler(DirectObject.DirectObject): - def __init__(self, mapWidth, mapHeight, scrollborder, zoomInSpeed, zoomOutSpeed, zoomMax, zoomMin): + def __init__(self, parserClass, mapLoaderClass, modelLoaderClass, mainClass, mapWidth, mapHeight, scrollborder, zoomInSpeed, zoomOutSpeed, zoomMax, zoomMin): self.zoomMax = zoomMax self.zoomMin = zoomMin @@ -89,10 +91,75 @@ def __init__(self, mapWidth, mapHeight, scrollborder, zoomInSpeed, zoomOutSpeed, self.accept("wheel_down",lambda : self.adjustCamDist(zoomOutSpeed)) # sets up the camera handler to detet when the mouse wheel is rolled upwards and uses a lambda function to call the - # adjustCamDist function with the argument 1.1 + # adjustCamDist function with the argument 1.1 # + + ######### + + self.tileSelected = (0,0) + + #** Collision events ignition + base.cTrav = CollisionTraverser() + collisionHandler = CollisionHandlerEvent() + self.collisionHandler2 = CollisionHandlerQueue() + + pickerNode=CollisionNode('mouseraycnode') + + pickerNP=base.camera.attachNewNode(pickerNode) + + self.pickerRay=CollisionRay() + pickerNode.addSolid(self.pickerRay) + + base.cTrav.showCollisions(render) + + # The ray tag + pickerNode.setTag('rays','ray1') + base.cTrav.addCollider(pickerNP, self.collisionHandler2) + + self.accept("mouse1", self.mouseClick, [mapLoaderClass]) + self.accept("q", self.mineWall, [parserClass, modelLoaderClass, mapLoaderClass, mainClass]) + + taskMgr.add(self.rayupdate, "blah") + + ########## taskMgr.add(self.camMoveTask,'camMoveTask') - # sets the camMoveTask to be run every frame + # sets the camMoveTask to be run every frame + + ########## + + def rayupdate(self, task): + if base.mouseWatcherNode.hasMouse(): + self.entry=0 + self.collisionHandler2.sortEntries() + if self.collisionHandler2.getNumEntries()>0: + self.entry=self.collisionHandler2.getEntry(0) + mpos=base.mouseWatcherNode.getMouse() + # this function will set our ray to shoot from the actual camera lenses off the 3d scene, passing by the mouse pointer position, + # making magically hit what is pointed by it in the 3d space + self.pickerRay.setFromLens(base.camNode, mpos.getX(),mpos.getY()) + return task.cont + + def mineWall(self, parserClass, modelLoaderClass, mapLoaderClass, mainClass): + if (self.tileSelected != (0,0)): + mainClass.mineWall(mapLoaderClass.tileArray[self.tileSelected[1]][self.tileSelected[0]], parserClass, modelLoaderClass, mapLoaderClass) + + def mouseClick(self, mapLoaderClass): + if (self.entry!=0): + x = int(self.entry.getIntoNode().getName()[len(self.entry.getIntoNode().getName())-6:len(self.entry.getIntoNode().getName())-4]) + y = int(self.entry.getIntoNode().getName()[len(self.entry.getIntoNode().getName())-2:]) + + + if (mapLoaderClass.tileArray[y][x].selectable == True): + mapLoaderClass.tileArray[self.tileSelected[1]][self.tileSelected[0]].model.setColor(1,1,1,1) + + mapLoaderClass.tileArray[y][x].model.setColor(0.5,1,0.5,1) + self.tileSelected = (x, y) + + else: + mapLoaderClass.tileArray[self.tileSelected[1]][self.tileSelected[0]].model.setColor(1,1,1,1) + self.tileSelected = (0,0) + +# print self.tileSelected def turnCameraAroundPoint(self, deltaX, deltaY): # This function performs two important tasks. First, it is used for the camera orbital movement that occurs when the @@ -259,4 +326,4 @@ def camMoveTask(self, task): self.my=mpos.getY() # The old mouse positions are updated to the current mouse position as the final step. - return task.cont \ No newline at end of file + return task.cont diff --git a/tools/mapConverter.py b/tools/mapConverter.py index fa30b1b..f034c89 100644 --- a/tools/mapConverter.py +++ b/tools/mapConverter.py @@ -13,8 +13,9 @@ X = int(raw_input("Please enter the width of the map (note that it is one more than what you put into the creator's size to be): ")) Y = int(raw_input("Please enter the height of the map (same as with the width, one more than what you think it is: ")) + #mapFiles = ['Cror.map', 'Dugg.map', 'Emrg.map', 'Erod.map', 'Fall.map', 'High.map', 'Path.map', 'Surf.map', 'Tuto.map'] -mapFiles = ['Surf.map', 'High.map'] +mapFiles = ['Surf.map', 'High.map', 'Cror.map'] #otherFiles = ['ObjectList.ol'] def ifExist(file2): @@ -32,16 +33,14 @@ def to_binary(hex_string): # hex_string being hex(int); it will be dealt with he ints = [int(hex_string[i:i+2], 16) for i in range(0,len(hex_string),2)] return struct.pack('B' * len(ints), *ints) - + tempFile = open(directory+file2) tempData = tempFile.read() - -# if (len(tempData) != 2*(X*Y)+16): -# raise "This file has a bad length." + print len(tempData) tempData = tempData[14:] tempData = tempData[:len(tempData)-(2*X)] - #print tempData.encode("hex") + print len(tempData) endList = [] # tempFile will be read, and the bits needed will be stored here endFile = '' @@ -49,19 +48,64 @@ def to_binary(hex_string): # hex_string being hex(int); it will be dealt with he tempX = 1 charNumber = 1 - for i in range(len(tempData)): # Cuts the file up into relevant sections (a list of numbers) - if (i % 2 == 0): - if (i % X == 0): - pass - else: - something = to_binary(hex(int('0x'+tempData[i].encode("hex"), 0))) - endList.append(something) - #endList.append(int('0x'+tempData[i].encode("hex"), 0)) + if (file2 == 'Cror.map'): + for i in range(len(tempData)): # Cuts the file up into relevant sections (a list of numbers) + if (i % 2 == 0): + if (i % X == 0): + print 'yay' + pass + else: # formula for resources: ore = number/2 ec = number+1/2 + if (int('0x'+tempData[i].encode("hex"), 0) == 0): # None + something = to_binary(hex(0)) + + elif (int('0x'+tempData[i].encode("hex"), 0) == 1) or (int('0x'+tempData[i].encode("hex"), 0) == 3): # 1 energy crystal + something = to_binary(hex(1)) + + elif (int('0x'+tempData[i].encode("hex"), 0) == 2) or (int('0x'+tempData[i].encode("hex"), 0) == 4): # 1 ore + something = to_binary(hex(2)) + + elif (int('0x'+tempData[i].encode("hex"), 0) == 5) or (int('0x'+tempData[i].encode("hex"), 0) == 7): # 3 energy crystals + something = to_binary(hex(5)) + + elif (int('0x'+tempData[i].encode("hex"), 0) == 6) or (int('0x'+tempData[i].encode("hex"), 0) == 8): # 3 ore + something = to_binary(hex(6)) + + elif (int('0x'+tempData[i].encode("hex"), 0) == 9) or (int('0x'+tempData[i].encode("hex"), 0) == 11): # 5 energy crystals + something = to_binary(hex(9)) + + elif (int('0x'+tempData[i].encode("hex"), 0) == 10) or (int('0x'+tempData[i].encode("hex"), 0) == 12) or (int('0x'+tempData[i].encode("hex"), 0) == 16): # 5 ore + something = to_binary(hex(10)) + + elif (int('0x'+tempData[i].encode("hex"), 0) == 13) or (int('0x'+tempData[i].encode("hex"), 0) == 19): # 11 energy crystals + something = to_binary(hex(21)) + + elif (int('0x'+tempData[i].encode("hex"), 0) == 14) or (int('0x'+tempData[i].encode("hex"), 0) == 20): # 11 ore + something = to_binary(hex(22)) + + elif (int('0x'+tempData[i].encode("hex"), 0) == 17) or (int('0x'+tempData[i].encode("hex"), 0) == 23): # 25 energy crystals + something = to_binary(hex(49)) + + elif (int('0x'+tempData[i].encode("hex"), 0) == 18) or (int('0x'+tempData[i].encode("hex"), 0) == 24): # 25 ore + something = to_binary(hex(50)) + + else: + something = to_binary(hex(int('0x'+tempData[i].encode("hex"), 0))) + endList.append(something) + #print len(endList) + else: + for i in range(len(tempData)): # Cuts the file up into relevant sections (a list of numbers) + if (i % 2 == 0): + if (i % X == 0): + pass + else: + something = to_binary(hex(int('0x'+tempData[i].encode("hex"), 0))) + endList.append(something) + #print something, tempData[i] for value in endList: endFile = endFile+str(value) - #print endFile + print len(endFile) return endFile @@ -72,6 +116,7 @@ def makeFile(fileData, name): os.makedirs(directory2) newFileDir = open(directory2+name, "w") + print len(newFile) newFileDir.write(newFile) def makeConfig():