don't click here

SonLVL

Discussion in 'Engineering & Reverse Engineering' started by MainMemory, Feb 7, 2011.

  1. Machenstein

    Machenstein

    Member
    830
    0
    0
    It works now. I just had to use the Updater to download the current version of SonLVL in r568.1's place. Now I feel just silly. :v:
     
  2. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    Two ways I could do that:
    1. Increase the size when I draw onto the form, which makes the HUD and various overlays larger too, but is fast.
    2. Scale the level image, which allows the HUD and overlays to stay their proper sizes, but is slower.
     
  3. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    Makes sense but will it be a very noticeable slow down or like less than a second difference?
     
  4. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    Depends on the zoom level. About a second to draw with 5x zoom with option 2, no slowdown with option 1.
     
  5. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    Updated SonLVL with another bugfix for tile list scrolling, and added Grid and Zoom in view menu. Using the fast zoom method.
     
  6. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    Awesome! I'll check it out when I get home.
     
  7. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    I get this error when I click out side the area where you see the background. Also, is there anyway to set the background to the top left?
    Code (Text):
    1. System.IndexOutOfRangeException: Index was outside the bounds of the array.
    2.    at SonicRetro.SonLVL.MainForm.panel3_MouseDown(Object sender,  MouseEventArgs e) in C:\RetroSVN\Programs\SonLVL\SonLVL\MainForm.cs:line  3366
    3.    at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
    4.    at System.Windows.Forms.Control.WndProc(Message& m)
    5.    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    6.    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    7.  

    Anyway, other than that, I love the new zoom feature, and the grid is helpful but not quite what I was thinking... But I am glad you did add those. Thanks!
    Also, sorry about the double post.
    EDIT - The grid acted different the first time I used it now it is acting just perfectly and is awesome.
     
  8. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    Fixed both.
     
  9. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    That was fast. Much better!
    Thanks again!
     
  10. Uberham

    Uberham

    King Of Oblivion Member
    In chemical plant, Grabber's subtype is set to 0 where it should be 36 and Spiny's should be 32.

    Not massive in the grand scheme of things, but less of a headache when placing.
     
  11. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    What do those subtypes mean?
     
  12. Uberham

    Uberham

    King Of Oblivion Member
    I'm not sure, if you keep the subtypes as 0 it makes their graphics corrupt ingame though.

    All grabbers have the subtype 36, and all spiny's have the subtype 32, even wall ones, so I'd assume it affects movement behaviour.

    Also with the moving stairs, subtype 18 gives small square movement, subtype 19 gives a large square movement.
     
  13. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110

    It's related to this:
    Code (Text):
    1.  
    2. ; ---------------------------------------------------------------------------
    3. ; LoadSubObject
    4. ; loads information from a sub-object into this object a0
    5. ; ---------------------------------------------------------------------------
    6.  
    7. ; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
    8.  
    9. ; loc_365F4:
    10. LoadSubObject:
    11.     moveq   #0,d0
    12.     move.b  subtype(a0),d0
    13. ; loc_365FA:
    14. LoadSubObject_Part2:
    15.     move.w  SubObjData_Index(pc,d0.w),d0
    16.     lea SubObjData_Index(pc,d0.w),a1
    17. ; loc_36602:
    18. LoadSubObject_Part3:
    19.     move.l  (a1)+,mappings(a0)
    20.     move.w  (a1)+,art_tile(a0)
    21.     move.b  (a1)+,d0
    22.     or.b    d0,render_flags(a0)
    23.     move.b  (a1)+,priority(a0)
    24.     move.b  (a1)+,width_pixels(a0)
    25.     move.b  (a1),collision_flags(a0)
    26.     addq.b  #2,routine(a0)
    27.     rts
    28.  
    and subtype $36 is it's index for this subroutine that loads it's mappings, art tile, ect.
    EDIT:
    This is completely unrelated to the above and has something to do with the objects code itself.
     
  14. Uberham

    Uberham

    King Of Oblivion Member
    I know, I was merely pointing that out, so he could make 2 distinct types in the sub-menu, like he has with monitors and platforms.
     
  15. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    [​IMG]
    I basically have to go through all the definitions I've written so far, and it takes a while.
     
  16. Uberham

    Uberham

    King Of Oblivion Member
    No problem dude, loving what you've done so far!
     
  17. SegaLoco

    SegaLoco

    W)(at did you say? Banned
    tl;dr the topic. Is this utility hardcoded to the games that the topic says it supports or can it read the level binaries and whatnot (like the layout in a binary file) and just edit it like that? I ask because I'm about to start into the levels on Sonic CD 510 and I want to know if I can isolate the layout data from each level (which I assume would be like the final level layout format which is supported) and just load it and, if anything is needed in terms of display in the program I could add the image files or however you handle that. Anyway, get back to me alright, PM me if you want me to send you a disassembled level MMD so you can code it into the program if my assumption is invalid.
     
  18. flarn2006

    flarn2006

    Member
    280
    3
    18
    How do I draw chunks without manually selecting each block? Is it possible to select multiple blocks in a chunk at a time? Right now the only way I know to, for instance, clear an entire chunk, is to manually select each block and set it to block 00, and then repeat for the next one.
     
  19. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    Right click on the chunk list and choose Import to select an image file, or choose Draw to draw within the program. It's not possible right now.
     
  20. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    So I kind of got tired after going through EHZ/HTZ, CPZ/DEZ and ARZ's definitions, so I've just uploaded what I have so far.

    New things:
    • New XML-based definition format. Some of the objects from the above levels have been converted, others are either simple enough for just an INI entry or so complex they require a custom code file.
    • Minor changes to definition API. This is why the S1 and S3K defs have been updated even though they didn't change.
    • JScript.NET support for code file definitions.
    • Subtype list dropdown in object properties (see image in post above).