Skip to content

Commit

Permalink
Changed the location of "ldx @tmp" to avoid reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWithCommands committed Apr 21, 2024
1 parent 87a3e4e commit 079611d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions SoundEngine/famistudio_asm6.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6640,14 +6640,14 @@ famistudio_sfx_update:
.if FAMISTUDIO_CFG_SFX_STREAMS > 3
ldx #FAMISTUDIO_SFX_CH2
jsr famistudio_sfx_clear_channel
ldx tmp
.endif
.endif

@sfx_active:
.if FAMISTUDIO_CFG_SFX_MIXED = 0
.if FAMISTUDIO_CFG_SFX_STREAMS > 1
ldx tmp ;load effect pointer into temp
lda famistudio_sfx_ptr_hi,x
lda famistudio_sfx_ptr_hi,x ; Load effect pointer into temp
.endif
.endif
sta effect_data_ptr+1
Expand Down
4 changes: 2 additions & 2 deletions SoundEngine/famistudio_ca65.s
Original file line number Diff line number Diff line change
Expand Up @@ -6686,14 +6686,14 @@ famistudio_sfx_update:
.if FAMISTUDIO_CFG_SFX_STREAMS > 3
ldx #FAMISTUDIO_SFX_CH2
jsr famistudio_sfx_clear_channel
ldx @tmp
.endif
.endif

@sfx_active:
.if FAMISTUDIO_CFG_SFX_MIXED = 0
.if FAMISTUDIO_CFG_SFX_STREAMS > 1
ldx @tmp ;load effect pointer into temp
lda famistudio_sfx_ptr_hi,x
lda famistudio_sfx_ptr_hi,x ; Load effect pointer into temp
.endif
.endif
sta @effect_data_ptr+1
Expand Down
4 changes: 2 additions & 2 deletions SoundEngine/famistudio_nesasm.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6699,14 +6699,14 @@ famistudio_sfx_update:
.if FAMISTUDIO_CFG_SFX_STREAMS > 3
ldx #FAMISTUDIO_SFX_CH2
jsr famistudio_sfx_clear_channel
ldx tmp
.endif
.endif

.sfx_active:
.if FAMISTUDIO_CFG_SFX_MIXED = 0
.if FAMISTUDIO_CFG_SFX_STREAMS > 1
ldx tmp ;load effect pointer into temp
lda famistudio_sfx_ptr_hi,x
lda famistudio_sfx_ptr_hi,x ; Load effect pointer into temp
.endif
.endif
sta <.effect_data_ptr+1
Expand Down

0 comments on commit 079611d

Please sign in to comment.