From 69e718fa49836fe70cc1778d571f3c9cd4ea1681 Mon Sep 17 00:00:00 2001 From: Yonokid <37304577+Yonokid@users.noreply.github.com> Date: Tue, 29 Jul 2025 12:36:00 -0400 Subject: [PATCH] minor fixes --- .github/workflows/python-app.yml | 2 +- libs/video.py | 4 ++-- scenes/devtest.py | 11 +---------- scenes/entry.py | 8 ++++---- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index e21b98b..9a0ff54 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -32,7 +32,7 @@ jobs: uv add nuitka - name: Build Executable run: | - uv run nuitka --mode=app --include-module=raylib,moviepy,numpy,sounddevice,soundfile,tomlkit --noinclude-setuptools-mode=nofollow --noinclude-IPython-mode=nofollow --assume-yes-for-downloads PyTaiko.py + uv run nuitka --mode=app --include-module=raylib,moviepy,numpy,sounddevice,soundfile,gitpython,tomlkit --noinclude-setuptools-mode=nofollow --noinclude-IPython-mode=nofollow --assume-yes-for-downloads PyTaiko.py - name: Create Release Directory run: | mkdir -p release diff --git a/libs/video.py b/libs/video.py index 0c1df54..20a5847 100644 --- a/libs/video.py +++ b/libs/video.py @@ -16,8 +16,8 @@ class VideoPlayer: self.audio = audio.load_music_stream_from_data(self.video.audio.to_soundarray(), sample_rate=self.video.audio.fps) self.buffer_size = 10 # Number of frames to keep in memory - self.frame_buffer = {} # Dictionary to store frames {timestamp: texture} - self.frame_timestamps = [(i * 1000) / self.video.fps for i in range(int(self.video.duration * self.video.fps) + 1)] + self.frame_buffer: dict[float, ray.Texture] = dict() # Dictionary to store frames {timestamp: texture} + self.frame_timestamps: list[float] = [(i * 1000) / self.video.fps for i in range(int(self.video.duration * self.video.fps) + 1)] self.start_ms = None self.frame_index = 0 diff --git a/scenes/devtest.py b/scenes/devtest.py index d16c139..29659bd 100644 --- a/scenes/devtest.py +++ b/scenes/devtest.py @@ -1,15 +1,11 @@ import pyray as ray -from libs.utils import get_current_ms, is_l_don_pressed, is_r_don_pressed -from scenes.song_select import Transition - class DevScreen: def __init__(self, width: int, height: int): self.width = width self.height = height self.screen_init = False - self.transition = Transition(self.height, 'TRIPLE HELIX', 'Yonokid') def on_screen_start(self): if not self.screen_init: @@ -21,16 +17,11 @@ class DevScreen: def update(self): self.on_screen_start() - self.transition.update(get_current_ms()) - - if is_l_don_pressed() or is_r_don_pressed(): - self.transition = Transition(self.height, 'TRIPLE HELIX', 'Yonokid') - if ray.is_key_pressed(ray.KeyboardKey.KEY_ENTER): return self.on_screen_end('GAME') def draw(self): - self.transition.draw(self.height) + pass def draw_3d(self): pass diff --git a/scenes/entry.py b/scenes/entry.py index 552e994..ad7a463 100644 --- a/scenes/entry.py +++ b/scenes/entry.py @@ -26,10 +26,10 @@ class EntryScreen: self.width = width self.height = height self.screen_init = False - self.box_titles: list[tuple[OutlinedText, OutlinedText]] = [(OutlinedText('演奏ゲーム', 50, ray.Color(255, 255, 255, 255), ray.Color(109, 68, 24, 255), outline_thickness=5, vertical=True), - OutlinedText('演奏ゲーム', 50, ray.Color(255, 255, 255, 255), ray.Color(0, 0, 0, 255), outline_thickness=5, vertical=True)), - (OutlinedText('ゲーム設定', 50, ray.Color(255, 255, 255, 255), ray.Color(109, 68, 24, 255), outline_thickness=5, vertical=True), - OutlinedText('ゲーム設定', 50, ray.Color(255, 255, 255, 255), ray.Color(0, 0, 0, 255), outline_thickness=5, vertical=True))] + self.box_titles: list[tuple[OutlinedText, OutlinedText]] = [(OutlinedText('演奏ゲーム', 50, ray.WHITE, ray.Color(109, 68, 24, 255), outline_thickness=5, vertical=True), + OutlinedText('演奏ゲーム', 50, ray.WHITE, ray.BLACK, outline_thickness=5, vertical=True)), + (OutlinedText('ゲーム設定', 50, ray.WHITE, ray.Color(109, 68, 24, 255), outline_thickness=5, vertical=True), + OutlinedText('ゲーム設定', 50, ray.WHITE, ray.BLACK, outline_thickness=5, vertical=True))] def load_textures(self): self.textures = load_all_textures_from_zip(Path('Graphics/lumendata/entry.zip'))