mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
update types
This commit is contained in:
@@ -12,6 +12,7 @@ from raylib.defines import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from libs.audio import audio
|
from libs.audio import audio
|
||||||
|
from libs.screen import Screen
|
||||||
from libs.utils import (
|
from libs.utils import (
|
||||||
force_dedicated_gpu,
|
force_dedicated_gpu,
|
||||||
get_config,
|
get_config,
|
||||||
@@ -108,8 +109,8 @@ def main():
|
|||||||
logger.info("Starting PyTaiko")
|
logger.info("Starting PyTaiko")
|
||||||
|
|
||||||
logger.debug(f"Loaded config: {global_data.config}")
|
logger.debug(f"Loaded config: {global_data.config}")
|
||||||
screen_width: int = global_data.config["video"]["screen_width"]
|
screen_width = global_data.config["video"]["screen_width"]
|
||||||
screen_height: int = global_data.config["video"]["screen_height"]
|
screen_height = global_data.config["video"]["screen_height"]
|
||||||
|
|
||||||
if global_data.config["video"]["vsync"]:
|
if global_data.config["video"]["vsync"]:
|
||||||
ray.set_config_flags(ray.ConfigFlags.FLAG_VSYNC_HINT)
|
ray.set_config_flags(ray.ConfigFlags.FLAG_VSYNC_HINT)
|
||||||
@@ -163,7 +164,7 @@ def main():
|
|||||||
dan_select_screen = DanSelectScreen('dan_select')
|
dan_select_screen = DanSelectScreen('dan_select')
|
||||||
game_screen_dan = DanGameScreen('game_dan')
|
game_screen_dan = DanGameScreen('game_dan')
|
||||||
|
|
||||||
screen_mapping = {
|
screen_mapping: dict[str, Screen] = {
|
||||||
Screens.ENTRY: entry_screen,
|
Screens.ENTRY: entry_screen,
|
||||||
Screens.TITLE: title_screen,
|
Screens.TITLE: title_screen,
|
||||||
Screens.SONG_SELECT: song_select_screen,
|
Screens.SONG_SELECT: song_select_screen,
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ class GlobalData:
|
|||||||
session_data (list[SessionData]): Session data for both players.
|
session_data (list[SessionData]): Session data for both players.
|
||||||
"""
|
"""
|
||||||
songs_played: int = 0
|
songs_played: int = 0
|
||||||
config: dict = field(default_factory=dict)
|
config: Config = field(default_factory=dict)
|
||||||
song_hashes: dict[str, list[dict]] = field(default_factory=lambda: dict()) #Hash to path
|
song_hashes: dict[str, list[dict]] = field(default_factory=lambda: dict()) #Hash to path
|
||||||
song_paths: dict[Path, str] = field(default_factory=lambda: dict()) #path to hash
|
song_paths: dict[Path, str] = field(default_factory=lambda: dict()) #path to hash
|
||||||
song_progress: float = 0.0
|
song_progress: float = 0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user