Subotai
Active member
Hi,
Is it possible to uncheck a Screenflag with a script ?
When the flags is "CHECKED", the dark cave is all black.
When the player will get a lamp, when he will go back to this dark cave, the area will be visible.
Here the section for that in my "Post Screen Load" :
Here's the section in the pickup script :
At this time, when the player pickup the lamp, it doesn't do anything on theses 13 screens.
Am I missing something ?
P.S : - The dark cave has 13 screens.
- The lamp will be found somewhere else of these screens.
- Sorry for my bad english
Thanks
Is it possible to uncheck a Screenflag with a script ?
When the flags is "CHECKED", the dark cave is all black.
When the player will get a lamp, when he will go back to this dark cave, the area will be visible.
Here the section for that in my "Post Screen Load" :
Code:
LDA ScreenFlags00
AND #%00001000
BEQ doNotTurnOnTheLight
LDX #$00
doFadeCurrentBckPal:
LDA bckPal,x ;; loads joes pallete for background (0-3) (4-7) (8-11) (12-15) 4,8,and 12 is not needed since its the same bgcolor as 0
CMP #$10 ;; compares 10
BCC + ;; if less than 10 skip to p1, if not continue below
SEC ;; needs for subtraction
SBC #$10 ;; subtract #$10
STA bckPal,x ;; store it back into pallete
JMP goNextBckPal;; jump to the next pal2
+
LDA #$0F ;; set accumalator to 0F which is (black)
STA bckPal,x ;; store it into pallete
goNextBckPal:
INX
CPX #4
BEQ goNextBckPal
CPX #8
BEQ goNextBckPal
CPX #12
BEQ goNextBckPal
CPX #16
BCC doFadeCurrentBckPal
LDA #$01
STA updateScreenData
JMP doneWithExtraScreenCheckForLight
doNotTurnOnTheLight:
doneWithExtraScreenCheckForLight:
Here's the section in the pickup script :
Code:
CMP #$07 ;;lamp
BNE +notThisPickup
LDA ScreenFlags00
AND #%11110111
STA ScreenFlags00
JMP +endPickups
; CMP #$07 ;;candle
; BNE +notThisPickup
; LDA #$01
; STA light
; JMP +endPickups
+notThisPickup:
+endPickups
At this time, when the player pickup the lamp, it doesn't do anything on theses 13 screens.
Am I missing something ?
P.S : - The dark cave has 13 screens.
- The lamp will be found somewhere else of these screens.
- Sorry for my bad english
Thanks