shithub: pokecrystal

Download patch

ref: 83ff516c8280e4c196053e347a5802375a7066f9
parent: e025ab9db0b85cadb42e9b72ac408a58f8133672
parent: e51339f01a52603820749249b625d2093b611a8e
author: Rangi <35663410+Rangi42@users.noreply.github.com>
date: Sun Dec 16 09:19:06 EST 2018

Merge pull request #579 from Rangi42/master

Miscellaneous

--- a/audio/engine.asm
+++ b/audio/engine.asm
@@ -1138,7 +1138,7 @@
 	call GetMusicByte ; store next byte in a
 	cp endchannel_cmd
 	jr z, .endchannel
-	cp first_music_cmd
+	cp FIRST_MUSIC_CMD
 	jr c, .readnote
 	; then it's a command
 .readcommand
@@ -1350,7 +1350,7 @@
 	; reload command
 	ld a, [wCurMusicByte]
 	; get command #
-	sub first_music_cmd
+	sub FIRST_MUSIC_CMD
 	ld e, a
 	ld d, 0
 	; seek command pointer
--- a/engine/overworld/map_objects.asm
+++ b/engine/overworld/map_objects.asm
@@ -1822,6 +1822,7 @@
 .y
 	db  -4,  -6,  -8, -10, -11, -12, -12, -12
 	db -11, -10,  -9,  -8,  -6,  -4,   0,   0
+
 Function5000: ; unscripted?
 ; copy [wPlayerNextMovement] to [wPlayerMovement]
 	ld a, [wPlayerNextMovement]
--- a/engine/overworld/player_movement.asm
+++ b/engine/overworld/player_movement.asm
@@ -469,6 +469,7 @@
 	ret
 
 .Steps:
+; entries correspond to STEP_* constants
 	dw .SlowStep
 	dw .NormalStep
 	dw .FastStep
@@ -514,10 +515,10 @@
 	turn_step LEFT
 	turn_step RIGHT
 .FinishFacing:
-	db $80 + DOWN
-	db $80 + UP
-	db $80 + LEFT
-	db $80 + RIGHT
+	db $80 | DOWN
+	db $80 | UP
+	db $80 | LEFT
+	db $80 | RIGHT
 
 .StandInPlace:
 	ld a, 0
--- a/macros/scripts/audio.asm
+++ b/macros/scripts/audio.asm
@@ -20,20 +20,23 @@
 ENDM
 
 ; MusicCommands indexes (see audio/engine.asm)
-	enum_start $d8
-first_music_cmd EQU __enum__ + -8
+	enum_start $d0, +8
+FIRST_MUSIC_CMD EQU __enum__
 
+	enum octave_cmd ; $d0
 octave: MACRO
-	db first_music_cmd + 8 - (\1)
+	db octave_cmd | 8 - (\1)
 ENDM
 
+__enumdir__ = +1
+
 	enum notetype_cmd ; $d8
 notetype: MACRO
 	db notetype_cmd
 	db \1 ; note_length
-	if _NARG >= 2
+if _NARG >= 2
 	db \2 ; intensity
-	endc
+endc
 ENDM
 
 	enum pitchoffset_cmd ; $d9