How do I put palettes for 2 characters in s2?

Discussion in 'Discussion and Q&A Archive' started by DeoxysKyogre, Jul 22, 2009.

Thread Status:
Not open for further replies.
  1. DeoxysKyogre

    DeoxysKyogre No idea what to put here .-. Member

    Joined:
    Jan 31, 2009
    Messages:
    298
    Well, i've solved the other problem... but now, i have other one! The character i made does not have his palette... Knowing that the method i use of the new character is like s1's "S65's guide" how can i do that?
     
  2. Oerg866

    Oerg866 Well-Known Member Member

    Joined:
    Aug 29, 2008
    Messages:
    299
    Location:
    Frankfurt, Germany
    make two pallette loading routines, one of which is called accordingly to what character is selected.


    I don't know when the palletes are loaded. I assume you set a flag in RAM which contains the number of the loaded character.




    Pallette_Loading_Routine:


    'code


    move.b ($flag), d6


    cmpi.b #0, d6


    beq.w LoadPalletteForCharacter1


    bne.w LoadPalletteForCharacter2


    rts


    LoadPalletteForCharacter2:


    (load pallette)


    rts


    LoadPalletteForCharacter1:


    (load pallette)


    rts



    Very sloppily made, but it demonstrates what I mean


    I want some points already :)
     
    Last edited by a moderator: Jul 23, 2009
  3. Mikel

    Mikel Science is true power! Member

    Joined:
    Oct 5, 2007
    Messages:
    19
    Location:
    Oklahoma
    Well, to make a espio load his own palette instead of Sonic's palette, go to level_loadpal and replace the whole thing starting with "Level_LoadPal:", with this:



    Level_LoadPal:
    move.b (Level).w,d0


    cmpi.w #3,(Player_mode).w ; is character sonic?


    beq EspioPalLoad ; If not, load Espio's pallet


    moveq #3,d0


    bsr.w PalLoad2 ; load Sonic's palette line


    tst.b (Water_flag).w ; does level have water?


    beq.s Level_GetBgm ; if not, branch


    moveq #$15,d0 ; palette number $15


    cmpi.b #8,(Current_Zone).w


    beq.s Level_WaterPal ; branch if level is HPZ


    moveq #$16,d0 ; palette number $16


    cmpi.b #$D,(Current_Zone).w


    beq.s Level_WaterPal ; branch if level is CPZ


    moveq #$17,d0 ; palette number $17


    cmpi.b #$F,(Current_Zone).w


    beq.s Level_WaterPal ; branch if level is CPZ


    EspioPalLoad:


    moveq #$28,d0


    bsr.w PalLoad2 ; load Espio's pallet line


    tst.b (Water_flag).w ; does level have water?


    beq.s Level_GetBgm ; if not, branch


    moveq #$15,d0 ; palette number $15


    cmpi.b #8,(Current_Zone).w


    beq.s Level_WaterPal ; branch if level is HPZ


    moveq #$16,d0 ; palette number $16


    cmpi.b #$D,(Current_Zone).w


    beq.s Level_WaterPal ; branch if level is CPZ


    moveq #$17,d0 ; palette number $17



    Oh, and is this only for one character, or two characters? This one is for Espio.


    And I hope this helps.
     
    Last edited by a moderator: Jul 23, 2009
  4. DeoxysKyogre

    DeoxysKyogre No idea what to put here .-. Member

    Joined:
    Jan 31, 2009
    Messages:
    298
    Thanks, Mikel! Now Espio has his own palette! I just give you 2 points. And thanks to Oerg too, he also helped.
     
Thread Status:
Not open for further replies.