SonLVL

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

  1. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    You aren't the first person to ask for that. Selecting multiple chunks/blocks from the list would require significant edits to the custom list control I use that I'm not sure how to handle. Selecting an area in a chunk/block is more possible, but there's still some rewrites needed, and I'm not sure how to handle the controls in the middle with multiple selections.
     
  2. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    SonLVL now supports Comper compression.

    But only on Windows, as I have no idea how to build the C++ libraries for any other platform. You can find the source code here, if you want to try building it yourself.
     
  3. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    Update:
    • Mouse wheel scrolls tile/block/chunk lists.
    • Added buttons to disable drag-and-drop in tile/block/chunk lists.
    • Added Deep Copy for chunks and blocks.
    What "Deep Copy" means is that rather than copying only the exact data from the chunk/block, it will copy all the tiles in the block, or all the blocks the chunk uses (and their solidity indexes) and all the tiles the blocks use, so that you can paste it into another level to get an exact replica of the original chunk/block, as long as you have enough free tiles/blocks to cover the addition.

    Edit: I have also added buttons for flipping blocks and tiles, like the buttons the chunk editor already had.
     
  4. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    Some art editing improvements:
    • Chunk editing now uses the same mouse mapping as layout editing: right to select, left to draw.
    • Block editor now supports the same functionality as the chunk editor.
    • Right clicking in the tile editor now changes the selected color.
    • Added "Show Block" checkbox to solidity editor, which draws the currently selected block under the solidity data.
    • Selecting a tile in the Tiles tab now changes the tile that will be pasted into the block editor, and selecting a block in the Blocks tab now changes the block that will be pasted into the chunk editor.
    • Selected chunk stays in view in the chunk list when switching tabs.
     
  5. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    I've added the ability to define the size of chunks in the INI by setting a chunksize value, or even set width and height independently via chunkwidth and chunkheight. When a custom chunk size is specified, the chunk format (chunkfmt) will only determine whether the game uses a single or dual path system. So it's possible to use dual-path 256x256 chunks, single-path 128x128 chunks, 64x64 chunks, or even 16x32 chunks. Obviously the sizes have to be a multiple of 16.

    Also the object grid size setting is properly saved and loaded now.
     
  6. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    I've added an option to the Palette Export menu to export up to four full palettes at once to the format used by YY-CHR (and I guess anything else that uses palettes stored in plain RGB bytes).
     
  7. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    I've made some changes to art importing lately:
    • It now checks for flipped blocks, in addition to flipped tiles.
    • All existing tiles/blocks/chunks are checked for duplicates, instead of only the ones that have been imported so far.
    • Fixed a bug with duplicate blocks in chunk importing.
    • Added two methods to import layout data (tiles/blocks/chunks/layout) from images: using the context menu item in Select mode will paste the data directly into the level, while clicking the button above the Layout Sections list will add a new layout section that you can use later.
     
  8. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    If anyone tried importing or flipping blocks or chunks since the last update and got a broken mess, that's been fixed now. Also 1bpp (2 color) and 4bpp (16 color) images will now import to the palette line that is selected in the palette editor, instead of always using line 1.
     
  9. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    SonLVL can now import collision from an image when importing layout, chunks or blocks. Assuming your art is named Bitmap.ext, the collision will be either Bitmap_col.ext, or Bitmap_col1.ext and Bitmap_col2.ext. The collision image(s) must use the following colors: Magenta (#FF00FF) (or transparent) for Not Solid, White (#FFFFFF) for Top Solid, Yellow (#FFFF00) for Left/Right/Bottom Solid, and Black (#000000) for All Solid.
    For example, these three images:
    [​IMG] [​IMG] [​IMG]
    Will produce something like this:
    [​IMG] [​IMG]

    Also I fixed PNG palette exporting, the View->Collision->Angles menu item, and I moved the Import option for chunks, blocks and tiles to a button on the toolbar above their respective lists.
     
  10. MarkeyJester

    MarkeyJester

    ♡ ! Resident Jester
    Not that I do much level editing these days (or importing for that matter), I still feel that this is a great innovation! Having the collision on separate sheets in my mind is a highly beneficial form of import control, that removes the manual labour of post collision setting, and while it may give the impression of mess in one respect, it seems the finest way to go about it in my personal opinion. One thing I will ask is regarding the angles of the collision, how is that handled through importing?

    By the way, the whole Green Hill Zone loop in Emerald Hill Zone thing is a great example to show off this fine new feature! Makes me wonder if importing Emerald Hill Zone's loop into Green Hill Zone would suit the palette just as fine...
     
  11. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    Right, well, basically, if the collision data for a given block in a collision bitmap matches one of the existing solidity maps, it will simply use that data, including the angle. Otherwise, it tries to calculate the angle based on the start and end points of the slope. If a block ends with multiple filled columns, only the first is counted, if it starts with multiple filled columns, only the last is counted.
     
  12. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    SonLVL can now import priority settings as well, using an image named Bitmap_pri.ext (assuming the original image is Bitmap.ext). This image should consist of 8x8 squares for each tile, with black/transparent being low priority and white being high priority. Additionally, scrollbars in tile/block/chunk lists now scroll by entire rows/columns at a time, and when viewing angles in the level, the proper values for flipped blocks are shown.

    GetArt.NET has also been updated for priority importing.
     
  13. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    SonLVL has a new feature:
    [​IMG]
    You can now display a water palette together with a normal palette at a configurable height from the View menu. It applies to the Objects and Foreground tabs, and the Foreground export option.
    You can set defaults for each level in the INI by entering the palette number as 'waterpal' (if palette2 is the water palette, put waterpal=2) and the height in hex as 'waterheight'.

    Edit: I also fixed the "Hide Debug Objects" toggle in the Export menu.
     
  14. Overlord

    Overlord

    Aros gartref, diogelu'r GIG, achub bywydau Moderator
    17,813
    131
    43
    Berkshire, England
    Learning Cymraeg
    Hah! I like that, that's neat.
     
  15. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    SonLVL update:
    • Adding loopchunks setting to INI files, which contains a comma-separated list of hex chunk IDs that will automatically have the loop flag set when placed in a level. Conversely, any chunks not listed will automatically unset the loop flag when placed. Note that if you are copying from the list in the ASM, you will have to clear the high bit, so B5 becomes 35.
    • Saving FG/BG editing mode in settings file.
    • Adding option to switch mouse buttons for chunk/block editing (in Edit menu).
    • Fixed foreground collision export when water palette is enabled.
    • Adding option to export art+collision+priority all at once. This affects blocks, chunks, foreground and background exporting. Note that visibility settings will be ignored with this option enabled, and objects will not be exported with the foreground. If a Sonic 1-style level layout has any chunks with the loop flag set, two collision images will be exported for the layout, showing both states of each loop.
    • Adding JASC-PAL (Paint Shop Pro) palette export.
    • Switching block tile import to go vertically across the block first, for improved interlaced mode (S2 2P) compatibility.

    Edit: also, Clownacy has been doing a great job of updating the object definitions on GitHub, and I've updated the copies in the updater to match for those disassemblies.
     
  16. Clownacy

    Clownacy

    Tech Member
    802
    36
    28
    Damn, thanks. Just hope the constant changes haven't proved annoying.
     
  17. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    More updates:
    • Certain images are exported as 1bpp (2 color) or 4bpp (16 color) images when appropriate, rather than always exporting as 8bpp (256 color).
    • HUD images changed to 4bpp for a file size reduction.
    • Switching positions of water palette and SonLVL-specific colors, so water palette immediately follows normal palette and unused colors are contiguous for future expansion.
    • Making invalid blocks display as one big X in chunks instead of four small Xs.
    • Updating chunk/block lists when palette is changed.
    • Making fully transparent blocks always match block 0 when importing (fixes unnecessary block creation in S2 2P levels and levels with alternate palettes or high priority on block 0).
    • Making art importing check for overflows and cancel import.

    Edit: the last update had a bug where art importing couldn't detect duplicate items within the art that had been imported so far, I've fixed that, and hopefully increased the speed too.
     
  18. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    SonLVL update!

    I fixed some bugs and Clownacy added a "Find Previous" option.
     
  19. RetroKoH

    RetroKoH

    Member
    1,657
    11
    18
    Project Sonic 8x16
    Much thanks to Clownacy for these definition updates! And props to M.M... you've really been taking off on updating this thing lately.
     
  20. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,422
    72
    28
    SonLVL
    Update: SonLVL had a bug that caused unnecessary duplication of blocks when importing blocks/chunks/layout with collision data. If you've been using this feature, you may want to redo the imports.