SciNEStist
Well-known member
I'm afraid that error mean you have exceeded the space allowed in a bank. you are going to have to find a way of slimming down some code, or figure out some bankswitching to move things around.
CountObjects #%00001000 ;; Check if object is Flagged Monster
CMP #6; DocNES; Limit to 5 Monsters of ScreenMAX
BEQ labDoNotSpawn:
TXA
PHA
TYA
PHA
LDA Object_x_hi,x
CLC
ADC #$00
STA tempA
LDA Object_screen,x
ADC #$00
STA tempD
LDA Object_y_hi,x
CLC
ADC #$00 ;; Where the object is going to be created; add 4 pixels down
STA tempB
LDA Object_direction,x
AND #%00000111
STA tempC
CreateObjectOnScreen tempA, tempB, #20, #$00, tempD
;;; x, y, object (Game Object) in this case our bullet, starting action step
;;; and now with that object, copy the player's
;;; direction and start it moving that way.
LDA tempC
STA Object_direction,x
TAY
LDA DirectionTableOrdered,y
STA temp1
TXA
STA temp
StartMoving temp, temp1
PLA
TAY
PLA
TAX
labDoNotSpawn:
RTS