Been having a bit of trouble converting a small bit of code to use less ram and am getting a very strange effect.
Changing this:
Code: Select all
; ************************************
; initialize everything
; ************************************
move.w #1, (tempo) ; initialize tempo
move.w #note_start_position_y, (greennote_position_y) ; Set green note's y position
move.w #note_start_position_y, (rednote_position_y) ; Set red note's y position
move.w #note_start_position_y, (yellownote_position_y) ; Set yellow note's y position
move.w #rockindicator_start_position_x, (rockindicator_position_x) ; Set rock indicator's x position
; ******************************************************************
; Main game loop
; ******************************************************************
GameLoop:
; green note movement code
move.w (greennote_position_y), d0 ; green note y position in d0
add.w (tempo), d0 ; add the tempo
cmp.w #(note_plane_border_offset-note_bounds_bottom), d0 ; does the player miss the note entirely
blt @GreenNoteNotWithinBounds ; branch if the player hasn't
move.w #note_start_position_y, d0 ; otherwise the player has so move the note back to the top
@GreenNoteNotWithinBounds:
move.w d0, (greennote_position_y) ; set the green note's position normally
; red note movement code
move.w (rednote_position_y), d0 ; red note y position in d0
add.w (tempo), d0 ; add the tempo
cmp.w #(note_plane_border_offset-note_bounds_bottom), d0 ; does the player miss the note entirely
blt @RedNoteNotWithinBounds ; branch if the player hasn't
move.w #note_start_position_y, d0 ; otherwise the player has so move the note back to the top
@RedNoteNotWithinBounds:
move.w d0, (rednote_position_y) ; set the red note's position normally
; yellow note movement code
move.w (yellownote_position_y), d0 ; yellow note y position in d0
add.w (tempo), d0 ; add the tempo
cmp.w #(note_plane_border_offset-note_bounds_bottom), d0 ; does the player miss the note entirely
blt @YellowNoteNotWithinBounds ; branch if the player hasn't
move.w #note_start_position_y, d0 ; otherwise the player has so move the note back to the top
@YellowNoteNotWithinBounds:
move.w d0, (yellownote_position_y) ; set the yellow note's position normally
Code: Select all
; ************************************
; initialize everything
; ************************************
move.b #1, (tempo) ; initialize tempo
move.w #note_start_position_y, (greennote_position_y) ; Set green note's y position
move.w #note_start_position_y, (rednote_position_y) ; Set red note's y position
move.w #note_start_position_y, (yellownote_position_y) ; Set yellow note's y position
move.w #rockindicator_start_position_x, (rockindicator_position_x) ; Set rock indicator's x position
; ******************************************************************
; Main game loop
; ******************************************************************
GameLoop:
; green note movement code
move.w (greennote_position_y), d0 ; green note y position in d0
add.b (tempo), d0 ; add the tempo
cmp.w #(note_plane_border_offset-note_bounds_bottom), d0 ; does the player miss the note entirely
blt @GreenNoteNotWithinBounds ; branch if the player hasn't
move.w #note_start_position_y, d0 ; otherwise the player has so move the note back to the top
@GreenNoteNotWithinBounds:
move.w d0, (greennote_position_y) ; set the green note's position normally
; red note movement code
move.w (rednote_position_y), d0 ; red note y position in d0
add.b (tempo), d0 ; add the tempo
cmp.w #(note_plane_border_offset-note_bounds_bottom), d0 ; does the player miss the note entirely
blt @RedNoteNotWithinBounds ; branch if the player hasn't
move.w #note_start_position_y, d0 ; otherwise the player has so move the note back to the top
@RedNoteNotWithinBounds:
move.w d0, (rednote_position_y) ; set the red note's position normally
; yellow note movement code
move.w (yellownote_position_y), d0 ; yellow note y position in d0
add.b (tempo), d0 ; add the tempo
cmp.w #(note_plane_border_offset-note_bounds_bottom), d0 ; does the player miss the note entirely
blt @YellowNoteNotWithinBounds ; branch if the player hasn't
move.w #note_start_position_y, d0 ; otherwise the player has so move the note back to the top
@YellowNoteNotWithinBounds:
move.w d0, (yellownote_position_y) ; set the yellow note's position normally
Sincerely,
Scorpion Illuminati