S3K sprites in sonic 2

Discussion in 'Discussion and Q&A Archive' started by Hanoch, Oct 15, 2008.

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

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    > >s2.asm(35199): error: too many arguments


    > > dc.b $BE, $BE, $BD, $BD, $BE, $BE, $BD, $BD, $BE, $BE, $BD, $BD


    $BE, $BE, $BD, $BD, $BE, $BE, $BD, $BD, $BE, $BE, $AD, $AD, $AD, $AD, $AD, $AD


    $AE, $AE, $AE, $AE


    when i was putting the animations i got that error.


    I also edited the super sonic animations so they will call different routines.


    Why in my sonic 1 hack i have s3k sprites and in my sonic 2 i dont have?


    Oh and i am using s2 2007 disassembly.
     
  2. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    There are too many values for a single dc.b, you have to split it in (at least) two, e.g.:


    dc.b $BE, $BE, $BD, $BD, $BE, $BE, $BD, $BD, $BE, $BE, $BD


    dc.b $BD, $BE, $BE, $BD, $BD, $BE, $BE, $BD, $BD, $BE, $BE


    dc.b $AD, $AD, $AD, $AD, $AD, $AD, $AE, $AE, $AE, $AE


    This *should* work.
     
  3. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    so i can have up to $B bytes in a dc.b?


    Edit: Yeah each line can has only 11 ($B) bytes in it but this one has a problem:


    SonAni_Twirl: dc.b 7, $31, $32, $33, $34, $35, $36, $37, $38, $39, $3A, $3B


    dc.b $3C $FF


    its says Invaild symbol name.


    Edit2: I spilited it a bit more so it will have less bytes each line and then i got these:


    90894 lines source file


    120079 lines incl. macro expansions


    2 passes


    1260 errors


    0 warnings


    Press any key to continue . . .


    look at the errors.
     
    Last edited by a moderator: Oct 15, 2008
  4. Jimmy

    Jimmy "GIVE HIM BREAD FIST!" Member

    Joined:
    Apr 2, 2008
    Messages:
    41
    Location:
    Slough. England
    What I myself would suggest is focussing your attention and sticking to one project at a time =P
     
  5. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    I don't know what is the limit, probably 16, but that's just a guess.

    You forgot a comma between $3C and $FF
     
  6. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    OMG silly me. But i get plenty of errors! i didn't touch anything!1one
     
  7. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
    Have an example, which is S3K Sonic's waiting animation script:



    Code:
    SonAni_Wait:
    
    		dc.b	5, $BA,	$BA, $BA, $BA, $BA, $BA, $BA, $BA, $BA,	$BA, $BA, $BA 
    
    		dc.b	$BA, $BA, $BA, $BA, $BA,	$BA, $BA, $BA, $BA, $BA, $BA, $BA 
    
    		dc.b	$BA,	$BA, $BA, $BA, $BA, $BA, $BA
    
    		dc.b  $BA, $BA,	$BA, $BA, $BA, $BA, $BA, $BA, $BA, $BA,	$BA, $BA, $BA 
    
    		dc.b	$BA, $BA, $BA, $BA, $BA,	$BA, $BB, $BC, $BC, $BD, $BD, $BE 
    
    		dc.b	$BE,	$BD, $BD, $BE, $BE, $BD, $BD
    
    		dc.b  $BE, $BE,	$BD, $BD, $BE, $BE, $BD, $BD, $BE, $BE,	$BD, $BD, $BE 
    
    		dc.b	$BE, $BD, $BD, $BE, $BE,	$BD, $BD, $BE, $BE, $AD, $AD, $AD
    
    		dc.b	$AD,	$AD, $AD, $AE, $AE, $AE, $AE
    
    		dc.b  $AE, $AE,	$AF, $D9, $D9, $D9, $D9, $D9, $D9, $AF,	$AF, $FE, $35
     
  8. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    I found out what the errors was about all of the animations were wrong and i had to replace them but i will recreate them slowly.
     
  9. shobiz

    shobiz Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    198
    Location:
    Karachi, Pakistan
    It's actually 20, anything more and AS throws a fit.
     
Thread Status:
Not open for further replies.