[4.5.9] Selection Menu On START Screen (Updated Dale Coop)

Jonny

Well-known member
All instructions as per Dales original post...

doSpritePreDraw.asm
Code:
LDA gameState    
    CMP #$02                  ;; GAME STATE FOR SELECTION ;;
    BEQ doSelector
    JMP endCheckingStartScreenSelector

doSelector:
    LDA #SELECTION_POS_Y  
    STA temp1
    LDA #SELECTION_POS_X
    STA temp2
    LDX #$00
 
startScreenSelectorLoop:
    CPX curSelection
    BCS drawSprite
    LDA temp1
    CLC
    ADC #SELECTION_STEP_Y
    STA temp1
    LDA temp2
    CLC
    ADC #SELECTION_STEP_X
    STA temp2
    INX
    JMP startScreenSelectorLoop
drawSprite:
    DrawSprite temp2, temp1, #STARTSCREEN_CURSOR_TILE, #%00000000, #$00
 
endCheckingStartScreenSelector:

Not tested yet so let me know if it's not correct / any problems. All the other scripts in the Dales tutorial should still work in 4.5.9.
 
Last edited:

vanderblade

Active member
Thanks, @Jonny . This works.

Now my only issue is I can't use hide sprite (I have other issues with this screenflag after splitting up some content between banks). Fine. I made my player palette all black. However, this also makes my cursor all black. Is there a way to modify the drawSprite code so it uses a different palette from the player sprite?
 

Jonny

Well-known member
Thanks, @Jonny . This works.

Now my only issue is I can't use hide sprite (I have other issues with this screenflag after splitting up some content between banks). Fine. I made my player palette all black. However, this also makes my cursor all black. Is there a way to modify the drawSprite code so it uses a different palette from the player sprite?
Glad to hear that because I didn't actually check it.

For the drawSprite palette, you should be able to it using the attributes part of the macro...

DrawSprite temp2, temp1, #$E7, #%00000011, #$00

I can't remember which bits controls palette, could do with making a list of this stuff for reference.

Tbh I don't use the built-in hide sprites screenflags. No reason, just that I'd learnt from CutterCross' cutscene tutorial this way first... I just use a 'vanish' tile where the player is, changing the action step to one with blank animation...

Code:
CPX player1_object
    BNE dontDisappear
    ChangeActionStep #$00, #$05

dontDisappear:
 
Last edited:
Top Bottom