Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. HiddenPalace

    HiddenPalace Active Member Member

    Joined:
    Feb 9, 2010
    Messages:
    33
    What would happen if I were to copy all the data from the wfz boss including its level event routines and put it into a unused object for use as the hpz boss? Whould I have to rename all the loc_(s) and routines? I would modify some data in the asm of course.
     
  2. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
  3. HiddenPalace

    HiddenPalace Active Member Member

    Joined:
    Feb 9, 2010
    Messages:
    33
    I have made a new object in s2 but I keep getting this message:


    (>s2.asm(80455): error: jump distance too big


    > > > bsr.l LoadChildObject


    > > >s2.asm(80491): error: jump distance too big


    > > > bsr.l Obj_GetOrientationToPlayer)


    What can I do to get around this?
     
  4. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    change these BSR into JSR
     
  5. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    Change bsr.l to jsr


    Why did you make it .l anyway?
     
  6. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    This doesn't exactly need to be longword, so a secondary way to fix this (the most proper one) is by change these bsr.l into simply bsr.


    The game will automatically set up to a proper value when his hack gets compiled. Hey, Dandaman955... you said him the same thing I told before. =P
     
  7. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    You must have posted the same time as me. Xo
     
  8. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Just want to point out: bsr.l doesn't even exist, only bsr.s and bsr.w.
     
  9. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    jsr > bsr.w > bsr.s
     
  10. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    I posted BEFORE YOU If you didn't see. Don't be lazy, please read the topic before post something.


    Going back to the topic...


    ...Well, something similar can also be applied to any other long distance related problem. Per example, if you moved the subroutine for somewhere far from the pointer, you can also remove the .s (that means to a subroutine) from the function, so it will not search for a subroutine anymore and your data can be far from the pointer without any compilation problem. Like Selbi said, longword isn't applied for branching functions.


    EDIT: Grammar fixes
     
    Last edited by a moderator: Dec 21, 2010
  11. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    Anyways HiddenPalace, like Selbi said; bsr.l doesn't exist. the next one up is jsr, which is pretty much able to branch anywhere. Same goes for Bra; use jmp.
     
    Last edited by a moderator: Dec 21, 2010
  12. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    You posted at 1:37, he posted at 1:37 (At least according to my clock), therefore it's clear to me that you both were posting it at near the very same time, but yours managed to get in first.


    How about, you don't be lazy, please read the "timestamps" before passing judgement, because that was uncalled for.
     
    Last edited by a moderator: Dec 21, 2010
  13. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    Also since there's no jump command for the conditional branches (beq, bne etc..) its possible to make a macro for the conditional branches and call them jeq/jne or something (Hivebrain did it with the SVN disassembly).
     
  14. HiddenPalace

    HiddenPalace Active Member Member

    Joined:
    Feb 9, 2010
    Messages:
    33
    I made the new object and put it in hpz but now the stage won't load.(It is wfz boss with modifications)
     
  15. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    You put it in hpz? Like: you opened soned2, added an object corresponding to the boss on the map and saved?
     
  16. HiddenPalace

    HiddenPalace Active Member Member

    Joined:
    Feb 9, 2010
    Messages:
    33
    I did add a sub object of it to hpz using soned2.
     
  17. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    I can't tell for sure whether this is the problem or not, but the boss object shouldn't be placed in the level but created by the program in the "dynamic level events" when you reach some given coordinates.
     
    Last edited by a moderator: Dec 22, 2010
  18. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    I'm sorry, I commited a mistake. My timestamp confused me.

    Wow, lately you've been complimenting me a lot huh, Markey? xD


    Nah, let's definitely stop with this shitty discussion and let's back to the topic!
     
    Last edited by a moderator: Dec 22, 2010
  19. HiddenPalace

    HiddenPalace Active Member Member

    Joined:
    Feb 9, 2010
    Messages:
    33
    When it tries to load the boss the pallet changes and the game freezes.
     
  20. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    Freezes at this level of coding are often caused by a call to something that doesn't exist. A freeze related to the routine counter, as seen with the rexon's bug, or trying to load an object that has no reference in the object pointer list are two of the most simple examples.


    But of course it could be something else.