[Unsolved] One last Plea for aid with Pausing (4.5)

PasseGaming

Active member
Okay, I've been reinvigorated and begun work on Spirit Impel again. Making that last push to finish it before the Holidays. Now, I am still having issues with getting the pause feature to work correctly. This script was provided by John Vanderhoef (much thanks for all your help along the way!) and it works on just about every module, except for the shooter module (because of course it doesn't). When I try to use it in game the sprites pause (they also vanish but that's not really a issue to be honest) but the screen keeps scrolling. When unpasued all sorts of weird stuff happens, like the player not reappearing or changes into a monster sprite. John has managed to figure out that it has something to do with the scrollTrigger flag or scrollByte. I don't really know where to start, even after all this time my knowledge is still fairly limited. I'm getting there though, one step at a time. So, my question is; does anyone have any idea how to go about using the input script below and stop the screen from auto-scrolling while paused? Any help would be fantastic, this has been a such a struggle for me for the past few months.


Code:
;;PlaySound #sfx_nineteen 
   LDA gameStatusByte
    AND #%00000001
    BNE unpausegame
    INC gameStatusByte
    ;; OPTIONAL: Play pause sfx:
    ;PlaySound #sfx_nineteen   
    ;; OPTIONAL: Make the screen dark - set all 3 emphasis bits of $2001 to 1
    LDA soft2001
    ORA #%11100000
    STA soft2001
    RTS
unpausegame:
    LDA gameStatusByte
    AND #%11111110
    STA gameStatusByte
    ;; OPTIONAL: Play unpause sfx:
    ;PlaySound #sfx_nineteen
    ;; OPTIONAL: Make the screen normal - set all 3 emphasis bits of $2001 to 0
    LDA soft2001
    AND #%00011111
    STA soft2001
    RTS
 

CutterCross

Active member
You only have one piece of the puzzle. To prevent vanishing sprites you need to make a simple alteration to your doHandleObjects routine, listed here.

To prevent the screen from autoscrolling when paused, you logically need to add a conditional check for gameStatusByte in your autoscroll routine. More specifically, in your doUpdateCamera_shooter2 script. (Assuming that's what is loaded as the Handle Camera script in the shooter module.) Just add a check like this at the beginning of your doUpdateCamera script.
Code:
doUpdateCamera:
     LDA gameStatusByte
     AND #%00000001
     BEQ +
         RTS
     +
 

PasseGaming

Active member
Awesome, thank you so much Cutter. What may come logically to you doesn't even cross my mind, but I do hope I get to a point where I at the very least "get it". Anyhow, I am going to give it a go and report back here!
 
Top Bottom