How to set up the Goggle monitor, to work with it

Discussion in 'Tutorials Archive' started by Selbi, Feb 19, 2009.

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

    Zero Active Member Member

    Joined:
    Jan 26, 2009
    Messages:
    37
    Unrelated bump:


    Follow Selbi's guide but copy shield info for goggles and change the object ID (I changed it to 8F)


    then put this code under Obj0A_ReduceAir:



    Code:
    		btst	#$8F,($FFFFD180).w; load shield object	($38)
    
    		beq	Obj0A_GOon
    
    		rts
    
    Obj0A_GOon:

    This should add unlimited air with this shield while you have it.


    Also be sure to increase the table in Object Pointers.asm so that the 8F object is valid and won't crash the game....


    Again sorry for the bump....


    EDIT: I forgot to mention that the actual shield code should be copied and pasted with the new object ID replacing the normal ID otherwise this would be useless


    EDIT 2: Oh, sorry, I was simply saying a way I found out unlimited air, should my post be trashed? I made an unnecessary bump and it wasn't really helpful....
     
    Last edited by a moderator: Mar 24, 2010
  2. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    It would be MUCH easier to simply copy the code from Obj2E_ChkShield to the goggle code and add the extra breathing flag. Then simply set a clr.b for this flag at the point where you lose the shield and you have the same results.
     
  3. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    To disable unlimited air at the end of the level, locate the label Obj0D_Touch and replace the entire code up to locret_EBBA with this:




    Obj0D_Touch: ; XREF: Obj0D_Index


    move.w ($FFFFD008).w,d0


    sub.w 8(a0),d0


    bcs.s locret_EBBA


    cmpi.w #$20,d0 ; is Sonic within $20 pixels of the signpost?


    bcc.s locret_EBBA ; if not, branch


    move.w #$CF,d0


    jsr (PlaySound).l ; play signpost sound


    clr.b ($FFFFFE1E).w ; stop time counter


    move.w ($FFFFF72A).w,($FFFFF728).w ; lock screen position


    addq.b #2,$24(a0)


    move.b #0,($FFFFFFFB).w ; move 0 to the goggle check
     
  4. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    EDIT: Any admins, please delete this post, it was a double post of the above post. Must have hit submit twice...


    To disable unlimited air at the end of the level, locate the label Obj0D_Touch and replace the entire code up to locret_EBBA with this:




    Obj0D_Touch: ; XREF: Obj0D_Index


    move.w ($FFFFD008).w,d0


    sub.w 8(a0),d0


    bcs.s locret_EBBA


    cmpi.w #$20,d0 ; is Sonic within $20 pixels of the signpost?


    bcc.s locret_EBBA ; if not, branch


    move.w #$CF,d0


    jsr (PlaySound).l ; play signpost sound


    clr.b ($FFFFFE1E).w ; stop time counter


    move.w ($FFFFF72A).w,($FFFFF728).w ; lock screen position


    addq.b #2,$24(a0)


    move.b #0,($FFFFFFFB).w ; move 0 to the goggle check
     
    Last edited by a moderator: Apr 18, 2010
Thread Status:
Not open for further replies.