Skip to content

Commit

Permalink
Chat removed + others
Browse files Browse the repository at this point in the history
  • Loading branch information
IAJWasTooShort committed Jun 9, 2021
1 parent 24a1daf commit 87efe50
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 92 deletions.
2 changes: 1 addition & 1 deletion functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def load_textures(self):
self.texture[n] = pyglet.graphics.TextureGroup(texture)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)

print("Successful loaded", n, "texture!")
print("Loaded", n, "texture!")
done = []
items = sorted(self.texture_dir.items(), key=lambda i: i[0])
for n1, d in items:
Expand Down
2 changes: 1 addition & 1 deletion game/GUI/GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class GUI:
def __init__(self, gl):
print("Init GUI class...")
print("Started GUI class...")

self.GUI_TEXTURES = {}
self.shows = {}
Expand Down
5 changes: 5 additions & 0 deletions game/GUI/ModalWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
from OpenGL.GL import *
from functions import checkHover

from pypresence import Presence
import time


class ModalWindow:
def __init__(self, gl):
Expand All @@ -26,6 +29,8 @@ def destroyWindow(self):

self.gl.updateEvents.pop(self.windowId)



def drawWindow(self):
self.clickWait += 1
if self.clickWait == 25:
Expand Down
4 changes: 0 additions & 4 deletions game/Particles.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ def drawParticles(self):
i[0][0] += i[3][0] / 50
i[0][2] += i[3][2] / 50

# self.gl.stuffBatch.add(24,
# GL_QUADS,
# i[1].t[1],
# ('v3f', flatten(cube_vertices((i[0][0], i[0][1], i[0][2]), i[2]))))
x, y, z = tuple(i[0])
X, Y, Z = x + i[2], y + i[2], z + i[2]

Expand Down
9 changes: 2 additions & 7 deletions game/Scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from game.blocks.DestroyBlock import DestroyBlock
from game.blocks.droppedBlock import droppedBlock
from game.entity.Inventory import Inventory
from game.entity.Zombie import Zombie
from game.world.Clouds import Clouds
from game.world.worldGenerator import worldGenerator
from game.blocks.CubeHandler import CubeHandler
Expand Down Expand Up @@ -81,8 +80,8 @@ def vertexList(self):
self.reticle = pyglet.graphics.vertex_list(4, ('v2f', (x - 10, y, x + 10, y, x, y - 10, x, y + 10)),
('c3f', (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)))

def initScene(self):
print("Init OpenGL scene...")
def startScene(self):
print("Started OpenGL scene...")

glClearColor(0.5, 0.7, 1, 1)
glClearDepth(1.0)
Expand Down Expand Up @@ -111,10 +110,6 @@ def initScene(self):
self.cubes = CubeHandler(self.opaque, self.block, self.opaque,
('leaves_taiga', 'leaves_oak', 'tall_grass', 'nocolor'), self)

self.zombie = Zombie(self)
self.zombie.position = [0, 53, 0]
self.entity.append(self.zombie)

self.set3d()

def set2d(self):
Expand Down
2 changes: 1 addition & 1 deletion game/entity/Inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, glClass):
font_size=10,
x=self.gl.WIDTH // 2, y=60)

def initWindow(self):
def startWindow(self):

self.window = ModalWindow(self.gl)
self.window.setWindow(self.gl.gui.GUI_TEXTURES["inventory_window"])
Expand Down
12 changes: 0 additions & 12 deletions game/entity/Player.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,6 @@ def move(self, dt, dx, dy, dz):
if self.position[0] != col[0] or self.position[2] != col[2]:
if col2 in self.gl.cubes.cubes and self.shift <= 0:
self.gl.blockSound.playStepSound(self.gl.cubes.cubes[col2].name)
# Dynamic FOV
# if self.position[0] != col[0] or self.position[2] != col[2]:
# if self.gl.fov < FOV + 20:
# self.gl.fov += 0.2
# else:
# self.gl.fov = FOV + 20
# else:
# if self.gl.fov > FOV:
# self.gl.fov -= 0.2
# else:
# self.gl.fov = FOV
#
if not self.bInAir:
for i in range(1, 6):
col21 = roundPos((col[0], col[1] - i, col[2]))
Expand Down
4 changes: 2 additions & 2 deletions game/sound/Sound.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class Sound:
def __init__(self):
print("Init Sound class...")
print("Started Sound class...")
self.BLOCKS_SOUND = {}
self.SOUNDS = {}
self.MUSIC = []
Expand All @@ -16,7 +16,7 @@ def __init__(self):

self.volume = 1

def initMusic(self, t):
def startMusic(self, t):
self.musicPlayer.stop()
del self.musicPlayer
self.musicPlayer = pygame.mixer.music
Expand Down
2 changes: 1 addition & 1 deletion game/world/Explosion.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def __init__(self, gl, pos, fr, bc):
self.gl, self.pos, self.fr, self.bc = gl, list(pos), fr, bc

def run(self):
self.gl.particles.addParticle(self.pos, self.bc, numbers=range(-15, 15), direction="down", count=0)#100)
self.gl.particles.addParticle(self.pos, self.bc, numbers=range(-15, 15), direction="down", count=0) #100) # Particles
self.gl.cubes.remove(tuple(self.pos))

for x in range(-(self.fr // 2) + randint(-1, 1), self.fr // 2 + randint(-1, 1)):
Expand Down
Loading

0 comments on commit 87efe50

Please sign in to comment.