add opt static tables

This commit is contained in:
2025-04-07 18:31:11 -04:00
parent 96a252cbf3
commit 1cab68006d
10 changed files with 536 additions and 35 deletions

View File

@ -1,6 +1,6 @@
from typing import Final, Dict
from typing import Optional
from enum import Enum
from core.utils import floor_to_nearest_005
class OngekiConstants:
GAME_CODE = "SDDT"
@ -106,6 +106,24 @@ class OngekiConstants:
"O.N.G.E.K.I. bright MEMORY Act.3",
)
VERSION_LUT = {
"100": VER_ONGEKI,
"105": VER_ONGEKI_PLUS,
"110": VER_ONGEKI_SUMMER,
"115": VER_ONGEKI_SUMMER_PLUS,
"120": VER_ONGEKI_RED,
"125": VER_ONGEKI_RED_PLUS,
"130": VER_ONGEKI_BRIGHT,
"135": VER_ONGEKI_BRIGHT_MEMORY,
"140": VER_ONGEKI_BRIGHT_MEMORY,
"145": VER_ONGEKI_BRIGHT_MEMORY_ACT3,
}
@classmethod
def game_ver_to_string(cls, ver: int):
return cls.VERSION_NAMES[ver]
@classmethod
def int_ver_to_game_ver(cls, ver: int) -> Optional[int]:
""" Takes an int ver (ex 100 for 1.00) and returns an internal game version """
return cls.VERSION_LUT.get(str(floor_to_nearest_005(ver)), None)