Object Properties

Discussion in 'Discussion and Q&A Archive' started by Armada, Jun 21, 2009.

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

    Armada DID SOMEONE SAY WEEABOO? Member

    Joined:
    Aug 17, 2007
    Messages:
    98
    I was messing around with object properties in SonED 2. How can I check the properties of an object in code? I've tried looking in the monitor code, but I'm not sure where to start.
     
    Last edited by a moderator: Jun 21, 2009
  2. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Repeat your question again, please. I have absolutly no idea what you want. As for what I understand, you are not sure where the code in the ASM for monitors is. Or?
     
  3. Armada

    Armada DID SOMEONE SAY WEEABOO? Member

    Joined:
    Aug 17, 2007
    Messages:
    98
    Wrong. I'm looking on how to find an object's property. This is used in the monitor object to define the contents. I either would like to know where it checks those properties in the monitors so I can use it, or that code alone.
     
  4. Thorn

    Thorn wroar Member

    Joined:
    Aug 11, 2007
    Messages:
    70
    It's a certain byte in the object/sprite status table that changes when you use the S/X keys in SonED2. In the Sonic 2 disassembly, it has an equate of "subtype", but I don't know the Sonic 1 disassembly well and I'm not sure which game you're using, so you might want to check Retro's Wiki for sprite status table info. In any case, simply look for anywhere that said byte is checked.


    A few examples... for Sonic 2 monitors, using subtype x means it uses code defined at the label given in entry x of an array. For Metropolis Zone's warp tubes, it does something similar, except the array tells it where to get playfield coordinates instead of more instructions. Aquatic Ruin / Oil Ocean / Mystic Cave swings use the right nybble of the subtype to get how many links the support chain should have (and thus the range of motion for the entire swing), and the left nybble is used to set additional behaviors e.g. back-and-forth swinging, falling, moving in only one direction.
     
  5. Armada

    Armada DID SOMEONE SAY WEEABOO? Member

    Joined:
    Aug 17, 2007
    Messages:
    98
    I'll be more specific. Firstly, I'm editing Sonic 1. Secondly, I'm changing the property of a custom object (using Obj19). I looked in the S1 SST, and saw that the monitor code is using $1C, the animation number being used. My object doesn't use any different animations, will it still come out as a different number?


    EDIT: The proper offset is $28. This is the subtype. Looks like you were right Thorn! Thanks much.
     
    Last edited by a moderator: Jun 22, 2009
Thread Status:
Not open for further replies.