SonLVL

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

  1. MoDule

    MoDule

    Tech Member
    324
    6
    18
    Procrastinating from writing bug-fix guides
    I've run into a bit of a problem when trying to rearrange tiles through drag-and-drop with the 2pcompat flag set.

    In the attached example, I've swapped tiles 4 and 6 on an otherwise unmodified EHZ. While it looks like they've been swapped just fine under the tiles tab, selecting either one will show the original tile in the art editor. In other words, the tiles weren't actually moved. Also, tile 2 somehow got messed up in the process, even though I never touched it.

    I can get around this by deactivating 2pcompat and moving the 8x16 tiles as two separate 8x8 tiles, but it's not exactly comfortable...
     

    Attached Files:

  2. Cioss

    Cioss

    Member
    9
    1
    3
    France
    i'm trying to import this background into labyrinth zone, however it comes out crusty and tiles are broken, is there a way to opimise the amount of tiles created? or is there an alternative way to not have it broken?
    0.png (i dont have the broken bg screenshot sadly, however it uses other art tiles from the level, like the conveyor belt and such)
     
  3. Spicy Bread SSR

    Spicy Bread SSR

    You can call me Mal if you like Member
    10
    7
    3
    Is there a way to alter the Sonic 2 animated blocks in SonLVL? I made the OOZ Pulsing balls use PAL2 in game, and there's clearly a file that outputs the animated tile block onto SonLVL (AnimatedBlocks.bin), but no way to alter the files from my knowledge. And yes, I know that altering said files wouldn't effect the in game version like Sonic 1 and 3k, it's just that having the option would be nice
     
  4. Huh. So SonLvL just suddenly decided to delete itself off of my computer again. This is 2 times now. Anyone know what's up?

    Edit: looks like my computer thinks it's a virus, when I've been using it just fine until now. I'm trying to download it again, but the only links are a loop between MainMemory's site and Sonic Retro. No downloads are working :/
     
    Last edited: Sep 9, 2021
  5. Brainulator

    Brainulator

    Regular garden-variety member Member
    I personally have the same problem. My antivirus sees it as malware and refuses to let it install.
     
  6. Hivebrain

    Hivebrain

    Administrator
    2,958
    71
    28
    53.4N, 1.5W
    HiveView
    I re-added SonLVL INI files to my disassembly:

    https://github.com/cvghivebrain/s1disasm/tree/main/SonLVL INI Files

    Because I'm using ASM and macros more extensively, I couldn't load object positions, start positions and sprite mappings from the disassembly itself, and had to load them from the INI folder instead.

    I made a few improvements to the object defs (which I have to say is quite a fiddly process). Someone might want to copy them over to the Sonic Retro Github.

    • Fixed Batbrain and shooting Newtron which used the wrong palette.
    • Added GlassBlocks.xml for MZ.
    • Added ChainStomper.xml for MZ (I had to edit the mappings to get spikes to show up properly).
    Is there a way to draw a rectangle on a sprite using xml? I'd like to add a visual indication to how moving blocks move.
     
  7. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,603
    198
    43
    SonLVL
    There is support for line drawing within the <Display> section:
    Code (Text):
    1. <Line color="4" x1="-10" y1="-10" x2="10" y2="-10" />
    2. <Line color="4" x1="10" y1="-10" x2="10" y2="10" />
    3. <Line color="4" x1="-10" y1="-10" x2="-10" y2="10" />
    4. <Line color="4" x1="-10" y1="10" x2="10" y2="10" />
     
  8. Hivebrain

    Hivebrain

    Administrator
    2,958
    71
    28
    53.4N, 1.5W
    HiveView
    Code (Text):
    1.  
    2.   <Display>
    3.     <DisplayOption>
    4.       <Condition property="Movement" value="Large"/>
    5.       <ImageRef image="img2"/>
    6.     </DisplayOption>
    7.     <DisplayOption>
    8.       <Condition property="Movement" value="Down -> Up slow"/>
    9.       <ImageRef image="img1">
    10.         <Offset X="0" Y="-48" />
    11.       </ImageRef>
    12.       <Line color="4" x1="-32" y1="48" x2="32" y2="48" />
    13.     </DisplayOption>
    14.     <DisplayOption>
    15.       <ImageRef image="img1"/>
    16.     </DisplayOption>
    17.   </Display>
    18.  
    Do I have this right? I'm not seeing a line. I'm also not sure what color="4" would mean.
     
    Last edited: Apr 3, 2022
  9. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,603
    198
    43
    SonLVL
    Oh. Turns out I never actually implemented the part where it draws the lines, oops.
    The color, for what it's worth, is from the 256 color palette used to display the level. 0-63 are the four regular palette lines.
     
  10. Hivebrain

    Hivebrain

    Administrator
    2,958
    71
    28
    53.4N, 1.5W
    HiveView
    One more question: How do I use xflip/yflip as display conditions? Some objects use those bits for things besides flipping the sprites.
     
  11. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,603
    198
    43
    SonLVL
    Code (Text):
    1. <Condition property="XFlip" value="True" />
    You'll probably also want to put
    Code (Text):
    1. xflip="NeverFlip"
    on the ImageRef element.