ASM to Sega Genesis Platform

Would you like to react to this message? Create an account in a few clicks or log in to continue.
ASM to Sega Genesis Platform

All about assembly programming in the Sega Genesis console.


    Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump

    avatar
    OuricoDoido
    Admin

    Mensagens : 46
    Data de inscrição : 2011-01-09
    Current Project : Sonic Open Source Project

    Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump Empty Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump

    Post  OuricoDoido Tue Jan 25, 2011 7:43 pm

    How to: Add a Sound

    below these lines:
    Code:
    HA_calcdistance2:      ; continuation of distance calculator
          muls.w  d1,d1   ; horizontal distance squared
          muls.w  d2,d2   ; vertical distance squared
          add.l  d2,d1   ; add vertical distance to horizontal distance
          cmp.l  #16384,d1      ; is distance of Sonic, greater than or equal 128 pixels of the object? (128^2=16384 // $80^2=$4000)
          bge.s  HA_nextobject   ; if yes, don't execute the homing attack
    add this:
    Code:
          move.w   #$BC,d0            ; set homing attack sound
          jsr   (PlaySound).l         ; play homing attack sound
    BC is the sound will be played.


    Jump Uncontrolled

    When rolling, if you make a jump, your jump will be "uncontrolled". This condition is bad after the Homing Attack, because you can't move the Sonic after the bounce.

    To correct this, go below these lines:
    Code:
          move.w   #$BC,d0            ; set homing attack sound
          jsr   (PlaySound).l         ; play homing attack sound
    and add this:
    Code:
          bclr   #4,$22(a0)         ; clear "uncontrolled jump" flag
    calebjhuhlu
    calebjhuhlu

    Mensagens : 55
    Data de inscrição : 2011-06-16

    Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump Empty Re: Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump

    Post  calebjhuhlu Mon Jul 11, 2011 7:54 am

    Can i use this code (all steps) in sonic 2 as well?
    TheRetroGuy
    TheRetroGuy

    Mensagens : 21
    Data de inscrição : 2012-10-21

    Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump Empty Re: Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump

    Post  TheRetroGuy Sun Nov 25, 2012 3:04 pm

    Yes.
    hacker___
    hacker___

    Mensagens : 1974
    Data de inscrição : 2013-05-06
    Localização : 41.383863, 108.866009
    Current Project : Breathing nitrogen

    Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump Empty Re: Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump

    Post  hacker___ Sun May 12, 2013 7:59 pm

    .
    Green Snake
    Green Snake

    Mensagens : 2185
    Data de inscrição : 2012-04-07
    Localização : I do not even know
    Current Project : nope

    Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump Empty [youtube]qVCFV7jT9ho[/youtube][youtube]qVCFV7jT9ho[/youtube][youtube]qVCFV7jT9ho[/youtube][youtube]qVCFV7jT9ho[/youtube][flash(

    Post  Green Snake Sun May 19, 2013 11:29 am

    v
    Jdpense
    Jdpense

    Mensagens : 2355
    Data de inscrição : 2014-08-21

    Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump Empty Re: Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump

    Post  Jdpense Thu Dec 27, 2018 10:32 am

    Just an annual year bump! Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy bounce bounce bounce bounce bounce affraid Basketball cheers bom drunken Basketball cheers bom drunken cherry sunny Sleep
    Green Snake
    Green Snake

    Mensagens : 2185
    Data de inscrição : 2012-04-07
    Localização : I do not even know
    Current Project : nope

    Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump Empty Re: Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump

    Post  Green Snake Wed Sep 04, 2019 2:08 pm

    Jdpense
    Jdpense

    Mensagens : 2355
    Data de inscrição : 2014-08-21

    Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump Empty Re: Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump

    Post  Jdpense Sun Jun 14, 2020 1:48 pm


    Sponsored content

    Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump Empty Re: Homing Attack in Sonic 1 - Step 7 - Sound and Uncontrolled Jump

    Post  Sponsored content


      Current date/time is Tue Apr 13, 2021 1:20 am