more bug fixes because I messed up stuff

This commit is contained in:
Anthony Samms
2025-10-29 23:52:39 -04:00
parent e009c4be88
commit 3024b7d412
5 changed files with 62 additions and 7 deletions

View File

@@ -52,10 +52,8 @@ class GameScreen(Screen):
self.end_ms = 0
self.start_delay = 1000
self.song_started = False
self.screen_init = True
self.movie = None
self.song_music = None
logger.info("Game screen textures loaded")
if global_data.config["general"]["nijiiro_notes"]:
# drop original
if "notes" in tex.textures:
@@ -65,7 +63,6 @@ class GameScreen(Screen):
tex.load_zip("game", "notes_nijiiro")
tex.textures["notes"] = tex.textures.pop("notes_nijiiro")
logger.info("Loaded nijiiro notes textures")
logger.info("Game screen sounds loaded")
ray.set_shader_value_texture(self.mask_shader, ray.get_shader_location(self.mask_shader, "texture0"), tex.textures['balloon']['rainbow_mask'].texture)
ray.set_shader_value_texture(self.mask_shader, ray.get_shader_location(self.mask_shader, "texture1"), tex.textures['balloon']['rainbow'].texture)
session_data = global_data.session_data[global_data.player_num-1]

34
scenes/game_dan.py Normal file
View File

@@ -0,0 +1,34 @@
import logging
from libs.audio import audio
from libs.background import Background
from libs.global_data import global_data
from libs.transition import Transition
from scenes.game import GameScreen, SongInfo
logger = logging.getLogger(__name__)
class DanGameScreen(GameScreen):
JUDGE_X = 414
def on_screen_start(self):
super().on_screen_start()
self.init_tja(global_data.selected_song)
logger.info(f"TJA initialized for song: {global_data.selected_song}")
self.song_info = SongInfo(session_data.song_title, session_data.genre_index)
self.background = Background(global_data.player_num, self.bpm, scene_preset='DAN')
self.transition = Transition('', '', is_second=True)
self.transition.start()
def update(self):
super().update()
current_time = get_current_ms()
self.transition.update(current_time)
self.current_ms = current_time - self.start_ms
self.start_song(current_time)
self.update_background(current_time)
if self.song_music is not None:
audio.update_music_stream(self.song_music)
self.player_1.update(self.current_ms, current_time, self.background)
self.song_info.update(current_time)
return self.global_keys()

View File

@@ -72,7 +72,7 @@ class ResultScreen(Screen):
def draw_song_info(self):
tex.draw_texture('song_info', 'song_num', frame=global_data.songs_played%4)
self.song_info.draw(x=1252 - self.song_info.texture.width, y=35 - self.song_info.texture.height / 2)
self.song_info.draw(outline_color=ray.BLACK, x=1252 - self.song_info.texture.width, y=35 - self.song_info.texture.height / 2)
def draw(self):
self.background.draw()