Yet another problem

Discussion in 'Engineering & Reverse Engineering' started by Irixion, Jun 15, 2008.

Thread Status:
Not open for further replies.
  1. Alright so, trying to extend EHZ act 2 I ran upon a problem towards moving the boss. Thanks to hitaxas I found

    Code (Text):
    1.     move.b  #$56,(a1); load obj56 (EHZ boss) EHZ Boss Deformation
    2.     move.b  #$81,subtype(a1)
    3.     move.w  #$3C3E,x_pos(a1); x position
    4.     move.w  #$426,y_pos(a1); y position
    Labeled and edited it to where I want the screen to lock. I also edited the level array to the same coordinates.

    However, the boss still loads at the default area. Can someone tell me what I'm missing or doing wrong? Help is greatly appreciated =P
     
  2. Rika Chou

    Rika Chou

    Tech Member
    5,271
    162
    43
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm">loc_2EF36: [color= #adadad; font-style: italic;]; EHZ boss code[/color]
    [color= #00bfff;]move[/color].[color= #00bfff;]l[/color] [color= #ff0000;]#[/color]MapUnc_2FAF8,[color= #ff0000;]4[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]23A0[/color],[color= #ff0000;]2[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]ori[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]4[/color],[color= #ff0000;]1[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color]-[color= #ff0000;]$[/color][color= #ff0000;]7F[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]28[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]29D0[/color],[color= #ff0000;]8[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> [color= #adadad; font-style: italic;]; EDIT ME[/color]
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]426[/color][/color],[color= #ff0000;]$[/color][color= #ff0000;]C[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> [color= #adadad; font-style: italic;]; EDIT ME[/color]
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]20[/color][/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]19[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    &nbsp;
    ...</pre><!--gc2--><!--bG9jXzJFRjM2OgkJCQk7IEVIWiBib3NzIGNvZGUKCQltb3ZlLmwJI01hcFVuY18yRkFGOCw0KGEwKQoJ
    CW1vdmUudwkjJiMwMzY7MjNBMCwyKGEwKQoJCW9yaS5iCSM0LDEoYTApCgkJbW92ZS5iCSMtJiMwMzY7N
    0YsJiMwMzY7MjgoYTApCgkJbW92ZS53CSMmIzAzNjsyOUQwLDgoYTApCTsgRURJVCBNRQoJCW1vdmUudw
    kjJiMwMzY7NDI2LCYjMDM2O0MoYTApCTsgRURJVCBNRQoJCW1vdmUuYgkjJiMwMzY7MjAsJiMwMzY7MTk
    oYTApIAoKCQkuLi4=--><!--egc2--><!--g2--></div><!--eg2-->
     
  3. I edited that to the new coordinates as well...still nothing :)
     
  4. Well, after investigating and figuring things out... I managed to move the boss...Sorta....This is what happens...pretty self explanatory.

    http://www.youtube.com/watch?v=sNVyiAfCF3I

    Edit: The video starts where the original boss is, and then I run all the way to where the new boss is supposed to be...and well...THAT happens o.o

    Help? D: I can't figure it out, I've moved everything I could find in the boss code (from the old coordinates to the new) ....

    Note: Screen lock has a bug, I'll fix it later, also don't mind Tails' palette :P The music is also in beta so don't bitch about it, as well as the art.

    Edit 2: Removed message...
     
  5. Peruant

    Peruant

    Just dropping in through gaps Member
    I don't know much of ASM , but if it's my guess something is off in the one of the codes and probably it's the reason why Robotnik falls through the ground (lol) Nothin like a edit and check would help
     
  6. Umm...Doi???? The car isn't there, I didn't think it was a separate object, but I checked EVERYTHING. EHZ routines, level array, and coordinates, I cannot find a problem. SOMEONE give me a helping hand :(
     
  7. In the boss code (Obj56), you can see that many objects are created (like the car and the wheels, I guess). They are marked with a comment:
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm">[color= #adadad; font-style: italic;]; load obj56[/color]</pre><!--gc2--><!--OyBsb2FkIG9iajU2--><!--egc2--><!--g2--></div><!--eg2-->
    If you search for x_pos(a1) and y_pos(a1), you'll see that some take their coordinates from the first Obj56 object, while some use hardcoded values, like this:
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm"> [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]2AF0[/color],x_pos<span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span></pre><!--gc2--><!--CW1vdmUudwkjJiMwMzY7MkFGMCx4X3BvcyhhMSk=--><!--egc2--><!--g2--></div><!--eg2-->
    I looked quickly, but it seems that all objects that have an hardcoded value are set to $2AF0. The Y position seems to always be taken from the main object.

    EDIT: Also, I noticed some comparisons in the code. You will probably need to change them too, or the boss will go away and never come back, as it will turn around at the wrong locations.
     
Thread Status:
Not open for further replies.