don't click here

Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. Hivebrain

    Hivebrain

    Administrator
    3,073
    210
    43
    53.4N, 1.5W
    Github
    That wouldn't work because they don't always match. I used four separate words for standard width/height and hitbox width/height, plus two bytes for the "internal" hitbox used by Yadrin. Using words saves a bit on CPU time and registers, plus you might want something with a hitbox bigger than 256px wide.
     
  2. Boing-o-bot troubles again...
    Code (Text):
    1.  
    2. ; for Boing-o-Bot
    3. loc_3F9CE:
    4.     sub.w    d0,d5
    5.     cmpi.w    #$10,d5
    6.     bhs.s    BranchTo_Touch_Enemy
    7.     move.w    x_pos(a1),d0
    8.     subq.w    #4,d0
    9.     btst    #0,status(a1)
    10.     beq.s    +
    11.     subi.w    #$2,d0
    12. +
    13.     clr.w    d2
    14.     move.b    width_pixels(a1),d2
    15.     neg.w    d2
    16.     subi.w    #$10,d2
    17.     sub.w    d2,d0
    18.     bcc.s    .check_hurt
    19.     addi.w    #$18,d0
    20.     subi.w    #$20,y_pos(a0)
    21.     move.w    #-$A00,y_vel(a0)
    22.     bset    #1,status(a0)
    23.     bclr    #3,status(a0)
    24.     clr.b    jumping(a0)
    25.     cmpi.b    #ObjID_Tails,id(a0)
    26.     bne.s    +
    27.     move.b    #2,double_jump_flag(a0)
    28. +
    29.     move.b    #AniIDSonAni_Spring,anim(a0)
    30.     move.b    #SndID_Spring,d0
    31.     jmp    (PlaySound).l
    32. .check_hurt:
    33.     bra.s    BranchTo_Touch_Enemy
    34.  
    the object works mostly fine, except if you roll into it, it acts like you jumped on it and erroneously bounces you up.
    is there some mistake I've made here?
     
  3. HashNightflux

    HashNightflux

    Member
    6
    0
    1
    I have a question: Has anyone ever dealt with Sonic 2's uncompressed animated art breaking out of a sudden? I just realized they've been static all this time and I don't know how to fix these.
    I barely touch the source code since I'm an ASM noob so I don't really know what happened. The last alterations I've made were to split EHZ and ARZ's water palettes and changing some title cards. I also realized that the sound driver also broke whenever the 1-up sound played which forced me to use a very early backup and port those changes back to it. I was using the 2019 version of MM's Sonic 2's Sound Driver Plus disassembly.

    PS: I've managed to find some very old versions of my source code on Discord and did a frankenstein to solve all of these problems, but if anyone still wants to explain on why does these level animations break, feel free to do so.
     
    Last edited: Jan 3, 2025