mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-08-23 10:44:09 -05:00
add some extra music command classes
This commit is contained in:
@@ -2411,7 +2411,7 @@ class BigEndianParam:
|
||||
return value
|
||||
|
||||
class DecimalBigEndianParam(BigEndianParam):
|
||||
should_be_decimal = True
|
||||
should_be_decimal = True
|
||||
|
||||
music_commands = {
|
||||
0xD0: ["octave 8"],
|
||||
@@ -2504,6 +2504,31 @@ def create_music_command_classes(debug=False):
|
||||
|
||||
music_classes = create_music_command_classes()
|
||||
|
||||
class OctaveParam(DecimalParam):
|
||||
@staticmethod
|
||||
def from_asm(value):
|
||||
value = int(value)
|
||||
return hex(0xd8 - value).replace("0x", "$")
|
||||
|
||||
class OctaveCommand(Command):
|
||||
macro_name = "octave"
|
||||
size = 0
|
||||
end = False
|
||||
param_types = {
|
||||
0: {"name": "octave", "class": OctaveParam},
|
||||
}
|
||||
allowed_lengths = [1]
|
||||
override_byte_check = True
|
||||
|
||||
class ChannelCommand(Command):
|
||||
macro_name = "channel"
|
||||
size = 3
|
||||
override_byte_check = True
|
||||
param_types = {
|
||||
0: {"name": "id", "class": DecimalParam},
|
||||
1: {"name": "address", "class": PointerLabelParam},
|
||||
}
|
||||
|
||||
class callchannel(Command):
|
||||
id = 0xFD
|
||||
macro_name = "callchannel"
|
||||
|
||||
Reference in New Issue
Block a user