Implement GET_TIME opcode used by some DDR PS3 files.
This commit is contained in:
parent
95dc046043
commit
da1dba8f2b
@ -489,6 +489,12 @@ class FunctionCall(Expression):
|
||||
return f"{name}({', '.join(params)})"
|
||||
|
||||
|
||||
class GetTimeFunctionCall(FunctionCall):
|
||||
# Call the built-in 'get time' method which returns the current playback position.
|
||||
def __init__(self) -> None:
|
||||
super().__init__("builtin_GetCurrentPlaybackPosition", [])
|
||||
|
||||
|
||||
class MethodCall(Expression):
|
||||
# Call a method on an object.
|
||||
def __init__(self, objectref: Any, name: Union[str, int, Expression], params: List[Any]) -> None:
|
||||
@ -2895,6 +2901,11 @@ class ByteCodeDecompiler(VerboseOutput):
|
||||
chunk.actions[i] = NopStatement()
|
||||
continue
|
||||
|
||||
if action.opcode == AP2Action.GET_TIME:
|
||||
stack.append(GetTimeFunctionCall())
|
||||
chunk.actions[i] = NopStatement()
|
||||
continue
|
||||
|
||||
if isinstance(action, NullReturnStatement):
|
||||
# We already handled this
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user