add 1080p and more support

This commit is contained in:
Anthony Samms
2025-11-20 02:07:46 -05:00
parent 802d9c5b37
commit 1fae2ebd18
31 changed files with 631 additions and 602 deletions

View File

@@ -8,7 +8,8 @@ from libs.audio import audio
from libs.utils import global_data
from libs.video import VideoPlayer
import pyray as ray
from scenes.game import ClearAnimation, FCAnimation, FailAnimation, GameScreen, Player, Background, SCREEN_WIDTH, ResultTransition
from libs.texture import tex
from scenes.game import ClearAnimation, FCAnimation, FailAnimation, GameScreen, Player, Background, ResultTransition
logger = logging.getLogger(__name__)
@@ -74,7 +75,7 @@ class TwoPlayerGameScreen(GameScreen):
def init_tja(self, song: Path):
"""Initialize the TJA file"""
self.tja = TJAParser(song, start_delay=self.start_delay, distance=SCREEN_WIDTH - GameScreen.JUDGE_X)
self.tja = TJAParser(song, start_delay=self.start_delay, distance=tex.screen_width - GameScreen.JUDGE_X)
if self.tja.metadata.bgmovie != Path() and self.tja.metadata.bgmovie.exists():
self.movie = VideoPlayer(self.tja.metadata.bgmovie)
self.movie.set_volume(0.0)

View File

@@ -1,5 +1,6 @@
import logging
from libs.global_data import PlayerNum
from libs.texture import tex
from libs.utils import get_current_ms
from scenes.result import Background, FadeIn, ResultPlayer, ResultScreen
@@ -8,7 +9,7 @@ logger = logging.getLogger(__name__)
class TwoPlayerResultScreen(ResultScreen):
def on_screen_start(self):
super().on_screen_start()
self.background = Background(PlayerNum.TWO_PLAYER, 1280)
self.background = Background(PlayerNum.TWO_PLAYER, tex.screen_width)
self.fade_in = FadeIn(PlayerNum.TWO_PLAYER)
self.player_1 = ResultPlayer(PlayerNum.P1, True, False)
self.player_2 = ResultPlayer(PlayerNum.P2, True, True)