Bucket Mouse
Active member
Today we're gonna learn how to make cutscenes with sprites acting them out (as opposed to Ninja Gaiden-style cinema screens, which eat up a lot more memory). In some ways NESMaker 4.5.6 has made this easier; in other ways, a lot LOT harder.
The easy part is that we don't have to install custom ASM to shut off the player sprite or the HUD anymore. They are screen switches in the Adventure module, so we just turn them on.
The hard part is everything else. Currently all sprites vanish from the screen whenever a text box appears. This is not good; we need to see our actors! In NESMaker 4.1 turning the sprites on was as simple as altering one byte in the ASM. But now we need all this....
The first step is to go to Project Settings > User Variables and make a new variable called spritePause. Next, find doHandleObjects.asm (do a search) and make these alterations. Comment out the first four lines, like I've shown below, because they are the very thing that shut the sprites off.
Next, scroll down and find the line that simply says "doActiveObject." It should be line 78 or thereabouts if you're using Notepad+. Post this code directly below it (thank Joseph Rossi for this bug fix):
Now open doDrawBox.asm, and put this at the top:
Then scroll to the middle of doDrawBox and locate the part that has the "COMPLETELY DONE WITH BOX" comment. Below STA queueFlags, add this:
Now your sprites won't disappear during text boxes AND they'll stop moving, including your player sprite. Their animations will still be active, though. So if you don't want that, there's one more step....
Locate doUpdateSpriteTimer.asm and paste this at the top:
That'll do it. The sprites are ready, but the text isn't. See the next post for what to do about that....
The easy part is that we don't have to install custom ASM to shut off the player sprite or the HUD anymore. They are screen switches in the Adventure module, so we just turn them on.
The hard part is everything else. Currently all sprites vanish from the screen whenever a text box appears. This is not good; we need to see our actors! In NESMaker 4.1 turning the sprites on was as simple as altering one byte in the ASM. But now we need all this....
The first step is to go to Project Settings > User Variables and make a new variable called spritePause. Next, find doHandleObjects.asm (do a search) and make these alterations. Comment out the first four lines, like I've shown below, because they are the very thing that shut the sprites off.
Code:
doHandleObjects:
; LDA gameStatusByte
; AND #%00000001 ;;; this will skip object handling.
; BEQ dontSkipObjectHandling
; RTS
Next, scroll down and find the line that simply says "doActiveObject." It should be line 78 or thereabouts if you're using Notepad+. Post this code directly below it (thank Joseph Rossi for this bug fix):
Code:
;;;; THE ABOVE HAS BEEN COMMENTED OUT TO ADD A SCRIPT FOR PAUSING VISIBLE SPRITES DURING TEXT
LDA #$01
CMP spritePause
BNE doActiveObject2
SwitchBank #$1C
LDA Object_status,x
AND #OBJECT_OBSERVES_DRAWING
BNE +
JMP ObjectDoesNotDraw
+
TXA
PHA
TYA
PHA
JSR doDrawSprites
PLA
TAY
PLA
TAX
JMP ObjectDoesNotDraw
doActiveObject2:
;;;; END OF ADDED MATERIAL
Now open doDrawBox.asm, and put this at the top:
Code:
doDrawBox:
LDA #$01
STA spritePause
Then scroll to the middle of doDrawBox and locate the part that has the "COMPLETELY DONE WITH BOX" comment. Below STA queueFlags, add this:
Code:
;;;;;;;;;; ADDED MATERIAL FOR TEXT BOX SPRITE PAUSING
LDA #$00
STA spritePause
;;;;;;;;;;; END OF TEXT BOX SPRITE PAUSE MATERIAL
Now your sprites won't disappear during text boxes AND they'll stop moving, including your player sprite. Their animations will still be active, though. So if you don't want that, there's one more step....
Locate doUpdateSpriteTimer.asm and paste this at the top:
Code:
LDA #$01
CMP spritePause
BNE +
JMP animationTimerNotFinished
+
That'll do it. The sprites are ready, but the text isn't. See the next post for what to do about that....