minor fixes, alpha ver

This commit is contained in:
Yonokid
2025-06-12 21:06:29 -04:00
parent ebf098d8c2
commit bcda244b5f
4 changed files with 13 additions and 10 deletions

5
.gitignore vendored
View File

@@ -4,8 +4,5 @@ __pycache__
.ruff_cache .ruff_cache
scores.db scores.db
cache cache
pytaiko.build
pytaiko.dist
pytaiko.onefile-build
pytaiko.exe
full.csv full.csv
dev-config.toml

View File

@@ -69,12 +69,9 @@ def main():
ray.set_config_flags(ray.ConfigFlags.FLAG_MSAA_4X_HINT) ray.set_config_flags(ray.ConfigFlags.FLAG_MSAA_4X_HINT)
ray.set_trace_log_level(ray.TraceLogLevel.LOG_ERROR) ray.set_trace_log_level(ray.TraceLogLevel.LOG_ERROR)
#ray.set_window_max_size(screen_width, screen_height)
#ray.set_window_min_size(screen_width, screen_height)
ray.init_window(screen_width, screen_height, "PyTaiko") ray.init_window(screen_width, screen_height, "PyTaiko")
if global_data.config["video"]["borderless"]: if global_data.config["video"]["borderless"]:
ray.toggle_borderless_windowed() ray.toggle_borderless_windowed()
#ray.clear_window_state(ray.ConfigFlags.FLAG_WINDOW_TOPMOST)
if global_data.config["video"]["fullscreen"]: if global_data.config["video"]["fullscreen"]:
ray.maximize_window() ray.maximize_window()

View File

@@ -97,12 +97,20 @@ def get_pixels_per_frame(bpm: float, time_signature: float, distance: float) ->
return (distance / total_frames) return (distance / total_frames)
def get_config() -> dict[str, Any]: def get_config() -> dict[str, Any]:
with open('config.toml', "r", encoding="utf-8") as f: if Path('dev-config.toml').exists():
with open(Path('dev-config.toml'), "r", encoding="utf-8") as f:
config_file = tomlkit.load(f)
return config_file
with open(Path('config.toml'), "r", encoding="utf-8") as f:
config_file = tomlkit.load(f) config_file = tomlkit.load(f)
return config_file return config_file
def save_config(config: dict[str, Any]) -> None: def save_config(config: dict[str, Any]) -> None:
with open('config.toml', "w", encoding="utf-8") as f: if Path('dev-config.toml').exists():
with open(Path('dev-config.toml'), "w", encoding="utf-8") as f:
tomlkit.dump(config, f)
return
with open(Path('config.toml'), "w", encoding="utf-8") as f:
tomlkit.dump(config, f) tomlkit.dump(config, f)
def is_l_don_pressed() -> bool: def is_l_don_pressed() -> bool:

View File

@@ -731,7 +731,8 @@ class Judgement:
ray.draw_texture(textures_2[index+5], 304, 143, hit_color) ray.draw_texture(textures_2[index+5], 304, 143, hit_color)
ray.draw_texture(textures_2[9], 370, int(y), color) ray.draw_texture(textures_2[9], 370, int(y), color)
if self.curr_hit_ms is not None: if self.curr_hit_ms is not None:
ray.draw_text(self.curr_hit_ms, 370, int(y)-20, 40, ray.fade(ray.YELLOW, self.fade_animation_1.attribute)) pass
#ray.draw_text(self.curr_hit_ms, 370, int(y)-20, 40, ray.fade(ray.YELLOW, self.fade_animation_1.attribute))
elif self.type == 'OK': elif self.type == 'OK':
if self.big: if self.big:
ray.draw_texture(textures_1[20], 342, 184, color) ray.draw_texture(textures_1[20], 342, 184, color)