Added some comments.

This commit is contained in:
The Wobbler 2024-02-27 20:38:15 +01:00
parent 891e1a3301
commit 09a1647197

View file

@ -43,7 +43,7 @@ class GDPygame:
self.floor_texture = pygame.image.load("assets/textures/floors/floor_01.png") # textures self.floor_texture = pygame.image.load("assets/textures/floors/floor_01.png") # textures
self.floor_texture = pygame.transform.scale(self.floor_texture, (self.floor_texture.get_width() * 4, self.floor_texture.get_height() * 4)) self.floor_texture = pygame.transform.scale(self.floor_texture, (self.floor_texture.get_width() * 4, self.floor_texture.get_height() * 4))
self.background_texture = pygame.image.load("assets/textures/backgrounds/background_01.png") self.background_texture = pygame.image.load("assets/textures/backgrounds/background_01.png")
self.background_texture = pygame.transform.scale(self.background_texture, (self.background_texture.get_width() * ((self.screen.get_height() - self.floor_texture.get_height()) // self.background_texture.get_height()), self.screen.get_height() - self.floor_texture.get_height())) self.background_texture = pygame.transform.scale(self.background_texture, (self.background_texture.get_width() * ((self.screen.get_height() - self.floor_texture.get_height()) // self.background_texture.get_height()), self.screen.get_height() - self.floor_texture.get_height())) # properly scale the background
# loading finished # loading finished
self.window.size = self.settings.window_size self.window.size = self.settings.window_size
@ -72,7 +72,7 @@ class GDPygame:
if not self.running: if not self.running:
return return
if self.loading_surface.get_alpha() > 0: if self.loading_surface.get_alpha() > 0: # make the loading screen fade out
self.screen.blit(self.loading_surface, (0, 0)) self.screen.blit(self.loading_surface, (0, 0))
self.loading_surface.set_alpha(self.loading_surface.get_alpha() - 4) self.loading_surface.set_alpha(self.loading_surface.get_alpha() - 4)